refactor: 〽️ 重构菜单内容
This commit is contained in:
parent
de3878215f
commit
9a68eabcf2
|
@ -8,46 +8,52 @@ import boxen, { type Options as BoxenOptions } from 'boxen';
|
|||
dayjs.extend(duration);
|
||||
|
||||
const welcomeMessage = (VITE_PORT: number) => {
|
||||
return gradientString('cyan', 'magenta').multiline(
|
||||
`您好! 欢迎使用 bunny 系列开发模板
|
||||
项目访问地址如下:
|
||||
http://localhost:${VITE_PORT}`,
|
||||
);
|
||||
return gradientString('cyan', 'magenta').multiline(
|
||||
`您好! 欢迎使用 bunny 系列开发模板项目访问地址如下:
|
||||
http://localhost:${VITE_PORT}`
|
||||
);
|
||||
};
|
||||
|
||||
const boxenOptions: BoxenOptions = {
|
||||
padding: 0.5,
|
||||
borderColor: 'cyan',
|
||||
borderStyle: 'round',
|
||||
padding: 0.5,
|
||||
borderColor: 'cyan',
|
||||
borderStyle: 'round',
|
||||
};
|
||||
|
||||
export function viteBuildInfo(VITE_PORT: number): Plugin {
|
||||
let config: { command: string };
|
||||
let startTime: Dayjs;
|
||||
let endTime: Dayjs;
|
||||
let outDir: string;
|
||||
return {
|
||||
name: 'vite:buildInfo',
|
||||
configResolved(resolvedConfig) {
|
||||
config = resolvedConfig;
|
||||
outDir = resolvedConfig.build?.outDir ?? 'dist';
|
||||
},
|
||||
buildStart() {
|
||||
console.log(boxen(welcomeMessage(VITE_PORT), boxenOptions));
|
||||
if (config.command === 'build') {
|
||||
startTime = dayjs(new Date());
|
||||
}
|
||||
},
|
||||
closeBundle() {
|
||||
if (config.command === 'build') {
|
||||
endTime = dayjs(new Date());
|
||||
getPackageSize({
|
||||
folder: outDir,
|
||||
callback: (size: string) => {
|
||||
console.log(boxen(gradientString('cyan', 'magenta').multiline(`🎉 恭喜打包完成(总用时${dayjs.duration(endTime.diff(startTime)).format('mm分ss秒')},打包后的大小为${size})`), boxenOptions));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
let config: { command: string };
|
||||
let startTime: Dayjs;
|
||||
let endTime: Dayjs;
|
||||
let outDir: string;
|
||||
return {
|
||||
name: 'vite:buildInfo',
|
||||
configResolved(resolvedConfig) {
|
||||
config = resolvedConfig;
|
||||
outDir = resolvedConfig.build?.outDir ?? 'dist';
|
||||
},
|
||||
buildStart() {
|
||||
console.log(boxen(welcomeMessage(VITE_PORT), boxenOptions));
|
||||
if (config.command === 'build') {
|
||||
startTime = dayjs(new Date());
|
||||
}
|
||||
},
|
||||
closeBundle() {
|
||||
if (config.command === 'build') {
|
||||
endTime = dayjs(new Date());
|
||||
getPackageSize({
|
||||
folder: outDir,
|
||||
callback: (size: string) => {
|
||||
console.log(
|
||||
boxen(
|
||||
gradientString('cyan', 'magenta').multiline(
|
||||
`🎉 恭喜打包完成(总用时${dayjs.duration(endTime.diff(startTime)).format('mm分ss秒')},打包后的大小为${size})`
|
||||
),
|
||||
boxenOptions
|
||||
)
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,46 +16,50 @@ import { genScssMultipleScopeVars } from '../src/layout/theme';
|
|||
|
||||
// import { vitePluginFakeServer } from 'vite-plugin-fake-server';
|
||||
|
||||
export function getPluginsList(VITE_CDN: boolean, VITE_COMPRESSION: ViteCompression, VITE_PORT: number): PluginOption[] {
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
return [
|
||||
vue(),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
VueI18nPlugin({
|
||||
jitCompilation: false,
|
||||
include: [pathResolve('../locales/**')],
|
||||
}),
|
||||
// 按下Command(⌘)+Shift(⇧),然后点击页面元素会自动打开本地IDE并跳转到对应的代码位置
|
||||
Inspector(),
|
||||
viteBuildInfo(VITE_PORT),
|
||||
/**
|
||||
* 开发环境下移除非必要的vue-router动态路由警告No match found for location with path
|
||||
* 非必要具体看 https://github.com/vuejs/router/issues/521 和 https://github.com/vuejs/router/issues/359
|
||||
* vite-plugin-router-warn只在开发环境下启用,只处理vue-router文件并且只在服务启动或重启时运行一次,性能消耗可忽略不计
|
||||
*/
|
||||
removeNoMatch(),
|
||||
// // mock支持
|
||||
// vitePluginFakeServer({
|
||||
// logger: false,
|
||||
// include: 'mock',
|
||||
// infixName: false,
|
||||
// enableProd: true,// 线上支持mock
|
||||
// }),
|
||||
// 自定义主题
|
||||
themePreprocessorPlugin({
|
||||
scss: {
|
||||
multipleScopeVars: genScssMultipleScopeVars(),
|
||||
extract: true,
|
||||
},
|
||||
}),
|
||||
// svg组件化支持
|
||||
svgLoader(),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
// 线上环境删除console
|
||||
removeConsole({ external: ['src/assets/iconfont/iconfont.js'] }),
|
||||
// 打包分析
|
||||
lifecycle === 'report' ? visualizer({ open: true, brotliSize: true, filename: 'report.html' }) : (null as any),
|
||||
];
|
||||
export function getPluginsList(
|
||||
VITE_CDN: boolean,
|
||||
VITE_COMPRESSION: ViteCompression,
|
||||
VITE_PORT: number
|
||||
): PluginOption[] {
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
return [
|
||||
vue(),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
VueI18nPlugin({
|
||||
jitCompilation: false,
|
||||
// include: [pathResolve('../locales/**')],
|
||||
}),
|
||||
// 按下Command(⌘)+Shift(⇧),然后点击页面元素会自动打开本地IDE并跳转到对应的代码位置
|
||||
Inspector(),
|
||||
viteBuildInfo(VITE_PORT),
|
||||
/**
|
||||
* 开发环境下移除非必要的vue-router动态路由警告No match found for location with path
|
||||
* 非必要具体看 https://github.com/vuejs/router/issues/521 和 https://github.com/vuejs/router/issues/359
|
||||
* vite-plugin-router-warn只在开发环境下启用,只处理vue-router文件并且只在服务启动或重启时运行一次,性能消耗可忽略不计
|
||||
*/
|
||||
removeNoMatch(),
|
||||
// // mock支持
|
||||
// vitePluginFakeServer({
|
||||
// logger: false,
|
||||
// include: 'mock',
|
||||
// infixName: false,
|
||||
// enableProd: true,// 线上支持mock
|
||||
// }),
|
||||
// 自定义主题
|
||||
themePreprocessorPlugin({
|
||||
scss: {
|
||||
multipleScopeVars: genScssMultipleScopeVars(),
|
||||
extract: true,
|
||||
},
|
||||
}),
|
||||
// svg组件化支持
|
||||
svgLoader(),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
// 线上环境删除console
|
||||
removeConsole({ external: ['src/assets/iconfont/iconfont.js'] }),
|
||||
// 打包分析
|
||||
lifecycle === 'report' ? visualizer({ open: true, brotliSize: true, filename: 'report.html' }) : (null as any),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ export default defineFlatConfig([
|
|||
'@typescript-eslint/no-import-type-side-effects': 'error',
|
||||
'@typescript-eslint/prefer-literal-enum-member': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{
|
||||
|
@ -96,13 +97,6 @@ export default defineFlatConfig([
|
|||
fixStyle: 'inline-type-imports',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ElConfigProvider } from 'element-plus';
|
||||
import { computed, onMounted } from 'vue';
|
||||
import { ReDialog } from '@/components/BaseDialog';
|
||||
import { ReDialog } from '@/components/ReDialog';
|
||||
import en from 'element-plus/es/locale/lang/en';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
import plusEn from 'plus-pro-components/es/locale/lang/en';
|
||||
|
|
|
@ -132,7 +132,7 @@ class PureHttp {
|
|||
|
||||
// 检查配置的响应类型是否为二进制类型('blob' 或 'arraybuffer'), 如果是,直接返回响应对象
|
||||
if ($config.responseType === 'blob' || $config.responseType === 'arraybuffer') {
|
||||
return response;
|
||||
return data;
|
||||
}
|
||||
|
||||
// 登录过期,和异常处理
|
||||
|
|
|
@ -2,8 +2,8 @@ import { http } from '@/api/service/request';
|
|||
import type { BaseResult } from '@/api/service/types';
|
||||
|
||||
/** 菜单管理-列表 */
|
||||
export const fetchGetMenusList = (data?: any) => {
|
||||
return http.request<BaseResult<any>>('get', `router/getMenusList`, { params: data });
|
||||
export const fetchMenuList = () => {
|
||||
return http.request<BaseResult<any>>('get', `router/menuList`);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -18,16 +18,6 @@ export const fetchAddMenu = (data?: any) => {
|
|||
return http.request<BaseResult<any>>('post', `router/addMenu`, { data });
|
||||
};
|
||||
|
||||
/** 菜单管理-为菜单分配角色 */
|
||||
export const fetchAssignRolesToRouter = (data: any) => {
|
||||
return http.request<BaseResult<any>>('post', `routerRole/assignRolesToRouter`, { data });
|
||||
};
|
||||
|
||||
/** 菜单管理-批量为菜单添加角色 */
|
||||
export const fetchAssignAddBatchRolesToRouter = (data: any) => {
|
||||
return http.request<BaseResult<any>>('post', `routerRole/assignAddBatchRolesToRouter`, { data });
|
||||
};
|
||||
|
||||
/** 菜单管理-清除选中菜单所有角色 */
|
||||
export const fetchClearAllRolesSelect = (data: any) => {
|
||||
return http.request<BaseResult<any>>('delete', `routerRole/clearAllRolesSelect`, { data });
|
||||
|
@ -38,11 +28,6 @@ export const fetchUpdateMenu = (data?: any) => {
|
|||
return http.request<BaseResult<any>>('put', `router/updateMenu`, { data });
|
||||
};
|
||||
|
||||
/** 菜单管理-快速更新菜单排序 */
|
||||
export const fetchUpdateMenuByIdWithRank = (data?: any) => {
|
||||
return http.request<BaseResult<any>>('put', `router/updateMenuByIdWithRank`, { data });
|
||||
};
|
||||
|
||||
/** 菜单管理-删除菜单 */
|
||||
export const fetchDeletedMenuByIds = (data?: any) => {
|
||||
return http.request<BaseResult<any>>('delete', `router/deletedMenuByIds`, { data });
|
||||
|
|
|
@ -2,8 +2,8 @@ import { http } from '@/api/service/request';
|
|||
import type { BaseResult, ResultTable } from '@/api/service/types';
|
||||
|
||||
/** 系统菜单图标---获取多语言列表 */
|
||||
export const fetchGetMenuIconList = (data: any) => {
|
||||
return http.request<BaseResult<ResultTable>>('get', `menuIcon/getMenuIconList/${data.currentPage}/${data.pageSize}`, {
|
||||
export const fetchMenuIconList = (data: any) => {
|
||||
return http.request<BaseResult<ResultTable>>('get', `menuIcon/menuIconList/${data.currentPage}/${data.pageSize}`, {
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -2,8 +2,8 @@ import { http } from '@/api/service/request';
|
|||
import type { BaseResult } from '@/api/service/types';
|
||||
|
||||
/** 系统管理-用户路由获取 */
|
||||
export const getRouterAsync = () => {
|
||||
return http.request<BaseResult<any>>('get', 'router/noManage/getRouterAsync');
|
||||
export const fetchRouterAsync = () => {
|
||||
return http.request<BaseResult<any>>('get', 'router/noManage/routerAsync');
|
||||
};
|
||||
|
||||
/** 上传文件 */
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
||||
const props = defineProps({
|
||||
// ? 是否显示
|
||||
show: {
|
||||
type: Boolean,
|
||||
},
|
||||
// ? 点击旁白是否关闭
|
||||
clickNodalFlag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// ? 是否按下esc关闭
|
||||
pressEscapeFlag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// ? 返回文字
|
||||
cancelText: {
|
||||
type: String as PropType<string>,
|
||||
default: $t('login.pureBack'),
|
||||
},
|
||||
// ? 确认文字
|
||||
confirmText: {
|
||||
type: String as PropType<string>,
|
||||
default: $t('buttons.pureConfirm'),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['onCancel', 'onConfirm']);
|
||||
|
||||
const dialogVisible = ref(props.show);
|
||||
|
||||
/**
|
||||
* * 返回时
|
||||
*/
|
||||
const onCancel = () => {
|
||||
emits('onCancel', false);
|
||||
};
|
||||
|
||||
/**
|
||||
* * 当确认时
|
||||
*/
|
||||
const onConfirm = () => {
|
||||
emits('onConfirm', false);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
() => {
|
||||
dialogVisible.value = props.show;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:close-on-click-modal="clickNodalFlag"
|
||||
:closeOnPressEscape="pressEscapeFlag"
|
||||
:onClose="onCancel"
|
||||
destroy-on-close
|
||||
draggable
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<template #header>
|
||||
<slot name="header" />
|
||||
</template>
|
||||
|
||||
<slot name="default" />
|
||||
|
||||
<template #footer>
|
||||
<slot name="dialogFooter">
|
||||
<div class="dialog-footer">
|
||||
<slot name="footer">
|
||||
<el-button @click="onCancel">{{ cancelText }}</el-button>
|
||||
<el-button type="primary" @click="onConfirm">{{ confirmText }}</el-button>
|
||||
</slot>
|
||||
<slot name="footer-add" />
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { fetchGetMenuIconList } from '@/api/v1/menu/menuIcon';
|
||||
import { FormProps } from '@/components/SelectIcon/types';
|
||||
import { fetchMenuIconList } from '@/api/v1/menu/menuIcon';
|
||||
import { FormProps } from './types';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<FormProps>(), {
|
||||
|
@ -25,7 +25,7 @@ const onSearch = async () => {
|
|||
const { currentPage, pageSize } = innerForm;
|
||||
|
||||
// 获取数据
|
||||
const baseResult = await fetchGetMenuIconList({ currentPage, pageSize });
|
||||
const baseResult = await fetchMenuIconList({ currentPage, pageSize });
|
||||
if (baseResult.code !== 200) return;
|
||||
const data = baseResult.data;
|
||||
|
||||
|
@ -98,6 +98,15 @@ onMounted(() => {
|
|||
<el-button bg class="justify-end mr-2 ml-2" size="small" text type="danger" @click="onClear">清空</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
<el-link
|
||||
:title="$t('systemMenuIcon.officialWebsite')"
|
||||
:underline="false"
|
||||
href="https://icon-sets.iconify.design/"
|
||||
target="_blank"
|
||||
type="primary"
|
||||
>
|
||||
{{ $t('systemMenuIcon.officialWebsite') }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -18,3 +18,12 @@ export interface iconType {
|
|||
// all icon
|
||||
style?: object;
|
||||
}
|
||||
|
||||
export interface FormItemProps {
|
||||
/** 菜单类型(0代表菜单、1代表iframe、2代表外链、3代表按钮)*/
|
||||
icon: string;
|
||||
}
|
||||
|
||||
export interface FormProps {
|
||||
formInline: FormItemProps;
|
||||
}
|
|
@ -74,7 +74,6 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
.pure-segmented-group {
|
|
@ -1,8 +1,8 @@
|
|||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { isFunction, isNumber, useDark, useResizeObserver } from '@pureadmin/utils';
|
||||
import { defineComponent, getCurrentInstance, h, nextTick, type PropType, ref, toRef, watch } from 'vue';
|
||||
import './index.css';
|
||||
import type { OptionsType } from './type';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { isFunction, isNumber, useDark, useResizeObserver } from '@pureadmin/utils';
|
||||
import { defineComponent, getCurrentInstance, h, nextTick, type PropType, ref, toRef, watch } from 'vue';
|
||||
|
||||
const props = {
|
||||
options: {
|
||||
|
@ -132,7 +132,13 @@ export default defineComponent({
|
|||
onClick={(event) => handleChange({ option, index }, event)}
|
||||
>
|
||||
<input type="radio" name="segmented" />
|
||||
<div class="pure-segmented-item-label" v-tippy={{ content: option?.tip, zIndex: 41000 }}>
|
||||
<div
|
||||
class="pure-segmented-item-label"
|
||||
v-tippy={{
|
||||
content: option?.tip,
|
||||
zIndex: 41000,
|
||||
}}
|
||||
>
|
||||
{option.icon && !isFunction(option.label) ? (
|
||||
<span class="pure-segmented-item-icon" style={{ marginRight: option.label ? '6px' : 0 }}>
|
||||
{h(
|
|
@ -1,12 +1,12 @@
|
|||
import type { Component, VNode } from 'vue';
|
||||
import type { iconType } from '@/components/CommonIcon/src/types.ts';
|
||||
import type { VNode, Component } from 'vue';
|
||||
import type { iconType } from '@/components/ReIcon/src/types.ts';
|
||||
|
||||
export interface OptionsType {
|
||||
/** 文字 */
|
||||
label?: string | (() => VNode | Component);
|
||||
/**
|
||||
* @description 图标,采用平台内置的 `useRenderIcon` 函数渲染
|
||||
* @see {@link 用法参考 https://pure-admin.github.io/pure-admin-doc/pages/icon/#%E9%80%9A%E7%94%A8%E5%9B%BE%E6%A0%87-userendericon-hooks }
|
||||
* @see {@link 用法参考 https://pure-admin.cn/pages/icon/#%E9%80%9A%E7%94%A8%E5%9B%BE%E6%A0%87-userendericon-hooks }
|
||||
*/
|
||||
icon?: string | Component;
|
||||
/** 图标属性、样式配置 */
|
|
@ -1,8 +0,0 @@
|
|||
export interface FormItemProps {
|
||||
/** 菜单类型(0代表菜单、1代表iframe、2代表外链、3代表按钮)*/
|
||||
icon: string;
|
||||
}
|
||||
|
||||
export interface FormProps {
|
||||
formInline: FormItemProps;
|
||||
}
|
|
@ -50,7 +50,7 @@ defineExpose({ ruleFormRef });
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="my-2">
|
||||
<el-form ref="ruleFormRef" :model="form" :rules="rules">
|
||||
<el-form-item :label="$t('adminUser_password')" prop="password">
|
||||
<el-input
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import UserinfoDialog from '@/components/Table/Userinfo/UserinfoDialog.vue';
|
||||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
|
||||
/**
|
||||
* * 查看用户信息
|
||||
|
|
|
@ -13,7 +13,7 @@ import DragIcon from '@/assets/table-bar/drag.svg?component';
|
|||
import Sortable from 'sortablejs';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { DeleteFilled, EditPen } from '@element-plus/icons-vue';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import Refresh from '@iconify-icons/ep/refresh';
|
||||
import { FormInstance } from 'element-plus';
|
||||
|
||||
|
|
|
@ -47,6 +47,6 @@ export const tableSelectButtonClass = computed(() => [
|
|||
'dark:!text-white',
|
||||
'dark:hover:!text-primary',
|
||||
]);
|
||||
// export const UserAvatar = 'http://116.196.101.14:9000/auth-admin/avatar/user.jpg';
|
||||
|
||||
export const UserAvatar =
|
||||
'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoj0hHXhgJNOTSOFsS4uZs8x1ConecaVOB8eIl115xmJZcT4oCicvia7wMEufibKtTLqiaJeanU2Lpg3w/132';
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
import type { OptionsType } from '@/components/Segmented';
|
||||
|
||||
export const menuTypeOptions: Array<OptionsType> = [
|
||||
{ label: '菜单', value: 0 },
|
||||
{ label: 'iframe', value: 1 },
|
||||
{ label: '外链', value: 2 },
|
||||
];
|
||||
import type { OptionsType } from '@/components/ReSegmented';
|
||||
|
||||
export const frameSureOptions: Array<OptionsType> = [
|
||||
{ label: '是', tip: '有首次加载动画', value: true },
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
import type { OptionsType } from '@/components/ReSegmented';
|
||||
|
||||
const menuTypeOptions: Array<OptionsType> = [
|
||||
{ label: '菜单', value: 0 },
|
||||
{ label: 'iframe', value: 1 },
|
||||
{ label: '外链', value: 2 },
|
||||
];
|
||||
|
||||
const fixedTagOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: '固定',
|
||||
tip: '当前菜单名称固定显示在标签页且不可关闭',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
label: '不固定',
|
||||
tip: '当前菜单名称不固定显示在标签页且可关闭',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
|
||||
const keepAliveOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: '缓存',
|
||||
tip: '会保存该页面的整体状态,刷新后会清空状态',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
label: '不缓存',
|
||||
tip: '不会保存该页面的整体状态',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
|
||||
const hiddenTagOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: '允许',
|
||||
tip: '当前菜单名称或自定义信息允许添加到标签页',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
label: '禁止',
|
||||
tip: '当前菜单名称或自定义信息禁止添加到标签页',
|
||||
value: true,
|
||||
},
|
||||
];
|
||||
|
||||
const showLinkOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: '显示',
|
||||
tip: '会在菜单中显示',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
label: '隐藏',
|
||||
tip: '不会在菜单中显示',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
|
||||
const showParentOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: '显示',
|
||||
tip: '会显示父级菜单',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
label: '隐藏',
|
||||
tip: '不会显示父级菜单',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
|
||||
const frameLoadingOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: '开启',
|
||||
tip: '有首次加载动画',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
tip: '无首次加载动画',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
|
||||
export {
|
||||
menuTypeOptions,
|
||||
fixedTagOptions,
|
||||
showLinkOptions,
|
||||
keepAliveOptions,
|
||||
hiddenTagOptions,
|
||||
showParentOptions,
|
||||
frameLoadingOptions,
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import CloseIcon from '@iconify-icons/ep/close';
|
||||
import StarIcon from '@iconify-icons/ep/star';
|
||||
import type { optionsItem } from '../types';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import EnterOutlined from '@/assets/svg/enter_outlined.svg?component';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { useResizeObserver } from '@pureadmin/utils';
|
||||
import { computed, getCurrentInstance, onMounted, ref } from 'vue';
|
||||
|
|
|
@ -7,7 +7,7 @@ import { useNav } from '@/layout/hooks/useNav';
|
|||
import { useAppStoreHook } from '@/store/modules/app';
|
||||
import { toggleTheme } from '@pureadmin/theme/dist/browser-utils';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import Segmented, { type OptionsType } from '@/components/Segmented';
|
||||
import Segmented, { type OptionsType } from '@/components/ReSegmented';
|
||||
import { useDataThemeChange } from '@/layout/hooks/useDataThemeChange';
|
||||
import { debounce, isNumber, useDark, useGlobal } from '@pureadmin/utils';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { findRouteByPath, getParentPaths } from '@/router/utils';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { toRaw } from 'vue';
|
||||
|
||||
defineProps({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { Text } from '@/components/Text';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { Text } from '@/components/ReText';
|
||||
import { getConfig } from '@/config';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { menuType } from '@/layout/types';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import 'animate.css';
|
||||
// 引入 src/components/CommonIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
||||
import '@/components/CommonIcon/src/offlineIcon';
|
||||
import '@/components/ReIcon/src/offlineIcon';
|
||||
import { useDataThemeChange } from '@/layout/hooks/useDataThemeChange';
|
||||
import { useAppStoreHook } from '@/store/modules/app';
|
||||
import { useSettingStoreHook } from '@/store/modules/settings';
|
||||
|
|
|
@ -24,9 +24,9 @@ import './assets/iconfont/iconfont.js';
|
|||
// 自定义指令
|
||||
import * as directives from '@/directives';
|
||||
// 全局注册@iconify/vue图标库
|
||||
import { FontIcon, IconifyIconOffline, IconifyIconOnline } from './components/CommonIcon';
|
||||
import { FontIcon, IconifyIconOffline, IconifyIconOnline } from './components/ReIcon';
|
||||
// 全局注册按钮级别权限组件
|
||||
import { Auth } from '@/components/Auth';
|
||||
import { Auth } from '@/components/ReAuth';
|
||||
import { Perms } from '@/components/Perms';
|
||||
// 全局注册vue-tippy
|
||||
import 'tippy.js/dist/tippy.css';
|
||||
|
@ -43,7 +43,7 @@ Object.keys(directives).forEach((key) => {
|
|||
app.component('IconifyIconOffline', IconifyIconOffline);
|
||||
app.component('IconifyIconOnline', IconifyIconOnline);
|
||||
app.component('FontIcon', FontIcon);
|
||||
app.component('Auth', Auth);
|
||||
app.component('ReAuth', Auth);
|
||||
app.component('Perms', Perms);
|
||||
app.config.globalProperties.$echarts = echarts;
|
||||
app.use(VueTippy);
|
||||
|
|
|
@ -16,7 +16,7 @@ import { type menuType, routerArrays } from '@/layout/types';
|
|||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
// 动态路由
|
||||
import { getRouterAsync } from '@/api/v1/system/system';
|
||||
import { fetchRouterAsync } from '@/api/v1/system/system';
|
||||
// import { getAsyncRoutes } from '@/api/routes';
|
||||
|
||||
const IFrame = () => import('@/layout/frame.vue');
|
||||
|
@ -162,7 +162,7 @@ function initRouter() {
|
|||
});
|
||||
} else {
|
||||
return new Promise((resolve) => {
|
||||
getRouterAsync().then(({ data }) => {
|
||||
fetchRouterAsync().then(({ data }) => {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
storageLocal().setItem(key, data);
|
||||
resolve(router);
|
||||
|
@ -171,7 +171,7 @@ function initRouter() {
|
|||
}
|
||||
} else {
|
||||
return new Promise((resolve) => {
|
||||
getRouterAsync().then(({ data }) => {
|
||||
fetchRouterAsync().then(({ data }) => {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
resolve(router);
|
||||
});
|
||||
|
@ -282,9 +282,9 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
|
|||
addAsyncRoutes(v.children);
|
||||
}
|
||||
});
|
||||
// arrRoutes.forEach(routes => {
|
||||
// const children = routes.children;
|
||||
// children === null || children.length === 0 ? delete routes.children : false;
|
||||
// arrRoutes.forEach((routes) => {
|
||||
// const children = routes.children;
|
||||
// children === null || children.length === 0 ? delete routes.children : false;
|
||||
// });
|
||||
return arrRoutes;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
fetchAddMenuIcon,
|
||||
fetchDeleteMenuIcon,
|
||||
fetchGetIconNameList,
|
||||
fetchGetMenuIconList,
|
||||
fetchMenuIconList,
|
||||
fetchUpdateMenuIcon,
|
||||
} from '@/api/v1/menu/menuIcon';
|
||||
import { pageSizes } from '@/enums/baseConstant';
|
||||
|
@ -46,7 +46,7 @@ export const useMenuIconStore = defineStore('menuIconStore', {
|
|||
delete data.pageSizes;
|
||||
delete data.total;
|
||||
delete data.background;
|
||||
const response = await fetchGetMenuIconList(data);
|
||||
const response = await fetchMenuIconList(data);
|
||||
|
||||
// 公共页面函数hook
|
||||
const pagination = storePagination.bind(this);
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { storeMessage } from '@/utils/message';
|
||||
import { handleTree } from '@/utils/tree';
|
||||
import {
|
||||
fetchAddMenu,
|
||||
fetchAssignAddBatchRolesToRouter,
|
||||
fetchAssignRolesToRouter,
|
||||
fetchClearAllRolesSelect,
|
||||
fetchDeletedMenuByIds,
|
||||
fetchGetMenusList,
|
||||
fetchGetRoleListByRouterId,
|
||||
fetchMenuList,
|
||||
fetchUpdateMenu,
|
||||
fetchUpdateMenuByIdWithRank,
|
||||
} from '@/api/v1/menu/menu';
|
||||
import { isAllEmpty } from '@pureadmin/utils';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { storeMessage } from '@/utils/message';
|
||||
import { handleTree } from '@/utils/tree';
|
||||
import { isAllEmpty } from '@pureadmin/utils';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const userMenuStore = defineStore('menuStore', {
|
||||
state() {
|
||||
|
@ -27,16 +24,18 @@ export const userMenuStore = defineStore('menuStore', {
|
|||
actions: {
|
||||
/** 获取菜单列表 */
|
||||
async getMenuList() {
|
||||
const result = await fetchGetMenusList({ ...this.pagination });
|
||||
const result = await fetchMenuList();
|
||||
if (result.code !== 200) return false;
|
||||
|
||||
// 前端搜索菜单名称
|
||||
const title = this.form.title;
|
||||
let newData: Array<any> = result.data;
|
||||
|
||||
if (!isAllEmpty(title)) {
|
||||
newData = newData.filter((item) => $t(item.title).includes(title));
|
||||
}
|
||||
this.datalist = handleTree(newData);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
|
@ -52,12 +51,6 @@ export const userMenuStore = defineStore('menuStore', {
|
|||
return storeMessage(result);
|
||||
},
|
||||
|
||||
/** 快速更新菜单排序 */
|
||||
async updateMenuByIdWithRank(data: object) {
|
||||
const result = await fetchUpdateMenuByIdWithRank(data);
|
||||
return storeMessage(result);
|
||||
},
|
||||
|
||||
/** 删除菜单 */
|
||||
async deletedMenuByIds(data: object) {
|
||||
const result = await fetchDeletedMenuByIds(data);
|
||||
|
@ -71,18 +64,6 @@ export const userMenuStore = defineStore('menuStore', {
|
|||
return result.data;
|
||||
},
|
||||
|
||||
/** 为路由分配角色 */
|
||||
async assignRolesToRouter(data: any) {
|
||||
const result = await fetchAssignRolesToRouter(data);
|
||||
return storeMessage(result);
|
||||
},
|
||||
|
||||
/** 批量为菜单添加角色 */
|
||||
async assignAddBatchRolesToRouter(data: any) {
|
||||
const result = await fetchAssignAddBatchRolesToRouter(data);
|
||||
return storeMessage(result);
|
||||
},
|
||||
|
||||
/** 清除选中菜单所有角色 */
|
||||
async clearAllRolesSelect(data: any) {
|
||||
const result = await fetchClearAllRolesSelect(data);
|
||||
|
|
|
@ -3,16 +3,16 @@ declare module 'vue' {
|
|||
* 自定义全局组件获得 Volar 提示(自定义的全局组件需要在这里声明下才能获得 Volar 类型提示哦)
|
||||
*/
|
||||
export interface GlobalComponents {
|
||||
IconifyIconOffline: (typeof import('../components/CommonIcon'))['IconifyIconOffline'];
|
||||
IconifyIconOnline: (typeof import('../components/CommonIcon'))['IconifyIconOnline'];
|
||||
FontIcon: (typeof import('../components/CommonIcon'))['FontIcon'];
|
||||
Auth: (typeof import('../components/Auth'))['Auth'];
|
||||
IconifyIconOffline: (typeof import('../components/ReIcon'))['IconifyIconOffline'];
|
||||
IconifyIconOnline: (typeof import('../components/ReIcon'))['IconifyIconOnline'];
|
||||
FontIcon: (typeof import('../components/ReIcon'))['FontIcon'];
|
||||
Auth: (typeof import('../components/ReAuth'))['Auth'];
|
||||
Perms: (typeof import('../components/Perms'))['Perms'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO https://github.com/element-plus/element-plus/blob/dev/global.d.ts#L2
|
||||
* https://github.com/element-plus/element-plus/blob/dev/global.d.ts#L2
|
||||
* No need to install @vue/runtime-core
|
||||
*/
|
||||
declare module 'vue' {
|
||||
|
|
|
@ -144,7 +144,7 @@ export const downloadBlob = async (response: any, fileName: string) => {
|
|||
*/
|
||||
async function blobToJson(blob: any): Promise<any> {
|
||||
try {
|
||||
const text = await blob.data.text();
|
||||
const text = await blob.text();
|
||||
const json = JSON.parse(text);
|
||||
if (json.code !== 200) {
|
||||
message(json.message, { type: 'error' });
|
||||
|
|
|
@ -2,24 +2,25 @@
|
|||
import { reactive, ref } from 'vue';
|
||||
import { deviceDetection } from '@pureadmin/utils';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import { useAdminUserStore } from '@/store/system/adminUser';
|
||||
import ResetPasswordDialog from '@/components/Table/ResetPasswords.vue';
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
const adminUserStore = useAdminUserStore();
|
||||
|
||||
// 重置密码表单校验Ref
|
||||
const ruleFormByRestPasswordRef = ref();
|
||||
const adminUserStore = useAdminUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
// 重置密码表单
|
||||
const restPasswordForm = reactive({
|
||||
password: '',
|
||||
});
|
||||
|
||||
/** 重置密码 */
|
||||
const onResetPassword = () => {
|
||||
function onResetPassword() {
|
||||
// 重置密码表单
|
||||
const restPasswordForm = reactive({
|
||||
password: '',
|
||||
});
|
||||
|
||||
addDialog({
|
||||
title: `修改密码`,
|
||||
width: '30%',
|
||||
|
@ -44,7 +45,7 @@ const onResetPassword = () => {
|
|||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const list = ref([
|
||||
{
|
||||
|
@ -58,16 +59,6 @@ const list = ref([
|
|||
// illustrate: '已经绑定手机:158****6789',
|
||||
// button: '修改',
|
||||
// },
|
||||
// {
|
||||
// title: '密保问题',
|
||||
// illustrate: '未设置密保问题,密保问题可有效保护账户安全',
|
||||
// button: '修改',
|
||||
// },
|
||||
// {
|
||||
// title: '备用邮箱',
|
||||
// illustrate: '已绑定邮箱:pure***@163.com',
|
||||
// button: '修改',
|
||||
// },
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
@ -80,7 +71,7 @@ const list = ref([
|
|||
<p>{{ item.title }}</p>
|
||||
<el-text class="mx-1" type="info">{{ item.illustrate }}</el-text>
|
||||
</div>
|
||||
<el-button text type="primary" @click="item.callback">
|
||||
<el-button link type="primary" @click="item.callback">
|
||||
{{ item.button }}
|
||||
</el-button>
|
||||
</div>
|
|
@ -18,14 +18,17 @@ import { deviceDetection } from '@pureadmin/utils';
|
|||
import type { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
const adminUserStore = useAdminUserStore();
|
||||
|
||||
// 用户表单Ref
|
||||
const userInfoFormRef = ref<FormInstance>();
|
||||
// 上传图片Ref
|
||||
const uploadRef = ref();
|
||||
// 剪裁头像Ref
|
||||
const cropRef = ref();
|
||||
// 剪裁完成后头像地址,base64内容
|
||||
const imgBase64Src = ref('');
|
||||
|
||||
const adminUserStore = useAdminUserStore();
|
||||
|
||||
/** 关闭弹窗 */
|
||||
const handleClose = () => {
|
||||
cropRef.value.hidePopover();
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { Text } from '@/components/Text';
|
||||
import { Text } from '@/components/ReText';
|
||||
import LaySidebarTopCollapse from '@/layout/components/lay-sidebar/components/SidebarTopCollapse.vue';
|
||||
import { useDataThemeChange } from '@/layout/hooks/useDataThemeChange';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
|
|
@ -3,11 +3,11 @@ import { reactive } from 'vue';
|
|||
import type { FormRules } from 'element-plus';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import ProfileIcon from '@iconify-icons/ri/user-3-line';
|
||||
import Profile from '@/views/account-settings/profile.vue';
|
||||
import Profile from '@/views/account-settings/components/profile.vue';
|
||||
import SecurityLogIcon from '@iconify-icons/ri/window-line';
|
||||
import SecurityLog from '@/views/account-settings/security-log.vue';
|
||||
import SecurityLog from '@/views/account-settings/components/security-log.vue';
|
||||
import AccountManagementIcon from '@iconify-icons/ri/profile-line';
|
||||
import AccountManagement from '@/views/account-settings/account-management.vue';
|
||||
import AccountManagement from '@/views/account-settings/components/account-management.vue';
|
||||
|
||||
export const columns: TableColumnList = [
|
||||
{ type: 'index', index: (index: number) => index + 1, label: '序号', width: 60 },
|
||||
|
@ -17,12 +17,12 @@ export const columns: TableColumnList = [
|
|||
{ label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', width: 140 },
|
||||
// 登录Ip归属地
|
||||
{ label: $t('userLoginLog_ipRegion'), prop: 'ipRegion' },
|
||||
// // 登录时代理
|
||||
// { label: $t('userLoginLog_userAgent'), prop: 'userAgent' },
|
||||
// 登录时代理
|
||||
{ label: $t('userLoginLog_userAgent'), prop: 'userAgent' },
|
||||
// 操作类型
|
||||
{ label: $t('userLoginLog_type'), prop: 'type' },
|
||||
// // 标识客户端是否是通过Ajax发送请求的
|
||||
// { label: $t('userLoginLog_xRequestedWith'), prop: 'xRequestedWith', width: 150 },
|
||||
// 标识客户端是否是通过Ajax发送请求的
|
||||
{ label: $t('userLoginLog_xRequestedWith'), prop: 'xRequestedWith', width: 150 },
|
||||
// 创建时间也就是操作时间
|
||||
{
|
||||
label: $t('op_time'),
|
||||
|
|
|
@ -5,6 +5,8 @@ import { fetchUploadFile } from '@/api/v1/system/system';
|
|||
import { message } from '@/utils/message';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 剪裁完成后头像数据
|
||||
export const cropperBlob = ref();
|
||||
// 上传地址路径
|
||||
|
@ -12,7 +14,6 @@ export const uploadAvatarSrc = ref();
|
|||
|
||||
// 剪裁头像是否显示
|
||||
export const isShow = ref(false);
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 用户信息内容
|
||||
export const userInfos = reactive({
|
||||
|
|
|
@ -23,11 +23,12 @@ const props = withDefaults(defineProps<FormProps>(), {
|
|||
}),
|
||||
});
|
||||
|
||||
const emailTemplateStore = useEmailTemplateStore();
|
||||
|
||||
// 用户是否停用样式
|
||||
const { switchStyle } = usePublicHooks();
|
||||
const formRef = ref<FormInstance>();
|
||||
const form = ref(props.formInline);
|
||||
const emailTemplateStore = useEmailTemplateStore();
|
||||
|
||||
onMounted(() => {
|
||||
emailTemplateStore.getEmailTypes();
|
||||
|
@ -61,7 +62,7 @@ defineExpose({ formRef });
|
|||
<el-input v-model="form.subject" autocomplete="off" type="text" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 用户状态 -->
|
||||
<!-- 是否默认 -->
|
||||
<el-form-item :label="$t('isDefault')" prop="isDefault">
|
||||
<el-switch
|
||||
v-model="form.isDefault"
|
|
@ -20,9 +20,10 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useEmailTemplateStore } from '@/store/configuration/emailTemplate';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import View from '@iconify-icons/ep/view';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -60,7 +61,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -111,7 +112,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar
|
||||
:columns="columns"
|
||||
|
@ -120,7 +121,7 @@ onMounted(() => {
|
|||
@refresh="onSearch"
|
||||
>
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -129,8 +130,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(selectRows.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -46,6 +46,8 @@ export const rules = reactive({
|
|||
emailUser: [{ required: true, message: `${$t('input')}${$t('emailTemplate_templateName')}`, trigger: 'blur' }],
|
||||
// 主题
|
||||
subject: [{ required: true, message: `${$t('input')}${$t('emailTemplate_subject')}`, trigger: 'blur' }],
|
||||
// 是否默认
|
||||
isDefault: [{ required: true, message: `${$t('input')}${$t('emailTemplate_subject')}`, trigger: 'blur' }],
|
||||
// 邮件内容
|
||||
body: [{ required: true, message: `${$t('input')}${$t('emailTemplate_body')}`, trigger: 'blur' }],
|
||||
// 邮件类型
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import EmailTemplateDialog from '@/views/configuration/email-template/email-template-dialog.vue';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import EmailTemplateDialog from '@/views/configuration/email-template/components/email-template-dialog.vue';
|
||||
import { useEmailTemplateStore } from '@/store/configuration/emailTemplate';
|
||||
import { h, ref } from 'vue';
|
||||
import { message, messageBox } from '@/utils/message';
|
||||
|
@ -7,10 +7,10 @@ import type { FormItemProps } from '@/views/configuration/email-template/utils/t
|
|||
import { $t } from '@/plugins/i18n';
|
||||
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||
|
||||
const emailTemplateStore = useEmailTemplateStore();
|
||||
|
||||
// 选择的row列表
|
||||
export const selectRows = ref([]);
|
||||
export const formRef = ref();
|
||||
const emailTemplateStore = useEmailTemplateStore();
|
||||
|
||||
/** 搜索初始化邮件模板表 */
|
||||
export async function onSearch() {
|
||||
|
@ -21,6 +21,8 @@ export async function onSearch() {
|
|||
|
||||
/** 添加邮件模板表 */
|
||||
export function onAdd() {
|
||||
const formRef = ref();
|
||||
|
||||
addDialog({
|
||||
title: `${$t('addNew')}${$t('emailTemplate')}`,
|
||||
width: '30%',
|
||||
|
@ -57,6 +59,8 @@ export function onAdd() {
|
|||
* @param row
|
||||
*/
|
||||
export function onUpdate(row: any) {
|
||||
const formRef = ref();
|
||||
|
||||
addDialog({
|
||||
title: `${$t('modify')}${$t('emailTemplate')}`,
|
||||
width: '30%',
|
||||
|
@ -76,6 +80,8 @@ export function onUpdate(row: any) {
|
|||
contentRenderer: () => h(EmailTemplateDialog, { ref: formRef }),
|
||||
beforeSure: (done, { options }) => {
|
||||
const form = options.props.formInline as FormItemProps;
|
||||
|
||||
// 验证表单
|
||||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
if (!valid) return;
|
||||
|
||||
|
|
|
@ -21,11 +21,12 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { enabledOrNotStatus } from '@/enums/baseConstant';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -64,7 +65,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -139,7 +140,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar
|
||||
:columns="columns"
|
||||
|
@ -148,7 +149,7 @@ onMounted(() => {
|
|||
@refresh="onSearch"
|
||||
>
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -157,8 +158,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import EmailUsersDialog from '@/views/configuration/email-user/email-users-dialog.vue';
|
||||
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
onUpdate,
|
||||
} from '@/views/configuration/menu-icon/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import AddFill from '@iconify-icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '@iconify-icons/ep/delete';
|
||||
|
@ -22,6 +22,7 @@ import { $t } from '@/plugins/i18n';
|
|||
import { useMenuIconStore } from '@/store/configuration/menuIcon';
|
||||
import MenuIconSelectIconName from '@/views/configuration/menu-icon/menu-icon-select-icon-name.vue';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -58,7 +59,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -88,11 +89,11 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar :columns="columns" :title="$t('menuIcon')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -101,8 +102,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||
import { FormInstance } from 'element-plus';
|
||||
import { FormProps, rules } from '@/views/configuration/menu-icon/utils';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import MenuIconSelectIconName from '@/views/configuration/menu-icon/menu-icon-select-icon-name.vue';
|
||||
|
||||
const props = withDefaults(defineProps<FormProps>(), {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import MenuIconDialog from '@/views/configuration/menu-icon/menu-icon-dialog.vue';
|
||||
import { useMenuIconStore } from '@/store/configuration/menuIcon';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { $t } from '@/plugins/i18n';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import ReCol from '@/components/MyCol';
|
||||
import ReCol from '@/components/ReCol';
|
||||
import { auth, form, onSearch, rules, submitForm } from '@/views/configuration/web-configuration/utils';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
|
@ -365,7 +365,7 @@ onMounted(() => {
|
|||
<!-- 提交内容 -->
|
||||
<re-col v-if="hasAuth(auth.update)" :sm="24" :value="24" :xs="24">
|
||||
<el-form-item>
|
||||
<el-button class="w-full" type="primary" @click="submitForm(ruleFormRef)">
|
||||
<el-button class="w-full" plain type="primary" @click="submitForm(ruleFormRef)">
|
||||
{{ $t('modifyingConfiguration') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
onUpdate,
|
||||
updateI18nSetting,
|
||||
} from '@/views/i18n/i18n-setting/utils';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import AddFill from '@iconify-icons/ri/add-circle-line';
|
||||
import EditPen from '@iconify-icons/ep/edit-pen';
|
||||
import Delete from '@iconify-icons/ep/delete';
|
||||
|
@ -25,6 +25,7 @@ import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
|||
import { hasAuth } from '@/router/utils';
|
||||
import Download from '@iconify-icons/ep/download';
|
||||
import Upload from '@iconify-icons/ri/upload-line';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const pageFormRef = ref();
|
||||
|
@ -64,7 +65,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="pageFormRef"
|
||||
:inline="true"
|
||||
|
@ -109,7 +110,7 @@ onMounted(() => {
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar
|
||||
:columns="columns"
|
||||
|
@ -120,7 +121,7 @@ onMounted(() => {
|
|||
<template #buttons>
|
||||
<!-- 下载多语言配置 -->
|
||||
<el-dropdown v-if="hasAuth(auth.download)" class="mr-1" type="primary">
|
||||
<el-button :icon="useRenderIcon(Download)" bg text type="primary">
|
||||
<el-button :icon="useRenderIcon(Download)" plain type="primary">
|
||||
{{ $t('download_configuration') }}
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
|
@ -133,7 +134,7 @@ onMounted(() => {
|
|||
|
||||
<!-- 下载多语言配置 -->
|
||||
<el-dropdown v-if="hasAuth(auth.update)" class="mr-1" type="primary">
|
||||
<el-button :icon="useRenderIcon(Upload)" bg text type="primary">{{ $t('file_update') }}</el-button>
|
||||
<el-button :icon="useRenderIcon(Upload)" plain type="primary">{{ $t('file_update') }}</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="updateI18nSetting('json')">{{ $t('use_json_update') }}</el-dropdown-item>
|
||||
|
@ -143,7 +144,7 @@ onMounted(() => {
|
|||
</el-dropdown>
|
||||
|
||||
<!-- 添加多语言 -->
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -152,8 +153,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog, closeDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog, closeDialog } from '@/components/ReDialog/index';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { userI18nStore } from '@/store/i18n/i18n';
|
||||
import { messageBox } from '@/utils/message';
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||
import { FormInstance } from 'element-plus';
|
||||
import { FormProps, rules } from '@/views/i18n/i18n-type-setting/utils';
|
||||
import { frameSureOptions } from '@/enums';
|
||||
import Segmented from '@/components/Segmented';
|
||||
import Segmented from '@/components/ReSegmented';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
||||
const props = withDefaults(defineProps<FormProps>(), {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { onMounted, ref } from 'vue';
|
||||
import { auth, columns, onAdd, onDelete, onSearch, onUpdate } from '@/views/i18n/i18n-type-setting/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import AddFill from '@iconify-icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
|
@ -68,7 +68,7 @@ onMounted(() => {
|
|||
|
||||
<PureTableBar :columns="columns" :title="$t('i18n_type')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import AddI18nType from '@/views/i18n/i18n-type-setting/i18n-type-dialog.vue';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { currentPage, emailRules, onBack } from '@/views/login/utils';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import User from '@iconify-icons/ri/user-3-fill';
|
||||
import Lock from '@iconify-icons/ri/lock-fill';
|
||||
import { onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import User from '@iconify-icons/ri/user-3-fill';
|
||||
import Lock from '@iconify-icons/ri/lock-fill';
|
||||
import { onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
||||
|
|
|
@ -13,7 +13,7 @@ import PureTable from '@pureadmin/table';
|
|||
import Delete from '@iconify-icons/ep/delete';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { Message } from '@element-plus/icons-vue';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { isReadStatus } from '@/enums/baseConstant';
|
||||
import { useMessageUserStore } from '@/store/message/messageUser';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
|
|
|
@ -14,7 +14,7 @@ import Delete from '@iconify-icons/ep/delete';
|
|||
import Refresh from '@iconify-icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { messageLevel } from '@/views/message-manger/message-editing/utils';
|
||||
import { isReadStatus } from '@/enums/baseConstant';
|
||||
|
@ -22,6 +22,7 @@ import { useMessageReceivedStore } from '@/store/message/messageReceived';
|
|||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { Message } from '@element-plus/icons-vue';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -59,7 +60,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -178,7 +179,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar :columns="columns" title="系统消息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
|
@ -187,8 +188,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.update)"
|
||||
:disabled="!(selectIds.length > 0)"
|
||||
:icon="useRenderIcon('octicon:read-24')"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="primary"
|
||||
@click="updateMarkMessageReceived(true)"
|
||||
>
|
||||
|
@ -200,8 +200,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.update)"
|
||||
:disabled="!(selectIds.length > 0)"
|
||||
:icon="Message"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="primary"
|
||||
@click="updateMarkMessageReceived(false)"
|
||||
>
|
||||
|
@ -213,8 +212,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(selectIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import { h, ref } from 'vue';
|
||||
import { message, messageBox } from '@/utils/message';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
|
|
@ -16,13 +16,14 @@ import EditPen from '@iconify-icons/ep/edit-pen';
|
|||
import Refresh from '@iconify-icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { messageLevel } from '@/views/message-manger/message-editing/utils';
|
||||
import { isReadStatus } from '@/enums/baseConstant';
|
||||
import { useMessageSendStore } from '@/store/message/messageSend';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -60,7 +61,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -179,7 +180,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar :columns="columns" title="系统消息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
|
@ -188,8 +189,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import MessageDialog from '@/views/message-manger/message-send/message-dialog.vue';
|
||||
import { h, reactive, ref, toRaw } from 'vue';
|
||||
import { message, messageBox } from '@/utils/message';
|
||||
|
|
|
@ -19,11 +19,12 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { enabledOrNotStatus } from '@/enums/baseConstant';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -62,7 +63,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -130,11 +131,11 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar :columns="columns" title="系统消息类型" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -143,8 +144,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import MessageTypeDialog from '@/views/message-manger/message-type/message-type-dialog.vue';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -17,12 +17,13 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useQuartzExecuteLogStore } from '@/store/monitor/quartzExecuteLog';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import View from '@iconify-icons/ep/view';
|
||||
import VueJsonPretty from 'vue-json-pretty';
|
||||
import 'vue-json-pretty/lib/styles.css';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -59,7 +60,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -118,7 +119,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar
|
||||
:columns="columns"
|
||||
|
@ -132,8 +133,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -2,7 +2,7 @@ import { useQuartzExecuteLogStore } from '@/store/monitor/quartzExecuteLog';
|
|||
import { h, ref } from 'vue';
|
||||
import { messageBox } from '@/utils/message';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import ScheduleExecuteLog from '@/views/monitor/scheduler-execute-log/schedule-execute-log.vue';
|
||||
|
||||
export const formRef = ref();
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { UtilsEChartsOption } from '@pureadmin/utils';
|
||||
// import 'echarts-gl';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import * as echarts from 'echarts';
|
||||
import { useIntervalFn } from '@vueuse/core';
|
||||
import dayjs from 'dayjs';
|
||||
import { fetchSystemCPU } from '@/api/v1/actuator';
|
||||
import SystemCardItem from '@/components/MyCol/SystemCardItem.vue';
|
||||
import SystemCardItem from '@/components/ReCol/SystemCardItem.vue';
|
||||
|
||||
const cupECharts = ref();
|
||||
const myChart = ref<any>();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import SystemCardItem from '@/components/MyCol/SystemCardItem.vue';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import SystemCardItem from '@/components/ReCol/SystemCardItem.vue';
|
||||
import { info, onSearch, onSearchDisk, percentage } from '@/views/monitor/server/utils/hooks';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { UtilsEChartsOption } from '@pureadmin/utils';
|
||||
// import 'echarts-gl';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import * as echarts from 'echarts';
|
||||
import { useIntervalFn } from '@vueuse/core';
|
||||
import dayjs from 'dayjs';
|
||||
import { fetchSystemProcessCPU } from '@/api/v1/actuator';
|
||||
import SystemCardItem from '@/components/MyCol/SystemCardItem.vue';
|
||||
import SystemCardItem from '@/components/ReCol/SystemCardItem.vue';
|
||||
|
||||
const jvmCPUECharts = ref();
|
||||
const myChart = ref<any>();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { cardClass, cardLogoClass } from '@/views/monitor/server/utils/columns';
|
||||
import { systemServerInfo } from '@/views/monitor/server/utils/hooks';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, PropType } from 'vue';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
||||
interface CardProductType {
|
||||
|
|
|
@ -17,9 +17,10 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -124,7 +125,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<Auth :value="auth.search" />
|
||||
<ReAuth :value="auth.search" />
|
||||
|
||||
<PureTableBar
|
||||
:columns="columns"
|
||||
|
@ -138,8 +139,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import UserLoginLogDialog from '@/views/monitor/user-login-log/user-login-log-dialog.vue';
|
||||
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -19,9 +19,10 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -58,7 +59,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -93,7 +94,7 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar
|
||||
:columns="columns"
|
||||
|
@ -102,7 +103,7 @@ onMounted(() => {
|
|||
@refresh="onSearch"
|
||||
>
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -111,8 +112,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import SchedulersGroupDialog from '@/views/scheduler/schedulers-group/schedulers-group-dialog.vue';
|
||||
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -19,9 +19,10 @@ import Refresh from '@iconify-icons/ep/refresh';
|
|||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useSchedulersStore } from '@/store/scheduler/schedulers';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -53,7 +54,7 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -120,11 +121,11 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar :columns="columns" title="Schedulers视图" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" bg text :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -174,7 +175,7 @@ onMounted(() => {
|
|||
</el-button>
|
||||
|
||||
<!-- 暂停-->
|
||||
<Auth :value="auth.pause">
|
||||
<ReAuth :value="auth.pause">
|
||||
<el-button
|
||||
v-if="row.triggerState !== 'PAUSED'"
|
||||
:icon="useRenderIcon('line-md:pause')"
|
||||
|
@ -186,10 +187,10 @@ onMounted(() => {
|
|||
>
|
||||
{{ $t('pause') }}
|
||||
</el-button>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<!-- 恢复 -->
|
||||
<Auth :value="auth.resume">
|
||||
<ReAuth :value="auth.resume">
|
||||
<el-button
|
||||
v-if="row.triggerState === 'PAUSED'"
|
||||
:icon="useRenderIcon('material-symbols:resume')"
|
||||
|
@ -201,7 +202,7 @@ onMounted(() => {
|
|||
>
|
||||
{{ $t('resume') }}
|
||||
</el-button>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<!-- 删除 -->
|
||||
<el-popconfirm
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import SchedulersDialog from '@/views/scheduler/schedulers/schedulers-dialog.vue';
|
||||
import { useSchedulersStore } from '@/store/scheduler/schedulers';
|
||||
import { h, ref } from 'vue';
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||
import { FormInstance } from 'element-plus';
|
||||
import { deptList, FormProps, isAddUserinfo, rules } from '@/views/system/admin-user/utils';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import ReCol from '@/components/MyCol';
|
||||
import ReCol from '@/components/ReCol';
|
||||
import { sexConstant } from '@/enums/baseConstant';
|
||||
import { deptSelector } from '@/views/system/dept/utils';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
|
|
|
@ -26,7 +26,7 @@ import EditPen from '@iconify-icons/ep/edit-pen';
|
|||
import Refresh from '@iconify-icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import Upload from '@iconify-icons/ri/upload-line';
|
||||
import Role from '@iconify-icons/ri/admin-line';
|
||||
import Password from '@iconify-icons/ri/lock-password-line';
|
||||
|
@ -40,6 +40,7 @@ import { useDeptStore } from '@/store/system/dept';
|
|||
import { FormInstance } from 'element-plus';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
const adminUserStore = useAdminUserStore();
|
||||
const deptStore = useDeptStore();
|
||||
|
@ -96,7 +97,7 @@ onMounted(() => {
|
|||
@tree-select="onTreeSelect"
|
||||
/>
|
||||
<div :class="[deviceDetection() ? ['w-full', 'mt-2'] : 'w-[calc(100%-200px)]']">
|
||||
<Auth :value="auth.search">
|
||||
<ReAuth :value="auth.search">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
|
@ -203,11 +204,11 @@ onMounted(() => {
|
|||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Auth>
|
||||
</ReAuth>
|
||||
|
||||
<PureTableBar :columns="columns" :title="$t('userinfo')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" bg text type="primary" @click="onAdd">
|
||||
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" plain type="primary" @click="onAdd">
|
||||
{{ $t('addNew') }}
|
||||
</el-button>
|
||||
|
||||
|
@ -216,8 +217,7 @@ onMounted(() => {
|
|||
v-if="hasAuth(auth.deleted)"
|
||||
:disabled="!(deleteIds.length > 0)"
|
||||
:icon="useRenderIcon(Delete)"
|
||||
bg
|
||||
text
|
||||
plain
|
||||
type="danger"
|
||||
@click="onDeleteBatch"
|
||||
>
|
||||
|
|
|
@ -6,7 +6,7 @@ import OfficeBuilding from '@iconify-icons/ep/office-building';
|
|||
import LocationCompany from '@iconify-icons/ep/add-location';
|
||||
import ExpandIcon from '@/assets/svg/expand.svg?component';
|
||||
import UnExpandIcon from '@/assets/svg/unexpand.svg?component';
|
||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import Reset from '@iconify-icons/ri/restart-line';
|
||||
import { buttonClass, defaultProps, onSearch, Tree } from '@/views/system/admin-user/utils';
|
||||
import { useAdminUserStore } from '@/store/system/adminUser';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import AdminUserDialog from '@/views/system/admin-user/admin-user-dialog.vue';
|
||||
import { useAdminUserStore } from '@/store/system/adminUser';
|
||||
import { computed, h, reactive, ref } from 'vue';
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue