Merge branch 'master' into 标准拆分译文变更
# Conflicts: # src/common/lang/en-us.js # src/common/lang/zh-cn.js # src/views/documentTool/documentSplit/modules/SplitAddForm.vue # src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue
This commit is contained in:
+34
-1
@@ -659,7 +659,12 @@ export default {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
// 多行报错
|
||||
if (res.code === 500) {
|
||||
this.messageLineFeedByBr(this.$t('operationFailed'), res.message)
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}
|
||||
}).catch((err) => {
|
||||
if (err && err.message && tabList.includes(err.message)) {
|
||||
@@ -770,6 +775,34 @@ export default {
|
||||
return Promise.all(promiseList).catch(() => {
|
||||
throw new Error('base')
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 对包含<br/>的后端错误信息进行处理
|
||||
* @param title
|
||||
* @param content
|
||||
*/
|
||||
messageLineFeedByBr (title, content) {
|
||||
// 可以用分号和<br> </br> <br/>换行
|
||||
content = content.replace(/<br>|<\/br>|<br\/>/g, ';')
|
||||
const messageArr = content.split(';')
|
||||
const htmlDom = []
|
||||
messageArr.map(tt => {
|
||||
if (tt) {
|
||||
htmlDom.push((<div>{tt}</div>))
|
||||
}
|
||||
})
|
||||
this.$warning({
|
||||
title: title,
|
||||
closable: true,
|
||||
width: 800,
|
||||
content: () => <div>
|
||||
{htmlDom}
|
||||
</div>
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
||||
document.getElementsByClassName('ant-modal-confirm-content')[0].style = 'max-height: calc(100vh - 300px);overflow-y: auto;'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
-17
@@ -9,10 +9,9 @@
|
||||
<!-- 导入(标准主解读人节点 && 选择不分发时) -->
|
||||
<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" :disabled="disabledImport" ghost>{{ $t('import') }}</a-button>
|
||||
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
|
||||
</a-upload>
|
||||
<!-- 批量编辑(解读人填写) -->
|
||||
<a-button type="primary" ghost @click="handleBatchEdit" v-if="showBatchEditBtn">
|
||||
@@ -56,9 +55,9 @@
|
||||
:nameStr="record.interpretPersonIds_dictText" />
|
||||
</template>
|
||||
<template v-slot:action="{text, record}">
|
||||
<a v-if="showEditBtn" @click="handleEdit(record)" class="table-ope-btn">{{ $t('edit') }}</a>
|
||||
<a v-if="showEditBtn" :disabled="disabled" @click="handleEdit(record)" class="table-ope-btn">{{ $t('edit') }}</a>
|
||||
<a-divider v-if="showEditBtn && showDeleteBtn" type="vertical" />
|
||||
<a v-if="showDeleteBtn" @click="handleDelete(record[rowKey])" class="operate-del-btn">{{ $t('delete') }}</a>
|
||||
<a v-if="showDeleteBtn" :disabled="disabled" @click="handleDelete(record[rowKey])" class="operate-del-btn">{{ $t('delete') }}</a>
|
||||
</template>
|
||||
</j-table>
|
||||
<!--条文内容-->
|
||||
@@ -201,7 +200,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'isSameAsPrevVersion_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 相对上一版变化点说明
|
||||
title: this.$t('workCenter.standardInterpretationProcess.explanationOfChangePoints'),
|
||||
@@ -229,7 +228,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'keyController_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 责任部门
|
||||
title: this.$t('workCenter.standardInterpretationProcess.responsibleDepartment'),
|
||||
@@ -243,7 +242,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'responsibleModule_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 关联部门
|
||||
title: this.$t('workCenter.standardInterpretationProcess.relatedDepartments'),
|
||||
@@ -257,35 +256,35 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'relatedModule_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 适用车型
|
||||
title: this.$t('workCenter.standardInterpretationProcess.applications'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'applications_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 动力类型
|
||||
title: this.$t('workCenter.standardInterpretationProcess.powerType'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'powerType_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 专业领域
|
||||
title: this.$t('workCenter.standardInterpretationProcess.professionalField'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'domainArea_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 配置需求
|
||||
title: this.$t('workCenter.standardInterpretationProcess.configurationRequirements'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'configurationRequirements_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // 新认证车实施日期
|
||||
title: this.$t('workCenter.standardInterpretationProcess.newCertificationImplementationDate'),
|
||||
@@ -376,7 +375,7 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'investigationStage_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'dictText' }
|
||||
},
|
||||
{ // P3证明符合性的交付物名称
|
||||
title: this.$t('workCenter.standardInterpretationProcess.pThree'),
|
||||
@@ -473,7 +472,7 @@ export default {
|
||||
columns.push(...this.columnsExtend)
|
||||
}
|
||||
// 非禁用时,需要操作的节点就加上操作列
|
||||
if (!this.disabled && !noActionCoumnsNodes.includes(this.currentNodeId)) {
|
||||
if (!noActionCoumnsNodes.includes(this.currentNodeId)) {
|
||||
columns.push(this.actionColumn)
|
||||
}
|
||||
return columns
|
||||
@@ -579,9 +578,9 @@ export default {
|
||||
* @param info
|
||||
*/
|
||||
handleImport (info) {
|
||||
// 限制导入大于500MB
|
||||
if (info.file.size > 1024 * 1024 * 500) {
|
||||
this.$message.error('导入文件最大500MB!')
|
||||
// 限制导入大于20MB
|
||||
if (info.file.size > 1024 * 1024 * 20) {
|
||||
this.$message.error(this.$t('importMaxMsg', { size: '20MB' }))
|
||||
info.fileList.pop()
|
||||
return
|
||||
}
|
||||
@@ -937,6 +936,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.clause-table-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
+56
-28
@@ -26,14 +26,13 @@
|
||||
<j-dict-select-tag dict-code="yn"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.sameAsPreviousVersion')"
|
||||
@nameChange="(name) => nameChange(name, 'isSameAsPrevVersion')"
|
||||
@dictChange="(name) => dictChange(name, 'isSameAsPrevVersion')"
|
||||
v-decorator="['isSameAsPrevVersion']"/>
|
||||
</a-form-item>
|
||||
<!--相对上一版变化点说明-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.explanationOfChangePoints')" :colon="false">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.standardInterpretationProcess.explanationOfChangePoints')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.standardInterpretationProcess.explanationOfChangePoints')"
|
||||
:maxLength="50"
|
||||
:disabled="disabled"
|
||||
v-decorator="['changeDescription']" />
|
||||
</a-form-item>
|
||||
@@ -46,26 +45,33 @@
|
||||
</a-form-item>
|
||||
<!--涉及系统/部件-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.involvingSystemsComponents')" :colon="false">
|
||||
<tree-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.involvingSystemsComponents')"
|
||||
filedName="partName"
|
||||
type="checkbox"
|
||||
options-href="/laws/standard/partName/"
|
||||
:nameStr="model.partName"
|
||||
:disabled="disabled"
|
||||
@nameChange="nameChange"
|
||||
v-decorator="['partName']" />
|
||||
<tree-data-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.involvingSystemsComponents')"
|
||||
v-decorator="['partName']"
|
||||
fieldName="partName"
|
||||
:nameStr="model.partName_dictText"
|
||||
:disabled="disabled"
|
||||
@nameChange="nameChange"
|
||||
optionsHref="/laws/standard/partName/queryFirstList"/>
|
||||
<!--<tree-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.involvingSystemsComponents')"-->
|
||||
<!-- filedName="partName"-->
|
||||
<!-- type="checkbox"-->
|
||||
<!-- options-href="/laws/standard/partName/"-->
|
||||
<!-- :nameStr="model.partName_dictText"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- @nameChange="nameChange"-->
|
||||
<!-- v-decorator="['partName']" />-->
|
||||
</a-form-item>
|
||||
<!--关键控制器-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.keyController')" :colon="false">
|
||||
<j-multi-select-tag dict-code="key_controller"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.keyController')"
|
||||
@nameChange="(name) => nameChange(name, 'keyController')"
|
||||
@dictChange="(name) => dictChange(name, 'keyController')"
|
||||
v-decorator="['keyController']"/>
|
||||
</a-form-item>
|
||||
<!--责任部门-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.responsibleDepartment')" :colon="false">
|
||||
<j-select-depart :placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.responsibleDepartment')"
|
||||
<j-select-depart :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.responsibleDepartment')"
|
||||
:backDepart="true"
|
||||
:disabled="disabled"
|
||||
multi
|
||||
@@ -79,12 +85,12 @@
|
||||
<j-multi-select-tag dict-code="responsible_module"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.responsibleDepartmentModule')"
|
||||
@nameChange="(name) => nameChange(name, 'responsibleModule')"
|
||||
@dictChange="(name) => dictChange(name, 'responsibleModule')"
|
||||
v-decorator="['responsibleModule']"/>
|
||||
</a-form-item>
|
||||
<!--关联部门-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.relatedDepartments')" :colon="false">
|
||||
<j-select-depart :placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.relatedDepartments')"
|
||||
<j-select-depart :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.relatedDepartments')"
|
||||
:backDepart="true"
|
||||
:disabled="disabled"
|
||||
multi
|
||||
@@ -98,7 +104,7 @@
|
||||
<j-multi-select-tag dict-code="related_module"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.relatedDepartmentsModule')"
|
||||
@nameChange="(name) => nameChange(name, 'relatedModule')"
|
||||
@dictChange="(name) => dictChange(name, 'relatedModule')"
|
||||
v-decorator="['relatedModule']"/>
|
||||
</a-form-item>
|
||||
<!--适用车型-->
|
||||
@@ -106,7 +112,7 @@
|
||||
<j-multi-select-tag dict-code="applicable_vehicle_type"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.applications')"
|
||||
@nameChange="(name) => nameChange(name, 'applications')"
|
||||
@dictChange="(name) => dictChange(name, 'applications')"
|
||||
v-decorator="['applications']"/>
|
||||
</a-form-item>
|
||||
<!--动力类型-->
|
||||
@@ -114,7 +120,7 @@
|
||||
<j-multi-select-tag dict-code="dynamic_type"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.powerType')"
|
||||
@nameChange="(name) => nameChange(name, 'powerType')"
|
||||
@dictChange="(name) => dictChange(name, 'powerType')"
|
||||
v-decorator="['powerType']"/>
|
||||
</a-form-item>
|
||||
<!--专业领域-->
|
||||
@@ -126,6 +132,7 @@
|
||||
tree-checkable
|
||||
treeCheckStrictly
|
||||
@change="treeNameChange($event, 'domainArea')"
|
||||
:replaceFields="{title: isChinese() ? 'title' : 'enTitle'}"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.professionalField')"/>
|
||||
</a-form-item>
|
||||
<!--配置需求-->
|
||||
@@ -133,26 +140,26 @@
|
||||
<j-multi-select-tag dict-code="configuration_requirements"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.configurationRequirements')"
|
||||
@nameChange="(name) => nameChange(name, 'configurationRequirements')"
|
||||
@dictChange="(name) => dictChange(name, 'configurationRequirements')"
|
||||
v-decorator="['configurationRequirements']"/>
|
||||
</a-form-item>
|
||||
<!--新认证车实施日期-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.newCertificationImplementationDate')" :colon="false">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.newCertificationImplementationDate')"
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.newCertificationImplementationDate')"
|
||||
fieldName="newCerImplementDate"
|
||||
:disabled="disabled"
|
||||
v-decorator="['newCerImplementDate']" />
|
||||
</a-form-item>
|
||||
<!--新生产车实施日期-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.newProduceImplementationDate')" :colon="false">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.newProduceImplementationDate')"
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.newProduceImplementationDate')"
|
||||
fieldName="newProductionImplementation"
|
||||
:disabled="disabled"
|
||||
v-decorator="['newProductionImplementation']" />
|
||||
</a-form-item>
|
||||
<!--注册日期-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.registrationDate')" :colon="false">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.registrationDate')"
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.registrationDate')"
|
||||
fieldName="registrationDate"
|
||||
:disabled="disabled"
|
||||
v-decorator="['registrationDate']" />
|
||||
@@ -160,7 +167,7 @@
|
||||
<!--企业标准-->
|
||||
<a-form-item :label="$t('workCenter.standardInterpretationProcess.enterpriseStandards')" :colon="false">
|
||||
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.enterpriseStandards')"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.enterpriseStandards')"
|
||||
:disabled="disabled"
|
||||
:disabledSourceSearch="true"
|
||||
type="radio"
|
||||
@@ -228,7 +235,7 @@
|
||||
<j-multi-select-tag dict-code="investigation_stage"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.investigationStage')"
|
||||
@nameChange="(name) => nameChange(name, 'investigationStage')"
|
||||
@dictChange="(name) => dictChange(name, 'investigationStage')"
|
||||
v-decorator="['investigationStage']"/>
|
||||
</a-form-item>
|
||||
<!--P3证明符合性的交付物名称-->
|
||||
@@ -267,13 +274,14 @@
|
||||
<script>
|
||||
import JMultipleDatePicker from '@comp/JMultipleDatePicker'
|
||||
import StandardSelection from '@comp/selection/StandardSelection'
|
||||
import TreeSelection from '@comp/selection/TreeSelection'
|
||||
import { StandardSource } from '@/enums/commonEnums'
|
||||
import STreeSelect from '@comp/STreeSelect'
|
||||
import { getFormDictTreeList } from '@api/api'
|
||||
import { findNodeByField } from '@/utils/util'
|
||||
import TreeDataSelection from '@comp/selection/TreeDataSelection'
|
||||
export default {
|
||||
name: 'InterpretationClauseTableModal',
|
||||
components: { STreeSelect, TreeSelection, StandardSelection, JMultipleDatePicker },
|
||||
components: { TreeDataSelection, STreeSelect, StandardSelection, JMultipleDatePicker },
|
||||
data () {
|
||||
return {
|
||||
StandardSource,
|
||||
@@ -346,6 +354,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 字典回显
|
||||
dictChange (dict, field) {
|
||||
console.log('字典回显', dict, field)
|
||||
if (Array.isArray(dict)) {
|
||||
this.model[field + '_dictText'] = dict.map(item => item.text).join(',')
|
||||
this.model[field + '_dictTextEn'] = dict.map(item => item.enText).join(',')
|
||||
} else if (dict) {
|
||||
this.model[field + '_dictText'] = dict.text
|
||||
this.model[field + '_dictTextEn'] = dict.enText
|
||||
} else {
|
||||
this.model[field + '_dictText'] = ''
|
||||
this.model[field + '_dictTextEn'] = ''
|
||||
}
|
||||
},
|
||||
// 下拉多选获取名称
|
||||
nameChange (name, field) {
|
||||
this.model[field + '_dictText'] = name
|
||||
@@ -355,15 +377,21 @@ export default {
|
||||
// 如果没有值就清空名字
|
||||
if (!depart) {
|
||||
this.model[field + '_dictText'] = ''
|
||||
this.model[field + '_dictTextEn'] = ''
|
||||
}
|
||||
},
|
||||
// 部门名称
|
||||
departNameChange (departList, field) {
|
||||
this.model[field + '_dictText'] = departList.map(item => item.text).join(',')
|
||||
this.model[field + '_dictTextEn'] = departList.map(item => item.text).join(',')
|
||||
},
|
||||
// 下拉树名称
|
||||
treeNameChange (list, field) {
|
||||
this.model[field + '_dictText'] = list.map(item => item.label).join(',')
|
||||
console.log('tree', list, field)
|
||||
// 通过value查找对应节点
|
||||
const nodes = list.map(item => findNodeByField(this.professionalFieldTreeList, item.value, 'value'))
|
||||
this.model[field + '_dictText'] = nodes.map(item => item.title).join(',')
|
||||
this.model[field + '_dictTextEn'] = nodes.map(item => item.enTitle).join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-2
@@ -220,7 +220,10 @@ export default {
|
||||
importParams: {
|
||||
standardInterp: '',
|
||||
standardId: '',
|
||||
splitInfoId: ''
|
||||
splitInfoId: '',
|
||||
nodeId: '',
|
||||
taskId: '',
|
||||
projectId: ''
|
||||
},
|
||||
// 禁用导入,分解单来源是不带入时
|
||||
disabledImport: false
|
||||
@@ -306,11 +309,13 @@ export default {
|
||||
return obj
|
||||
},
|
||||
setData (data) {
|
||||
console.log(data)
|
||||
const info = data.data.processStandardInterpret || {}
|
||||
this.importParams.standardInterp = info.id
|
||||
this.importParams.standardId = info.standardId
|
||||
this.importParams.splitInfoId = info.splitInfoId
|
||||
this.importParams.nodeId = this.$route.query.nodeId
|
||||
this.importParams.taskId = this.$route.query.taskId
|
||||
this.importParams.projectId = this.$route.query.projectId
|
||||
this.dataSource = [info]
|
||||
this.formInline = info
|
||||
// 默认是少的条款表格
|
||||
@@ -352,6 +357,9 @@ export default {
|
||||
this.isNextStep = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.interpretationClauseTable.setData(this.clauseDataSource)
|
||||
if (!this.isDistribute) {
|
||||
this.userForm.setFieldsValue(this.formInline)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user