|
|
|
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: getDictOptions('contract_review'),
|
|
|
|
mode: 'multiple',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '文档名称',
|
|
|
|
field: 'documentName',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '审查类型',
|
|
|
|
field: 'reviewTypes',
|
|
|
|
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 }) => renderDict(value, 'contract_review'),
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '文档名称',
|
|
|
|
dataIndex: 'documentName',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '审查类型',
|
|
|
|
dataIndex: 'reviewTypes',
|
|
|
|
customRender: ({ value }) => {
|
|
|
|
if (!value) return '-';
|
|
|
|
// 将逗号分隔的字符串转换为更友好的显示格式
|
|
|
|
const types = value.split(',').map((type: string) => {
|
|
|
|
switch (type.trim()) {
|
|
|
|
case 'substantive':
|
|
|
|
return '实质性审查';
|
|
|
|
case 'compliance':
|
|
|
|
return '合规性审查';
|
|
|
|
case 'consistency':
|
|
|
|
return '一致性审查';
|
|
|
|
default:
|
|
|
|
return type.trim();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return types.join('、');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '审查立场',
|
|
|
|
dataIndex: 'contractPartyRole',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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: 'contractPartyRole',
|
|
|
|
required: true,
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('contract_party_role'),
|
|
|
|
defaultValue: '甲方',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '任务名称',
|
|
|
|
field: 'taskNameList',
|
|
|
|
required: true,
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options:getDictOptions('contract_review'),
|
|
|
|
mode: 'multiple',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '文档名称',
|
|
|
|
field: 'ossId',
|
|
|
|
required: true,
|
|
|
|
component: 'Upload',
|
|
|
|
componentProps: {
|
|
|
|
accept: ['.docx', '.doc', '.wps'],
|
|
|
|
maxSize: 500,
|
|
|
|
multiple: false,
|
|
|
|
resultField: 'ossId',
|
|
|
|
api: uploadDocument,
|
|
|
|
beforeUploadPrompt:"严禁在本互联网非涉密平台处理、传输国家秘密。请再次确认您上传的文件资料不涉及国家秘密。"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|