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