From 29be8639dc16b5d82bddc6099b1fa5cdca75f77a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 十月 2026 16:28:22 +0800
Subject: [PATCH] feat(import): 统一导入弹框与模板,修复模板日期格式及上传报错
---
src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
index d32e39d..83304ca 100644
--- a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
+++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
@@ -6,10 +6,7 @@
<el-button type="primary" size="small" @click="addFun">鏂� 澧�</el-button>
<el-button type="primary" size="small" @click="approvalFun">瀹� 鎵�</el-button>
<el-button type="primary" size="small" @click="approveFun">鎵� 鍑�</el-button>
- <el-upload style="display: inline-block; padding: 0 6px" :action="action" :headers="uploadHeader"
- :on-error="onError" :show-file-list="false" :on-success="onSuccess">
- <el-button size="small" type="primary">瀵� 鍏�</el-button>
- </el-upload>
+ <el-button size="small" type="primary" @click="$refs.importDialog.open()">瀵� 鍏�</el-button>
<el-button size="small" @click="openDownloadDia">瀵煎嚭</el-button>
</div>
</div>
@@ -93,6 +90,16 @@
<el-button type="primary" @click="addApi" :loading="loading">纭� 瀹�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒�"
+ :action="action"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒掑鍏ユā鏉�.xlsx"
+ template-name="閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒掑鍏ユā鏉�.xlsx"
+ :tips="['琛ㄥご蹇呴』涓庢ā鏉夸竴鑷达紝涓嶈兘澧炲垹鍒楁垨淇敼鍒楀悕']"
+ @success="initData"
+ />
</div>
</template>
@@ -106,7 +113,9 @@
exportSignificantRiskFactors,
} from '@/api/cnas/systemManagement/measuresDealRisks.js'
import { mapGetters } from "@/utils/store-compat";
+import ImportDialog from '@/components/ImportDialog/index.vue'
export default {
+ components: { ImportDialog },
data() {
return {
dialogVisible: false,
--
Gitblit v1.9.3