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