forked from github/dataease
refactor(应用): 删除应用日志勾选删除相关资源时,清理掉浏览器相关资源的缓存
This commit is contained in:
parent
1d08506f0c
commit
822de40487
@ -314,7 +314,9 @@ public class PanelGroupService {
|
||||
panelGroup.setPanelStyle(sourcePanel.getPanelStyle());
|
||||
panelGroup.setSourcePanelName(sourcePanel.getName());
|
||||
}
|
||||
panelGroup.setWatermarkInfo(panelWatermarkMapper.selectByPrimaryKey("system_default"));
|
||||
if (panelGroup != null) {
|
||||
panelGroup.setWatermarkInfo(panelWatermarkMapper.selectByPrimaryKey("system_default"));
|
||||
}
|
||||
return panelGroup;
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
<el-row
|
||||
style="text-align: left"
|
||||
class="de-search-table"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
>
|
||||
<el-row class="top-operate">
|
||||
<el-col :span="12">
|
||||
@ -35,8 +36,8 @@
|
||||
icon="iconfont icon-icon-filter"
|
||||
@click="filterShow"
|
||||
>{{
|
||||
$t('user.filter')
|
||||
}}
|
||||
$t('user.filter')
|
||||
}}
|
||||
<template v-if="filterTexts.length">
|
||||
({{ cacheCondition.length }})
|
||||
</template>
|
||||
@ -49,7 +50,7 @@
|
||||
>
|
||||
<span class="sum">{{ paginationConfig.total }}</span>
|
||||
<span class="title">{{ $t('user.result_one') }}</span>
|
||||
<el-divider direction="vertical" />
|
||||
<el-divider direction="vertical"/>
|
||||
<i
|
||||
v-if="showScroll"
|
||||
class="el-icon-arrow-left arrow-filter"
|
||||
@ -62,9 +63,9 @@
|
||||
class="text"
|
||||
>
|
||||
{{ ele }} <i
|
||||
class="el-icon-close"
|
||||
@click="clearOneFilter(index)"
|
||||
/>
|
||||
class="el-icon-close"
|
||||
@click="clearOneFilter(index)"
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
<i
|
||||
@ -87,7 +88,6 @@
|
||||
>
|
||||
<grid-table
|
||||
:ref="'grid-table'"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
:table-data="data"
|
||||
:columns="[]"
|
||||
:pagination="paginationConfig"
|
||||
@ -101,12 +101,7 @@
|
||||
:label="$t('app_template.datasource')"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
v-if="row.datasourceId && hasDataPermission('use',row.datasourcePrivileges)"
|
||||
class="link-span"
|
||||
@click="goToDatasource(row)"
|
||||
>{{ row.datasourceName }}</span>
|
||||
<span v-else>{{ row.datasourceName }}</span>
|
||||
<span>{{ row.datasourceName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -189,6 +184,7 @@
|
||||
:visible.sync="deleteConfirmDialog"
|
||||
:show-close="true"
|
||||
width="420px"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
>
|
||||
<el-row>
|
||||
<el-checkbox
|
||||
@ -217,10 +213,7 @@ import GridTable from '@/components/gridTable/index.vue'
|
||||
import filterUser from './FilterUser'
|
||||
import _ from 'lodash'
|
||||
import keyEnter from '@/components/msgCfm/keyEnter.js'
|
||||
import {
|
||||
addOrder,
|
||||
formatOrders
|
||||
} from '@/utils/index'
|
||||
import { addOrder, formatOrders } from '@/utils/index'
|
||||
import { deleteLogAndResource, logGrid } from '@/api/appTemplateMarket/log'
|
||||
import { findOneWithParent } from '@/api/panel/panel'
|
||||
import AppTemplateApply from '@/views/panel/appTemplate/component/AppTemplateApply'
|
||||
@ -288,9 +281,24 @@ export default {
|
||||
this.deleteConfirmDialog = false
|
||||
},
|
||||
confirmDel() {
|
||||
deleteLogAndResource(this.deleteItemInfo).then(() => {
|
||||
this.closeDel()
|
||||
this.search()
|
||||
const _this = this
|
||||
deleteLogAndResource(_this.deleteItemInfo).then(() => {
|
||||
if (_this.deleteItemInfo.deleteResource) {
|
||||
_this.clearLocalStorage()
|
||||
}
|
||||
_this.closeDel()
|
||||
_this.search()
|
||||
})
|
||||
},
|
||||
clearLocalStorage() {
|
||||
const clearParams = [
|
||||
'panel-main-tree',
|
||||
'panel-default-tree',
|
||||
'chart-tree',
|
||||
'dataset-tree'
|
||||
]
|
||||
clearParams.forEach(item => {
|
||||
localStorage.removeItem(item)
|
||||
})
|
||||
},
|
||||
closeDraw() {
|
||||
|
Loading…
Reference in New Issue
Block a user