Commit b3dbd7fd by 杨北旺

省市工不允许选择

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