completepage: 🍻 修改前端配置
This commit is contained in:
parent
671f3831e5
commit
dd20ee17b9
|
@ -0,0 +1,12 @@
|
||||||
|
import { http } from '@/api/service/request';
|
||||||
|
import type { BaseResult } from '@/api/service/types';
|
||||||
|
|
||||||
|
/** 获取修改前端配置文件 */
|
||||||
|
export const fetchGetWebConfig = () => {
|
||||||
|
return http.request<BaseResult<any>>('get', '/config/getWebConfig');
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 更新web配置文件 */
|
||||||
|
export const fetchUpdateWebConfiguration = (data: any) => {
|
||||||
|
return http.request<BaseResult<any>>('put', '/config/updateWebConfiguration', { data });
|
||||||
|
};
|
|
@ -10,8 +10,3 @@ export const getRouterAsync = () => {
|
||||||
export const fetchUploadFile = (data: any) => {
|
export const fetchUploadFile = (data: any) => {
|
||||||
return http.request<BaseResult<any>>('post', '/files/upload', { data }, { headers: { 'Content-Type': 'multipart/form-data' } });
|
return http.request<BaseResult<any>>('post', '/files/upload', { data }, { headers: { 'Content-Type': 'multipart/form-data' } });
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取前端配置文件 */
|
|
||||||
export const fetchPlatformConfig = () => {
|
|
||||||
return http.request<any>('get', '/files/noManage/resourceFiles/platform-config.json');
|
|
||||||
};
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ defineOptions({
|
||||||
defineProps({
|
defineProps({
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: $t('please_select_animation'),
|
default: $t('pleaseSelectAnimation'),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ function onMouseleave() {
|
||||||
</h4>
|
</h4>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<el-empty v-show="animatesList.length === 0" :description="`${searchVal} ${$t('animation_not_exist')}`" :image-size="60" />
|
<el-empty v-show="animatesList.length === 0" :description="`${searchVal} ${$t('animationNotExist')}`" :image-size="60" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -16,10 +16,10 @@ const router = useRouter();
|
||||||
<div class="ml-12">
|
<div class="ml-12">
|
||||||
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 80 } }" :initial="{ opacity: 0, y: 100 }" class="font-medium text-4xl mb-4 dark:text-white">403</p>
|
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 80 } }" :initial="{ opacity: 0, y: 100 }" class="font-medium text-4xl mb-4 dark:text-white">403</p>
|
||||||
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 120 } }" :initial="{ opacity: 0, y: 100 }" class="mb-4 text-gray-500">
|
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 120 } }" :initial="{ opacity: 0, y: 100 }" class="mb-4 text-gray-500">
|
||||||
{{ $t('sorry_no_access') }}
|
{{ $t('sorryNoAccess') }}
|
||||||
</p>
|
</p>
|
||||||
<el-button v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 160 } }" :initial="{ opacity: 0, y: 100 }" type="primary" @click="router.push('/')">
|
<el-button v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 160 } }" :initial="{ opacity: 0, y: 100 }" type="primary" @click="router.push('/')">
|
||||||
{{ $t('return_to_homepage') }}
|
{{ $t('returnToHomepage') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@ const router = useRouter();
|
||||||
<div class="ml-12">
|
<div class="ml-12">
|
||||||
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 80 } }" :initial="{ opacity: 0, y: 100 }" class="font-medium text-4xl mb-4 dark:text-white">404</p>
|
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 80 } }" :initial="{ opacity: 0, y: 100 }" class="font-medium text-4xl mb-4 dark:text-white">404</p>
|
||||||
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 120 } }" :initial="{ opacity: 0, y: 100 }" class="mb-4 text-gray-500">
|
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 120 } }" :initial="{ opacity: 0, y: 100 }" class="mb-4 text-gray-500">
|
||||||
{{ $t('sorry_page_not_found') }}
|
{{ $t('sorryPageNotFound') }}
|
||||||
</p>
|
</p>
|
||||||
<el-button
|
<el-button
|
||||||
v-motion
|
v-motion
|
||||||
|
@ -28,7 +28,7 @@ const router = useRouter();
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="router.push('/')"
|
@click="router.push('/')"
|
||||||
>
|
>
|
||||||
{{ $t('return_to_homepage') }}
|
{{ $t('returnToHomepage') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,10 +16,10 @@ const router = useRouter();
|
||||||
<div class="ml-12">
|
<div class="ml-12">
|
||||||
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 80 } }" :initial="{ opacity: 0, y: 100 }" class="font-medium text-4xl mb-4 dark:text-white">500</p>
|
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 80 } }" :initial="{ opacity: 0, y: 100 }" class="font-medium text-4xl mb-4 dark:text-white">500</p>
|
||||||
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 120 } }" :initial="{ opacity: 0, y: 100 }" class="mb-4 text-gray-500">
|
<p v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 120 } }" :initial="{ opacity: 0, y: 100 }" class="mb-4 text-gray-500">
|
||||||
{{ $t('sorry_server_error') }}
|
{{ $t('sorryServerError') }}
|
||||||
</p>
|
</p>
|
||||||
<el-button v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 160 } }" :initial="{ opacity: 0, y: 100 }" type="primary" @click="router.push('/')">
|
<el-button v-motion :enter="{ opacity: 1, y: 0, transition: { delay: 160 } }" :initial="{ opacity: 0, y: 100 }" type="primary" @click="router.push('/')">
|
||||||
{{ $t('return_to_homepage') }}
|
{{ $t('returnToHomepage') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import axios from 'axios';
|
||||||
import type { App } from 'vue';
|
import type { App } from 'vue';
|
||||||
|
|
||||||
let config: object = {};
|
let config: object = {};
|
||||||
const { VITE_PUBLIC_PATH, VITE_BASE_API } = import.meta.env;
|
const { VITE_BASE_API } = import.meta.env;
|
||||||
|
|
||||||
const setConfig = (cfg?: unknown) => {
|
const setConfig = (cfg?: unknown) => {
|
||||||
config = Object.assign(config, cfg);
|
config = Object.assign(config, cfg);
|
||||||
|
@ -31,7 +31,7 @@ export const getPlatformConfig = async (app: App): Promise<undefined> => {
|
||||||
app.config.globalProperties.$config = getConfig();
|
app.config.globalProperties.$config = getConfig();
|
||||||
return axios({
|
return axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `${VITE_BASE_API}/files/noManage/resourceFiles/platform-config.json`,
|
url: `${VITE_BASE_API}/config/noAuth/webConfig`,
|
||||||
})
|
})
|
||||||
.then(({ data: config }) => {
|
.then(({ data: config }) => {
|
||||||
let $config = app.config.globalProperties.$config;
|
let $config = app.config.globalProperties.$config;
|
||||||
|
|
|
@ -1,99 +1,97 @@
|
||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from '@/plugins/i18n';
|
||||||
|
|
||||||
export interface ListItem {
|
export interface ListItem {
|
||||||
avatar: string;
|
avatar: string;
|
||||||
title: string;
|
title: string;
|
||||||
datetime: string;
|
datetime: string;
|
||||||
type: string;
|
type: string;
|
||||||
description: string;
|
description: string;
|
||||||
status?: "primary" | "success" | "warning" | "info" | "danger";
|
status?: 'primary' | 'success' | 'warning' | 'info' | 'danger';
|
||||||
extra?: string;
|
extra?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TabItem {
|
export interface TabItem {
|
||||||
key: string;
|
key: string;
|
||||||
name: string;
|
name: string;
|
||||||
list: ListItem[];
|
list: ListItem[];
|
||||||
emptyText: string;
|
emptyText: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const noticesData: TabItem[] = [
|
export const noticesData: TabItem[] = [
|
||||||
{
|
{
|
||||||
key: "1",
|
key: '1',
|
||||||
name: $t("status.pureNotify"),
|
name: $t('status.pureNotify'),
|
||||||
list: [],
|
list: [],
|
||||||
emptyText: $t("status.pureNoNotify")
|
emptyText: $t('status.pureNoNotify'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "2",
|
key: '2',
|
||||||
name: $t("status.pureMessage"),
|
name: $t('status.pureMessage'),
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile1.svg",
|
avatar: 'https://xiaoxian521.github.io/hyperlink/svg/smile1.svg',
|
||||||
title: "小铭 评论了你",
|
title: '小铭 评论了你',
|
||||||
description: "诚在于心,信在于行,诚信在于心行合一。",
|
description: '诚在于心,信在于行,诚信在于心行合一。',
|
||||||
datetime: "今天",
|
datetime: '今天',
|
||||||
type: "2"
|
type: '2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile2.svg",
|
avatar: 'https://xiaoxian521.github.io/hyperlink/svg/smile2.svg',
|
||||||
title: "李白 回复了你",
|
title: '李白 回复了你',
|
||||||
description: "长风破浪会有时,直挂云帆济沧海。",
|
description: '长风破浪会有时,直挂云帆济沧海。',
|
||||||
datetime: "昨天",
|
datetime: '昨天',
|
||||||
type: "2"
|
type: '2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile5.svg",
|
avatar: 'https://xiaoxian521.github.io/hyperlink/svg/smile5.svg',
|
||||||
title: "标题",
|
title: '标题',
|
||||||
description:
|
description: '请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容',
|
||||||
"请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容",
|
datetime: '时间',
|
||||||
datetime: "时间",
|
type: '2',
|
||||||
type: "2"
|
},
|
||||||
}
|
],
|
||||||
],
|
emptyText: $t('status.pureNoMessage'),
|
||||||
emptyText: $t("status.pureNoMessage")
|
},
|
||||||
},
|
{
|
||||||
{
|
key: '3',
|
||||||
key: "3",
|
name: $t('status.pureTodo'),
|
||||||
name: $t("status.pureTodo"),
|
list: [
|
||||||
list: [
|
{
|
||||||
{
|
avatar: '',
|
||||||
avatar: "",
|
title: '第三方紧急代码变更',
|
||||||
title: "第三方紧急代码变更",
|
description: '小林提交于 2024-05-10,需在 2024-05-11 前完成代码变更任务',
|
||||||
description:
|
datetime: '',
|
||||||
"小林提交于 2024-05-10,需在 2024-05-11 前完成代码变更任务",
|
extra: '马上到期',
|
||||||
datetime: "",
|
status: 'danger',
|
||||||
extra: "马上到期",
|
type: '3',
|
||||||
status: "danger",
|
},
|
||||||
type: "3"
|
{
|
||||||
},
|
avatar: '',
|
||||||
{
|
title: '版本发布',
|
||||||
avatar: "",
|
description: '指派小铭于 2024-06-18 前完成更新并发布',
|
||||||
title: "版本发布",
|
datetime: '',
|
||||||
description: "指派小铭于 2024-06-18 前完成更新并发布",
|
extra: '已耗时 8 天',
|
||||||
datetime: "",
|
status: 'warning',
|
||||||
extra: "已耗时 8 天",
|
type: '3',
|
||||||
status: "warning",
|
},
|
||||||
type: "3"
|
{
|
||||||
},
|
avatar: '',
|
||||||
{
|
title: '新功能开发',
|
||||||
avatar: "",
|
description: '开发多租户管理',
|
||||||
title: "新功能开发",
|
datetime: '',
|
||||||
description: "开发多租户管理",
|
extra: '进行中',
|
||||||
datetime: "",
|
type: '3',
|
||||||
extra: "进行中",
|
},
|
||||||
type: "3"
|
{
|
||||||
},
|
avatar: '',
|
||||||
{
|
title: '任务名称',
|
||||||
avatar: "",
|
description: '任务需要在 2030-10-30 10:00 前启动',
|
||||||
title: "任务名称",
|
datetime: '',
|
||||||
description: "任务需要在 2030-10-30 10:00 前启动",
|
extra: '未开始',
|
||||||
datetime: "",
|
status: 'info',
|
||||||
extra: "未开始",
|
type: '3',
|
||||||
status: "info",
|
},
|
||||||
type: "3"
|
],
|
||||||
}
|
emptyText: $t('status.pureNoTodo'),
|
||||||
],
|
},
|
||||||
emptyText: $t("status.pureNoTodo")
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -78,7 +78,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('emailTemplate')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('emailTemplate')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="selectRows.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="selectRows.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
|
|
@ -25,7 +25,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('emailTemplate')}`,
|
title: `${$t('addNew')}${$t('emailTemplate')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -97,10 +97,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -115,10 +115,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('email_user_send_config')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('email_user_send_config')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
|
|
@ -27,7 +27,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('emailUsers')}`,
|
title: `${$t('addNew')}${$t('emailUsers')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -101,10 +101,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -121,10 +121,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('menuIcon')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('menuIcon')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
|
|
@ -26,7 +26,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')} ${$t('menuIcon')}`,
|
title: `${$t('addNew')} ${$t('menuIcon')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -92,10 +92,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -112,10 +112,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { rules } from '@/views/configuration/menuIcon/utils/columns';
|
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import ReCol from '@/components/MyCol';
|
import ReCol from '@/components/MyCol';
|
||||||
import { form, onSearch } from '@/views/configuration/webConifg/utils/hooks';
|
import { form, onSearch, submitForm } from '@/views/configuration/webConifg/utils/hooks';
|
||||||
|
import { rules } from '@/views/configuration/webConifg/utils/columns';
|
||||||
|
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||||
|
import { usePublicHooks } from '@/views/hooks';
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
const ruleFormRef = ref<FormInstance>();
|
||||||
|
const i18nTypeStore = userI18nTypeStore();
|
||||||
|
// 用户是否停用样式
|
||||||
|
const { switchStyle } = usePublicHooks();
|
||||||
|
const theme = ['dark', 'light', 'system'];
|
||||||
|
const layout = ['vertical', 'horizontal', 'mix'];
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
onSearch();
|
onSearch();
|
||||||
|
@ -14,7 +21,7 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" class="bg-white p-[30px]" label-width="auto">
|
<el-form ref="ruleFormRef" :model="form" :rules="rules" class="bg-white p-[30px] h-[100%]" label-position="left" label-width="auto" status-icon>
|
||||||
<el-row :gutter="30">
|
<el-row :gutter="30">
|
||||||
<!-- 应用程序的版本 -->
|
<!-- 应用程序的版本 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
|
@ -40,147 +47,157 @@ onMounted(() => {
|
||||||
<!-- 头部是否固定 -->
|
<!-- 头部是否固定 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('fixedHeader')" prop="fixedHeader">
|
<el-form-item :label="$t('fixedHeader')" prop="fixedHeader">
|
||||||
<el-switch v-model="form.fixedHeader" :placeholder="$t('input') + $t('fixedHeader')" />
|
<el-switch v-model="form.fixedHeader" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 侧边栏是否隐藏 -->
|
<!-- 侧边栏是否隐藏 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('hiddenSideBar')" prop="hiddenSideBar">
|
<el-form-item :label="$t('hiddenSideBar')" prop="hiddenSideBar">
|
||||||
<el-switch v-model="form.hiddenSideBar" :placeholder="$t('input') + $t('hiddenSideBar')" />
|
<el-switch v-model="form.hiddenSideBar" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否缓存多个标签 -->
|
<!-- 是否缓存多个标签 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('multiTagsCache')" prop="multiTagsCache">
|
<el-form-item :label="$t('multiTagsCache')" prop="multiTagsCache">
|
||||||
<el-switch v-model="form.multiTagsCache" :placeholder="$t('input') + $t('multiTagsCache')" />
|
<el-switch v-model="form.multiTagsCache" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否持久化 -->
|
<!-- 是否持久化 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('keepAlive')" prop="keepAlive">
|
<el-form-item :label="$t('keepAlive')" prop="keepAlive">
|
||||||
<el-switch v-model="form.keepAlive" :placeholder="$t('input') + $t('keepAlive')" />
|
<el-switch v-model="form.keepAlive" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 语言类型 -->
|
<!-- 语言类型 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('appLocale')" prop="locale">
|
<el-form-item :label="$t('appLocale')" prop="locale">
|
||||||
<el-input v-model="form.locale" :placeholder="$t('input') + $t('appLocale')" autocomplete="off" type="text" />
|
<el-select v-model="form.locale" :placeholder="$t('select') + $t('appLocale')" filterable>
|
||||||
|
<el-option v-for="item in i18nTypeStore.datalist" :key="item.id" :label="item.summary" :value="item.typeName" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 应用程序的布局 -->
|
<!-- 应用程序的布局 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('layout')" prop="layout">
|
<el-form-item :label="$t('layout')" prop="layout">
|
||||||
<el-input v-model="form.layout" :placeholder="$t('input') + $t('layout')" autocomplete="off" type="text" />
|
<el-select v-model="form.layout" :placeholder="$t('select') + $t('layout')" filterable>
|
||||||
|
<el-option v-for="item in layout" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 应用程序的主题 -->
|
<!-- 应用程序的主题 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('theme')" prop="theme">
|
<el-form-item :label="$t('theme')" prop="theme">
|
||||||
<el-input v-model="form.theme" :placeholder="$t('input') + $t('theme')" autocomplete="off" type="text" />
|
<el-select v-model="form.theme" :placeholder="$t('select') + $t('theme')" filterable>
|
||||||
|
<el-option v-for="item in theme" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否启用深色模式 -->
|
<!-- 是否启用深色模式 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('darkMode')" prop="darkMode">
|
<el-form-item :label="$t('darkMode')" prop="darkMode">
|
||||||
<el-switch v-model="form.darkMode" :placeholder="$t('input') + $t('darkMode')" />
|
<el-switch v-model="form.darkMode" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 应用程序的整体样式 -->
|
<!-- 应用程序的整体样式 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('overallStyle')" prop="overallStyle">
|
<el-form-item :label="$t('overallStyle')" prop="overallStyle">
|
||||||
<el-input v-model="form.overallStyle" :placeholder="$t('input') + $t('overallStyle')" autocomplete="off" type="text" />
|
<el-select v-model="form.overallStyle" :placeholder="$t('select') + $t('overallStyle')" filterable>
|
||||||
|
<el-option v-for="item in theme" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否启用灰色模式 -->
|
<!-- 是否启用灰色模式 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('greyStyle')" prop="grey">
|
<el-form-item :label="$t('greyStyle')" prop="grey">
|
||||||
<el-switch v-model="form.grey" :placeholder="$t('input') + $t('greyStyle')" />
|
<el-switch v-model="form.grey" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 色弱模式 -->
|
<!-- 色弱模式 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('weakStyle')" prop="weak">
|
<el-form-item :label="$t('weakStyle')" prop="weak">
|
||||||
<el-switch v-model="form.weak" :placeholder="$t('input') + $t('weakStyle')" />
|
<el-switch v-model="form.weak" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否隐藏选项卡 -->
|
<!-- 是否隐藏选项卡 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('hideTabs')" prop="weak">
|
<el-form-item :label="$t('hideTabs')" prop="weak">
|
||||||
<el-switch v-model="form.hideTabs" :placeholder="$t('input') + $t('hideTabs')" />
|
<el-switch v-model="form.hideTabs" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否隐藏页脚 -->
|
<!-- 是否隐藏页脚 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('hideFooter')" prop="weak">
|
<el-form-item :label="$t('hideFooter')" prop="weak">
|
||||||
<el-switch v-model="form.hideFooter" :placeholder="$t('input') + $t('hideFooter')" />
|
<el-switch v-model="form.hideFooter" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否拉伸显示 -->
|
<!-- 是否拉伸显示 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('stretch')" prop="stretch">
|
<el-form-item :label="$t('stretch')" prop="stretch">
|
||||||
<el-switch v-model="form.stretch" :placeholder="$t('input') + $t('stretch')" />
|
<el-switch v-model="form.stretch" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 侧边栏的状态 -->
|
<!-- 侧边栏的状态 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('sidebarStatus')" prop="sidebarStatus">
|
<el-form-item :label="$t('sidebarStatus')" prop="sidebarStatus">
|
||||||
<el-switch v-model="form.sidebarStatus" :placeholder="$t('input') + $t('sidebarStatus')" />
|
<el-switch v-model="form.sidebarStatus" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 主题颜色 -->
|
<!-- 主题颜色 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('epThemeColor')" prop="epThemeColor">
|
<el-form-item :label="$t('epThemeColor')" prop="epThemeColor">
|
||||||
<el-switch v-model="form.epThemeColor" :placeholder="$t('input') + $t('epThemeColor')" />
|
<el-color-picker v-model="form.epThemeColor" show-alpha />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否显示logo -->
|
<!-- 是否显示logo -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('showLogo')" prop="showLogo">
|
<el-form-item :label="$t('showLogo')" prop="showLogo">
|
||||||
<el-switch v-model="form.showLogo" :placeholder="$t('input') + $t('showLogo')" />
|
<el-switch v-model="form.showLogo" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 要显示的模型 -->
|
<!-- 要显示的模型 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('showModel')" prop="showModel">
|
<el-form-item :label="$t('showModel')" prop="showModel">
|
||||||
<el-switch v-model="form.showModel" :placeholder="$t('input') + $t('showModel')" />
|
<el-input v-model="form.showModel" :placeholder="$t('input') + $t('showModel')" autocomplete="off" type="text" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 菜单箭头图标是否没有过渡效果 -->
|
<!-- 菜单箭头图标是否没有过渡效果 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('menuArrowIconNoTransition')" prop="menuArrowIconNoTransition">
|
<el-form-item :label="$t('menuArrowIconNoTransition')" prop="menuArrowIconNoTransition">
|
||||||
<el-switch v-model="form.menuArrowIconNoTransition" :placeholder="$t('input') + $t('menuArrowIconNoTransition')" />
|
<el-switch v-model="form.menuArrowIconNoTransition" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 是否缓存异步路由 -->
|
<!-- 是否缓存异步路由 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('cachingAsyncRoutes')" prop="cachingAsyncRoutes">
|
<el-form-item :label="$t('cachingAsyncRoutes')" prop="cachingAsyncRoutes">
|
||||||
<el-switch v-model="form.cachingAsyncRoutes" :placeholder="$t('input') + $t('cachingAsyncRoutes')" />
|
<el-switch v-model="form.cachingAsyncRoutes" :active-text="$t('enable')" :active-value="true" :inactive-text="$t('disable')" :inactive-value="false" :style="switchStyle" inline-prompt />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
<!-- 工具提示的效果 -->
|
<!-- 工具提示的效果 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('tooltipEffect')" prop="tooltipEffect">
|
<el-form-item :label="$t('tooltipEffect')" prop="tooltipEffect">
|
||||||
<el-input v-model="form.tooltipEffect" :placeholder="$t('input') + $t('tooltipEffect')" autocomplete="off" type="text" />
|
<el-select v-model="form.tooltipEffect" :placeholder="$t('select') + $t('tooltipEffect')" filterable>
|
||||||
|
<el-option v-for="item in theme" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
|
|
||||||
|
@ -194,7 +211,14 @@ onMounted(() => {
|
||||||
<!-- 菜单搜索历史 -->
|
<!-- 菜单搜索历史 -->
|
||||||
<re-col :sm="24" :value="12" :xs="24">
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
<el-form-item :label="$t('menuSearchHistory')" prop="menuSearchHistory">
|
<el-form-item :label="$t('menuSearchHistory')" prop="menuSearchHistory">
|
||||||
<el-input v-model="form.menuSearchHistory" :placeholder="$t('input') + $t('menuSearchHistory')" autocomplete="off" type="number" />
|
<el-input v-model="form.menuSearchHistory" :max="99" :min="1" :placeholder="$t('input') + $t('menuSearchHistory')" autocomplete="off" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</re-col>
|
||||||
|
|
||||||
|
<!-- 提交内容 -->
|
||||||
|
<re-col :sm="24" :value="12" :xs="24">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="submitForm(ruleFormRef)"> {{ $t('modifyingConfiguration') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
// 添加规则
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
import { $t } from '@/plugins/i18n';
|
||||||
|
|
||||||
|
export const rules = reactive({
|
||||||
|
// 应用程序的版本
|
||||||
|
version: [{ required: true, message: `${$t('input')}${$t('version')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的版本
|
||||||
|
locale: [{ required: true, message: `${$t('input')}${$t('appLocale')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的标题
|
||||||
|
title: [{ required: true, message: `${$t('input')}${$t('appTitle')}`, trigger: 'blur' }],
|
||||||
|
// 头部是否固定
|
||||||
|
fixedHeader: [{ required: true, message: `${$t('input')}${$t('fixedHeader')}`, trigger: 'blur' }],
|
||||||
|
// 是否缓存多个标签
|
||||||
|
multiTagsCache: [{ required: true, message: `${$t('input')}${$t('multiTagsCache')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的标题
|
||||||
|
copyright: [{ required: true, message: `${$t('input')}${$t('copyright')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的主题
|
||||||
|
theme: [{ required: true, message: `${$t('input')}${$t('theme')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的整体样式
|
||||||
|
overallStyle: [{ required: true, message: `${$t('input')}${$t('overallStyle')}`, trigger: 'blur' }],
|
||||||
|
// 色弱模式
|
||||||
|
weak: [{ required: true, message: `${$t('input')}${$t('weakStyle')}`, trigger: 'blur' }],
|
||||||
|
// 是否隐藏页脚
|
||||||
|
hideFooter: [{ required: true, message: `${$t('input')}${$t('hideFooter')}`, trigger: 'blur' }],
|
||||||
|
// 侧边栏的状态
|
||||||
|
sidebarStatus: [{ required: true, message: `${$t('input')}${$t('sidebarStatus')}`, trigger: 'blur' }],
|
||||||
|
// 是否显示logo
|
||||||
|
showLogo: [{ required: true, message: `${$t('input')}${$t('showLogo')}`, trigger: 'blur' }],
|
||||||
|
// 菜单箭头图标是否没有过渡效果
|
||||||
|
menuArrowIconNoTransition: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: `${$t('input')}${$t('menuArrowIconNoTransition')}`,
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 工具提示的效果
|
||||||
|
tooltipEffect: [{ required: true, message: `${$t('input')}${$t('tooltipEffect')}`, trigger: 'blur' }],
|
||||||
|
// 版权信息
|
||||||
|
hiddenSideBar: [{ required: true, message: `${$t('input')}${$t('hiddenSideBar')}`, trigger: 'blur' }],
|
||||||
|
// 头部是否固定
|
||||||
|
keepAlive: [{ required: true, message: `${$t('input')}${$t('keepAlive')}`, trigger: 'blur' }],
|
||||||
|
// 侧边栏是否隐藏
|
||||||
|
layout: [{ required: true, message: `${$t('input')}${$t('layout')}`, trigger: 'blur' }],
|
||||||
|
// 是否缓存多个标签
|
||||||
|
darkMode: [{ required: true, message: `${$t('input')}${$t('darkMode')}`, trigger: 'blur' }],
|
||||||
|
// 是否持久化
|
||||||
|
grey: [{ required: true, message: `${$t('input')}${$t('greyStyle')}`, trigger: 'blur' }],
|
||||||
|
// 语言类型
|
||||||
|
hideTabs: [{ required: true, message: `${$t('input')}${$t('hideTabs')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的布局
|
||||||
|
stretch: [{ required: true, message: `${$t('input')}${$t('stretch')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的主题
|
||||||
|
epThemeColor: [{ required: true, message: `${$t('input')}${$t('epThemeColor')}`, trigger: 'blur' }],
|
||||||
|
// 是否启用深色模式
|
||||||
|
showModel: [{ required: true, message: `${$t('input')}${$t('showModel')}`, trigger: 'blur' }],
|
||||||
|
// 应用程序的整体样式
|
||||||
|
cachingAsyncRoutes: [{ required: true, message: `${$t('input')}${$t('cachingAsyncRoutes')}`, trigger: 'blur' }],
|
||||||
|
// 是否启用灰色模式
|
||||||
|
responsiveStorageNameSpace: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: `${$t('input')}${$t('responsiveStorageNameSpace')}`,
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 菜单搜索历史
|
||||||
|
menuSearchHistory: [{ required: true, message: `${$t('input')}${$t('menuSearchHistory')}`, trigger: 'blur' }],
|
||||||
|
});
|
|
@ -1,5 +1,8 @@
|
||||||
import { fetchPlatformConfig } from '@/api/v1/system';
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import type { FormInstance } from 'element-plus';
|
||||||
|
import { fetchGetWebConfig, fetchUpdateWebConfiguration } from '@/api/v1/configuration';
|
||||||
|
import { message, messageBox } from '@/utils/message';
|
||||||
|
import { $t } from '@/plugins/i18n';
|
||||||
|
|
||||||
export const form = ref({
|
export const form = ref({
|
||||||
version: '', // 应用程序的版本
|
version: '', // 应用程序的版本
|
||||||
|
@ -32,7 +35,32 @@ export const form = ref({
|
||||||
|
|
||||||
/** 获取前端配置文件 */
|
/** 获取前端配置文件 */
|
||||||
export const onSearch = async () => {
|
export const onSearch = async () => {
|
||||||
const result = await fetchPlatformConfig();
|
const result = await fetchGetWebConfig();
|
||||||
console.log(result);
|
if (result.code !== 200) return;
|
||||||
form.value = result;
|
form.value = result.data;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交表单 */
|
||||||
|
export const submitForm = async (formEl: FormInstance | undefined) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
await formEl.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
// 是否确认修改弹窗内容
|
||||||
|
const confirm = await messageBox({
|
||||||
|
title: $t('confirmUpdateConfiguration'),
|
||||||
|
showMessage: false,
|
||||||
|
confirmMessage: undefined,
|
||||||
|
cancelMessage: $t('cancel'),
|
||||||
|
});
|
||||||
|
if (!confirm) return;
|
||||||
|
|
||||||
|
// 修改内容
|
||||||
|
const result = await fetchUpdateWebConfiguration(form.value);
|
||||||
|
if (result.code !== 200) return;
|
||||||
|
|
||||||
|
// 提交成功后刷新
|
||||||
|
await onSearch();
|
||||||
|
message(result.message, { type: 'success' });
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -75,10 +75,10 @@ onMounted(() => {
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('multilingual_management')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('multilingualManagement')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<!-- 添加多语言 -->
|
<!-- 添加多语言 -->
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('delete_batches') }}
|
{{ $t('delete_batches') }}
|
||||||
|
@ -121,7 +121,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('confirm_delete')} ${row.translation}`" @confirm="onDelete(row)">
|
<el-popconfirm :title="`${$t('confirmDelete')} ${row.translation}`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const onSearch = async () => {
|
||||||
*/
|
*/
|
||||||
export const onAdd = () => {
|
export const onAdd = () => {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: $t('add_multilingual'),
|
title: $t('addMultilingual'),
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: { formInline: { keyName: '', translation: '', typeName: '' } },
|
props: { formInline: { keyName: '', translation: '', typeName: '' } },
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
@ -109,11 +109,11 @@ export const onUpdate = (row: any) => {
|
||||||
*/
|
*/
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const isConfirm = await messageBox({
|
const isConfirm = await messageBox({
|
||||||
message: $t('confirm_delete'),
|
message: $t('confirmDelete'),
|
||||||
title: $t('delete_warning'),
|
title: $t('delete_warning'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: $t('delete_success'),
|
confirmMessage: $t('delete_success'),
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isConfirm) {
|
if (isConfirm) {
|
||||||
|
@ -127,11 +127,11 @@ export const onDelete = async (row: any) => {
|
||||||
*/
|
*/
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const isConfirm = await messageBox({
|
const isConfirm = await messageBox({
|
||||||
message: $t('confirm_delete'),
|
message: $t('confirmDelete'),
|
||||||
title: $t('delete_warning'),
|
title: $t('delete_warning'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: $t('delete_success'),
|
confirmMessage: $t('delete_success'),
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isConfirm) {
|
if (isConfirm) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('i18n_type')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('i18n_type')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot="{ size, dynamicColumns }">
|
<template v-slot="{ size, dynamicColumns }">
|
||||||
|
|
|
@ -71,7 +71,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('system_file')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('system_file')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量下载 -->
|
<!-- 批量下载 -->
|
||||||
<el-button v-show="selectRows.length > 0" :icon="useRenderIcon(Download)" type="success" @click="onDownloadBatch">
|
<el-button v-show="selectRows.length > 0" :icon="useRenderIcon(Download)" type="success" @click="onDownloadBatch">
|
||||||
|
|
|
@ -28,7 +28,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('files')}`,
|
title: `${$t('addNew')}${$t('files')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -106,10 +106,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -124,10 +124,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -77,10 +77,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -58,10 +58,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -78,10 +78,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" title="Schedulers视图" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" title="Schedulers视图" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot="{ size, dynamicColumns }">
|
<template v-slot="{ size, dynamicColumns }">
|
||||||
|
|
|
@ -23,7 +23,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('schedulers')}`,
|
title: `${$t('addNew')}${$t('schedulers')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -93,10 +93,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('schedulersGroup')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('schedulersGroup')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
@ -118,7 +118,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('add_new') }} </el-button>
|
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.groupName}?`" @confirm="onDelete(row)">
|
<el-popconfirm :title="`${$t('delete')}${row.groupName}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
|
|
|
@ -25,7 +25,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('schedulersGroup')}`,
|
title: `${$t('addNew')}${$t('schedulersGroup')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -91,10 +91,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -111,10 +111,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('userinfo')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('userinfo')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
|
|
@ -55,7 +55,7 @@ export async function onSearch() {
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
isAddUserinfo.value = true;
|
isAddUserinfo.value = true;
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('adminUser')}`,
|
title: `${$t('addNew')}${$t('adminUser')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -138,10 +138,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -156,10 +156,10 @@ export const onDelete = async (row: any) => {
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :isExpandAll="true" :tableRef="tableRef?.getTableRef()" :title="$t('dept')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :isExpandAll="true" :tableRef="tableRef?.getTableRef()" :title="$t('dept')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd()"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd()"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
@ -121,7 +121,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('add_new') }} </el-button>
|
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('addNew') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')} ${row.deptName}?`" @confirm="onDelete(row)">
|
<el-popconfirm :title="`${$t('delete')} ${row.deptName}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
|
|
|
@ -24,7 +24,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd(parentId: number = 0) {
|
export function onAdd(parentId: number = 0) {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('dept')}`,
|
title: `${$t('addNew')}${$t('dept')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -94,10 +94,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -114,10 +114,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ onMounted(() => {
|
||||||
</el-form>
|
</el-form>
|
||||||
<PureTableBar :columns="columns" :isExpandAll="false" :tableRef="tableRef?.getTableRef()" title="菜单管理" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :isExpandAll="false" :tableRef="tableRef?.getTableRef()" title="菜单管理" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd()"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd()"> {{ $t('addNew') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot="{ size, dynamicColumns }">
|
<template v-slot="{ size, dynamicColumns }">
|
||||||
<pure-table
|
<pure-table
|
||||||
|
@ -103,7 +103,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button v-show="row.menuType !== 3" :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('add_new') }} </el-button>
|
<el-button v-show="row.menuType !== 3" :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('addNew') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')} ${row.title}?`" @confirm="handleDelete(row)">
|
<el-popconfirm :title="`${$t('delete')} ${row.title}?`" @confirm="handleDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
|
|
|
@ -86,7 +86,7 @@ onMounted(() => {
|
||||||
<PureTableBar :columns="columns" :isExpandAll="true" :tableRef="tableRef?.getTableRef()" :title="$t('power')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :isExpandAll="true" :tableRef="tableRef?.getTableRef()" :title="$t('power')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<!-- 添加权限按钮 -->
|
<!-- 添加权限按钮 -->
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd()"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd()"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量更新父级id -->
|
<!-- 批量更新父级id -->
|
||||||
<el-button v-show="powerIds.length > 0" :icon="useRenderIcon(EditPen)" type="primary" @click="onUpdateBatchParent">
|
<el-button v-show="powerIds.length > 0" :icon="useRenderIcon(EditPen)" type="primary" @click="onUpdateBatchParent">
|
||||||
|
@ -136,7 +136,7 @@ onMounted(() => {
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('add_new') }} </el-button>
|
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('addNew') }} </el-button>
|
||||||
<!-- 删除 -->
|
<!-- 删除 -->
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.powerName}?`" @confirm="onDelete(row)">
|
<el-popconfirm :title="`${$t('delete')}${row.powerName}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
|
|
|
@ -28,7 +28,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd(parentId = 0) {
|
export function onAdd(parentId = 0) {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('power')}`,
|
title: `${$t('addNew')}${$t('power')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: {
|
props: {
|
||||||
formInline: {
|
formInline: {
|
||||||
|
@ -98,10 +98,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -118,10 +118,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ onMounted(() => {
|
||||||
@refresh="onSearch"
|
@refresh="onSearch"
|
||||||
>
|
>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('add_new') }}</el-button>
|
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
|
|
|
@ -38,7 +38,7 @@ export async function onSearch() {
|
||||||
*/
|
*/
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('add_new')}${$t('role')}`,
|
title: `${$t('addNew')}${$t('role')}`,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
props: { formInline: { roleCode: undefined, description: undefined } },
|
props: { formInline: { roleCode: undefined, description: undefined } },
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
@ -94,10 +94,10 @@ export const onDelete = async (row: any) => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
@ -114,10 +114,10 @@ export const onDeleteBatch = async () => {
|
||||||
|
|
||||||
// 是否确认删除
|
// 是否确认删除
|
||||||
const result = await messageBox({
|
const result = await messageBox({
|
||||||
title: $t('confirm_delete'),
|
title: $t('confirmDelete'),
|
||||||
showMessage: false,
|
showMessage: false,
|
||||||
confirmMessage: undefined,
|
confirmMessage: undefined,
|
||||||
cancelMessage: $t('cancel_delete'),
|
cancelMessage: $t('confirmDelete'),
|
||||||
});
|
});
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue