[update] 法规符合性排查流程

This commit is contained in:
lideqin
2024-07-08 16:31:27 +08:00
parent 401f15d761
commit 8d826a244e
6 changed files with 158 additions and 103 deletions
+3
View File
@@ -51,6 +51,8 @@ const regulatoryComplianceCheckGetDataDraft = (params) => getAction('/process/es
const selectStandardFromSplit = (params) => getAction('', params) const selectStandardFromSplit = (params) => getAction('', params)
// 法规工程师节点,获取条款表信息 // 法规工程师节点,获取条款表信息
const getClauseListInfo = (params) => getAction('', params) const getClauseListInfo = (params) => getAction('', params)
// 生成
const regulatoryComplianceCheckGenerate = (params) => postAction('/process/standardComplianceCheck/generate', params)
// 市场清单发布流程 // 市场清单发布流程
// 保存 // 保存
@@ -125,6 +127,7 @@ export {
regulatoryComplianceCheckGetDataDraft, regulatoryComplianceCheckGetDataDraft,
selectStandardFromSplit, selectStandardFromSplit,
getClauseListInfo, getClauseListInfo,
regulatoryComplianceCheckGenerate,
marketListReleaseSave, marketListReleaseSave,
marketListReleaseApproval, marketListReleaseApproval,
+5 -1
View File
@@ -46,7 +46,11 @@ module.exports = {
rectificationCost: 'Rectification cost', rectificationCost: 'Rectification cost',
sharedWithOtherProjects: 'Shared with other projects', sharedWithOtherProjects: 'Shared with other projects',
costOfThisItemAfterSharing: 'Cost of this item after sharing', costOfThisItemAfterSharing: 'Cost of this item after sharing',
appraiser: 'Appraiser' appraiser: 'Appraiser',
salvageListTemplateDownload: 'Split single file template download',
salvageListTemplateName: 'Decomposes a single file upload template',
carTypeFileTemplateDownload: 'Model project file template download',
carTypeFileTemplateName: 'Model project file upload template'
}, },
// 市场清单发布流程 // 市场清单发布流程
marketListReleaseProcess: { marketListReleaseProcess: {
+5 -1
View File
@@ -46,7 +46,11 @@ module.exports = {
rectificationCost: '整改费用', rectificationCost: '整改费用',
sharedWithOtherProjects: '与其他项目共用性', sharedWithOtherProjects: '与其他项目共用性',
costOfThisItemAfterSharing: '共用后本项目所需费用', costOfThisItemAfterSharing: '共用后本项目所需费用',
appraiser: '评估人' appraiser: '评估人',
salvageListTemplateDownload: '分解单文件模板下载',
salvageListTemplateName: '分解单文件上传模板',
carTypeFileTemplateDownload: '车型项目文件模板下载',
carTypeFileTemplateName: '车型项目文件上传模板'
}, },
// 市场清单发布流程 // 市场清单发布流程
marketListReleaseProcess: { marketListReleaseProcess: {
+16 -10
View File
@@ -147,7 +147,7 @@ export const ProcessKey = {
// 标准解读流程 // 标准解读流程
STANDARD_INTERPRETATION_PROCESS: { text: 'standard_interpret', value: 'standard_interpret' }, STANDARD_INTERPRETATION_PROCESS: { text: 'standard_interpret', value: 'standard_interpret' },
// 法规符合性排查流程 // 法规符合性排查流程
REGULATORY_COMPLIANCE_CHECK: { text: '', value: '' }, REGULATORY_COMPLIANCE_CHECK: { text: 'laws-evaluation-main', value: 'laws-evaluation-main' },
// 市场清单发布流程 // 市场清单发布流程
MARKET_LIST_RELEASE: { text: '', value: '' } MARKET_LIST_RELEASE: { text: '', value: '' }
} }
@@ -174,15 +174,15 @@ export const NewRegulationsImportNodes = new EsEnums({
// 法规符合性排查流程 // 法规符合性排查流程
export const RegulatoryComplianceCheckNodes = new EsEnums({ export const RegulatoryComplianceCheckNodes = new EsEnums({
initiated: { text: '法规工程师发起', value: '' }, initiated: { text: '法规工程师发起', value: 'sid-F144BD89-366F-482C-89DE-3AE2BD22D371' },
interfacesDistributed: { text: '各部门接口人分发', value: '' }, interfacesDistributed: { text: '各部门接口人分发', value: 'sid-F07416DD-65BF-499E-AC96-F7A407AA3CEB' },
mainFinderDistributes: { text: '主排查人分发', value: '' }, mainFinderDistributes: { text: '主排查人分发', value: 'sid-96A59284-7EE2-4F10-A327-F76BC26B95F8' },
designEngineerEvaluation: { text: '设计工程师评估', value: '' }, designEngineerEvaluation: { text: '设计工程师评估', value: 'sid-45FC4ED6-DB83-49E0-A080-55192B7860EB' },
mainFinderSingleLineAudit: { text: '主排查人单线审核', value: '' }, mainFinderSingleLineAudit: { text: '主排查人单线审核', value: 'sid-C9A2FE2E-8A8A-4846-8010-5AE4ECF14DFE' },
mainFinderCollect: { text: '主排查人汇总', value: '' }, mainFinderCollect: { text: '主排查人汇总', value: 'sid-A478E1B2-84B6-4884-875B-E6C53392BC4F' },
countersign: { text: '会签', value: '' }, countersign: { text: '会签', value: 'sid-D3B3377E-9392-44D6-81D5-9DDDA91FB083' },
designEngineerManagerReview: { text: '设计工程师科室经理审核', value: '' }, designEngineerManagerReview: { text: '设计工程师科室经理审核', value: 'sid-B253F229-2E92-4882-A054-EAA068069F0F' },
seniorManagerApproved: { text: '高级经理/技术官批准', value: '' } seniorManagerApproved: { text: '高级经理/技术官批准', value: 'sid-31D9FF6F-D1BE-4B02-910C-5DB7A5D0A626' }
}) })
// 市场清单发布流程节点 // 市场清单发布流程节点
@@ -240,3 +240,9 @@ export const EvaluationResult = {
NOT_INVOLVE: { text: '不涉及', value: '3' }, NOT_INVOLVE: { text: '不涉及', value: '3' },
TO_BE_VERIFIED: { text: '待验证', value: '4' } TO_BE_VERIFIED: { text: '待验证', value: '4' }
} }
// 法规符合性排查流程-新增方式
export const AddType = {
SELECT_STANDARD: { text: '选择标准', value: '1' },
MANUAL_ADD: { text: '手动新增', value: '2' }
}
@@ -18,6 +18,14 @@
<a-button icon="delete" type="danger" ghost @click="handleDelete" :disabled="disabled"> <a-button icon="delete" type="danger" ghost @click="handleDelete" :disabled="disabled">
{{ $t('delete') }} {{ $t('delete') }}
</a-button> </a-button>
<!-- 分解单模板下载 -->
<a-button icon="download" type="primary" ghost @click="salvageListTemplateDownload($t('workCenter.regulatoryComplianceCheckProcess.salvageListTemplateName'))" :disabled="disabled">
{{ $t('workCenter.regulatoryComplianceCheckProcess.salvageListTemplateDownload') }}
</a-button>
<!-- 车型项目文件模板下载 -->
<a-button icon="download" type="primary" ghost @click="carTypeFileTemplateDownload($t('workCenter.regulatoryComplianceCheckProcess.carTypeFileTemplateName'))" :disabled="disabled">
{{ $t('workCenter.regulatoryComplianceCheckProcess.carTypeFileTemplateDownload') }}
</a-button>
</div> </div>
<div> <div>
@@ -26,14 +34,15 @@
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
ref="table" ref="table"
rowKey="standardNumber" rowKey="standardNumber"
:columns="columns" :columns="standardColumns"
:dataSource="dataSource" :dataSource="standardDataSource"
:pagination="false" :pagination="false"
:loading="loading"> :loading="loading">
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell"> <div slot="action" slot-scope="{record}" class="action-span-cell">
<a @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a> <!-- 手动新增才允许编辑 -->
<a @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled || record.addType !== AddType.MANUAL_ADD.value">{{ $t('edit') }}</a>
</div> </div>
</j-table> </j-table>
@@ -49,10 +58,10 @@
{{ $t('workCenter.regulatoryComplianceCheckProcess.vehicleTypeItem') }} {{ $t('workCenter.regulatoryComplianceCheckProcess.vehicleTypeItem') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="vehicleTypeItem"> <a-form-model-item class="item-model" prop="modelFile">
<j-upload <j-upload
return-id return-id
v-model="formInline.vehicleTypeItem"> v-model="formInline.modelFile">
</j-upload> </j-upload>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -65,11 +74,12 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="applicableMarket"> <a-form-model-item class="item-model" prop="applicableMarket">
<j-dict-select-tag <s-tree-select
:placeholder="$t('pleaseSelect') + this.$t('applicableMarket')" v-model="formInline.applicableMarket"
dict-code="" :tree-data="countryOptions"
v-model="formInline.applicableMarket"> tree-checkable
</j-dict-select-tag> treeCheckStrictly
:placeholder="$t('pleaseSelect')+$t('applicableMarket')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 是否与上一版相同 --> <!-- 是否与上一版相同 -->
@@ -80,11 +90,11 @@
{{ $t('workCenter.regulatoryComplianceCheckProcess.isAlike') }} {{ $t('workCenter.regulatoryComplianceCheckProcess.isAlike') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="isAlike"> <a-form-model-item class="item-model" prop="isSameLastVersion">
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect') + this.$t('workCenter.regulatoryComplianceCheckProcess.isAlike')" :placeholder="$t('pleaseSelect') + this.$t('workCenter.regulatoryComplianceCheckProcess.isAlike')"
dict-code="yn" dict-code="yn"
v-model="formInline.isAlike"> v-model="formInline.isSameLastVersion">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -147,10 +157,10 @@
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
ref="table" ref="table"
rowKey="id" rowKey="id"
:columns="clauseColumns" :columns="columns"
:dataSource="clauseDataSource" :dataSource="dataSource"
:pagination="ipagination"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:pagination="false"
:loading="loading"> :loading="loading">
<!-- 标准编号、标准名称 --> <!-- 标准编号、标准名称 -->
@@ -182,17 +192,22 @@ import JTable from '@/components/jero/JTable'
import StandardSelectionModal from '@/components/selection/StandardSelectionModal' import StandardSelectionModal from '@/components/selection/StandardSelectionModal'
import { getForeignStandardDetail } from '@/api/standardRegulationLibraryApi' import { getForeignStandardDetail } from '@/api/standardRegulationLibraryApi'
import ManualAddModal from './ManualAddModal' import ManualAddModal from './ManualAddModal'
import { StandardSource } from '@/enums/commonEnums' import STreeSelect from '@/components/STreeSelect'
import { getClauseListInfo } from '@/api/workCenter' import { StandardSource, AddType } from '@/enums/commonEnums'
import { queryDepartTreeList } from '../../../../api/api' import { regulatoryComplianceCheckGenerate } from '@/api/workCenter'
import { getFormDictTreeList, queryDepartTreeList } from '../../../../api/api'
import { downloadFile } from '../../../../api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
export default { export default {
name: 'EngineerInitBaseInfo', name: 'EngineerInitBaseInfo',
components: { components: {
JTable, JTable,
ManualAddModal, ManualAddModal,
StandardSelectionModal StandardSelectionModal,
STreeSelect
}, },
mixins: [JeroListMixin],
props: { props: {
disabled: { disabled: {
type: Boolean, type: Boolean,
@@ -202,11 +217,12 @@ export default {
}, },
data () { data () {
return { return {
AddType,
loading: false, loading: false,
formInline: {}, formInline: {},
rules: { rules: {
// 车型项目 // 车型项目
vehicleTypeItem: [ modelFile: [
{ {
required: true, required: true,
message: this.$t('workCenter.regulatoryComplianceCheckProcess.vehicleTypeItem') + this.$t('cannotEmpty'), message: this.$t('workCenter.regulatoryComplianceCheckProcess.vehicleTypeItem') + this.$t('cannotEmpty'),
@@ -222,7 +238,7 @@ export default {
} }
], ],
// 是否与上一版相同 // 是否与上一版相同
isAlike: [ isSameLastVersion: [
{ {
required: true, required: true,
message: this.$t('workCenter.regulatoryComplianceCheckProcess.isAlike') + this.$t('cannotEmpty'), message: this.$t('workCenter.regulatoryComplianceCheckProcess.isAlike') + this.$t('cannotEmpty'),
@@ -230,7 +246,7 @@ export default {
} }
] ]
}, },
columns: [ standardColumns: [
{ // 标准编号 { // 标准编号
title: this.$t('standardNumber'), title: this.$t('standardNumber'),
align: 'center', align: 'center',
@@ -249,17 +265,18 @@ export default {
title: this.$t('standardState'), title: this.$t('standardState'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'standardState', dataIndex: 'standardState_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 分解单来源 { // 分解单来源
title: this.$t('workCenter.regulatoryComplianceCheckProcess.decompositionSingleSource'), title: this.$t('workCenter.regulatoryComplianceCheckProcess.decompositionSingleSource'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'decompositionSingleSource', dataIndex: 'splitFileSource',
customRender: (value, row, index) => { customRender: (value, row, index) => {
return <j-dict-select-tag return <j-dict-select-tag
v-model={row.decompositionSingleSource} style={{width: '100%'}}
v-model={row.splitFileSource}
dictCode={'decomposition_single_source'} dictCode={'decomposition_single_source'}
disabled={this.disabled} disabled={this.disabled}
placeholder={this.$t('pleaseSelect')} /> placeholder={this.$t('pleaseSelect')} />
@@ -269,14 +286,14 @@ export default {
title: this.$t('newProductionVehicleImplementationDate'), title: this.$t('newProductionVehicleImplementationDate'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'newProductionVehicleImplementationDate', dataIndex: 'newProductImplDate',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 新认证车实施日期 { // 新认证车实施日期
title: this.$t('newCertifiedVehicleImplementationDate'), title: this.$t('newCertifiedVehicleImplementationDate'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'newCertifiedVehicleImplementationDate', dataIndex: 'newAuthImplDate',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ {
@@ -287,7 +304,7 @@ export default {
width: 170 width: 170
} }
], ],
dataSource: [], standardDataSource: [],
isGetDataAfter: false, // 是否获取完数据了,获取完数据有的字段不显示placeholder isGetDataAfter: false, // 是否获取完数据了,获取完数据有的字段不显示placeholder
isGenerateAfter: false, // 是否点击了生成按钮 isGenerateAfter: false, // 是否点击了生成按钮
queryParam: {}, queryParam: {},
@@ -300,7 +317,7 @@ export default {
sm: { span: 18 } sm: { span: 18 }
}, },
categoryTreeList: [], // 组织机构下拉框数据 categoryTreeList: [], // 组织机构下拉框数据
clauseColumns: [ columns: [
{ {
title: this.$t('serialNumber'), title: this.$t('serialNumber'),
dataIndex: '', dataIndex: '',
@@ -361,14 +378,24 @@ export default {
width: 170 width: 170
} }
], ],
clauseDataSource: [], dataSource: [],
clauseDataList: [], // 防止查询数据丢失 clauseDataList: [], // 防止查询数据丢失
selectedRowKeys: [], selectedRowKeys: [],
selectionRows: [] selectionRows: [],
url: {
salvageListDownTemplateUrl: '/process/standardComplianceCheck/splitTemplateDownload', // 分解单上传模板
carTypeFileDownTemplateUrl: '/process/standardComplianceCheck/modelTemplateDownload', // 车型项目文件上传模板
list: '',
deleteBatch: '',
delete: ''
},
disableMixinCreated: true,
countryOptions: [] // 适用市场下拉框
} }
}, },
mounted () { mounted () {
this.getSysCategoryTree() this.getSysCategoryTree()
this.getCountryOption()
}, },
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
@@ -396,6 +423,13 @@ export default {
}) })
return data return data
}, },
getCountryOption () {
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
if (res.success) {
this.countryOptions = res.result
}
})
},
// 获取组织机构树 // 获取组织机构树
getSysCategoryTree () { getSysCategoryTree () {
queryDepartTreeList().then((res) => { queryDepartTreeList().then((res) => {
@@ -413,11 +447,13 @@ export default {
// 添加标准了,需要回显内容,返回流程名称 // 添加标准了,需要回显内容,返回流程名称
listChange (value) { listChange (value) {
console.log(value) console.log(value)
let obj let obj = {}
if (!value || value.length <= 0) { if (!value || value.length <= 0) {
obj = {} obj = {}
} else { } else {
this.loading = true this.loading = true
// 标准编号
obj.standardNumber = value[0].standardNumber
// 标准名称 // 标准名称
obj.standardName = value[0].standardName obj.standardName = value[0].standardName
// 根据返回的id查询标准数据 // 根据返回的id查询标准数据
@@ -426,20 +462,23 @@ export default {
const result = res.result const result = res.result
// 标准状态 // 标准状态
obj.standardState = result.standard_state obj.standardState = result.standard_state
obj.standardState_dictText = result.standard_state_dictText
// 分解单来源初始化成发布稿 // 分解单来源初始化成发布稿
obj.decompositionSingleSource = '1' obj.splitFileSource = '2'
// 新生产车实施日期 // 新生产车实施日期
obj.newProductImplDate = result.new_product_impl_date obj.newProductImplDate = result.new_product_impl_date
// 新认证车实施日期 // 新认证车实施日期
obj.newAuthImplDate = result.new_auth_impl_date obj.newAuthImplDate = result.new_auth_impl_date
this.dataSource[0] = obj // 新增方式-选择标准
obj.addType = AddType.SELECT_STANDARD.value
this.standardDataSource[0] = obj
this.isGetDataAfter = true this.isGetDataAfter = true
} }
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
}) })
this.$emit('processNameChange', (obj.standardNumber || '') + '-' + (obj.standardName || '') + '-' + '法规符合性排查')
} }
this.$emit('processNameChange', (obj.standardNumber || '') + '-' + (obj.standardName || '') + '-' + '法规符合性排查')
}, },
// 手动新增 // 手动新增
handleAdd () { handleAdd () {
@@ -453,7 +492,15 @@ export default {
}, },
// 手动新增或者编辑完的回调 // 手动新增或者编辑完的回调
manualAddOk (result, isEdit) { manualAddOk (result, isEdit) {
this.dataSource[0] = result console.log(result)
// 新增方式-手动新增
result.addType = AddType.MANUAL_ADD.value
if (!isEdit) {
// 新增,分解单来源设置为发布稿
result.splitFileSource = '2'
}
this.standardDataSource[0] = Object.assign({}, result)
this.$forceUpdate()
}, },
// 删除 // 删除
handleDelete () { handleDelete () {
@@ -461,10 +508,24 @@ export default {
title: this.$t('confirmDeletion'), title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'), content: this.$t('areYouSure'),
onOk: () => { onOk: () => {
this.dataSource = [] this.standardDataSource = []
} }
}) })
}, },
// 下载分解单上传模板
salvageListTemplateDownload (fileName, fileSuffix = '.xls') {
if (!fileName || typeof fileName !== 'string') {
fileName = '模板文件'
}
downloadFile(this.url.salvageListDownTemplateUrl, fileName + fileSuffix)
},
// 车型项目文件上传模板
carTypeFileTemplateDownload (fileName, fileSuffix = '.xls') {
if (!fileName || typeof fileName !== 'string') {
fileName = '模板文件'
}
downloadFile(this.url.carTypeFileDownTemplateUrl, fileName + fileSuffix)
},
// 跳转标准详情 // 跳转标准详情
toDetail (record) { toDetail (record) {
let path = '' let path = ''
@@ -483,60 +544,29 @@ export default {
}, },
// 生成 // 生成
handleGenerate () { handleGenerate () {
// 显示下方列表信息,生成列表信息 if (this.standardDataSource.length >= 1) {
this.isGenerateAfter = true this.$refs.ruleForm.validate(valid => {
if (this.dataSource.length < 1) { if (valid) {
// 有标准才可以获取 const param = Object.assign({}, this.standardDataSource[0], this.formInline)
this.clauseDataSource = [] param.applicableMarket = param.applicableMarket.map(item => item.value).join(',')
return regulatoryComplianceCheckGenerate(param).then(res => {
} if (res.success) {
// 获取下方列表信息 this.$message.success(res.message)
const param = {} // 显示下方列表信息
param.standardNumber = this.dataSource[0].standardNumber this.isGenerateAfter = true
// 分解单来源 // 获取下方列表信息
param.decompositionSingleSource = this.dataSource[0].decompositionSingleSource this.filters.pid = res.result
getClauseListInfo(param).then(res => { this.loadData(1)
if (res.success) { } else {
this.clauseDataSource = res.result this.$message.warning(res.message)
} }
}) })
},
// 查询
searchQuery () {
if (this.queryParam.authDept) {
this.clauseDataSource = this.clauseDataList.filter(item => {
return item.authDept + '' === this.queryParam.authDept + ''
})
} else {
this.dataSource = JSON.parse(JSON.stringify(this.clauseDataList))
}
this.selectedRowKeys = []
this.selectionRows = []
},
// 重置
searchReset () {
this.dataSource = JSON.parse(JSON.stringify(this.clauseDataList))
this.selectedRowKeys = []
this.selectionRows = []
},
batchDel () {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecord'))
} else {
this.$confirm({
title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
this.clauseDataSource = this.clauseDataSource.filter(item => !this.selectedRowKeys.includes(item.id))
this.clauseDataList = this.clauseDataList.filter(item => !this.selectedRowKeys.includes(item.id))
} }
}) })
} else {
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.pleaseAddStandard'))
} }
}, },
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
filterTreeOption (input, option) { filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -30,8 +30,10 @@
<a-form-item :labelCol="$i18n.locale === EN ? labelColEn : labelCol" <a-form-item :labelCol="$i18n.locale === EN ? labelColEn : labelCol"
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol" :wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
:label="$t('standardState')"> :label="$t('standardState')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardState')" <j-dict-select-tag ref="standardState"
:placeholder="$t('pleaseSelect') + $t('standardState')"
dict-code="standard_state" dict-code="standard_state"
@change="standardStateChange"
v-decorator="['standardState', validatorRules.standardState]" /> v-decorator="['standardState', validatorRules.standardState]" />
</a-form-item> </a-form-item>
<!-- 新生产车实施日期 --> <!-- 新生产车实施日期 -->
@@ -55,7 +57,7 @@
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol" :wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
:label="$t('workCenter.regulatoryComplianceCheckProcess.resolutionAttachment')"> :label="$t('workCenter.regulatoryComplianceCheckProcess.resolutionAttachment')">
<j-upload return-id <j-upload return-id
v-decorator="['resolutionAttachment', validatorRules.resolutionAttachment]" /> v-decorator="['splitFile', validatorRules.splitFile]" />
</a-form-item> </a-form-item>
</a-form> </a-form>
@@ -129,6 +131,12 @@ export default {
this.form.setFieldsValue(this.model) this.form.setFieldsValue(this.model)
}) })
}, },
// 标准状态改变
standardStateChange (value) {
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(',')
},
close () { close () {
this.visible = false this.visible = false
}, },
@@ -137,8 +145,8 @@ export default {
if (!err) { if (!err) {
this.confirmLoading = true this.confirmLoading = true
const isEdit = this.model.standardNumber const isEdit = this.model.standardNumber
const formData = Object.assign(this.model, values, isEdit) const formData = Object.assign(this.model, values)
this.$emit('ok', formData) this.$emit('ok', formData, isEdit)
this.confirmLoading = false this.confirmLoading = false
this.close() this.close()
} }