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:
danshihao
2024-08-14 17:15:31 +08:00
152 changed files with 3192 additions and 1176 deletions
@@ -61,7 +61,10 @@
<template v-if="currentNode !== 1">
<!-- 清单编号 -->
<a-col :span="24">
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('listNumber')" :colon="formItemColon">
<a-form-item
:labelCol="$i18n.locale === EN ? longLabelColEn : longLabelCol"
:wrapperCol="$i18n.locale === EN ? longWrapperColEn : longWrapperCol"
:label="$t('listNumber')" :colon="formItemColon">
<a-input placeholder=""
disabled
:maxLength="50"
@@ -70,7 +73,10 @@
</a-col>
<!-- 清单名称 -->
<a-col :span="24">
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('listName')" :colon="formItemColon">
<a-form-item
:labelCol="$i18n.locale === EN ? longLabelColEn : longLabelCol"
:wrapperCol="$i18n.locale === EN ? longWrapperColEn : longWrapperCol"
:label="$t('listName')" :colon="formItemColon">
<a-input placeholder=""
disabled
:maxLength="50"
@@ -79,7 +85,10 @@
</a-col>
<!-- 国家/地区 -->
<a-col :span="24">
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('countryRegion')" :colon="formItemColon">
<a-form-item
:labelCol="$i18n.locale === EN ? longLabelColEn : longLabelCol"
:wrapperCol="$i18n.locale === EN ? longWrapperColEn : longWrapperCol"
:label="$t('countryRegion')" :colon="formItemColon">
<s-tree-select v-decorator="['country', validatorRules.country]"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
@@ -571,21 +580,17 @@ export default {
},
// 转办选完人的回调
userSelectModalChange (userIds) {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.userId = userIds
param.taskId = this.$route.query.taskId
processTransfer(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
this.loading = true
const param = {}
param.userId = userIds
param.taskId = this.$route.query.taskId
processTransfer(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
@@ -51,6 +51,7 @@
tree-checkable
treeCheckStrictly
disabled
:replaceFields="{title: isChinese() ? 'title' : 'enTitle'}"
:placeholder="disabled ? '' : $t('autoTakeout')" />
</a-form-model-item>
</div>
@@ -213,21 +214,21 @@ export default {
align: 'center',
width: 180,
dataIndex: 'country_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 适用车型
title: this.$t('workCenter.marketListReleaseProcess.applicableVehicleType'),
align: 'center',
width: 180,
dataIndex: 'applicableVehicle_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 认证对象
title: this.$t('workCenter.marketListReleaseProcess.authenticationObject'),
align: 'center',
width: 180,
dataIndex: 'authenticationObject_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 认证交付物
title: this.$t('workCenter.marketListReleaseProcess.certifiedDeliverables'),
@@ -241,14 +242,14 @@ export default {
align: 'center',
width: 180,
dataIndex: 'type_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 动力类型
title: this.$t('workCenter.marketListReleaseProcess.dynamicType'),
align: 'center',
width: 180,
dataIndex: 'dynamicType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 主控部门
title: this.$t('workCenter.marketListReleaseProcess.mainControlDepartment'),
@@ -262,7 +263,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'mainDeptProfMode_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 关联部门
title: this.$t('workCenter.marketListReleaseProcess.relatedDepartment'),
@@ -276,14 +277,14 @@ export default {
align: 'center',
width: 180,
dataIndex: 'associateDeptProfMode_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 要求类型
title: this.$t('workCenter.marketListReleaseProcess.requirementType'),
align: 'center',
width: 180,
dataIndex: 'requireType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 备注
title: this.$t('remarks'),
@@ -498,21 +498,17 @@ export default {
},
// 转办选完人的回调
userSelectModalChange (userIds) {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.userId = userIds
param.taskId = this.$route.query.taskId
processTransfer(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
this.loading = true
const param = {}
param.userId = userIds
param.taskId = this.$route.query.taskId
processTransfer(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
@@ -124,9 +124,40 @@
tree-checkable
treeCheckStrictly
:disabled="disabled"
:replaceFields="{title: isChinese() ? 'title' : 'enTitle'}"
:placeholder="disabled ? '' : $t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.applicableMarket')" />
</a-form-model-item>
</div>
<!-- 主管部门 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.newRegulationImportProcess.competentDepartment')">
{{ $t('workCenter.newRegulationImportProcess.competentDepartment') }}
</span>
</div>
<a-form-model-item class="item-model" prop="competentDepartment">
<j-select-depart v-model="formInline.competentDepartment"
:disabled="disabled"
:multi="true"
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 主控部门 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.newRegulationImportProcess.mainControlDepartment')">
{{ $t('workCenter.newRegulationImportProcess.mainControlDepartment') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainControlDepartment">
<j-select-depart v-model="formInline.mainControlDepartment"
:disabled="disabled"
:multi="true"
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 抄送人员 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -146,7 +177,7 @@
</a-form-model-item>
</div>
<!-- 法规要求简要描述 -->
<div class="box-title-text form-flex-item">
<div class="box-title-text form-flex-item form-flex-item-full">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.newRegulationImportProcess.briefDescription')">
{{ $t('workCenter.newRegulationImportProcess.briefDescription') }}
@@ -226,6 +257,22 @@ export default {
trigger: 'change'
}
],
// 主管部门
competentDepartment: [
{
required: true,
message: this.$t('workCenter.newRegulationImportProcess.competentDepartment') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 主控部门
mainControlDepartment: [
{
required: true,
message: this.$t('workCenter.newRegulationImportProcess.mainControlDepartment') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 抄送人员
copyUser: [
{
@@ -328,4 +375,8 @@ export default {
/deep/ .ant-form-item-children > * {
width: 100%;
}
.form-flex-item-full {
width: 100%;
}
</style>
@@ -97,7 +97,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'prcType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 流程名称
title: this.$t('processName'),
@@ -140,7 +140,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'prcStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{
title: this.$t('operation'),
@@ -75,7 +75,7 @@ export default {
align: 'center',
width: 300,
dataIndex: 'prcType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 流程名称
title: this.$t('processName'),
@@ -113,7 +113,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'prcType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 流程名称
title: this.$t('processName'),
@@ -162,7 +162,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'prcStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{
title: this.$t('operation'),
@@ -117,7 +117,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'prcType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 流程名称
title: this.$t('processName'),
@@ -160,7 +160,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'prcStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{
title: this.$t('operation'),
@@ -112,7 +112,7 @@ export default {
align: 'center',
width: 260,
dataIndex: 'prcType_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 流程名称
title: this.$t('processName'),
@@ -148,7 +148,7 @@
<!-- 主排查人分发设计工程师评估 -->
<template v-else-if="[3, 4].includes(currentNode)">
<!-- 驳回 -->
<a-button type="danger" ghost :loading="loading" @click="handleReject" icon="close" :disabled="rejectDisabled">{{ $t('reject') }}</a-button>
<a-button v-if="!rejectDisabled" type="danger" ghost :loading="loading" @click="handleReject" icon="close">{{ $t('reject') }}</a-button>
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
@@ -628,21 +628,17 @@ export default {
},
// 转办选完人的回调
userSelectModalChange (userIds) {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.userId = userIds
param.taskId = this.$route.query.taskId
processTransfer(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
this.loading = true
const param = {}
param.userId = userIds
param.taskId = this.$route.query.taskId
processTransfer(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
@@ -4,7 +4,7 @@
<div>
<j-expand-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="expandTable"
rowKey="id"
:columns="columns"
@@ -18,7 +18,10 @@
<!--条文内容-->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -29,8 +32,10 @@
style="width: 100%"
:placeholder="$t('pleaseSelect')"
dict-code="evaluation_result"
:getPopupContainer="(node) => node.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode"
:disabled="disabled"
@change="resultChange(record)"
@dropdownVisibleChange="resultDropdownVisibleChange"
v-model="record.result">
</j-dict-select-tag>
</template>
@@ -105,7 +110,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 评价结果
title: this.$t('workCenter.regulatoryComplianceCheckProcess.evaluationResult'),
@@ -298,6 +303,19 @@ export default {
}
return data
},
// 点击评估结果,滚动条滚动到最后
resultDropdownVisibleChange (open) {
if (!open) {
return
}
const table = this.$refs.expandTable
if (table) {
const scrollBox = table.$el.querySelector('.ant-table-body')
if (scrollBox) {
scrollBox.scrollLeft = scrollBox.scrollWidth
}
}
},
// 评估结果改变,清空备注和佐证材料,不满足要求的现状,整改方案,整改周期,整改费用,与其他项目共用性,共用后本项目所需费用
resultChange (record) {
const index = this.dataSource.findIndex(item => item.id === record.id)
@@ -321,6 +339,8 @@ export default {
}
</script>
<style scoped>
<style scoped lang="less">
.dropdown-class {
z-index: 9999
}
</style>
@@ -91,9 +91,10 @@
<j-upload
return-id
v-model="formInline.modelFile"
fileType="xlsx,xls"
fileType="xls"
:number="1"
:multiple="false"
@change="modelFileChange"
:disabled="isRejectedData">
</j-upload>
</a-form-model-item>
@@ -113,11 +114,12 @@
@numberChange="marketRegulationNumberChange"
:name-str="formInline.applicableMarketNo"
:disabled="isRejectedData"
selectOnly
:placeholder="$t('pleaseSelect')+$t('applicableMarket')" />
</a-form-model-item>
</div>
<!-- 是否与上一版相同 -->
<div class="box-title-text form-flex-item">
<!-- 是否与上一版相同,是添加标准的新增的数据并且分解单来源不是不带入时显示 -->
<div v-if="standardDataSource[0] && standardDataSource[0].standardId && standardDataSource[0].splitFileSource !== DecompositionSource.NO_INPUT.value" class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.regulatoryComplianceCheckProcess.isAlike')">
@@ -129,6 +131,7 @@
:placeholder="$t('pleaseSelect') + this.$t('workCenter.regulatoryComplianceCheckProcess.isAlike')"
dict-code="yn"
:disabled="isRejectedData"
@change="isSameLastVersionChange"
v-model="formInline.isSameLastVersion">
</j-dict-select-tag>
</a-form-model-item>
@@ -191,7 +194,7 @@
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="uid"
:columns="columns"
@@ -211,7 +214,10 @@
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -219,7 +225,7 @@
<!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell">
<a @click="handleDelete(record.uid)" class="operate-del-btn" :disabled="disabled">{{ $t('delete') }}</a>
<a @click="handleDelete(record.uid)" class="operate-del-btn" :class="disabled ? 'del-btn-disabled' : ''" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
@@ -265,7 +271,7 @@ const FILE_TYPE_PDF = 'pdf'
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10)
return '-' + parseInt(Math.random() * 1000000 + 1, 10)
}
export default {
@@ -287,6 +293,7 @@ export default {
data () {
return {
StandardSource,
DecompositionSource,
loading: false,
formInline: {},
splitFileSourceList: [], // 标准分解单下拉
@@ -336,7 +343,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'standardState_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 分解单来源
title: this.$t('workCenter.regulatoryComplianceCheckProcess.decompositionSingleSource'),
@@ -444,7 +451,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 责任部门
title: this.$t('responsibleDepartment'),
@@ -475,7 +482,8 @@ export default {
id: ''
}
},
isRejectedData: false // 是否是被驳回的
isRejectedData: false, // 是否是被驳回的
isChangeStandardAfterClickGenerate: true // 是否修改标准后点击了生成按钮
}
},
mounted () {
@@ -495,6 +503,11 @@ export default {
if (this.standardDataSource[0].standardId) {
this.initInterpretGetFileByStandardId(this.standardDataSource[0].standardId)
}
// 如果是json回显的话会有改完标准是否重新点击了生成
console.log('------------isChangeStandardAfterClickGenerate', data.isChangeStandardAfterClickGenerate)
if (data.isChangeStandardAfterClickGenerate) {
this.isChangeStandardAfterClickGenerate = data.isChangeStandardAfterClickGenerate === '1'
}
const formInline = {}
formInline.modelFile = data.standardInfo.modelFile
formInline.applicableMarket = data.standardInfo.applicableMarket
@@ -518,6 +531,8 @@ export default {
// 组合businessInfoDTO,抛出
const data = {}
data.standardInfo = Object.assign({}, this.standardDataSource[0], this.formInline)
// 更换标准后是否重新生成了,保存json的时候存一下,防止保存之前改了标准,再次办理的时候直接提交校验不到改了标准
data.isChangeStandardAfterClickGenerate = this.isChangeStandardAfterClickGenerate ? '1' : '0'
data.detailInfoList = JSON.parse(JSON.stringify(this.dataList))
return data
},
@@ -530,6 +545,11 @@ export default {
// 提示请先生成数据
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.pleaseGenerate'))
data = false
} else if (!this.isChangeStandardAfterClickGenerate) {
// 改了标准之后没有点击生成按钮
// 提示请重新生成数据
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.pleaseAnewGenerate'))
data = false
} else {
data.standardInfo = Object.assign({}, this.standardDataSource[0], this.formInline)
data.detailInfoList = JSON.parse(JSON.stringify(this.dataList))
@@ -563,8 +583,20 @@ export default {
},
// 分解单来源修改
splitFileSourceChange () {
// 修改了数据没有点击生成按钮
this.isChangeStandardAfterClickGenerate = false
this.$forceUpdate()
},
// 车型项目修改
modelFileChange () {
// 修改了数据没有点击生成按钮
this.isChangeStandardAfterClickGenerate = false
},
// 是否与上一版相同切换
isSameLastVersionChange () {
// 修改了数据没有点击生成按钮
this.isChangeStandardAfterClickGenerate = false
},
// 显示条款内容弹框
showContent (val) {
this.$refs.splitClauseDetail.open(val)
@@ -615,6 +647,7 @@ export default {
// 标准状态
obj.standardState = result.standard_state
obj.standardState_dictText = result.standard_state_dictText
obj.standardState_dictTextEn = result.standard_state_dictTextEn
// 分解单来源初始化成不带入
obj.splitFileSource = DecompositionSource.NO_INPUT.value
// 新生产车实施日期
@@ -623,6 +656,8 @@ export default {
obj.newAuthImplDate = result.new_auth_impl_date
this.standardDataSource[0] = obj
this.isGetDataAfter = true
// 修改了标准没有点击生成按钮
this.isChangeStandardAfterClickGenerate = false
} else {
this.$message.warning(res.message)
}
@@ -646,6 +681,8 @@ export default {
manualAddOk (result, isEdit) {
console.log(result)
this.standardDataSource[0] = Object.assign({}, result)
// 修改了标准没有点击生成按钮
this.isChangeStandardAfterClickGenerate = false
this.$emit('processNameChange', (result.standardNumber || '') + '-' + (result.standardName || '') + '-' + '法规符合性排查')
this.$forceUpdate()
},
@@ -689,6 +726,10 @@ export default {
this.$emit('loading', true)
// 获取下方那个表格信息
const param = Object.assign({}, this.standardDataSource[0], this.formInline)
// 如果是添加标准分解单来源是不带入或者是手动新增的,是否与上一版相同设置成空
if ((param.standardId && param.splitFileSource === DecompositionSource.NO_INPUT.value) || !param.standardId) {
param.isSameLastVersion = undefined
}
regulatoryComplianceCheckGenerate(param).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -699,6 +740,8 @@ export default {
})
this.dataSource = JSON.parse(JSON.stringify(dataSource))
this.dataList = JSON.parse(JSON.stringify(dataSource))
// 点击了生成按钮
this.isChangeStandardAfterClickGenerate = true
} else {
if (Array.isArray(res.message) && res.message.length > 0) {
this.messageLineFeed(this.$t('fileUploadError'), res.message)
@@ -4,7 +4,7 @@
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="standardNumber"
:columns="columns"
@@ -15,7 +15,10 @@
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -99,7 +102,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 责任部门
title: this.$t('responsibleDepartment'),
@@ -120,7 +123,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'result_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 不满足要求的现状
title: this.$t('workCenter.regulatoryComplianceCheckProcess.theStatusNotMeetRequirements'),
@@ -30,7 +30,7 @@
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="id"
:columns="columns"
@@ -40,7 +40,10 @@
@change="handleTableChange">
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -138,7 +141,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
}
],
dataSource: [],
@@ -11,7 +11,7 @@
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="standardNumber"
:columns="columns"
@@ -22,7 +22,10 @@
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -190,7 +193,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 责任部门
title: this.$t('responsibleDepartment'),
@@ -211,7 +214,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'result_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 不满足要求的现状
title: this.$t('workCenter.regulatoryComplianceCheckProcess.theStatusNotMeetRequirements'),
@@ -172,6 +172,7 @@ export default {
resultChange (value) {
this.model.result = value
this.model.result_dictText = this.$refs.resultRef.dictOptions.find(item => item.value === value).text
this.model.result_dictTextEn = this.$refs.resultRef.dictOptions.find(item => item.value === value).enText
// 清空备注和佐证材料,不满足要求的现状,整改方案,整改周期,整改费用,与其他项目共用性,共用后本项目所需费用
this.model.remark = ''
this.model.material = ''
@@ -40,7 +40,7 @@
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="id"
:columns="columns"
@@ -51,7 +51,10 @@
@change="handleTableChange">
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -65,7 +68,7 @@
<!-- 操作区域 -->
<div v-if="!disabled" class="table-operator">
<!-- 导入 -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" :data="importData" @change="handleImportExcel">
<a-button icon="download" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 导出, 文件名称标准编号+标准名称+符合性排查 -->
@@ -77,7 +80,7 @@
<div>
<j-expand-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="expandTable"
rowKey="id"
:columns="columnsEvaluate"
@@ -91,7 +94,10 @@
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -102,8 +108,10 @@
style="width: 100%"
:placeholder="disabled ? '' : $t('pleaseSelect')"
dict-code="evaluation_result"
:getPopupContainer="(node) => node.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode"
:disabled="disabled"
@change="resultChange(record)"
@dropdownVisibleChange="resultDropdownVisibleChange"
v-model="record.result">
</j-dict-select-tag>
</template>
@@ -224,6 +232,9 @@ export default {
},
exportFileName () {
return this.formInline.standardNumber + this.formInline.standardName + '符合性排查'
},
importData () {
return {taskId: this.$route.query.taskId}
}
},
data () {
@@ -321,7 +332,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 设计工程师
title: this.$t('designEngineer'),
@@ -375,7 +386,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 评价结果
title: this.$t('workCenter.regulatoryComplianceCheckProcess.evaluationResult'),
@@ -860,6 +871,19 @@ export default {
// 显示条款内容弹框
showContent (val) {
this.$refs.splitClauseDetail.open(val)
},
// 点击评估结果,滚动条滚动到最后
resultDropdownVisibleChange (open) {
if (!open) {
return
}
const table = this.$refs.expandTable
if (table) {
const scrollBox = table.$el.querySelector('.ant-table-body')
if (scrollBox) {
scrollBox.scrollLeft = scrollBox.scrollWidth
}
}
}
}
}
@@ -4,7 +4,7 @@
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="standardNumber"
:columns="columns"
@@ -15,7 +15,10 @@
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -113,7 +116,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 责任部门
title: this.$t('responsibleDepartment'),
@@ -134,7 +137,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'result_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 不满足要求的现状
title: this.$t('workCenter.regulatoryComplianceCheckProcess.theStatusNotMeetRequirements'),
@@ -14,7 +14,7 @@
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: '50vh'}"
ref="table"
rowKey="id"
:columns="columns"
@@ -25,7 +25,10 @@
@change="handleTableChange">
<!-- 条款内容 -->
<template slot="item_content" slot-scope="{text, record}">
<div class="table-text" v-if="text || text === 0" @click="showContent(text,record)">
<a class="link-a" v-if="text && !text.replace(/<.*?>/ig, '')" @click="showContent(text,record)">
{{ $t('view') }}
</a>
<div class="table-text" v-else-if="text || text === 0" @click="showContent(text,record)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
@@ -116,7 +119,7 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modelStatus_dictText',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'dictText' }
},
{ // 设计工程师
title: this.$t('designEngineer'),
@@ -62,7 +62,7 @@
:label="$t('workCenter.regulatoryComplianceCheckProcess.resolutionAttachment')">
<j-upload return-id
ref="splitFileRef"
fileType="xlsx,xls"
fileType="xls"
:multiple="false"
:number="1"
@change="splitFileChange"
@@ -147,6 +147,7 @@ export default {
const valueArr = value.split(this.$refs.standardState.spliter)
const arr = this.$refs.standardState.dictOptions.filter(item => valueArr.includes(item.value))
this.model.standardState_dictText = arr.map(item => item.title).join(',')
this.model.standardState_dictTextEn = arr.map(item => item.enText).join(',')
},
// 上传拆解单文件改变
splitFileChange (value) {
@@ -166,6 +167,8 @@ export default {
const isEdit = this.model.standardNumber
const formData = Object.assign(values)
formData.splitFile_dictText = this.model.splitFile_dictText
formData.standardState_dictText = this.model.standardState_dictText
formData.standardState_dictTextEn = this.model.standardState_dictTextEn
this.$emit('ok', formData, isEdit)
this.confirmLoading = false
this.close()
@@ -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;'
})
}
}
}
@@ -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;
}
@@ -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(',')
}
}
}
@@ -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)
}
})
}
})