Browse Source

小程序码管理页面,完善修复查询功能

master
尹作梅 6 years ago
parent
commit
a51639a48c
  1. 25
      src/views/modules/sys/deptmacode.vue

25
src/views/modules/sys/deptmacode.vue

@ -8,7 +8,7 @@
>
<el-form-item label="所属机构">
<el-cascader
v-model="dataForm.deptIdList"
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
clearable
@ -166,9 +166,12 @@ export default {
deleteIsBatch: true
},
dataForm: {
leaderFlag: '0',
deptIdList: []
streetId: null,
communityId: null,
gridId: null,
leaderFlag: '0'
},
deptIdList: [],
options: [],
streetList: [],
communityList: [],
@ -191,6 +194,22 @@ export default {
})
.catch(() => {})
},
watch: {
'deptIdList': function (val) {
if (val.length === 1) {
this.dataForm.streetId = this.deptIdList[0]
}
if (val.length === 2) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
}
if (val.length === 3) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = this.deptIdList[2]
}
}
},
methods: {
createDeptMaCodeHandle (id) {
this.$confirm(

Loading…
Cancel
Save