diff --git a/src/views/personnelmanage/widget/AddForm.vue b/src/views/personnelmanage/widget/AddForm.vue
index c24a41b..fb8d92a 100644
--- a/src/views/personnelmanage/widget/AddForm.vue
+++ b/src/views/personnelmanage/widget/AddForm.vue
@@ -47,7 +47,7 @@
+ v-model="selectOrgs" />
@@ -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()
diff --git a/src/views/personnelmanage/widget/EditForm.vue b/src/views/personnelmanage/widget/EditForm.vue
index f6517b0..6578eab 100644
--- a/src/views/personnelmanage/widget/EditForm.vue
+++ b/src/views/personnelmanage/widget/EditForm.vue
@@ -47,7 +47,7 @@
+ v-model="selectOrgs" />
@@ -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(',');
+ }
}
})
},