From 655aee70727fe0479442d02cec27114eaed15872 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 21 三月 2025 14:40:19 +0800
Subject: [PATCH] 人员-样式优化
---
src/views/CNAS/resourceDemand/device/component/management.vue | 67 +++++++--------------------------
1 files changed, 14 insertions(+), 53 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/management.vue b/src/views/CNAS/resourceDemand/device/component/management.vue
index d090b6e..51a4a27 100644
--- a/src/views/CNAS/resourceDemand/device/component/management.vue
+++ b/src/views/CNAS/resourceDemand/device/component/management.vue
@@ -24,10 +24,10 @@
</div>
</div>
<div style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- <el-button size="small" type="primary" @click="dialogVisible2 = true">鏂� 澧�</el-button>
- <el-button size="small" type="primary" @click="handleDownOne">瀵� 鍑�</el-button>
+ <el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
+ <el-button size="small" type="primary" @click="dialogVisible2 = true">鏂板</el-button>
+ <el-button size="small" type="primary" @click="handleDownOne">瀵煎嚭</el-button>
</div>
</div>
<div class="table" v-show="!showData">
@@ -491,10 +491,18 @@
{
label: "璁惧鍒嗙被", prop: "largeCategory", dataType: "tag",
formatData: (params) => {
- return this.equipmentList.find(m => m.value == params).label
+ if (this.equipmentList.find(m => m.value == params)) {
+ return this.equipmentList.find(m => m.value == params).label
+ } else {
+ return null
+ }
},
formatType: (params) => {
- return this.equipmentList.find(m => m.value == params).type
+ if (this.equipmentList.find(m => m.value == params)) {
+ return this.equipmentList.find(m => m.value == params).type
+ } else {
+ return null
+ }
}
},
{ label: "鍗曚环", prop: "unitPrice" },
@@ -554,13 +562,10 @@
}
},
mounted() {
- // this.entityCopy = this.HaveJson(this.componentData.entity)
- // this.getPower()
this.selectEnumByCategory()
this.selectDevicePrincipal()
this.obtainItemParameterList()
this.getInsProductIds()
- // this.$customEvents.$on('largeCategory', this.handleNotification);
// 鍒濆鍖�
this.clickSidebar(this.clickNodeVal)
},
@@ -619,38 +624,6 @@
const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '璁惧浠櫒涓�瑙堣〃.doc')
})
- },
- // 鏉冮檺鍒嗛厤
- getPower(radio) {
- let power = JSON.parse(sessionStorage.getItem('power'))
- let up = false
- let del = false
- let add = false
- let config = false
- for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == 'upDeviceParameter') {
- up = true
- }
- if (power[i].menuMethod == 'delDeviceParameter') {
- del = true
- }
- if (power[i].menuMethod == 'addDeviceParameter') {
- add = true
- }
- if (power[i].menuMethod == 'saveDataAcquisitionConfiguration') {
- config = true
- }
- }
- if (!config) {
- this.componentData.do.splice(2, 1)
- }
- if (!up) {
- this.componentData.do.splice(1, 1)
- }
- if (!del) {
- this.componentData.do.splice(0, 1)
- }
- this.addPower = add
},
// 鑾峰彇瀛楀吀
selectEnumByCategory() {
@@ -838,10 +811,6 @@
}
this.upLoad = true;
upDeviceParameter(formData).then(res => {
- if (res.code === 201) {
- this.upLoad = false
- return
- }
this.$message.success('淇敼鎴愬姛')
this.upLoad = false
this.refreshTable('page')
@@ -891,10 +860,6 @@
}
this.upLoad2 = true;
addDeviceParameter(formData).then(res => {
- if (res.code === 201) {
- this.upLoad2 = false
- return
- }
this.$message.success('鎻愪氦鎴愬姛')
this.upLoad2 = false
this.refreshTable('page')
@@ -962,9 +927,6 @@
this.upLoad3 = true
numberCollect(this.configForm).then(res => {
this.upLoad3 = false
- if (res.code === 201) {
- return
- }
this.$message.success('鎿嶄綔鎴愬姛')
this.refreshTable('page')
this.dialogVisible3 = false
@@ -1011,7 +973,6 @@
})
.then(() => {
delDeviceParameter({ id: row.id }).then((res) => {
- if (res.code == 201) return;
this.$message.success("鍒犻櫎鎴愬姛");
this.refresh();
});
--
Gitblit v1.9.3