[update] 法规符合性排查流程
This commit is contained in:
+27
-13
@@ -179,7 +179,7 @@ import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import { RegulatoryComplianceCheckNodes, ProcessKey } from '../../../enums/commonEnums'
|
||||
import {
|
||||
getDataDraft,
|
||||
getDataDraft, getLookData,
|
||||
regulatoryComplianceCheckAgree, regulatoryComplianceCheckApproval,
|
||||
regulatoryComplianceCheckGetDataById,
|
||||
regulatoryComplianceCheckReject,
|
||||
@@ -273,6 +273,14 @@ export default {
|
||||
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
|
||||
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
|
||||
}
|
||||
if (this.$route.query.isLook + '' === '1') {
|
||||
// 是查看
|
||||
this.isLook = true
|
||||
// 人员信息全部不可选
|
||||
this.initPersonInfoData(false)
|
||||
// 查询数据
|
||||
this.getProcessData('look', { snapshotId: this.$route.query.snapshotId })
|
||||
}
|
||||
if (this.$route.query.taskName) {
|
||||
// 说明是已发起流程
|
||||
this.currentNodeName = this.$route.query.taskName
|
||||
@@ -291,6 +299,7 @@ export default {
|
||||
currentNodeName: '',
|
||||
currentNodeId: RegulatoryComplianceCheckNodes.initiated.value, // 当前节点id
|
||||
model: {},
|
||||
draftModel: {}, // 草稿Json转化的对象
|
||||
processInfoForm: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@@ -341,7 +350,8 @@ export default {
|
||||
},
|
||||
formInline: {},
|
||||
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
|
||||
personnelInfoData: []
|
||||
personnelInfoData: [],
|
||||
isLook: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -353,6 +363,9 @@ export default {
|
||||
if (type === 'todo') {
|
||||
func = regulatoryComplianceCheckGetDataById
|
||||
params = param.taskId
|
||||
} else if (type === 'look') {
|
||||
func = getLookData
|
||||
params = param
|
||||
} else {
|
||||
func = getDataDraft
|
||||
params = param
|
||||
@@ -374,24 +387,25 @@ export default {
|
||||
}
|
||||
// 有草稿json按草稿进来的回显
|
||||
if (this.model.infoJsonStr) {
|
||||
this.model = JSON.parse(this.model.infoJsonStr)
|
||||
this.draftModel = JSON.parse(this.model.infoJsonStr)
|
||||
// 初始化流程信息
|
||||
const prcObj = Object.assign({}, this.model)
|
||||
prcObj.processDueDate = this.model.processDueDate
|
||||
prcObj.processDescription = this.model.processDescription
|
||||
this.processInfoForm.setFieldsValue(pick(prcObj, 'processName', 'processDueDate', 'processDescription'))
|
||||
if (this.currentNode !== 1) {
|
||||
// 需要回显上方的标准编号/标准名称和适用市场
|
||||
// 标准编号/标准名称
|
||||
this.draftModel.basicProcessInfoDTO.standardNumberName = this.draftModel.businessInfoDTO.standardInfo.standardNumber + ' ' + this.model.businessInfoDTO.standardInfo.standardName
|
||||
// 适用市场
|
||||
this.draftModel.basicProcessInfoDTO.applicableMarket_dictText = this.draftModel.businessInfoDTO.standardInfo.applicableMarket_dictText
|
||||
}
|
||||
this.processInfoForm.setFieldsValue(pick(this.draftModel.basicProcessInfoDTO, 'processName', 'processDueDate', 'processDescription', 'standardNumberName', 'applicableMarket_dictText'))
|
||||
// 初始化流程审批信息
|
||||
prcObj.handleText = this.model.handleText
|
||||
prcObj.handleFile = this.model.handleFile
|
||||
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'handleText', 'handleFile'))
|
||||
this.model.data = JSON.parse(this.model.infoJsonStr).data
|
||||
this.approvalInfoForm.setFieldsValue(pick(this.draftModel.basicTaskInfoDTO, 'handleText', 'handleFile'))
|
||||
// 如果是节点1的保存回显人员信息
|
||||
if (this.currentNode === 1) {
|
||||
this.draftInitPersonInfo(JSON.parse(this.model.infoJsonStr).personnelObj)
|
||||
this.draftInitPersonInfo(this.draftModel.userInfoMap)
|
||||
}
|
||||
}
|
||||
if (this.$refs.baseInfoRef) {
|
||||
this.$refs.baseInfoRef.initData(this.model.data)
|
||||
this.$refs.baseInfoRef.initData(this.draftModel.businessInfoDTO || this.model.businessInfoDTO)
|
||||
}
|
||||
})
|
||||
// 初始化业务基本信息中组件内容
|
||||
|
||||
+73
-14
@@ -39,6 +39,23 @@
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
|
||||
<!-- 分解单来源是添加标准的标准的话,显示下拉框,否则显示上传的分解单或者空 -->
|
||||
<template v-slot:splitFileSource="{record}" class="action-span-cell">
|
||||
<!-- 通过添加标准新增的 -->
|
||||
<j-dict-select-tag v-if="record.addType === AddType.SELECT_STANDARD.value"
|
||||
style="width: '100%'"
|
||||
v-model="record.splitFileSource"
|
||||
dict-code="decomposition_single_source"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')" />
|
||||
<!-- 手动新增的显示上传的分解单或者空 -->
|
||||
<a-tooltip v-else overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ record.splitFile_dictText ? record.splitFile_dictText : global.emptyLine }}</template>
|
||||
<a v-if="record.splitFile" class="link-a" @click="handleSplitFile(record)">{{ record.splitFile_dictText }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{record}" class="action-span-cell">
|
||||
<!-- 手动新增才允许编辑 -->
|
||||
@@ -201,8 +218,17 @@ import ManualAddModal from './ManualAddModal'
|
||||
import { StandardSource, AddType } from '@/enums/commonEnums'
|
||||
import { regulatoryComplianceCheckGenerate } from '@/api/workCenter'
|
||||
import { getFormDictTreeList, queryDepartTreeList } from '../../../../api/api'
|
||||
import { downloadFile } from '../../../../api/manage'
|
||||
import MarketRegulationsListSelection from '../../../../components/selection/MarketRegulationsListSelection'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN, USER_INFO } from '@/store/mutation-types'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { getFileAccessHttpUrl, downloadFile } from '@/api/manage'
|
||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
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)
|
||||
@@ -282,14 +308,15 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'splitFileSource',
|
||||
customRender: (value, row, index) => {
|
||||
return <j-dict-select-tag
|
||||
style={{ width: '100%' }}
|
||||
v-model={row.splitFileSource}
|
||||
dictCode={'decomposition_single_source'}
|
||||
disabled={this.disabled}
|
||||
placeholder={this.$t('pleaseSelect')} />
|
||||
}
|
||||
scopedSlots: { customRender: 'splitFileSource' }
|
||||
// customRender: (value, row, index) => {
|
||||
// return <j-dict-select-tag
|
||||
// style={{ width: '100%' }}
|
||||
// v-model={row.splitFileSource}
|
||||
// dictCode={'decomposition_single_source'}
|
||||
// disabled={this.disabled}
|
||||
// placeholder={this.$t('pleaseSelect')} />
|
||||
// }
|
||||
},
|
||||
{ // 新生产车实施日期
|
||||
title: this.$t('newProductionVehicleImplementationDate'),
|
||||
@@ -537,10 +564,6 @@ export default {
|
||||
console.log(result)
|
||||
// 新增方式-手动新增
|
||||
result.addType = AddType.MANUAL_ADD.value
|
||||
if (!isEdit) {
|
||||
// 新增,分解单来源设置为发布稿
|
||||
result.splitFileSource = '2'
|
||||
}
|
||||
this.standardDataSource[0] = Object.assign({}, result)
|
||||
this.$emit('processNameChange', (result.standardNumber || '') + '-' + (result.standardName || '') + '-' + '法规符合性排查')
|
||||
this.$forceUpdate()
|
||||
@@ -704,7 +727,43 @@ export default {
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
},
|
||||
// 点击相关材料
|
||||
handleSplitFile (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.splitFile_dictText ? record.splitFile_dictText.split('.')[record.splitFile_dictText.split('.').length - 1] : ''
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.splitFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.splitFile_dictText}`
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
this.$message.loading(this.$t('uploadFile.cannotPreview')).then(() => {
|
||||
this.handleDownload(record.splitFile, record.splitFile_dictText)
|
||||
})
|
||||
return
|
||||
}
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.splitFile)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
// 调用show方法进行显示预览图
|
||||
viewer.show()
|
||||
// this.$refs.imagePreviewModal.open(file)
|
||||
return
|
||||
}
|
||||
// pdf预览
|
||||
if (FILE_TYPE_PDF.includes(fileSuffix.toLowerCase())) {
|
||||
const url = previewPdf(record.splitFile)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
kkFilePreview(fileFullUrl)
|
||||
},
|
||||
handleDownload (id, name) {
|
||||
// 下载文件
|
||||
downloadFile(`/sys/common/download/${id}`, name)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+19
-2
@@ -35,8 +35,9 @@
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
</j-table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,6 +71,18 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
@@ -150,6 +163,10 @@ export default {
|
||||
})
|
||||
return data
|
||||
},
|
||||
handleTableChange (pagination, filters, sorter) {
|
||||
// 分页、排序、筛选变化时触发
|
||||
this.ipagination = pagination
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
|
||||
@@ -40,23 +40,31 @@
|
||||
<a-form-item :labelCol="$i18n.locale === EN ? labelColEn : labelCol"
|
||||
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
|
||||
:label="$t('newProductionVehicleImplementationDate')">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('newProductionVehicleImplementationDate')"
|
||||
fieldName="newProductImplDate"
|
||||
v-decorator="['newProductImplDate', validatorRules.newProductImplDate]" />
|
||||
<a-date-picker style="width: 100%"
|
||||
:placeholder="$t('pleaseSelect') + $t('newProductionVehicleImplementationDate')"
|
||||
format="YYYY-MM-DD"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
v-decorator="['newProductImplDate', validatorRules.newProductImplDate]" />
|
||||
</a-form-item>
|
||||
<!-- 新认证车实施日期 -->
|
||||
<a-form-item :labelCol="$i18n.locale === EN ? labelColEn : labelCol"
|
||||
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
|
||||
:label="$t('newCertifiedVehicleImplementationDate')">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('newCertifiedVehicleImplementationDate')"
|
||||
fieldName="newAuthImplDate"
|
||||
v-decorator="['newAuthImplDate', validatorRules.newAuthImplDate]" />
|
||||
<a-date-picker style="width: 100%"
|
||||
:placeholder="$t('pleaseSelect') + $t('newCertifiedVehicleImplementationDate')"
|
||||
format="YYYY-MM-DD"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
v-decorator="['newAuthImplDate', validatorRules.newAuthImplDate]" />
|
||||
</a-form-item>
|
||||
<!-- 分解单附件 -->
|
||||
<a-form-item :labelCol="$i18n.locale === EN ? labelColEn : labelCol"
|
||||
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
|
||||
:label="$t('workCenter.regulatoryComplianceCheckProcess.resolutionAttachment')">
|
||||
<j-upload return-id
|
||||
ref="splitFileRef"
|
||||
:multiple="false"
|
||||
:number="1"
|
||||
@change="splitFileChange"
|
||||
v-decorator="['splitFile', validatorRules.splitFile]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@@ -137,6 +145,10 @@ export default {
|
||||
const arr = this.$refs.standardState.dictOptions.filter(item => valueArr.includes(item.value))
|
||||
this.model.standardState_dictText = arr.map(item => item.title).join(',')
|
||||
},
|
||||
// 上传拆解单文件改变
|
||||
splitFileChange (value) {
|
||||
this.model.splitFile_dictText = this.$refs.splitFileRef.fileList[0].name
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user