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

Loading…
Cancel
Save