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;