diff --git a/src/api/demo/demo/index.ts b/src/api/demo/demo/index.ts index 74417205..7c1019df 100644 --- a/src/api/demo/demo/index.ts +++ b/src/api/demo/demo/index.ts @@ -1,13 +1,14 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { DemoVO, DemoForm, DemoQuery } from '@/api/demo/demo/types'; +import { PageResult } from '@/api/types'; /** * 查询测试单列表 * @param query * @returns {*} */ -export const listDemo = (query?: DemoQuery): AxiosPromise => { +export const listDemo = (query?: DemoQuery): AxiosPromise> => { return request({ url: '/demo/demo/list', method: 'get', diff --git a/src/api/monitor/loginInfo/index.ts b/src/api/monitor/loginInfo/index.ts index dc6cfc0c..a557e229 100644 --- a/src/api/monitor/loginInfo/index.ts +++ b/src/api/monitor/loginInfo/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { LoginInfoQuery, LoginInfoVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询登录日志列表 -export function list(query: LoginInfoQuery): AxiosPromise { +export function list(query: LoginInfoQuery): AxiosPromise> { return request({ url: '/monitor/loginInfo/list', method: 'get', diff --git a/src/api/monitor/online/index.ts b/src/api/monitor/online/index.ts index 5b3221c1..c6192011 100644 --- a/src/api/monitor/online/index.ts +++ b/src/api/monitor/online/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { OnlineQuery, OnlineVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询在线用户列表 -export function list(query: OnlineQuery): AxiosPromise { +export function list(query: OnlineQuery): AxiosPromise> { return request({ url: '/monitor/online/list', method: 'get', diff --git a/src/api/monitor/operlog/index.ts b/src/api/monitor/operlog/index.ts index 7ac34533..f6ea1b92 100644 --- a/src/api/monitor/operlog/index.ts +++ b/src/api/monitor/operlog/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { OperLogQuery, OperLogVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询操作日志列表 -export function list(query: OperLogQuery): AxiosPromise { +export function list(query: OperLogQuery): AxiosPromise> { return request({ url: '/monitor/operlog/list', method: 'get', diff --git a/src/api/system/client/index.ts b/src/api/system/client/index.ts index 6b302b0a..933d678f 100644 --- a/src/api/system/client/index.ts +++ b/src/api/system/client/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ClientVO, ClientForm, ClientQuery } from '@/api/system/client/types'; +import { PageResult } from '@/api/types'; /** * 查询客户端管理列表 @@ -8,7 +9,7 @@ import { ClientVO, ClientForm, ClientQuery } from '@/api/system/client/types'; * @returns {*} */ -export const listClient = (query?: ClientQuery): AxiosPromise => { +export const listClient = (query?: ClientQuery): AxiosPromise> => { return request({ url: '/system/client/list', method: 'get', diff --git a/src/api/system/config/index.ts b/src/api/system/config/index.ts index 1e4842d5..0c9bfb8c 100644 --- a/src/api/system/config/index.ts +++ b/src/api/system/config/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { ConfigForm, ConfigQuery, ConfigVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询参数列表 -export function listConfig(query: ConfigQuery): AxiosPromise { +export function listConfig(query: ConfigQuery): AxiosPromise> { return request({ url: '/system/config/list', method: 'get', diff --git a/src/api/system/dict/type/index.ts b/src/api/system/dict/type/index.ts index 7dc3d660..0d8c536b 100644 --- a/src/api/system/dict/type/index.ts +++ b/src/api/system/dict/type/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { DictTypeForm, DictTypeVO, DictTypeQuery } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询字典类型列表 -export function listType(query: DictTypeQuery): AxiosPromise { +export function listType(query: DictTypeQuery): AxiosPromise> { return request({ url: '/system/dict/type/list', method: 'get', diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index 285d1f49..731f78c6 100644 --- a/src/api/system/notice/index.ts +++ b/src/api/system/notice/index.ts @@ -1,8 +1,9 @@ import request from '@/utils/request'; import { NoticeForm, NoticeQuery, NoticeVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询公告列表 -export function listNotice(query: NoticeQuery): AxiosPromise { +export function listNotice(query: NoticeQuery): AxiosPromise> { return request({ url: '/system/notice/list', method: 'get', diff --git a/src/api/system/oss/index.ts b/src/api/system/oss/index.ts index 44721127..bc78a17e 100644 --- a/src/api/system/oss/index.ts +++ b/src/api/system/oss/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { OssQuery, OssVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询OSS对象存储列表 -export function listOss(query: OssQuery): AxiosPromise { +export function listOss(query: OssQuery): AxiosPromise> { return request({ url: '/resource/oss/list', method: 'get', diff --git a/src/api/system/ossConfig/index.ts b/src/api/system/ossConfig/index.ts index d0faefee..9d5fca51 100644 --- a/src/api/system/ossConfig/index.ts +++ b/src/api/system/ossConfig/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { OssConfigForm, OssConfigQuery, OssConfigVO } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询对象存储配置列表 -export function listOssConfig(query: OssConfigQuery): AxiosPromise { +export function listOssConfig(query: OssConfigQuery): AxiosPromise> { return request({ url: '/resource/oss/config/list', method: 'get', diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index aba1ec11..ebf169f5 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -2,9 +2,10 @@ import request from '@/utils/request'; import { PostForm, PostQuery, PostVO } from './types'; import { AxiosPromise } from 'axios'; import { DeptTreeVO } from '../dept/types'; +import { PageResult } from '@/api/types'; // 查询岗位列表 -export function listPost(query: PostQuery): AxiosPromise { +export function listPost(query: PostQuery): AxiosPromise> { return request({ url: '/system/post/list', method: 'get', diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index fb0fcabc..f9577922 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -3,8 +3,9 @@ import { UserQuery } from '@/api/system/user/types'; import { AxiosPromise } from 'axios'; import { RoleQuery, RoleVO, RoleDeptTree } from './types'; import request from '@/utils/request'; +import { PageResult } from '@/api/types'; -export const listRole = (query: RoleQuery): AxiosPromise => { +export const listRole = (query: RoleQuery): AxiosPromise> => { return request({ url: '/system/role/list', method: 'get', @@ -95,7 +96,7 @@ export const delRole = (roleId: Array | string | number) => { /** * 查询角色已授权用户列表 */ -export const allocatedUserList = (query: UserQuery): AxiosPromise => { +export const allocatedUserList = (query: UserQuery): AxiosPromise> => { return request({ url: '/system/role/authUser/allocatedList', method: 'get', @@ -106,7 +107,7 @@ export const allocatedUserList = (query: UserQuery): AxiosPromise => { /** * 查询角色未授权用户列表 */ -export const unallocatedUserList = (query: UserQuery): AxiosPromise => { +export const unallocatedUserList = (query: UserQuery): AxiosPromise> => { return request({ url: '/system/role/authUser/unallocatedList', method: 'get', diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index caffecc6..911a5adc 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -4,12 +4,13 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { UserForm, UserQuery, UserVO, UserInfoVO } from './types'; import { parseStrEmpty } from '@/utils/ruoyi'; +import { PageResult } from '@/api/types'; /** * 查询用户列表 * @param query */ -export const listUser = (query: UserQuery): AxiosPromise => { +export const listUser = (query: UserQuery): AxiosPromise> => { return request({ url: '/system/user/list', method: 'get', diff --git a/src/api/tool/gen/index.ts b/src/api/tool/gen/index.ts index efe079cf..25318735 100644 --- a/src/api/tool/gen/index.ts +++ b/src/api/tool/gen/index.ts @@ -1,9 +1,10 @@ import request from '@/utils/request'; import { DbTableQuery, DbTableVO, TableQuery, TableVO, GenTableVO, DbTableForm } from './types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; // 查询生成表数据 -export const listTable = (query: TableQuery): AxiosPromise => { +export const listTable = (query: TableQuery): AxiosPromise> => { return request({ url: '/tool/gen/list', method: 'get', @@ -11,7 +12,7 @@ export const listTable = (query: TableQuery): AxiosPromise => { }); }; // 查询db数据库列表 -export const listDbTable = (query: DbTableQuery): AxiosPromise => { +export const listDbTable = (query: DbTableQuery): AxiosPromise> => { return request({ url: '/tool/gen/db/list', method: 'get', diff --git a/src/api/types.ts b/src/api/types.ts index 06d2da14..b578f5cd 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -41,3 +41,11 @@ export interface VerifyCodeResult { uuid?: string; img?: string; } + +/** + * 分页返回结果 + */ +export interface PageResult { + total: number; + rows: T[]; +} diff --git a/src/api/workflow/definition/index.ts b/src/api/workflow/definition/index.ts index 49e6ee8f..eac7a46c 100644 --- a/src/api/workflow/definition/index.ts +++ b/src/api/workflow/definition/index.ts @@ -1,13 +1,14 @@ import request from '@/utils/request'; import { FlowDefinitionQuery, definitionXmlVO, FlowDefinitionForm, FlowDefinitionVo } from '@/api/workflow/definition/types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; /** * 获取流程定义列表 * @param query 流程实例id * @returns */ -export const listDefinition = (query: FlowDefinitionQuery): AxiosPromise => { +export const listDefinition = (query: FlowDefinitionQuery): AxiosPromise> => { return request({ url: `/workflow/definition/list`, method: 'get', @@ -20,7 +21,7 @@ export const listDefinition = (query: FlowDefinitionQuery): AxiosPromise => { +export const unPublishList = (query: FlowDefinitionQuery): AxiosPromise> => { return request({ url: `/workflow/definition/unPublishList`, method: 'get', diff --git a/src/api/workflow/instance/index.ts b/src/api/workflow/instance/index.ts index ad136f0b..09ff87a9 100644 --- a/src/api/workflow/instance/index.ts +++ b/src/api/workflow/instance/index.ts @@ -1,13 +1,14 @@ import request from '@/utils/request'; import { FlowInstanceQuery, FlowInstanceVO } from '@/api/workflow/instance/types'; import { AxiosPromise } from 'axios'; +import { PageResult } from '@/api/types'; /** * 查询运行中实例列表 * @param query * @returns {*} */ -export const pageByRunning = (query: FlowInstanceQuery): AxiosPromise => { +export const pageByRunning = (query: FlowInstanceQuery): AxiosPromise> => { return request({ url: '/workflow/instance/pageByRunning', method: 'get', @@ -20,7 +21,7 @@ export const pageByRunning = (query: FlowInstanceQuery): AxiosPromise => { +export const pageByFinish = (query: FlowInstanceQuery): AxiosPromise> => { return request({ url: '/workflow/instance/pageByFinish', method: 'get', @@ -43,7 +44,7 @@ export const flowHisTaskList = (businessId: string | number) => { * @param query * @returns {*} */ -export const pageByCurrent = (query: FlowInstanceQuery): AxiosPromise => { +export const pageByCurrent = (query: FlowInstanceQuery): AxiosPromise> => { return request({ url: '/workflow/instance/pageByCurrent', method: 'get', diff --git a/src/api/workflow/leave/index.ts b/src/api/workflow/leave/index.ts index 5a88edb6..f4c31949 100644 --- a/src/api/workflow/leave/index.ts +++ b/src/api/workflow/leave/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types'; +import { PageResult } from '@/api/types'; /** * 查询请假列表 @@ -8,7 +9,7 @@ import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types'; * @returns {*} */ -export const listLeave = (query?: LeaveQuery): AxiosPromise => { +export const listLeave = (query?: LeaveQuery): AxiosPromise> => { return request({ url: '/workflow/leave/list', method: 'get', diff --git a/src/api/workflow/spel/index.ts b/src/api/workflow/spel/index.ts index 0cc87461..fc033ad4 100644 --- a/src/api/workflow/spel/index.ts +++ b/src/api/workflow/spel/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { SpelVO, SpelForm, SpelQuery } from '@/api/workflow/spel/types'; +import { PageResult } from '@/api/types'; /** * 查询流程spel表达式定义列表 @@ -8,7 +9,7 @@ import { SpelVO, SpelForm, SpelQuery } from '@/api/workflow/spel/types'; * @returns {*} */ -export const listSpel = (query?: SpelQuery): AxiosPromise => { +export const listSpel = (query?: SpelQuery): AxiosPromise> => { return request({ url: '/workflow/spel/list', method: 'get', diff --git a/src/api/workflow/task/index.ts b/src/api/workflow/task/index.ts index 9eaf3f58..8a2a42ea 100644 --- a/src/api/workflow/task/index.ts +++ b/src/api/workflow/task/index.ts @@ -1,13 +1,14 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { TaskQuery, FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types'; +import { PageResult } from '@/api/types'; /** * 查询待办列表 * @param query * @returns {*} */ -export const pageByTaskWait = (query: TaskQuery): AxiosPromise => { +export const pageByTaskWait = (query: TaskQuery): AxiosPromise> => { return request({ url: '/workflow/task/pageByTaskWait', method: 'get', @@ -20,7 +21,7 @@ export const pageByTaskWait = (query: TaskQuery): AxiosPromise => * @param query * @returns {*} */ -export const pageByTaskFinish = (query: TaskQuery): AxiosPromise => { +export const pageByTaskFinish = (query: TaskQuery): AxiosPromise> => { return request({ url: '/workflow/task/pageByTaskFinish', method: 'get', @@ -33,7 +34,7 @@ export const pageByTaskFinish = (query: TaskQuery): AxiosPromise = * @param query * @returns {*} */ -export const pageByTaskCopy = (query: TaskQuery): AxiosPromise => { +export const pageByTaskCopy = (query: TaskQuery): AxiosPromise> => { return request({ url: '/workflow/task/pageByTaskCopy', method: 'get', @@ -46,7 +47,7 @@ export const pageByTaskCopy = (query: TaskQuery): AxiosPromise => * @param query * @returns {*} */ -export const pageByAllTaskWait = (query: TaskQuery): AxiosPromise => { +export const pageByAllTaskWait = (query: TaskQuery): AxiosPromise> => { return request({ url: '/workflow/task/pageByAllTaskWait', method: 'get', @@ -59,7 +60,7 @@ export const pageByAllTaskWait = (query: TaskQuery): AxiosPromise * @param query * @returns {*} */ -export const pageByAllTaskFinish = (query: TaskQuery): AxiosPromise => { +export const pageByAllTaskFinish = (query: TaskQuery): AxiosPromise> => { return request({ url: '/workflow/task/pageByAllTaskFinish', method: 'get', diff --git a/src/components/RoleSelect/index.vue b/src/components/RoleSelect/index.vue index 4bf93def..49b94986 100644 --- a/src/components/RoleSelect/index.vue +++ b/src/components/RoleSelect/index.vue @@ -153,8 +153,8 @@ const computedIds = (data) => { const getList = () => { loading.value = true; api.listRole(proxy?.addDateRange(queryParams.value, dateRange.value)).then((res) => { - roleList.value = res.rows; - total.value = res.total; + roleList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }); }; diff --git a/src/components/UserSelect/index.vue b/src/components/UserSelect/index.vue index 8ed3dcd5..76fd0e49 100644 --- a/src/components/UserSelect/index.vue +++ b/src/components/UserSelect/index.vue @@ -218,8 +218,8 @@ const getList = async () => { queryParams.value.userIds = prop.userIds; const res = await api.listUser(proxy?.addDateRange(queryParams.value, dateRange.value)); loading.value = false; - userList.value = res.rows; - total.value = res.total; + userList.value = res.data?.rows; + total.value = res.data?.total; }; const pageList = async () => { diff --git a/src/views/demo/demo/index.vue b/src/views/demo/demo/index.vue index a799be06..5653e760 100644 --- a/src/views/demo/demo/index.vue +++ b/src/views/demo/demo/index.vue @@ -147,8 +147,8 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { loading.value = true; const res = await listDemo(queryParams.value); - demoList.value = res.rows; - total.value = res.total; + demoList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; diff --git a/src/views/monitor/logininfo/index.vue b/src/views/monitor/logininfo/index.vue index 1ddf8df7..1743a51d 100644 --- a/src/views/monitor/logininfo/index.vue +++ b/src/views/monitor/logininfo/index.vue @@ -147,8 +147,8 @@ const queryParams = ref({ const getList = async () => { loading.value = true; const res = await list(proxy?.addDateRange(queryParams.value, dateRange.value)); - loginInfoList.value = res.rows; - total.value = res.total; + loginInfoList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 搜索按钮操作 */ diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue index 9f7a896e..259f1768 100644 --- a/src/views/monitor/online/index.vue +++ b/src/views/monitor/online/index.vue @@ -105,8 +105,8 @@ const queryParams = ref({ const getList = async () => { loading.value = true; const res = await initData(queryParams.value); - onlineList.value = res.rows; - total.value = res.total; + onlineList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 搜索按钮操作 */ diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue index 6e450cb6..ed0dabd3 100644 --- a/src/views/monitor/operlog/index.vue +++ b/src/views/monitor/operlog/index.vue @@ -198,8 +198,8 @@ const { queryParams, form } = toRefs(data); const getList = async () => { loading.value = true; const res = await list(proxy?.addDateRange(queryParams.value, dateRange.value)); - operlogList.value = res.rows; - total.value = res.total; + operlogList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 操作日志类型字典翻译 */ diff --git a/src/views/system/client/index.vue b/src/views/system/client/index.vue index b87bf886..ee08980a 100644 --- a/src/views/system/client/index.vue +++ b/src/views/system/client/index.vue @@ -210,8 +210,8 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { loading.value = true; const res = await listClient(queryParams.value); - clientList.value = res.rows; - total.value = res.total; + clientList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index 4894bb6d..e9916649 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -178,8 +178,8 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { loading.value = true; const res = await listConfig(proxy?.addDateRange(queryParams.value, dateRange.value)); - configList.value = res.rows; - total.value = res.total; + configList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 取消按钮 */ diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 6725e551..b72dabb1 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -393,8 +393,8 @@ const { queryParams: dataQueryParams, form: dataForm, rules: dataRules } = toRef const getTypeList = () => { typeLoading.value = true; listType(typeQueryParams.value).then((res) => { - typeList.value = res.rows; - typeTotal.value = res.total; + typeList.value = res.data?.rows; + typeTotal.value = res.data?.total; typeLoading.value = false; ensureCurrentType(); }); @@ -512,8 +512,8 @@ const getDataList = async () => { } dataLoading.value = true; const res = await listData(dataQueryParams.value); - dataList.value = res.rows; - dataTotal.value = res.total; + dataList.value = res.data?.rows; + dataTotal.value = res.data?.total; dataLoading.value = false; }; diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index c882604d..badbe9df 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -179,8 +179,8 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { loading.value = true; const res = await listNotice(queryParams.value); - noticeList.value = res.rows; - total.value = res.total; + noticeList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 取消按钮 */ diff --git a/src/views/system/oss/config.vue b/src/views/system/oss/config.vue index 73345d46..a30717b8 100644 --- a/src/views/system/oss/config.vue +++ b/src/views/system/oss/config.vue @@ -260,8 +260,8 @@ const protocol = computed(() => (form.value.isHttps === 'Y' ? 'https://' : 'http const getList = async () => { loading.value = true; const res = await listOssConfig(queryParams.value); - ossConfigList.value = res.rows; - total.value = res.total; + ossConfigList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 取消按钮 */ diff --git a/src/views/system/oss/index.vue b/src/views/system/oss/index.vue index 883280eb..0b7c32f6 100644 --- a/src/views/system/oss/index.vue +++ b/src/views/system/oss/index.vue @@ -198,8 +198,8 @@ const getList = async () => { const res = await proxy?.getConfigKey('sys.oss.previewListResource'); previewListResource.value = res?.data === undefined ? true : res.data === 'true'; const response = await listOss(proxy?.addDateRange(queryParams.value, dateRangeCreateTime.value, 'CreateTime')); - ossList.value = response.rows; - total.value = response.total; + ossList.value = response.data?.rows; + total.value = response.data?.total; loading.value = false; showTable.value = true; }; diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index b573cd28..7692e7af 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -274,8 +274,8 @@ const handleNodeClick = (data: DeptVO) => { const getList = async () => { loading.value = true; const res = await listPost(queryParams.value); - postList.value = res.rows; - total.value = res.total; + postList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; diff --git a/src/views/system/role/authUser.vue b/src/views/system/role/authUser.vue index db884de0..9ded35d8 100644 --- a/src/views/system/role/authUser.vue +++ b/src/views/system/role/authUser.vue @@ -101,8 +101,8 @@ const queryParams = reactive({ const getList = async () => { loading.value = true; const res = await allocatedUserList(queryParams); - userList.value = res.rows; - total.value = res.total; + userList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; // 返回按钮 diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 1c9357b8..1b3098d8 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -280,8 +280,8 @@ const dialog = reactive({ const getList = () => { loading.value = true; listRole(proxy?.addDateRange(queryParams.value, dateRange.value)).then((res) => { - roleList.value = res.rows; - total.value = res.total; + roleList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }); }; diff --git a/src/views/system/role/selectUser.vue b/src/views/system/role/selectUser.vue index e0d8dd49..5d266d1e 100644 --- a/src/views/system/role/selectUser.vue +++ b/src/views/system/role/selectUser.vue @@ -100,8 +100,8 @@ const handleSelectionChange = (selection: UserVO[]) => { /** 查询数据 */ const getList = async () => { const res = await unallocatedUserList(queryParams); - userList.value = res.rows; - total.value = res.total; + userList.value = res.data?.rows; + total.value = res.data?.total; }; /** 搜索按钮操作 */ const handleQuery = () => { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index ba9f138b..4d960868 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -455,8 +455,8 @@ const getList = async () => { loading.value = true; const res = await api.listUser(proxy?.addDateRange(queryParams.value, dateRange.value)); loading.value = false; - userList.value = res.rows; - total.value = res.total; + userList.value = res.data?.rows; + total.value = res.data?.total; }; /** 查询部门下拉树结构 */ diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue index 19be6a22..f1c45f4a 100644 --- a/src/views/system/user/profile/index.vue +++ b/src/views/system/user/profile/index.vue @@ -133,7 +133,7 @@ const getAuths = async () => { }; const getOnlines = async () => { const res = await getOnline(); - state.value.devices = res.rows; + state.value.devices = res.data?.rows; }; onMounted(() => { diff --git a/src/views/tool/gen/importTable.vue b/src/views/tool/gen/importTable.vue index f86a54fd..86f17be8 100644 --- a/src/views/tool/gen/importTable.vue +++ b/src/views/tool/gen/importTable.vue @@ -88,8 +88,8 @@ const handleSelectionChange = (selection: DbTableVO[]) => { /** 查询表数据 */ const getList = async () => { const res = await listDbTable(queryParams); - dbTableList.value = res.rows; - total.value = res.total; + dbTableList.value = res.data?.rows; + total.value = res.data?.total; }; /** 搜索按钮操作 */ const handleQuery = () => { diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue index dbe96bcb..8d60711e 100644 --- a/src/views/tool/gen/index.vue +++ b/src/views/tool/gen/index.vue @@ -170,8 +170,8 @@ const getDataNameList = async () => { const getList = async () => { loading.value = true; const res = await listTable(proxy?.addDateRange(queryParams.value, dateRange.value)); - tableList.value = res.rows; - total.value = res.total; + tableList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; /** 搜索按钮操作 */ diff --git a/src/views/workflow/leave/index.vue b/src/views/workflow/leave/index.vue index 15d73a0d..5d6d02d6 100644 --- a/src/views/workflow/leave/index.vue +++ b/src/views/workflow/leave/index.vue @@ -145,8 +145,8 @@ const { queryParams } = toRefs(data); const getList = async () => { loading.value = true; const res = await listLeave(queryParams.value); - leaveList.value = res.rows; - total.value = res.total; + leaveList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; }; diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index c511e4b9..639f6de9 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -354,16 +354,16 @@ const getPageList = async () => { const getList = async () => { loading.value = true; const resp = await listDefinition(queryParams.value); - processDefinitionList.value = resp.rows; - total.value = resp.total; + processDefinitionList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }; //查询未发布的流程定义列表 const getUnPublishList = async () => { loading.value = true; const resp = await unPublishList(queryParams.value); - processDefinitionList.value = resp.rows; - total.value = resp.total; + processDefinitionList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }; diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue index b9f62b77..a659d3b6 100644 --- a/src/views/workflow/processInstance/index.vue +++ b/src/views/workflow/processInstance/index.vue @@ -343,8 +343,8 @@ const handleSelectionChange = (selection: FlowInstanceVO[]) => { const getProcessInstanceRunningList = () => { loading.value = true; pageByRunning(queryParams.value).then((resp) => { - processInstanceList.value = resp.rows; - total.value = resp.total; + processInstanceList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; @@ -352,8 +352,8 @@ const getProcessInstanceRunningList = () => { const getProcessInstanceFinishList = () => { loading.value = true; pageByFinish(queryParams.value).then((resp) => { - processInstanceList.value = resp.rows; - total.value = resp.total; + processInstanceList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; diff --git a/src/views/workflow/spel/index.vue b/src/views/workflow/spel/index.vue index e96213b0..e3f88e60 100644 --- a/src/views/workflow/spel/index.vue +++ b/src/views/workflow/spel/index.vue @@ -209,8 +209,8 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { loading.value = true; const res = await listSpel(queryParams.value); - spelList.value = res.rows; - total.value = res.total; + spelList.value = res.data?.rows; + total.value = res.data?.total; loading.value = false; } diff --git a/src/views/workflow/task/allTaskWaiting.vue b/src/views/workflow/task/allTaskWaiting.vue index 5a14ca8b..b98f93be 100644 --- a/src/views/workflow/task/allTaskWaiting.vue +++ b/src/views/workflow/task/allTaskWaiting.vue @@ -212,16 +212,16 @@ const changeTab = async (data: TabsPaneContext) => { const getWaitingList = () => { loading.value = true; pageByAllTaskWait(queryParams.value).then((resp) => { - taskList.value = resp.rows; - total.value = resp.total; + taskList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; const getFinishList = () => { loading.value = true; pageByAllTaskFinish(queryParams.value).then((resp) => { - taskList.value = resp.rows; - total.value = resp.total; + taskList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; diff --git a/src/views/workflow/task/myDocument.vue b/src/views/workflow/task/myDocument.vue index bda2ccb7..d390c219 100644 --- a/src/views/workflow/task/myDocument.vue +++ b/src/views/workflow/task/myDocument.vue @@ -212,8 +212,8 @@ const handleSelectionChange = (selection: FlowInstanceVO[]) => { const getList = () => { loading.value = true; pageByCurrent(queryParams.value).then((resp) => { - processInstanceList.value = resp.rows; - total.value = resp.total; + processInstanceList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; diff --git a/src/views/workflow/task/taskCopyList.vue b/src/views/workflow/task/taskCopyList.vue index dbe356d1..97c6b5f9 100644 --- a/src/views/workflow/task/taskCopyList.vue +++ b/src/views/workflow/task/taskCopyList.vue @@ -122,8 +122,8 @@ const handleSelectionChange = (selection: any) => { const getTaskCopyList = () => { loading.value = true; pageByTaskCopy(queryParams.value).then((resp) => { - taskList.value = resp.rows; - total.value = resp.total; + taskList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; diff --git a/src/views/workflow/task/taskFinish.vue b/src/views/workflow/task/taskFinish.vue index 17e36fbf..b88f88ca 100644 --- a/src/views/workflow/task/taskFinish.vue +++ b/src/views/workflow/task/taskFinish.vue @@ -156,8 +156,8 @@ const handleSelectionChange = (selection: any) => { const getFinishList = () => { loading.value = true; pageByTaskFinish(queryParams.value).then((resp) => { - taskList.value = resp.rows; - total.value = resp.total; + taskList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); }; diff --git a/src/views/workflow/task/taskWaiting.vue b/src/views/workflow/task/taskWaiting.vue index aa818584..93fe1201 100644 --- a/src/views/workflow/task/taskWaiting.vue +++ b/src/views/workflow/task/taskWaiting.vue @@ -158,8 +158,8 @@ const handleSelectionChange = (selection: any) => { const getWaitingList = () => { loading.value = true; pageByTaskWait(queryParams.value).then((resp) => { - taskList.value = resp.rows; - total.value = resp.total; + taskList.value = resp.data?.rows; + total.value = resp.data?.total; loading.value = false; }); };