[update 标准解读流程] 审核

This commit is contained in:
danshihao
2024-07-10 10:32:35 +08:00
parent b44dda2d1c
commit 8663a09f7d
4 changed files with 497 additions and 16 deletions
@@ -71,7 +71,8 @@
<interpretation-main-interpreter-distribute v-if="currentNodeId === StandardInterpretationNodes.standardInterpreterDistribution.value"
:disabled="disabled" ref="businessComp"/>
<!-- 解读人填写解读信息 -->
<interpretation-interpreter-fill-info v-if="currentNodeId === StandardInterpretationNodes.interpreterFillInfo.value"
<!-- 标准主解读人单线审核 -->
<interpretation-interpreter-fill-info v-else :current-node-id="currentNodeId"
:disabled="disabled" ref="businessComp"/>
<!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -392,8 +393,8 @@ export default {
})
// 条款列表
params.data.processStandardInterpretClauseList = compData.clauseData
} else if (this.currentNodeId === StandardInterpretationNodes.interpreterFillInfo.value) {
// 解读人填写节点
} else {
// 解读人填写节点 及 后续节点
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
projectId: this.projectId
})
@@ -3,10 +3,14 @@
<a-spin :spinning="loading">
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<div v-if="!disabled" class="table-operator">
<!-- 批量编辑 -->
<a-button type="primary" ghost @click="handleBatchEdit">
<!-- 批量编辑(解读人填写信息节点) -->
<a-button type="primary" ghost @click="handleBatchEdit" v-if="isInterpreterFillInfo">
{{$t('workCenter.standardInterpretationProcess.batchEdit')}}
</a-button>
<!-- 导出(标准主解读人汇总节点) -->
<a-button type="primary" ghost @click="handleExport" v-if="isStandardInterpreterSummary">
{{$t('export')}}
</a-button>
</div>
<div class="table-container mb-20">
<j-table
@@ -14,10 +18,10 @@
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:columns="showColumns"
:dataSource="dataSource"
:pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:row-selection="isCheckNode ? null : { selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<!--条文内容-->
<template slot="item_content" slot-scope="{text, record}">
@@ -31,6 +35,43 @@
</template>
</j-table>
</div>
<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">
<!--会签人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
:disabled="disabled"
filedName="countersignPersonIds"
@nameChange="userSelectNameChange"
:nameStr="formInline.countersignPersonIds_dictText" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--审核人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
v-decorator="['uploader', validatorRules.uploader]"
:disabled="disabled"
filedName="uploader"
@nameChange="userSelectNameChange"
:nameStr="formInline.uploader_dictText" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--批准人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
:disabled="disabled"
filedName="approvePersonId"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvePersonId_dictText" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
<!-- 条款解读表单 -->
<terms-interpret-modal ref="termsInterpretModal" @ok="handleEditCallback"/>
@@ -44,6 +85,7 @@ import TermsInterpretModal from '@views/workCenter/standardInterpretationProcess
import UserSelection from '@comp/selection/UserSelection'
import SplitClauseDetail from '@views/documentTool/documentSplit/modules/SplitClauseDetail'
import { filterObj } from '@/utils/util'
import { StandardInterpretationNodes } from '@/enums/commonEnums'
export default {
name: 'InterpretationInterpreterFillInfo',
components: { SplitClauseDetail, UserSelection, TermsInterpretModal },
@@ -52,10 +94,56 @@ export default {
type: Boolean,
required: false,
default: false
},
// 当前节点id
currentNodeId: {
type: String,
required: true
}
},
computed: {
// 解读人填写信息节点
isInterpreterFillInfo () {
return this.currentNodeId === StandardInterpretationNodes.interpreterFillInfo.value
},
// 是否解读人汇总
isStandardInterpreterSummary () {
return this.currentNodeId === StandardInterpretationNodes.standardInterpreterSummary.value
},
// 是否审核节点
isCheckNode () {
const checkNodeArr = [
StandardInterpretationNodes.mainInterpreterSingleLineReview.value, // 标准主解读人单线审核
StandardInterpretationNodes.countersignOne.value, // 会签
StandardInterpretationNodes.countersignTwo.value, // 会签
StandardInterpretationNodes.departManagerReviewOne.value, // 各涉及部门科室经理审核
StandardInterpretationNodes.departManagerReviewTwo.value, // 各涉及部门科室经理审核
StandardInterpretationNodes.manageOrTechnicalOfficerApprovalOne.value, // 主控部门高级经理/法规认证技术官批准
StandardInterpretationNodes.manageOrTechnicalOfficerApprovalTwo.value // 主控部门高级经理/法规认证技术官批准
]
return checkNodeArr.includes(this.currentNodeId)
},
// 最终显示的表头
showColumns () {
// 审批节点不显示操作列
if (this.isCheckNode) {
return this.columns.slice(0, this.columns.length - 1)
}
return this.columns
},
},
data () {
return {
StandardInterpretationNodes,
form: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
loading: false,
// 条款解读表格
columns: [
@@ -314,6 +402,30 @@ export default {
},
selectedRowKeys: [],
selectedRows: [],
formInline: {},
validatorRules: {
// 会签人员
countersignPersonIds: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.countersigningPerson') }
],
validateTrigger: 'change'
},
// 审核人员
uploader: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.reviewersPerson') }
],
validateTrigger: 'change'
},
// 批准人员
approvePersonId: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.approvedPerson') }
],
validateTrigger: 'change'
}
},
}
},
methods: {
@@ -321,9 +433,21 @@ export default {
* 获取组件内的数据
* @param isValidate - 是否需要校验
*/
getData (isValidate) {
async getData (isValidate) {
const obj = {}
if (isValidate) {
// 汇总节点,处理表单
if (this.isStandardInterpreterSummary) {
obj.formData = await new Promise((resolve) => {
this.form.validateFields((err, values) => {
if (err) { obj._flag = true }
// 校验成功失败都返回表单数据
resolve(values)
})
})
}
} else {
obj.formData = this.form.getFieldsValue()
}
obj.clauseInterpretData = this.dataSource
return obj
@@ -331,6 +455,11 @@ export default {
// 更新组件内的数据
setData (data) {
console.log(data)
// 汇总节点,回显表单
if (this.isStandardInterpreterSummary) {
this.formInline = data.data.processStandardInterpret
this.form.setFieldsValue(this.formInline)
}
this.dataSource = data.data.processStandardInterpretClauseSublistList || []
},
handleEdit (record) {
@@ -379,6 +508,14 @@ export default {
this.selectedRowKeys = value
this.selectedRows = row
},
// 导出
handleExport () {
},
// 选择用户回显用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
}
}
</script>
@@ -32,9 +32,9 @@
</div>
<!-- 确认下一步展示 -->
<template v-if="isNextStep">
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<!-- 分发的部分 -->
<template v-if="isDistribute">
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<div v-if="!disabled" class="table-operator">
<!-- 批量选择人员 -->
<a-button icon="plus" type="primary" @click="handleClauseBatchSelectUser">
@@ -55,7 +55,7 @@
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="clauseColumns"
:columns="clauseDistributeColumns"
:dataSource="clauseDataSource"
:pagination="clauseIpagination"
:row-selection="{ selectedRowKeys: selectedClauseRowKeys, onChange: onSelectClauseChange }"
@@ -86,7 +86,92 @@
</template>
<!-- 不分发的部分 -->
<template v-else-if="isDistribute === false">
<div v-if="!disabled" class="table-operator">
<!-- 导入 -->
<a-button icon="plus" type="primary" @click="handleClauseImport">
{{$t('import')}}
</a-button>
<!-- 导出 -->
<a-button icon="upload" type="primary" ghost @click="handleExportClause('条款')">
{{ $t('export') }}
</a-button>
<!-- 批量删除 -->
<a-button icon="delete" type="danger" ghost @click="handleClauseBatchDel">
{{$t('batchDelete')}}
</a-button>
</div>
<div class="table-container mb-20">
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="clauseNoDistributeColumns"
:dataSource="clauseDataSource"
:pagination="clauseIpagination"
:row-selection="{ selectedRowKeys: selectedClauseRowKeys, onChange: onSelectClauseChange }"
@change="handleClauseTableChange">
<!--条文内容-->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" style="cursor: pointer" v-if="text || text === 0" @click="showContent('item_content', text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<!--各涉及部门解读人-->
<template slot="interpretPersonIds" slot-scope="{text, record, index}">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.departInterpretingPeople')"
v-model="record.interpretPersonIds"
:disabled="disabled"
filedName="interpretPersonIds"
@nameChange="(...arg) => tableUserSelectNameChange(...arg, index)"
type="checkbox"
:nameStr="record.interpretPersonIds_dictText" />
</template>
<template v-slot:action="{text, record}">
<a @click="handleClauseEdit(record.id)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleClauseDelete(record.id)" class="table-ope-btn">{{ $t('delete') }}</a>
</template>
</j-table>
</div>
<a-form :form="userForm" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--会签人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
:disabled="disabled"
filedName="countersignPersonIds"
@nameChange="userSelectNameChange"
:nameStr="formInline.countersignPersonIds_dictText" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--审核人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
v-decorator="['uploader', validatorRules.uploader]"
:disabled="disabled"
filedName="uploader"
@nameChange="userSelectNameChange"
:nameStr="formInline.uploader_dictText" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--批准人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
:disabled="disabled"
filedName="approvePersonId"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvePersonId_dictText" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</template>
</a-spin>
@@ -115,6 +200,7 @@ export default {
return {
loading: false,
form: this.$form.createForm(this),
userForm: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
@@ -184,6 +270,27 @@ export default {
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.interpretingTasksIsDistribute') }
],
validateTrigger: 'change'
},
// 会签人员
countersignPersonIds: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.countersigningPerson') }
],
validateTrigger: 'change'
},
// 审核人员
uploader: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.reviewersPerson') }
],
validateTrigger: 'change'
},
// 批准人员
approvePersonId: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.approvedPerson') }
],
validateTrigger: 'change'
}
},
// 是否点击下一步
@@ -191,7 +298,8 @@ export default {
// 是否下发 (true是, false否, null未选择)
isDistribute: null,
showClauseTable: false,
clauseColumns: [
// 条款分发
clauseDistributeColumns: [
{ // 标准编号/条款号
title: this.$t('standardNumber') + '/' + this.$t('clauseNo'),
align: 'center',
@@ -227,6 +335,227 @@ export default {
scopedSlots: { customRender: 'action' }
}
],
// 条款不分发
clauseNoDistributeColumns: [
{ // 标准编号/条款号
title: this.$t('standardNumber') + '/' + this.$t('clauseNo'),
align: 'center',
width: 180,
dataIndex: 'itemNum',
fixed: 'left',
scopedSlots: { customRender: 'text' }
},
{ // 标准名称/条款标题
title: this.$t('standardName') + '/' + this.$t('clauseTitle'),
align: 'center',
width: 180,
dataIndex: 'itemTitle',
fixed: 'left',
scopedSlots: { customRender: 'text' }
},
{ // 条款内容
title: this.$t('clauseContent'),
align: 'center',
width: 180,
dataIndex: 'itemContent',
scopedSlots: { customRender: 'item_content' }
},
{ // 译文
title: this.$t('workCenter.standardInterpretationProcess.translation'),
align: 'center',
width: 180,
dataIndex: 'translation',
scopedSlots: { customRender: 'text' }
},
{ // 是否与上一版相同
title: this.$t('workCenter.standardInterpretationProcess.sameAsPreviousVersion'),
align: 'center',
width: 180,
dataIndex: 'isSameAsPrevVersion_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 相对上一版变化点说明
title: this.$t('workCenter.standardInterpretationProcess.explanationOfChangePoints'),
align: 'center',
width: 180,
dataIndex: 'changeDescription',
scopedSlots: { customRender: 'text' }
},
{ // 专业领域
title: this.$t('workCenter.standardInterpretationProcess.professionalField'),
align: 'center',
width: 180,
dataIndex: 'regulatoryNotes',
scopedSlots: { customRender: 'text' }
},
{ // 新认证车实施日期
title: this.$t('workCenter.standardInterpretationProcess.newCertificationImplementationDate'),
align: 'center',
width: 180,
dataIndex: 'newCerImplementDate',
scopedSlots: { customRender: 'text' }
},
{ // 新生产车实施日期
title: this.$t('workCenter.standardInterpretationProcess.newProduceImplementationDate'),
align: 'center',
width: 180,
dataIndex: 'newProductionImplementation',
scopedSlots: { customRender: 'text' }
},
{ // 注册日期
title: this.$t('workCenter.standardInterpretationProcess.registrationDate'),
align: 'center',
width: 180,
dataIndex: 'registrationDate',
scopedSlots: { customRender: 'text' }
},
{ // 法规注解
title: this.$t('workCenter.standardInterpretationProcess.regulatoryAnnotations'),
align: 'center',
width: 180,
dataIndex: 'registrationDate',
scopedSlots: { customRender: 'text' }
},
{ // 涉及系统/部件
title: this.$t('workCenter.standardInterpretationProcess.involvingSystemsComponents'),
align: 'center',
width: 180,
dataIndex: 'keywords',
scopedSlots: { customRender: 'text' }
},
{ // 关键控制器
title: this.$t('workCenter.standardInterpretationProcess.keyController'),
align: 'center',
width: 180,
dataIndex: 'keyController',
scopedSlots: { customRender: 'text' }
},
{ // 责任部门
title: this.$t('workCenter.standardInterpretationProcess.responsibleDepartment'),
align: 'center',
width: 180,
dataIndex: 'responsibleDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 关联部门
title: this.$t('workCenter.standardInterpretationProcess.relatedDepartments'),
align: 'center',
width: 180,
dataIndex: 'relatedDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 适用车型
title: this.$t('workCenter.standardInterpretationProcess.applications'),
align: 'center',
width: 180,
dataIndex: 'applications',
scopedSlots: { customRender: 'text' }
},
{ // 动力类型
title: this.$t('workCenter.standardInterpretationProcess.powerType'),
align: 'center',
width: 180,
dataIndex: 'powerType',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准
title: this.$t('workCenter.standardInterpretationProcess.enterpriseStandards'),
align: 'center',
width: 180,
dataIndex: 'enterpriseStandard',
scopedSlots: { customRender: 'text' }
},
{ // 技术规范/设计指南
title: this.$t('workCenter.standardInterpretationProcess.technicalSpecificationsDesignGuidelines'),
align: 'center',
width: 180,
dataIndex: 'technicalSpecificationDesignGuide',
scopedSlots: { customRender: 'text' }
},
{ // 图纸模板
title: this.$t('workCenter.standardInterpretationProcess.drawingTemplate'),
align: 'center',
width: 180,
dataIndex: 'drawingTemplate',
scopedSlots: { customRender: 'text' }
},
{ // 技术协议模板
title: this.$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate'),
align: 'center',
width: 180,
dataIndex: 'technicalAgreementTemplate',
scopedSlots: { customRender: 'text' }
},
{ // 校核报告模板/checklist
title: this.$t('workCenter.standardInterpretationProcess.verificationReportTemplate'),
align: 'center',
width: 180,
dataIndex: 'verificationReportTemplateChecklist',
scopedSlots: { customRender: 'text' }
},
{ // DVP模板
title: this.$t('workCenter.standardInterpretationProcess.dvpTemplate'),
align: 'center',
width: 180,
dataIndex: 'dvpTemplate',
scopedSlots: { customRender: 'text' }
},
{ // DFEMA
title: this.$t('workCenter.standardInterpretationProcess.dfema'),
align: 'center',
width: 180,
dataIndex: 'dfema',
scopedSlots: { customRender: 'text' }
},
{ // 特殊性清单模板
title: this.$t('workCenter.standardInterpretationProcess.specialListTemplate'),
align: 'center',
width: 180,
dataIndex: 'keyTechnologyDecompositionTable',
scopedSlots: { customRender: 'text' }
},
{ // 其他文件或模板
title: this.$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates'),
align: 'center',
width: 180,
dataIndex: 'otherDocumentsTemplates',
scopedSlots: { customRender: 'text' }
},
{ // 排查阶段
title: this.$t('workCenter.standardInterpretationProcess.investigationStage'),
align: 'center',
width: 180,
dataIndex: 'investigationStage',
scopedSlots: { customRender: 'text' }
},
{ // P3证明符合性的交付物名称
title: this.$t('workCenter.standardInterpretationProcess.pThree'),
align: 'center',
width: 180,
dataIndex: 'p3',
scopedSlots: { customRender: 'text' }
},
{ // P5证明符合性的交付物名称
title: this.$t('workCenter.standardInterpretationProcess.pFive'),
align: 'center',
width: 180,
dataIndex: 'p5',
scopedSlots: { customRender: 'text' }
},
{ // 备注
title: this.$t('workCenter.standardInterpretationProcess.notes'),
align: 'center',
width: 180,
dataIndex: 'remarks',
scopedSlots: { customRender: 'text' }
},
{ // 操作
title: this.$t('operation'),
fixed: 'right',
width: 150,
scopedSlots: { customRender: 'action' }
}
],
clauseDataSource: [],
/* 分页参数 */
clauseIpagination: {
@@ -285,6 +614,10 @@ export default {
this.isNextStep = true
}
})
},
// 导入
handleClauseImport () {
},
// 条款导出
handleExportClause () {
@@ -309,6 +642,10 @@ export default {
}
})
}
},
// 条款编辑
handleClauseEdit () {
},
// 条款删除
handleClauseDelete (id) {
@@ -349,7 +686,8 @@ export default {
* @param val
*/
showContent (fieldName, val) {
const title = (this.clauseColumns.find(tt => tt.dbFieldName === fieldName) || {}).dbFieldTxt
const columns = this.isDistribute ? this.clauseDistributeColumns : this.clauseNoDistributeColumns
const title = (columns.find(tt => tt.dbFieldName === fieldName) || {}).dbFieldTxt
if (title) {
this.$refs.splitClauseDetail.title = title
}
@@ -358,10 +696,14 @@ export default {
handleClauseTableChange (pagination, filters, sorter) {
this.clauseIpagination = pagination
},
// 选择用户回显用户名
userSelectNameChange (value, fieldName, index) {
// 表格选择用户回显用户名
tableUserSelectNameChange (value, fieldName, index) {
this.clauseDataSource[index][fieldName + '_dictText'] = value
},
// 选择用户回显用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 批量选择人员
handleClauseBatchSelectUser () {
this.$refs.userSelectModal.open()