[update 标准解读流程] 完善

This commit is contained in:
danshihao
2024-07-15 14:15:25 +08:00
parent 38e68d5514
commit 35ee9aeb7a
7 changed files with 27 additions and 8 deletions
@@ -9,6 +9,7 @@
<!-- 导入(标准主解读人节点 && 选择不分发时) -->
<a-upload v-if="isMainInterpreterDistribute && !isDistribute"
:data="importParams"
:disabled="disabledImport"
name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importUrl"
@change="handleImport">
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
@@ -121,6 +122,12 @@ export default {
type: Object,
default: () => ({}),
required: false
},
// 是否禁用导入
disabledImport: {
type: Boolean,
default: false,
required: false
}
},
data () {
@@ -682,9 +689,9 @@ export default {
* 批量选择人员
*/
handleBatchSelectUser () {
// 至少勾选一条数据
// 请选择要分发的数据
if (!this.selectedRowKeys.length) {
this.$message.warning(this.$t('selectARecord'))
this.$message.warning(this.$t('pleaseSelectDistributeData'))
return
}
this.$refs.userSelectModal.open()
@@ -759,7 +766,7 @@ export default {
handleBatchDelete () {
// 至少勾选一条数据
if (!this.selectedRowKeys.length) {
this.$message.warning(this.$t('selectARecord'))
this.$message.warning(this.$t('pleaseSelectDeleteData'))
return
}
const that = this
@@ -168,7 +168,7 @@ export default {
// 如果来源选择不带入,至少选择一条条款信息
const isNoInput = this.dataSource.length && (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value)
// 是否没有条款数据
const isClauseNotData = this.showClauseTable && !this.$refs.interpretationClauseTable.getData().length
const isClauseNotData = !this.showClauseTable || !this.$refs.interpretationClauseTable.getData().length
if (isNoInput && isClauseNotData) {
this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseSelectClause'))
obj._flag = true
@@ -224,6 +224,7 @@ export default {
this.$nextTick(() => {
this.$refs.interpretationClauseTable.setData([{
uuid: randomUUID(),
clauseId: this.dataSource[0].standardId,
itemTitle: this.dataSource[0].standardName,
itemNum: this.dataSource[0].standardNumber
}])
@@ -44,6 +44,7 @@
:disabled="disabled"
:current-node-id="currentNodeId"
:import-params="importParams"
:disabled-import="disabledImport"
:is-distribute="isDistribute"/>
<!-- 不分发的表单 -->
<template v-if="!isDistribute">
@@ -95,7 +96,7 @@
import UserSelection from '@comp/selection/UserSelection'
import InterpretationClauseTable
from '@views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable'
import { IsDistribute } from '@/enums/commonEnums'
import { DecompositionSource, IsDistribute } from '@/enums/commonEnums'
export default {
name: 'InterpretationMainInterpreterDistribute',
components: { InterpretationClauseTable, UserSelection },
@@ -217,7 +218,9 @@ export default {
standardInterp: '',
standardId: '',
splitInfoId: ''
}
},
// 禁用导入,分解单来源是不带入时
disabledImport: false
}
},
methods: {
@@ -310,6 +313,10 @@ export default {
} else if (info.distribute === IsDistribute.NOT_DISTRIBUTE.value) {
this.isDistribute = false
this.clauseDataSource = data.data.processStandardInterpretClauseSublistList
// 如果分解单来源是不带入,就禁用导入
if (info.decompositionSource === DecompositionSource.NO_INPUT.value) {
this.disabledImport = true
}
}
// 是否下发有值就自动带入下一步,并回显数据
if (info.distribute) {