diff --git a/src/api/contractReview/ContractualTasks/index.ts b/src/api/contractReview/ContractualTasks/index.ts new file mode 100644 index 0000000..2407fd0 --- /dev/null +++ b/src/api/contractReview/ContractualTasks/index.ts @@ -0,0 +1,57 @@ +import { defHttp } from '@/utils/http/axios'; +import { ID, IDS, commonExport } from '@/api/base'; +import { ContractualTasksVO, ContractualTasksForm, ContractualTasksQuery } from './model'; + +/** + * 查询合同任务列表 + * @param params + * @returns + */ +export function ContractualTasksList(params?: ContractualTasksQuery) { + return defHttp.get({ url: '/productManagement/ContractualTasks/list', params }); +} + +/** + * 导出合同任务列表 + * @param params + * @returns + */ +export function ContractualTasksExport(params?: ContractualTasksQuery) { + return commonExport('/productManagement/ContractualTasks/export', params ?? {}); +} + +/** + * 查询合同任务详细 + * @param id id + * @returns + */ +export function ContractualTasksInfo(id: ID) { + return defHttp.get({ url: '/productManagement/ContractualTasks/' + id }); +} + +/** + * 新增合同任务 + * @param data + * @returns + */ +export function ContractualTasksAdd(data: ContractualTasksForm) { + return defHttp.postWithMsg({ url: '/productManagement/ContractualTasks', data }); +} + +/** + * 更新合同任务 + * @param data + * @returns + */ +export function ContractualTasksUpdate(data: ContractualTasksForm) { + return defHttp.putWithMsg({ url: '/productManagement/ContractualTasks', data }); +} + +/** + * 删除合同任务 + * @param id id + * @returns + */ +export function ContractualTasksRemove(id: ID | IDS) { + return defHttp.deleteWithMsg({ url: '/productManagement/ContractualTasks/' + id },); +} diff --git a/src/api/contractReview/ContractualTasks/model.ts b/src/api/contractReview/ContractualTasks/model.ts new file mode 100644 index 0000000..beee4fb --- /dev/null +++ b/src/api/contractReview/ContractualTasks/model.ts @@ -0,0 +1,115 @@ +import { BaseEntity, PageQuery } from '@/api/base'; + +export interface ContractualTasksVO { + /** + * + */ + id: string | number; + + /** + * 模型所属行业 + */ + taskIndustry: string; + + /** + * 模型所属区域 + */ + taskRegion: string; + + /** + * 合同任务名称 + */ + contractTaskName: string; + + /** + * + */ + documentName: string; + + /** + * + */ + ossId: string | number; + + /** + * + */ + progressStatus: string; + +} + +export interface ContractualTasksForm extends BaseEntity { + /** + * + */ + id?: string | number; + + /** + * 模型所属行业 + */ + taskIndustry?: string; + + /** + * 模型所属区域 + */ + taskRegion?: string; + + /** + * 合同任务名称 + */ + contractTaskName?: string; + + /** + * + */ + documentName?: string; + + /** + * + */ + ossId?: string | number; + + /** + * + */ + progressStatus?: string; + +} + +export interface ContractualTasksQuery extends PageQuery { + + /** + * 模型所属行业 + */ + taskIndustry?: string; + + /** + * 模型所属区域 + */ + taskRegion?: string; + + /** + * 合同任务名称 + */ + contractTaskName?: string; + + /** + * + */ + documentName?: string; + + /** + * + */ + ossId?: string | number; + + /** + * + */ + progressStatus?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts b/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts new file mode 100644 index 0000000..e24ff6b --- /dev/null +++ b/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts @@ -0,0 +1,162 @@ +import { BasicColumn } from '@/components/Table'; +import { FormSchema } from '@/components/Form'; +import { getDictOptions } from '@/utils/dict'; +import { useRender } from '@/hooks/component/useRender'; +import { uploadDocument } from '@/api/documentReview/DocumentTasks'; +import { useUserStore } from '@/store/modules/user'; +import { RoleEnum } from '@/enums/roleEnum'; + +const { roleList } = useUserStore(); +export const formSchemas: FormSchema[] = [ + // { + // label: '模型所属行业', + // field: 'taskIndustry', + // component: 'Select', + // componentProps: { + // options: getDictOptions('model_industry') + // }, + // }, + // { + // label: '模型所属区域', + // field: 'taskRegion', + // component: 'Select', + // componentProps: { + // options: getDictOptions('model_region') + // }, + // }, + { + label: '任务名称', + field: 'taskNameList', + component: 'Select', + componentProps: { + options: [ + { + label: '合同审核', + value: 'contractReview', + }, + ], + mode: 'multiple', + }, + }, + { + label: '文档名称', + field: 'documentName', + component: 'Input', + }, + { + label: '状态', + field: 'progressStatus', + component: 'Select', + componentProps: { + options: getDictOptions('document_task_status'), + }, + }, +]; + +const { renderDict } = useRender(); +export const columns: BasicColumn[] = [ + { + title: '任务名称', + dataIndex: 'taskName', + customRender: ({ value }) => { + if(value === 'contractReview'){ + return '合同审核' + } + }, + }, + { + title: '文档名称', + dataIndex: 'documentName', + }, + { + title: '模型所属区域', + dataIndex: 'taskRegion', + customRender: ({ value }) => renderDict(value, 'model_region'), + }, + { + title: '模型所属行业', + dataIndex: 'taskIndustry', + customRender: ({ value }) => renderDict(value, 'model_industry'), + }, + { + title: '上传时间', + dataIndex: 'createTime', + }, + { + title: '提交人', + dataIndex: 'createUser', + auth: 'documentReview:DocumentTasks:tableShow', + }, + { + title: '任务耗时', + dataIndex: 'taskDuration', + }, + { + title: '状态', + dataIndex: 'progressStatus', + customRender: ({ value }) => renderDict(value, 'document_task_status'), + }, +]; + +export const modalSchemas: FormSchema[] = [ + { + label: '模型所属区域', + field: 'taskRegion', + required: true, + component: 'Select', + // componentProps: { + // options: taskRegionPermission(), + // defaultValue:"normal", + // }, + componentProps: () => { + const isSuperAdmin = roleList.includes(RoleEnum.SUPER_ADMIN); + let options = getDictOptions('model_region'); + if (!isSuperAdmin) { + // 如果不是超级管理员,移除 label 带有 '#' 的项 + options = options.filter((option) => !option.label.includes('#')); + } + return { + options: options, + defaultValue: 'normal', + }; + }, + }, + { + label: '模型所属行业', + field: 'taskIndustry', + required: true, + component: 'Select', + componentProps: { + options: getDictOptions('model_industry'), + defaultValue: 'normal', + }, + }, + { + label: '任务名称', + field: 'taskNameList', + required: true, + component: 'Select', + componentProps: { + options: [ + { + label: '合同审核', + value: 'contractReview', + }, + ], + mode: 'multiple', + }, + }, + { + label: '文档名称', + field: 'ossId', + required: true, + component: 'Upload', + componentProps: { + accept: ['.docx', '.doc', '.wps'], + maxSize: 500, + multiple: false, + resultField: 'ossId', + api: uploadDocument, + }, + }, +]; diff --git a/src/views/contractReview/ContractualTasks/ContractualTasksModal.vue b/src/views/contractReview/ContractualTasks/ContractualTasksModal.vue new file mode 100644 index 0000000..81f62ed --- /dev/null +++ b/src/views/contractReview/ContractualTasks/ContractualTasksModal.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/src/views/contractReview/ContractualTasks/index.vue b/src/views/contractReview/ContractualTasks/index.vue new file mode 100644 index 0000000..5717530 --- /dev/null +++ b/src/views/contractReview/ContractualTasks/index.vue @@ -0,0 +1,165 @@ + + + + +