[update] 修改我的收藏,已发分享,已收分享的跳转

This commit is contained in:
lideqin
2023-09-21 09:48:44 +08:00
parent 5abf9338bd
commit d73d62e429
4 changed files with 63 additions and 7 deletions
+2 -2
View File
@@ -52,7 +52,7 @@
<!-- 不需要更多按钮 -->
<template v-for="(operation, index) in operSpecialJudge(record)">
<a :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
<a-divider type="vertical" v-if="index !== operSpecialJudge(record).length - 1"/>
<a-divider :key="index" type="vertical" v-if="index !== operSpecialJudge(record).length - 1"/>
</template>
</template>
</template>
@@ -80,7 +80,7 @@
<template v-else-if="getLineOperationList(record).length > 0">
<template v-for="(operation, index) in getLineOperationList(record)">
<a :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
<a-divider type="vertical" v-if="index !== getLineOperationList(record).length - 1"/>
<a-divider :key="index" type="vertical" v-if="index !== getLineOperationList(record).length - 1"/>
</template>
</template>
</template>
@@ -145,7 +145,7 @@ export default {
this.$openPageNewSheet({
path: path,
query: {
id: record.id
id: record.standardId
}
})
},
@@ -50,6 +50,15 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 标题字段 -->
<template v-slot:titleSlot="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</template>
<a v-if="record.title && record.source !== '4'" class="link-a" @click="handleGoDetail(record)">{{ record.title }}</a>
<div v-else class="table-text">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 接收时间单独写出来是解决会有滚动条的问题 -->
<template slot="receiptTime" slot-scope="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
@@ -92,8 +101,7 @@ export default {
title: this.$t('personalCenter.receivedShare.title'),
align: 'center',
width: 180,
dataIndex: 'title',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'titleSlot' }
},
{
title: this.$t('personalCenter.receivedShare.forwarder'),
@@ -114,6 +122,26 @@ export default {
deleteBatch: '/personal/lawsStandardSharing/deleteBatch'
}
}
},
methods: {
// 点击标题跳转详情页
handleGoDetail (record) {
let path = ''
// 需要先判断是哪种标准
if (record.source === '1') {
path = '/standardRegulationLibrary/DomesticStandardDetail'
} else if (record.source === '2') {
path = '/standardRegulationLibrary/OverseasStandardDetail'
} else if (record.source === '3') {
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
}
this.$openPageNewSheet({
path: path,
query: {
id: record.standardId
}
})
}
}
}
</script>
@@ -50,6 +50,15 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 标题字段 -->
<template v-slot:titleSlot="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</template>
<a v-if="record.title && record.source !== '4'" class="link-a" @click="handleGoDetail(record)">{{ record.title }}</a>
<div v-else class="table-text">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 转发时间单独写出来是解决会有滚动条的问题 -->
<template slot="transmitTime" slot-scope="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
@@ -92,8 +101,7 @@ export default {
title: this.$t('personalCenter.sentShare.title'),
align: 'center',
width: 180,
dataIndex: 'title',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'titleSlot' }
},
{
title: this.$t('personalCenter.sentShare.recipient'),
@@ -114,6 +122,26 @@ export default {
deleteBatch: '/personal/lawsStandardSharing/deleteBatch'
}
}
},
methods: {
// 点击标题跳转详情页
handleGoDetail (record) {
let path = ''
// 需要先判断是哪种标准
if (record.source === '1') {
path = '/standardRegulationLibrary/DomesticStandardDetail'
} else if (record.source === '2') {
path = '/standardRegulationLibrary/OverseasStandardDetail'
} else if (record.source === '3') {
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
}
this.$openPageNewSheet({
path: path,
query: {
id: record.standardId
}
})
}
}
}
</script>