Browse Source

修改级联选择器传参

feature/sleltc
123456 3 years ago
parent
commit
512ab01135
  1. 23
      src/views/modules/epidemic/epidemicreportuserinfo.vue

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

@ -7,12 +7,13 @@
@keyup.enter.native="beforeGetDataList()">
<el-form-item label="所属组织"
label-width="90px">
<el-cascader v-model="dataForm.deptIdList"
<el-cascader v-model="deptIdList"
ref="deptTreeOld"
:props="props"
:options="options"
collapse-tags
clearable>
clearable
@change="handleChange">
</el-cascader>
</el-form-item>
<el-form-item label="姓名"
@ -916,7 +917,8 @@ export default {
isDisabled: false,
buttonName: "发送验证码",
buttonTime: 60,
gridIdImport: ''
gridIdImport: '',
deptIdList:null
}
},
created: function () {
@ -932,9 +934,8 @@ export default {
},
watch: {
'dataForm.deptIdList': function (val) {
debugger
console.log("11111")
console.log(this.deptIdList)
// console.log("11111")
// console.log(val)
// if (val.length === 0) {
// this.dataForm.streetId = ''
// this.dataForm.communityId = ''
@ -968,6 +969,14 @@ export default {
}
},
methods: {
handleChange(value){
this.dataForm.deptIdList = []
value.forEach(e => {
this.dataForm.deptIdList.push(e.at(-1))
});
this.dataForm.deptIdList = this.dataForm.deptIdList + ''
},
resetState () {
this.$confirm('此操作将重置所有人员的核酸检测状态为未检测, 是否继续?', '提示', {
confirmButtonText: '确定',
@ -981,7 +990,7 @@ export default {
background: 'rgba(0, 0, 0, 0.8)'
});
this.$http['post']('/custom/epidemicuserinfo/resetUserCheckState').then(({ data: res }) => {
this.$http['post']('/custom/epidemicuserinfo/rqesetUserCheckState').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

Loading…
Cancel
Save