[fix 87384] 发起节点保存草稿回显不正确

This commit is contained in:
danshihao
2024-07-24 17:47:04 +08:00
parent 7ee6b63633
commit e2da49bfdc
2 changed files with 11 additions and 9 deletions
@@ -1,7 +1,7 @@
<template>
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<template v-slot:titleRightCustom v-if="!isLook">
<div class="table-operator-tab">
<a :class="(switchValue === 'base' ? 'table-operator-tab-active' : '') + ' ' + ($i18n.locale === EN ? 'switch-item-en' : 'switch-item')"
@click="switchChange('base')">{{ $t('basicInformation') }}
@@ -111,7 +111,7 @@
</process-detail-list>
</div>
<!-- 操作按钮 -->
<div class="detail-page-bottom-operate-box" v-if="!disabled">
<div class="detail-page-bottom-operate-box" v-if="!isLook">
<!-- 加签 -->
<a-button v-if="btn.includes('countersign')" type="primary" ghost :loading="loading" @click="handleCountersign" icon="plus">{{ $t('countersign') }}</a-button>
<!-- 转办 -->
@@ -182,6 +182,7 @@ export default {
loading: false,
switchValue: 'base', // 头部tab选中值
disabled: false,
isLook: false, // 快照查看
// 项目id
projectId: '',
currentNodeName: '',
@@ -255,6 +256,7 @@ export default {
created () {
const { projectId, nodeId, taskName, snapshotId, isLook } = this.$route.query
this.disabled = isLook === '1'
this.isLook = isLook === '1'
// 发起、草稿进来没有nodeId,就默认发起节点
this.currentNodeId = nodeId || StandardInterpretationNodes.initiated.value
this.currentNodeName = taskName || StandardInterpretationNodes.initiated.text
@@ -226,12 +226,8 @@ export default {
this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseAddStandard'))
return
}
// 如果有条款的表格,就清空然后隐藏
if (this.$refs.interpretationClauseTable) {
// 清空上次的数据,需要记录删除的id
this.delIds.push(...this.$refs.interpretationClauseTable.getData().map(item => item.id))
this.$refs.interpretationClauseTable.setData([])
}
// 清空表格
this.resetClauseTable()
this.showClauseTable = true
// 如果是不带入,不需要请求,直接将标准数据带入
if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) {
@@ -269,7 +265,11 @@ export default {
},
// 重置条款表格
resetClauseTable () {
this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([])
// 清空上次的数据,需要记录删除的id
if (this.$refs.interpretationClauseTable) {
this.delIds.push(...this.$refs.interpretationClauseTable.getData().map(item => item.id))
this.$refs.interpretationClauseTable.setData([])
}
this.showClauseTable = false
},
/**