From f9e01cc351a3f25b2a32dcad14b2e497ad01f3fd Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Wed, 13 Jan 2021 16:58:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=8C=BA=E5=9F=9F=E7=BC=96?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/sys/dept-add-or-update.vue | 43 ++++++++++++++++++++ 1 file changed, 43 insertions(+) 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; +}