优化:把网站设置、参数配置、域名管理放到概览页面
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
row-key="websiteId"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:parse-data="parseData"
|
||||
:customRow="customRow"
|
||||
:need-page="false"
|
||||
tool-class="ele-toolbar-form"
|
||||
@@ -16,6 +17,7 @@
|
||||
<search
|
||||
@search="reload"
|
||||
:selection="selection"
|
||||
:website="website"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
@batchMove="openMove"
|
||||
@@ -26,19 +28,6 @@
|
||||
<a-image :src="record.websiteLogo" :width="50" />
|
||||
</template>
|
||||
<template v-if="column.key === 'domain'">
|
||||
<!-- <a-button-->
|
||||
<!-- type="link"-->
|
||||
<!-- v-if="record.domain"-->
|
||||
<!-- @click="-->
|
||||
<!-- openSpmUrl(-->
|
||||
<!-- `https://${record.domain}`,-->
|
||||
<!-- record,-->
|
||||
<!-- record.websiteId-->
|
||||
<!-- )-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- {{ record.domain }}-->
|
||||
<!-- </a-button>-->
|
||||
<a-button
|
||||
type="link"
|
||||
@click="
|
||||
@@ -76,9 +65,6 @@
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a @click="openUrl(`/website/domain/${record.websiteId}`)"
|
||||
>域名管理</a
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="openEdit(record)">编辑</a>
|
||||
</a-space>
|
||||
@@ -112,8 +98,8 @@
|
||||
updateWebsite
|
||||
} from '@/api/cms/website';
|
||||
import type { Website, WebsiteParam } from '@/api/cms/website/model';
|
||||
import { openPreview, openSpmUrl, openUrl } from '@/utils/common';
|
||||
import { getSiteDomain } from '@/utils/domain';
|
||||
import { openSpmUrl } from '@/utils/common';
|
||||
import { PageResult } from '@/api';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -128,7 +114,8 @@
|
||||
const showMove = ref(false);
|
||||
// 加载状态
|
||||
const loading = ref(true);
|
||||
const domain = getSiteDomain();
|
||||
// 当前网站项目
|
||||
const website = ref<Website>();
|
||||
|
||||
// 表格数据源
|
||||
const datasource: DatasourceFunction = ({
|
||||
@@ -152,7 +139,7 @@
|
||||
// 表格列配置
|
||||
const columns = ref<ColumnItem[]>([
|
||||
{
|
||||
title: 'ID',
|
||||
title: '租户ID',
|
||||
dataIndex: 'tenantId',
|
||||
key: 'tenantId',
|
||||
width: 80
|
||||
@@ -201,17 +188,25 @@
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd')
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 180,
|
||||
// fixed: 'right',
|
||||
// align: 'center',
|
||||
// hideInSetting: true
|
||||
// }
|
||||
]);
|
||||
|
||||
// 整理数据
|
||||
const parseData = (data: PageResult<Website>) => {
|
||||
if (data?.count > 0) {
|
||||
website.value = data.list[0];
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
/* 搜索 */
|
||||
const reload = (where?: WebsiteParam) => {
|
||||
selection.value = [];
|
||||
|
||||
Reference in New Issue
Block a user