You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocr-web/src/api/dictionary/index.ts

394 lines
7.6 KiB

import { http } from '@/utils/http/axios'
import type { BusinessParam, PageParam } from '/#/api'
/**
* 获取地区列表
* @param params
* @returns
*/
export async function getRegionList(params: PageParam = { pageNo: 1, pageSize: 10 }): Promise<any> {
const res = await http.request({
url: `/ocr/ocrarea/listall`,
method: 'get',
params,
})
const { data } = res
return data
}
/**
* 获取图片类型列表
* @returns
*/
export async function getPictureTypeList(): Promise<any> {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/izpicturetype`,
method: 'get',
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取提报人列表
* @param params
* @returns
*/
export async function getPersonList(params: PageParam = { pageNo: 1, pageSize: 10 }) {
const res = await http.request({
url: `/ocr/ocrUpuser/listall`,
method: 'get',
params,
})
const { data } = res
return data
}
/**
* 获取计划列表
* @param params
* @returns
*/
export async function getPlanList(params: PageParam = { pageNo: 1, pageSize: 10 }) {
const res = await http.request({
url: `/ocr/ocrPlan/listall`,
method: 'get',
params,
})
const { data } = res
return data
}
/**
* 获取图片真假原因字典
* @returns
*/
export async function getTFList() {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/imagetrueorfalse`,
method: 'get',
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取分类列表
* @returns
*/
export async function getIzShowList(): Promise<any> {
const res = await http.request({
url: `/ocr/ocrPictureclass/rootList`,
method: 'get',
})
const { data } = res
return data
}
/**
* 获取izsearch列表
* @returns
*/
export async function getIzSearchList(): Promise<any> {
const res = await http.request({
url: `/ocr/ocrPictureclass/todo`,
method: 'get',
})
const { data } = res
return data
}
/**
* 获取izsearchmanager列表
* @returns
*/
export async function getIzsSearchManager(): Promise<any> {
const res = await http.request({
url: `/ocr/ocrPictureclass/todo`,
method: 'get',
})
const { data } = res
return data
}
/**
* 获取项目列表
* @returns
*/
export async function getIzProjectList(): Promise<any> {
const res = await http.request({
url: `/backstage/oa/category/listall`,
method: 'get',
})
const { data } = res
return data
}
/**
* 获取任务来源
* @param enabled
* @returns
*/
export async function getIztaskrromList(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZTASKRROM`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取任务状态
* @param enabled
* @returns
*/
export async function getIztaskstatusList(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZTASKSTATUS`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取省份
* @returns
*/
export async function getIzvisitproList(): Promise<any> {
const res = await http.request({
url: `/backstage/ocrnewtest/ocrprovince/listall`,
method: 'get',
})
const { data } = res
return data
}
/**
* 获取厂商
* @param enabled
* @returns
*/
export async function getIzfirmList(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZFIRM`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取产品名称
* @param enabled
* @returns
*/
export async function getIzproductnameList(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZPRODUCTNAME`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取客户名称
* @param enabled
* @returns
*/
export async function getizcustomnameList(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZCUSTOMNAME`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取izcustomtype列表
* @returns
*/
export async function getIzCustomtypeList(): Promise<any> {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZCUSTOMTYPE`,
method: 'get',
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取客户级别
* @param enabled
* @returns
*/
export async function getIzcustomlevel(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZCUSTOMLEVEL`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取项目类别
* @param enabled
* @returns
*/
export async function getIzprojecttypeList(enabled: string) {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/IZPROJECTTYPE`,
method: 'get',
params: { enabled },
})
const list = res.data[0].distionaryList
return list
}
/**
* 获取发布地区
* @param enabled
* @returns
*/
export async function getIzvisitcityList() {
const res = await http.request({
url: `/ocr/ocrarea/listall`,
method: 'get',
})
const { data } = res
return data
}
/**
* 获取审批不通过原因
* @returns
*/
export async function getRejectList() {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/TASKREJECT`,
method: 'get',
})
const list = res.data[0].distionaryList
return list
}
/**
* 审批回退方式
* @returns
*/
export async function getBackList() {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/ACTIONTYPE`,
method: 'get',
})
return res.data[0].distionaryList
}
/**
* 业务字典查询接口
* @returns
*/
export async function getBusinessList(field: string, page: PageParam = { pageNo: 1, pageSize: 200 }) {
const res = await http.request({
url: `/ocr/dictionary/getDictionaryByField`,
method: 'get',
params: { ...page, field },
})
const { otherMessage: { records } } = res
return records.map((record) => {
return {
label: record.lable || 'todo',
value: record.value || 'todo',
}
})
}
/**
* 业务字典查询接口
* @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
}
/**
* 获取审核状态字典(任务审核)
* @returns
*/
export async function getizApprovalStatusList() {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`,
method: 'get',
})
return res.data[0].distionaryList
}