diff --git a/public/image/convert_tif.bat b/public/image/convert_tif.bat new file mode 100644 index 0000000..9e00318 --- /dev/null +++ b/public/image/convert_tif.bat @@ -0,0 +1,55 @@ +@echo off +setlocal + +REM 源文件 +set SRC=odm_orthophoto.tif + +REM 中间文件:去掩膜 + 保留 4 波段 +set TMP1=tmp_nomask.tif + +REM 中间文件:gdalwarp 处理透明通道 +set TMP2=tmp_nomask_alpha.tif + +REM 最终输出文件(性能优化:缩放 + 压缩) +set FINAL=clean_no_mask_optimized.tif + +REM 配置参数 +REM -tr 0.25x 分辨率控制(0.25 倍像素,或者每个像素大小扩大4倍),视你项目需要可调 +REM -co 压缩参数:LZW 是无损压缩方式,TILED=YES 支持分块加载 +REM -r average 使用平均值重采样可保持图像质量 + +echo [1/4] gdal_translate:去除掩膜并保留RGBA四波段... +gdal_translate -b 1 -b 2 -b 3 -b 4 -mask none -co PHOTOMETRIC=RGB -co ALPHA=YES %SRC% %TMP1% +if errorlevel 1 ( + echo ❌ gdal_translate 失败 + exit /b 1 +) + +echo [2/4] gdalwarp:强制生成 Alpha 通道... +gdalwarp -dstalpha %TMP1% %TMP2% +if errorlevel 1 ( + echo ❌ gdalwarp 失败 + exit /b 1 +) + +echo [3/4] gdalwarp:降采样并启用压缩优化... +gdalwarp ^ + -r average ^ + -tr 2 2 ^ + -co COMPRESS=LZW ^ + -co TILED=YES ^ + -co PHOTOMETRIC=RGB ^ + -co ALPHA=YES ^ + %TMP2% %FINAL% +if errorlevel 1 ( + echo ❌ gdalwarp 压缩优化失败 + exit /b 1 +) + +echo [4/4] 清理临时文件... +del %TMP1% +del %TMP2% + +echo ✅ 完成!优化后的 GeoTIFF 已生成:%FINAL% +endlocal +pause diff --git a/src/api/design/designChange/index.ts b/src/api/design/designChange/index.ts index 41e1e39..b3a1229 100644 --- a/src/api/design/designChange/index.ts +++ b/src/api/design/designChange/index.ts @@ -61,3 +61,23 @@ export const delDesignChange = (id: string | number | Array) => method: 'delete' }); }; +/** + * 获取卷册号 + * @param id + */ +export const blueprintList = (id) => { + return request({ + url: '/design/designChange/blueprint/' + id, + method: 'get' + }); +}; +/** + * 获取卷册列表 + * @param id + */ +export const catalogList = (id) => { + return request({ + url: '/design/designChange/catalogList/' + id, + method: 'get' + }); +}; diff --git a/src/api/design/drawing/index.ts b/src/api/design/drawing/index.ts index 279df5d..cb4852b 100644 --- a/src/api/design/drawing/index.ts +++ b/src/api/design/drawing/index.ts @@ -82,3 +82,14 @@ export const volumeFileViewerList = (id) => { method: 'get' }); }; +/** + * 查阅图纸列表 + * @param id + */ +export const joinList = (params) => { + return request({ + url: '/design/volumeFile/joinList', + method: 'get', + params + }); +}; diff --git a/src/api/design/volumeCatalog/index.ts b/src/api/design/volumeCatalog/index.ts index 5eae539..955d78c 100644 --- a/src/api/design/volumeCatalog/index.ts +++ b/src/api/design/volumeCatalog/index.ts @@ -65,7 +65,7 @@ export const addVolumeCatalog = (data: VolumeCatalogForm) => { * 修改卷册目录 * @param data */ -export const updateVolumeCatalog = (data: VolumeCatalogForm) => { +export const updateVolumeCatalog = (data) => { return request({ url: '/design/volumeCatalog', method: 'put', @@ -95,3 +95,24 @@ export const uploadVolumeFile = (query?: any): AxiosPromise => { data: query }); }; +/** + * 获取文件列表 + * @param query + */ +export const volumeFileList = (params) => { + return request({ + url: '/design/volumeFile/list', + method: 'get', + params: params + }); +}; +/** + * 获取文件详情 + * @param query + */ +export const getileDetail = (id) => { + return request({ + url: '/design/volumeFile/' + id, + method: 'get' + }); +}; diff --git a/src/api/materials/batchPlan/index.ts b/src/api/materials/batchPlan/index.ts index 6c1c9f3..8633eee 100644 --- a/src/api/materials/batchPlan/index.ts +++ b/src/api/materials/batchPlan/index.ts @@ -130,3 +130,16 @@ export const listSelectCailiaoshebei = (query?: any): AxiosPromise => { + return request({ + url: '/cailiaoshebei/purchaseDoc/engineeringList', + method: 'get', + params: query + }); +}; diff --git a/src/api/materials/purchaseDoc/index.ts b/src/api/materials/purchaseDoc/index.ts index 699f240..64ec1ab 100644 --- a/src/api/materials/purchaseDoc/index.ts +++ b/src/api/materials/purchaseDoc/index.ts @@ -121,3 +121,10 @@ export const logisticsDetial = (id) => { method: 'get' }); }; + +export const getDetailBASE = (id) => { + return request({ + url: '/cailiaoshebei/purchaseDoc/pic/' + id, + method: 'get' + }); +}; diff --git a/src/api/patch/index.ts b/src/api/patch/index.ts new file mode 100644 index 0000000..b086a80 --- /dev/null +++ b/src/api/patch/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { MasterVO, MasterForm, MasterQuery } from '@/api/patch/master/types'; + +/** + * 查询派单列表 + * @param query + * @returns {*} + */ + +export const listMaster = (query?: MasterQuery): AxiosPromise => { + return request({ + url: '/patch/list', + method: 'get', + params: query + }); +}; + +/** + * 查询派单详细 + * @param id + */ +export const getMaster = (id: string | number): AxiosPromise => { + return request({ + url: '/patch/' + id, + method: 'get' + }); +}; + +/** + * 新增派单 + * @param data + */ +export const addMaster = (data: MasterForm) => { + return request({ + url: '/patch/', + method: 'post', + data: data + }); +}; + +/** + * 修改派单 + * @param data + */ +export const updateMaster = (data: MasterForm) => { + return request({ + url: '/patch/', + method: 'put', + data: data + }); +}; + +/** + * 删除派单 + * @param id + */ +export const delMaster = (id: string | number | Array) => { + return request({ + url: '/patch/' + id, + method: 'delete' + }); +}; diff --git a/src/api/patch/types.ts b/src/api/patch/types.ts new file mode 100644 index 0000000..5a55b96 --- /dev/null +++ b/src/api/patch/types.ts @@ -0,0 +1,141 @@ +export interface MasterVO { + /** + * 主键ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 任务名称 + */ + taskName: string; + + /** + * 任务描述 + */ + describe: string; + + /** + * 计划完成时间 + */ + pcd: string; + + /** + * 实际完成时间 + */ + act: string; + + /** + * 完成进度 + */ + completionProgress: string; + + /** + * 任务状态 + */ + taskStatus: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface MasterForm extends BaseEntity { + /** + * 主键ID + */ + id?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 任务名称 + */ + taskName?: string; + + /** + * 任务描述 + */ + describe?: string; + + /** + * 计划完成时间 + */ + pcd?: string; + + /** + * 实际完成时间 + */ + act?: string; + + /** + * 完成进度 + */ + completionProgress?: string; + + /** + * 任务状态 + */ + taskStatus?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface MasterQuery extends PageQuery { + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 任务名称 + */ + taskName?: string; + + /** + * 任务描述 + */ + describe?: string; + + /** + * 计划完成时间 + */ + pcd?: string; + + /** + * 实际完成时间 + */ + act?: string; + + /** + * 完成进度 + */ + completionProgress?: string; + + /** + * 任务状态 + */ + taskStatus?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/plan/plan/index.ts b/src/api/plan/plan/index.ts new file mode 100644 index 0000000..12afcd5 --- /dev/null +++ b/src/api/plan/plan/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { PlanVO, PlanForm, PlanQuery } from '@/api/plan/plan/types'; + +/** + * 查询招标计划列表 + * @param query + * @returns {*} + */ + +export const listPlan = (query?: PlanQuery): AxiosPromise => { + return request({ + url: '/plan/plan/list', + method: 'get', + params: query + }); +}; + +/** + * 查询招标计划详细 + * @param id + */ +export const getPlan = (id: string | number): AxiosPromise => { + return request({ + url: '/plan/plan/' + id, + method: 'get' + }); +}; + +/** + * 新增招标计划 + * @param data + */ +export const addPlan = (data: PlanForm) => { + return request({ + url: '/plan/plan', + method: 'post', + data: data + }); +}; + +/** + * 修改招标计划 + * @param data + */ +export const updatePlan = (data: PlanForm) => { + return request({ + url: '/plan/plan', + method: 'put', + data: data + }); +}; + +/** + * 删除招标计划 + * @param id + */ +export const delPlan = (id: string | number | Array) => { + return request({ + url: '/plan/plan/' + id, + method: 'delete' + }); +}; diff --git a/src/api/plan/plan/types.ts b/src/api/plan/plan/types.ts new file mode 100644 index 0000000..2e9928a --- /dev/null +++ b/src/api/plan/plan/types.ts @@ -0,0 +1,161 @@ +export interface PlanVO { + /** + * 招标计划ID + */ + id: string | number; + + /** + * 分包类型 + */ + subpackageType: string; + + /** + * 分包名称 + */ + subpackageName: string; + + /** + * 分包内容 + */ + subpackageContext: string; + + /** + * 限价 + */ + limitPrice: number; + + /** + * 计划招标时间 + */ + planTenderTime: string; + + /** + * 招标方式 + */ + tenderMethod: string; + + /** + * 招标文件(多个) + */ + tenderFile: string; + + /** + * 中标文件(单个) + */ + bidFile: string | number; + + /** + * 合同额 + */ + contract: number; + +} + +export interface PlanForm extends BaseEntity { + /** + * 招标计划ID + */ + id?: string | number; + + /** + * 分包类型 + */ + subpackageType?: string; + + /** + * 分包名称 + */ + subpackageName?: string; + + /** + * 分包内容 + */ + subpackageContext?: string; + + /** + * 限价 + */ + limitPrice?: number; + + /** + * 计划招标时间 + */ + planTenderTime?: string; + + /** + * 招标方式 + */ + tenderMethod?: string; + + /** + * 招标文件(多个) + */ + tenderFile?: string; + + /** + * 中标文件(单个) + */ + bidFile?: string | number; + + /** + * 合同额 + */ + contract?: number; + +} + +export interface PlanQuery extends PageQuery { + + /** + * 分包类型 + */ + subpackageType?: string; + + /** + * 分包名称 + */ + subpackageName?: string; + + /** + * 分包内容 + */ + subpackageContext?: string; + + /** + * 限价 + */ + limitPrice?: number; + + /** + * 计划招标时间 + */ + planTenderTime?: string; + + /** + * 招标方式 + */ + tenderMethod?: string; + + /** + * 招标文件(多个) + */ + tenderFile?: string; + + /** + * 中标文件(单个) + */ + bidFile?: string | number; + + /** + * 合同额 + */ + contract?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/project/index.ts b/src/api/project/project/index.ts index 61dcb29..5b76894 100644 --- a/src/api/project/project/index.ts +++ b/src/api/project/project/index.ts @@ -174,3 +174,15 @@ export const getChildProject = (id: string | number): AxiosPromise { + return request({ + url: '/project/project/save/tender/file', + method: 'put', + data: data + }); +}; diff --git a/src/api/project/project/types.ts b/src/api/project/project/types.ts index 4ccb37d..2e21007 100644 --- a/src/api/project/project/types.ts +++ b/src/api/project/project/types.ts @@ -8,6 +8,7 @@ export interface ProjectVO { * 项目名称 */ projectName: string; + tenderFiles: string; /** * 项目简称 @@ -128,10 +129,10 @@ export interface locationType { projectSite: string; } -export interface childProjectQuery{ - projectName:string; - pid:string; - id?:string +export interface childProjectQuery { + projectName: string; + pid: string; + id?: string; } export interface ProjectForm extends BaseEntity { diff --git a/src/api/supplierInput/supplierInput/index.ts b/src/api/supplierInput/supplierInput/index.ts new file mode 100644 index 0000000..719aa11 --- /dev/null +++ b/src/api/supplierInput/supplierInput/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { SupplierInputVO, SupplierInputForm, SupplierInputQuery } from '@/api/supplierInput/supplierInput/types'; + +/** + * 查询供应商入库列表 + * @param query + * @returns {*} + */ + +export const listSupplierInput = (query?: SupplierInputQuery): AxiosPromise => { + return request({ + url: '/supplierInput/supplierInput/list', + method: 'get', + params: query + }); +}; + +/** + * 查询供应商入库详细 + * @param id + */ +export const getSupplierInput = (id: string | number): AxiosPromise => { + return request({ + url: '/supplierInput/supplierInput/' + id, + method: 'get' + }); +}; + +/** + * 新增供应商入库 + * @param data + */ +export const addSupplierInput = (data: SupplierInputForm) => { + return request({ + url: '/supplierInput/supplierInput', + method: 'post', + data: data + }); +}; + +/** + * 修改供应商入库 + * @param data + */ +export const updateSupplierInput = (data: SupplierInputForm) => { + return request({ + url: '/supplierInput/supplierInput', + method: 'put', + data: data + }); +}; + +/** + * 删除供应商入库 + * @param id + */ +export const delSupplierInput = (id: string | number | Array) => { + return request({ + url: '/supplierInput/supplierInput/' + id, + method: 'delete' + }); +}; diff --git a/src/api/supplierInput/supplierInput/types.ts b/src/api/supplierInput/supplierInput/types.ts new file mode 100644 index 0000000..3f86b6e --- /dev/null +++ b/src/api/supplierInput/supplierInput/types.ts @@ -0,0 +1,55 @@ +export interface SupplierInputVO { + /** + * + */ + id: string | number; + + /** + * 供应商类型 + */ + supplierType: string; + + /** + * 入库资料 + */ + inputFile: string; + +} + +export interface SupplierInputForm extends BaseEntity { + /** + * + */ + id?: string | number; + + /** + * 供应商类型 + */ + supplierType?: string; + + /** + * 入库资料 + */ + inputFile?: string; +} + +export interface SupplierInputQuery extends PageQuery { + + /** + * 供应商类型 + */ + supplierType?: string; + + /** + * 入库资料 + */ + inputFile?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index a871113..2fb0c49 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -48,12 +48,7 @@ tag="ul" @click.stop > -
  • +
  • {{ getFileName(file.name) }} @@ -303,6 +298,7 @@ const uploadedSuccessfully = (res: any) => { fileUploadRef.value?.clearFiles(); proxy?.$modal.closeLoading(); proxy?.$modal.msgSuccess('导入成功'); + props.onUploadSuccess?.(fileList.value, res); return; } @@ -319,6 +315,11 @@ const uploadedSuccessfully = (res: any) => { fileList.value = []; emit('update:modelValue', ''); // 同步到外部 v-model } + // if (props.autoUpload && props.limit === fileList.value.length) { + // fileUploadRef.value?.clearFiles(); + // fileList.value = []; + // emit('update:modelValue', ''); // 同步到外部 v-model + // } props.onUploadSuccess?.(fileList.value, res); }; diff --git a/src/components/Process/submitVerify.vue b/src/components/Process/submitVerify.vue index 6744b96..ab58fbf 100644 --- a/src/components/Process/submitVerify.vue +++ b/src/components/Process/submitVerify.vue @@ -63,11 +63,11 @@ type="danger" @click="handleTerminationTask" > - 终止 + 拒绝 - + 取消 @@ -141,6 +141,15 @@ + + + + @@ -202,6 +211,8 @@ const nickName = ref({}); const isDrawing = ref(false); //图纸评审标志 const businessId = ref(''); //业务id const isShowTermination = ref(false); //显示终止 +const isShowSubmit = ref(false); //显示终止 + //节点编码 const nodeCode = ref(''); const buttonObj = ref({ @@ -323,6 +334,10 @@ const handleCompleteTask = async () => { }); form.value.flowCopyList = flowCopyList; } + if (isDrawing.value) { + isShowSubmit.value = true; + return; + } await proxy?.$modal.confirm('是否确认提交?'); loading.value = true; buttonDisabled.value = true; @@ -336,7 +351,15 @@ const handleCompleteTask = async () => { buttonDisabled.value = false; } }; - +const handleShowSubmit = async () => { + detailFormTeRef.value.submit(businessId.value, () => { + completeTask(form.value).finally(() => { + dialog.visible = false; + emits('submitCallback'); + proxy?.$modal.msgSuccess('操作成功'); + }); + }); +}; /** 驳回弹窗打开 */ const handleBackProcessOpen = async () => { backForm.value = {}; @@ -361,7 +384,7 @@ const handleBackProcess = async () => { await backProcess(backForm.value).finally(() => { loading.value = false; buttonDisabled.value = false; - if (isDrawing.value) { + if (isDrawing.value) { detailFormRef.value.submit(businessId.value); } }); @@ -501,15 +524,15 @@ const handleTermination = async () => { taskId: taskId.value, comment: form.value.message }; - await terminationTask(params).finally(() => { - // 提交设计验证 - detailFormTeRef.value.submit(businessId.value); - loading.value = false; - buttonDisabled.value = false; + detailFormTeRef.value.submit(businessId.value, () => { + terminationTask(params).finally(() => { + loading.value = false; + buttonDisabled.value = false; + dialog.visible = false; + emits('submitCallback'); + proxy?.$modal.msgSuccess('操作成功'); + }); }); - dialog.visible = false; - emits('submitCallback'); - proxy?.$modal.msgSuccess('操作成功'); }; //终止任务 const handleTerminationTask = async () => { diff --git a/src/views/cory/template/index.vue b/src/views/cory/template/index.vue index 1d4f331..c872665 100644 --- a/src/views/cory/template/index.vue +++ b/src/views/cory/template/index.vue @@ -293,4 +293,17 @@ const handleAddApp = (row) => { onMounted(() => { getList(); }); + +//监听项目id刷新数据 +const listeningProject = watch( + () => currentProject.value?.id, + (nid, oid) => { + queryParams.value.projectId = nid; + getList(); + } +); + +onUnmounted(() => { + listeningProject(); +}); diff --git a/src/views/design/Professional/indexEdit.vue b/src/views/design/Professional/indexEdit.vue index 3f06930..7334669 100644 --- a/src/views/design/Professional/indexEdit.vue +++ b/src/views/design/Professional/indexEdit.vue @@ -20,28 +20,17 @@
    - +

    基本信息

    - - - - + + - + @@ -53,13 +42,14 @@
    - + +

    资料文件清单

    添加资料
    - +
    资料 {{ index + 1 }} -
    +
    - + + + userStore.selectedProject); +const userId = computed(() => userStore.userId); + +// 基础数据 +const userInfo = ref({ + nickName: '', + email: '', + phonenumber: '', + userId: '' +}); const { des_user_major } = toRefs(proxy?.useDict('des_user_major')); const buttonLoading = ref(false); const loading = ref(true); const disableAll = ref(false); const volumeCatalogList = ref([]); -let volumeMap = new Map(); -//路由参数 +const volumeMap = new Map(); const routeParams = ref>({}); + +// 流程相关 const flowCodeOptions = [ { value: currentProject.value?.id + '_extract', label: '互提资料清单' } ]; - const flowCode = ref(''); const status = ref(''); const dialogVisible = reactive({ visible: false, title: '流程定义' }); -//提交组件 -const submitVerifyRef = ref>(); -//审批记录组件 -const approvalRecordRef = ref>(); -//按钮组件 -const approvalButtonRef = ref>(); -const leaveFormRef = ref(); -const dialog = reactive({ - visible: false, - title: '', - isEdit: false -}); -const submitFormData = ref({ - businessId: '', - flowCode: '', - variables: {} -}); -const taskVariables = ref>({}); -// 用户列表 -const userList = ref([]); -const userMap = new Map(); -// 表单引用 -const mainFormRef = ref(); -const handleClose = () => { - dialogVisible.visible = false; - flowCode.value = ''; - buttonLoading.value = false; -}; +// 组件引用 +const submitVerifyRef = ref>(); +const approvalRecordRef = ref>(); +const mainFormRef = ref(); // 主表单引用 +const documentsFormRef = ref(); // 资料列表表单引用 + // 表单数据 -const form = reactive({ +const form = reactive({ projectId: currentProject.value?.id, - userId: '', // 收资人 - user_major: '', // 专业 - phone: '', // 电话 - email: '', // 邮箱 + userId: '', + user_major: '', + phone: '', + email: '', id: '', status: '', documents: [ { id: Date.now(), - catalogueName: '', // 卷册目录名称 - remark: '', // 备注 - volumeCatalogId: '' //卷册目录ID + catalogueName: '', + remark: '', + volumeCatalogId: '' } - ] as Array<{ - id: number; - catalogueName: string; - remark: string; - volumeCatalogId: string; - }> + ] }); + // 主表单验证规则 const mainRules = reactive({ userId: [{ required: true, message: '请输入收资人', trigger: 'blur' }], @@ -249,11 +257,22 @@ const mainRules = reactive({ { type: 'email', message: '请输入正确的邮箱格式', trigger: 'blur' } ] }); + +// 用户列表相关 +const userList = ref([]); +const userMap = new Map(); +// 流程提交数据 +const submitFormData = ref({ + businessId: '', + flowCode: '', + variables: {} +}); +const taskVariables = ref>({}); + /** 表单重置 */ const reset = () => { - if (mainFormRef.value) { - mainFormRef.value.resetFields(); - } + mainFormRef.value?.resetFields(); + documentsFormRef.value?.resetFields(); // 重置资料列表,保留一个空项 form.documents = [ { @@ -263,9 +282,9 @@ const reset = () => { volumeCatalogId: '' } ]; - leaveFormRef.value?.resetFields(); }; -// 添加资料项 + +/** 添加资料项 */ const addDocumentItem = () => { form.documents.push({ id: Date.now(), @@ -275,198 +294,256 @@ const addDocumentItem = () => { }); }; -// 删除资料项 +/** 删除资料项 */ const removeDocumentItem = (index: number) => { form.documents.splice(index, 1); }; -/** 提交按钮 */ + +/** 关闭流程选择对话框 */ +const handleClose = () => { + dialogVisible.visible = false; + flowCode.value = ''; + buttonLoading.value = false; +}; + +/** 提交表单(主逻辑) */ const submitForm = (status1: string) => { status.value = status1; buttonLoading.value = true; - dialog.visible = false; - // 验证表单数据 - mainFormRef.value.validate(async (valid) => { - if (valid) { - console.log('验证成功'); + + // 1. 校验主表单(基础信息) + mainFormRef.value?.validate(async (mainValid) => { + if (!mainValid) { + proxy?.$modal.msgError('请完善基础必填信息'); + buttonLoading.value = false; + return; + } + + // 2. 校验资料列表表单(资料名称) + documentsFormRef.value?.validate(async (docsValid) => { + if (!docsValid) { + proxy?.$modal.msgError('请完善所有资料的“资料名称”'); + buttonLoading.value = false; + return; + } + + // 3. 表单校验通过,处理资料序号 form.documents.map((item, i) => { item.num = i + 1; }); - let body = { + + // 4. 提交数据到后端 + const body = { desExtractBo: { projectId: currentProject.value?.id, - userId: form.userId, // 收资人 - userMajor: form.user_major, // 专业 + userId: form.userId, + userMajor: form.user_major, id: form.id, - phone: form.phone, // 电话 - email: form.email, // 邮箱 + phone: form.phone, + email: form.email, userName: userMap.get(form.userId) }, catalogueList: form.documents }; - let res = await extractBatch(body); - if (res.code == 200) { + + try { + const res = await extractBatch(body); + if (res.code === 200) { + form.id = res.data; + await submit(status.value, form); // 执行暂存/提交流程 + } else { + ElMessage.error(res.msg); + } + } catch (err) { + ElMessage.error('提交失败,请重试'); + } finally { buttonLoading.value = false; - dialog.visible = false; - } else { - ElMessage.error(res.msg); } - // 表单验证通过,执行提交逻辑 - form.id = res.data; - submit(status.value, form); - } else { - // 表单验证失败,提示用户并关闭加载状态 - proxy?.$modal.msgError('请完善必填信息后再提交'); - buttonLoading.value = false; - return false; - } + }); }); }; +/** 提交流程选择 */ const submitFlow = async () => { - handleStartWorkFlow(form); + await handleStartWorkFlow(form); dialogVisible.visible = false; }; -//提交申请 + +/** 启动工作流 */ const handleStartWorkFlow = async (data: LeaveForm) => { try { submitFormData.value.flowCode = flowCode.value; submitFormData.value.businessId = data.id; - //流程变量 + // 流程变量配置 taskVariables.value = { - // leave4/5 使用的流程变量 userList: ['1', '3', '4'] }; submitFormData.value.variables = taskVariables.value; + const resp = await startWorkFlow(submitFormData.value); if (submitVerifyRef.value) { - buttonLoading.value = false; submitVerifyRef.value.openDialog(resp.data.taskId); } + } catch (err) { + ElMessage.error('启动流程失败'); } finally { buttonLoading.value = false; } }; -//审批记录 + +/** 打开审批记录 */ const handleApprovalRecord = () => { - approvalRecordRef.value.init(form.id); + approvalRecordRef.value?.init(form.id); }; -//提交回调 + +/** 提交回调:关闭页面返回上一级 */ const submitCallback = async () => { await proxy.$tab.closePage(proxy.$route); proxy.$router.go(-1); }; -//审批 + +/** 打开审批验证弹窗 */ const approvalVerifyOpen = async () => { - submitVerifyRef.value.openDialog(routeParams.value.taskId); + submitVerifyRef.value?.openDialog(routeParams.value.taskId); }; -const submit = async (status, data) => { + +/** 暂存/提交分支逻辑 */ +const submit = async (status: string, data: FormData) => { if (status === 'draft') { - buttonLoading.value = false; proxy?.$modal.msgSuccess('暂存成功'); - proxy.$tab.closePage(proxy.$route); + await proxy.$tab.closePage(proxy.$route); proxy.$router.go(-1); } else { - if ((form.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') { + // 新增/草稿状态下,默认选择第一个流程并弹窗 + if ((data.status === 'draft' && !flowCode.value) || routeParams.value.type === 'add') { flowCode.value = flowCodeOptions[0].value; dialogVisible.visible = true; return; } - //说明启动过先随意穿个参数 - if (flowCode.value === '' || flowCode.value === null) { + // 已有流程时默认填充占位值 + if (!flowCode.value) { flowCode.value = 'xx'; } await handleStartWorkFlow(data); } }; -/** 查询当前部门的所有用户 */ + +/** 获取部门用户列表 */ const getDeptAllUser = async (deptId: any) => { try { const res = await systemUserList({ deptId }); - // 实际项目中使用接口返回的数据 userList.value = res.rows; userList.value.forEach((user) => { userMap.set(user.userId, user.nickName); }); - } catch (error) { + } catch (err) { ElMessage.error('获取用户列表失败'); } }; -// 查询数据 再次回显 + +/** 回显表单数据(编辑/查看/审批场景) */ const byProjectIdAll = async () => { loading.value = true; - buttonLoading.value = false; - // 调用接口获取数据 - const res = await extractDetail(routeParams.value.id); - if (res.code === 200 && res.data) { - const data = res.data; - // 回显基本信息 - form.userId = data.userId || ''; - form.user_major = data.userMajor || ''; - form.phone = data.phone || ''; - form.email = data.email || ''; - form.id = data.id || ''; - form.status = data.status || ''; - if (data.status != 'draft') { - disableAll.value = true; - } + try { + const res = await extractDetail(routeParams.value.id); + if (res.code === 200 && res.data) { + const data = res.data; + // 回显基础信息 + form.userId = data.userId || ''; + form.user_major = data.userMajor || ''; + form.phone = data.phone || ''; + form.email = data.email || ''; + form.id = data.id || ''; + form.status = data.status || ''; - // 回显资料文件列表 - if (data.catalogueList && data.catalogueList.length > 0) { - // 清空现有列表 - form.documents = []; - // 填充新数据 - data.catalogueList.forEach((item: any, index: number) => { - form.documents.push({ - id: item.id || Date.now() + index, // 确保id唯一 + // 非草稿状态禁用表单 + if (data.status !== 'draft') { + disableAll.value = true; + } + + // 回显资料列表 + if (data.catalogueList && data.catalogueList.length > 0) { + form.documents = data.catalogueList.map((item: any, index: number) => ({ + id: item.id || Date.now() + index, catalogueName: item.catalogueName || '', remark: item.remark || '', - volumeCatalogId: item.volumeCatalogId - }); - }); - } else { - // 如果没有资料,保持一个空项 - form.documents = [ - { - id: Date.now(), - catalogueName: '', - remark: '', - volumeCatalogId: '' - } - ]; + volumeCatalogId: item.volumeCatalogId || '' + })); + } else { + form.documents = [ + { + id: Date.now(), + catalogueName: '', + remark: '', + volumeCatalogId: '' + } + ]; + } } + } catch (err) { + ElMessage.error('获取表单数据失败'); + } finally { + loading.value = false; + buttonLoading.value = false; } - loading.value = false; - buttonLoading.value = false; }; -/** 查询卷册目录列表 */ + +/** 获取当前用户详情 */ +const getUserDetail = async () => { + try { + const res = await getUser(userId.value); + userInfo.value = res.data.user; + form.userId = userInfo.value.userId; + form.phone = userInfo.value.phonenumber; + form.email = userInfo.value.email; + } catch (err) { + ElMessage.error('获取用户信息失败'); + } +}; + +/** 获取卷册目录列表 */ const getList = async () => { - const res = await listVolumeCatalog({ projectId: currentProject.value?.id, auditStatus: 'finish' }); - volumeCatalogList.value = res.rows; - volumeCatalogList.value.forEach((e) => { - volumeMap.set(e.design, e); - }); + try { + const res = await catalogList(currentProject.value?.id); + volumeCatalogList.value = res.data; + volumeCatalogList.value.forEach((e) => { + volumeMap.set(e.design, e); + }); + } catch (err) { + ElMessage.error('获取卷册目录失败'); + } }; -const handleSelect = (val, item) => { - item.catalogueName = volumeMap.get(val).documentName; + +/** 选择资料名称后回显目录名称 */ +const handleSelect = (val: string, item: DocumentItem) => { + item.catalogueName = volumeMap.get(val)?.documentName || ''; }; + +/** 页面挂载初始化 */ onMounted(() => { nextTick(async () => { routeParams.value = proxy.$route.query; reset(); loading.value = false; - getList(); // 获取卷册目录 - if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') { - getDeptAllUser(userStore.deptId).then(() => { - byProjectIdAll(); - }); + + // 初始化基础数据 + await getList(); + await getUserDetail(); + + // 编辑/查看/审批场景:加载已有数据 + const { type } = routeParams.value; + if (type === 'update' || type === 'view' || type === 'approval') { + await getDeptAllUser(userStore.deptId); + await byProjectIdAll(); } else { - getDeptAllUser(userStore.deptId); + await getDeptAllUser(userStore.deptId); } }); }); + diff --git a/src/views/design/billofQuantities/indexEdit1.vue b/src/views/design/billofQuantities/indexEdit1.vue new file mode 100644 index 0000000..97076a8 --- /dev/null +++ b/src/views/design/billofQuantities/indexEdit1.vue @@ -0,0 +1,357 @@ + + + + diff --git a/src/views/design/billofQuantities/indexEdit2.vue b/src/views/design/billofQuantities/indexEdit2.vue new file mode 100644 index 0000000..c4b1ed9 --- /dev/null +++ b/src/views/design/billofQuantities/indexEdit2.vue @@ -0,0 +1,357 @@ + + + + diff --git a/src/views/design/billofQuantities/indexEdit3.vue b/src/views/design/billofQuantities/indexEdit3.vue new file mode 100644 index 0000000..094df79 --- /dev/null +++ b/src/views/design/billofQuantities/indexEdit3.vue @@ -0,0 +1,357 @@ + + + + diff --git a/src/views/design/designChange/index.vue b/src/views/design/designChange/index.vue index e98ed0c..19fbc4c 100644 --- a/src/views/design/designChange/index.vue +++ b/src/views/design/designChange/index.vue @@ -93,7 +93,7 @@ link icon="View" v-hasPermi="['design:designChange:query']" - v-if="scope.row.status == 'back' || scope.row.status == 'termination'" + v-if="scope.row.status != 'draft'" @click="handleViewHistory(scope.row)" >查看单据 @@ -107,13 +107,7 @@ diff --git a/src/views/design/designChange/indexEdit.vue b/src/views/design/designChange/indexEdit.vue index 206136c..2e8da77 100644 --- a/src/views/design/designChange/indexEdit.vue +++ b/src/views/design/designChange/indexEdit.vue @@ -74,26 +74,22 @@ > - + 原图作废 - 原图保留,部分修改 + 原图保留,部分修改 原图保留,补充设计 - - - - - - - + + + + + {{ dict.fileName }} + + + const { proxy } = getCurrentInstance() as ComponentInternalInstance; import { useUserStoreHook } from '@/store/modules/user'; -import { addDesignChange, getDesignChange } from '@/api/design/designChange'; -import { listVolumeCatalog } from '@/api/design/volumeCatalog'; +import { addDesignChange, getDesignChange, catalogList, blueprintList } from '@/api/design/designChange'; const { design_change_reason_type } = toRefs(proxy?.useDict('design_change_reason_type')); const route = useRoute(); const router = useRouter(); @@ -190,6 +185,7 @@ const userStore = useUserStoreHook(); const currentProject = computed(() => userStore.selectedProject); const buttonLoading = ref(false); const volumeCatalogList = ref([]); +const blueprintListAll = ref([]); let volumeMap = new Map(); //路由参数 const routeParams = ref>({}); @@ -200,6 +196,7 @@ const dialog = reactive({ isEdit: false }); const fileVoList = ref([]); +const designId = ref(''); const initFormData = { id: undefined, projectId: currentProject.value?.id, @@ -219,7 +216,7 @@ const initFormData = { fileId: undefined, status: undefined, remark: undefined, - saveFile: undefined, + saveFile: [], extendDetail: { changeCategory: undefined, ImpProcedure: undefined, @@ -287,16 +284,27 @@ const submitForm = () => { }; /** 查询卷册目录列表 */ const getList = async () => { - const res = await listVolumeCatalog({ projectId: currentProject.value?.id, auditStatus: 'finish' }); - volumeCatalogList.value = res.rows; + const res = await catalogList(currentProject.value?.id); + volumeCatalogList.value = res.data; volumeCatalogList.value.forEach((e) => { volumeMap.set(e.volumeNumber, e); }); }; +// 获取图纸列表 +const getBlueprintList = async () => { + const res = await blueprintList(designId.value); + blueprintListAll.value = res.data; +}; +const handleRadio = (val) => { + form.value.saveFile = []; + if (val == 2) { + getBlueprintList(); + } +}; const handleSelect = (val) => { let obj = volumeMap.get(val); - console.log(obj); fileVoList.value = obj.fileVoList; + designId.value = obj.design; form.value.volumeName = obj.volumeName; form.value.specialty = obj.specialty; form.value.specialtyName = obj.specialtyName; diff --git a/src/views/design/drawing/index.vue b/src/views/design/drawing/index.vue index c05d284..81e2148 100644 --- a/src/views/design/drawing/index.vue +++ b/src/views/design/drawing/index.vue @@ -1,77 +1,78 @@ @@ -370,7 +382,7 @@ import { addProjectPilePoint, addProjectSquare, delProject, - getChildProject, + uploadProjectFile, getProject, listProject, updateProject @@ -378,8 +390,8 @@ import { import { ProjectForm, ProjectQuery, ProjectVO, childProjectQuery, locationType } from '@/api/project/project/types'; import amap from '@/components/amap/index.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { sys_normal_disable, project_category_type, project_type } = toRefs( - proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type') +const { sys_normal_disable, project_category_type, project_type, project_stage } = toRefs( + proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type', 'project_stage') ); const projectList = ref([]); const buttonLoading = ref(false); @@ -408,6 +420,11 @@ const dialog = reactive({ visible: false, title: '' }); +const fileVisble = ref(false); +const fileForm = ref({ + id: '', + tenderFiles: '' +}); const jsonData = ref(null); const fullscreenLoading = ref(false); @@ -521,48 +538,6 @@ const setPoi = (location: locationType) => { const setCheckedNodes = (nodeList: any) => { nodes.value = nodeList; }; -//上传节点 -// const addFacilities = async () => { -// if (!layerType.value) { -// return proxy?.$modal.msgError('请选择图层类型'); -// } -// if (!nodes.value.length) { -// return proxy?.$modal.msgError('请选择需要上传的图层'); -// } -// const data = { -// projectId: projectId.value, -// nameGeoJson: null, -// locationGeoJson: null, -// pointGeoJson: null -// }; -// loading.value = true; -// if (layerType.value == 1) { -// if (nodes.value[0].option == '名称') { -// data.nameGeoJson = jsonData.value[nodes.value[0].location.index]; -// data.locationGeoJson = jsonData.value[nodes.value[1].location.index]; -// } else { -// data.nameGeoJson = jsonData.value[nodes.value[1].location.index]; -// data.locationGeoJson = jsonData.value[nodes.value[0].location.index]; -// } -// await addProjectFacilities(data); -// await proxy?.$modal.msgSuccess('添加成功'); -// } else if (layerType.value == 2) { -// data.pointGeoJson = jsonData.value[nodes.value[0].location.index]; -// await addProjectPilePoint(data); -// await proxy?.$modal.msgSuccess('添加成功'); -// } else if (layerType.value == 3) { -// if (nodes.value[0].option == '名称') { -// data.nameGeoJson = jsonData.value[nodes.value[0].location.index]; -// data.locationGeoJson = jsonData.value[nodes.value[1].location.index]; -// } else { -// data.nameGeoJson = jsonData.value[nodes.value[1].location.index]; -// data.locationGeoJson = jsonData.value[nodes.value[0].location.index]; -// } -// await addProjectSquare(data); -// await proxy?.$modal.msgSuccess('添加成功'); -// } -// loading.value = false; -// }; /** 搜索按钮操作 */ const handleQuery = () => { queryParams.value.pageNum = 1; @@ -643,6 +618,24 @@ const submitForm = () => { }); }; +/** 上传文件 */ +const handleUpload = async (row?: ProjectVO) => { + fileForm.value.id = row.id; + fileForm.value.tenderFiles = row.tenderFiles; + + fileVisble.value = true; +}; + +const uploadSubmit = async () => { + if (!fileForm.value.tenderFiles) return proxy.$modal.msgError('请上传文件'); + let res = await uploadProjectFile(fileForm.value); + if (res.code == 200) { + proxy.$modal.msgSuccess('上传成功'); + fileVisble.value = false; + await getList(); + } +}; + /** 删除按钮操作 */ const handleDelete = async (row?: ProjectVO) => { const _ids = row?.id || ids.value; diff --git a/src/views/tender/plan/index.vue b/src/views/tender/plan/index.vue new file mode 100644 index 0000000..26408a7 --- /dev/null +++ b/src/views/tender/plan/index.vue @@ -0,0 +1,285 @@ + + + diff --git a/src/views/tender/supplierInput/index.vue b/src/views/tender/supplierInput/index.vue new file mode 100644 index 0000000..69d5f99 --- /dev/null +++ b/src/views/tender/supplierInput/index.vue @@ -0,0 +1,368 @@ + + + +