From bb3cfeae80cbc5a6c26292d0eb23f1754d039db9 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 03 八月 2024 11:26:09 +0800
Subject: [PATCH] 1、大理片笼笼进片逻辑调整 2、钢化版图按照版序出
---
UI-Project/src/views/Slicecage/slicecage.vue | 94 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 68 insertions(+), 26 deletions(-)
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 7aa6477..4ed89ea 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -7,11 +7,12 @@
const router = useRouter()
import request from "@/utils/request"
import { WebSocketHost ,host} from '@/utils/constants'
-import { ref, onMounted , onBeforeUnmount, reactive, computed } 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)
@@ -22,6 +23,7 @@
const tableDatad = ref([])
const tableDataf = ref([])
const tableDatae = ref([])
+const tableDatax = ref([])
const carPosition = ref([])
const ganghua = ref('')
const adjustedRects = ref([]);
@@ -37,6 +39,8 @@
const adjustedRectsg = ref([]);
const adjustedRectsh = ref([]);
const currentRow = reactive({}); // 褰撳墠琛岀殑鏁版嵁
+const inputValuesa = reactive({});
+
const add = ref(false)
const flowCardId = ref('');
const gap = ref('');
@@ -178,10 +182,8 @@
});
setInterval(() => {
localStorage.clear(); // 娓呴櫎鎵�鏈塴ocalStorage鏁版嵁
- console.log(11111);
}, 60000);
// function cleanUp() {
-// console.log('鎵ц娓呯悊鎿嶄綔');
// }
// // 鍋囪鎴戜滑姣�2鍒嗛挓鎵ц涓�娆℃竻鐞�
// setInterval(cleanUp, 1 * 60 * 1000);
@@ -230,10 +232,7 @@
// 鏄惁绂佺敤
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);
@@ -510,22 +509,37 @@
console.error('鍙戠敓閿欒:', error);
}
};
-// const handleBindRack = (row) => {
-// fetchFlowCardId();
-// dialogFormVisiblea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
-// };
+const handlezhiban = () => {
+ dialoglea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
+ fetchFlowCardId();
+};
const fetchFlowCardId = async () => {
- try {
- const response = await request.get('unLoadGlass/downWorkStation/getflowCardId');
- console.log(response)
- if (response.code === 200) {
-
-}
- else {
- ElMessage.error(response.msg);
+ 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);
+ console
+ } else {
+ ElMessage.error(response.message);
}
- } catch (error) {
+}
+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) {
@@ -552,11 +566,11 @@
console.error(error);
}
}
+let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
const handleMessage = (data) => {
// 鏇存柊 tableData 鐨勬暟鎹�
- console.log(data.temperingSwitch[0]);
if(data.bigStorageCageDetailsOutTask!=null){
tableDatac.value = data.bigStorageCageDetailsOutTask[0]
adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
@@ -603,7 +617,6 @@
}else{
ganghua.value = ''
}
-console.log(data.temperingSwitch[0]);
if(data.bigStorageCageInfos!=null){
window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length)
let length = window.localStorage.getItem('length')
@@ -661,9 +674,14 @@
// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
onMounted(() => {
// fetchFlowCardId();
- initializeWebSocket(socketUrl, handleMessage);
-
+ // initializeWebSocket(socketUrl, handleMessage);
+ socket = initializeWebSocket(socketUrl, handleMessage);
});
+ onUnmounted(() => {
+ if (socket) {
+ closeWebSocket(socket);
+ }
+ });
function getStatusType(enableState: number) {
switch (enableState) {
case 100:
@@ -715,7 +733,7 @@
}
}
onBeforeUnmount(() => {
- console.log("鍏抽棴浜�")
+ // console.log("鍏抽棴浜�")
closeWebSocket();
});
</script>
@@ -725,7 +743,7 @@
<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="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
- <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.dutyinformation') }}</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;">
@@ -1362,7 +1380,31 @@
</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.add') }}
+ </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;}
--
Gitblit v1.8.0