From 839957125186876493ceb3b96c553384cb1a76fe Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 19 三月 2025 16:50:11 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject
---
UI-Project/src/views/hollow/hollowslicecage.vue | 174 ++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 121 insertions(+), 53 deletions(-)
diff --git a/UI-Project/src/views/hollow/hollowslicecage.vue b/UI-Project/src/views/hollow/hollowslicecage.vue
index 4c53783..b6ee921 100644
--- a/UI-Project/src/views/hollow/hollowslicecage.vue
+++ b/UI-Project/src/views/hollow/hollowslicecage.vue
@@ -6,7 +6,6 @@
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {ElMessage, ElMessageBox} from 'element-plus'
-
const dialogFormVisibleaDownGlasss = ref(false)
const scanGlass = ref([])
const {t} = useI18n()
@@ -27,6 +26,7 @@
const tableDataf = ref([])
const tableDatae = ref([])
const carPosition = ref([])
+const tableDatass = ref([])
const ganghua = ref('')
const diaodu = ref('')
const flowCardId = ref('')
@@ -56,6 +56,7 @@
const cell7=ref(true);
const cell8=ref(true);
const cell9=ref(true);
+const blindb = ref(false)
const selectedRow = ref(null);
const temperingengineerId=ref('');
const handlePageChange2 = (newPage) => {
@@ -276,6 +277,30 @@
function handleRowClick(row) {
selectedRow.value = row; // 鏇存柊閫変腑鐨勮鏁版嵁
}
+// 浠诲姟閲嶇疆
+const handleptask = async() => {
+ try {
+ const confirmResult = await ElMessageBox.confirm(
+ t('searchOrder.partasks'),
+ t('workOrder.prompt'),
+ {
+ confirmButtonText: t('workOrder.yes'),
+ cancelButtonText: t('workOrder.cancel'),
+ type: 'warning',
+ }
+ );
+ if (confirmResult === 'confirm') {
+ const response = await request.post('/hollowGlass/hollowBigStorageCage/resetCage')
+ if (response.code === 200) {
+ ElMessage.success(response.message);
+ } else {
+ ElMessage.error(response.msg);
+ }
+ }
+ } catch (error) {
+ console.error('鍙戠敓閿欒:', error);
+ }
+};
// 璋冨害寮�鍏�
const handlediaodu = async () => {
try {
@@ -298,6 +323,16 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
const handleMessage = (data) => {
+ if(data.bigStorageCageUsageSummary!=null){
+ const summaries = data.bigStorageCageUsageSummary[0];
+ const updatedData = summaries.map(summary => ({
+ ...summary,
+ totalNumber: summary.layer * summary.sumCount,
+ }));
+ tableDatass.value = updatedData;
+ }else{
+ tableDatass.value = []
+ }
if (data.inkageEntity != null) {
inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005';
}
@@ -324,8 +359,8 @@
console.log(data.bigStorageCageDetailsOutTask[0])
adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
} else {
- tableDatac.value = '',
- adjusta.value = ''
+ tableDatac.value = [],
+ adjusta.value = []
}
if (data.scanGlass != null) {
scanGlass.value = data.scanGlass[0];
@@ -340,25 +375,25 @@
tableDatad.value = data.bigStorageCageDetailsFeedTask[0]
adjust.value = data.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
}else{
- tableDatad.value = ''
+ tableDatad.value = []
}
if(data.temperingGlassInfoList!=null){
tableDatab.value = data.temperingGlassInfoList[0]
console.log(tableDatab.value)
}else{
- tableDatab.value = ''
+ tableDatab.value = []
}
console.log(data.bigStorageCageUsage);
if(data.bigStorageCageUsage!=null){
tableDatae.value = data.bigStorageCageUsage[0]
}else{
- tableDatae.value = ''
+ tableDatae.value = []
}
if(data.carPostion!=null){
carPosition.value = data.carPostion[0]
}else{
- carPosition.value = ''
+ carPosition.value = []
}
if(data.temperingSwitch!=null){
ganghua.value = data.temperingSwitch[0]
@@ -409,7 +444,7 @@
const rectStyle = (rect, index) => ({
position: 'absolute',
width: '170px',
- right: '0px',
+ left: '0px',
top: `${index*rect.top}px`,
height: `${rect.height}px`,
});
@@ -425,24 +460,24 @@
// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
const subRectStyle = (rectIndex, subIndex) => {
const width = '18px';
- const marginRight = '8px';
- const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
- const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+ const marginLeft = '8px';
+ const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+ const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
return {
position: 'absolute',
width,
height: '100%',
- marginRight,
+ marginLeft,
top: '0px',
backgroundColor: '#911005',
- right,
+ left,
};
};
// 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
const rectStylea = (rect, index) => ({
position: 'absolute',
width: '170px',
- right: '0px',
+ left: '0px',
top: `${index*rect.top}px`,
height: `${rect.height}px`,
});
@@ -458,24 +493,24 @@
// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
const subRectStylea = (rectIndex, subIndex) => {
const width = '18px';
- const marginRight = '8px';
- const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
- const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+ const marginLeft = '8px';
+ const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+ const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
return {
position: 'absolute',
width,
height: '100%',
- marginRight,
+ marginLeft,
top: '0px',
backgroundColor: '#911005',
- right,
+ left,
};
};
// 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
const rectStyleb = (rect, index) => ({
position: 'absolute',
width: '170px',
- right: '0px',
+ left: '0px',
top: `${index*rect.top}px`,
height: `${rect.height}px`,
});
@@ -491,24 +526,24 @@
// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
const subRectStyleb = (rectIndex, subIndex) => {
const width = '18px';
- const marginRight = '8px';
- const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
- const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+ const marginLeft = '8px';
+ const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+ const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
return {
position: 'absolute',
width,
height: '100%',
- marginRight,
+ marginLeft,
top: '0px',
backgroundColor: '#911005',
- right,
+ left,
};
};
// 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
const rectStylec = (rect, index) => ({
position: 'absolute',
width: '170px',
- right: '0px',
+ left: '0px',
top: `${index*rect.top}px`,
height: `${rect.height}px`,
});
@@ -524,24 +559,24 @@
// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
const subRectStylec = (rectIndex, subIndex) => {
const width = '18px';
- const marginRight = '8px';
- const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
- const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+ const marginLeft = '8px';
+ const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+ const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
return {
position: 'absolute',
width,
height: '100%',
- marginRight,
+ marginLeft,
top: '0px',
backgroundColor: '#911005',
- right,
+ left,
};
};
// 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
const rectStyled = (rect, index) => ({
position: 'absolute',
width: '170px',
- right: '0px',
+ left: '0px',
top: `${index*rect.top}px`,
height: `${rect.height}px`,
});
@@ -557,9 +592,9 @@
// 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
const subRectStyled = (rectIndex, subIndex) => {
const width = '18px';
- const marginRight = '8px';
- const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
- const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+ const marginLeft = '8px';
+ const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+ const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
return {
position: 'absolute',
width,
@@ -567,8 +602,13 @@
marginLeft,
top: '0px',
backgroundColor: '#911005',
- right,
+ left,
};
+};
+const iframeUrl = ref('');
+const handlehistorical = (row) => {
+ blindb.value = true;
+ iframeUrl.value = `${window.location.origin}/#/hollow/hellowslicecagehistory`;
};
onMounted(() => {
socket = initializeWebSocket(socketUrl, handleMessage);
@@ -612,7 +652,7 @@
}
function tableRowClassName({ row }) {
if (row.isSame === 1) {
- return 'row-red-background'; // 璁剧疆绾㈣壊鑳屾櫙
+ return 'row-red-background';
}
return '';
}
@@ -623,6 +663,8 @@
<template>
<div style="height: 600px;">
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="primary" @click="handlexiang">{{ $t('searchOrder.cageinformation') }}</el-button>
+ <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="success" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button>
+ <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button>
<el-switch style="margin-top: 7px;margin-left: 10px;" v-model="diaodu" class="mb-2" :inactive-text="$t('searchOrder.Schedulingswitch')" @change="handlediaodu" />
<div id="dotClass">
<div>{{ $t('searchOrder.inkageEntity') }}</div>
@@ -643,20 +685,6 @@
<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;">
- <el-table height="300px" ref="table"
- :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="140" />
- <el-table-column prop="startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" />
- <el-table-column prop="targetSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" />
- <el-table-column prop="taskState" align="center" :label="$t('searchOrder.taskstatus')" min-width="157">
- <template #default="scope">
- <el-tag type="success" >{{ scope.row.taskState==0? $t('searchOrder.filmenter') : $t('searchOrder.infilm') }}</el-tag>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-card>
- <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
<el-table height="300px" ref="table"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"
@@ -677,6 +705,20 @@
</template>
</el-table-column>
</el-table>
+ </div>
+ </el-card>
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
+ <el-table height="300px" ref="table"
+ :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+ <el-table-column prop="glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="140" />
+ <el-table-column prop="startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" />
+ <el-table-column prop="targetSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" />
+ <el-table-column prop="taskState" align="center" :label="$t('searchOrder.taskstatus')" min-width="157">
+ <template #default="scope">
+ <el-tag type="success" >{{ scope.row.taskState==0? $t('searchOrder.filmenter') : $t('searchOrder.infilm') }}</el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
</el-card>
</div>
<div style="padding: 10px;display: flex;height:130px;">
@@ -691,8 +733,9 @@
</el-col>
</div>
</div>
+ <div style="display: flex; align-items: flex-start; gap: 20px; height: 70vh;">
<!-- // 鐖剁骇妗� -->
-<div class="img-dlpl" >
+<div class="img-zkdlpl" >
<div class="img-car1" :style="'z-index:999;left:305px;top:' + 1700*carPosition[0] + 'px;position:absolute;'">
<div
v-for="(rect, index) in adjusta"
@@ -769,6 +812,20 @@
</div>
</div>
</div>
+<el-card style="flex: 1; height: 600px; overflow-y: auto;">
+ <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 550px;">
+ <el-table height="550px" ref="table" border
+ :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+ <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140" />
+ <el-table-column prop="sumCount" align="center" :label="$t('searchOrder.totallogarithms')" min-width="120" />
+ <el-table-column prop="pairCount" align="center" :label="$t('searchOrder.numberpairs')" min-width="120" />
+ <el-table-column prop="totalNumber" align="center" :label="$t('hellow.totalnumber')" min-width="100" />
+ <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="120" />
+ <el-table-column prop="slotCount" align="center" :label="$t('searchOrder.numberoccupied')" min-width="120" />
+ </el-table>
+ </div>
+ </el-card>
+ </div>
</div>
<!-- 娣诲姞鐞嗙墖绗间俊鎭� -->
<el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" >
@@ -932,6 +989,17 @@
</div>
</div>
</el-dialog>
+ <!-- 鍘嗗彶浠诲姟 -->
+<el-dialog v-model="blindb" top="5vh" width="95%">
+ <iframe
+ :src="iframeUrl"
+ marginwidth="2000px"
+ marginheight="2000px"
+ width="100%"
+ height="750px"
+ frameborder="0"
+ ></iframe>
+ </el-dialog>
</template>
<style>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
@@ -1024,7 +1092,7 @@
top: calc(100% - 210px); /* 浠庝笂鍒颁笅缁撴潫浣嶇疆 */
}
}
-.img-dlpl{
+.img-zkdlpl{
margin-left: 20px;
margin-top: 0px;
background-image:url('../../assets/zhongkong.png');
--
Gitblit v1.8.0