[update 标准解读流程] 导入

This commit is contained in:
danshihao
2024-07-12 18:44:40 +08:00
parent 78d4c73ac2
commit c166bfecdf
3 changed files with 31 additions and 10 deletions
@@ -8,6 +8,7 @@
</a-button>
<!-- 导入(标准主解读人节点 && 选择不分发时) -->
<a-upload v-if="isMainInterpreterDistribute && !isDistribute"
:data="importParams"
name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importUrl"
@change="handleImport">
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
@@ -114,6 +115,12 @@ export default {
type: Boolean,
default: false,
required: false
},
// 导入的参数
importParams: {
type: Object,
default: () => ({}),
required: false
}
},
data () {
@@ -354,7 +361,7 @@ export default {
title: this.$t('workCenter.standardInterpretationProcess.investigationStage'),
align: 'center',
width: 180,
dataIndex: 'investigationStage',
dataIndex: 'investigationStage_dictText',
scopedSlots: { customRender: 'text' }
},
{ // P3证明符合性的交付物名称
@@ -97,7 +97,7 @@
<j-multi-select-tag dict-code="applicable_vehicle_type"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.applications')"
v-decorator="['applicable_vehicle_type']"/>
v-decorator="['applications']"/>
</a-form-item>
<!--动力类型-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.powerType')" :colon="false">
@@ -40,7 +40,11 @@
<!-- 确认下一步展示 -->
<template v-if="isNextStep">
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<interpretation-clause-table ref="interpretationClauseTable" :disabled="disabled" :current-node-id="currentNodeId" :is-distribute="isDistribute"/>
<interpretation-clause-table ref="interpretationClauseTable"
:disabled="disabled"
:current-node-id="currentNodeId"
:import-params="importParams"
:is-distribute="isDistribute"/>
<!-- 不分发的表单 -->
<template v-if="!isDistribute">
<a-form :form="userForm" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -207,7 +211,13 @@ export default {
// 是否点击下一步
isNextStep: false,
// 是否下发 (true是, false否, null未选择)
isDistribute: null
isDistribute: null,
// 导入参数
importParams: {
standardInterp: '',
standardId: '',
splitInfoId: ''
}
}
},
methods: {
@@ -285,21 +295,25 @@ export default {
},
setData (data) {
console.log(data)
this.dataSource = [data.data.processStandardInterpret]
this.formInline = data.data.processStandardInterpret
const info = data.data.processStandardInterpret || {}
this.importParams.standardInterp = info.id
this.importParams.standardId = info.standardId
this.importParams.splitInfoId = info.splitInfoId
this.dataSource = [info]
this.formInline = info
// 默认是少的条款表格
this.clauseDataSource = data.data.processStandardInterpretClauseList
// 是否下发
if (data.data.processStandardInterpret.isDistribute === IsDistribute.DISTRIBUTE.value) {
if (info.isDistribute === IsDistribute.DISTRIBUTE.value) {
this.isDistribute = true
this.clauseDataSource = data.data.processStandardInterpretClauseList
} else if (data.data.processStandardInterpret.isDistribute === IsDistribute.NOT_DISTRIBUTE.value) {
} else if (info.isDistribute === IsDistribute.NOT_DISTRIBUTE.value) {
this.isDistribute = false
this.clauseDataSource = data.data.processStandardInterpretClauseSublistList
}
// 是否下发有值就自动带入下一步,并回显数据
if (data.data.processStandardInterpret.isDistribute) {
this.form.setFieldsValue(data.data.processStandardInterpret)
if (info.isDistribute) {
this.form.setFieldsValue(this.formInline)
this.isNextStep = true
this.$nextTick(() => {
this.$refs.interpretationClauseTable.setData(this.clauseDataSource)