From b9b44b51b201e2f5a9a1f3665c7fb76b5690f9af Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期一, 23 十二月 2024 16:13:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
UI-Project/src/views/Slicecage/slicecage.vue | 85 ++++++++++++++++++++++++++++++++++--------
1 files changed, 69 insertions(+), 16 deletions(-)
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 290f1e9..e0b840e 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -19,6 +19,11 @@
const dialogFormVisiblec = ref(false)
const dialogFormVisibled = ref(false)
const dialogFormVisibles = ref(false)
+const inkageEntity = ref('#911005');
+const requestEntity = ref('#911005');
+const mesReplyEntity = ref('#911005');
+const outInkageEntity = ref('#911005');
+const outRequestEntity = ref('#911005');
const tableDataa = ref([])
const tableDatagh = ref([])
const tableDatab = ref([])
@@ -69,6 +74,7 @@
const cell7=ref(true);
const cell8=ref(true);
const cell9=ref(true);
+const canEdit = ref(true);
const selectedRow = ref(null);
const temperingtotal = ref(0);
const glasstotal = ref(0);
@@ -186,16 +192,21 @@
row.enableState = newState;
};
// 鏄惁鐮存崯
-const toggleEnableisDamage = async (row) => {
+const broken = async (row) => {
+ try {
const newState = row.isDamage === 1 ? 0 : 1;
- const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { id: row.id, enableState: newState });
- if (response.code === 200) {
+ const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/bigStorageGlassDamageByGlassId', { glassId: row.glassId });
+ if (response.code == 200) {
ElMessage.success(response.message);
- } else {
+ } else {
ElMessage.error(response.message);
- }
+ }
row.isDamage = newState;
-};
+}
+catch (error) {
+ console.error(error);
+ }
+}
// 鍒犻櫎
const opena = async(row) => {
try {
@@ -745,7 +756,22 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
const handleMessage = (data) => {
- if (data.scanGlass != null) {
+ if (data.inkageEntity != null) {
+ inkageEntity.value = data.inkageEntity == 1 ? '#911005' : 'green';
+ }
+ if (data.requestEntity != null) {
+ requestEntity.value = data.requestEntity == 1 ? '#911005' : 'green';
+ }
+ if (data.mesReplyEntity != null) {
+ mesReplyEntity.value = data.mesReplyEntity == 1 ? '#911005' : 'green';
+ }
+ if (data.outInkageEntity != null) {
+ outInkageEntity.value = data.outInkageEntity == 1 ? '#911005' : 'green';
+ }
+ if (data.outRequestEntity != null) {
+ outRequestEntity.value = data.outRequestEntity == 1 ? '#911005' : 'green';
+ }
+ if (data.scanGlass != null) {
scanGlass.value = data.scanGlass[0];
let width = scanGlass.value.width;
let height = scanGlass.value.height;
@@ -898,6 +924,18 @@
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="primary"
@click="dialogFormVisibleaDownGlasss = true">{{ $t('searchOrder.Labelprinting') }}
</el-button>
+ <div id="dotClass">
+ <div>{{ $t('searchOrder.inkageEntity') }}</div>
+ <i :style="{ marginTop: '2px', backgroundColor: inkageEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
+ <div style="margin-left: 70px;">{{ $t('searchOrder.requestEntity') }}</div>
+ <i :style="{ marginTop: '2px', backgroundColor: requestEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
+ <div style="margin-left: 70px;">{{ $t('searchOrder.mesReplyEntity') }}</div>
+ <i :style="{ marginTop: '2px', backgroundColor: mesReplyEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
+ <div style="margin-left: 70px;">{{ $t('searchOrder.outInkageEntity') }}</div>
+ <i :style="{ marginTop: '2px', backgroundColor: outInkageEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
+ <div style="margin-left: 70px;">{{ $t('searchOrder.outRequestEntity') }}</div>
+ <i :style="{ marginTop: '2px', backgroundColor: outRequestEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
+ </div>
<div class="table-container">
<el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 300px;">
@@ -1504,16 +1542,24 @@
min-width="80"
prop="isDamage"
>
- <template #default="scope">
- <el-tag
- :type="scope.row.isDamage === 1 ? 'danger' : 'success'"
- @click="toggleEnableisDamage(scope.row)"
- >
- {{ scope.row.isDamage === 1 ? $t('searchOrder.breakage') : $t('searchOrder.breakagn') }}
- </el-tag>
- </template>
+ <template #default="scope">
+ <div
+ @click="scope.row.isDamage === 1 ? null : broken(scope.row)"
+ style="position: relative; display: inline-block;"
+ >
+ <el-tag
+ :type="scope.row.isDamage === 1 ? 'danger' : 'success'"
+ style="pointer-events: {{ scope.row.isDamage === 1 ? 'none' : 'auto' }};"
+ >
+ {{ scope.row.isDamage === 1 ? $t('searchOrder.breakage') : $t('searchOrder.breakagn') }}
+ </el-tag>
+ <div
+ v-if="scope.row.isDamage === 1"
+ style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: transparent; z-index: 1;"
+ ></div>
+ </div>
+ </template>
</el-table-column>
- <!-- <el-table-column prop="isDamage" align="center" :label="$t('searchOrder.state')" min-width="80" /> -->
<el-table-column prop="layer" align="center" :label="$t('processCard.layer')" min-width="80" />
<el-table-column prop="xcoordinate" align="center" :label="$t('searchOrder.xcoordinates')" min-width="80" />
<el-table-column prop="ycoordinate" align="center" :label="$t('searchOrder.ycoordinates')" min-width="80" />
@@ -1742,4 +1788,11 @@
flex: 1; /* 浣夸袱涓崱鐗囧钩鍒嗗彲鐢ㄧ┖闂� */
margin-bottom: 10px; /* 鍙�夛紝鏍规嵁闇�瑕佹坊鍔犲簳閮ㄩ棿璺� */
}
+#dotClass {
+ display: flex;
+ margin-left: 20px;
+ size: 50px;
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0