修复已知问题
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
<a-radio-button :value="2">底部</a-radio-button>
|
||||
<a-radio-button :value="0">不限</a-radio-button>
|
||||
</a-radio-group>
|
||||
<a-button class="ele-btn-icon" @click="clearSiteInfoCache">
|
||||
清除缓存
|
||||
</a-button>
|
||||
<a-divider type="vertical" />
|
||||
<!-- 搜索表单 -->
|
||||
<a-input-search
|
||||
@@ -51,12 +54,7 @@
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.key === 'path'">
|
||||
<span class="cursor-pointer" v-if="isDirectory(record)"></span>
|
||||
<span
|
||||
v-else
|
||||
@click="openSpmUrl(`${record.path}`, record, record.navigationId)"
|
||||
class="ele-text-placeholder cursor-pointer"
|
||||
>{{ record.path }}</span
|
||||
>
|
||||
<span v-else class="ele-text-placeholder">{{ record.path }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'component'">
|
||||
<template v-if="!isDirectory(record)">
|
||||
@@ -121,10 +119,12 @@
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a-tooltip :title="`配置SEO及页面内容`">
|
||||
<a class="text-fuchsia-300" @click="openDesign(record)">设计</a>
|
||||
</a-tooltip>
|
||||
<a-divider type="vertical" />
|
||||
<template v-if="record.parentId === 0">
|
||||
<a-tooltip :title="`配置SEO及页面内容`">
|
||||
<a class="text-fuchsia-300" @click="openDesign(record)">设计</a>
|
||||
</a-tooltip>
|
||||
<a-divider type="vertical" />
|
||||
</template>
|
||||
<a-tooltip :title="`添加子分类`">
|
||||
<a @click="openEdit(null, record.navigationId)">添加</a>
|
||||
</a-tooltip>
|
||||
@@ -202,6 +202,7 @@
|
||||
import { getSiteInfo } from '@/api/layout';
|
||||
import { CmsDesign } from '@/api/cms/cmsDesign/model';
|
||||
import { getSiteDomain } from '@/utils/domain';
|
||||
import { removeSiteInfoCache } from '@/api/cms/website';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -233,13 +234,13 @@
|
||||
hideInTable: true,
|
||||
key: 'component'
|
||||
},
|
||||
{
|
||||
title: '模型',
|
||||
dataIndex: 'model',
|
||||
key: 'model',
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
// {
|
||||
// title: '模型',
|
||||
// dataIndex: 'model',
|
||||
// key: 'model',
|
||||
// align: 'center',
|
||||
// width: 120
|
||||
// },
|
||||
{
|
||||
title: '位置',
|
||||
dataIndex: 'position',
|
||||
@@ -299,7 +300,7 @@
|
||||
// 表格展开的行
|
||||
const expandedRowKeys = ref<number[]>([]);
|
||||
const searchText = ref('');
|
||||
const position = ref(1);
|
||||
const position = ref(undefined);
|
||||
const tenantId = ref<number>();
|
||||
|
||||
getSiteInfo().then((data) => {
|
||||
@@ -307,12 +308,22 @@
|
||||
domain.value = data.domain;
|
||||
});
|
||||
|
||||
// 清除缓存
|
||||
const clearSiteInfoCache = () => {
|
||||
removeSiteInfoCache('SiteInfo:' + localStorage.getItem('TenantId')).then(
|
||||
(msg) => {
|
||||
if (msg) {
|
||||
message.success('缓存已更新');
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
// 表格数据源
|
||||
const datasource: DatasourceFunction = ({ where }) => {
|
||||
where = {};
|
||||
where.keywords = searchText.value;
|
||||
// where.position = position.value;
|
||||
where.top = 0;
|
||||
where.top = undefined;
|
||||
where.bottom = undefined;
|
||||
if (position.value == 1) {
|
||||
where.top = 0;
|
||||
|
||||
Reference in New Issue
Block a user