Commit d34084c9882529993de5827dda7434f7487817fe
Merge branch 'dev-fix-ww' into 'main_dev'
fix: DEFECT-1268 修复设备详情任务中心重置表单为进行查询 See merge request yunteng/thingskit-front!572
Showing
2 changed files
with
7 additions
and
3 deletions
| @@ -44,6 +44,7 @@ | @@ -44,6 +44,7 @@ | ||
| 44 | const handleOpenLink = () => { | 44 | const handleOpenLink = () => { |
| 45 | window.open(unref(link)); | 45 | window.open(unref(link)); |
| 46 | }; | 46 | }; |
| 47 | + const { createMessage } = useMessage(); | ||
| 47 | 48 | ||
| 48 | const handleSubmit = async () => { | 49 | const handleSubmit = async () => { |
| 49 | try { | 50 | try { |
| @@ -53,6 +54,7 @@ | @@ -53,6 +54,7 @@ | ||
| 53 | await props?.shareApi?.({ id, ...value }); | 54 | await props?.shareApi?.({ id, ...value }); |
| 54 | closeModal(); | 55 | closeModal(); |
| 55 | emit('success'); | 56 | emit('success'); |
| 57 | + createMessage.success('操作成功'); | ||
| 56 | } finally { | 58 | } finally { |
| 57 | loading.value = false; | 59 | loading.value = false; |
| 58 | } | 60 | } |
| @@ -63,7 +65,6 @@ | @@ -63,7 +65,6 @@ | ||
| 63 | }); | 65 | }); |
| 64 | 66 | ||
| 65 | const { clipboardRef, isSuccessRef } = useCopyToClipboard(); | 67 | const { clipboardRef, isSuccessRef } = useCopyToClipboard(); |
| 66 | - const { createMessage } = useMessage(); | ||
| 67 | const handleCopy = () => { | 68 | const handleCopy = () => { |
| 68 | clipboardRef.value = unref(link); | 69 | clipboardRef.value = unref(link); |
| 69 | if (unref(isSuccessRef)) { | 70 | if (unref(isSuccessRef)) { |
| @@ -30,6 +30,9 @@ | @@ -30,6 +30,9 @@ | ||
| 30 | submitFunc: async () => { | 30 | submitFunc: async () => { |
| 31 | getDataSource(); | 31 | getDataSource(); |
| 32 | }, | 32 | }, |
| 33 | + resetFunc: async () => { | ||
| 34 | + getDataSource(true); | ||
| 35 | + }, | ||
| 33 | }); | 36 | }); |
| 34 | 37 | ||
| 35 | const paginationChange = (page: number, pageSize: number) => { | 38 | const paginationChange = (page: number, pageSize: number) => { |
| @@ -52,7 +55,7 @@ | @@ -52,7 +55,7 @@ | ||
| 52 | const dataSource = ref<TaskRecordType[]>([]); | 55 | const dataSource = ref<TaskRecordType[]>([]); |
| 53 | const loading = ref(false); | 56 | const loading = ref(false); |
| 54 | 57 | ||
| 55 | - const getDataSource = async () => { | 58 | + const getDataSource = async (reset = false) => { |
| 56 | try { | 59 | try { |
| 57 | loading.value = true; | 60 | loading.value = true; |
| 58 | const params = getFieldsValue() || {}; | 61 | const params = getFieldsValue() || {}; |
| @@ -60,7 +63,7 @@ | @@ -60,7 +63,7 @@ | ||
| 60 | page: pagination.current, | 63 | page: pagination.current, |
| 61 | pageSize: pagination.pageSize, | 64 | pageSize: pagination.pageSize, |
| 62 | tbDeviceId: props.tbDeviceId, | 65 | tbDeviceId: props.tbDeviceId, |
| 63 | - ...params, | 66 | + ...(reset ? {} : params), |
| 64 | }); | 67 | }); |
| 65 | pagination.total = total; | 68 | pagination.total = total; |
| 66 | dataSource.value = items; | 69 | dataSource.value = items; |