From c6e96cdb8b1cfb51e9a45bf86c38d1353e983127 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 19 十月 2026 15:19:48 +0800
Subject: [PATCH] 设备模块业务完善及前序页面优化
---
src/views/CNAS/resourceDemand/device/component/deviceOverview.vue | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
index 76e7268..88aa48d 100644
--- a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
+++ b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
@@ -29,7 +29,7 @@
v-if="list.length > 0 || loading">
<ul class="card">
<li v-for="(m, i) in list" :key="i">
- <el-image class="img" :src="javaApi + '/img/' + m.imageUpload">
+ <el-image v-if="m.imageUpload" class="img" :src="javaApi + '/img/' + m.imageUpload">
<template #error><div class="image-error" style="width: 88px;
height: 88px;
border-radius: 16px;
@@ -40,6 +40,15 @@
<lims-icon name="el-icon-picture-outline" style="font-size:20px;color:var(--lims-text-2);"></lims-icon>
</div></template>
</el-image>
+ <div v-else class="image-error" style="width: 88px;
+ height: 88px;
+ border-radius: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 1px solid var(--lims-divider);margin-right: 10px;">
+ <lims-icon name="el-icon-picture-outline" style="font-size:20px;color:var(--lims-text-2);"></lims-icon>
+ </div>
<div class="list-left">
<div class="list-left-info">
<span class="label" style="white-space: nowrap;">璁惧鍚嶇О锛�</span>
@@ -99,6 +108,7 @@
selectDeviceParameter,
downloadDeviceImportTemplate,
} from '@/api/cnas/resourceDemand/device.js'
+import { saveBlobOrShowError } from '@/utils/saveBlob'
export default {
props: {
clickNodeVal: {
@@ -146,8 +156,8 @@
methods: {
downloadTemplate() {
downloadDeviceImportTemplate().then(res => {
- this.$download.saveAs(new Blob([res]), '璁惧瀵煎叆妯℃澘.xlsx')
- })
+ saveBlobOrShowError(res, '璁惧瀵煎叆妯℃澘.xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
+ }).catch(() => { })
},
submitImport() {
if (!this.$refs.deviceUpload.uploadFiles.length) {
@@ -252,6 +262,11 @@
}
}
this.loading = false
+ }).catch(() => {
+ // 娓呮帀鏈〉鍗犱綅锛屽け璐ュ悗鍙敤鏌ヨ/閲嶇疆閲嶆柊鍔犺浇
+ delete this.keyMap[key]
+ this.loading = false
+ this.finishLoding = true
})
},
refresh() {
--
Gitblit v1.9.3