From a78a9decb428762bcf6cc82641abbc5d6257008e Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 12 十二月 2024 14:14:29 +0800
Subject: [PATCH] 中空调度开关默认为true
---
UI-Project/src/views/Returns/upreturns2.vue | 144 ++++++++++++++++++++++++++++++++++++------------
1 files changed, 108 insertions(+), 36 deletions(-)
diff --git a/UI-Project/src/views/Returns/upreturns2.vue b/UI-Project/src/views/Returns/upreturns2.vue
index a1ed23d..cc7c159 100644
--- a/UI-Project/src/views/Returns/upreturns2.vue
+++ b/UI-Project/src/views/Returns/upreturns2.vue
@@ -6,7 +6,6 @@
import {host, WebSocketHost} from '@/utils/constants'
import request from "@/utils/request"
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
-
const router = useRouter()
const {t} = useI18n()
const selectValuesa = reactive([]);
@@ -16,6 +15,7 @@
const dialogFormVisible = ref(false)
const blind = ref(false)
const blinda = ref(false)
+const blindb = ref(false)
const dialoglea = ref(false)
const tableDatax = ref([])
const upstatus = ref(t('basicData.machineaa'));
@@ -51,6 +51,10 @@
closeWebSocket(socket);
}
});
+// 鍒犻櫎
+const handledelete = (row) => {
+ blindb.value = true;
+};
const fetchTableData = async () => {
try {
const response = await request.get("/loadGlass/up-patten-usage/prioritylist");
@@ -66,8 +70,8 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/uploadGlass`;
const handleMessage = (data: any) => {
- tableDataa.value = data.list[0].slice(0, 2);
- tableDatab.value = data.list[0].slice(2, 4);
+ // tableDataa.value = data.list[0].slice(0, 2);
+ tableDataa.value = data.list[0].slice(2, 4);
};
onBeforeUnmount(() => {
closeWebSocket();
@@ -94,10 +98,10 @@
const handlesure = async () => {
try {
const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
- stationCell: 2,
- // engineerId: 'P24101602',
+ stationCell: 6,
engineerId: selectedProjectNo.value,
- filmRemove: filmRemove.value,
+ // filmRemove: filmRemove.value,
+ filmRemove: parseInt(filmRemove.value, 10),
})
window.localStorage.setItem('engineeringId', selectedProjectNo.value)
window.localStorage.setItem('filmRemove', filmRemove.value)
@@ -122,10 +126,10 @@
let engineeringId = window.localStorage.getItem('engineeringId')
if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
try {
- const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
- stationCell: 2,
- filmRemove: filmRemove,
- // engineerId: 'P24101602',
+ const response = await request.post('/loadGlass/engineering/engineering/pause', {
+ // const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
+ // stationCell: 6,
+ // filmRemove: filmRemove,
engineerId: engineeringId,
state: 1,
})
@@ -143,16 +147,42 @@
ElMessage.warning(t('basicData.pausea'));
}
}
+// 鍒犻櫎
+const deleteTask = async () => {
+ try {
+ let engineeringId = window.localStorage.getItem('engineeringId')
+ console.log(engineeringId);
+ if (engineeringId !== '') {
+ const response = await request.post('/loadGlass/engineering/engineering/deleteTask', {
+ engineerId: engineeringId,
+ })
+ if (response.code == 200) {
+ ElMessage.success(response.message);
+ blindb.value = false;
+ } else {
+ ElMessage.error(response.message);
+ }
+ }
+ else {
+ ElMessage({
+ type: 'info',
+ message: t('basicData.infonull'),
+ })
+ }
+}
+catch (error) {
+ console.error(error);
+ }
+}
// 鏆傚仠
const handleup = async () => {
try {
let engineeringId = window.localStorage.getItem('engineeringId')
console.log(engineeringId);
if (engineeringId !== '') {
- const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
- stationCell: 2,
- // engineerId: 'P24101602',
- engineeringId: engineeringId,
+ const response = await request.post('/loadGlass/engineering/engineering/pause', {
+ // stationCell: 6,
+ engineerId: engineeringId,
state: 0,
})
if (response.code == 200) {
@@ -171,7 +201,6 @@
console.error(error);
}
}
-
// 鏌ヨ鏁版嵁
const selectReportData = async () => {
let stateList = []
@@ -181,8 +210,9 @@
}
}
const response = await request.post("/loadGlass/up-patten-usage/setUpPattenRequest", {
- taskState: stateList,
- taskType: 2
+ state: selectValuesa[0],
+ // state: stateList,
+ stationCell: 6
})
if (response.code === 200) {
tableData.value = response.data;
@@ -191,7 +221,6 @@
ElMessage.error(response.message);
}
};
-
// 鍊肩彮淇℃伅
const fetchFlowCardId = async () => {
try {
@@ -237,6 +266,26 @@
ElMessage.error(t('basicData.glassnull'));
}
};
+function getStatusType2(filmRemove) {
+ switch (filmRemove) {
+ case 0:
+ return 'success';
+ case 1:
+ return 'info';
+ case 2:
+ return 'warning';
+ }
+}
+function getStatusText2(filmRemove) {
+ switch (filmRemove) {
+ case 0:
+ return t('Mounting.noremoval');//瀹屾垚
+ case 1:
+ return t('Mounting.coarselyground');//鏂板缓
+ case 2:
+ return t('Mounting.finegrinding');//鎵ц涓�
+ }
+}
</script>
<template>
<div style="height: 500px;">
@@ -264,9 +313,9 @@
<el-button style="margin-top: 5px;margin-left: 15px;" type="primary" @click="selectproject">{{ $t('Mounting.previewproject') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" type="success" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
+ <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="handledelete">{{ $t('searchOrder.deleteTask') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
- <el-select disabled v-model="selectValuesa[1]" clearable :placeholder="$t('Mounting.twoloadingline')"
- style="margin-top: 5px;margin-left: 20px;">
+ <el-select disabled v-model="selectValuesa[1]" clearable :placeholder="$t('Mounting.twoloadingline')" style="margin-top: 5px;margin-left: 20px;">
<el-option :label="$t('Mounting.all')" value="0"></el-option>
<el-option :label="$t('Mounting.oneloadingline')" value="1"></el-option>
<el-option :label="$t('Mounting.twoloadingline')" value="2"></el-option>
@@ -280,9 +329,9 @@
<el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
<el-table
- height="350"
- ref="table"
- :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
+ height="350"
+ ref="table"
+ :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
:data="tableData"
>
<el-table-column prop="layoutSequence" :label="$t('Mounting.project')" width="100" align="center"/>
@@ -302,16 +351,29 @@
min-width="80"
prop="state"
>
- <template #default="scope">
- <el-tag
- :type="scope.row.state === 100 ? 'success' : 'warning'"
- @click="toggleEnableState(scope.row)"
- >
- {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
- </el-tag>
- </template>
- </el-table-column>
+ <template #default="scope">
+ <el-tag
+ :type="scope.row.state === 100 ? 'success' : 'warning'"
+ @click="toggleEnableState(scope.row)"
+ >
+ {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
+ </el-tag>
+ </template>
+ </el-table-column>
<el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/>
+ <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> -->
+ <el-table-column
+ align="center"
+ :label="$t('Mounting.removalmethodp')"
+ prop="filmRemove"
+ >
+ <template #default="scope">
+ <el-tag :type="getStatusType2(scope.row.filmRemove)">
+ {{ getStatusText2(scope.row.filmRemove) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/>
</el-table>
</div>
</el-card>
@@ -319,7 +381,7 @@
<div style="width: 49%;float: left;margin-left: 300px;">
<div style="display: flex;">
<img src="../../assets/shangpianji.png" alt=""
- style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
+ style="max-width: 20%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
<el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 8%;"
:header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
>
@@ -329,8 +391,8 @@
<el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80"/>
<el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80"/>
</el-table>
- </div>
- </div>
+ </div>
+ </div>
<!-- <div style="width: 48%;float: right;">
<div style="display: flex;">
<img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
@@ -399,7 +461,7 @@
</div>
</template>
</el-dialog>
- </div>
+ </div>
<el-dialog v-model="dialogFormVisible" top="24vh" width="70%">
<div class="flex-container" style="margin-left: 50px;margin-bottom: 10px;">
<el-form-item :label="$t('Mounting.loadingline')" :required="true">
@@ -442,6 +504,16 @@
</div>
</template>
</el-dialog>
+ <el-dialog v-model="blindb" top="30vh" width="25%" :title="$t('searchOrder.pdeleteTask')">
+ <template #footer>
+ <div id="dialog-footer">
+ <el-button type="primary" @click="deleteTask">
+ {{ $t('basicData.confirm') }}
+ </el-button>
+ <el-button @click="blindb = false">{{ $t('basicData.cancel') }}</el-button>
+ </div>
+ </template>
+ </el-dialog>
</div>
</template>
--
Gitblit v1.8.0