diff --git a/src/api/dictionary/index.ts b/src/api/dictionary/index.ts index 73fae5e..a97ca0c 100644 --- a/src/api/dictionary/index.ts +++ b/src/api/dictionary/index.ts @@ -335,3 +335,49 @@ export async function getBusinessList(field: string, page: PageParam = { pageNo: } }) } + +/** + * 业务字典查询接口 + * @returns + */ +export async function getSystemList(code: string) { + const res = await http.request({ + url: `/static/admin/web/distionary/bytypecode`, + method: 'get', + params: { code }, + }) + + const { otherMessage: { records } } = res + return records.map((record) => { + return { + label: record.lable || 'todo', + value: record.value || 'todo', + } + }) +} + +/** + * 获取筛选关系字典 + * @returns + */ +export async function getRelationTypeList() { + const res = await http.request({ + url: `/static/admin/web/distionary/bytypecode/searchRelationType`, + method: 'get', + }) + + return res.data[0].distionaryList +} + +/** + * 获取审核状态字典 + * @returns + */ +export async function getizstatusList() { + const res = await http.request({ + url: `/static/admin/web/distionary/bytypecode/izstatus`, + method: 'get', + }) + + return res.data[0].distionaryList +} diff --git a/src/api/home/filter.ts b/src/api/home/filter.ts index 6d072c0..b9c0371 100644 --- a/src/api/home/filter.ts +++ b/src/api/home/filter.ts @@ -6,13 +6,14 @@ import type { FilterCondition, FilterParam, FilterSearchParam, FilterUpdate, Pag * @param params * @returns 1 */ -export async function getConditionList(params: PageParam, searchParam: FilterSearchParam): Promise { +export async function getConditionList(page: PageParam, searchParam: FilterSearchParam, type: number): Promise { const res = await http.request({ url: `/ocr/ocrUsersearch/list?`, method: 'get', params: { - ...params, + ...page, search_searchname: JSON.stringify(searchParam.search_searchname), + type, }, }) diff --git a/src/api/task/task.ts b/src/api/task/task.ts index 1d711d0..1be74e1 100644 --- a/src/api/task/task.ts +++ b/src/api/task/task.ts @@ -7,11 +7,11 @@ import { ContentTypeEnum } from '@/enums/httpEnum' * 获取审核列表 * @returns */ -export async function getApprovalList(params: PageParam, assigneeId: string) { +export async function getApprovalList(page: PageParam, assigneeId: string) { const res = await http.request({ - url: `/flow/task/listdata`, + url: `/flow/task/listalldata`, method: 'get', - params: { ...params, assigneeId }, + params: { pageSize: page.pageSize, currPage: page.pageNo, assigneeId }, }) const { data: { list, totalPage } } = res diff --git a/src/store/modules/dictonary.ts b/src/store/modules/dictonary.ts index 4a9a30d..ac5b6af 100644 --- a/src/store/modules/dictonary.ts +++ b/src/store/modules/dictonary.ts @@ -1,6 +1,6 @@ import { defineStore } from 'pinia' import { store } from '@/store' -import { getBackList, getBusinessList, getIzShowList, getPictureTypeList, getRegionList, getRejectList, getTFList } from '@/api/dictionary' +import { getBackList, getBusinessList, getIzShowList, getIztaskstatusList, getPictureTypeList, getRegionList, getRejectList, getRelationTypeList, getTFList, getizstatusList } from '@/api/dictionary' export interface DictionaryState { regionList: any @@ -22,6 +22,8 @@ export interface DictionaryState { izvisitcityList: any rejectList: any backList: any + relationTypeList: any + izstatusList: any } export const useDictionaryStore = defineStore({ @@ -46,6 +48,8 @@ export const useDictionaryStore = defineStore({ izvisitcityList: null, rejectList: null, backList: null, + relationTypeList: null, + izstatusList: null, }), getters: { getRegionList: (state) => { @@ -200,16 +204,30 @@ export const useDictionaryStore = defineStore({ this.izvisitcityList = list return this.izvisitcityList }, + // 拒绝原因 async fetchRejectList() { const list = await getRejectList() this.rejectList = generateOptions(list) return this.rejectList }, + // 退回方式 async fetchBackList() { const list = await getBackList() this.backList = generateOptions(list) return this.backList }, + // 退回方式 + async fetchRelationTypeList() { + const list = await getRelationTypeList() + this.relationTypeList = generateOptions2(list, 'content', 'name') + return this.relationTypeList + }, + // 审核状态 + async fetchizstatusListt() { + const list = await getizstatusList() + this.izstatusList = generateOptions2(list, 'codeno', 'name') + return this.backList + }, }, }) @@ -219,25 +237,25 @@ export function useDictionary() { } // label和value都是name,不用id -function generateOptions(list: any[], idkey: string = 'id', namekey: string = 'name') { +function generateOptions(list: any[], valueKey: string = 'id', labelKey: string = 'name') { const items = list || [] return items.map((item) => { return { - label: item[namekey] || 'todo', - value: item[namekey] || 'todo', + label: item[labelKey] || 'todo', + value: item[labelKey] || 'todo', } }) } // label是name,value是id -function generateOptions2(list: any[], idkey: string = 'id', namekey: string = 'name') { +function generateOptions2(list: any[], valueKey: string = 'id', labelKey: string = 'name') { const items = list || [] return items.map((item) => { return { - label: item[namekey] || 'todo', - value: item[idkey] || 'todo', + label: item[labelKey] || 'todo', + value: item[valueKey] || 'todo', } }) } diff --git a/src/views/home/aside/comp/AdvanceFilter.vue b/src/views/home/aside/comp/AdvanceFilter.vue index 3adf9cd..9f10cb5 100644 --- a/src/views/home/aside/comp/AdvanceFilter.vue +++ b/src/views/home/aside/comp/AdvanceFilter.vue @@ -78,7 +78,7 @@ async function featchList() { loading = true try { const searchParam: FilterSearchParam = { search_searchname: { value: keyword.value, op: 'like', type: 'string' } } - const result = await getConditionList(pagination, searchParam) + const result = await getConditionList(pagination, searchParam, 0) const { data } = result // pagination.pageNo += 1 // canloadMore = pageCount >= pagination.pageNo diff --git a/src/views/home/aside/comp/modals/FilterModal.vue b/src/views/home/aside/comp/modals/FilterModal.vue index 7909d87..7be82d9 100644 --- a/src/views/home/aside/comp/modals/FilterModal.vue +++ b/src/views/home/aside/comp/modals/FilterModal.vue @@ -88,7 +88,7 @@ const keyword = ref('') async function query(page: number, pageSize: number) { const searchParam: FilterSearchParam = { search_searchname: { value: keyword.value, op: 'like', type: 'string' } } - const result = await getConditionList({ pageNo: page, pageSize }, searchParam) + const result = await getConditionList({ pageNo: page, pageSize }, searchParam, 0) const { data, pageCount } = result tableData.value = data pagination.page = page diff --git a/src/views/home/aside/comp/modals/NewFilterModal.vue b/src/views/home/aside/comp/modals/NewFilterModal.vue index f0944e0..46940ff 100644 --- a/src/views/home/aside/comp/modals/NewFilterModal.vue +++ b/src/views/home/aside/comp/modals/NewFilterModal.vue @@ -1,6 +1,6 @@