From d6cf328b6143294a3345e6660392fa1a22f55039 Mon Sep 17 00:00:00 2001 From: junruyue <2294678909@qq.com> Date: Fri, 8 Nov 2024 12:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E9=99=A2=E5=AF=BC=E5=85=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 1 + src/views/dept/index.vue | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.eslintignore b/.eslintignore index e6529fc..1156533 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ build/*.js src/assets public dist +* \ No newline at end of file diff --git a/src/views/dept/index.vue b/src/views/dept/index.vue index a66fb68..16a1c48 100644 --- a/src/views/dept/index.vue +++ b/src/views/dept/index.vue @@ -44,6 +44,16 @@ @click="toggleExpandAll" >展开/折叠 + + 导入数据 + import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept"; +import { getToken } from "@/utils/auth"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; @@ -171,6 +182,11 @@ export default { components: { Treeselect }, data() { return { + // 上传地址 + uploadUrl: process.env.VUE_APP_BASE_API+'/system/dept/import', + headers: { + Authorization: "Bearer " + getToken(), + }, // 遮罩层 loading: true, // 显示搜索条件 @@ -229,6 +245,12 @@ export default { this.getList(); }, methods: { + // 上传成功后 + handleUploadSuccess(res, file) { + if (res.code === 200) { + this.getList(); + } + }, /** 查询部门列表 */ getList() { this.loading = true;