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

Loading…
Cancel
Save