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

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

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