From 14eb117d72f9c3ab4c035b41e4f48fd3e7701c37 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 15 八月 2024 14:38:55 +0800
Subject: [PATCH] 更改上片获取表
---
UI-Project/src/views/Slicecage/slicecage.vue | 1353 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 871 insertions(+), 482 deletions(-)
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 2a42c23..75c4a83 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -1,32 +1,45 @@
<script lang="ts" setup>
-// import zhCn from 'element-plus/lib/locale/lang/zh-cn'
-// import en from 'element-plus/dist/locale/en.mjs'
-// const { locale } = useI18n()
-
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
import {Search} from "@element-plus/icons-vue";
-import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import request from "@/utils/request"
import { WebSocketHost ,host} from '@/utils/constants'
-import { ref, onMounted , onBeforeUnmount} from "vue";
+import { ref, onMounted , onBeforeUnmount, reactive, computed,onUnmounted } from "vue";
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import { ElMessage, ElMessageBox } from 'element-plus'
import { tr } from "element-plus/es/locale";
const dialogFormVisible = ref(false)
+const dialoglea = 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([])
+const tableDataf = ref([])
const tableDatae = ref([])
+const tableDatax = ref([])
+const carPosition = ref([])
+const ganghua = ref('')
const adjustedRects = ref([]);
+const project = ref([]);
+const adjust = ref([]);
+const adjusta = ref([]);
const adjustedRectsa = ref([]);
-// const height = ref([]);
+const adjustedRectsb = ref([]);
+const adjustedRectsc = ref([]);
+const adjustedRectsd = ref([]);
+const adjustedRectse = ref([]);
+const adjustedRectsf = ref([]);
+const adjustedRectsg = ref([]);
+const adjustedRectsh = ref([]);
+const currentRow = reactive({}); // 褰撳墠琛岀殑鏁版嵁
+const inputValuesa = reactive({});
const add = ref(false)
const flowCardId = ref('');
const gap = ref('');
@@ -39,17 +52,11 @@
const temperingLayoutId = ref('');
const thickness = ref('');
const width = ref('');
-const carposition1 = ref(60);
-const carposition2 = ref(220);
-const carposition3 = ref(60);
-const carposition4 = ref(260);
const timers1 =ref(true);
const timers2 =ref(true);
const timers3 =ref(true);
const timers4 =ref(true);
const cellshow5=ref(false);
-const c1=ref(false);
-const c2=ref(false);
const cellshow1=ref(true);
const cellshow2=ref(true);
const cellshow3=ref(true);
@@ -66,113 +73,109 @@
const cell6=ref(true);
const cell7=ref(true);
const cell8=ref(true);
+const cell9=ref(true);
const selectedRow = ref(null); // 瀛樺偍閫変腑鐨勮鏁版嵁
+const temperingtotal = ref(0);
+const glasstotal = ref(0);
+ // 褰撳墠椤电爜鍜屾瘡椤垫樉绀虹殑鏉℃暟
+ const currentPage = ref(1);
+ const itemsPerPage = computed(() => {
+ if (currentPage.value === 1) {
+ return 55;
+ } else if (currentPage.value === 2) {
+ return 55;
+ } else if (currentPage.value === 3) {
+ return 55;
+ } else if (currentPage.value === 4) {
+ return 55;
+ } else if (currentPage.value === 5) {
+ return 55;
+ } else if (currentPage.value === 6) {
+ return 25;
+ } else if (currentPage.value === 7) {
+ return 30;
+ } else if (currentPage.value === 8) {
+ return 25;
+ } else {
+ return 25; // 榛樿鍊硷紝鍙互鏍规嵁瀹為檯闇�姹備慨鏀�
+ }
+ });
-const currentPage4 = ref(4)
-const pageSize4 = ref(100)
+ // 璁$畻鍒嗛〉鍚庣殑鏁版嵁
+ const paginatedUsers = computed(() => {
+ const startIndex = calculateStartIndex();
+ const endIndex = startIndex + itemsPerPage.value;
+ return tableData.value.slice(startIndex, endIndex);
+ });
- // var timer=setInterval(() => {
- // // console.log(million.value,million1.value);
- // million.value+=1;
- // if(million.value-million1.value!==12){
-
- // if(million.value-million1.value>=2){
- // if(carposition1.value==220){
- // timers1.value=false;
- // }else if(carposition1.value==60){
- // timers1.value=true;
- // }
- // if(timers1.value==true){
- // carposition1.value=carposition1.value+16;
- // }else{
- // carposition1.value=carposition1.value-16;
- // }
-
-
- // if(carposition2.value==220){
- // timers2.value=false;
- // }else if(carposition2.value==60){
- // timers2.value=true;
- // }
- // if(timers2.value==true){
- // carposition2.value+=16;
- // }else{
- // carposition2.value-=16;
- // }
- // }else{
-
- // }
- // }else{
- // million1.value=million.value;
+ // 璁$畻褰撳墠椤电殑璧峰绱㈠紩
+ function calculateStartIndex() {
+ let index = 0;
+ for (let i = 1; i < currentPage.value; i++) {
+ if (i === 1) {
+ index += 55;
+ } else if (i === 2) {
+ index += 55;
+ } else if (i === 3) {
+ index += 55;
+ }else if (i === 4) {
+ index += 55;
+ }else if (i === 5) {
+ index += 55;
+ }else if (i === 6) {
+ index += 25;
+ }else if (i === 7) {
+ index += 30;
+ }else if (i === 8) {
+ index += 25;
+ } else {
+ index += 25;
+ }
+ }
+ return index;
+ }
+ function jumpToPage(page: number) {
+ if (page >= 1 && page <= totalPages.value) {
+ currentPage.value = page;
+ }
+}
+ // 涓婁竴椤靛拰涓嬩竴椤垫柟娉�
+ const prevPage = () => {
+ if (currentPage.value > 1) {
+ currentPage.value--;
+ }
+ };
- // if(cellshow1.value==true){
- // cellshow1.value=false;
- // }else{
- // cellshow1.value=true;
- // }
- // if(cellshow2.value==true){
- // cellshow2.value=false;
- // }else{
- // cellshow2.value=true;
- // }
- // }
-
- // }, 1000);
+ const nextPage = () => {
+ if (currentPage.value < totalPages.value) {
+ currentPage.value++;
+ }
+ };
- // var timer=setInterval(() => {
- // // console.log(million3.value,million4.value);
- // million3.value+=1;
- // if(million3.value-million4.value!==12){
-
- // if(million3.value-million4.value>=2){
- // if(carposition3.value==260){
- // timers3.value=false;
- // }else if(carposition3.value==60){
- // timers3.value=true;
- // }
- // if(timers3.value==true){
- // carposition3.value=carposition3.value+20;
- // }else{
- // carposition3.value=carposition3.value-20;
- // }
+ // 鎬婚〉鏁拌绠�
+ const totalPages = computed(() => {
+ // let total = 0;
+ // for (let i = 1; i <= users.value.length; i++) {
+ // if (i === 1) {
+ // total += 1;
+ // } else if (i === 2) {
+ // total += 2;
+ // } else if (i === 3) {
+ // total += 5;
+ // } else {
+ // total += 10;
+ // }
+ // }
+ return 9;
+ });
+ setInterval(() => {
+ localStorage.clear(); // 娓呴櫎鎵�鏈塴ocalStorage鏁版嵁
+}, 60000);
+// function cleanUp() {
+// }
+// // 鍋囪鎴戜滑姣�2鍒嗛挓鎵ц涓�娆℃竻鐞�
+// setInterval(cleanUp, 1 * 60 * 1000);
-
- // if(carposition4.value==260){
- // timers4.value=false;
- // }else if(carposition4.value==60){
- // timers4.value=true;
- // }
- // if(timers4.value==true){
- // carposition4.value+=20;
- // }else{
- // carposition4.value-=20;
- // }
- // }else{
-
- // }
- // }else{
- // million4.value=million3.value;
- // if(cellshow5.value==true){
- // cellshow5.value=false;
-
- // }else{
- // cellshow5.value=true;
-
- // }
- // if(cellshow3.value==true){
- // cellshow3.value=false;
- // }else{
- // cellshow3.value=true;
- // }
- // if(cellshow4.value==true){
- // cellshow4.value=false;
- // }else{
- // cellshow4.value=true;
- // }
- // }
-
- // }, 1000);
-
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
@@ -188,85 +191,36 @@
}
const handleBindRack = (row) => {
selectedRow.value = row; // 鏇存柊閫変腑鐨勮鏁版嵁
+ currentRow.deviceId = row.deviceId; // 鐩存帴璁剧疆鍝嶅簲寮忓睘鎬�
+ currentRow.slot = row.slot;
+ window.localStorage.setItem('deviceId', row.deviceId)
+ window.localStorage.setItem('slot', row.slot)
add.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
};
-async function handleConfirm() {
- if (!selectedRow.value) {
- // 澶勭悊娌℃湁閫変腑琛岀殑鎯呭喌...
- return;
- }
-
- // 鏋勯�犱綘鐨凱OST璇锋眰鏁版嵁锛屽寘鍚�変腑鐨勮鏁版嵁鍜岃〃鍗曟暟鎹�
- const postData = {
- ...selectedRow.value, // 閫変腑琛岀殑鏁版嵁
- };
-
+// 鎼滅储
+const searchout = async () => {
try {
- const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/insertBigStorageCageDetails', {
- 'flowCardId': flowCardId.value,
- 'gap': gap.value,
- 'glassId': glassId.value,
- 'glassType': glassType.value,
- 'height': height.value,
- 'sequence': sequence.value,
- 'state': state.value,
- 'temperingFeedSequence': temperingFeedSequence.value,
- 'temperingLayoutId': temperingLayoutId.value,
- 'thickness': thickness.value,
- 'width': width.value,
- body: JSON.stringify(postData),
+ const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectBigStorageCageDetails',{
+ glassId:glassId.value
});
if (response.code == 200) {
// 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
+ tableDataf.value = response.data;
ElMessage.success(response.message);
- add.value = false;
- tableData.value = response.data;
+
} else {
// 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
ElMessage.error(response.message);
}
- } catch (error) {
- // 澶勭悊閿欒...
- console.error(error);
- }
-}
-// 娣诲姞
-// const handleConfirm = async () => {
-// try {
-// const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/insertBigStorageCageDetails', {
-// 'bigStorageCageOutTask.flowCardId': flowCardId.value,
-// 'bigStorageCageOutTask.gap': gap.value,
-// 'bigStorageCageOutTask.glassId': glassId.value,
-// 'bigStorageCageOutTask.glassType': glassType.value,
-// 'bigStorageCageOutTask.height': height.value,
-// 'bigStorageCageOutTask.sequence': sequence.value,
-// 'bigStorageCageOutTask.state': state.value,
-// 'bigStorageCageOutTask.temperingFeedSequence': temperingFeedSequence.value,
-// 'bigStorageCageOutTask.temperingLayoutId': temperingLayoutId.value,
-// 'bigStorageCageOutTask.thickness': thickness.value,
-// 'bigStorageCageOutTask.width': width.value,
-// });
-// if (response.code == 200) {
-// // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
-// ElMessage.success(response.message);
-// add.value = false;
-// tableData.value = response.data;
-// } else {
-// // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-// ElMessage.error(response.msg);
-// }
-// } catch (error) {
-// // 澶勭悊閿欒
-// console.error(error);
-// }
-// };
+ } catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+};
// 鏄惁绂佺敤
const toggleEnableState = async (row) => {
const newState = row.enableState === 1 ? 0 : 1;
- console.log(row.slot);
- console.log(row.enableState);
var url="/cacheVerticalGlass/bigStorageCage/updateStorageCageDisabled?slot="+row.slot + "&enableState=" + newState;
- console.log(url);
const response = await request.get(url)
if (response.code === 200) {
ElMessage.success(response.message);
@@ -274,13 +228,7 @@
ElMessage.error(response.message);
}
row.enableState = newState;
-};
-// const tableData = ref([
-// // ...鎮ㄧ殑琛ㄦ牸鏁版嵁
-// id:
-// deviceId slot enableState remainWidth
-
-// ]);
+};
// 鍒犻櫎
const opena = async(row) => {
try {
@@ -297,7 +245,8 @@
// 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/deleteBigStorageCageDetails",row)
if (response.code === 200) {
- ElMessage.success(response.message);
+ tableData.value = response.data;
+ ElMessage.success(response.message);
} else {
// 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
@@ -322,22 +271,15 @@
}
);
if (confirmResult === 'confirm') {
- // const dataToSend = {
- // ...row,
- // status: 0
- // };
- // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
- const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/damageBigStorageCageDetails?status="+0, row)
+ const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/damageBigStorageCageDetails?status="+8, row)
if (response.code === 200) {
- ElMessage.success(response.message);
+ tableData.value = response.data;
+ ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
} catch (error) {
- // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
console.error('鍙戠敓閿欒:', error);
}
};
@@ -354,22 +296,15 @@
}
);
if (confirmResult === 'confirm') {
- // const dataToSend = {
- // ...row,
- // status: 1
- // };
- // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
- const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/damageBigStorageCageDetails?status="+1, row)
+ const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/damageBigStorageCageDetails?status="+9, row)
if (response.code === 200) {
- ElMessage.success(response.message);
+ tableData.value = response.data;
+ ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
} catch (error) {
- // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
console.error('鍙戠敓閿欒:', error);
}
};
@@ -391,13 +326,10 @@
if (response.code === 200) {
ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
} catch (error) {
- // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
console.error('鍙戠敓閿欒:', error);
}
};
@@ -414,22 +346,41 @@
}
);
if (confirmResult === 'confirm') {
- // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
- // const dataToSend = {
- // ...row,
- // status: 0
- // };
- const response = await request.post("/cacheVerticalGlass/temperingGlassInfo/damageTemperingGlassInfo?status="+0, row)
+ const response = await request.post("/cacheVerticalGlass/temperingGlassInfo/damageTemperingGlassInfo?status="+8, row)
if (response.code === 200) {
ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
} catch (error) {
- // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
+ 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);
}
};
@@ -446,22 +397,14 @@
}
);
if (confirmResult === 'confirm') {
- // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
- // const dataToSend = {
- // ...row,
- // status: 1
- // };
- const response = await request.post("/cacheVerticalGlass/temperingGlassInfo/damageTemperingGlassInfo?status="+1, row)
+ const response = await request.post("/cacheVerticalGlass/temperingGlassInfo/damageTemperingGlassInfo?status="+9, row)
if (response.code === 200) {
ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
} catch (error) {
- // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
console.error('鍙戠敓閿欒:', error);
}
};
@@ -478,7 +421,6 @@
}
);
if (confirmResult === 'confirm') {
- // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
const dataToSend = {
...row,
status: 1
@@ -487,13 +429,10 @@
if (response.code === 200) {
ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
} catch (error) {
- // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
console.error('鍙戠敓閿欒:', error);
}
};
@@ -510,77 +449,284 @@
}
);
if (confirmResult === 'confirm') {
- // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
- // const dataToSend = {
- // ...row,
- // status: 1
- // };
const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/finishBigStorageCageDetails", row)
if (response.code === 200) {
ElMessage.success(response.message);
} else {
- // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
ElMessage.error(response.message);
- // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
}
}
- } catch (error) {
+ } catch (error) {
+ console.error('鍙戠敓閿欒:', error);
+ }
+};
+// 纭娣诲姞
+const finisha = async(row) => {
+ try {
+ const confirmResult = await ElMessageBox.confirm(
+ t('searchOrder.sureadda'),
+ t('searchOrder.prompt'),
+ {
+ confirmButtonText: t('searchOrder.yes'),
+ cancelButtonText: t('searchOrder.cancel'),
+ type: 'warning',
+ }
+ );
+ if (confirmResult === 'confirm') {
+ let deviceId = window.localStorage.getItem('deviceId')
+ let slot = window.localStorage.getItem('slot')
+ const dataToSend = {
+ ...row,
+ deviceId: deviceId,
+ slot: slot
+ };
+ const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/insertBigStorageCageDetails", dataToSend)
+ if (response.code === 200) {
+ tableData.value = response.data;
+ add.value = false;
+ ElMessage.success(response.message);
+ glassId.value = '';
+ tableDataf.value = '';
+
+ } else {
+ ElMessage.error(response.message);
+ }
+ }
+ } catch (error) {
// 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
console.error('鍙戠敓閿欒:', error);
}
};
+const handlezhiban = () => {
+ dialoglea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
+ fetchFlowCardId();
+};
+const handleganghua = () => {
+ dialogFormVisiblec.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
+ fetchFlow();
+};
+// 閽㈠寲鏌ヨ
+
+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 fetchFlow = async () => {
+ try {
+ const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass')
+ if (response.code == 200) {
+ ElMessage.success(response.message);
+ tableDatagh.value = response.data
+ temperingtotal.value = response.data.length
+ let totalCount = 0;
+ response.data.forEach(item => {
+ totalCount += item.count || 0;
+ });
+ glasstotal.value = totalCount;
+ } else {
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+}
+// 鍊肩彮淇℃伅
+const fetchFlowCardId = async () => {
+ try {
+ const response = await request.post('/cacheVerticalGlass/work_assignment/selectWorkAssignment',{
+ line: 2001,
+ workingProcedure : '鍐峰姞宸�'
+ })
+ if (response.code == 200) {
+ ElMessage.success(response.message);
+ tableDatax.value = response.data;
+ console.log(tableDatax.value);
+ } else {
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+}
+const handleConfirm = async () => {
+ const response = await request.post("/cacheVerticalGlass/work_assignment/updateWorkAssignment", tableDatax.value)
+ if (response.code === 200) {
+ ElMessage.success(response.message);
+ dialoglea.value = false;
+ } else {
+ ElMessage.error(response.message);
+ }
+};
function handleRowClick(row) {
selectedRow.value = row; // 鏇存柊閫変腑鐨勮鏁版嵁
}
-
+ const handleChange = async () => {
+ try {
+ const body = {
+ flag: ganghua.value, // 浣跨敤 ganghua.value 鑾峰彇褰撳墠寮�鍏崇殑鐘舵��
+ };
+
+ var url="/cacheVerticalGlass/bigStorageCageDetails/temperingSwitch?flag="+ganghua.value;
+ const response = await request.post(url)
+ if (response.code == 200) {
+ // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
+ ElMessage.success(response.message);
+ ganghua.value = response.data
+ }else {
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+}
+let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
const handleMessage = (data) => {
// 鏇存柊 tableData 鐨勬暟鎹�
- tableDatac.value = data.bigStorageCageDetailsOutTask[0]
- tableDatad.value = data.bigStorageCageDetailsFeedTask[0]
+ if(data.bigStorageCageDetailsOutTask!=null){
+ tableDatac.value = data.bigStorageCageDetailsOutTask[0]
+ console.log(data.bigStorageCageDetailsOutTask[0])
+ adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
+ // console.log(data.bigStorageCageDetailsOutTask[0]);
+
+ } else {
+ tableDatac.value = '',
+ adjusta.value = ''
+ }
+ if(data.bigStorageCageDetailsFeedTask!=null){
+ tableDatad.value = data.bigStorageCageDetailsFeedTask[0]
+ adjust.value = data.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
+ }else{
+ tableDatad.value = ''
+ }
+
+ // adjust.value = data.bigStorageCageDetailsFeedTask[0].map(rect => ({
+ // ...rect,
+ // }));
+
+// const adjust = computed(() => {
+// return data.value.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
+// });
+if(data.bigStorageCageInfo!=null){
tableData.value = data.bigStorageCageInfo[0]
+}else{
+ tableData.value = ''
+ }
+if(data.temperingGlassInfoList!=null){
tableDatab.value = data.temperingGlassInfoList[0]
+ console.log(tableDatab.value)
+}else{
+ tableDatab.value = ''
+ }
+if(data.bigStorageCageUsage!=null){
tableDatae.value = data.bigStorageCageUsage[0]
- // adjustedRects.value = data.bigStorageCageInfo1[0]
- adjustedRects.value = data.bigStorageCageInfo1[0].map(rect => ({
+}else{
+ tableDatae.value = ''
+ }
+if(data.carPostion!=null){
+ carPosition.value = data.carPostion[0]
+}else{
+ carPosition.value = ''
+ }
+if(data.temperingSwitch!=null){
+ ganghua.value = data.temperingSwitch[0]
+}else{
+ ganghua.value = ''
+ }
+ if(data.bigStorageCageInfos!=null){
+ window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length)
+ let length = window.localStorage.getItem('length')
+ adjustedRects.value = data.bigStorageCageInfos[0][1].map(rect => ({
...rect,
- // width: rect.remainWidth *0.04,
- top: rect.id *2,
+ height: 20/length,
+ top: 29/length
}));
-console.log(data.bigStorageCageInfo1[0]);
-adjustedRectsa.value = data.bigStorageCageInfo2[0].map(rect => ({
+adjustedRectsa.value = data.bigStorageCageInfos[0][2].map(rect => ({
...rect,
- // width: rect.remainWidth *0.04,
- top: rect.id *2,
+ height: 20/length,
+ top: 29/length
}));
- // window.localStorage.setItem('length', data.bigStorageCageInfo1[0].length)
- // let length = window.localStorage.getItem('length')
+adjustedRectsb.value = data.bigStorageCageInfos[0][3].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+adjustedRectsc.value = data.bigStorageCageInfos[0][4].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+adjustedRectsd.value = data.bigStorageCageInfos[0][5].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+adjustedRectse.value = data.bigStorageCageInfos[0][6].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+adjustedRectsf.value = data.bigStorageCageInfos[0][7].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+adjustedRectsg.value = data.bigStorageCageInfos[0][8].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+adjustedRectsh.value = data.bigStorageCageInfos[0][9].map(rect => ({
+ ...rect,
+ height: 20/length,
+ top: 29/length
+ }));
+ }else{
+ adjustedRects.value = ''
+ }
+
};
-// function getRectHeight(length: number) {
-// return length > 0 ? 29 / length : 29;
-// }
// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
onMounted(() => {
// fetchFlowCardId();
- // fetchTableData(); // 鑾峰彇鏁版嵁
- initializeWebSocket(socketUrl, handleMessage);
+ // initializeWebSocket(socketUrl, handleMessage);
+ socket = initializeWebSocket(socketUrl, handleMessage);
});
+ onUnmounted(() => {
+ if (socket) {
+ closeWebSocket(socket);
+ }
+ });
function getStatusType(enableState: number) {
switch (enableState) {
- case 0:
- return 'warning';
- case 1:
+ case 100:
return 'success';
+ case 102:
+ return 'warning';
}
}
function getStatusText(enableState: number) {
switch (enableState) {
- case 0:
- return t('searchOrder.disable');
- case 1:
- return t('searchOrder.enable');
+ case 100:
+ return t('searchOrder.zailong');
+ case 102:
+ return t('searchOrder.rengongxp');
}
}
function getStatusTypea(ishorizontal: number) {
@@ -618,20 +764,23 @@
}
}
onBeforeUnmount(() => {
- console.log("鍏抽棴浜�")
+ // console.log("鍏抽棴浜�")
closeWebSocket();
});
</script>
<template>
<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="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="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button>
+ <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
+ <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" />
<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="100%" ref="table"
+ <el-table height="100px" ref="table"
:data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="bigStorageCageOutTask.glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="100" />
+ <el-table-column prop="bigStorageCageOutTask.glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="140" />
<el-table-column prop="bigStorageCageOutTask.startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" />
<el-table-column prop="bigStorageCageOutTask.endSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" />
<el-table-column prop="bigStorageCageOutTask.trainNumber" align="center" :label="$t('searchOrder.trips')" min-width="120" />
@@ -641,12 +790,12 @@
<el-tag type="success" >{{ scope.row.bigStorageCageOutTask.taskState==0? $t('searchOrder.filmenter') : $t('searchOrder.infilm') }}</el-tag>
</template>
</el-table-column>
- <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/>
+ <!-- <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/> -->
<el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="100"/>
<el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" min-width="100"/>
- <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100"/>
+ <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="140"/>
<el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="150"/>
- <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="100"/>
+ <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140"/>
<el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="100"/>
<el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="100"/>
<el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="100"/>
@@ -654,20 +803,20 @@
<el-table-column prop="temperingLayoutId" align="center" :label="$t('searchOrder.layoutID')" min-width="100"/>
<el-table-column prop="temperingFeedSequence" align="center" :label="$t('searchOrder.picturesequence')" min-width="120"/>
<el-table-column prop="gap" align="center" :label="$t('searchOrder.glassgaps')" min-width="100"/>
- <el-table-column fixed="right" :label="$t('searchOrder.endtask')" align="center" width="150">
+ <!-- <el-table-column fixed="right" :label="$t('searchOrder.endtask')" align="center" width="150">
<template #default="scope">
<el-button size="mini" type="text" plain @click="finish(scope.row)">{{ $t('searchOrder.completetask') }}</el-button>
</template>
- </el-table-column>
+ </el-table-column> -->
</el-table>
</div>
</el-card>
<el-card style="flex: 1;margin-left: 10px;margin-top: 3px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
- <el-table height="100%" ref="table"
+ <el-table height="100px" ref="table"
@selection-change="handleSelectionChange"
:data="tableDatad" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.intoglassid')" min-width="100" />
+ <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.intoglassid')" min-width="140" />
<el-table-column prop="bigStorageCageFeedTask.targetSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" />
<!-- <el-table-column prop="task_type" align="center" label="浠诲姟绫诲瀷" min-width="120" />娌℃湁杩斿洖瀛楁 -->
<el-table-column prop="bigStorageCageFeedTask.taskState" align="center" :label="$t('searchOrder.taskstatus')" min-width="120">
@@ -676,12 +825,12 @@
</template>
</el-table-column>
<el-table-column prop="bigStorageCageFeedTask.line" align="center" :label="$t('searchOrder.line')" min-width="120" />
- <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/>
+ <!-- <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/> -->
<el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="100"/>
<el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" min-width="100"/>
- <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100"/>
+ <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="140"/>
<el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="150"/>
- <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="100"/>
+ <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140"/>
<el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="100"/>
<el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="100"/>
<el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="100"/>
@@ -689,19 +838,19 @@
<el-table-column prop="temperingLayoutId" align="center" :label="$t('searchOrder.layoutID')" min-width="100"/>
<el-table-column prop="temperingFeedSequence" align="center" :label="$t('searchOrder.picturesequence')" min-width="120"/>
<el-table-column prop="gap" align="center" :label="$t('searchOrder.glassgaps')" min-width="100"/>
- <el-table-column fixed="right" :label="$t('searchOrder.endtask')" align="center" width="150">
+ <!-- <el-table-column fixed="right" :label="$t('searchOrder.endtask')" align="center" width="150">
<template #default="scope">
<el-button size="mini" type="text" plain @click="finish(scope.row)">{{ $t('searchOrder.completetask') }}</el-button>
</template>
- </el-table-column>
+ </el-table-column> -->
</el-table>
</div>
</el-card>
- <div style="padding: 10px;display: flex;height:110px;">
+ <div style="padding: 10px;display: flex;height:130px;">
<div v-for="(item, index) in tableDatae" :key="index" id="occupy">
<el-col style="text-align:left;font-weight: bold;">#{{ item.device_id }}</el-col>
<el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
- <span>{{ $t('searchOrder.Usage') }}</span><span>{{ item.percentage }}</span>
+ <span>{{ $t('searchOrder.Usage') }}</span><span>{{ item.percentage }}%</span>
</el-col>
<hr style="width:80%;margin: 0 auto;" />
<el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
@@ -709,196 +858,386 @@
</el-col>
</div>
</div>
- <!-- <div id="awatch">
- <img src="../../assets/cp.png" alt="" style="width: 70%;height: 70%;margin-left: 160px;">
-</div> -->
<!-- // 鐖剁骇妗� -->
<div class="img-dlpl" >
- <div class="img-car1" :style="'z-index:999;left:247px;top:' + carposition1 + 'px;position:absolute;'">
- <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
+ <div class="img-car1" :style="'z-index:999;left:270px;top:' + 350*carPosition[0] + 'px;position:absolute;'">
+ <div
+ v-for="(rect, index) in adjusta"
+ :key="rect.id"
+ :style="{
+ width: '30px',
+ height: '5px',
+ backgroundColor: '#409EFF',
+ marginLeft: 5+ `px`,
+ top: '10px',
+ }"
+ >
</div>
- <div v-show="c1" class="img-car2" :style="'z-index:999;left:704px;top:' + carposition2 + 'px;position:absolute;'">
- <div v-show="cellshow2" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
</div>
-
- <div v-show="c2" class="img-car3" :style="'z-index:999;left:247px;top:' + carposition3 + 'px;position:absolute;'">
- <div v-show="cellshow3" style="margin-top:10px;width:220px;height:5px;background-color:#409EFF;"></div>
+ <div class="img-car4" :style="'z-index:999;left:740px;top:' + 350*carPosition[1] + 'px;position:absolute;'">
+ <div
+ v-for="(rect, index) in adjust"
+ :key="rect.id"
+ :style="{
+ width: '30px',
+ height: '5px',
+ backgroundColor: '#409EFF',
+ marginLeft: 5+ `px`,
+ top: '10px',
+ }"
+ >
</div>
- <div class="img-car4" :style="'z-index:999;left:704px;top:' + carposition4 + 'px;position:absolute;'">
- <div v-show="cellshow4" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
</div>
- <div v-show="cell1" style="width: 227px;position: relative;height: 29px;top:55px;left: 465px;background-color: #911005;">
+ <div style="position: relative;">
+ <div v-show="cell1" style="width: 227px;height: 29px;position: relative;top:50px;left: 495px;">
<div
v-for="(rect, index) in adjustedRects"
:key="rect"
:style="{
+
+ // display:'flex',
position: 'absolute',
width: '227px',
- height: '0.8px',
- backgroundColor: '#409EFF',
+ // backgroundColor: 'red',
left: '0px',
- top: `${rect.top}px`,
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
}"
>
-
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
</div>
</div>
- <div v-show="cell2" style="width: 227px;height: 29px;position: relative;top:86px;left: 465px;background-color: #911005;">
+ <div v-show="cell2" style="width: 227px;height: 29px;position: relative;top:51px;left: 495px;">
<div
v-for="(rect, index) in adjustedRectsa"
- :key="rect"
+ :key="rect.id"
:style="{
+
+ // display:'flex',
position: 'absolute',
width: '227px',
- height: '0.8px',
- backgroundColor: '#409EFF',
+ // backgroundColor: 'red',
left: '0px',
- top: `${rect.top}px`,
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
}"
>
-
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
</div>
</div>
- <!-- <div v-show="cell3" style="width: 227px;height: 29px;position: absolute;top:117px;left: 465px;background-color: #409EFF;">
+ <div v-show="cell3" style="width: 227px;height: 29px;position: absolute;top:110px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectsb"
+ :key="rect.id"
+ :style="{
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
</div>
- <div v-show="cell4" style="width: 227px;height: 29px;position: absolute;top:148px;left: 465px;background-color: #409EFF;">
</div>
- <div v-show="cell5" style="width: 227px;height: 29px;position: absolute;top:208px;left: 465px;background-color: #409EFF;">
+ <div v-show="cell4" style="width: 227px;height: 29px;position: absolute;top:140px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectsc"
+ :key="rect.id"
+ :style="{
+
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
</div>
- <div v-show="cell6" style="width: 227px;height: 29px;position: absolute;top:238px;left: 465px;background-color: #409EFF;">
</div>
- <div v-show="cell7" style="width: 227px;height: 29px;position: absolute;top:269px;left: 465px;background-color: #409EFF;">
+ <div v-show="cell5" style="width: 227px;height: 29px;position: absolute;top:170px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectsd"
+ :key="rect.id"
+ :style="{
+
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
</div>
- <div v-show="cell8" style="width: 227px;height: 29px;position: absolute;top:300px;left: 465px;background-color: #409EFF;">
- </div> -->
+ </div>
+ <div v-show="cell6" style="width: 227px;height: 29px;position: absolute;top:241px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectse"
+ :key="rect.id"
+ :style="{
+
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
+ </div>
+ </div>
+ <div v-show="cell7" style="width: 227px;height: 29px;position: absolute;top:271px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectsf"
+ :key="rect.id"
+ :style="{
+
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
+ </div>
+ </div>
+ <div v-show="cell8" style="width: 227px;height: 29px;position: absolute;top:301px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectsg"
+ :key="rect.id"
+ :style="{
+
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
+ </div>
+ </div>
+ <div v-show="cell9" style="width: 227px;height: 29px;position: absolute;top:332px;left: 495px;">
+ <div
+ v-for="(rect, index) in adjustedRectsh"
+ :key="rect.id"
+ :style="{
+
+ // display:'flex',
+ position: 'absolute',
+ width: '227px',
+ // backgroundColor: 'red',
+ left: '0px',
+ top: index*rect.top+`px`,
+ height: `${rect.height}px`,
+ }"
+ >
+ <div
+ v-for="(rects, index) in rect.bigStorageCageDetails"
+ :key="rects"
+ :style="{
+ float:'left',
+ width: '18px',
+ height: `${rect.height}px`,
+ backgroundColor: '#911005',
+ // border:'1px solid black',
+ top: '0px',
+ marginRight: rects.gap/5000*227+'px'
+ }"
+ >
+ </div>
+ </div>
+ </div>
+</div>
</div>
</div>
- <el-dialog v-model="add" top="10vh" width="65%" :title="$t('searchOrder.addcage')" >
- <div style="margin-top: -20px;margin-bottom: 40px;margin-left: 30px">
- <el-input :placeholder="$t('searchOrder.inputid')" clearable style="width: 200px;">
- </el-input>
- <el-button type="primary" plain style="margin-left: 10px;">{{ $t('searchOrder.search') }}</el-button>
-
- <!-- <span style="margin-right: 10px">绂佺敤璇�</span>
- <el-input clearable placeholder="璇疯緭鍏ョ鐢ㄨ瘝" size="mini"
- style="margin-right: 50px; width: 200px;" /> -->
- </div>
- <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
- <el-form size="mini" label-width="180px">
- <el-form label-width="180px" label-position="right">
+ <el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" >
+ <div style="margin-bottom: 20px">
+ <el-form>
<el-row style="margin-top: -15px;margin-bottom: -2px;">
- <el-col :span="6">
+ <el-col :span="4">
<div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.glassIDa')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inglassID')" v-model="glassId" autocomplete="off" />
+ <el-form-item :label="$t('searchOrder.tida')" style="width: 14vw">
+ {{ currentRow.deviceId }}
+ <!-- <el-input v-model="currentRow.id" autocomplete="off"></el-input> -->
</el-form-item>
- </div></div>
+ </div>
</el-col>
- <el-col :span="9">
+ <el-col :span="5">
<div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.pieceingrida')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inpieceingrid')" v-model="sequence" autocomplete="off" />
- </el-form-item></div>
+ <el-form-item :label="$t('searchOrder.gridnumbera')" style="width: 14vw">
+ {{ currentRow.slot }}
+ <!-- <el-input v-model="currentRow.slot" autocomplete="off"></el-input> -->
+ </el-form-item>
</div>
</el-col>
</el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.cardnumbera')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.incardnumber')" v-model="flowCardId" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.typeglassa')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.intypeglass')" v-model="glassType" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.widtha')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inwidth')" v-model="width" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.heighta')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inheight')" v-model="height" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.thicknessa')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inthickness')" v-model="thickness" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.layoutIDa')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inlayoutID')" v-model="temperingLayoutId" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.picturesequencea')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inpicturesequence')" v-model="temperingFeedSequence" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.startstatusa')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.instartstatus')" v-model="state" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.glassgapsa')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.inglassgaps')" v-model="gap" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item :label="$t('searchOrder.gridnumbera')" :required="true" style="width: 24vw;">
- <el-input :placeholder="$t('searchOrder.grid')" v-model="state" autocomplete="off" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- </el-form>
- </el-form>
- </div>
- <template #footer>
- <div id="dialog-footer">
- <el-button type="primary" @click="handleConfirm">
- {{ $t('searchOrder.sure') }}
- </el-button>
- <el-button @click="add = false">{{ $t('searchOrder.cancel') }}</el-button>
+ </el-form>
+ </div>
+ <div style="margin-top: -20px;margin-bottom: 40px;margin-left: 30px">
+ <el-input v-model="glassId" :placeholder="$t('searchOrder.inputid')" clearable style="width: 200px;">
+ </el-input>
+ <el-button type="primary" plain style="margin-left: 10px;" @click="searchout">{{ $t('searchOrder.search') }}</el-button>
+ </div>
+
+ <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;">
+ <el-table height="100%" ref="table"
+ :data="tableDataf" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+ <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="120" />
+ <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="180" />
+ <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="150" />
+ <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="150"/>
+ <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="150"/>
+ <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="150"/>
+ <el-table-column prop="thickness" align="center" :label="$t('searchOrder.thickness')" min-width="150"/>
+ <el-table-column prop="temperingLayoutId" align="center" :label="$t('searchOrder.layoutID')" min-width="150"/>
+ <el-table-column prop="temperingFeedSequence" align="center" :label="$t('searchOrder.picturesequence')" min-width="150"/>
+ <el-table-column
+ align="center"
+ :label="$t('searchOrder.startstatus')"
+ min-width="80"
+ prop="state"
+ >
+ <template #default="scope">
+ <el-tag
+ :type="scope.row.state === 1 ? 'success' : 'danger'"
+ >
+ {{ scope.row.state === 1 ? $t('searchOrder.enable') : $t('searchOrder.disable') }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="gap" align="center" :label="$t('searchOrder.glassgaps')" min-width="150"/>
+ <!-- <el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" 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="finisha(scope.row)">{{ $t('searchOrder.sureadd') }}</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
</div>
- </template>
</el-dialog>
-<el-dialog v-model="dialogFormVisiblea" top="5vh" width="97%" :title="$t('searchOrder.cageinformation')">
+<el-dialog v-model="dialogFormVisiblea" top="2vh" width="97%" :title="$t('searchOrder.cageinformation')">
<el-table
- :data="tableData"
+ :data="paginatedUsers"
@row-click="handleRowClick"
height="500"
@expand-change="handleExpandChange"
@@ -917,9 +1256,9 @@
:header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
>
<!-- <el-table-column prop="menuName" label="浜岀骇鑿滃崟鏍�" align="center" min-width="140" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"/> -->
- <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="80"/>
- <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="100" />
- <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="120" />
+ <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="130"/>
+ <!-- <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="130" /> -->
+ <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="130" />
<el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="80" />
<el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="80" />
<el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="80" />
@@ -931,6 +1270,7 @@
:label="$t('searchOrder.startstatus')"
min-width="80"
prop="state"
+
>
<template #default="scope">
<el-tag :type="getStatusType(scope.row.state)">
@@ -944,10 +1284,14 @@
<el-button size="mini" type="text" plain @click="broke(scope.row)">{{ $t('searchOrder.breakage') }}</el-button>
<el-button size="mini" type="text" plain @click="brokec(scope.row)">{{ $t('searchOrder.takeout') }}</el-button>
<el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('searchOrder.delete') }}</el-button>
- <el-button size="mini" type="text" plain @click="outfil(scope.row)">{{ $t('searchOrder.outfilm') }}</el-button>
+ <el-button size="mini" type="text"
+ :disabled="!((props.row.bigStorageCageDetails[0].state !== 102 && scope.$index == 0 ) || (props.row.bigStorageCageDetails[(scope.$index - 1)<0?0:scope.$index-1].state==102)&&(scope.row.state!=102))"
+ plain @click="outfil(scope.row)">
+ {{ $t('searchOrder.outfilm') }}
+ </el-button>
</template>
</el-table-column>
- </el-table>
+ </el-table>
</div>
</template>
</el-table-column>
@@ -977,22 +1321,29 @@
</template>
</el-table-column>
</el-table>
- <div id="demo-pagination-block">
- <el-pagination
- style="margin-left: 850px;"
- v-model:current-page="currentPage4"
- v-model:page-size="pageSize4"
- :page-sizes="[100, 200, 300, 400]"
- :small="small"
- :disabled="disabled"
- :background="background"
- layout="total, sizes, prev, pager, next, jumper"
- :total="400"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
+ <div>
+ <div style="margin-top: 20px; text-align: center;">
+ <!-- 涓婁竴椤垫寜閽� -->
+ <el-button @click="prevPage" :disabled="currentPage === 1">{{ $t('searchOrder.up') }}</el-button>
+ <div style="display: inline-block; margin: 0 20px;">
+ <el-button
+ v-for="page in totalPages"
+ :key="page"
+ :class="{ 'is-active': currentPage === page }"
+ @click="jumpToPage(page)"
+ >
+ {{ page }}
+ </el-button>
+ </div>
+ <!-- 涓嬩竴椤垫寜閽� -->
+ <el-button @click="nextPage" :disabled="currentPage >= totalPages">{{ $t('searchOrder.down') }}</el-button>
+
+ <!-- 褰撳墠椤垫樉绀虹殑鏉℃暟 -->
+ <span style="margin-left: 10px;">{{ $t('searchOrder.now') }} {{ itemsPerPage }} {{ $t('searchOrder.tit') }}</span>
+ </div>
</div>
-</el-dialog>
+ </el-dialog>
+<!-- </el-dialog> -->
<el-dialog v-model="dialogFormVisibleb" top="5vh" width="85%" :title="$t('searchOrder.productionqueue')">
<!-- <div style="display: flex;">
<p style="margin-top: 3px;">闃熷垪鐘舵�侊細</p>
@@ -1002,9 +1353,12 @@
</div> -->
<el-table ref="table" style="margin-top: 20px;height: 500px;"
:data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="id" fixed align="center" :label="$t('searchOrder.sheetID')" min-width="150"/>
- <el-table-column prop="flowcardId" fixed align="center" :label="$t('searchOrder.processcards')" min-width="120" />
- <el-table-column prop="glassType" align="center" :label="$t('searchOrder.processcardtype')" min-width="150" />
+ <!-- <el-table-column prop="id" fixed align="center" :label="$t('searchOrder.sheetID')" min-width="150"/>
+ -->
+ <el-table-column prop="glassId" fixed align="center" :label="$t('searchOrder.glassID')" min-width="150"/>
+
+ <el-table-column prop="flowCardId" fixed align="center" :label="$t('searchOrder.processcards')" min-width="120" />
+ <!-- <el-table-column prop="glassType" align="center" :label="$t('searchOrder.processcardtype')" min-width="150" /> -->
<el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="80" />
<el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="80" />
<el-table-column prop="thickness" align="center" :label="$t('searchOrder.thickness')" min-width="80" />
@@ -1038,19 +1392,75 @@
</el-tag>
</template>
</el-table-column>
- <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" 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="brokea(scope.row)">{{ $t('searchOrder.breakage') }}</el-button>
<el-button size="mini" type="text" plain @click="brokeb(scope.row)">{{ $t('searchOrder.takeout') }}</el-button>
<el-button size="mini" type="text" plain @click="deletea(scope.row)">{{ $t('searchOrder.delete') }}</el-button>
</template>
+ </el-table-column> -->
+ </el-table>
+</el-dialog>
+<el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
+ <div style="margin-bottom: 20px">
+ <el-form>
+ <el-row style="margin-top: -15px;margin-bottom: -2px;">
+ <el-col :span="4">
+ <div id="dt" style="font-size: 15px;">
+ <el-form-item :label="$t('searchOrder.temperingtotal')" style="width: 14vw">
+ {{ temperingtotal }}
+ </el-form-item>
+ </div>
+ </el-col>
+ <el-col :span="5">
+ <div id="dta" style="font-size: 15px;">
+ <el-form-item :label="$t('searchOrder.glasstotal')" style="width: 14vw">
+ {{ glasstotal }}
+ </el-form-item>
+ </div>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <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>
-
+<el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')">
+ <el-table ref="table" style="margin-top: 20px;height: 300px;"
+ :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+ <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
+ <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" />
+ <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
+ <template #default="{ row }">
+ <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>
+ </template>
+ </el-table-column>
+ <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
+ <template #default="{ row }">
+ <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>
+ </template>
+ </el-table-column>
+ </el-table>
+ <template #footer>
+ <div id="dialog-footer">
+ <el-button type="primary" @click="handleConfirm">
+ {{ $t('searchOrder.makesure') }}
+ </el-button>
+ <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button>
+ </div>
+ </template>
+</el-dialog>
</template>
<style scoped>
-
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
@@ -1149,8 +1559,9 @@
}
.img-dlpl{
- margin-left: 80px;
- background-image:url('../../assets/dlpl.png');
+ margin-left: 20px;
+ margin-top: 20px;
+ background-image:url('../../assets/dlpl9.png');
background-repeat: no-repeat;
background-attachment: local;
min-height: 400px;
@@ -1161,31 +1572,8 @@
position:relative
}
.img-car1{
- background-image:url('../../assets/lp.png');
- position: absolute;
- background-repeat: no-repeat;
- background-attachment: local;
- min-height: 200px;
- width: 200px;
- max-width: 100%;
- background-size: 200px 70px;
- overflow: hidden;
- position:relative
-}
-.img-car2{
- background-image:url('../../assets/lpa.png');
- position: absolute;
- background-repeat: no-repeat;
- background-attachment: local;
- min-height: 200px;
- width: 200px;
- max-width: 100%;
- background-size: 200px 70px;
- overflow: hidden;
- position:relative
-}
-.img-car3{
- background-image:url('../../assets/lp.png');
+ display: flex;
+ background-image:url('../../assets/lp9.png');
position: absolute;
background-repeat: no-repeat;
background-attachment: local;
@@ -1197,7 +1585,8 @@
position:relative
}
.img-car4{
- background-image:url('../../assets/lpa.png');
+ display: flex;
+ background-image:url('../../assets/lpa9.png');
position: absolute;
background-repeat: no-repeat;
background-attachment: local;
--
Gitblit v1.8.0