Commit 3fe39f98 authored by dragondean@qq.com's avatar dragondean@qq.com

修复新建优惠券异常,适配路由不显示在菜单中

parent a482f732
......@@ -26,7 +26,7 @@ export default {
},
data(){
return {
index: {},
index: null,
list:[],
loading: false
}
......
......@@ -34,7 +34,12 @@
import {getCustomerSelect, getCustomerList} from '@/api/ecw/customer'
export default {
props:{
value: [Array]
value: {
type: Array,
default: () => {
return []
}
}
},
data(){
return {
......@@ -60,16 +65,16 @@ export default {
customerIds(val){
this.$emit('input', val)
},
value(val, old){
if(val.sort().join(',') != old.sort().join(',')){
value(val){
if(Array.from(new Set(val)).sort().join(',') != Array.from(new Set(this.customerIds)).sort().join(',')){
this.getChoosedList()
}
}
},
created(){
if(this.value && this.value.length){
/* if(this.value && this.value.length){
this.getChoosedList()
}
} */
this.reLoad()
},
methods:{
......
......@@ -44,7 +44,9 @@ export default {
props: {
defaultIds: {
type: Array,
default: []
default: () => {
return []
}
}
},
data() {
......
......@@ -55,6 +55,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
title: route.name,
icon: route.icon
}
route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar)
// 处理 component 属性
if (route.children) { // 父节点
// debugger
......
......@@ -78,6 +78,11 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 2">
<el-form-item label="显示菜单" prop="isShowInMenuBar">
<dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item v-if="form.type != '3'" label="菜单图标">
<el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()">
......@@ -242,6 +247,7 @@ export default {
parentId: 0,
name: undefined,
icon: undefined,
isShowInMenuBar: undefined,
type: SystemMenuTypeEnum.DIR,
sort: undefined,
status: CommonStatusEnum.ENABLE
......
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