[update 标准解读流程] 完善
This commit is contained in:
+30
-6
@@ -12,6 +12,10 @@
|
||||
@change="handleImport">
|
||||
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
|
||||
</a-upload>
|
||||
<!-- 批量编辑(解读人填写) -->
|
||||
<a-button type="primary" ghost @click="handleBatchEdit" v-if="showBatchEditBtn">
|
||||
{{$t('workCenter.standardInterpretationProcess.batchEdit')}}
|
||||
</a-button>
|
||||
<!-- 导出 -->
|
||||
<a-button icon="upload" type="primary" ghost @click="handleExport" v-if="showExportBtn">
|
||||
{{ $t('export') }}
|
||||
@@ -391,7 +395,11 @@ export default {
|
||||
selectionRows: [],
|
||||
url: {
|
||||
// 导入
|
||||
importExcelUrl: ''
|
||||
importExcelUrl: '/process/standardInterpretFlow/importExcelByUnDistribute',
|
||||
// 标准主解读人节点选择分发的导出
|
||||
exportDistribute: '/process/standardInterpretFlow/exportExcelByDistribute',
|
||||
// 标准主解读人节点选择不分发的导出
|
||||
exportUnDistribute: '/process/standardInterpretFlow/exportExcelByUnDistribute'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -468,6 +476,13 @@ export default {
|
||||
...mainInterpreterDistributeNodes // 标准主解读人分发节点
|
||||
].includes(this.currentNodeId)
|
||||
},
|
||||
// 显示批量编辑按钮
|
||||
showBatchEditBtn () {
|
||||
return [
|
||||
StandardInterpretationNodes.interpreterFillInfoOne.value, // 解读人填写信息
|
||||
StandardInterpretationNodes.interpreterFillInfoTwo.value // 解读人填写信息
|
||||
].includes(this.currentNodeId)
|
||||
},
|
||||
// 是否显示编辑按钮
|
||||
showEditBtn () {
|
||||
// 标准主解读人分发节点 && 不分发 显示编辑按钮
|
||||
@@ -558,13 +573,13 @@ export default {
|
||||
}
|
||||
// 前端存储,没有id的数据,前端加上uuid
|
||||
const data = info.file.response.result || []
|
||||
this.dataSource.push(...data.map((item, index) => {
|
||||
this.dataSource = data.map(item => {
|
||||
// 导入的时候生成前端id,不用索引防止禁用出错
|
||||
item.id = randomUUID()
|
||||
// 有该标识返回数据的时候把id给去掉,这里的id前端生成的
|
||||
item[uuidFlag] = true
|
||||
return item
|
||||
}))
|
||||
})
|
||||
} else {
|
||||
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
|
||||
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
||||
@@ -605,7 +620,11 @@ export default {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '导出文件'
|
||||
}
|
||||
const param = {}
|
||||
const param = {
|
||||
projectId: this.$route.query.projectId,
|
||||
nodeId: this.$route.query.nodeId,
|
||||
taskId: this.$route.query.taskId
|
||||
}
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
param.selections = this.selectedRowKeys.join(',')
|
||||
}
|
||||
@@ -620,7 +639,12 @@ export default {
|
||||
style: 'display: none'
|
||||
}
|
||||
})
|
||||
const url = ''
|
||||
let url = ''
|
||||
// 解读人分发节点
|
||||
if (this.isMainInterpreterDistribute) {
|
||||
// 根据是否分发选择对应的接口
|
||||
url = this.isDistribute ? this.url.exportDistribute : this.url.exportUnDistribute
|
||||
}
|
||||
downFile(url, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning('文件下载失败')
|
||||
@@ -693,7 +717,7 @@ export default {
|
||||
const row = this.dataSource.find(item => item[this.rowKey] === formData[this.rowKey])
|
||||
Object.assign(row, form)
|
||||
} else {
|
||||
this.selectedRows.forEach(item => {
|
||||
this.selectionRows.forEach(item => {
|
||||
Object.assign(item, form)
|
||||
})
|
||||
}
|
||||
|
||||
+9
-9
@@ -47,49 +47,49 @@
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.drawingTemplate')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.drawingTemplate')"
|
||||
v-decorator="['drawingTemplate']"/>
|
||||
</a-form-item>
|
||||
<!--技术协议模板-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate')"
|
||||
v-decorator="['technicalAgreementTemplate']"/>
|
||||
</a-form-item>
|
||||
<!--校核报告模板/checklist-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.verificationReportTemplate')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.verificationReportTemplate')"
|
||||
v-decorator="['verificationReportTemplateChecklist']"/>
|
||||
</a-form-item>
|
||||
<!--DVP模板-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.dvpTemplate')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.dvpTemplate')"
|
||||
v-decorator="['dvpTemplate']"/>
|
||||
</a-form-item>
|
||||
<!--DFEMA-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.dfema')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.dfema')"
|
||||
v-decorator="['dfema']"/>
|
||||
</a-form-item>
|
||||
<!--特殊性清单模板-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.specialListTemplate')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.specialListTemplate')"
|
||||
v-decorator="['keyTechnologyDecompositionTable']"/>
|
||||
</a-form-item>
|
||||
<!--其他文件或模板-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates')"
|
||||
v-decorator="['otherDocumentsTemplates']"/>
|
||||
</a-form-item>
|
||||
<!--排查阶段-->
|
||||
@@ -103,14 +103,14 @@
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.pThree')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.pThree')"
|
||||
v-decorator="['p3']"/>
|
||||
</a-form-item>
|
||||
<!--P5证明符合性的交付物名称-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.pFive')" :colon="false">
|
||||
<a-input :max-length="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.pFive')"
|
||||
v-decorator="['p5']"/>
|
||||
</a-form-item>
|
||||
<!--备注-->
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
<a-form :form="form" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="isStandardInterpreterSummary">
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.countersigningPerson')" :colon="false">
|
||||
<!--会签人员-->
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
|
||||
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.reviewersPerson')" :colon="false">
|
||||
<!--审核人员-->
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
|
||||
v-decorator="['uploader', validatorRules.uploader]"
|
||||
@@ -30,7 +30,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.approvedPerson')" :colon="false">
|
||||
<!--批准人员-->
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
|
||||
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
|
||||
|
||||
+9
-7
@@ -39,7 +39,7 @@
|
||||
<a-form :form="userForm" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.countersigningPerson')" :colon="false">
|
||||
<!--会签人员-->
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
|
||||
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
|
||||
@@ -51,7 +51,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.reviewersPerson')" :colon="false">
|
||||
<!--审核人员-->
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
|
||||
v-decorator="['uploader', validatorRules.uploader]"
|
||||
@@ -62,7 +62,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.approvedPerson')" :colon="false">
|
||||
<!--批准人员-->
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
|
||||
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
|
||||
@@ -84,6 +84,7 @@
|
||||
import UserSelection from '@comp/selection/UserSelection'
|
||||
import InterpretationClauseTable
|
||||
from '@views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable'
|
||||
import { IsDistribute } from '@/enums/commonEnums'
|
||||
export default {
|
||||
name: 'InterpretationMainInterpreterDistribute',
|
||||
components: { InterpretationClauseTable, UserSelection },
|
||||
@@ -217,6 +218,7 @@ export default {
|
||||
},
|
||||
async getData (isValidate) {
|
||||
const obj = {
|
||||
isDistribute: this.isDistribute,
|
||||
formData: {}, // 表单的数据
|
||||
clauseData: [] // 条款的表格
|
||||
}
|
||||
@@ -268,13 +270,13 @@ export default {
|
||||
this.formInline = data.data.processStandardInterpret
|
||||
this.clauseDataSource = data.data.processStandardInterpretClauseList
|
||||
// 是否下发
|
||||
if (data.isDistribute === '1') {
|
||||
if (data.data.processStandardInterpret.isDistribute === IsDistribute.DISTRIBUTE.value) {
|
||||
this.isDistribute = true
|
||||
} else if (data.isDistribute === '2') {
|
||||
} else if (data.data.processStandardInterpret.isDistribute === IsDistribute.NOT_DISTRIBUTE.value) {
|
||||
this.isDistribute = false
|
||||
}
|
||||
// 是否下发有值就自动带入下一步,并回显数据
|
||||
if (data.isDistribute) {
|
||||
if (data.data.processStandardInterpret.isDistribute) {
|
||||
this.isNextStep = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.interpretationClauseTable.setData(this.clauseDataSource)
|
||||
@@ -285,7 +287,7 @@ export default {
|
||||
handleNextStep () {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.isDistribute = values.isDistribute === '1'
|
||||
this.isDistribute = values.isDistribute === IsDistribute.DISTRIBUTE.value
|
||||
this.isNextStep = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.interpretationClauseTable.setData(this.clauseDataSource)
|
||||
|
||||
Reference in New Issue
Block a user