[update] 外标详情,废止状态下有被代替标准编号显示已有新版本,否则显示废止

This commit is contained in:
lideqin
2024-08-28 16:50:55 +08:00
parent 03f10f4077
commit 67b3246243
3 changed files with 24 additions and 3 deletions
@@ -1,7 +1,8 @@
<template>
<div class="detail-page">
<a-spin :spinning="loading">
<div class="detail-page-title">{{ pageTitle }}{{ $t('details') }}</div>
<!-- 展示已有新版本或者废止废止状态并且被代替标准编号存在则显示已有新版本不存在被代替标准显示废止 -->
<div class="detail-page-title">{{ pageTitle }}{{ $t('details') }}<span class="title-red-span">{{ haveNewVersion }}</span></div>
<div class="detail-page-part" v-for="(part, index) in partList" :key="part + index">
<div class="detail-page-part-title">
@@ -211,6 +212,18 @@ export default {
operateApiFunc () {
const func = ForeignApi
return func
},
// 标题处显示已有新版本还是废止
haveNewVersion () {
if (this.detailData.standard_state === StandardStatus.ABOLISH.value && this.detailData.replaced_by_standard_number) {
// 是废止状态,并且被代替标准编号有值,显示已有新版本
return this.$t('standardRegulationLibrary.foreignStandard.haveNewVersion')
} else if (this.detailData.standard_state === StandardStatus.ABOLISH.value) {
// 是废止状态
return this.$t('standardRegulationLibrary.foreignStandard.annul')
} else {
return ''
}
}
},
async created () {
@@ -461,4 +474,8 @@ export default {
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
color: @primary-color;
}
.title-red-span {
color: #D52C26;
}
</style>