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

Loading…
Cancel
Save