From 9101ba64d5aa4722fc6384674682cd508d1315c9 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 11 十二月 2025 10:51:44 +0800
Subject: [PATCH] 报警弹窗新增提示信息
---
UI-Project/src/views/hollow/hollowslicecage.vue | 83 +++++++++++++++++++++++++++++++++--------
1 files changed, 67 insertions(+), 16 deletions(-)
diff --git a/UI-Project/src/views/hollow/hollowslicecage.vue b/UI-Project/src/views/hollow/hollowslicecage.vue
index 7578b56..68ad819 100644
--- a/UI-Project/src/views/hollow/hollowslicecage.vue
+++ b/UI-Project/src/views/hollow/hollowslicecage.vue
@@ -54,11 +54,13 @@
const adjustedRectsb = ref([]);
const adjustedRectsc = ref([]);
const adjustedRectsd = ref([]);
+const adjustedRectse = ref([]);
const subRectsCounts = ref([]);
const subRectsCountsa = ref([]);
const subRectsCountsb = ref([]);
const subRectsCountsc = ref([]);
const subRectsCountsd = ref([]);
+const subRectsCountse = ref([]);
const currentRow = reactive({}); // 褰撳墠琛岀殑鏁版嵁
const currentLack = reactive({});
const currentPage2 = ref(1)
@@ -133,7 +135,6 @@
sums[index] = '鍚堣';
return;
}
-
// 鍙闇�瑕佽绠楃殑鍒楄繘琛屾眰鍜�
const needSumColumns = ['sumCount', 'pairCount', 'totalNumber', 'realCount'];
if (needSumColumns.includes(column.property)) {
@@ -517,7 +518,7 @@
}
}
let socket = null;
-const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
+const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/hollowGlassMessage`;
const handleMessage = (data) => {
// 鎶ヨ淇℃伅
if (data.alarmInfo[0] != null && data.alarmInfo[0].length > 0) {
@@ -634,39 +635,47 @@
adjustedRects.value = data.bigStorageCageInfos[0][1].map((rect, index) => ({
id: index + 1,
height: 15/55,
- top: 33/55,
+ top: 64/55,
}));
subRectsCounts.value = data.bigStorageCageInfos[0][1].map(rect => rect.count);
adjustedRectsa.value = data.bigStorageCageInfos[0][2].map((rect, index) => ({
id: index + 1,
height: 15/55,
- top: 33/55,
+ top: 64/55,
}));
subRectsCountsa.value = data.bigStorageCageInfos[0][2].map(rect => rect.count);
adjustedRectsb.value = data.bigStorageCageInfos[0][3].map((rect, index) => ({
id: index + 1,
height: 15/55,
- top: 33/55,
+ top: 64/55,
}));
subRectsCountsb.value = data.bigStorageCageInfos[0][3].map(rect => rect.count);
adjustedRectsc.value = data.bigStorageCageInfos[0][4].map((rect, index) => ({
id: index + 1,
height: 15/55,
- top: 33/55,
+ top: 64/55,
}));
subRectsCountsc.value = data.bigStorageCageInfos[0][4].map(rect => rect.count);
adjustedRectsd.value = data.bigStorageCageInfos[0][5].map((rect, index) => ({
id: index + 1,
height: 15/55,
- top: 33/55,
+ top: 64/55,
}));
subRectsCountsd.value = data.bigStorageCageInfos[0][5].map(rect => rect.count);
+adjustedRectse.value = data.bigStorageCageInfos[0][6].map((rect, index) => ({
+ id: index + 1,
+ height: 15/55,
+ top: 64/55,
+ }));
+subRectsCountse.value = data.bigStorageCageInfos[0][6].map(rect => rect.count);
+
}else{
adjustedRects.value = '',
adjustedRectsa.value = '',
adjustedRectsb.value = '',
- adjustedRectsc.value = ''
- adjustedRectsd.value = ''
+ adjustedRectsc.value = '',
+ adjustedRectsd.value = '',
+ adjustedRectse.value = ''
}
};
const getAlertText = (alarmCode) => {
@@ -850,6 +859,31 @@
left,
};
};
+// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡鍜屾暟閲�
+const getSubRectse = (rectIndex) => {
+ const count = subRectsCountse.value[rectIndex];
+ const subRects = [];
+ for (let i = 0; i < count; i++) {
+ subRects.push({});
+ }
+ return subRects;
+};
+// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
+const subRectStylee = (rectIndex, subIndex) => {
+ const width = '18px';
+ const marginLeft = '3px';
+ const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+ const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
+ return {
+ position: 'absolute',
+ width,
+ height: '100%',
+ marginLeft,
+ top: '0px',
+ backgroundColor: '#911005',
+ left,
+ };
+};
const iframeUrl = ref('');
const handlehistorical = (row) => {
blindb.value = true;
@@ -907,6 +941,7 @@
<el-icon><WarnTriangleFilled /></el-icon>
<span class="alert-text">
{{ alertText }} (id:{{ alertMessage }})
+ <span class="confirm-text">{{ $t('hellow.pleaseConfirm') }}</span>
</span>
</div>
<button @click="showAlert = false" class="close-btn">脳</button>
@@ -996,7 +1031,7 @@
>
</div>
</div>
- <div class="img-car4" :style="'z-index:999;left:588px;top:' + 450*carPosition[1] + 'px;position:absolute;'">
+ <div class="img-car4" :style="'z-index:999;left:580px;top:' + 450*carPosition[1] + 'px;position:absolute;'">
<div
v-for="(rect, index) in adjust"
:key="rect.id"
@@ -1011,7 +1046,7 @@
</div>
</div>
<div style="position: relative;">
- <div v-show="cell1" style="width: 150px;height: 33px;position: relative;top:292px;left: 418px;">
+ <div v-show="cell1" style="width: 150px;height: 64px;position: relative;top:82px;left: 415px;">
<div v-for="(rect, rectIndex) in adjustedRects" :key="rect.id" :style="rectStyle(rect, rectIndex)">
<div
v-for="(subRect, subIndex) in getSubRects(rectIndex)"
@@ -1020,7 +1055,7 @@
></div>
</div>
</div>
- <div v-show="cell2" style="width: 150px;height: 33px;position: relative;top:295px;left: 418px;">
+ <div v-show="cell2" style="width: 150px;height: 64px;position: relative;top:88px;left: 415px;">
<div v-for="(rect, rectIndex) in adjustedRectsa" :key="rect.id" :style="rectStylea(rect, rectIndex)">
<div
v-for="(subRect, subIndex) in getSubRectsa(rectIndex)"
@@ -1029,7 +1064,7 @@
></div>
</div>
</div>
- <div v-show="cell3" style="width: 150px;height: 33px;position: relative;top:298px;left: 418px;">
+ <div v-show="cell3" style="width: 150px;height: 64px;position: relative;top:93px;left: 415px;">
<div v-for="(rect, rectIndex) in adjustedRectsb" :key="rect.id" :style="rectStyleb(rect, rectIndex)">
<div
v-for="(subRect, subIndex) in getSubRectsb(rectIndex)"
@@ -1038,7 +1073,7 @@
></div>
</div>
</div>
- <div v-show="cell4" style="width: 150px;height: 33px;position: relative;top:301px;left: 418px;">
+ <div v-show="cell4" style="width: 150px;height: 64px;position: relative;top:99px;left: 415px;">
<div v-for="(rect, rectIndex) in adjustedRectsc" :key="rect.id" :style="rectStylec(rect, rectIndex)">
<div
v-for="(subRect, subIndex) in getSubRectsc(rectIndex)"
@@ -1047,12 +1082,21 @@
></div>
</div>
</div>
- <div v-show="cell5" style="width: 150px;height: 33px;position: relative;top:304px;left: 418px;">
+ <div v-show="cell5" style="width: 150px;height: 64px;position: relative;top:105px;left: 415px;">
<div v-for="(rect, rectIndex) in adjustedRectsd" :key="rect.id" :style="rectStyled(rect, rectIndex)">
<div
v-for="(subRect, subIndex) in getSubRectsd(rectIndex)"
:key="subIndex"
:style="subRectStyled(rectIndex, subIndex)"
+ ></div>
+ </div>
+ </div>
+ <div v-show="cell6" style="width: 150px;height: 64px;position: relative;top:28px;left: 40px;">
+ <div v-for="(rect, rectIndex) in adjustedRectse" :key="rect.id" :style="rectStyled(rect, rectIndex)">
+ <div
+ v-for="(subRect, subIndex) in getSubRectse(rectIndex)"
+ :key="subIndex"
+ :style="subRectStylee(rectIndex, subIndex)"
></div>
</div>
</div>
@@ -1377,7 +1421,7 @@
.img-zkdlpl{
margin-left: 20px;
margin-top: 0px;
- background-image:url('/zhongkong.png');
+ background-image:url('/src/assets/zhongkong.png');
background-repeat: no-repeat;
background-attachment: local;
min-height: 500px;
@@ -1473,4 +1517,11 @@
#app-container {
padding-top: 60px; /* 鏍规嵁alert楂樺害璋冩暣 */
}
+.confirm-text {
+ color: rgb(242, 121, 8);
+ display: block; /* 寮哄埗鎹㈣ */
+ text-align: center; /* 姘村钩灞呬腑 */
+ margin-top: 4px; /* 涓庝笂涓�琛屼繚鎸侀棿璺� */
+ font-weight: 500; /* 鍔犵矖绐佸嚭 */
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0