From a504218a393b591c08c9ef8407c58e48b7c697e7 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Thu, 8 May 2025 16:22:07 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=B3=BB=E7=BB=9F=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dataAsync/AsyncMain.api.ts | 21 ++++---- src/views/system/dict/dict.api.ts | 10 ++++ src/views/system/dict/index.vue | 60 +++++++++++++++++++++-- 3 files changed, 78 insertions(+), 13 deletions(-) diff --git a/src/components/dataAsync/AsyncMain.api.ts b/src/components/dataAsync/AsyncMain.api.ts index be57271..a1a6c7f 100644 --- a/src/components/dataAsync/AsyncMain.api.ts +++ b/src/components/dataAsync/AsyncMain.api.ts @@ -1,12 +1,12 @@ import { defHttp } from '/@/utils/http/axios'; -import { useMessage } from "/@/hooks/web/useMessage"; +import { useMessage } from '/@/hooks/web/useMessage'; const { createConfirm } = useMessage(); enum Api { list = '/asyncmain/asyncMain/list', - save='/asyncmain/asyncMain/add', - edit='/asyncmain/asyncMain/edit', + save = '/asyncmain/asyncMain/add', + edit = '/asyncmain/asyncMain/edit', deleteOne = '/asyncmain/asyncMain/delete', deleteBatch = '/asyncmain/asyncMain/deleteBatch', importExcel = '/asyncmain/asyncMain/importExcel', @@ -35,11 +35,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params }); * @param params * @param handleSuccess */ -export const deleteOne = (params,handleSuccess) => { - return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} +}; /** * 批量删除 @@ -54,12 +54,12 @@ export const batchDelete = (params, handleSuccess) => { okText: '确认', cancelText: '取消', onOk: () => { - return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); - } + }, }); -} +}; /** * 保存或者更新 @@ -69,4 +69,5 @@ export const batchDelete = (params, handleSuccess) => { export const saveOrUpdate = (params, isUpdate) => { let url = isUpdate ? Api.edit : Api.save; return defHttp.post({ url: url, params }, { isTransformResponse: false }); -} +}; + diff --git a/src/views/system/dict/dict.api.ts b/src/views/system/dict/dict.api.ts index 7a1ec9e..4ba5a5e 100644 --- a/src/views/system/dict/dict.api.ts +++ b/src/views/system/dict/dict.api.ts @@ -22,6 +22,7 @@ enum Api { refreshCache = '/sys/dict/refleshCache', queryAllDictItems = '/sys/dict/queryAllDictItems', async = '/sys/dict/async', + listByType = '/asyncmain/asyncMain/listByType', } /** * 导出api @@ -162,4 +163,13 @@ export const queryAllDictItems = () => defHttp.get({ url: Api.queryAllDictItems */ export const asyncData = (params) => { return defHttp.post({ url: Api.async, params }); +}; + +/** + * 查询同步结果 + * @param params + * @returns + */ +export const listByType = (params) => { + return defHttp.post({ url: Api.listByType, params }); }; \ No newline at end of file diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index f1e3737..19c2b27 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -34,11 +34,28 @@ + + + + + + + + + + + + + +