From da73b49cbf156e23f9839dbbffff35261e6618aa Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 27 Nov 2023 12:04:10 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E6=B5=81=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProcessDetailList.vue | 21 +++++---- .../PlanApprovalChangeFlow.vue | 43 +++++++++++++------ .../FinishTimeChangeBaseInfoDrawer.vue | 17 ++++---- .../processCenter/table/DraftList.vue | 4 +- 4 files changed, 51 insertions(+), 34 deletions(-) diff --git a/src/components/ProcessDetailList.vue b/src/components/ProcessDetailList.vue index ba7ec34d..b26354a1 100644 --- a/src/components/ProcessDetailList.vue +++ b/src/components/ProcessDetailList.vue @@ -99,6 +99,7 @@ import { previewPdf } from '../utils/previewPdf.js' import { Base64 } from 'js-base64' import FlowChartModal from './FlowChartModal.vue' import UploadFile from './UploadFile' +import { filterObj } from '../utils/util' // 支持预览的文件后缀 const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'] @@ -209,10 +210,6 @@ export default { this.$message.warning('请设置url.list属性!') return } - // 加载数据 若传入参数1则加载第一页的内容 - if (arg === 1) { - this.ipagination.current = 1 - } const params = this.getQueryParams()// 查询条件 if (this.$route.query.processInstanceId) { params.processInstanceId = this.$route.query.processInstanceId @@ -225,11 +222,6 @@ export default { if (res.success) { // update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ this.dataSource = res.result.records || res.result - if (res.result.total) { - this.ipagination.total = res.result.total - } else { - this.ipagination.total = 0 - } // update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ } else { this.$message.warning(res.message) @@ -238,6 +230,17 @@ export default { this.loading = false }) }, + getQueryParams () { + // 获取查询条件 + const sqp = {} + if (this.superQueryParams) { + sqp.superQueryParams = encodeURI(this.superQueryParams) + sqp.superQueryMatchType = this.superQueryMatchType + } + const param = Object.assign(sqp, this.queryParam, this.isorter, this.filters) + param.field = this.getQueryField() + return filterObj(param) + }, // 计算耗时 computedTimeConsuming (record) { // 结束时间和创建时间 diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue index 6f7d5b8b..c880b84c 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue @@ -167,10 +167,13 @@ - + @@ -179,6 +182,9 @@ @@ -343,7 +349,7 @@ export default { this.disabled = true } } - if (this.$route.query.taskId) { + if (this.$route.query.taskId && !this.$route.query.draftId) { // 有流程id说明是从流程中心来的,需要初始化数据 this.getProcessData('todo', { taskId: this.$route.query.taskId }) } @@ -448,6 +454,7 @@ export default { ] }, userForm: this.$form.createForm(this), // 部分节点需要选人的表单 + userFormModel: {}, approvalInfoForm: this.$form.createForm(this), // 审批信息表单 personnelInfoDataAll: [], // 整体人员信息 personnelInfoData: [], // 传给人员信息组件的人员信息 @@ -516,14 +523,15 @@ export default { func(params).then(res => { if (res.success) { this.model = res.result - this.$nextTick(() => { - // 初始化流程信息 - this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes')) - // 初始化流程审批信息,草稿进来的才回显审批信息 - if (type === 'draft') { - this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile')) - } - }) + // 初始化流程信息 + this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes')) + // 初始化流程审批信息,草稿进来的才回显审批信息 + if (type === 'draft') { + this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile')) + } + // this.$nextTick(() => { + // + // }) // 初始化业务基本信息的申请类型和项目类别,分开赋值是因为项目类别会没有下拉数据无法回显 const baseInfoForm = {} baseInfoForm.applicationCategory = this.model.dataList[0].applicationCategory @@ -581,6 +589,9 @@ export default { } this.$refs.changeBaseInfo.formInline = param }) + // 回显部分节点选人 + this.userFormModel = Object.assign({}, this.model.dataList[0]) + this.userForm.setFieldsValue(pick(this.model.dataList[0], 'newMainDraftUserLeader', 'relatedUser')) }) } } else { @@ -620,6 +631,10 @@ export default { } } }, + // 选择用户得到用户名 + userSelectNameChange (value, fieldName) { + this.userFormModel[fieldName + '_dictText'] = value + }, // 业务基本信息组件中获取到流程名称改变后的值 processNameChange (value) { const param = { prcName: value } @@ -688,7 +703,7 @@ export default { this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) return } - arr.push({ ...ruleForm, ...dutyDepartChangeForm }) + arr.push({ ...ruleForm, ...dutyDepartChangeForm, ...userInfoForm }) } else if (this.formInline.projectType === ProjectType.MERGE.value) { // 业务基本信息-变更-合并 const mergeForm = this.$refs.changeBaseInfo.formInline diff --git a/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue b/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue index 2ddd89f0..98ff78f3 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/modules/FinishTimeChangeBaseInfoDrawer.vue @@ -354,15 +354,6 @@ export default { width: 50%; } -.form-flex-item-line { - width: 100%; -} - -.form-flex-item-long { - width: 100%; - padding: 0; -} - .box-title-text { .title-text { width: 200px; @@ -371,4 +362,12 @@ export default { width: clac(100% - 220px) } } + +.form-flex-item-long { + width: 100%; + padding: 0; + .title-text { + width: 180px; + } +} diff --git a/src/views/workCenter/processCenter/table/DraftList.vue b/src/views/workCenter/processCenter/table/DraftList.vue index 967c39ec..e6d8be65 100644 --- a/src/views/workCenter/processCenter/table/DraftList.vue +++ b/src/views/workCenter/processCenter/table/DraftList.vue @@ -171,10 +171,10 @@ export default { query: { draftId: record.id, // 草稿id projectId: record.projectId, - taskName: record.taskName, + taskName: record.nodeName, taskId: record.taskId, // 任务id processInstanceId: record.processInstanceId, // 流程实例id,必须传人员信息右侧表格查询需要用 - nodeId: record.nodeId // 节点的id + nodeId: record.nodeId // 节点的id, } }) }