fix 80166

This commit is contained in:
danshihao
2023-12-28 15:06:22 +08:00
parent 90c246334b
commit 6583a31b3e
@@ -37,6 +37,14 @@
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div> <div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip> </a-tooltip>
</template> </template>
<!-- 企标号企标名称 -->
<template v-slot:standard="text, record">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="detailClick(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</a-table> </a-table>
</div> </div>
</a-card> </a-card>
@@ -45,6 +53,7 @@
<script> <script>
import { ajaxGetDictItems } from '@/api/api' import { ajaxGetDictItems } from '@/api/api'
import { getAction } from '../../../api/manage' import { getAction } from '../../../api/manage'
import { StandardSource } from '@/enums/commonEnums'
export default { export default {
name: 'SearchAndWarningCard', name: 'SearchAndWarningCard',
@@ -78,13 +87,13 @@ export default {
align: 'left', align: 'left',
dataIndex: 'standardNumber', dataIndex: 'standardNumber',
width: 180, width: 180,
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'standard' }
}, },
{ {
title: '标准名称', title: '标准名称',
align: 'left', align: 'left',
dataIndex: 'standardName', dataIndex: 'standardName',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'standard' }
}, },
{ {
title: '新车型实施日期', title: '新车型实施日期',
@@ -157,6 +166,33 @@ export default {
} }
this.loadData(1) this.loadData(1)
}, },
// 跳转详情
detailClick (record) {
let path
// 根据来源跳转不同的详情页
switch (record.source + '') {
// 国内
case StandardSource.DOMESTIC.value:
path = '/standardRegulationLibrary/DomesticStandardDetail'
break
// 海外
case StandardSource.OVERSEAS.value:
path = '/standardRegulationLibrary/OverseasStandardDetail'
break
// 企标
case StandardSource.ENTERPRISE.value:
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
break
default:
break
}
this.$openPageNewSheet({
path,
query: {
id: record.id
}
})
},
loadData (arg) { loadData (arg) {
// 加载数据 若传入参数1则加载第一页的内容 // 加载数据 若传入参数1则加载第一页的内容
if (arg === 1) { if (arg === 1) {