新增:批量删除菜单功能和复制菜单功能

This commit is contained in:
2024-09-01 01:59:07 +08:00
parent 41ad9a474e
commit bf43bdbab4
22 changed files with 1314 additions and 87 deletions

View File

@@ -23,7 +23,6 @@
<template v-if="column.key === 'domain'">
<a
v-if="record.status == 1"
class="ele-text-success"
@click="openUrl(`https://${record.domain}`)"
>{{ record.domain }}</a
>
@@ -34,6 +33,10 @@
</a-space>
</span>
</template>
<template v-if="column.key === 'type'">
<a-tag color="orange" v-if="record.type === 1">系统</a-tag>
<a-tag v-if="record.type === 0">自定义</a-tag>
</template>
<template v-if="column.key === 'hostName'">
<span class="ele-text-placeholder">{{ record.hostName }}</span>
</template>
@@ -54,10 +57,10 @@
@click="openEdit(record)"
>验证中</a-tag
>
<a-tag v-if="record.status === 1" color="green">绑定成功</a-tag>
<a-tag v-if="record.status === 1" color="green">已生效</a-tag>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-space v-if="record.type === 0">
<a-button @click="openEdit(record)" size="small">管理</a-button>
<a-popconfirm
title="确定要删除此域名吗?"
@@ -137,6 +140,12 @@
width: 240,
key: 'domain'
},
{
title: '类型',
dataIndex: 'type',
align: 'center',
key: 'type'
},
{
title: '主机记录',
dataIndex: 'hostName',

View File

@@ -22,7 +22,6 @@
<a-col
v-bind="styleResponsive ? { md: 12, sm: 24, xs: 24 } : { span: 12 }"
>
{{ form.parentId }}
<a-form-item label="上级分类" name="parentId">
<a-tree-select
allow-clear
@@ -45,7 +44,7 @@
<a-form-item
:label="form.type == 9 ? '链接地址' : '路由地址'"
name="path"
v-if="isUpdate"
v-if="isUpdate || form.model == 'links'"
>
<a-input
allow-clear
@@ -56,15 +55,18 @@
@pressEnter="save"
/>
</a-form-item>
<a-form-item label="组件路径" name="component" v-if="isUpdate">
<a-input
allow-clear
placeholder="/pages/product/detail.vue"
v-model:value="form.component"
disabled
@pressEnter="save"
/>
</a-form-item>
<!-- <a-form-item-->
<!-- label="组件路径"-->
<!-- name="component"-->
<!-- v-if="isUpdate"-->
<!-- >-->
<!-- <a-input-->
<!-- allow-clear-->
<!-- placeholder="/pages/product/detail.vue"-->
<!-- v-model:value="form.component"-->
<!-- @pressEnter="save"-->
<!-- />-->
<!-- </a-form-item>-->
<a-form-item label="css样式" name="style" v-if="isUpdate">
<a-input
allow-clear

View File

@@ -35,7 +35,7 @@
v-model:value="form.websiteName"
/>
</a-form-item>
<a-form-item label="访问地址" name="domain">
<a-form-item label="二级域名" name="websiteCode">
<a-input
v-model:value="form.websiteCode"
placeholder="huawei"
@@ -43,6 +43,13 @@
addon-after=".wsdns.cn"
/>
</a-form-item>
<!-- <a-form-item label="顶级域名" name="domain" v-if="form.websiteCode">-->
<!-- <a-input-->
<!-- v-model:value="form.domain"-->
<!-- placeholder="huawei.com"-->
<!-- addon-before="https://"-->
<!-- />-->
<!-- </a-form-item>-->
<a-form-item label="网站描述" name="comments">
<a-textarea
:rows="4"
@@ -139,6 +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';
// 是否是修改
const isUpdate = ref(false);
@@ -228,14 +236,14 @@
trigger: 'blur'
}
],
domain: [
{
required: true,
type: 'string',
message: '请填写网站域名',
trigger: 'blur'
}
],
// domain: [
// {
// required: true,
// type: 'string',
// message: '请填写网站域名',
// trigger: 'blur'
// }
// ],
adminUrl: [
{
required: true,
@@ -308,7 +316,7 @@
loading.value = false;
message.success(msg);
updateVisible(false);
localStorage.setItem('Domain', `${form.prefix}${form.domain}`);
localStorage.setItem('Domain', `${form.websiteCode}.wsdns.cn`);
emit('done');
})
.catch((e) => {

View File

@@ -26,6 +26,19 @@
<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="
@@ -36,7 +49,7 @@
)
"
>
{{ record.websiteCode }}.wsdns.cn
{{ record.websiteCode ? `${record.websiteCode}.wsdns.cn` : '' }}
</a-button>
</template>
<template v-if="column.key === 'type'">