From 0d8edc55b0001c0cdd441b894aea5fcf2f880118 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期一, 22 七月 2024 10:06:03 +0800
Subject: [PATCH] 大理片笼新增指定钢化,钢化模块调整样式
---
UI-Project/src/views/Slicecage/slicecage.vue | 56 ++++++++++++++++++
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue | 20 ++++--
UI-Project/src/lang/zh.js | 6 ++
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue | 86 ++++++++++++++++++----------
4 files changed, 128 insertions(+), 40 deletions(-)
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index 3a9af7a..0117165 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -205,6 +205,12 @@
down:'涓嬩竴椤�',
now:'褰撳墠椤垫樉绀�',
tit:'鏉℃暟鎹�',
+ temperingqueries:'閽㈠寲鏌ヨ',
+ specifytempering:'鎸囧畾閽㈠寲',
+ projectnumber:'宸ョ▼鍙�',
+ layoutnumber:'閽㈠寲鐗堝浘鍙�',
+ numberglasses:'鐜荤拑鏁伴噺',
+ specifytemperinga:'鏄惁鎸囧畾閽㈠寲璇ユ潯淇℃伅锛�',
},
workOrder:{
glassID:'鐜荤拑ID',
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
index a0a6912..101663e 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -21,47 +21,55 @@
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {
// 杩涚倝涓�
- adjustedRects.value = data.intoGlass[0].map(rect => ({
+ if(data.intoGlass!=null){
+ adjustedRects.value = data.intoGlass[0].map(rect => ({
...rect,
xcoordinate: rect.xCoordinate * 0.3,
- ycoordinate: rect.ycoordinate * 0.3,
+ ycoordinate: rect.yCoordinate * 0.3,
width: rect.width * 0.2,
height: rect.height * 0.2,
widtha: rect.width,
heighta: rect.height,
}));
- adjustedRects2.value = data.intoGlass2[0].map(rect => ({
+ }
+ if(data.intoGlass2!=null){
+ adjustedRects2.value = data.intoGlass2[0].map(rect => ({
...rect,
xcoordinate: rect.xCoordinate * 0.3,
- ycoordinate: rect.ycoordinate * 0.3,
+ ycoordinate: rect.yCoordinate * 0.3,
width: rect.width * 0.2,
height: rect.height * 0.2,
widtha: rect.width,
heighta: rect.height,
}));
- console.log(data.intoGlass[0]);
+ }
// 杩涚倝鍓�
- adjustedRectsa.value = data.waitingGlass[0].map(rect => ({
+ if(data.waitingGlass!=null){
+ adjustedRectsa.value = data.waitingGlass[0].map(rect => ({
...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
- xcoordinate: rect.xCoordinate * 0.5,
- ycoordinate: rect.ycoordinate * 0.5,
+ x: rect.xCoordinate * 0.4,
+ y: rect.yCoordinate * 0.4,
+ width: rect.width * 0.4,
+ height: rect.height * 0.4,
+ widtha: rect.width,
+ heighta: rect.height,
+ state: rect.state,
+ }));
+ }
+ // 宸插嚭鐐�
+ if(data.outGlass!=null){
+ adjustedRectsb.value = data.outGlass[0].map(rect => ({
+ ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
+ x: rect.xCoordinate * 0.4,
+ y: rect.yCoordinate * 0.4,
width: rect.width * 0.4,
height: rect.height * 0.4,
widtha: rect.width,
heighta: rect.height,
state: rect.state
}));
- // 宸插嚭鐐�
- adjustedRectsb.value = data.outGlass[0].map(rect => ({
- ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
- xcoordinate: rect.xCoordinate * 0.5,
- ycoordinate: rect.ycoordinate * 0.5,
- width: rect.width * 0.4,
- height: rect.height * 0.4,
- widtha: rect.width,
- heighta: rect.height,
- state: rect.state
- }));
+ console.log(data.outGlass[0]);
+ }
};
onMounted(() => {
initializeWebSocket(socketUrl, handleMessage);
@@ -79,7 +87,9 @@
<div v-if="dialogFormVisible" >
<el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
<div style="width: 49%;float: left;background-color: #f4f4f5;height: 550px;">
- <el-scrollbar height="630px">
+ <div v-if="adjustedRects.length > 0">
+ <div style="text-align: center;">娴佺▼鍗�: {{ adjustedRects[0].flowCardId }}</div>
+ <el-scrollbar height="630px">
<div style="position: relative;width: 1400px;">
<div
v-for="(rect, index) in adjustedRects"
@@ -88,15 +98,18 @@
:style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }"
>
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
+ <div >{{ rect.glassId }}</div>
<div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</div>
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 550px;">
- <el-scrollbar height="550px">
+ <div v-if="adjustedRects2.length > 0">
+ <div style="text-align: center;">娴佺▼鍗�: {{ adjustedRects2[0].flowCardId }}</div>
+ <el-scrollbar height="550px">
<div style="position: relative;width: 1400px;">
<div
v-for="(rect, index) in adjustedRects2"
@@ -105,55 +118,62 @@
:style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }"
>
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
+ <div >{{ rect.glassId }}</div>
<div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</div>
</el-card>
</div>
<div v-if="dialogFormVisiblea">
<!-- 杩涚倝鍓� -->
<el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
+ <div v-if="adjustedRectsa.length > 0">
+ <div style="text-align: center;">娴佺▼鍗�: {{ adjustedRectsa[0].flowCardId }}</div>
<el-scrollbar height="550px">
- <div style="position: relative;width: 1400px;">
+ <div style="position: relative;width: 100%;height: 100%;">
<div
v-for="(rect, index) in adjustedRectsa"
:key="index"
class="rect"
- :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+ :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
backgroundColor: rect.state === 0 ? '#dedfe0' : '#d1edc4' }">
- <div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
- <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div class="centered-text">
+ <div>{{ rect.glassId }}</div>
+ <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</el-card>
</div>
<div v-if="dialogFormVisibleb">
<!-- 宸插嚭鐐� -->
<el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
+ <div v-if="adjustedRectsb.length > 0">
+ <div style="text-align: center;">娴佺▼鍗�: {{ adjustedRectsb[0].flowCardId }}</div>
<el-scrollbar height="550px">
<div style="position: relative;width: 1400px;">
<div
v-for="(rect, index) in adjustedRectsb"
:key="index"
class="rect"
- :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+ :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }">
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
+ <div >{{ rect.glassId }}</div>
<div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</el-card>
</div>
</div>
@@ -233,9 +253,11 @@
}
.centered-text {
/* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */
- display: flex;
+ /* display: flex; */
justify-content: center;
- align-items: center;
+ text-align: center;
+ align-items: center;
height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */
+ margin-top: 60%
}
</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
index 5c0133f..c128b68 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -29,16 +29,17 @@
// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
const handleMessage = (data) => {
// 鏇存柊 tableData 鐨勬暟鎹�
- adjustedRects.value = data.overGlass[0].map(rect => ({
+ if(data.overGlass!=null){
+ adjustedRects.value = data.overGlass[0].map(rect => ({
...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
- xcoordinate: rect.xCoordinate * 0.5, // 灏唜鍊奸櫎浠�3
- ycoordinate: rect.ycoordinate * 0.5,
+ xcoordinate: rect.xCoordinate * 0.4, // 灏唜鍊奸櫎浠�3
+ ycoordinate: rect.yCoordinate * 0.4,
width: rect.width * 0.4,
height: rect.height * 0.4,
widtha: rect.width,
heighta: rect.height,
}));
- console.log(adjustedRects.value);
+ }
};
onMounted(() => {
// fetchFlowCardId();
@@ -56,6 +57,8 @@
<div style="margin-top: 10px;">
<div>
<el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
+ <div v-if="adjustedRects.length > 0">
+ <div style="text-align: center;">娴佺▼鍗�: {{ adjustedRects[0].flowCardId }}</div>
<el-scrollbar height="600px">
<div style="position: relative;width: 1400px;">
<div
@@ -66,12 +69,13 @@
width: `${rect.width}px`, height: `${rect.height}px`,
backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }">
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
+ <div >{{ rect.glassId }}</div>
<div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</el-card>
</div>
</div>
@@ -94,9 +98,11 @@
}
.centered-text {
/* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */
- display: flex;
+ /* display: flex; */
justify-content: center;
- align-items: center;
+ text-align: center;
+ align-items: center;
height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */
+ margin-top: 60%
}
</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 749d012..5870cad 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -14,7 +14,9 @@
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const dialogFormVisibleb = ref(false)
+const dialogFormVisiblec = ref(false)
const tableData = ref([])
+const tableDatagh = ref([])
const tableDatab = ref([])
const tableDatac = ref([])
const tableDatad = ref([])
@@ -70,7 +72,18 @@
const cell9=ref(true);
const selectedRow = ref(null); // 瀛樺偍閫変腑鐨勮鏁版嵁
-
+onMounted(async () => {
+ try {
+ const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass');
+ if (response.code === 200) {
+ tableDatagh.value = response.data
+ } else {
+ ElMessage.warning(response.msg)
+ }
+ } catch (error) {
+ // console.error('Error fetching rects :', error);
+ }
+});
// 褰撳墠椤电爜鍜屾瘡椤垫樉绀虹殑鏉℃暟
const currentPage = ref(1);
const itemsPerPage = computed(() => {
@@ -349,6 +362,33 @@
console.error('鍙戠敓閿欒:', error);
}
};
+ // 鎸囧畾閽㈠寲
+ const brokee = async(row) => {
+ try {
+ const confirmResult = await ElMessageBox.confirm(
+ t('searchOrder.specifytemperinga'),
+ t('searchOrder.prompt'),
+ {
+ confirmButtonText: t('searchOrder.yes'),
+ cancelButtonText: t('searchOrder.cancel'),
+ type: 'warning',
+ }
+ );
+ if (confirmResult === 'confirm') {
+ const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/TemperingGlass",{
+ engineerId: row.engineer_id,
+ temperingLayoutId: row.tempering_layout_id,
+ });
+ if (response.code === 200) {
+ ElMessage.success(response.message);
+ } else {
+ ElMessage.error(response.message);
+ }
+ }
+ } catch (error) {
+ console.error('鍙戠敓閿欒:', error);
+ }
+};
// 鍑虹墖闃熷垪鎷胯蛋
const brokeb = async(row) => {
try {
@@ -617,6 +657,7 @@
<div style="height: 600px;">
<el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
+ <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
<el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
<el-table height="100px" ref="table"
@@ -1239,6 +1280,19 @@
</el-table-column>
</el-table>
</el-dialog>
+<el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
+ <el-table ref="table" style="margin-top: 20px;height: 500px;"
+ :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+ <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/>
+ <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" />
+ <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" />
+ <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150">
+ <template #default="scope">
+ <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+</el-dialog>
</template>
<style scoped>
--
Gitblit v1.8.0