Commit 6c481de1 authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'fix0618' into 'v2-220618'

feat: 订单添加SRM报表页 See merge request linkseeks-design/pro-platform!1096
parents 16d2882c 76a78177
......@@ -20,7 +20,7 @@ import asyncRoutes from '../router.config.json';
// const isDev = process.env.NODE_ENV === 'development'
const isDev = false
const isDev = true
const homeRoute = {
path: `/memberCenter/home`,
......@@ -238,7 +238,7 @@ const srmPurchaserHomeRoute = {
// isDev ? [ homeRoute, OrderRoute ] :
// const routes = asyncRoutes;
const routes = isDev ? [ homeRoute, MemberRoute, customerAbilityRoute ] : asyncRoutes;
const routes = isDev ? [ homeRoute, MemberRoute, OrderRoute ] : asyncRoutes;
const memberCenterRoute = {
path: '/memberCenter',
......
......@@ -8,6 +8,7 @@ import DeliveryNoticeManagement from './deliveryNoticeManagement'
import DeliveryNoticeCollaboration from './deliveryNoticeCollaboration'
import DeliveryNoticed from './deliveryNotice'
import ReceivingNote from './receivingNote'
import OrderSrm from './orderSrm'
const OrderRoute = {
path: "/memberCenter/order",
......@@ -25,7 +26,9 @@ const OrderRoute = {
// 送货单
...DeliveryNoticed,
// 收货单
...ReceivingNote
...ReceivingNote,
// 订单统计
...OrderSrm,
]
}
......
/**
* 订单能力 -- SRM报表
*/
const OrderSrm = [
{
path: '/memberCenter/order/orderStatistics',
name: '订单统计',
routes: [
{
/** 订单统计 订单报表*/
path: '/memberCenter/order/orderStatistics/orderSrm',
name: '订单报表(SRM)',
component: '@/pages/order/orderStatistics/orderSrm',
noMargin: false
},
]
}
]
export default OrderSrm
......@@ -61,6 +61,7 @@ const removeLogin = () => {
removeAuth()
removeRouters()
history.replace('/user/login')
sessionStorage.removeItem('als')
}
const devRoute = [
......@@ -129,6 +130,8 @@ export async function render(oldRender: Function) {
const resAuth = await getMemberAuthList({})
if(resAuth.code === 1000) {
realTimeAuthLists = resAuth.data
// 仅供系统-页面模板菜单显示
sessionStorage.setItem('als', resAuth.data)
oldRender()
} else {
removeLogin()
......
......@@ -2,10 +2,10 @@ import React, { useEffect, useState } from 'react';
import { history } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Button } from 'antd'
import { SchemaForm } from '@linkseeks/designable-component';
import { Base64 } from '@/utils/cryptoAes';
import { DESIGNABLE_URL } from '@/constants';
import { getTemplateLowMemberTemplateContentDetail, getTemplateLowMemberTemplateDetail, getTemplateLowMemberTemplatePage } from '@/services/TemplateV2Api';
import SchemaForm from '@formily/antd';
const FormLayout = () => {
const [formProps, setFormProps] = useState({
......
.dashboard {
width: 100%;
margin: 0 auto;
}
.dashboard iframe {
width: 100%;
height: 100vh;
border: 0;
}
import Reac from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd'
import styles from './index.less'
import { getAuth } from '@/utils/auth';
import { encryptedByAES } from '@/utils/cryptoAes';
const Index = () => {
const { memberId, userId } = getAuth()
const params = encryptedByAES(`${memberId},${userId}`)
return (
<PageHeaderWrapper>
<Card>
<div className={styles.dashboard}>
<iframe
src={`http://10.0.1.207:5000/superset/dashboard/orderSrm?tenantId=${params}`}
frameBorder="0"
></iframe>
</div>
</Card>
</PageHeaderWrapper>
)
}
export default Index
......@@ -7,10 +7,10 @@ const key = CryptoJS.enc.Utf8.parse('GzSsyLingxi2.0.0');
* @auth xjm
* 加密方法
*/
export const encryptedByAES = (source: string) => {
export const encryptedByAES = (source: string, isHex?: boolean) => {
const password=CryptoJS.enc.Utf8.parse(source);
const encrypted = CryptoJS.AES.encrypt(password, key, {mode:CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7}); //CryptoJS.pad.Pkcs7
return encrypted.toString() // 加密后的base64
return isHex ? encrypted.toString(CryptoJS.format.Hex) : encrypted.toString() // 加密后的base64或16进制
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment