Commit 87f27230823dce393b7380587a230cbc544c0848
1 parent
f41e4d4f
fix: DEFECT-1186 修复任务中心创建或编辑任务无提示消息
Showing
1 changed file
with
5 additions
and
0 deletions
@@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
11 | import { FormValueType } from './util'; | 11 | import { FormValueType } from './util'; |
12 | import { unref } from 'vue'; | 12 | import { unref } from 'vue'; |
13 | import { computed } from 'vue'; | 13 | import { computed } from 'vue'; |
14 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
14 | 15 | ||
15 | const props = defineProps<{ | 16 | const props = defineProps<{ |
16 | reload: Fn; | 17 | reload: Fn; |
@@ -49,6 +50,7 @@ | @@ -49,6 +50,7 @@ | ||
49 | }); | 50 | }); |
50 | 51 | ||
51 | const loading = ref(false); | 52 | const loading = ref(false); |
53 | + const { createMessage } = useMessage(); | ||
52 | const handleOk = async () => { | 54 | const handleOk = async () => { |
53 | try { | 55 | try { |
54 | loading.value = true; | 56 | loading.value = true; |
@@ -58,6 +60,9 @@ | @@ -58,6 +60,9 @@ | ||
58 | formMode.value === DataActionModeEnum.CREATE | 60 | formMode.value === DataActionModeEnum.CREATE |
59 | ? await createTask(_res) | 61 | ? await createTask(_res) |
60 | : await updateTask({ ..._res, id: unref(dataSource)?.id as string }); | 62 | : await updateTask({ ..._res, id: unref(dataSource)?.id as string }); |
63 | + createMessage.success( | ||
64 | + unref(modalMode) === DataActionModeEnum.CREATE ? '创建成功' : '修改成功' | ||
65 | + ); | ||
61 | closeModal(); | 66 | closeModal(); |
62 | props.reload?.(); | 67 | props.reload?.(); |
63 | } catch (error) { | 68 | } catch (error) { |