From d0716996bcc06c5b4dbeb4a11c909dd1a77f4368 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 十月 2026 13:20:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/CNAS/resourceDemand/device/component/deviceOverview.vue | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
index c7b4d4e..88aa48d 100644
--- a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
+++ b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
@@ -7,7 +7,7 @@
<span style="width: 48px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">鐘舵��</span>
<el-select v-model="entity.deviceStatus" placeholder="鍏ㄩ儴"
@change="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()"
- size="small" clearable>
+ size="small" clearable style="width: 120px">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -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