From 8da3a8224a7f958c09c577f3ac3c26b505e53666 Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Wed, 1 Nov 2023 09:44:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ea/electronicAssets/index.vue | 50 ++++++++++++++----- src/views/ea/electronicConsultation/index.vue | 8 --- src/views/ea/electronicContracts/index.vue | 8 --- .../ea/electronicCustomerComplaint/index.vue | 8 --- src/views/ea/electronicEmployee/index.vue | 23 --------- 5 files changed, 37 insertions(+), 60 deletions(-) diff --git a/src/views/ea/electronicAssets/index.vue b/src/views/ea/electronicAssets/index.vue index a995d0be..cc02cac9 100644 --- a/src/views/ea/electronicAssets/index.vue +++ b/src/views/ea/electronicAssets/index.vue @@ -70,18 +70,6 @@ @keyup.enter.native="handleQuery" /> - - - 搜索 - + @@ -439,11 +434,16 @@ import Editor from "@/components/Editor"; import { getOrganizationPage } from "@/api/setting/organization"; import { getSiteTree } from "@/api/setting/organization"; import { listData } from "@/api/system/dict/data"; +import { listSimpleDepts } from "@/api/system/dept"; +import { listSimplePosts } from "@/api/system/post"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { name: "ElectronicAssets", components: { Editor, + Treeselect, }, data() { return { @@ -452,6 +452,8 @@ export default { value: "pId", multiple: false, }, + // 部门树选项 + deptOptions: undefined, // 遮罩层 loading: true, optType: undefined, @@ -511,6 +513,7 @@ export default { this.getSiteList(); this.getOrganizationList(); this.handleInitList(); + this.getTreeselect(); }, methods: { /** 查询列表 */ @@ -534,6 +537,27 @@ export default { this.typeOptions = res.data.list || []; }); }, + /** 查询部门下拉树结构 + 岗位下拉 */ + getTreeselect() { + listSimpleDepts().then((response) => { + // 处理 deptOptions 参数 + this.deptOptions = []; + this.deptOptions.push(...this.handleTree(response.data, "id")); + }); + listSimplePosts().then((response) => { + // 处理 postOptions 参数 + this.postOptions = []; + this.postOptions.push(...response.data); + }); + }, + // 格式化部门的下拉框 + normalizer(node) { + return { + id: node.id, + label: node.name, + children: node.children, + }; + }, //获取归档位置 getSiteList() { getSiteTree().then((response) => { diff --git a/src/views/ea/electronicConsultation/index.vue b/src/views/ea/electronicConsultation/index.vue index ff796fea..201eb486 100644 --- a/src/views/ea/electronicConsultation/index.vue +++ b/src/views/ea/electronicConsultation/index.vue @@ -9,14 +9,6 @@ v-show="showSearch" label-width="98px" > - - - - - - - - - - - - - - - - - - - - - -