Browse Source

信息审核添加部门筛选

master
Jackwang 3 years ago
parent
commit
c6bbdbfe5a
  1. 50
      src/views/modules/epidemic/epidemicuserinfoaudit.vue

50
src/views/modules/epidemic/epidemicuserinfoaudit.vue

@ -2,6 +2,12 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-epidemic__epidemicuserinfoaudit}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader>
</el-form-item>
<el-form-item label="姓名"
prop="username">
<el-input v-model="dataForm.userName"
@ -120,13 +126,53 @@ export default {
{ dictValue: '4', dictName: '审核通过' }
],
dataForm: {
id: ''
}
id: '',
streetId: null,
communityId: null,
gridId: null,
},
deptIdList: [],
options: []
}
},
components: {
AddOrUpdate
},
watch: {
deptIdList: function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.deptIdList[0]
this.dataForm.communityId = this.deptIdList[1]
this.dataForm.gridId = this.deptIdList[2]
}
}
},
created () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => { })
},
methods: {
btKeyUpUsername (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')

Loading…
Cancel
Save