Browse Source

修改筛选限制

feature/sleltc
123456 3 years ago
parent
commit
9b862b13bd
  1. 51
      src/views/modules/epidemic/epidemicreportuserinfo.vue

51
src/views/modules/epidemic/epidemicreportuserinfo.vue

@ -16,6 +16,17 @@
@change="handleChange"> @change="handleChange">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="所属社区"
label-width="90px">
<el-cascader v-model="agencyList"
ref="deptTreeOld"
:props="props"
:options="communityOptions"
collapse-tags
clearable
@change="communityHandleChange">
</el-cascader>
</el-form-item>
<el-form-item label="姓名" <el-form-item label="姓名"
prop="username" prop="username"
label-width="100px"> label-width="100px">
@ -820,7 +831,8 @@ export default {
endBirthdayTime: '', endBirthdayTime: '',
startCheckTime: '', startCheckTime: '',
endCheckTime: '', endCheckTime: '',
deptIdList: [] deptIdList: [],
agencyList: []
}, },
pickerBeginDateBefore: { pickerBeginDateBefore: {
disabledDate: (time) => { disabledDate: (time) => {
@ -889,6 +901,7 @@ export default {
// } // }
// }, // },
options: [], options: [],
communityOptions:[],
standardOfCultureArr: [], standardOfCultureArr: [],
maritalStatusArr: [], maritalStatusArr: [],
healthArr: [], healthArr: [],
@ -918,7 +931,8 @@ export default {
buttonName: "发送验证码", buttonName: "发送验证码",
buttonTime: 60, buttonTime: 60,
gridIdImport: '', gridIdImport: '',
deptIdList:null deptIdList:null,
agencyList:null,
} }
}, },
created: function () { created: function () {
@ -970,12 +984,29 @@ export default {
}, },
methods: { methods: {
handleChange(value){ handleChange(value){
this.agencyList = null
this.dataForm.deptIdList = [] this.dataForm.deptIdList = []
this.dataForm.agencyList = []
value.forEach(e => { value.forEach(e => {
this.dataForm.deptIdList.push(e.at(-1)) this.dataForm.deptIdList.push(e.at(-1))
}); });
if(this.dataForm.deptIdList.length > 100){
this.$message({
message: '选择数据过多,请选择所属社区进行查询',
type:'warning'
})
}
this.dataForm.deptIdList = this.dataForm.deptIdList + '' this.dataForm.deptIdList = this.dataForm.deptIdList + ''
}, },
communityHandleChange(value){
this.deptIdList = null
this.dataForm.agencyList = []
this.dataForm.deptIdList = []
value.forEach(e => {
this.dataForm.agencyList.push(e.at(-1))
});
this.dataForm.agencyList = this.dataForm.agencyList + ''
},
resetState () { resetState () {
this.$confirm('此操作将重置所有人员的核酸检测状态为未检测, 是否继续?', '提示', { this.$confirm('此操作将重置所有人员的核酸检测状态为未检测, 是否继续?', '提示', {
@ -1051,6 +1082,13 @@ export default {
}).catch(() => { }) }).catch(() => { })
}, },
beforeGetDataListSearch () { beforeGetDataListSearch () {
if(this.dataForm.deptIdList.length > 100){
this.$message({
message: '所属组织数据选择过多,请选择所属社区进行查询',
type:'warning'
})
return false
}
if (this.companyArr.length > 0) { if (this.companyArr.length > 0) {
this.dataForm.company = this.companyArr.toString() this.dataForm.company = this.companyArr.toString()
} else { } else {
@ -1115,6 +1153,15 @@ export default {
this.options = res.data.options this.options = res.data.options
}) })
.catch(() => { }) .catch(() => { })
this.$http
.get(`/sys/user/agencyOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.communityOptions = res.data.options
})
.catch(() => { })
this.$http.get(`/sys/dict/listSimple/politics_status`).then(({ data: res }) => { this.$http.get(`/sys/dict/listSimple/politics_status`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)

Loading…
Cancel
Save