From 4e75bf94c6a2711ec5b666176081fbe5cd172857 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 1 Mar 2023 17:08:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=9C=E7=A8=8B=E5=8D=87=E7=BA=A7=20?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/Firmware/Task/Detail/index.vue | 81 +++++++++---------- src/views/device/Firmware/Task/index.vue | 9 ++- src/views/device/Firmware/index.vue | 58 ++++++------- 3 files changed, 70 insertions(+), 78 deletions(-) diff --git a/src/views/device/Firmware/Task/Detail/index.vue b/src/views/device/Firmware/Task/Detail/index.vue index dc4f4d29..ef8d17e4 100644 --- a/src/views/device/Firmware/Task/Detail/index.vue +++ b/src/views/device/Firmware/Task/Detail/index.vue @@ -17,19 +17,21 @@
-
- + - 批量重试 - + 批量重试 +
@@ -85,37 +87,27 @@ {{ slotProps.progress }}% @@ -129,7 +121,6 @@ import { taskById, history, historyCount, - queryProduct, startTask, startOneTask, } from '@/api/device/firmware'; @@ -138,8 +129,8 @@ import { getImage } from '@/utils/comm'; import moment from 'moment'; import { cloneDeep } from 'lodash-es'; import Save from './Save.vue'; + const tableRef = ref>({}); -const router = useRouter(); const route = useRoute(); const params = ref>({}); const taskId = route.params?.id as string; @@ -286,7 +277,7 @@ const getActions = (data: Partial>): ActionsType[] => { } const Actions = [ { - key: 'eye', + key: 'view', text: '查看', tooltip: { title: '查看', @@ -297,25 +288,23 @@ const getActions = (data: Partial>): ActionsType[] => { }, }, { - key: 'try', + key: 'update', text: '重试', tooltip: { title: '重试', }, icon: 'RedoOutlined', - onClick: async () => { - handlTry(data.id); + popConfirm: { + title: `确认重试?`, + onConfirm: async () => { + handlTry(data.id); + }, }, }, ]; return Actions; }; -const handlAdd = () => { - current.value = {}; - visible.value = true; -}; - const handlEye = (data: string) => { current.value = data || ''; visible.value = true; @@ -434,4 +423,8 @@ const handleSearch = (e: any) => { } } } +.state-button { + margin-top: -5px; + margin-right: -12px; +} diff --git a/src/views/device/Firmware/Task/index.vue b/src/views/device/Firmware/Task/index.vue index b9cff6fc..5c60d08d 100644 --- a/src/views/device/Firmware/Task/index.vue +++ b/src/views/device/Firmware/Task/index.vue @@ -13,9 +13,14 @@ :params="params" > @@ -79,7 +74,6 @@ import type { FormDataType } from './type'; const menuStory = useMenuStore(); const tableRef = ref>({}); -const router = useRouter(); const params = ref>({}); const productOptions = ref([]); @@ -174,7 +168,7 @@ const getActions = (data: Partial>): ActionsType[] => { } return [ { - key: 'FileTextOutlined', + key: 'view', text: '升级任务', tooltip: { title: '升级任务', @@ -185,7 +179,7 @@ const getActions = (data: Partial>): ActionsType[] => { }, }, { - key: 'edit', + key: 'update', text: '编辑', tooltip: { title: '编辑', @@ -211,7 +205,7 @@ const getActions = (data: Partial>): ActionsType[] => { ]; }; -const handlUpdate = (data: FormDataType) => { +const handlUpdate = (data: Partial>) => { menuStory.jumpPage( 'device/Firmware/Task', {}, @@ -226,7 +220,7 @@ const handlAdd = () => { current.value = {}; visible.value = true; }; -const handlEdit = (data: FormDataType) => { +const handlEdit = (data: Partial>) => { current.value = _.cloneDeep(data); visible.value = true; };