forked from github/dataease
feat(工作台): 工作台我的收藏页增加直接取消收藏操作
This commit is contained in:
parent
72b19f3942
commit
c15b098d46
@ -88,7 +88,7 @@ public class VisualizationStoreManage {
|
||||
return pos.stream().map(po ->
|
||||
new VisualizationStoreVO(
|
||||
po.getStoreId(), po.getResourceId(), po.getName(),
|
||||
po.getType(), po.getCreator().toString(), ObjectUtils.isEmpty(po.getEditor()) ? null : po.getEditor().toString(),
|
||||
po.getType(), String.valueOf(po.getCreator()), ObjectUtils.isEmpty(po.getEditor()) ? null : String.valueOf(po.getEditor()),
|
||||
po.getEditTime(), 9)).toList();
|
||||
}
|
||||
|
||||
|
1
core/core-frontend/src/assets/svg/icon_cancel_store.svg
Normal file
1
core/core-frontend/src/assets/svg/icon_cancel_store.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1708236511731" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4218" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M414.252575 821.425145c3.034288-2.311839 6.357556-4.045718 9.969804-5.201637l1.444899-0.86694 0.14449 0.28898c3.034288-0.866939 6.068576-1.300409 9.247354-1.300409 19.072668 0 34.533089 15.46042 34.533089 34.533089 0 12.715112-6.791026 23.696345-17.049809 29.764921l-229.160999 118.481728c-10.836743 3.467758-20.951037 0.57796-30.487372-8.669395-9.536334-9.102864-12.570622-20.228588-9.102864-33.23268l52.883307-307.76351L11.992663 426.823197c-10.258784-10.403274-14.015521-20.951037-11.270213-32.07676 4.045718-16.47185 12.281642-22.684916 24.129815-26.008184C128.162551 353.422323 234.073656 337.961902 342.441089 322.068012c47.248201-97.53069 94.207422-192.894031 141.311133-286.090024 5.057147-9.969804 14.448991-15.46042 29.042473-15.460421 14.593481 0 20.806547 3.756738 27.597573 15.460421 10.547764 19.217158 57.940454 114.5805 142.322562 286.090024l318.166784 46.670241c10.981233 4.623677 18.061239 11.270213 20.951037 20.084098 2.889798 8.813885 2.167349 19.361648-2.167348 31.78778L867.083957 570.590659l-0.14449-0.14449c-6.213066 6.213066-14.737971 9.969804-24.274305 9.969804-19.072668 0-34.533089-15.46042-34.533089-34.533089 0-7.368985 2.311839-14.593481 6.646536-20.517567l-0.43347-0.28898 101.865387-99.698039-259.50388-36.555947c-5.346127 0.43347-10.258784-1.300409-14.737971-5.057147-4.479187-3.901228-9.247354-10.403274-14.304501-19.795118L512.794695 132.208269l-116.314379 235.807535c-4.045718 7.080006-9.102864 12.426132-15.026951 15.7494-5.924086 3.323268-13.293072 5.057147-22.251446 5.057147L107.211514 425.522788 294.759419 608.591506c6.213066 6.646536 9.969804 11.992663 11.125723 15.89389 1.155919 3.901228 1.155919 10.836743 0 20.517567l-42.480034 256.469592 150.847467-80.04741z m344.608438-30.342882l103.743756-103.743756c13.437562-13.437562 35.255538-13.437562 48.83759 0 13.437562 13.437562 13.437562 35.255538 0 48.83759L807.698603 839.919853l103.743756 103.743756c13.437562 13.437562 13.437562 35.255538 0 48.83759-13.437562 13.437562-35.255538 13.437562-48.83759 0L758.861013 888.612953l-103.743756 103.743756c-13.437562 13.437562-35.255538 13.437562-48.83759 0-13.437562-13.437562-13.437562-35.255538 0-48.837589l103.743756-103.743757-103.743756-103.743756c-13.437562-13.437562-13.437562-35.255538 0-48.83759 13.437562-13.437562 35.255538-13.437562 48.83759 0l103.743756 103.888246z m0 0" p-id="4219"></path></svg>
|
After Width: | Height: | Size: 2.6 KiB |
@ -161,6 +161,17 @@ const executeStore = rowInfo => {
|
||||
rowInfo.favorite = !rowInfo.favorite
|
||||
})
|
||||
}
|
||||
|
||||
const executeCancelStore = rowInfo => {
|
||||
const param = {
|
||||
id: rowInfo.resourceId,
|
||||
type: rowInfo.type === 'dataV' ? 'screen' : 'panel'
|
||||
}
|
||||
storeApi(param).then(() => {
|
||||
loadTableData()
|
||||
})
|
||||
}
|
||||
|
||||
const imgType = ref()
|
||||
const emptyDesc = ref('')
|
||||
const getEmptyImg = (): string => {
|
||||
@ -297,7 +308,7 @@ const getEmptyDesc = (): string => {
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="96" fixed="right" key="_operation" :label="$t('common.operate')">
|
||||
<el-table-column width="100" fixed="right" key="_operation" :label="$t('common.operate')">
|
||||
<template #default="scope">
|
||||
<template v-if="['dashboard', 'dataV', 'panel', 'screen'].includes(scope.row.type)">
|
||||
<el-tooltip effect="dark" content="新页面预览" placement="top">
|
||||
@ -321,6 +332,19 @@ const getEmptyDesc = (): string => {
|
||||
:resource-id="activeName === 'recent' ? scope.row.id : scope.row.resourceId"
|
||||
:resource-type="scope.row.type"
|
||||
/> -->
|
||||
<el-tooltip
|
||||
v-if="activeName === 'store'"
|
||||
effect="dark"
|
||||
content="取消收藏"
|
||||
placement="top"
|
||||
>
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click="executeCancelStore(scope.row)"
|
||||
>
|
||||
<Icon name="icon_cancel_store"></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-if="['dataset'].includes(scope.row.type)">
|
||||
|
Loading…
Reference in New Issue
Block a user