From 03d4dfebf016d5f499cc1ca12a1ff2f40a1b3a72 Mon Sep 17 00:00:00 2001 From: wsm <2746563060@qq.com> Date: Tue, 18 Aug 2026 13:53:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(supervision):=20=E5=90=84=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=B8=BA=E5=AF=BC=E5=85=A5=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bg/bqtakepulse/BgTakepulseList.vue | 122 ++++++++++++++-- .../fixcontact/FixedContact20260730List.vue | 115 ++++++++++++++- src/views/bg/xispeak/BgXiSpeakList.vue | 121 +++++++++++++-- .../dq/inspectTask/DqInspectTaskList.vue | 138 ++++++++++++++---- 4 files changed, 446 insertions(+), 50 deletions(-) diff --git a/src/views/bg/bqtakepulse/BgTakepulseList.vue b/src/views/bg/bqtakepulse/BgTakepulseList.vue index d7cf039..10b4dea 100644 --- a/src/views/bg/bqtakepulse/BgTakepulseList.vue +++ b/src/views/bg/bqtakepulse/BgTakepulseList.vue @@ -103,19 +103,7 @@ 导出 - 下载模板 - 模板校验 - 模板导入 + 导入 删除 @@ -201,6 +189,33 @@ + + +
+
+ +
+
下载模板
+
下载标准导入模板,按模板格式填写数据
+
+
+
+ +
+
模板校验
+
校验所选文件是否符合导入规范,提前发现错误
+
+
+
+ +
+
模板导入
+
导入校验通过的模板数据到当前台账
+
+
+
+ +
@@ -732,6 +747,43 @@ /** * 重置 */ + // ================= 导入弹窗(下载模板 / 模板校验 / 模板导入) ================= + const importModalVisible = ref(false); + const fileInputRef = ref(); + const pendingAction = ref<'check' | 'import' | null>(null); + + function openImportModal() { + importModalVisible.value = true; + } + + function handleDownloadTemplateFromModal() { + importModalVisible.value = false; + handleDownloadTemplate(); + } + + /** 触发隐藏文件选择框,记录当前动作(校验 or 导入) */ + function chooseFile(action: 'check' | 'import') { + pendingAction.value = action; + fileInputRef.value?.click(); + } + + /** 文件选择后按动作分发到原校验/导入逻辑 */ + function onFileSelected(e) { + const file = e.target.files?.[0]; + e.target.value = ''; + if (!file) { + return; + } + const action = pendingAction.value; + pendingAction.value = null; + importModalVisible.value = false; + if (action === 'check') { + void handleCheckExcel({ file }); + } else if (action === 'import') { + void handleImportByTemplate({ file }); + } + } + async function handleDownloadTemplate() { const data = await defHttp.get({ url: getExportXlsHeadersUrl, params: {}, responseType: 'blob', timeout: 60000 }, { isTransformResponse: false }); if (!data) { @@ -979,4 +1031,48 @@ .status-row-3 td { background: #f6ffed !important; } + /* 导入弹窗操作卡片 */ + .import-action-list { + display: flex; + flex-direction: column; + gap: 12px; + padding: 4px 8px 8px; + } + .import-action-card { + display: flex; + align-items: center; + gap: 14px; + padding: 14px 16px; + border: 1px solid #e5e6eb; + border-radius: 8px; + background: #fff; + cursor: pointer; + transition: all 0.2s ease; + } + .import-action-card:hover { + border-color: #1677ff; + background: #f0f7ff; + box-shadow: 0 2px 8px rgba(22, 119, 255, 0.15); + transform: translateY(-1px); + } + .import-action-icon { + font-size: 26px; + color: #1677ff; + flex-shrink: 0; + } + .import-action-body { + min-width: 0; + } + .import-action-title { + font-size: 15px; + font-weight: 600; + color: #1f2329; + line-height: 1.4; + } + .import-action-desc { + margin-top: 4px; + font-size: 12px; + color: #8a919f; + line-height: 1.5; + } diff --git a/src/views/bg/fixcontact/FixedContact20260730List.vue b/src/views/bg/fixcontact/FixedContact20260730List.vue index 89d335a..f54b937 100644 --- a/src/views/bg/fixcontact/FixedContact20260730List.vue +++ b/src/views/bg/fixcontact/FixedContact20260730List.vue @@ -99,9 +99,7 @@ @@ -635,6 +660,43 @@ import { showImportValidationErrors } from '/@/utils/helper/importError'; sm: { span: 14 }, }); + // ================= 导入弹窗(下载模板 / 模板校验 / 模板导入) ================= + const importModalVisible = ref(false); + const fileInputRef = ref(); + const pendingAction = ref<'check' | 'import' | null>(null); + + function openImportModal() { + importModalVisible.value = true; + } + + function handleDownloadTemplateFromModal() { + importModalVisible.value = false; + handleDownloadTemplate(); + } + + /** 触发隐藏文件选择框,记录当前动作(校验 or 导入) */ + function chooseFile(action: 'check' | 'import') { + pendingAction.value = action; + fileInputRef.value?.click(); + } + + /** 文件选择后按动作分发到原校验/导入逻辑 */ + function onFileSelected(e) { + const file = e.target.files?.[0]; + e.target.value = ''; + if (!file) { + return; + } + const action = pendingAction.value; + pendingAction.value = null; + importModalVisible.value = false; + if (action === 'check') { + void handleCheckExcel({ file }); + } else if (action === 'import') { + void handleImportByTemplate({ file }); + } + } + async function handleDownloadTemplate() { let data; try { @@ -841,3 +903,50 @@ import { showImportValidationErrors } from '/@/utils/helper/importError'; background: #f6ffed !important; } + + diff --git a/src/views/bg/xispeak/BgXiSpeakList.vue b/src/views/bg/xispeak/BgXiSpeakList.vue index 372544a..4042aba 100644 --- a/src/views/bg/xispeak/BgXiSpeakList.vue +++ b/src/views/bg/xispeak/BgXiSpeakList.vue @@ -72,15 +72,7 @@ - 下载模板 - 模板校验 - 模板导入 + 导入 + + +
+
+ +
+
下载模板
+
下载标准导入模板,按模板格式填写数据
+
+
+
+ +
+
模板校验
+
校验所选文件是否符合导入规范,提前发现错误
+
+
+
+ +
+
模板导入
+
导入校验通过的模板数据到当前台账
+
+
+
+ +
@@ -832,6 +851,43 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi feedbackViewModalRef.value.open(record); } + // ================= 导入弹窗(下载模板 / 模板校验 / 模板导入) ================= + const importModalVisible = ref(false); + const fileInputRef = ref(); + const pendingAction = ref<'check' | 'import' | null>(null); + + function openImportModal() { + importModalVisible.value = true; + } + + function handleDownloadTemplateFromModal() { + importModalVisible.value = false; + handleDownloadTemplate(); + } + + /** 触发隐藏文件选择框,记录当前动作(校验 or 导入) */ + function chooseFile(action: 'check' | 'import') { + pendingAction.value = action; + fileInputRef.value?.click(); + } + + /** 文件选择后按动作分发到原校验/导入逻辑 */ + function onFileSelected(e) { + const file = e.target.files?.[0]; + e.target.value = ''; + if (!file) { + return; + } + const action = pendingAction.value; + pendingAction.value = null; + importModalVisible.value = false; + if (action === 'check') { + void handleCheckExcel({ file }); + } else if (action === 'import') { + void handleImportByTemplate({ file }); + } + } + async function handleDownloadTemplate() { const data = await defHttp.get( { url: getExportXlsHeadersUrl, params: {}, responseType: 'blob', timeout: 60000 }, @@ -994,3 +1050,50 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi background: #f6ffed !important; } + + diff --git a/src/views/dq/inspectTask/DqInspectTaskList.vue b/src/views/dq/inspectTask/DqInspectTaskList.vue index 0c452ae..ac5d41d 100644 --- a/src/views/dq/inspectTask/DqInspectTaskList.vue +++ b/src/views/dq/inspectTask/DqInspectTaskList.vue @@ -59,30 +59,7 @@ 导出 - 导入 - 下载模板 - 模板校验 - 模板导入 + 导入 + + +
+
+ +
+
下载模板
+
下载标准导入模板,按模板格式填写数据
+
+
+
+ +
+
模板校验
+
校验所选文件是否符合导入规范,提前发现错误
+
+
+
+ +
+
模板导入
+
导入校验通过的模板数据到当前台账
+
+
+
+ +
@@ -180,7 +184,7 @@ const userStore = useUserStore(); const { createMessage } = useMessage(); //注册table数据 - const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ + const { prefixCls, tableContext, onExportXls } = useListPage({ tableProps: { title: 'dq_inspect_task', api: ledgerList, @@ -295,6 +299,43 @@ (selectedRowKeys.value = []) && reload(); } + // ================= 导入弹窗(下载模板 / 模板校验 / 模板导入) ================= + const importModalVisible = ref(false); + const fileInputRef = ref(); + const pendingAction = ref<'check' | 'import' | null>(null); + + function openImportModal() { + importModalVisible.value = true; + } + + function handleDownloadTemplateFromModal() { + importModalVisible.value = false; + handleDownloadTemplate(); + } + + /** 触发隐藏文件选择框,记录当前动作(校验 or 导入) */ + function chooseFile(action: 'check' | 'import') { + pendingAction.value = action; + fileInputRef.value?.click(); + } + + /** 文件选择后按动作分发到原校验/导入逻辑 */ + function onFileSelected(e) { + const file = e.target.files?.[0]; + e.target.value = ''; + if (!file) { + return; + } + const action = pendingAction.value; + pendingAction.value = null; + importModalVisible.value = false; + if (action === 'check') { + void handleCheckExcel({ file }); + } else if (action === 'import') { + void handleImportByTemplate({ file }); + } + } + async function handleDownloadTemplate() { const data = await defHttp.get({ url: getExportXlsHeadersUrl, params: {}, responseType: 'blob', timeout: 60000 }, { isTransformResponse: false }); if (!data) { @@ -677,3 +718,50 @@ background: #f6ffed !important; } + +