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 | 44 | const handleOpenLink = () => { |
| 45 | 45 | window.open(unref(link)); |
| 46 | 46 | }; |
| 47 | + const { createMessage } = useMessage(); | |
| 47 | 48 | |
| 48 | 49 | const handleSubmit = async () => { |
| 49 | 50 | try { |
| ... | ... | @@ -53,6 +54,7 @@ |
| 53 | 54 | await props?.shareApi?.({ id, ...value }); |
| 54 | 55 | closeModal(); |
| 55 | 56 | emit('success'); |
| 57 | + createMessage.success('操作成功'); | |
| 56 | 58 | } finally { |
| 57 | 59 | loading.value = false; |
| 58 | 60 | } |
| ... | ... | @@ -63,7 +65,6 @@ |
| 63 | 65 | }); |
| 64 | 66 | |
| 65 | 67 | const { clipboardRef, isSuccessRef } = useCopyToClipboard(); |
| 66 | - const { createMessage } = useMessage(); | |
| 67 | 68 | const handleCopy = () => { |
| 68 | 69 | clipboardRef.value = unref(link); |
| 69 | 70 | if (unref(isSuccessRef)) { | ... | ... |
| ... | ... | @@ -30,6 +30,9 @@ |
| 30 | 30 | submitFunc: async () => { |
| 31 | 31 | getDataSource(); |
| 32 | 32 | }, |
| 33 | + resetFunc: async () => { | |
| 34 | + getDataSource(true); | |
| 35 | + }, | |
| 33 | 36 | }); |
| 34 | 37 | |
| 35 | 38 | const paginationChange = (page: number, pageSize: number) => { |
| ... | ... | @@ -52,7 +55,7 @@ |
| 52 | 55 | const dataSource = ref<TaskRecordType[]>([]); |
| 53 | 56 | const loading = ref(false); |
| 54 | 57 | |
| 55 | - const getDataSource = async () => { | |
| 58 | + const getDataSource = async (reset = false) => { | |
| 56 | 59 | try { |
| 57 | 60 | loading.value = true; |
| 58 | 61 | const params = getFieldsValue() || {}; |
| ... | ... | @@ -60,7 +63,7 @@ |
| 60 | 63 | page: pagination.current, |
| 61 | 64 | pageSize: pagination.pageSize, |
| 62 | 65 | tbDeviceId: props.tbDeviceId, |
| 63 | - ...params, | |
| 66 | + ...(reset ? {} : params), | |
| 64 | 67 | }); |
| 65 | 68 | pagination.total = total; |
| 66 | 69 | dataSource.value = items; | ... | ... |