From e9c7fa1915cd2afbadaef1884324fa7cd5aaaf25 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期二, 29 七月 2025 10:12:06 +0800
Subject: [PATCH] Merge branch 'dev_y_ztns' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev_y_ztns
---
src/views/CNAS/resourceDemand/device/index.vue | 40 +++++++++++++++++++++++++++++++++-------
1 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/index.vue b/src/views/CNAS/resourceDemand/device/index.vue
index ec9951f..e01dc60 100644
--- a/src/views/CNAS/resourceDemand/device/index.vue
+++ b/src/views/CNAS/resourceDemand/device/index.vue
@@ -12,7 +12,9 @@
<div slot-scope="{ node, data }" class="custom-tree-node">
<el-row style="width: 100%;">
<el-col :span="24">
- <p class="single-line-ellipsis" style="width: 100%">
+ <p class="single-line-ellipsis" style="width: 100%" :style="{
+ color: isLeafNode(data) && shouldHighlight(data) ? 'red' : ''
+ }">
<i :class="`node_i ${data.children != undefined
? data.code === '[1]'
? 'el-icon-folder-opened'
@@ -22,7 +24,9 @@
"></i>
{{ data.label }}
</p>
- <p>
+ <p :style="{
+ color: isLeafNode(data) && shouldHighlight(data) ? 'red' : ''
+ }">
{{ data.managementNumber === undefined ? '' : data.managementNumber }}
</p>
</el-col>
@@ -55,6 +59,10 @@
<quantity-value-traceability-plan v-if="menuListActiveName == '閲忓�兼函婧愯鍒�'"
:clickNodeVal="clickNodeVal"></quantity-value-traceability-plan>
</el-tab-pane>
+ <el-tab-pane label="璁惧浣跨敤鎺堟潈" name="璁惧浣跨敤鎺堟潈">
+ <usage-authorization v-if="menuListActiveName == '璁惧浣跨敤鎺堟潈'"
+ :clickNodeVal="clickNodeVal"></usage-authorization>
+ </el-tab-pane>
<el-tab-pane label="鍒╃敤澶栭儴浠櫒璁惧" name="鍒╃敤澶栭儴浠櫒璁惧">
<using-external-instruments v-if="menuListActiveName == '鍒╃敤澶栭儴浠櫒璁惧'" :clickNodeVal="clickNodeVal"></using-external-instruments>
</el-tab-pane>
@@ -74,8 +82,8 @@
<el-tab-pane label="璁惧鏍″噯" name="璁惧鏍″噯">
<calibration v-if="tabListActiveName == '璁惧鏍″噯'" :clickNodeVal="clickNodeVal" />
</el-tab-pane>
- <el-tab-pane label="璁惧缁存姢" name="璁惧缁存姢">
- <maintenance v-if="tabListActiveName == '璁惧缁存姢'" :clickNodeVal="clickNodeVal" />
+ <el-tab-pane label="璁惧缁存姢淇濆吇" name="璁惧缁存姢淇濆吇">
+ <equipmentMaintenance v-if="tabListActiveName == '璁惧缁存姢淇濆吇'" :clickNodeVal="clickNodeVal" />
</el-tab-pane>
<el-tab-pane label="璁惧鍊熺敤" name="璁惧鍊熺敤">
<borrow v-if="tabListActiveName == '璁惧鍊熺敤'" :clickNodeVal="clickNodeVal" />
@@ -112,7 +120,6 @@
import files from "./component/files.vue";
import calibration from "./component/calibration.vue";
import check from "./component/check.vue";
-import maintenance from "./component/maintenance.vue";
import borrow from "./component/borrow.vue";
import fault from "./component/fault.vue";
import record from "./component/record.vue";
@@ -131,6 +138,8 @@
import EquipmentMaintenancePlan from "./component/equipmentMaintenancePlan.vue";
import EquipmentAcceptance from "./component/equipmentAcceptance.vue";
import QuantityValueTraceabilityPlan from "./component/quantityValueTraceabilityPlan.vue";
+import equipmentMaintenance from "./component/equipmentMaintenance.vue";
+import usageAuthorization from "./component/usageAuthorization.vue";
import {
treeDevice,
} from '@/api/cnas/resourceDemand/device.js'
@@ -151,7 +160,6 @@
files,
calibration,
check,
- maintenance,
borrow,
fault,
record,
@@ -159,7 +167,9 @@
management,
overview,
resourceReservation,
- operationInstruction
+ operationInstruction,
+ equipmentMaintenance,
+ usageAuthorization,
},
data() {
return {
@@ -192,9 +202,25 @@
treeDevice().then(res => {
let data = res.data;
this.list = data;
+ console.log('this.list--', this.list)
this.loading = false
});
},
+ // 鍒ゆ柇鏄惁鏄彾瀛愯妭鐐�
+ isLeafNode(data) {
+ return !data.children || data.children.length === 0;
+ },
+ // 鍒ゆ柇鏄惁闇�瑕佹爣绾�
+ shouldHighlight(data) {
+ if (!data.activationDate) return false;
+ const today = new Date();
+ const targetDate = new Date(data.activationDate);
+ const fiveDaysBeforeTarget = new Date(targetDate);
+ // 璁$畻鍓嶄簲澶╃殑鏃ユ湡
+ fiveDaysBeforeTarget.setDate(targetDate.getDate() - 5);
+
+ return today > fiveDaysBeforeTarget;
+ },
handleNodeClick(val, node, el) {
// 鐐瑰嚮涓存椂缂撳瓨
this.clickNodeVal = val;
--
Gitblit v1.9.3