From d667fce729c223e885930bb8edb528ab501b8d6a Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期二, 26 十一月 2024 16:57:53 +0800 Subject: [PATCH] 1. 移动socket客户端类、新增socket/index.js文件(初始化) 2. socketMessage枚举类的完善(增加对每个类型的英文描述字段以及对类型筛选和判断是否为心跳消息的工具方法) 3. 在FYBgTaskCard.vue监听并处理如何刷后台任务状态逻辑 --- src/views/fysp/task/components/CompSubTaskList.vue | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/fysp/task/components/CompSubTaskList.vue b/src/views/fysp/task/components/CompSubTaskList.vue index fa2e87d..ef20ca8 100644 --- a/src/views/fysp/task/components/CompSubTaskList.vue +++ b/src/views/fysp/task/components/CompSubTaskList.vue @@ -54,7 +54,7 @@ <el-dialog v-model="dialogVisible" width="600" - title="涓�閿垱寤烘�讳换鍔�" + title="宸℃煡浠诲姟缂栬緫" destroy-on-close :close-on-click-modal="false" :close-on-press-escape="false" @@ -71,6 +71,7 @@ import { ref, computed, watch, onMounted, onUnmounted } from 'vue'; import { ElMessageBox, ElNotification, ElMessage } from 'element-plus'; import CompSubTaskEdit from './CompSubTaskEdit.vue'; +import subtaskApi from '@/api/fysp/subtaskApi'; const props = defineProps({ modelValue: Array, @@ -96,11 +97,17 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - const index = data.value.indexOf(item); - data.value.splice(index, 1); + return subtaskApi.deleteSubtask(item.stguid).then(res=>{ + if (res == 1) { + const index = data.value.indexOf(item); + data.value.splice(index, 1); - emit('update:modelValue', data.value); - emit('remove', item); + emit('update:modelValue', data.value); + emit('remove', item); + } else { + Promise.reject('鍒犻櫎宸℃煡浠诲姟澶辫触') + } + }) }); } } -- Gitblit v1.9.3