[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> <template>
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading"> <internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
<!-- 标题右侧tab --> <!-- 标题右侧tab -->
<template v-slot:titleRightCustom> <template v-slot:titleRightCustom v-if="!isLook">
<div class="table-operator-tab"> <div class="table-operator-tab">
<a :class="(switchValue === 'base' ? 'table-operator-tab-active' : '') + ' ' + ($i18n.locale === EN ? 'switch-item-en' : 'switch-item')" <a :class="(switchValue === 'base' ? 'table-operator-tab-active' : '') + ' ' + ($i18n.locale === EN ? 'switch-item-en' : 'switch-item')"
@click="switchChange('base')">{{ $t('basicInformation') }} @click="switchChange('base')">{{ $t('basicInformation') }}
@@ -111,7 +111,7 @@
</process-detail-list> </process-detail-list>
</div> </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> <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, loading: false,
switchValue: 'base', // 头部tab选中值 switchValue: 'base', // 头部tab选中值
disabled: false, disabled: false,
isLook: false, // 快照查看
// 项目id // 项目id
projectId: '', projectId: '',
currentNodeName: '', currentNodeName: '',
@@ -255,6 +256,7 @@ export default {
created () { created () {
const { projectId, nodeId, taskName, snapshotId, isLook } = this.$route.query const { projectId, nodeId, taskName, snapshotId, isLook } = this.$route.query
this.disabled = isLook === '1' this.disabled = isLook === '1'
this.isLook = isLook === '1'
// 发起、草稿进来没有nodeId,就默认发起节点 // 发起、草稿进来没有nodeId,就默认发起节点
this.currentNodeId = nodeId || StandardInterpretationNodes.initiated.value this.currentNodeId = nodeId || StandardInterpretationNodes.initiated.value
this.currentNodeName = taskName || StandardInterpretationNodes.initiated.text this.currentNodeName = taskName || StandardInterpretationNodes.initiated.text
@@ -226,12 +226,8 @@ export default {
this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseAddStandard')) this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseAddStandard'))
return return
} }
// 如果有条款的表格,就清空然后隐藏 // 清空表格
if (this.$refs.interpretationClauseTable) { this.resetClauseTable()
// 清空上次的数据,需要记录删除的id
this.delIds.push(...this.$refs.interpretationClauseTable.getData().map(item => item.id))
this.$refs.interpretationClauseTable.setData([])
}
this.showClauseTable = true this.showClauseTable = true
// 如果是不带入,不需要请求,直接将标准数据带入 // 如果是不带入,不需要请求,直接将标准数据带入
if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) { if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) {
@@ -269,7 +265,11 @@ export default {
}, },
// 重置条款表格 // 重置条款表格
resetClauseTable () { 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 this.showClauseTable = false
}, },
/** /**