修复已知问题

This commit is contained in:
2024-09-27 14:17:12 +08:00
parent c0328fa23e
commit 5e56c31300
299 changed files with 17512 additions and 987 deletions
+27 -3
View File
@@ -19,7 +19,12 @@
>
<template #toolbar>
<a-space>
<a-button type="primary" class="ele-btn-icon" @click="openEdit()">
<a-button
v-if="!merchantId"
type="primary"
class="ele-btn-icon"
@click="openEdit()"
>
<template #icon>
<plus-outlined />
</template>
@@ -37,6 +42,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
@@ -132,7 +140,7 @@
>
</template>
<template v-else-if="column.key === 'action'">
<a-space>
<a-space v-if="!merchantId">
<a-tooltip :title="`配置SEO及页面内容`">
<a class="text-fuchsia-300" @click="openDesign(record)">设计</a>
</a-tooltip>
@@ -207,6 +215,8 @@
import { openSpmUrl } from '@/utils/common';
import { getSiteInfo } from '@/api/layout';
import { Design } from '@/api/cms/design/model';
import { getMerchantId } from '@/utils/merchant';
import { removeSiteInfoCache } from '@/api/cms/website';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -305,6 +315,7 @@
const position = ref(1);
const tenantId = ref<number>();
const domain = ref<string>();
const merchantId = getMerchantId();
getSiteInfo().then((data) => {
tenantId.value = data.tenantId;
@@ -316,6 +327,17 @@
localStorage.setItem('Domain', `${domain.value}`);
});
// 清除缓存
const clearSiteInfoCache = () => {
removeSiteInfoCache('SiteInfo:' + localStorage.getItem('TenantId')).then(
(msg) => {
if (msg) {
message.success('缓存已更新');
}
}
);
};
// 表格数据源
const datasource: DatasourceFunction = ({ where }) => {
where = {};
@@ -482,7 +504,9 @@
},
// 行双击事件
onDblclick: () => {
openEdit(record);
if (!getMerchantId()) {
openEdit(record);
}
}
};
};