From 5b238a4f037c1fe2e2af8769e62f75b8ff2d389a Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期三, 11 十二月 2024 16:12:17 +0800 Subject: [PATCH] 上片模块新增删除工程 --- UI-Project/src/views/Returns/upreturns2.vue | 57 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 47 insertions(+), 10 deletions(-) diff --git a/UI-Project/src/views/Returns/upreturns2.vue b/UI-Project/src/views/Returns/upreturns2.vue index afa5811..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"); @@ -143,6 +147,33 @@ 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 { @@ -170,7 +201,6 @@ console.error(error); } } - // 鏌ヨ鏁版嵁 const selectReportData = async () => { let stateList = [] @@ -191,7 +221,6 @@ ElMessage.error(response.message); } }; - // 鍊肩彮淇℃伅 const fetchFlowCardId = async () => { try { @@ -237,7 +266,6 @@ ElMessage.error(t('basicData.glassnull')); } }; - function getStatusType2(filmRemove) { switch (filmRemove) { case 0: @@ -248,7 +276,6 @@ return 'warning'; } } - function getStatusText2(filmRemove) { switch (filmRemove) { case 0: @@ -286,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> @@ -302,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"/> @@ -477,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