[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
@@ -39,7 +39,7 @@
:colon="formItemColon">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%"
:disabled="disabled"
:disabled="disabled || isLook"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" />
</a-form-item>
@@ -54,7 +54,7 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500"
:rows="4"
:disabled="disabled"
:disabled="disabled || isLook"
v-decorator="['processDescription']" />
</a-form-item>
</a-col>
@@ -79,11 +79,15 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" />
</a-form-item>
<!--附件-->
<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>
</div>
@@ -135,7 +139,8 @@ import {
newRegulationImportReject,
newRegulationImportSave,
getDataDraft,
processTransfer
processTransfer,
getLookData
} from '../../../api/workCenter'
export default {
@@ -199,6 +204,14 @@ export default {
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
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) {
// 说明是已发起流程
this.currentNodeName = this.$route.query.taskName
@@ -268,7 +281,8 @@ export default {
},
formInline: {},
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: []
personnelInfoData: [],
isLook: false
}
},
methods: {
@@ -280,6 +294,9 @@ export default {
if (type === 'todo') {
func = newRegulationImportGetDataById
params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else {
func = getDataDraft
params = param
@@ -470,9 +487,26 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
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 = {}
param.basicTaskInfoDTO = Object.assign({}, values)
param.basicTaskInfoDTO.taskId = this.$route.query.taskId
// 草稿JSON
param.infoJsonStr = JSON.stringify(jasonObj)
newRegulationImportAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)