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/upreturns.vue | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/UI-Project/src/views/Returns/upreturns.vue b/UI-Project/src/views/Returns/upreturns.vue
index 6d07843..1c5db80 100644
--- a/UI-Project/src/views/Returns/upreturns.vue
+++ b/UI-Project/src/views/Returns/upreturns.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'));
@@ -67,11 +67,15 @@
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);
+ // tableDatab.value = data.list[0].slice(2, 4);
};
onBeforeUnmount(() => {
closeWebSocket();
});
+// 鍒犻櫎
+const handledelete = (row) => {
+ blindb.value = true;
+};
const requestData = {
state: 100
};
@@ -113,6 +117,33 @@
ElMessage.error(response.message);
}
} catch (error) {
+ console.error(error);
+ }
+}
+// 鍒犻櫎
+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);
}
}
@@ -172,7 +203,6 @@
console.error(error);
}
}
-
// 鏌ヨ鏁版嵁
const selectReportData = async () => {
let stateList = []
@@ -193,7 +223,6 @@
ElMessage.error(response.message);
}
};
-
// 鍊肩彮淇℃伅
const fetchFlowCardId = async () => {
try {
@@ -288,6 +317,7 @@
<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.oneloadingline')"
style="margin-top: 5px;margin-left: 20px;">
@@ -355,7 +385,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'}"
>
@@ -393,6 +423,16 @@
</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>
<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'}">
--
Gitblit v1.8.0