fix 80613
This commit is contained in:
@@ -1,6 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<internal-detail-page :title="pageTitle">
|
<internal-detail-page :title="pageTitle">
|
||||||
|
<template v-if="!$route.query.assessResults">
|
||||||
|
<div v-for="(type, index) in showTables" :key="index" class="table-item">
|
||||||
|
<a-divider orientation="left">{{ EvaluationResultType.nameOfIndex(type.type) }}</a-divider>
|
||||||
|
<j-table
|
||||||
|
:columns="getColumns(type)"
|
||||||
|
:dataSource="getData(type)"
|
||||||
|
:can-drag="true"
|
||||||
|
rowKey="id"
|
||||||
|
:row-selection="null"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{x: '100%'}"
|
||||||
|
:loading="loading">
|
||||||
|
</j-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<j-table
|
<j-table
|
||||||
|
v-else
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
@@ -24,10 +40,11 @@ export default {
|
|||||||
components: { JTable, InternalDetailPage },
|
components: { JTable, InternalDetailPage },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
pageTitle: EvaluationResultType.nameOfIndex(this.$route.query.assessResults),
|
EvaluationResultType,
|
||||||
|
pageTitle: this.$route.query.assessResults ? EvaluationResultType.nameOfIndex(this.$route.query.assessResults) : '',
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
// 符合表头
|
// 符合表头
|
||||||
coincidenceListHead: [
|
coincidenceListHeader: [
|
||||||
// 标准编号/条款号
|
// 标准编号/条款号
|
||||||
{
|
{
|
||||||
dataIndex: 'termNumber',
|
dataIndex: 'termNumber',
|
||||||
@@ -54,7 +71,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 不符合表头
|
// 不符合表头
|
||||||
doesNotMatchTheHeader: [
|
doesNotMatchHeader: [
|
||||||
// 标准编号/条款号
|
// 标准编号/条款号
|
||||||
{
|
{
|
||||||
dataIndex: 'termNumber',
|
dataIndex: 'termNumber',
|
||||||
@@ -93,7 +110,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 待验证表头
|
// 待验证表头
|
||||||
tableHeaderToBeVerified: [
|
tableHeaderToBeVerifiedHeader: [
|
||||||
// 标准编号/条款号
|
// 标准编号/条款号
|
||||||
{
|
{
|
||||||
dataIndex: 'termNumber',
|
dataIndex: 'termNumber',
|
||||||
@@ -132,7 +149,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 不涉及表头
|
// 不涉及表头
|
||||||
noTableHeaderIsInvolved: [
|
noTableHeaderIsInvolvedHeader: [
|
||||||
// 标准编号/条款号
|
// 标准编号/条款号
|
||||||
{
|
{
|
||||||
dataIndex: 'termNumber',
|
dataIndex: 'termNumber',
|
||||||
@@ -158,6 +175,11 @@ export default {
|
|||||||
width: 120
|
width: 120
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
coincidenceListData: [],
|
||||||
|
doesNotMatchData: [],
|
||||||
|
tableHeaderToBeVerifiedData: [],
|
||||||
|
noTableHeaderIsInvolvedData: [],
|
||||||
|
showTables: [], // 展示的表格
|
||||||
loading: false
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -165,19 +187,19 @@ export default {
|
|||||||
columns () {
|
columns () {
|
||||||
// 符合
|
// 符合
|
||||||
if (this.$route.query.assessResults === EvaluationResultType.accordWith.value) {
|
if (this.$route.query.assessResults === EvaluationResultType.accordWith.value) {
|
||||||
return this.coincidenceListHead
|
return this.coincidenceListHeader
|
||||||
}
|
}
|
||||||
// 不符合
|
// 不符合
|
||||||
if (this.$route.query.assessResults === EvaluationResultType.inconformity.value) {
|
if (this.$route.query.assessResults === EvaluationResultType.inconformity.value) {
|
||||||
return this.doesNotMatchTheHeader
|
return this.doesNotMatchHeader
|
||||||
}
|
}
|
||||||
// 待验证
|
// 待验证
|
||||||
if (this.$route.query.assessResults === EvaluationResultType.toBeVerified.value) {
|
if (this.$route.query.assessResults === EvaluationResultType.toBeVerified.value) {
|
||||||
return this.tableHeaderToBeVerified
|
return this.tableHeaderToBeVerifiedHeader
|
||||||
}
|
}
|
||||||
// 不涉及
|
// 不涉及
|
||||||
if (this.$route.query.assessResults === EvaluationResultType.uninvolved.value) {
|
if (this.$route.query.assessResults === EvaluationResultType.uninvolved.value) {
|
||||||
return this.noTableHeaderIsInvolved
|
return this.noTableHeaderIsInvolvedHeader
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
@@ -186,6 +208,45 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
accordWithAndInconformityList({ id: this.$route.query.id }).then(res => {
|
accordWithAndInconformityList({ id: this.$route.query.id }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (!this.$route.query.assessResults) {
|
||||||
|
const resultList = [EvaluationResultType.accordWith.value, EvaluationResultType.inconformity.value, EvaluationResultType.toBeVerified.value, EvaluationResultType.uninvolved.value]
|
||||||
|
resultList.forEach(type => {
|
||||||
|
switch (type) {
|
||||||
|
// 符合
|
||||||
|
case EvaluationResultType.accordWith.value:
|
||||||
|
this.coincidenceListData = res.result.accordWithList || []
|
||||||
|
if (this.coincidenceListData.length > 0) {
|
||||||
|
this.showTables.push({ type, tableName: 'coincidenceList' })
|
||||||
|
}
|
||||||
|
break
|
||||||
|
// 不符合
|
||||||
|
case EvaluationResultType.inconformity.value:
|
||||||
|
this.doesNotMatchData = res.result.notCompliantList || []
|
||||||
|
if (this.doesNotMatchData.length > 0) {
|
||||||
|
this.showTables.push({ type, tableName: 'doesNotMatch' })
|
||||||
|
}
|
||||||
|
break
|
||||||
|
// 待验证
|
||||||
|
case EvaluationResultType.toBeVerified.value:
|
||||||
|
this.tableHeaderToBeVerifiedData = res.result.toBeVerifiedList || []
|
||||||
|
if (this.tableHeaderToBeVerifiedData.length > 0) {
|
||||||
|
this.showTables.push({ type, tableName: 'tableHeaderToBeVerified' })
|
||||||
|
}
|
||||||
|
break
|
||||||
|
// 不涉及
|
||||||
|
case EvaluationResultType.uninvolved.value:
|
||||||
|
this.noTableHeaderIsInvolvedData = res.result.notInvolvedList || []
|
||||||
|
if (this.noTableHeaderIsInvolvedData.length > 0) {
|
||||||
|
this.showTables.push({ type, tableName: 'noTableHeaderIsInvolved' })
|
||||||
|
}
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
this.dataSource = []
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
switch (this.$route.query.assessResults) {
|
switch (this.$route.query.assessResults) {
|
||||||
// 符合
|
// 符合
|
||||||
case EvaluationResultType.accordWith.value:
|
case EvaluationResultType.accordWith.value:
|
||||||
@@ -213,10 +274,37 @@ export default {
|
|||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getColumns (type) {
|
||||||
|
return this[`${type.tableName}Header`]
|
||||||
|
},
|
||||||
|
getData (type) {
|
||||||
|
return this[`${type.tableName}Data`]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.table-item {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-divider-horizontal.ant-divider-with-text-left /deep/ .ant-divider-inner-text {
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: PingFang SC-Medium, PingFang SC, sans-serif;
|
||||||
|
font-weight: 550;
|
||||||
|
color: #1D2129;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-divider-horizontal.ant-divider-with-text-left {
|
||||||
|
margin: 0 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-divider-horizontal.ant-divider-with-text-left::before, .ant-divider-horizontal.ant-divider-with-text-left::after {
|
||||||
|
border-top-color: @primary-color;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -450,10 +450,10 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 评估结果
|
* 评估结果
|
||||||
*/
|
*/
|
||||||
toEvaluationResult ({ assessResults, id }) {
|
toEvaluationResult ({ id }) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/projectLibrary/EvaluationResultPage',
|
path: '/projectLibrary/EvaluationResultPage',
|
||||||
query: { assessResults, id }
|
query: { id }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user