人员管理完善

yishuixian
zzq 2024-10-24 13:42:37 +08:00
parent d315917945
commit 1d832954e5
2 changed files with 36 additions and 8 deletions

View File

@ -47,7 +47,7 @@
<el-form-item label="自然村:" prop="zrcName">
<treeselect ref="modulesTree" :normalizer="normalizer" :disabled="treeDisabled" :options="modulesTreeRoot" style="width:300px;"
:default-expand-level="2" :multiple="true" :open-on-click="true" :open-on-focus="true" :clear-on-select="true" placeholder="请选择"
v-model="addForm.areaId" />
v-model="selectOrgs" />
</el-form-item>
@ -110,6 +110,18 @@
modulesTreeRoot:[]
}
},
computed: {
selectOrgs: {
get: function () {
return []
},
set: function (v) {
console.log('set org:', v)
var _this = this
_this.addForm.areaId = v
}
}
},
created() {
this.getUnitListData()
this.getVillageListData()

View File

@ -47,7 +47,7 @@
<el-form-item label="自然村:" prop="zrcName">
<treeselect ref="modulesTree" :normalizer="normalizer" :disabled="treeDisabled" :options="modulesTreeRoot" style="width:300px;"
:default-expand-level="2" :multiple="true" :open-on-click="true" :open-on-focus="true" :clear-on-select="true" placeholder="请选择"
v-model="addForm.areaId" />
v-model="selectOrgs" />
</el-form-item>
@ -84,7 +84,9 @@
}
},
treeDisabled: false, //
addForm: { },
addForm: {
areaId: []
},
rules: {
name: [
{ required: true, message: '姓名不能为空', trigger: 'blur' },
@ -108,25 +110,39 @@
{ value: 4, label: '巡查员' },
{ value: 5, label: '管理人员' }
],
modulesTreeRoot:[]
modulesTreeRoot:[],
}
},
created() {
console.log('this.detailInfo', this.detailInfo)
this.addForm = this.detailInfo;
this.getDetail()
this.getUnitListData()
this.getVillageListData()
// this.getDetail()
},
computed: {
selectOrgs: {
get: function () {
return this.addForm.areaId
},
set: function (v) {
console.log('set org:', v)
var _this = this
_this.addForm.areaId = v
}
}
},
mounted() {
},
methods: {
getDetail() {
getMethodCommon("/FireCodeApp/GetForestryUserById?id=" + this.detailInfo.id, {}).then(res => {
if (res.code == 200) {
let detail = {...res.data[0]};
this.addForm = detail;
this.addForm = this.detailInfo;
if(detail.areaId){
this.addForm.areaId = detail.areaId.split(',');
}
}
})
},