add 法规合规评估流程

This commit is contained in:
赵霄
2024-01-19 15:15:36 +08:00
parent cf8972a5f0
commit 2bc9657ba7
7 changed files with 530 additions and 4 deletions
+13 -1
View File
@@ -250,6 +250,14 @@ const agreeNoMatchTrackingProcess = (params) => postAction('/process/projectNotM
// 驳回
const rejectNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/reject', params)
/* 法规合规评估 */
// 同意
const agreeStandardCompliance = (params) => postAction('/process/projectStandard/agree', params)
// 驳回
const rejectStandardCompliance = (params) => postAction('/process/projectStandard/reject', params)
// 查询流程信息
const queryStandardCompliance = (params) => getAction('/process/projectStandard/queryProcessInfoVO', params)
export {
queryPermissionsByUser,
getFormDictTreeList,
@@ -368,5 +376,9 @@ export {
queryNoMatchTrackingProcess,
agreeNoMatchTrackingProcess,
rejectNoMatchTrackingProcess
rejectNoMatchTrackingProcess,
agreeStandardCompliance,
rejectStandardCompliance,
queryStandardCompliance
}
+6
View File
@@ -331,5 +331,11 @@ module.exports = {
relevantProject: '相关项目',
designEngineer: '设计工程师',
estimatedDateOfCompletionOfRectification: '预计整改完成日期'
},
standardCompliance: {
standardNumberName: '标准编号/标准名称',
projectApproval: '项目审批',
implementationDate: '实施日期',
vehicleModel: '车型'
}
}
+25 -3
View File
@@ -67,7 +67,7 @@ export const ProcessKey = {
// 未符合项跟踪流程
NO_MATCH_TRACKING: { text: 'project-not-met', value: 'project-not-met' },
// 法规合规评估流程
REGULATORY_COMPLIANCE_ASSESSMENT: { text: 'fb-standard-compliance-assessment', value: 'fb-standard-compliance-assessment' },
REGULATORY_COMPLIANCE_ASSESSMENT: { text: 'standard-assessment', value: 'standard-assessment' },
// 法规采购流程
LEGAL_PROCUREMENT: { text: 'fb-standard-purchase', value: 'fb-standard-purchase' },
// 企标稽查计划
@@ -102,8 +102,18 @@ export const EsInitChangeNodes = new EsEnums({
mainDrafterStart: { text: '主起草人发起', value: 'sid-7120EF36-78C3-4DB0-8B49-91178F79C24B' },
contactCheck: { text: '部所联络人校对', value: 'sid-BB1FF9A5-89DF-4356-AB16-9D68B8FABC04', isMobile: true },
expertApproval: { text: '专家审批', value: 'sid-ABE29414-15C7-4798-B690-E53055F6CA75', isMobile: true },
leaderApproval: { initiationText: '发起人主管级领导审批', changeText: '主起草人主管级领导审批', value: 'sid-A58C400F-BA13-4125-9B00-45EB45F1A559', isMobile: true },
leaderLeaderApproval: { initiationText: '发起人主管级上一级领导审批', changeText: '主起草人主管级上一级领导审批', value: 'sid-298A57B6-6658-47C0-94EB-76E3A5790258', isMobile: true },
leaderApproval: {
initiationText: '发起人主管级领导审批',
changeText: '主起草人主管级领导审批',
value: 'sid-A58C400F-BA13-4125-9B00-45EB45F1A559',
isMobile: true
},
leaderLeaderApproval: {
initiationText: '发起人主管级上一级领导审批',
changeText: '主起草人主管级上一级领导审批',
value: 'sid-298A57B6-6658-47C0-94EB-76E3A5790258',
isMobile: true
},
standardizationApproval: { text: '标准化审批', value: 'sid-06CB29CE-E39F-4CD2-A534-18546DC8C6FB', isMobile: true },
newDraftUnitLeaderLeaderSend: {
text: '新起草部门主管级上一级领导下发',
@@ -300,3 +310,15 @@ export const NoMatchTrackingNodes = new EsEnums({
directorLevelLeader: { text: '主管级领导审批', value: 'zgjldsp', btn: ['return', 'save', 'agree', 'reject'], isMobile: true },
regulatoryEngineer: { text: '法规工程师审批', value: 'fggcssp', btn: ['return', 'save', 'agree', 'reject'], isMobile: true }
})
// 法规合规评估流程
export const StandardComplianceNodes = new EsEnums({
initial: { text: '法规工程师发起', value: 'fggcsfq', btn: ['save', 'submit'] },
departLeaderIssue: { text: '部所主管级领导下发', value: 'bszgjldxf', btn: ['return', 'save', 'submit'] },
moduleOwnerIssue: { text: '模块责任人分发', value: 'mkzrrff', btn: ['return', 'save', 'submit'] },
designEngineerAssess: { text: '设计工程师评估', value: 'sjgcspg', btn: ['return', 'save', 'submit'] },
moduleOwnerReview: { text: '模块责任人审批', value: 'mkzrrsp', btn: ['return', 'save', 'agree', 'reject'], isMobile: true },
departLeaderApprove: { text: '部所主管级领导审批', value: 'bszgjldsp', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineerApprove: { text: '法规工程师审批', value: 'fggcssp', btn: ['return', 'save', 'agree', 'reject'] },
designEngineerWriteProject: { text: '设计工程师补充立项项目号', value: 'sjgcsbcgzlbh', btn: ['submit'] }
})
+10
View File
@@ -179,5 +179,15 @@ export default [
hasBack: true
},
component: () => import('@/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess')
},
// 法规合规评估流程
{
path: '/workCenter/StandardComplianceProcess',
name: 'StandardComplianceProcess',
meta: {
hasNavBar: true,
hasBack: true,
},
component: () => import('@/views/workCenter/standardComplianceProcess/StandardComplianceProcess')
}
]
+4
View File
@@ -68,6 +68,10 @@ export default {
case '4':
path = '/workCenter/NoMatchTrackingProcess'
break
// 法规合规评估流程
case '5':
path = '/workCenter/StandardComplianceProcess'
break
// 法规采购流程
case '6':
path = '/workCenter/StandardProcurementProcess'
@@ -84,6 +84,8 @@
<template v-slot:serialNumber="{text,record,index}">
{{ parseInt(index) + 1 }}
</template>
<!--条文内容-->
<template v-slot:content="{text}">
<div class="table-text" v-if="!!text" @click="handleShowContentDetail(text)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
@@ -0,0 +1,470 @@
<template>
<process-common-layout class="page-box" :loading="loading" :process-key="ProcessKey.REGULATORY_COMPLIANCE_ASSESSMENT.value">
<template v-slot:process>
<!--流程信息-->
<div class="process-part">
<div class="process-part-title">{{ $t('processInformation') }}</div>
<van-form input-align="right" label-width="8.7em">
<!--流程名称-->
<van-field v-model="processInfo.processName"
:label="$t('processName')"
type="textarea"
autosize
readonly
rows="1"
:placeholder="global.emptyLine || $t('pleaseEnter')+$t('processName')"
:border="false" />
<!--截止日期-->
<van-field v-model="processInfo.processDueDate"
:label="$t('expirationDate')"
type="textarea"
autosize
readonly
rows="1"
:placeholder="global.emptyLine || $t('pleaseSelect')+$t('expirationDate')"
:border="false" />
<!--流程说明-->
<van-field v-model="processInfo.processDescription"
:label="$t('processExplain')"
type="textarea"
autosize
disabled
rows="1"
:placeholder="$t('pleaseEnter')+$t('processExplain')"
:border="false"
input-align="left"
class="vertical-form-item">
</van-field>
<!--标准编号/标准名称-->
<van-field v-model="standardNumberName"
:label="$t('standardCompliance.standardNumberName')"
type="textarea"
autosize
readonly
rows="1"
:placeholder="global.emptyLine || $t('pleaseEnter')+$t('standardCompliance.standardNumberName')"
:border="false" />
</van-form>
</div>
<!--项目审批-->
<div class="process-part">
<div class="process-part-title">{{ $t('standardCompliance.projectApproval') }}</div>
<a-table :columns="columns"
:dataSource="dataSource"
bordered
rowKey="id"
:pagination="ipagination"
:scroll="{x: '100%'}"
@change="handleTableChange">
<!--默认的插槽-->
<template v-slot:text="text">
{{ text || text === 0 ? text : global.emptyLine }}
</template>
<!--条文内容-->
<template v-slot:clauseContent="text">
<div class="table-text" v-if="!!text" @click="handleShowContentDetail(text)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div v-else>{{ global.emptyLine }}</div>
</template>
<!--文件-->
<template v-slot:file="text">
<a class="can-click-table-text" v-if="!!text" @click="handleShowFile(text)">{{ $t('look') }}</a>
<div v-else>{{ global.emptyLine }}</div>
</template>
</a-table>
</div>
<!--流程审批信息-->
<div class="process-part">
<div class="process-part-title">{{ $t('processApprovalInfo') }}</div>
<van-form input-align="right" ref="approvalForm">
<!--备注-->
<van-field v-model="approvalInfo.handleText"
:label="$t('remark')"
type="textarea"
autosize
:maxlength="500"
rows="1"
:placeholder="$t('pleaseEnter')+$t('remark')"
:border="false"
input-align="left"
:required="rules.handleText[0].required"
:rules="rules.handleText"
class="vertical-form-item">
</van-field>
<!--附件-->
<van-field readonly :label="$t('attachment')" class="attach-form-item" input-align="left">
<template v-slot:input>
<z-upload v-model="approvalInfo.handleFile" />
</template>
</van-field>
</van-form>
</div>
</template>
<template v-slot:operation>
<!--转办-->
<van-button class="operation-common-btn" @click="handleTurnTo">
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="xunhuan" />
</template>
{{ $t('turnTo') }}
</van-button>
<!--同意-->
<van-button icon="revoke" class="operation-common-btn" type="primary" @click="handleAgree">
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="check" />
</template>
{{ $t('agree') }}
</van-button>
<!--驳回-->
<van-button icon="revoke" class="operation-common-btn light-color-button" @click="handleReject">
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="close" />
</template>
{{ $t('reject') }}
</van-button>
</template>
<!--转办选人-->
<select-user ref="selectUser" @selected-change="continueTurnTo" />
<!--条款内容-->
<van-popup v-model="showContentDetail"
closeable
round
position="bottom"
safe-area-inset-bottom
:style="{ height: '50%' }">
<div class="content-detail-text" v-html="contentDetail"></div>
</van-popup>
<!--文件列表-->
<van-popup v-model="showFileList"
closeable
round
position="bottom"
safe-area-inset-bottom
:style="{ height: '50%' }">
<div class="content-detail-text">
<file-display :file-ids="showFileIds" />
</div>
</van-popup>
</process-common-layout>
</template>
<script>
import ProcessCommonLayout from '../../../components/ProcessCommonLayout'
import { ProcessKey, StandardComplianceNodes } from '../../../enums/commonEnums'
import SelectUser from '../../../components/SelectUser'
import { agreeStandardCompliance, processTransfer, queryStandardCompliance, rejectStandardCompliance } from '../../../api/api'
import ZExpandTable from '../../../components/ZExpandTable'
import FileDisplay from '../../../components/FileDisplay'
import ZUpload from '../../../components/ZUpload'
export default {
name: 'StandardComplianceProcess',
components: { ZUpload, FileDisplay, ZExpandTable, SelectUser, ProcessCommonLayout },
data () {
return {
ProcessKey,
loading: false,
showContentDetail: false,
contentDetail: null,
processInfo: {},
approvalInfo: {},
standardInfo: {},
standardNumberName: null,
businessId: null,
columns: [
// 序号
{
title: this.$t('serialNumber'),
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
// 标准编号/条款号
{
dataIndex: 'termNumber',
title: this.$t('projectCompliance.standardNumberClauseNumber'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 标准名称/条款名称
{
dataIndex: 'termName',
title: this.$t('projectCompliance.standardNameClauseName'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 条款内容
{
dataIndex: 'termText',
title: this.$t('projectCompliance.terms'),
width: 250,
align: 'center',
scopedSlots: { customRender: 'clauseContent' }
},
// 实施日期
{
title: this.$t('standardCompliance.implementationDate'),
width: 180,
dataIndex: 'implementation_date',
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 设计工程师
{
title: this.$t('standardConsultation.designEngineer'),
dataIndex: 'designEngineer_dictText',
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 评估结果
{
dataIndex: 'assessResults_dictText',
title: this.$t('projectCompliance.evaluationResult'),
width: 120,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 车型
{
dataIndex: 'modelSeries_dictText',
title: this.$t('standardCompliance.vehicleModel'),
width: 100,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 依据描述
{
dataIndex: 'description',
title: this.$t('standardConsultation.basisDescription'),
width: 250,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 佐证材料
{
dataIndex: 'fileId',
title: this.$t('standardConsultation.supportingMaterial'),
width: 100,
align: 'center',
scopedSlots: { customRender: 'file' }
}
],
dataSource: [],
/* 分页参数 */
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
},
showFileList: false,
showFileIds: null,
rules: {
handleText: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remark'), trigger: 'onBlur' }]
}
}
},
created () {
this.initProcessData()
},
methods: {
initProcessData () {
this.loading = true
const params = {
processInstanceId: this.$route.query.processInstanceId,
taskId: this.$route.query.taskId
}
queryStandardCompliance(params).then(res => {
if (res.success) {
let { result = {} } = res
if (result.infoJsonStr) {
result = JSON.parse(result.infoJsonStr)
}
this.businessId = result.businessId
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {}, { taskId: this.$route.query.taskId })
this.standardInfo = Object.assign({}, result.businessInfoDTO.processProjectStandard || {})
this.standardNumberName = `${this.standardInfo.standardNumber} ${this.standardInfo.standardName}`
this.dataSource = result.businessInfoDTO.processProjectStandardTermList || []
} else {
this.$message(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 转办
*/
handleTurnTo () {
this.$refs.selectUser.open()
},
continueTurnTo (userId) {
const params = {
taskId: this.$route.query.taskId,
userId
}
this.loading = true
processTransfer(params).then(res => {
this.$message(res.message)
if (res.success) {
this.goBack()
}
}).finally(() => {
this.loading = false
})
},
goBack () {
let timer = setTimeout(() => {
clearTimeout(timer)
timer = null
this.$router.go(-1)
}, 700)
},
handleShowContentDetail (text) {
this.contentDetail = text
this.showContentDetail = true
},
handleTableChange (pagination) {
this.ipagination = pagination
},
handleShowFile (fileIds) {
this.showFileList = true
this.showFileIds = fileIds
},
async dealFormData () {
let flag = true
const basicProcessInfoDTO = { ...this.processInfo }
const approvalValidateResult = await this.validateForm('approvalForm')
let basicTaskInfoDTO
if (approvalValidateResult) {
basicTaskInfoDTO = { ...this.approvalInfo, taskId: this.$route.query.taskId }
} else {
flag = false
this.$message(this.$t('pleaseEnterRemarks'))
}
if (!flag) {
return false
}
return {
basicProcessInfoDTO,
basicTaskInfoDTO,
businessId: this.businessId,
businessInfoDTO: {
processProjectStandard: { ...this.standardInfo },
processProjectStandardTermList: this.dataSource
}
}
},
validateForm (formName) {
let flag = true
return new Promise(resolve => {
if (this.$refs[formName]) {
this.$refs[formName].validate().then(() => {
}).catch(() => {
flag = false
}).finally(() => {
resolve(flag)
})
} else {
resolve(flag)
}
})
},
/**
* 同意
*/
async handleAgree () {
this.rules.handleText[0].required = false
if (!this.approvalInfo.handleText) {
this.approvalInfo.handleText = '同意'
}
const formData = await this.dealFormData()
if (!formData) {
return
}
this.loading = true
agreeStandardCompliance(formData).then(res => {
this.$message(res.message)
if (res.success) {
this.goBack()
}
}).finally(() => {
this.loading = false
})
},
/**
* 驳回
*/
async handleReject () {
this.rules.handleText[0].required = true
const formData = await this.dealFormData()
if (!formData) {
return
}
this.loading = true
rejectStandardCompliance(formData).then(res => {
this.$message(res.message)
if (res.success) {
this.goBack()
}
}).finally(() => {
this.loading = false
})
}
},
// 组件内路由拦截
beforeRouteEnter (to, from, next) {
// 如果不是移动端支持的节点,就跳转NoMobile
const key = StandardComplianceNodes.keyOfValueByLike(to.query.nodeId)
if (!StandardComplianceNodes[key].isMobile) {
next({ path: '/noMobile' })
}
next()
}
}
</script>
<style scoped lang="less">
@import '~../../../assets/less/common.less';
.content-detail-text {
height: calc(100% - 54px);
margin-top: 54px;
padding: @pad-base;
overflow: auto;
word-break: break-word;
}
.table-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.can-click-table-text {
color: @primary-color;
}
</style>