[update 标准解读流程] 解读
This commit is contained in:
+390
@@ -0,0 +1,390 @@
|
||||
<template>
|
||||
<div>
|
||||
<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">
|
||||
{{$t('workCenter.standardInterpretationProcess.batchEdit')}}
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="table-container mb-20">
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@change="handleTableChange">
|
||||
<!--条文内容-->
|
||||
<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 v-slot:action="{text, record}">
|
||||
<a @click="handleEdit(record)" class="table-ope-btn">{{ $t('edit') }}</a>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
</a-spin>
|
||||
<!-- 条款解读表单 -->
|
||||
<terms-interpret-modal ref="termsInterpretModal" @ok="handleEditCallback"/>
|
||||
<!--条文内容-->
|
||||
<split-clause-detail ref="splitClauseDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TermsInterpretModal from '@views/workCenter/standardInterpretationProcess/modules/TermsInterpretModal'
|
||||
import UserSelection from '@comp/selection/UserSelection'
|
||||
import SplitClauseDetail from '@views/documentTool/documentSplit/modules/SplitClauseDetail'
|
||||
import { filterObj } from '@/utils/util'
|
||||
export default {
|
||||
name: 'InterpretationInterpreterFillInfo',
|
||||
components: { SplitClauseDetail, UserSelection, TermsInterpretModal },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
// 条款解读表格
|
||||
columns: [
|
||||
{ // 标准编号/条款号
|
||||
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.regulatoryAnnotations'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'regulatoryNotes',
|
||||
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.responsibleDepartmentModule'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'responsibleModule',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 关联部门
|
||||
title: this.$t('workCenter.standardInterpretationProcess.relatedDepartments'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'relatedDepartment',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 关联部门专业模块
|
||||
title: this.$t('workCenter.standardInterpretationProcess.relatedDepartmentsModule'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'relatedModule',
|
||||
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.professionalField'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'domainArea',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 配置需求
|
||||
title: this.$t('workCenter.standardInterpretationProcess.configurationRequirements'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'configurationRequirements',
|
||||
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.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' }
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 50,
|
||||
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取组件内的数据
|
||||
* @param isValidate - 是否需要校验
|
||||
*/
|
||||
getData (isValidate) {
|
||||
const obj = {}
|
||||
if (isValidate) {
|
||||
}
|
||||
obj.clauseInterpretData = this.dataSource
|
||||
return obj
|
||||
},
|
||||
// 更新组件内的数据
|
||||
setData (data) {
|
||||
console.log(data)
|
||||
this.dataSource = data.data.processStandardInterpretClauseSublistList || []
|
||||
},
|
||||
handleEdit (record) {
|
||||
this.$refs.termsInterpretModal.title = this.$t('workCenter.standardInterpretationProcess.batchEdit')
|
||||
this.$refs.termsInterpretModal.edit(record)
|
||||
},
|
||||
// 批量编辑
|
||||
handleBatchEdit () {
|
||||
// 至少勾选一条数据
|
||||
if (!this.selectedRowKeys.length) {
|
||||
this.$message.warning(this.$t('selectARecord'))
|
||||
return
|
||||
}
|
||||
this.$refs.termsInterpretModal.add()
|
||||
},
|
||||
// 表格编辑的回调函数
|
||||
handleEditCallback (formData) {
|
||||
console.log('编辑', formData)
|
||||
// 如果有id就是编辑,否则是批量编辑
|
||||
if (formData.id) {
|
||||
const row = this.dataSource.find(item => item.id === formData.id)
|
||||
Object.assign(row, filterObj(formData))
|
||||
} else {
|
||||
this.selectedRows.forEach(item => {
|
||||
Object.assign(item, filterObj(formData))
|
||||
})
|
||||
}
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
},
|
||||
/**
|
||||
* 显示条款内容、条文解读弹框
|
||||
* @param fieldName
|
||||
* @param val
|
||||
*/
|
||||
showContent (fieldName, val) {
|
||||
const title = (this.columns.find(tt => tt.dbFieldName === fieldName) || {}).dbFieldTxt
|
||||
if (title) {
|
||||
this.$refs.splitClauseDetail.title = title
|
||||
}
|
||||
this.$refs.splitClauseDetail.open(val)
|
||||
},
|
||||
// 表格选择改变
|
||||
onSelectChange (value, row) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRows = row
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.mb-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user