From 4092c49a616b0bc8a4a37f7a165026d9d271b29b Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Mon, 15 Dec 2025 09:25:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(jnh):=20=E5=AE=8C=E5=96=84=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加账号状态显示样式和清除筛选功能 - 为文件上传添加认证头信息 - 增加删除和状态变更确认对话框 - 修复环境变量配置错误 --- .env.development | 4 +- src/views/pages/jnh/import.vue | 15 +++++++- src/views/pages/jnh/index.vue | 70 +++++++++++++++++++++++++--------- 3 files changed, 68 insertions(+), 21 deletions(-) diff --git a/.env.development b/.env.development index 9b3c2c7..dc34e7e 100644 --- a/.env.development +++ b/.env.development @@ -2,10 +2,10 @@ ENV = development # 本地环境接口地址 -# VITE_API_URL = http://4155gf93ll13.vicp.fun/admin +VITE_API_URL = http://4155gf93ll13.vicp.fun/admin # VITE_API_URL = http://localhost:13579/admin # VITE_API_URL = https://cankao.cs.com.cn/admin -VITE_API_URL = http://123.60.153.169:8040/admin +# VITE_API_URL = http://123.60.153.169:8040/admin # VITE_API_URL = /api diff --git a/src/views/pages/jnh/import.vue b/src/views/pages/jnh/import.vue index 17b2f21..df09987 100644 --- a/src/views/pages/jnh/import.vue +++ b/src/views/pages/jnh/import.vue @@ -6,7 +6,14 @@ {{ errorMsg }} - +
点击或拖拽文件至此处导入
支持格式.xlsx/.xls,文件大小≤10MB
@@ -26,6 +33,7 @@ import { onMounted, reactive, ref } from 'vue'; import { NextLoading } from '/@/utils/loading'; import { ElMessage, ElMessageBox } from 'element-plus'; import { getUploadUrl } from '/@/api/jnh'; +import { Session } from '/@/utils/storage'; const baseUrl = ref(import.meta.env.VITE_API_UR); const emit = defineEmits(['close']); @@ -37,6 +45,10 @@ const rules = reactive({ const form = ref({}); const dialogTableVisible = ref(false); +const uploadHeader = ref({ + 'auth-token': `${Session.get('token')}`, +}); + function open(data) { dialogTableVisible.value = true; if (data) { @@ -60,6 +72,7 @@ function handleSuccess(res) { // 页面加载时 onMounted(() => { NextLoading.done(); + baseUrl.value = import.meta.env.VITE_API_URL; }); defineExpose({ diff --git a/src/views/pages/jnh/index.vue b/src/views/pages/jnh/index.vue index ccd1fc4..8488f5d 100644 --- a/src/views/pages/jnh/index.vue +++ b/src/views/pages/jnh/index.vue @@ -24,7 +24,7 @@ - + @@ -37,7 +37,20 @@ - + + +