Commit b3dbd7fd by 杨北旺

省市工不允许选择

1 parent eaf68a37
......@@ -75,14 +75,14 @@ export default {
label: 'label',
children: 'children',
checkStrictly: true,
disabled: 'entmicroName'
disabled: 'disabled'
},
mypropsParam: {
label: 'departmentName',
value: 'id',
children: 'children',
checkStrictly: true,
disabled: 'relevanceMerchant'
disabled: 'disabled'
},
dataList: [],
customWidth: 113,
......@@ -127,12 +127,12 @@ export default {
},
getDepartmentList() {
getDepartment({ id: 1 }).then(res => {
this.departmentList = this.traverse(res,'relevanceMerchant')
this.departmentList = this.traverse(res, 'relevanceMerchant')
})
},
getMerchantList() {
getMerchantTree().then(res => {
this.shopList = this.traverse(res,'entmicroName')
this.shopList = this.traverse(res, 'entmicroName', 'merchantAccountLevel')
})
},
// 关联当前选择的
......@@ -172,7 +172,7 @@ export default {
this.setBtnWidth()
},
closeCurRouter() {
this.$router.push({path:'/account/index'})
this.$router.push({ path: '/account/index' })
},
// 批量关联
handleMutiGL() {
......@@ -223,7 +223,7 @@ export default {
message: '操作成功',
type: 'success'
})
this.$router.push({path:'/account/index'})
this.$router.push({ path: '/account/index' })
}
})
},
......@@ -256,15 +256,15 @@ export default {
})
},
// 递归:处理层级数组
traverse(arr,string,arr1 =[]) {
arr.map((item)=>{
if(item[string]){
traverse(arr, string1, string2, arr1 = []) {
arr.map(item => {
if (item[string1] || item[string2] != 4) {
item.disabled = true
}else{
} else {
item.disabled = false
}
if(item.children&&item.children instanceof Array){
this.traverse(item.children,string,arr1 = [])
if (item.children && item.children instanceof Array) {
this.traverse(item.children, string1, string2, (arr1 = []))
}
return arr1.push(item)
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!