update 法规合规评估流程

This commit is contained in:
赵霄
2024-01-19 16:31:48 +08:00
parent 40792ad0a1
commit da81933e11
6 changed files with 195 additions and 56 deletions
+4 -1
View File
@@ -420,6 +420,8 @@ const agreeStandardCompliance = (params) => postAction('/process/projectStandard
const rejectStandardCompliance = (params) => postAction('/process/projectStandard/reject', params)
// 查询流程信息
const queryStandardCompliance = (params) => getAction('/process/projectStandard/queryProcessInfoVO', params)
// 查询评估结果
const queryStandardComplianceResult = (params) => getAction('/process/projectStandard/getTermUserList', params)
export {
getProcessNodeList,
@@ -632,5 +634,6 @@ export {
submitStandardCompliance,
agreeStandardCompliance,
rejectStandardCompliance,
queryStandardCompliance
queryStandardCompliance,
queryStandardComplianceResult
}
@@ -94,7 +94,7 @@
<module-owner-approve-table v-if="isModuleOwnerApprove" ref="termList" :display-data-source="dispatchDataSource" />
<!--部所主管级领导审批-->
<depart-leader-approve-table v-if="isDepartLeaderApprove" />
<depart-leader-approve-table v-if="isDepartLeaderApprove" ref="termList" :display-data-source="dispatchDataSource"/>
<!--法规工程师审批-->
<regulatory-engineer-approval v-if="isRegulatoryEngineerApproval" />
@@ -447,7 +447,7 @@ export default {
} else {
processProjectStandard = { ...this.selectedStandard }
}
flag = !!processProjectStandard
flag = !flag ? false : !!processProjectStandard
// 条款列表
let processProjectStandardTermList
const needRemind = this.$refs.standardList ? processProjectStandard && processProjectStandard.id : true
@@ -459,7 +459,7 @@ export default {
if (this.$refs.asyncTermList) {
processProjectStandardTermList = await this.$refs.asyncTermList.submit(true, needRemind)
}
flag = !!processProjectStandardTermList
flag = !flag ? false : !!processProjectStandardTermList
if (!flag) {
this.switchValue = 'base'
return false
@@ -3,11 +3,19 @@
<div>
<!--项目审批-->
<div class="process-part-title">{{ $t('workCenter.standardCompliance.projectApproval') }}</div>
<j-table :columns="columns" :data-source="dataSource" :pagination="false" :scroll="{x: '100%'}">
<j-table :columns="columns" :data-source="dataSource" :pagination="ipagination" :scroll="{x: '100%'}" @change="handleTableChange">
<!--是否立项-->
<template v-slot:isProject="{text,record,index}">
<j-dict-select-tag v-model="record.isProject" dict-code="yn" style="width: 100%" />
<template v-slot:projectApprovalFlag="{text,record,index}">
<j-dict-select-tag v-model="record.projectApprovalFlag" dict-code="yn" style="width: 100%" />
</template>
<!--条文内容-->
<template v-slot:clauseContent="{text}">
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<template v-slot:action="{text, record, index}">
@@ -15,17 +23,31 @@
</template>
</j-table>
<!--查看结果-->
<depart-leader-detail-modal ref="detailModal" />
<!--条文内容-->
<split-clause-detail ref="clauseDetail" />
</div>
</template>
<script>
import JTable from '../../../../components/jero/JTable'
import DepartLeaderDetailModal from '../modules/DepartLeaderDetailModal'
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
export default {
name: 'DepartLeaderApproveTable',
components: { JTable, DepartLeaderDetailModal },
components: { SplitClauseDetail, JTable, DepartLeaderDetailModal },
props: {
// 回显的数据
displayDataSource: {
type: Array,
required: false,
default: () => {
return []
}
}
},
data () {
return {
columns: [
@@ -40,46 +62,47 @@ export default {
},
// 标准编号/条款号
{
dataIndex: 'workNumber',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 150
},
// 标准名称/条款名称
{
dataIndex: 'projectName',
dataIndex: 'termName',
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
width: 160
},
// 标准状态
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
width: 150
},
// 条款内容
{
dataIndex: 'termText',
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
width: 250,
scopedSlots: { customRender: 'clauseContent' }
},
// 实施日期
{
title: this.$t('dashboard.advancedSearch.materialDate'),
width: 180,
dataIndex: 'implementation_date'
width: 150,
dataIndex: 'implementationDate'
},
// 模块负责人
{
title: this.$t('workCenter.standardConsultationProcess.moduleOwner'),
dataIndex: 'contact',
dataIndex: 'moduleOwner',
width: 150
},
// 评估结果
{
dataIndex: 'evaluationResults_dictText',
dataIndex: 'assessResults_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
width: 120
},
// 是否立项
{
dataIndex: 'isProject',
dataIndex: 'projectApprovalFlag',
title: this.$t('projectLibrary.specialProjectLibrary.whetherToApproveAProjectOrNot'),
width: 120,
scopedSlots: { customRender: 'isProject' }
scopedSlots: { customRender: 'projectApprovalFlag' }
},
// 操作
{
@@ -89,12 +112,57 @@ export default {
scopedSlots: { customRender: 'action' }
}
],
dataSource: [{ id: 2 }]
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
}
}
},
watch: {
displayDataSource: {
handler (value) {
this.dataSource = value || []
},
deep: true,
immediate: true
}
},
methods: {
handleView (record) {
this.$refs.detailModal.open(record)
},
handleTableChange (pagination) {
this.ipagination = pagination
},
showContent (text) {
this.$refs.clauseDetail.open(text)
},
/**
* 提交数据
* @param needValidator 需要校验
* @param needRemind 需要提示
*/
submit (needValidator, needRemind) {
if (!needValidator) {
return this.dataSource
}
if (!this.dataSource.every(tt => !!tt.projectApprovalFlag)) {
if (needRemind) {
// 校验提醒
this.$message.warning(this.$t('workCenter.checkTableRequired'))
}
return false
}
return this.dataSource
}
}
}
@@ -106,4 +174,4 @@ export default {
.process-part-title:first-child {
margin-top: 32px;
}
</style>
</style>
@@ -61,13 +61,8 @@
:wrapperCol="{span: 18}"
prop="modelSeries"
v-if="record.isRelate === yesValue">
<a-select :placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.doesNotFitModel')"
v-model="record.modelSeries"
mode="multiple"
show-search
:filter-option="filterOption">
<a-select-option v-for="item in carTypeList" :key="item.id">{{ item.projectName }}</a-select-option>
</a-select>
<j-multi-select-tag v-model="record.modelSeries"
dict-code="model_series" />
</a-form-model-item>
</template>
<template v-if="record.assessResults === inconformity || record.assessResults === accordWith">
@@ -210,8 +205,7 @@ export default {
this.dataSource = value.map((item, index) => {
return {
...item,
dataSourceIndex: index,
modelSeries: item.modelSeries ? item.modelSeries.split(',') : undefined
dataSourceIndex: index
}
})
}
@@ -252,7 +246,16 @@ export default {
data[index].assessResults = value
this.dataSource.splice(0, this.dataSource.length, ...data)
},
async submit () {
/**
* 提交
* @param needValidator
* @param needRemind
* @returns {Promise<boolean|*[]>}
*/
async submit (needValidator, needRemind) {
if (!needValidator) {
return this.dataSource
}
let flag = true
for (const index in this.dataSource) {
console.log(index)
@@ -285,12 +288,13 @@ export default {
}
}
if (!flag) {
if (needRemind) {
// 校验提醒
this.$message.warning(this.$t('workCenter.checkTableRequired'))
}
return false
}
const data = JSON.parse(JSON.stringify(this.dataSource))
return data.map(item => {
return { ...item, modelSeries: item.modelSeries ? item.modelSeries.join(',') : null }
})
return this.dataSource
},
validateForm (index) {
return new Promise(resolve => {
@@ -82,8 +82,8 @@ export default {
// 实施日期
{
title: this.$t('dashboard.advancedSearch.materialDate'),
width: 180,
dataIndex: 'implementation_date'
width: 150,
dataIndex: 'implementationDate'
},
// 设计工程师
{
@@ -101,7 +101,7 @@ export default {
{
dataIndex: 'modelSeries_dictText',
title: this.$t('projectLibrary.specialProjectLibrary.vehicleModel'),
width: 100
width: 200
},
// 依据描述
{
@@ -113,7 +113,7 @@ export default {
{
dataIndex: 'fileId',
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
width: 200,
width: 100,
scopedSlots: { customRender: 'file' }
}
],
@@ -12,29 +12,58 @@
<!--标准编号/条款号-->
<div class="detail-page-part-form-item">
<label>{{ $t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber') }}</label>
<span></span>
<span>{{ model.termNumber }}</span>
</div>
<!--标准名称/条款名称-->
<div class="detail-page-part-form-item">
<label>{{ $t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName') }}</label>
<span></span>
<span>{{ model.termName }}</span>
</div>
</div>
<div>
<j-table :columns="columns" :data-source="dataSource" :pagination="ipagination" :scroll="{x: '100%'}">
<j-table :loading="loading"
:columns="columns"
:data-source="dataSource"
:pagination="ipagination"
:scroll="{x: '100%'}"
@change="handleTableChange">
<!--佐证材料-->
<template v-slot:file="{text}">
<a-button class="table-text" v-if="!!text" type="primary" ghost @click="displayFile(text)">{{ $t('view') }}</a-button>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
</j-table>
</div>
<!--佐证材料回显-->
<upload-file ref="fileDisplayModal" disabled />
</j-modal>
</template>
<script>
import JTable from '../../../../components/jero/JTable'
import { queryStandardComplianceResult } from '../../../../api/workCenter'
import UploadFile from '../../../../components/UploadFile'
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
export default {
name: 'DepartLeaderDetailModal',
components: { JTable },
components: { SplitClauseDetail, UploadFile, JTable },
props: {
// 标准编号
standardNumber: {
type: String,
required: false,
default: ''
},
// 标准名称
standardName: {
type: String,
required: false,
default: ''
}
},
data () {
return {
visible: false,
@@ -70,41 +99,70 @@ export default {
// 设计工程师
{
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
dataIndex: 'contact',
dataIndex: 'designEngineer_dictText',
width: 150
},
// 评估结果
{
dataIndex: 'evaluationResults_dictText',
dataIndex: 'assessResults_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
width: 120
},
// 车型
{
dataIndex: '4',
dataIndex: 'modelSeries_dictText',
title: this.$t('projectLibrary.specialProjectLibrary.vehicleModel'),
width: 100
width: 150
},
// 依据描述
{
dataIndex: 'nameWorkNo',
dataIndex: 'description',
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
width: 250
width: 150
},
// 佐证材料
{
dataIndex: '5',
dataIndex: 'fileId',
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
width: 120
width: 100,
scopedSlots: { customRender: 'file' }
}
],
dataSource: []
dataSource: [],
loading: false
}
},
methods: {
open (record) {
this.visible = true
this.model = Object.assign({}, record)
this.loadData(1)
},
loadData (arg) {
this.loading = true
if (arg) {
this.ipagination.current = 1
}
const params = {
taskId: this.$route.query.taskId,
id: this.model.id,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize
}
queryStandardComplianceResult(params).then(res => {
if (res.success) {
this.dataSource = res.result.records || []
if (res.result.total) {
this.ipagination.total = res.result.total
} else {
this.ipagination.total = 0
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
handleOk () {
this.close()
@@ -115,6 +173,12 @@ export default {
close () {
this.visible = false
this.model = {}
this.dataSource = []
Object.assign(this.$data, this.$options.data())
},
handleTableChange (pagination) {
this.ipagination = pagination
this.loadData()
}
}
}