diff --git a/src/views/modules/sys/dept-add-or-update.vue b/src/views/modules/sys/dept-add-or-update.vue
index 79fb349..aca4943 100644
--- a/src/views/modules/sys/dept-add-or-update.vue
+++ b/src/views/modules/sys/dept-add-or-update.vue
@@ -58,6 +58,21 @@
+
+
+
+
+
+
+
+
{ })
},
+ // 获取部门区域编码列表
+ getAreaCodeDeptList () {
+ return this.$http.get('/sys/dept/getDeptCode').then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.areaCodeList = res.data.options
+ }).catch(() => { })
+ },
// 获取二级党委字典列表
getSecondOrgDicList () {
this.$http.get(`/sys/dict/listSimple/org_type`).then(({ data: res }) => {
@@ -169,6 +199,7 @@ export default {
return this.deptListTreeSetDefaultHandle()
}
this.$refs.deptListTree.setCurrentKey(this.dataForm.pid)
+ this.$refs.areaCodeListTree.setCurrentKey(this.dataForm.areaCode)
}).catch(() => { })
},
// 上级部门树, 设置默认值
@@ -182,6 +213,11 @@ export default {
this.dataForm.parentName = data.name
this.deptListVisible = false
},
+ // 上级部门区域编码树, 选中
+ areaCodeListTreeCurrentChangeHandle (data) {
+ this.dataForm.areaCode = data.code
+ this.areaCodeListVisible = false
+ },
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
@@ -217,4 +253,11 @@ export default {
}
}
}
+.el-popover {
+ height: 320px;
+ overflow-y: scroll;
+}
+.el-dialog__footer {
+ margin-top: 100px;
+}