update 车型项目库-详情、评估结果历史、符合/不符合

This commit is contained in:
赵霄
2023-12-25 17:41:48 +08:00
parent 3ace5663f8
commit c7458d69f8
5 changed files with 129 additions and 82 deletions
+3
View File
@@ -14,6 +14,8 @@ const queryProjectRiskOverview = (params) => getAction('/projectLibrary/lawsProj
const transferRegulationList = (params) => postAction('/projectLibrary/lawsAssess/retrieval', params)
// 车型项目库-详情-法规清单-复制
const copyProject = (params) => postAction('/projectLibrary/lawsAssess/copy', params)
// 符合/不符合页面
const accordWithAndInconformityList = (params) => getAction('/projectLibrary/lawsAssessResults/getMetNotMetVOById', params)
// 未符合项-新增
const addInconformityItem = (params) => postAction('/projectLibrary/lawsEvaluationNotMet/add', params)
@@ -33,6 +35,7 @@ export {
queryProjectRiskOverview,
transferRegulationList,
copyProject,
accordWithAndInconformityList,
addInconformityItem,
editInconformityItem,
@@ -235,9 +235,16 @@ export default {
clickEvent: 'handleEdit',
has: 'inconformityItem:edit'
}
]
],
disableMixinCreated: true
}
},
created () {
this.filters = {
projectId: this.$route.query.projectId
}
this.loadData()
},
methods: {
/**
* 批量关闭
@@ -7,7 +7,8 @@
<!--条款号-->
<a-col :md="6" :sm="12">
<a-form-item :label="$t('workCenter.enStandardRevision.clauseNumber')">
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')" v-model="queryParam.projectName"></j-input>
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseNumber')"
v-model="queryParam.termNumber"></a-input>
</a-form-item>
</a-col>
@@ -55,7 +56,6 @@
</a-tooltip>
</template>
</j-table>
</div>
</internal-detail-page>
@@ -65,13 +65,13 @@
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import JTable from '../../../components/jero/JTable'
import { StandardSource } from '../../../enums/commonEnums'
import { ProcessKey, StandardSource } from '../../../enums/commonEnums'
export default {
name: 'EvaluationResultHistoryPage',
components: { JTable, InternalDetailPage },
mixins: [JeroListMixin],
data() {
data () {
return {
url: {
list: '/projectLibrary/lawsAssessResults/page'
@@ -105,16 +105,16 @@ export default {
},
// 标准状态
{
dataIndex: 'standardState_dictText',
dataIndex: 'standardState',
title: this.$t('projectLibrary.vehicleItemLibrary.standardState'),
width: 100
},
// 责任部门
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
width: 120
},
// // 责任部门
// {
// dataIndex: 'departmentId_dictText',
// title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
// width: 120
// },
// 流程状态
{
dataIndex: 'processStatus_dictText',
@@ -123,7 +123,7 @@ export default {
},
// 评估结果
{
dataIndex: 'evaluationResults_dictText',
dataIndex: 'assessResults_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
width: 120,
scopedSlots: { customRender: 'evaluationResult' }
@@ -136,27 +136,31 @@ export default {
scopedSlots: { customRender: 'action' }
}
],
filters: {
assessId: this.$route.query.assessId
},
operationList: [
// 评估流程详情
{
text: this.$t('projectLibrary.vehicleItemLibrary.evaluationProcessDetail'),
clickEvent: 'toEvaluationProcessDetail'
},
]
}
],
disableMixinCreated: true
}
},
created () {
this.filters = {
assessId: this.$route.query.assessId
}
this.loadData()
},
methods: {
/**
* 跳转标准详情
* @param record
*/
toDetailPage ({ standardId, splitStandardSource }) {
toDetailPage ({ standardId, source }) {
let path
// 根据来源跳转不同的详情页
switch (splitStandardSource) {
switch (source) {
// 国内
case StandardSource.DOMESTIC.value:
path = '/standardRegulationLibrary/DomesticStandardDetail'
@@ -185,18 +189,25 @@ export default {
/**
* 跳转评估流程详情
*/
toEvaluationProcessDetail () {
toEvaluationProcessDetail ({ processDefinitionId, processInstanceId }) {
this.$router.push({
path: '/workCenter/processCenter/detail/processDetail',
query: {
processKey: ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value,
processDefinitionId,
processInstanceId
}
})
},
/**
* 跳转评估结果页面
* @param id
* @param assessResults
*/
toEvaluationResult ({ evaluationResults }) {
toEvaluationResult ({ id, assessResults }) {
this.$router.push({
path: '/projectLibrary/EvaluationResultPage',
query: {
evaluationResults
}
query: { id, assessResults }
})
}
}
@@ -17,43 +17,38 @@
import InternalDetailPage from '../../../components/InternalDetailPage'
import { EvaluationResultType } from '../../../enums/commonEnums'
import JTable from '../../../components/jero/JTable'
import { accordWithAndInconformityList } from '../../../api/projectLibraryApi'
export default {
name: 'EvaluationResultPage',
components: { JTable, InternalDetailPage },
data () {
return {
pageTitle: EvaluationResultType.nameOfIndex(this.$route.query.evaluationResults),
pageTitle: EvaluationResultType.nameOfIndex(this.$route.query.assessResults),
dataSource: [],
// 符合表头
coincidenceListHead: [
// 标准编号/条款号
{
dataIndex: 'responsibleDepartment',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 120
},
// 项目编号
// 依据描述
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.projectNumber'),
width: 120
},
// 责任部门
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
dataIndex: 'description',
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
width: 120
},
// 评估人
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessorName',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
width: 120
},
// 评估日期
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessTime',
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
width: 120
}
@@ -62,37 +57,37 @@ export default {
doesNotMatchTheHeader: [
// 标准编号/条款号
{
dataIndex: 'responsibleDepartment',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 120
},
// 不符合项
{
dataIndex: 'responsibleDepartment',
dataIndex: 'nonConformance',
title: this.$t('projectLibrary.vehicleItemLibrary.nonConformanceTerm'),
width: 120
},
// 应对措施
{
dataIndex: 'responsibleDepartment',
dataIndex: 'countermeasures',
title: this.$t('projectLibrary.vehicleItemLibrary.solutions'),
width: 120
},
// 责任部门
// 预计整改完成日期
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
dataIndex: 'expectedTime',
title: this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
width: 120
},
// 评估人
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessorName',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
width: 120
},
// 评估日期
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessTime',
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
width: 120
}
@@ -101,43 +96,37 @@ export default {
tableHeaderToBeVerified: [
// 标准编号/条款号
{
dataIndex: 'responsibleDepartment',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 120
},
// 风险点
{
dataIndex: 'responsibleDepartment',
dataIndex: 'riskPoints',
title: this.$t('projectLibrary.vehicleItemLibrary.riskPoint'),
width: 120
},
// 验证方案
{
dataIndex: 'responsibleDepartment',
dataIndex: 'validateSolution',
title: this.$t('projectLibrary.vehicleItemLibrary.verificationScheme'),
width: 120
},
// 预估更改周
// 预计整改完成日
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.estimateTheChangeCycle'),
width: 120
},
// 责任部门
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
dataIndex: 'expectedTime',
title: this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
width: 120
},
// 评估人
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessorName',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
width: 120
},
// 评估日期
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessTime',
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
width: 120
}
@@ -146,31 +135,25 @@ export default {
noTableHeaderIsInvolved: [
// 标准编号/条款号
{
dataIndex: 'responsibleDepartment',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 120
},
// 不涉及
{
dataIndex: 'responsibleDepartment',
dataIndex: 'reason',
title: this.$t('projectLibrary.vehicleItemLibrary.uninvolved'),
width: 120
},
// 责任部门
{
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
width: 120
},
// 评估人
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessorName',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
width: 120
},
// 评估日期
{
dataIndex: 'responsibleDepartment',
dataIndex: 'assessTime',
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
width: 120
}
@@ -181,23 +164,55 @@ export default {
computed: {
columns () {
// 符合
if (this.$route.query.evaluationResults === EvaluationResultType.accordWith.value) {
if (this.$route.query.assessResults === EvaluationResultType.accordWith.value) {
return this.coincidenceListHead
}
// 不符合
if (this.$route.query.evaluationResults === EvaluationResultType.inconformity.value) {
if (this.$route.query.assessResults === EvaluationResultType.inconformity.value) {
return this.doesNotMatchTheHeader
}
// 待验证
if (this.$route.query.evaluationResults === EvaluationResultType.toBeVerified.value) {
if (this.$route.query.assessResults === EvaluationResultType.toBeVerified.value) {
return this.tableHeaderToBeVerified
}
// 不涉及
if (this.$route.query.evaluationResults === EvaluationResultType.uninvolved.value) {
if (this.$route.query.assessResults === EvaluationResultType.uninvolved.value) {
return this.noTableHeaderIsInvolved
}
return []
}
},
created () {
this.loading = true
accordWithAndInconformityList({ id: this.$route.query.id }).then(res => {
if (res.success) {
switch (this.$route.query.assessResults) {
// 符合
case EvaluationResultType.accordWith.value:
this.dataSource = res.result.accordWithList || []
break
// 不符合
case EvaluationResultType.inconformity.value:
this.dataSource = res.result.notCompliantList || []
break
// 待验证
case EvaluationResultType.toBeVerified.value:
this.dataSource = res.result.toBeVerifiedList || []
break
// 不涉及
case EvaluationResultType.uninvolved.value:
this.dataSource = res.result.notInvolvedList || []
break
default:
this.dataSource = []
break
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
}
</script>
@@ -2,7 +2,7 @@
<internal-detail-page :title="pageTitle" :loading="detailLoading">
<template v-slot:titleRightCustom>
<!--未符合项详情-->
<a-button type="primary" v-has="'vehicleItemLibrary:detail:noMatchItemDetail'">
<a-button type="primary" v-has="'vehicleItemLibrary:detail:noMatchItemDetail'" @click="handleToNoMatchList">
{{ $t('projectLibrary.vehicleItemLibrary.noMatchItemDetails') }}
</a-button>
</template>
@@ -259,12 +259,12 @@ export default {
width: 120,
scopedSlots: { customRender: 'evaluationResult' }
},
// 责任部门
{
dataIndex: 'responsibleDepartment_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
width: 120
},
// // 责任部门
// {
// dataIndex: 'responsibleDepartment_dictText',
// title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
// width: 120
// },
// 操作
{
title: this.$t('operation'),
@@ -445,6 +445,17 @@ export default {
evaluationResults
}
})
},
/**
* 跳转未符合项列表
*/
handleToNoMatchList () {
this.$router.push({
path: '/projectLibrary/InconformityItemList',
query: {
projectId: this.$route.query.id
}
})
}
}
}