Commit 235cebb3 authored by 邓超's avatar 邓超

fix: 修改路由名称及沙箱参数名

parent ec575bf1
Pipeline #51377 passed with stages
in 7 minutes 34 seconds
...@@ -65,7 +65,7 @@ const BasicLayout = props => { ...@@ -65,7 +65,7 @@ const BasicLayout = props => {
return ( return (
<> <>
{sessionStorage.getItem('isSandbox') == 'true' ? ( {sessionStorage.getItem('sandbox') == 'true' ? (
<>{renderRoutes(props.route.routes)}</> <>{renderRoutes(props.route.routes)}</>
) : ( ) : (
<ProLayout <ProLayout
......
...@@ -301,8 +301,8 @@ const AddModal = props => { ...@@ -301,8 +301,8 @@ const AddModal = props => {
useEffect(() => { useEffect(() => {
console.log(props); console.log(props);
console.log(treeSelectValue); console.log(treeSelectValue);
console.log(props.match.params.id); console.log(props.location.state.id);
if (props.match.params.id) { if (props.location.state.id) {
setSelectTreeData(props.location.state.keepTreeSelect); setSelectTreeData(props.location.state.keepTreeSelect);
setSelectDataFirst(props.location.state.keepTreeFirst); setSelectDataFirst(props.location.state.keepTreeFirst);
if (treeSelectValue) { if (treeSelectValue) {
...@@ -335,9 +335,9 @@ const AddModal = props => { ...@@ -335,9 +335,9 @@ const AddModal = props => {
} }
}); });
} else { } else {
setFormObj(props.match.params.id); setFormObj(props.location.state.id);
reloadTableFields({ reloadTableFields({
tableName: props.match.params.id, tableName: props.location.state.id,
}).then(res => { }).then(res => {
setTreeLoading(false); setTreeLoading(false);
if (res.msg === 'Ok') { if (res.msg === 'Ok') {
...@@ -463,7 +463,7 @@ const AddModal = props => { ...@@ -463,7 +463,7 @@ const AddModal = props => {
console.log(keepValue); console.log(keepValue);
console.log(pickIndex, groupArr, 'back'); console.log(pickIndex, groupArr, 'back');
history.push({ history.push({
pathname: '/bsmanger/base/tablemanger', pathname: '/biz/account/table',
query: { query: {
template, template,
tableScroll, tableScroll,
......
...@@ -171,8 +171,9 @@ const TableManager = props => { ...@@ -171,8 +171,9 @@ const TableManager = props => {
e.stopPropagation(); e.stopPropagation();
setFormObj(record); setFormObj(record);
history.push({ history.push({
pathname: `/bsmanger/base/filedConfig/${record.tableName}`, pathname: `/biz/account/fieldConfig`,
state: { state: {
id: record.tableName,
template: record, template: record,
tableScroll: document.querySelector('.ant-table-body').scrollTop, tableScroll: document.querySelector('.ant-table-body').scrollTop,
groupArr: groupArr, groupArr: groupArr,
...@@ -534,8 +535,9 @@ const TableManager = props => { ...@@ -534,8 +535,9 @@ const TableManager = props => {
onDoubleClick: event => { onDoubleClick: event => {
event.stopPropagation(); event.stopPropagation();
history.push({ history.push({
pathname: `/bsmanger/base/filedConfig/${record.tableName}`, pathname: `/biz/account/fieldConfig`,
state: { state: {
id: record.tableName,
template: record, template: record,
tableScroll: document.querySelector('.ant-table-body').scrollTop, tableScroll: document.querySelector('.ant-table-body').scrollTop,
groupArr: groupArr, groupArr: groupArr,
......
...@@ -400,14 +400,14 @@ const incident = () => { ...@@ -400,14 +400,14 @@ const incident = () => {
const process1 = record => { const process1 = record => {
history.push({ history.push({
pathname: '/bsmanger/workOrder/incidentFlow', pathname: '/biz/workflow/eventFlow',
state: { formObj: record, title1: record.name, rember }, state: { formObj: record, title1: record.name, rember },
}); });
}; };
const auxiliaryView1 = record => { const auxiliaryView1 = record => {
history.push({ history.push({
pathname: '/bsmanger/workOrder/incidentView', pathname: '/biz/workflow/eventView',
state: { formObj: record, title2: record.name, rember }, state: { formObj: record, title2: record.name, rember },
}); });
}; };
......
...@@ -107,7 +107,7 @@ const incidentFlow = props => { ...@@ -107,7 +107,7 @@ const incidentFlow = props => {
const back = () => { const back = () => {
let { rember } = props.location.state; let { rember } = props.location.state;
history.push({ history.push({
pathname: '/bsmanger/workOrder/incident', pathname: '/biz/workflow/event',
state: { rember }, state: { rember },
}); });
}; };
......
...@@ -209,7 +209,7 @@ const incidentView = props => { ...@@ -209,7 +209,7 @@ const incidentView = props => {
const back = () => { const back = () => {
let rember = props.location.state.rember; let rember = props.location.state.rember;
history.push({ history.push({
pathname: '/bsmanger/workOrder/incident', pathname: '/biz/workflow/event',
state: { rember }, state: { rember },
}); });
}; };
......
...@@ -115,7 +115,7 @@ const Flow = () => { ...@@ -115,7 +115,7 @@ const Flow = () => {
const toNode = flowName => { const toNode = flowName => {
console.log(flowName); console.log(flowName);
history.push({ history.push({
pathname: '/bsmanger/workOrder/flowNode', pathname: '/biz/workflow/caseNode',
state: { flowName, pickItemIndex }, state: { flowName, pickItemIndex },
}); });
}; };
......
...@@ -306,7 +306,7 @@ const FlowNode = () => { ...@@ -306,7 +306,7 @@ const FlowNode = () => {
// 返回 // 返回
const backFlow = () => { const backFlow = () => {
history.push({ history.push({
pathname: '/bsmanger/workOrder/flow', pathname: '/biz/workflow/case',
state: { pickItemIndex }, state: { pickItemIndex },
}); });
}; };
......
...@@ -230,7 +230,7 @@ const ProjectManage = props => { ...@@ -230,7 +230,7 @@ const ProjectManage = props => {
const changeDesc = record => { const changeDesc = record => {
setCurrentTempalte(record); setCurrentTempalte(record);
history.push({ history.push({
pathname: `/platformCenter/schemeDetail`, pathname: `/platform/schemeDetail`,
state: { template: record, currentPage }, state: { template: record, currentPage },
}); });
// handleShowModal("editVisible", true) // handleShowModal("editVisible", true)
...@@ -298,7 +298,7 @@ const ProjectManage = props => { ...@@ -298,7 +298,7 @@ const ProjectManage = props => {
setCurrentTempalte({}); setCurrentTempalte({});
// handleShowModal("addVisible", true) // handleShowModal("addVisible", true)
history.push({ history.push({
pathname: `/platformCenter/schemeDetail`, pathname: `/platform/schemeDetail`,
state: { template: {} }, state: { template: {} },
}); });
}; };
......
...@@ -353,7 +353,7 @@ const EditModal = props => { ...@@ -353,7 +353,7 @@ const EditModal = props => {
}; };
const back = () => { const back = () => {
history.push({ history.push({
pathname: '/platformCenter/notify', pathname: '/platform/notification',
query: { query: {
currentPage, currentPage,
}, },
......
...@@ -106,13 +106,13 @@ export default { ...@@ -106,13 +106,13 @@ export default {
component: InitDataBase, component: InitDataBase,
}, },
{ {
path: '/dbm/dbsm', path: '/dbm/dbUpdate',
name: '数据库升级', name: '数据库升级',
authority: adminAuthority, authority: adminAuthority,
component: ManagementDataBase, component: ManagementDataBase,
}, },
{ {
path: '/dbm/connectConfig', path: '/dbm/dbSource',
name: '多数据源', name: '多数据源',
authority: adminAuthority, authority: adminAuthority,
component: DatabaseConnectConfig, component: DatabaseConnectConfig,
...@@ -120,145 +120,145 @@ export default { ...@@ -120,145 +120,145 @@ export default {
], ],
}, },
{ {
path: '/userCenter', path: '/authority',
name: '组织架构', name: '组织架构',
component: BlankLayout, component: BlankLayout,
icon: <UsergroupAddOutlined style={iconStyle} />, icon: <UsergroupAddOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/userCenter/UserManage', path: '/authority/user',
name: '机构管理', name: '机构管理',
component: UserManage, component: UserManage,
}, },
{ {
path: '/userCenter/RoleManage', path: '/authority/role',
name: '角色管理', name: '角色管理',
component: RoleManage, component: RoleManage,
}, },
{ {
path: '/userCenter/SiteManage', path: '/authority/station',
name: '站点管理', name: '站点管理',
component: SiteManage, component: SiteManage,
}, },
], ],
}, },
{ {
path: '/productCenter', path: '/application',
component: BlankLayout, component: BlankLayout,
name: '应用搭建', name: '应用搭建',
icon: <AppstoreOutlined style={iconStyle} />, icon: <AppstoreOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/productCenter/product', path: '/application/product',
name: '产品授权', name: '产品授权',
component: ProductConfig, component: ProductConfig,
}, },
{ {
path: '/productCenter/web', path: '/application/web',
name: 'Web搭建', name: 'Web搭建',
component: WebConfigPage, component: WebConfigPage,
}, },
{ {
path: '/productCenter/app', path: '/application/mobile',
name: 'Mobile搭建', name: 'Mobile搭建',
component: MobileConfigPage, component: MobileConfigPage,
}, },
], ],
}, },
{ {
path: '/bsmanger', path: '/biz',
component: BlankLayout, component: BlankLayout,
name: '台账/工作流', name: '台账/工作流',
icon: <CreditCardOutlined style={iconStyle} />, icon: <CreditCardOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/bsmanger/base', path: '/biz/account',
name: '台账', name: '台账',
component: BlankLayout, component: BlankLayout,
routes: [ routes: [
{ {
path: '/bsmanger/base/tablemanger', path: '/biz/account/table',
name: '表/字段', name: '表/字段',
component: TableManager, component: TableManager,
}, },
{ {
path: '/bsmanger/base/filedConfig/:id', path: '/biz/account/fieldConfig',
name: '字段配置', name: '字段配置',
component: FiledConfig, component: FiledConfig,
hideMenu: true, hideMenu: true,
}, },
{ {
path: '/bsmanger/base/standingBook', path: '/biz/account/list',
name: '台账列表', name: '台账列表',
component: StandingBook, component: StandingBook,
}, },
], ],
}, },
{ {
path: '/bsmanger/workOrder', path: '/biz/workflow',
name: '工作流', name: '工作流',
component: BlankLayout, component: BlankLayout,
routes: [ routes: [
{ {
path: '/bsmanger/workOrder/incident', path: '/biz/workflow/event',
name: '事件', name: '事件',
component: Incident, component: Incident,
}, },
{ {
path: '/bsmanger/workOrder/incidentFlow', path: '/biz/workflow/eventFlow',
name: '事件受理流程', name: '事件受理流程',
hideMenu: true, hideMenu: true,
component: IncidentFlow, component: IncidentFlow,
}, },
{ {
path: '/bsmanger/workOrder/incidentView', path: '/biz/workflow/eventView',
name: '事件辅助视图', name: '事件辅助视图',
hideMenu: true, hideMenu: true,
component: IncidentView, component: IncidentView,
}, },
{ {
path: '/bsmanger/workOrder/flow', path: '/biz/workflow/case',
name: '流程', name: '工单',
component: Flow, component: Flow,
}, },
{ {
path: '/bsmanger/workOrder/flowNode', path: '/biz/workflow/caseNode',
name: '流程节点', name: '流程节点',
hideMenu: true, hideMenu: true,
component: FlowNode, component: FlowNode,
}, },
{ {
path: '/bsmanger/workOrder/Workflow', path: '/biz/workflow/editor',
name: '工作流编辑', name: '工作流编辑',
component: Workflow, component: Workflow,
}, },
], ],
}, },
{ {
path: '/bsmanger/maintenance', path: '/biz/maintenance',
name: '巡维保', name: '巡维保',
component: Maintenance, component: Maintenance,
}, },
], ],
}, },
{ {
path: '/platformCenter', path: '/platform',
component: BlankLayout, component: BlankLayout,
name: '平台管理', name: '平台管理',
icon: <FundProjectionScreenOutlined style={iconStyle} />, icon: <FundProjectionScreenOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/platformCenter/gis', path: '/platform/gis',
name: 'GIS平台', name: 'GIS平台',
component: BlankLayout, component: BlankLayout,
routes: [ routes: [
{ {
path: '/platformCenter/gis/twoDimensionConfig', path: '/platform/gis/map',
name: '地图配置', name: '地图配置',
component: SchemeConfig, component: SchemeConfig,
}, },
{ {
path: '/platformCenter/gis/threeDimensionConfig', path: '/platform/gis/3Dmap',
name: '三维配置', name: '三维配置',
component: DimensionsConfig, component: DimensionsConfig,
}, },
...@@ -286,23 +286,23 @@ export default { ...@@ -286,23 +286,23 @@ export default {
// ], // ],
}, },
{ {
path: '/platformCenter/notify', path: '/platform/notification',
name: '消息中心', name: '消息中心',
component: MessageManager, component: MessageManager,
}, },
{ {
path: '/platformCenter/SchemeDetail', path: '/platform/schemeDetail',
name: '模板编辑', name: '模板编辑',
component: SchemeDetail, component: SchemeDetail,
hideMenu: true, hideMenu: true,
}, },
{ {
path: '/platformCenter/video', path: '/platform/video',
name: '视频', name: '视频',
component: VideoManager, component: VideoManager,
}, },
{ {
path: '/platformCenter/iot', path: '/platform/configuration',
name: '组态', name: '组态',
component: BaseFrameContainer, component: BaseFrameContainer,
// tabs: [ // tabs: [
...@@ -324,7 +324,7 @@ export default { ...@@ -324,7 +324,7 @@ export default {
// ], // ],
}, },
{ {
path: '/platformCenter/emq', path: '/platform/host',
name: '宿主管理', name: '宿主管理',
url: '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true', url: '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true',
component: HostManager, component: HostManager,
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
}, },
{ {
path: '/dataCenter/dictionary', path: '/data/dic',
name: '数据字典', name: '数据字典',
icon: <ReadOutlined style={iconStyle} />, icon: <ReadOutlined style={iconStyle} />,
component: Dictionary, component: Dictionary,
...@@ -352,23 +352,23 @@ export default { ...@@ -352,23 +352,23 @@ export default {
// ], // ],
// }, // },
{ {
path: '/log', path: '/system',
component: BlankLayout, component: BlankLayout,
name: '系统日志', name: '系统日志',
icon: <FileTextOutlined style={iconStyle} />, icon: <FileTextOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/log/service', path: '/system/apiService',
name: '服务监控', name: '服务监控',
component: ServiceLog, component: ServiceLog,
}, },
{ {
path: '/log/login', path: '/system/loginLog',
name: '登录日志', name: '登录日志',
component: LoginLog, component: LoginLog,
}, },
{ {
path: '/log/omsLog', path: '/system/omsLog',
name: '运维痕迹', name: '运维痕迹',
component: OmsLog, component: OmsLog,
}, },
......
import RenderAuthorize from '@/components/Authorized/index.jsx'; import RenderAuthorize from '@/components/Authorized/index.jsx';
import { isDev } from './tools.ts'; import { isDev } from './tools.ts';
// const isDev = false; // const isDev = false;
...@@ -43,14 +44,14 @@ export default Authorized; ...@@ -43,14 +44,14 @@ export default Authorized;
// use localStorage to store the authority info, which might be sent from server in actual project. // use localStorage to store the authority info, which might be sent from server in actual project.
export function getAuthority(str) { export function getAuthority(str) {
const isSandBox = getQueryVariable('isSandbox'); const isSandBox = getQueryVariable('sandbox');
const sandbox = sessionStorage.getItem('isSandbox'); const sandbox = sessionStorage.getItem('sandbox');
if (!isDev) { if (!isDev) {
// return [...auth]; // return [...auth];
// 支持可以指直接访问 // 支持可以指直接访问
if (isSandBox == 'true') { if (isSandBox == 'true') {
sessionStorage.setItem('isSandbox', isSandBox); sessionStorage.setItem('sandbox', isSandBox);
return ['LOGIN', 'admin']; return ['LOGIN', 'admin'];
} }
if (sandbox == 'true') { if (sandbox == 'true') {
......
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