Commit 86ebb4bc authored by 李苏's avatar 李苏 💬

路由转换

parent c4501e7c
export default (item)=>{
/* 默认路径为原路径*/
if(item.meta&&item.meta.mkid){
if(item.meta.mkid=='215020200'){
item.erpComponent=false
}
}
}
...@@ -284,6 +284,21 @@ export const powerRoutes = [ ...@@ -284,6 +284,21 @@ export const powerRoutes = [
name: 'lkrck', name: 'lkrck',
path: "lkrck", path: "lkrck",
}, },
/* 仓库对照表*/
{
erpComponent: false,
component: 'ccgl/jcsj/ckdzb/index',
hidden: false,
meta: {
"title": "sap仓库对照表",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920011700',
},
name: 'ckdzb',
path: "ckdzb",
},
], ],
......
...@@ -8,10 +8,10 @@ import views from 'common' ...@@ -8,10 +8,10 @@ import views from 'common'
import vue from 'vue' import vue from 'vue'
import commonList from "common/src/commonList" import commonList from "common/src/commonList"
import erpList from "common/src/erpList" import erpList from "common/src/erpList"
import dynamicRouter from 'common/src/utils/router/dynamic.js'
/* 过滤mkid相同的定制路由 */ /* 过滤mkid相同的定制路由 */
const permission = { const permission = {
state: { state: {
routes: [], routes: [],
...@@ -125,7 +125,6 @@ const permission = { ...@@ -125,7 +125,6 @@ const permission = {
return newData return newData
} }
let newPowerRoutes=filter(powerRoutes) let newPowerRoutes=filter(powerRoutes)
console.log(newPowerRoutes,'newPowerRoutes')
let newCommonList=filter(commonList.list) let newCommonList=filter(commonList.list)
let newErpList=filter(erpList.list) let newErpList=filter(erpList.list)
/* 转化菜单格式*/ /* 转化菜单格式*/
...@@ -137,8 +136,8 @@ const permission = { ...@@ -137,8 +136,8 @@ const permission = {
newmenus.push(mi) newmenus.push(mi)
} }
}) })
// dynamicRouter([...newCommonList,...newErpList,...newPowerRoutes],asymenus)
res.data=[...newCommonList,...newErpList,...newPowerRoutes] res.data=dynamicRouter([...newCommonList,...newErpList,...newPowerRoutes],asymenus)||[...newCommonList,...newErpList,...newPowerRoutes]
const sdata = JSON.parse(JSON.stringify(res.data)) const sdata = JSON.parse(JSON.stringify(res.data))
const rdata = JSON.parse(JSON.stringify(res.data)) const rdata = JSON.parse(JSON.stringify(res.data))
const sidebarRoutes = filterAsyncRouter(sdata) const sidebarRoutes = filterAsyncRouter(sdata)
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage :power='power' class="min_full" :config="config" >
<template #dialog="ctx" >
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx" >
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default{
data(){
return{
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
},
config:{
/* 基本配置*/
url:'lxyl/jcsj/uckdzb',
tableTitle: [
{title: "仓库编码", field: "ckCode", fieldType:"upper", width: 140},
{title: "仓库名称", field: "ckName", width: 140},
{title: "SAP仓库编码", field: "sapCkCode", fieldType:"upper", width: 140},
{title: "维护人", field: "whr",width: 140},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"},
],
queryParams:[[
{
label: '仓库编码',
prop: 'ckCode',
span: 6,
type: 'input',
value:''
},
{
label: 'SAP仓库编码',
prop: 'sapCkid',
span: 6,
type: 'input',
value:''
}
]],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components:{
Edit
}
}
</script>
<style>
</style>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
// }, // },
{ {
title: "类型", title: "类型",
field: "type", field: "gwType",
width: 140, width: 140,
"transform": { "transform": {
"url": "lxyl/jcsj/ugw/init/gwlx", "url": "lxyl/jcsj/ugw/init/gwlx",
......
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