diff --git a/package.json b/package.json index b90cb17..e464e54 100644 --- a/package.json +++ b/package.json @@ -186,8 +186,8 @@ "md-editor-v3": "^4.9.0", "markdown-it": "^13.0.2", "markdown-it-anchor": "^8.6.7", - "markdown-it-toc-done-right": "^4.2.0" - + "markdown-it-toc-done-right": "^4.2.0", + "@vue-office/pdf": "^2.0.10" }, "engines": { "node": ">=18.12.0", diff --git a/src/api/contractReview/ContractualInfo/index.ts b/src/api/contractReview/ContractualInfo/index.ts new file mode 100644 index 0000000..564556a --- /dev/null +++ b/src/api/contractReview/ContractualInfo/index.ts @@ -0,0 +1,57 @@ +import { defHttp } from '@/utils/http/axios'; +import { ID, IDS, commonExport } from '@/api/base'; +import { ContractualInfoVO, ContractualInfoForm, ContractualInfoQuery } from './model'; + +/** + * 查询合同信息保存列表 + * @param params + * @returns + */ +export function ContractualInfoList(params?: ContractualInfoQuery) { + return defHttp.get({ url: '/productManagement/ContractualInfo/list', params }); +} + +/** + * 导出合同信息保存列表 + * @param params + * @returns + */ +export function ContractualInfoExport(params?: ContractualInfoQuery) { + return commonExport('/productManagement/ContractualInfo/export', params ?? {}); +} + +/** + * 查询合同信息保存详细 + * @param id id + * @returns + */ +export function ContractualInfoInfo(id: ID) { + return defHttp.get({ url: '/productManagement/ContractualInfo/' + id }); +} + +/** + * 新增合同信息保存 + * @param data + * @returns + */ +export function ContractualInfoAdd(data: ContractualInfoForm) { + return defHttp.postWithMsg({ url: '/productManagement/ContractualInfo', data }); +} + +/** + * 更新合同信息保存 + * @param data + * @returns + */ +export function ContractualInfoUpdate(data: ContractualInfoForm) { + return defHttp.putWithMsg({ url: '/productManagement/ContractualInfo', data }); +} + +/** + * 删除合同信息保存 + * @param id id + * @returns + */ +export function ContractualInfoRemove(id: ID | IDS) { + return defHttp.deleteWithMsg({ url: '/productManagement/ContractualInfo/' + id },); +} diff --git a/src/api/contractReview/ContractualInfo/model.ts b/src/api/contractReview/ContractualInfo/model.ts new file mode 100644 index 0000000..2dc5370 --- /dev/null +++ b/src/api/contractReview/ContractualInfo/model.ts @@ -0,0 +1,90 @@ +import { BaseEntity, PageQuery } from '@/api/base'; + +export interface ContractualInfoVO { + /** + * 合同名称 + */ + fileName: string; + + /** + * 采购人名称 + */ + purchaserName: string; + + /** + * 供应商名称或姓名 + */ + supplierName: string; + + /** + * 合同签订时间 + */ + signDate: string; + + /** + * 合同金额 + */ + contractAmount: string; + +} + +export interface ContractualInfoForm extends BaseEntity { + /** + * 合同名称 + */ + fileName?: string; + + /** + * 采购人名称 + */ + purchaserName?: string; + + /** + * 供应商名称或姓名 + */ + supplierName?: string; + + /** + * 合同签订时间 + */ + signDate?: string; + + /** + * 合同金额 + */ + contractAmount?: string; + +} + +export interface ContractualInfoQuery extends PageQuery { + + /** + * 合同名称 + */ + fileName?: string; + + /** + * 采购人名称 + */ + purchaserName?: string; + + /** + * 供应商名称或姓名 + */ + supplierName?: string; + + /** + * 合同签订时间 + */ + signDate?: string; + + /** + * 合同金额 + */ + contractAmount?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/contractReview/JyjcontractualTaskBatch/index.ts b/src/api/contractReview/JyjcontractualTaskBatch/index.ts new file mode 100644 index 0000000..fbd7aaf --- /dev/null +++ b/src/api/contractReview/JyjcontractualTaskBatch/index.ts @@ -0,0 +1,103 @@ +import { defHttp } from '@/utils/http/axios'; +import { ID, IDS, commonExport } from '@/api/base'; +import { JyjcontractualTaskBatchVO, JyjcontractualTaskBatchForm, JyjcontractualTaskBatchQuery } from './model'; + +/** + * 查询合同批处理记录列表 + * @param params + * @returns + */ +export function JyjcontractualTaskBatchList(params?: JyjcontractualTaskBatchQuery) { + return defHttp.get({ url: '/productManagement/JyjcontractualTaskBatch/list', params }); +} + +/** + * 导出合同批处理记录列表 + * @param params + * @returns + */ +export function JyjcontractualTaskBatchExport(params?: JyjcontractualTaskBatchQuery) { + return commonExport('/productManagement/JyjcontractualTaskBatch/export', params ?? {}); +} + +/** + * 查询合同批处理记录详细 + * @param id id + * @returns + */ +export function JyjcontractualTaskBatchInfo(id: ID) { + return defHttp.get({ url: '/productManagement/JyjcontractualTaskBatch/' + id }); +} + +/** + * 新增合同批处理记录 + * @param data + * @returns + */ +export function JyjcontractualTaskBatchAdd(data: JyjcontractualTaskBatchForm) { + return defHttp.postWithMsg({ url: '/productManagement/JyjcontractualTaskBatch', data ,timeout:1000 * 60 * 10}); +} + +/** + * 更新合同批处理记录 + * @param data + * @returns + */ +export function JyjcontractualTaskBatchUpdate(data: JyjcontractualTaskBatchForm) { + return defHttp.putWithMsg({ url: '/productManagement/JyjcontractualTaskBatch', data }); +} + +/** + * 删除合同批处理记录 + * @param id id + * @returns + */ +export function JyjcontractualTaskBatchRemove(id: ID | IDS) { + return defHttp.deleteWithMsg({ url: '/productManagement/JyjcontractualTaskBatch/' + id },); +} + +import { UploadFileParams } from '#/axios'; +import { AxiosProgressEvent } from 'axios'; + +/** + * @description: Upload interface + */ +export function uploadContractual( + params: UploadFileParams, + onUploadProgress?: (progressEvent: AxiosProgressEvent) => void, +) { + return defHttp.uploadFile( + { + // 固定url地址 + url: '/productManagement/JyjcontractualTaskBatch/back/upload', + onUploadProgress, + timeout: 1000 * 60 * 10, + }, + params, + ); +} +/** + * 根据id获取合同的审查结果 + * @param id id + * @returns + */ +export function getContractualResultById(id: ID) { + return defHttp.get({ url: '/productManagement/JyjcontractualTaskBatch/getContractulResultById/' + id }); +} +/** + * 获取PDF文件流 + * @param fileName - PDF文件名 + * @returns Blob 数据 + */ +export function getPdfFile(id:Number) { + return defHttp.get( + { + url: `/productManagement/JyjcontractualTaskBatch/getContractulPdf/${id}`, + responseType: 'blob', + headers: { + Accept: 'application/pdf', + } + }, + { isReturnNativeResponse: true } + ); +} \ No newline at end of file diff --git a/src/api/contractReview/JyjcontractualTaskBatch/model.ts b/src/api/contractReview/JyjcontractualTaskBatch/model.ts new file mode 100644 index 0000000..81fe026 --- /dev/null +++ b/src/api/contractReview/JyjcontractualTaskBatch/model.ts @@ -0,0 +1,160 @@ +import { BaseEntity, PageQuery } from '@/api/base'; + +export interface JyjcontractualTaskBatchVO { + /** + * 任务名称 + */ + taskName: string; + + /** + * 任务类型 + */ + taskType: string; + + /** + * 文档名称 + */ + documentName: string; + + /** + * OSS文件ID + */ + ossId: string | number; + + /** + * 进度状态 + */ + progressStatus: string; + + /** + * 列队任务id + */ + groupId: string | number; + + /** + * 合同总数 + */ + totalContracts: number; + + /** + * 已审批总数 + */ + approvedCount: number; + + /** + * 审核通过数量 + */ + passCount: number; + + /** + * 审核不通过数量 + */ + rejectCount: number; + + /** + * 非审查范围数量 + */ + irrelevantCount: number; + + /** + * 进度(百分比) + */ + progress: number; + +} + +export interface JyjcontractualTaskBatchForm extends BaseEntity { + /** + * 任务名称 + */ + taskName?: string; + + /** + * 任务类型 + */ + taskType?: string; + + /** + * 文档名称 + */ + documentName?: string; + + /** + * OSS文件ID + */ + ossId?: string | number; + + /** + * 进度状态 + */ + progressStatus?: string; + +} + +export interface JyjcontractualTaskBatchQuery extends PageQuery { + + /** + * 任务名称 + */ + taskName?: string; + + /** + * 任务类型 + */ + taskType?: string; + + /** + * 文档名称 + */ + documentName?: string; + + /** + * OSS文件ID + */ + ossId?: string | number; + + /** + * 进度状态 + */ + progressStatus?: string; + + /** + * 列队任务id + */ + groupId?: string | number; + + /** + * 合同总数 + */ + totalContracts?: number; + + /** + * 已审批总数 + */ + approvedCount?: number; + + /** + * 审核通过数量 + */ + passCount?: number; + + /** + * 审核不通过数量 + */ + rejectCount?: number; + + /** + * 非审查范围数量 + */ + irrelevantCount?: number; + + /** + * 进度(百分比) + */ + progress?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/components/Upload/src/components/UploadModal.vue b/src/components/Upload/src/components/UploadModal.vue index 2e7b7fe..d0522e3 100644 --- a/src/components/Upload/src/components/UploadModal.vue +++ b/src/components/Upload/src/components/UploadModal.vue @@ -139,8 +139,11 @@ await new Promise((resolve, reject) => { Modal.confirm({ title: '提醒', - content: ( - createVNode('div', { style: 'color:red;font-weight: bold;font-size: 22px' }, beforeUploadPrompt) ), + content: createVNode( + 'div', + { style: 'color:red;font-weight: bold;font-size: 22px' }, + beforeUploadPrompt, + ), onOk() { resolve(true); }, @@ -232,6 +235,21 @@ url: get(ret, props.resultField), }; } + console.log(ret.validFileCount); + console.log(ret.invalidFileCount); + console.log(ret.invalidFileNames); + await new Promise((resolve, reject) => { + Modal.confirm({ + title: '提醒', + content: `符合文件格式要求的文件数量:${ret.validFileCount}\n不符合文件格式要求的文件数量:${ret.invalidFileCount}\n不符合要求的文件名称:${ret.invalidFileNames}`, + onOk() { + resolve(true); + }, + onCancel() { + reject(false); + }, + }); + }); return { success: true, error: null, diff --git a/src/enums/pageEnum.ts b/src/enums/pageEnum.ts index 41725be..a13600f 100644 --- a/src/enums/pageEnum.ts +++ b/src/enums/pageEnum.ts @@ -2,7 +2,7 @@ export enum PageEnum { // basic login path BASE_LOGIN = '/login', // 默认/dashboard 在登录时会带上redirect 然后死循环 原因未知 暂时写死地址 - BASE_HOME = '/workbench', + BASE_HOME = '/contractReview/JyjcontractualTaskBatch', // error page path ERROR_PAGE = '/exception', // error log page path diff --git a/src/views/CanvasEditor/style.css b/src/views/CanvasEditor/style.css index 25f9077..2a2fa26 100644 --- a/src/views/CanvasEditor/style.css +++ b/src/views/CanvasEditor/style.css @@ -876,6 +876,7 @@ ul { line-height: 22px; } +/* 修改后的 footer 样式 */ .footer { width: 100%; height: 30px; @@ -884,7 +885,7 @@ ul { justify-content: space-between; background: #f2f4f7; z-index: 9; - position: fixed; + position: absolute; /* 改为 absolute 而不是 fixed */ bottom: 0; left: 0; font-size: 12px; diff --git a/src/views/contractReview/ContractualInfo/ContractualInfo.data.ts b/src/views/contractReview/ContractualInfo/ContractualInfo.data.ts new file mode 100644 index 0000000..6d93be0 --- /dev/null +++ b/src/views/contractReview/ContractualInfo/ContractualInfo.data.ts @@ -0,0 +1,85 @@ +import { BasicColumn } from '@/components/Table'; +import { FormSchema } from '@/components/Form'; +export const formSchemas: FormSchema[] = [ + { + label: '合同名称', + field: 'fileName', + component: 'Input', + }, + { + label: '采购人名称', + field: 'purchaserName', + component: 'Input', + }, + { + label: '供应商名称或姓名', + field: 'supplierName', + component: 'Input', + }, + { + label: '合同签订时间', + field: 'signDate', + component: 'Input', + }, + { + label: '合同金额', + field: 'contractAmount', + component: 'Input', + }, +]; + +export const columns: BasicColumn[] = [ + { + title: '合同名称', + dataIndex: 'fileName', + }, + { + title: '采购人名称', + dataIndex: 'purchaserName', + }, + { + title: '供应商名称或姓名', + dataIndex: 'supplierName', + }, + { + title: '合同签订时间', + dataIndex: 'signDate', + }, + { + title: '合同金额', + dataIndex: 'contractAmount', + }, +]; + +export const modalSchemas: FormSchema[] = [ + { + label: '合同名称', + field: 'fileName', + required: true, + component: 'Input', + }, + { + label: '采购人名称', + field: 'purchaserName', + required: true, + component: 'Input', + }, + { + label: '供应商名称或姓名', + field: 'supplierName', + required: true, + component: 'Input', + }, + { + label: '合同签订时间', + field: 'signDate', + required: true, + component: 'Input', + }, + { + label: '合同金额', + field: 'contractAmount', + required: true, + component: 'Input', + }, +]; diff --git a/src/views/contractReview/ContractualInfo/ContractualInfoModal.vue b/src/views/contractReview/ContractualInfo/ContractualInfoModal.vue new file mode 100644 index 0000000..ef085be --- /dev/null +++ b/src/views/contractReview/ContractualInfo/ContractualInfoModal.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/views/contractReview/ContractualInfo/index.vue b/src/views/contractReview/ContractualInfo/index.vue new file mode 100644 index 0000000..bc7c2ce --- /dev/null +++ b/src/views/contractReview/ContractualInfo/index.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/views/contractReview/ContractualTasks/ContractualShowModal.vue b/src/views/contractReview/ContractualTasks/ContractualShowModal.vue new file mode 100644 index 0000000..fdcf3d5 --- /dev/null +++ b/src/views/contractReview/ContractualTasks/ContractualShowModal.vue @@ -0,0 +1,264 @@ + + + diff --git a/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts b/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts index f40b82c..b1429ad 100644 --- a/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts +++ b/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts @@ -4,35 +4,7 @@ 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', @@ -46,37 +18,38 @@ export const formSchemas: FormSchema[] = [ options: getDictOptions('document_task_status'), }, }, + { + label: '审核结果', + field: 'resultType', + component: 'Input', + }, + { + label: '批次名称', + field: 'batchName', + component: 'Input', + },{ + label: '批次ID', + field: 'groupId', + component: 'Input', + show:false + } ]; const { renderDict } = useRender(); export const columns: BasicColumn[] = [ - { - title: '任务名称', - dataIndex: 'taskName', - customRender: ({ value }) => renderDict(value, 'contract_review'), - - }, { title: '文档名称', dataIndex: 'documentName', }, - { - title: '模型所属区域', - dataIndex: 'taskRegion', - customRender: ({ value }) => renderDict(value, 'model_region'), - }, - { - title: '模型所属行业', - dataIndex: 'taskIndustry', - customRender: ({ value }) => renderDict(value, 'model_industry'), - }, - { - title: '审查立场', - dataIndex: 'contractPartyRole', + { + title: '批次名称', + dataIndex: 'batchName', }, { - title: '上传时间', - dataIndex: 'createTime', + title: '任务名称', + dataIndex: 'taskName', + customRender: ({ value }) => renderDict(value, 'contract_review'), + }, { title: '提交人', @@ -84,8 +57,8 @@ export const columns: BasicColumn[] = [ auth: 'documentReview:DocumentTasks:tableShow', }, { - title: '任务耗时', - dataIndex: 'taskDuration', + title: '审核结果', + dataIndex: 'resultType', }, { title: '状态', @@ -95,57 +68,17 @@ export const columns: BasicColumn[] = [ ]; 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: 'contractPartyRole', - required: true, - component: 'Select', - componentProps: { - options: getDictOptions('contract_party_role'), - defaultValue: '甲方', - }, - }, { label: '任务名称', field: 'taskNameList', - required: true, + required: false, + dynamicDisabled:true, component: 'Select', componentProps: { options:getDictOptions('contract_review'), - mode: 'multiple', }, + defaultValue:"contractualReview" + }, { label: '文档名称', diff --git a/src/views/contractReview/ContractualTasks/ContractualTasksTable.vue b/src/views/contractReview/ContractualTasks/ContractualTasksTable.vue new file mode 100644 index 0000000..e79b5c9 --- /dev/null +++ b/src/views/contractReview/ContractualTasks/ContractualTasksTable.vue @@ -0,0 +1,208 @@ + + + + + diff --git a/src/views/contractReview/ContractualTasks/PdfViewer.vue b/src/views/contractReview/ContractualTasks/PdfViewer.vue new file mode 100644 index 0000000..05a8f6b --- /dev/null +++ b/src/views/contractReview/ContractualTasks/PdfViewer.vue @@ -0,0 +1,127 @@ + + + + + \ No newline at end of file diff --git a/src/views/contractReview/ContractualTasks/index.vue b/src/views/contractReview/ContractualTasks/index.vue index 2bb9c44..32f057d 100644 --- a/src/views/contractReview/ContractualTasks/index.vue +++ b/src/views/contractReview/ContractualTasks/index.vue @@ -1,120 +1,26 @@ + diff --git a/src/views/contractReview/JyjcontractualTaskBatch/ContractualTasksTableModal.vue b/src/views/contractReview/JyjcontractualTaskBatch/ContractualTasksTableModal.vue new file mode 100644 index 0000000..1b8e1da --- /dev/null +++ b/src/views/contractReview/JyjcontractualTaskBatch/ContractualTasksTableModal.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/contractReview/JyjcontractualTaskBatch/JyjcontractualTaskBatch.data.ts b/src/views/contractReview/JyjcontractualTaskBatch/JyjcontractualTaskBatch.data.ts new file mode 100644 index 0000000..26f1bf6 --- /dev/null +++ b/src/views/contractReview/JyjcontractualTaskBatch/JyjcontractualTaskBatch.data.ts @@ -0,0 +1,109 @@ +import { BasicColumn } from '@/components/Table'; +import { FormSchema } from '@/components/Form'; +import { getDictOptions } from '@/utils/dict'; +import { useRender } from '@/hooks/component/useRender'; +import { uploadContractual } from '@/api/contractReview/JyjcontractualTaskBatch'; + +export const formSchemas: FormSchema[] = [ + { + label: '文档名称', + field: 'documentName', + component: 'Input', + }, + { + label: '批次名称', + field: 'batchName', + component: 'Input', + }, + { + label: '进度状态', + field: 'progressStatus', + component: 'Select', + componentProps: { + options: getDictOptions('document_task_status'), + }, + }, +]; + +const { renderDict } = useRender(); +export const columns: BasicColumn[] = [ + { + title: '文件名称', + dataIndex: 'documentName', + }, + { + title: '批次名称', + dataIndex: 'batchName', + }, + { + title: '合同总数', + dataIndex: 'totalContracts', + }, + { + title: '已审批总数', + dataIndex: 'approvedCount', + + }, + { + title: '审核通过数量', + dataIndex: 'passCount', + width: 120, + + }, + { + title: '审核不通过数量', + dataIndex: 'rejectCount', + width: 130, + + }, + { + title: '非审查范围数量', + dataIndex: 'irrelevantCount', + width: 130, + }, + { + title: '审核失败数量', + dataIndex: 'failCount', + width: 100, + }, + { + title: '进度(百分比)', + dataIndex: 'progress', + }, + { + title: '处理时间', + dataIndex: 'processingTime', + }, + { + title: '状态', + dataIndex: 'progressStatus', + customRender: ({ value }) => renderDict(value, 'document_task_status'), + }, +]; +export const modalSchemas: FormSchema[] = [ + { + label: '文件名称', + field: 'ossId', + required: true, + component: 'Upload', + componentProps: { + accept: ['.zip'], + maxSize: 500, + multiple: false, + resultField: 'ossId', + api: uploadContractual, + }, + }, + { + label: '批次名称', + field: 'batchName', + required: false, + component: 'Input', + }, + { + label: '备注', + field: 'remark', + required: false, + component: 'InputTextArea', + }, +]; diff --git a/src/views/contractReview/JyjcontractualTaskBatch/JyjcontractualTaskBatchModal.vue b/src/views/contractReview/JyjcontractualTaskBatch/JyjcontractualTaskBatchModal.vue new file mode 100644 index 0000000..2ae762c --- /dev/null +++ b/src/views/contractReview/JyjcontractualTaskBatch/JyjcontractualTaskBatchModal.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/views/contractReview/JyjcontractualTaskBatch/index.vue b/src/views/contractReview/JyjcontractualTaskBatch/index.vue new file mode 100644 index 0000000..083489d --- /dev/null +++ b/src/views/contractReview/JyjcontractualTaskBatch/index.vue @@ -0,0 +1,200 @@ + + + + + diff --git a/src/views/workbench/index copy.vue b/src/views/workbench/index copy.vue new file mode 100644 index 0000000..fffcaf2 --- /dev/null +++ b/src/views/workbench/index copy.vue @@ -0,0 +1,251 @@ + + + diff --git a/src/views/workbench/index.vue b/src/views/workbench/index.vue index 8e1a2ee..62351c1 100644 --- a/src/views/workbench/index.vue +++ b/src/views/workbench/index.vue @@ -1,24 +1,51 @@