[update] 点击审批信息的节点名称跳转查看

This commit is contained in:
lideqin
2024-07-11 15:16:05 +08:00
parent 4bcae00320
commit 8cc3371698
3 changed files with 82 additions and 16 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ export default {
font-size: 10px; font-size: 10px;
width: 20px; width: 20px;
height: 20px; height: 20px;
background: #FAE6E5; background: rgba(0, 100, 250, 0.08);
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
opacity: 1; opacity: 1;
line-height: 20px; line-height: 20px;
+42 -10
View File
@@ -46,15 +46,14 @@
:scroll="{x: '100%', y: yScrollHeight}" :scroll="{x: '100%', y: yScrollHeight}"
@change="handleTableChange"> @change="handleTableChange">
<!-- 耗时 --> <!-- 任务节点 -->
<!--<template v-slot:timeConsuming="{text, record}">--> <template v-slot:taskNode="{text, record}">
<!-- <a-tooltip overlay-class-name="tooltip-style">--> <a-tooltip overlay-class-name="tooltip-style">
<!-- <template slot="title">{{ record.endTime && record.createTime ? computedTimeConsuming(record) : global.emptyLine }}</template>--> <template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<!-- <div class="table-text">--> <a v-if="text" class="link-a" @click="handleLookDetail(record)">{{ text }}</a>
<!-- {{ record.endTime && record.createTime ? computedTimeConsuming(record) : global.emptyLine }}--> <div v-else class="table-text">{{ global.emptyLine }}</div>
<!-- </div>--> </a-tooltip>
<!-- </a-tooltip>--> </template>
<!--</template>-->
<!--审批意见--> <!--审批意见-->
<template v-slot:approvalOpinion="{text, record}"> <template v-slot:approvalOpinion="{text, record}">
@@ -173,7 +172,8 @@ export default {
{ {
dataIndex: 'taskName', dataIndex: 'taskName',
title: this.$t('workCenter.processDetail.taskNode'), title: this.$t('workCenter.processDetail.taskNode'),
width: 150 width: 150,
scopedSlots: { customRender: 'taskNode' }
}, },
// 任务受理人 // 任务受理人
{ {
@@ -372,6 +372,38 @@ export default {
} }
// 其余可预览文件仍使用KKFile进行预览 // 其余可预览文件仍使用KKFile进行预览
kkFilePreview(fileFullUrl) kkFilePreview(fileFullUrl)
},
// 跳转流程基本信息页面
handleLookDetail (record) {
let path = ''
// 跳转到对应流程页面
switch (record.prcType + '') {
// 新法规导入流程
case '1':
path = '/workCenter/NewRegulationIntroductionProcess'
break
// 标准解读流程
case '2':
path = '/workCenter/StandardInterpretationProcess'
break
// 法规符合性排查流程
case '3':
path = '/workCenter/RegulatoryComplianceCheckProcess'
break
// 市场清单发布流程
case '4':
path = '/workCenter/MarketListReleaseProcess'
break
}
const query = {}
query.taskName = record.taskName
query.snapshotId = record.snapshotId // 快照id
query.nodeId = record.nodeId // 节点的id
this.$router.push({
path: path,
query: query,
isLook: 1
})
} }
} }
} }
@@ -39,7 +39,7 @@
:colon="formItemColon"> :colon="formItemColon">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')" <a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%" style="width: 100%"
:disabled="disabled" :disabled="disabled || isLook"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" /> v-decorator="['processDueDate']" />
</a-form-item> </a-form-item>
@@ -54,7 +54,7 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="disabled" :disabled="disabled || isLook"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -79,11 +79,15 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" <a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</a-form-item> </a-form-item>
<!--附件--> <!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon"> <a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
<j-upload v-decorator="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']"
return-id
multiple
:disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -135,7 +139,8 @@ import {
newRegulationImportReject, newRegulationImportReject,
newRegulationImportSave, newRegulationImportSave,
getDataDraft, getDataDraft,
processTransfer processTransfer,
getLookData
} from '../../../api/workCenter' } from '../../../api/workCenter'
export default { export default {
@@ -199,6 +204,14 @@ export default {
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据 // 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId }) this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
} }
if (this.$route.query.isLook + '' === '1') {
// 是查看
this.isLook = true
// 人员信息全部不可选
this.initPersonInfoData(false)
// 查询数据
this.getProcessData('look', { snapshotId: this.$route.query.snapshotId })
}
if (this.$route.query.taskName) { if (this.$route.query.taskName) {
// 说明是已发起流程 // 说明是已发起流程
this.currentNodeName = this.$route.query.taskName this.currentNodeName = this.$route.query.taskName
@@ -268,7 +281,8 @@ export default {
}, },
formInline: {}, formInline: {},
approvalInfoForm: this.$form.createForm(this), // 审批信息表单 approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: [] personnelInfoData: [],
isLook: false
} }
}, },
methods: { methods: {
@@ -280,6 +294,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = newRegulationImportGetDataById func = newRegulationImportGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = getDataDraft func = getDataDraft
params = param params = param
@@ -470,9 +487,26 @@ export default {
this.approvalInfoForm.validateFields((err, values) => { this.approvalInfoForm.validateFields((err, values) => {
if (!err) { if (!err) {
this.loading = true this.loading = true
// 保存快照需要的JSON start
const jasonObj = {}
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 业务基本信息
const baseInfo = this.$refs.baseInfoRef.getData()
// 流程信息
jasonObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
// 流程审批信息
jasonObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
// 业务信息
jasonObj.businessInfoDTO = baseInfo
// 保存快照需要的JSON end
const param = {} const param = {}
param.basicTaskInfoDTO = Object.assign({}, values) param.basicTaskInfoDTO = Object.assign({}, values)
param.basicTaskInfoDTO.taskId = this.$route.query.taskId param.basicTaskInfoDTO.taskId = this.$route.query.taskId
// 草稿JSON
param.infoJsonStr = JSON.stringify(jasonObj)
newRegulationImportAgree(param).then(res => { newRegulationImportAgree(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)