From 62b0623c3476c971dc9bfa36cb0f3b3a4e0544a4 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 26 十月 2026 17:56:36 +0800
Subject: [PATCH] fix(report): 清除旧报告序号单元格中的默认下划线
---
src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
index b79641d..d178f5f 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
@@ -51,6 +51,7 @@
width="70"></el-table-column>
<el-table-column label="璁惧缂栧彿" min-width="170" prop="deviceNumber"></el-table-column>
<el-table-column label="璁惧鍚嶇О" min-width="180" prop="deviceName" show-overflow-tooltip></el-table-column>
+ <el-table-column label="璁惧鍨嬪彿" min-width="120" prop="deviceModel" show-overflow-tooltip></el-table-column>
<el-table-column label="鏍告煡鏃堕棿" min-width="120" prop="checkTime"
:formatter="formatCheckMonth"></el-table-column>
<el-table-column label="鏍告煡鎸囨爣" min-width="140" prop="checkIndex"> </el-table-column>
@@ -107,7 +108,7 @@
<div class="form-section-title">鍩烘湰淇℃伅</div>
<el-row :gutter="12">
<el-col :span="12">
- <el-form-item label="浠櫒鍚嶇О锛�" prop="deviceName">
+ <el-form-item label="璁惧鍚嶇О锛�" prop="deviceName">
<el-input v-model="form.deviceName" disabled size="small"></el-input>
</el-form-item>
</el-col>
@@ -212,7 +213,7 @@
</div>
</el-form>
<template #footer><span class="dialog-footer">
- <el-button @click="resetForm">鍙� 娑�</el-button>
+ <el-button @click="handleCancel">鍙� 娑�</el-button>
<el-button :loading="submitFormLoading" type="primary" @click="submitForm"
v-if="operationType !== 'view'">纭� 璁�</el-button>
</span></template>
@@ -471,7 +472,10 @@
this.$nextTick(() => {
this.form = this.HaveJson(row)
if (this.operationType !== 'view') {
- this.draftRestore('equipmentVerificationPlan', 'form', this.form.planDetailsId, 'dialogVisible')
+ const rowDeviceName = this.form.deviceName
+ this.draftRestore('equipmentVerificationPlan', 'form', this.form.planDetailsId, 'dialogVisible',
+ // 璁惧鍚嶇О鏄鐢ㄥ瓧娈碉紝鑽夌閲屼负绌鸿鏄庢槸琚〃鍗曢噸缃竻绌虹殑搴熻崏绋匡紝鐩存帴涓㈠純
+ draft => !!draft.deviceName || !rowDeviceName)
}
})
},
@@ -518,7 +522,28 @@
this.saveDocx(res, '浠櫒璁惧鏈熼棿鏍告煡璁″垝琛�.docx')
}).catch(() => { })
},
+ // 鏈鏄惁鏈夋敼鍔紙鍚墦寮�鏃舵仮澶嶇殑鑽夌锛�
+ hasUnsavedEdit() {
+ const state = this.draftStates && this.draftStates['equipmentVerificationPlan']
+ return !!state && this.draftSnapshot(state) !== state.baseline
+ },
+ // 鍙栨秷锛氭棤缂栬緫鐩存帴閫�鍑猴紱鏈夌紪杈戝厛纭锛岀‘璁ゅ悗涓㈠純鑽夌閫�鍑�
+ handleCancel() {
+ if (this.operationType === 'view' || !this.hasUnsavedEdit()) {
+ this.dialogVisible = false
+ return
+ }
+ this.$confirm('鏄惁纭鍙栨秷缂栬緫锛熸湰娆$紪杈戣褰曚笉淇濆瓨锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '缁х画缂栬緫',
+ type: 'warning'
+ }).then(() => {
+ this.draftClear('equipmentVerificationPlan')
+ this.dialogVisible = false
+ }).catch(() => { })
+ },
resetForm() {
+ // 鍙充笂瑙掑叧闂椂 close 浜嬩欢鍏堜簬鏄鹃殣鐩戝惉瑙﹀彂锛屽厛鎶婅崏绋垮瓨涓嬪啀閲嶇疆琛ㄥ崟锛岄伩鍏嶉噸缃悗鐨勭┖鍐呭琚瓨鎴愯崏绋�
this.draftStop('equipmentVerificationPlan')
this.$refs.modelForm.resetFields();
this.dialogVisible = false
@@ -539,8 +564,7 @@
},
// 鎵撳紑闄勪欢
openAttachment(row) {
- const isImage = /\.(jpg|jpeg|png|gif)$/i.test(row.fileUrl)
- window.open(this.javaApi + (isImage ? '/img/' : '/word/') + row.fileUrl, '_blank')
+ return this.$download.saveAs(row.fileUrl, row.fileName)
},
// 鍒楄〃闄勪欢鍒楀彧璇绘煡鐪嬶紙涓婁紶/鍒犻櫎鍏ュ彛鍙湪缂栬緫銆佹柊澧炲脊绐楀唴锛�
handleAttachment(row) {
--
Gitblit v1.9.3