From 8d27f95cf6e3b3289e90828ecef72e0c74f804b0 Mon Sep 17 00:00:00 2001
From: wangyuhang <139@qq.com>
Date: 星期五, 18 七月 2025 15:42:47 +0800
Subject: [PATCH] 导入修改,修改项目名称

---
 src/views/system/manage/index.vue |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/src/views/system/manage/index.vue b/src/views/system/manage/index.vue
index 118edb2..d452151 100644
--- a/src/views/system/manage/index.vue
+++ b/src/views/system/manage/index.vue
@@ -170,12 +170,19 @@
 
 <script setup name="Dept">
 import { getToken } from "@/utils/auth";
-import { listCompany, addCompany, updStatus, delCompany, updateCompany, getCompany } from "@/api/system/company/company";
-import { listManage } from "@/api/system/manage";
+import {
+  listCompany,
+  addCompany,
+  updStatus,
+  delCompany,
+  updateCompany,
+  getCompany
+} from "@/api/system/company/company";
+import { listManage ,exportTemplate} from "@/api/system/manage";
 import { computed } from "vue";
 import { judgeStatus, companyStatus, scopeList } from '@/utils/mapList/index.ts'
 import useSettingsStore from "@/store/modules/settings";
-import { download } from '@/utils/request'; // 涓嬭浇鏂囦欢
+import {download as downloadHttp, download} from '@/utils/request'; // 涓嬭浇鏂囦欢
 const thcolor = computed(() => useSettingsStore().theme);
 const { proxy } = getCurrentInstance();
 const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
@@ -239,9 +246,22 @@
   // 璁剧疆涓婁紶鐨勮姹傚ご閮�
   headers: { Authorization: "Bearer " + getToken() },
   // 涓婁紶鐨勫湴鍧�
-  url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData",
+  url: import.meta.env.VITE_APP_BASE_API + "/system/manage/importData",
 });
-
+/**鏂囦欢涓婁紶涓鐞� */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+/** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", {
+    dangerouslyUseHTMLString: true,
+  });
+  getList();
+};
 const { queryParams, form, rules } = toRefs(data);
 const recordRow = ref([])
 /** 鏌ヨ浼佷笟鍒楄〃 */
@@ -353,9 +373,16 @@
 
 /** 涓嬭浇妯℃澘鎿嶄綔 */
 function importTemplate() {
-  proxy.download("system/user/importTemplate", {}, `user_template_${new Date().getTime()}.xlsx`);
+  exportTemplate().then(val => {
+    downloadHttp('/tool/file/download', {
+      fileName: val.msg,
+      delete: true
+    }, "璁″垝淇℃伅妯℃澘.xlsx")
+  })
 }
 
+
+
 // 淇敼浼佷笟淇℃伅
 function changeCompanyNews(row, event) {
   if (loading.value) {

--
Gitblit v1.9.1