新增:导航栏目设计拆分简单和高级展示方式
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
<!-- <a-button class="ele-btn-icon" @click="openUrl(`/mp-group`)">-->
|
||||
<!-- <span>卡片管理</span>-->
|
||||
<!-- </a-button>-->
|
||||
<!-- <a-button class="ele-btn-icon" @click="openUrl(`/mp-package`)">-->
|
||||
<!-- <span>分包管理</span>-->
|
||||
<!-- <a-button class="ele-btn-icon" @click="navigator(`/website/domain`)">-->
|
||||
<!-- <span>域名管理</span>-->
|
||||
<!-- </a-button>-->
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -28,7 +28,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { PlusOutlined } from '@ant-design/icons-vue';
|
||||
import { watch } from 'vue';
|
||||
import { openUrl } from '@/utils/common';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
||||
import { FormInstance } from 'ant-design-vue/es/form';
|
||||
import { FileRecord } from '@/api/system/file/model';
|
||||
import { addDomain } from '@/api/cms/domain';
|
||||
import { checkExistence } from '@/api/cms/domain';
|
||||
|
||||
// 是否是修改
|
||||
const isUpdate = ref(false);
|
||||
@@ -175,6 +175,7 @@
|
||||
const formRef = ref<FormInstance | null>(null);
|
||||
const images = ref<ItemType[]>([]);
|
||||
const websiteQrcode = ref<ItemType[]>([]);
|
||||
const oldDomain = ref();
|
||||
|
||||
// 用户信息
|
||||
const form = reactive<Website>({
|
||||
@@ -244,6 +245,31 @@
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ],
|
||||
websiteCode: [
|
||||
{
|
||||
required: true,
|
||||
type: 'string',
|
||||
message: '该域名已存在',
|
||||
validator: (_rule: Rule, value: string) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (!value) {
|
||||
return reject('请输入二级域名');
|
||||
}
|
||||
checkExistence('domain', `${value}.wsdns.cn`)
|
||||
.then(() => {
|
||||
if (value === oldDomain.value) {
|
||||
return resolve();
|
||||
}
|
||||
reject('已存在');
|
||||
})
|
||||
.catch(() => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
adminUrl: [
|
||||
{
|
||||
required: true,
|
||||
@@ -342,6 +368,9 @@
|
||||
status: 'done'
|
||||
});
|
||||
}
|
||||
if (props.data.websiteCode) {
|
||||
oldDomain.value = props.data.websiteCode;
|
||||
}
|
||||
isUpdate.value = true;
|
||||
} else {
|
||||
isUpdate.value = false;
|
||||
|
||||
@@ -76,6 +76,10 @@
|
||||
</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>
|
||||
</template>
|
||||
@@ -147,6 +151,12 @@
|
||||
|
||||
// 表格列配置
|
||||
const columns = ref<ColumnItem[]>([
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'tenantId',
|
||||
key: 'tenantId',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '网站名称',
|
||||
dataIndex: 'websiteName',
|
||||
@@ -195,7 +205,7 @@
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 120,
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
|
||||
Reference in New Issue
Block a user