feat: 点检增加颜色判断 & 样式调整

This commit is contained in:
Zhao Zhao Shen 2025-03-10 15:10:29 +08:00
parent e9995630a3
commit e6814c5f04
2 changed files with 23 additions and 5 deletions

View File

@ -64,7 +64,7 @@
<span class="info-value">{{ processForm_uht.mixerStep }}</span>
</div>
</div>
<div class="info-panel" style="display: flex; justify-content: space-between;">
<div class="info-panel" style="display: flex; justify-content: space-between;width: 24%">
<div class="info-row">
<span class="info-label">累计流量</span>
<span class="info-value">{{ processForm_uht.totalTraffic }}</span>
@ -144,7 +144,7 @@
<span class="info-value">{{ processForm_pulp.mixerStep }}</span>
</div>
</div>
<div class="info-panel" style="display: flex; justify-content: space-between;">
<div class="info-panel" style="display: flex; justify-content: space-between;width: 24%;">
<div class="info-row">
<span class="info-label">累计流量</span>
<span class="info-value">{{ processForm_pulp.totalTraffic }}</span>

View File

@ -58,7 +58,10 @@
</div>
<!-- 点检项目列表 -->
<IxEventList>
<IxEventListItem v-for="(item, index) in inspectionItems" :key="index" color="color-success" class="testbg">
<IxEventListItem v-for="(item, index) in inspectionItems" :key="index" color="color-success" class="testbg" :class="{
'alarm-cell-title': Object.values(item.data).some(data => data.checkStatus === 0),
'highlight-cell-title': Object.values(item.data).some(data => data.checkStatus === 1 && !Object.values(item.data).some(data => data.checkStatus === 0))
}">
<div class="table-row">
<span class="fixed-width title-width">{{ item.label }}</span>
<span class="fixed-width">{{ item.unit || '--' }}</span>
@ -144,7 +147,7 @@ const hours = computed(() => {
hours.push(`${i < 10 ? '0' : ''}${i}:00`); // 07:00-18:00
}
} else {
for (let i = 19; i <= 23; i++) {
for (let i = 19; i <= 23;i++) {
hours.push(`${i}:00`); // 19:00-23:00
}
for (let i = 0; i <= 6; i++) {
@ -183,7 +186,14 @@ const handleInspection = (hour, index) => {
//
if (hourCheckValid.value[hour] !== 1) {
console.log("🚀 ~ handleInspection ~ hourCheckValid.value[hour]:", hourCheckValid.value[hour])
showWarningMessage('存在异常数据,无法执行点检操作!');
showWarningMessage('存在设备异常,无法执行点检操作!');
return;
}
console.log("🚀 ~ handleInspection ~ inspectionItems.value:", inspectionItems.value)
// checkStatus0
if (inspectionItems.value.some(item => item.data[hour]?.checkStatus === 0)) {
showWarningMessage('存在报警数据未处理,无法执行点检操作!');
return;
}
@ -566,6 +576,7 @@ onUnmounted(() => {
/* 这里是因为它tm组件里的还用的好像是webcomponent但是tmd不对外提供修改的东西好在有个css颜色变量可以修改 */
--theme-event-item--background: #23233C;
/* --theme-event-item--background--hover: blue; */
/* --theme-color-success */
}
.testbg1 {
@ -616,4 +627,11 @@ onUnmounted(() => {
background-color: red;
cursor: pointer;
}
.highlight-cell-title {
--theme-color-success: orange;
}
.alarm-cell-title {
--theme-color-success: red;
}
</style>