feat: 显示页面调整
This commit is contained in:
parent
edf8d86656
commit
d2341b1556
47
ReadMe.md
47
ReadMe.md
|
@ -38,7 +38,7 @@
|
|||
|
||||
## ✨ v4.0.0 重大更新
|
||||
|
||||
新分支` sysn_6.0.0`与上游【Pure Admin】合并
|
||||
新分支` sysn_6.0.0`与上游【Pure Admin】合并,将旧版本放在了`master-v1`中。
|
||||
|
||||
### 核心改进
|
||||
|
||||
|
@ -77,10 +77,10 @@
|
|||
|
||||
通过 `WebSecurityConfig` 配置
|
||||
|
||||
| 路径类型 | 示例 | 访问要求 | 配置方式 |
|
||||
| -------- | ----------------- | -------- | ------------------------- |
|
||||
| 路径类型 | 示例 | 访问要求 | 配置方式 |
|
||||
|------|-------------------|------|--------------------|
|
||||
| 公开接口 | `/api/public/**` | 无需认证 | 路径包含 `public` 关键字 |
|
||||
| 私有接口 | `/api/private/**` | 需登录 | 路径包含 `private` 关键字 |
|
||||
| 私有接口 | `/api/private/**` | 需登录 | 路径包含 `private` 关键字 |
|
||||
|
||||
### 路径匹配策略
|
||||
|
||||
|
@ -144,10 +144,10 @@ http.authorizeHttpRequests(auth -> auth
|
|||
|
||||
AntPath详情:https://juejin.cn/spost/7498247273660743732
|
||||
|
||||
| 模式 | 示例 | 说明 |
|
||||
| -------- | --------------- | ---------------- |
|
||||
| 模式 | 示例 | 说明 |
|
||||
|------|-----------------|------------|
|
||||
| 精确匹配 | `/api/user` | 完全匹配路径 |
|
||||
| 通配符 | `/api/user/*` | 匹配单级路径 |
|
||||
| 通配符 | `/api/user/*` | 匹配单级路径 |
|
||||
| 多级通配 | `/api/user/**` | 匹配多级路径 |
|
||||
| 方法限定 | `GET /api/user` | 匹配特定HTTP方法 |
|
||||
|
||||
|
@ -188,12 +188,13 @@ docker compose up -d
|
|||
```
|
||||
2. **权限码设计**:
|
||||
|
||||
- 模块::操作 (如 `user::create`)
|
||||
- 分层级设计 (如 `system:user:update`)
|
||||
- 模块::操作 (如 `user::create`)
|
||||
- 分层级设计 (如 `system:user:update`)
|
||||
|
||||
3. **批量操作**:
|
||||
- 使用 Excel/JSON 管理大量权限配置
|
||||
- 定期备份权限配置
|
||||
|
||||
- 使用 Excel/JSON 管理大量权限配置
|
||||
- 定期备份权限配置
|
||||
|
||||
## 🌟 项目优势
|
||||
|
||||
|
@ -222,24 +223,24 @@ docker compose up -d
|
|||
|
||||
### 前端示例规范
|
||||
|
||||
| **操作** | **API 层** | **Pinia 层** |
|
||||
| :------- | :------------ | :-------------- |
|
||||
| 查询单个 | `getUser` | `loadUser` |
|
||||
| 查询列表 | `getUserList` | `loadUserList` |
|
||||
| 分页查询 | `getUserPage` | `fetchUserPage` |
|
||||
| 新增数据 | `createUser` | `addUser` |
|
||||
| 更新数据 | `updateUser` | `editUser` |
|
||||
| 删除数据 | `deleteUser` | `removeUser` |
|
||||
| **操作** | **API 层** | **Pinia 层** |
|
||||
|:-------|:--------------|:----------------|
|
||||
| 查询单个 | `getUser` | `loadUser` |
|
||||
| 查询列表 | `getUserList` | `loadUserList` |
|
||||
| 分页查询 | `getUserPage` | `fetchUserPage` |
|
||||
| 新增数据 | `createUser` | `addUser` |
|
||||
| 更新数据 | `updateUser` | `editUser` |
|
||||
| 删除数据 | `deleteUser` | `removeUser` |
|
||||
|
||||
### 后端接口示例规范
|
||||
|
||||
遵循Restful
|
||||
|
||||
| **操作** | **RESTful** |
|
||||
| :------- | :-------------------------- |
|
||||
| 查询列表 | `GET /users` |
|
||||
| 分页查询 | `GET /users/{page}/{limit}` |
|
||||
| 查询单个 | `GET /users/{id}` |
|
||||
|:-------|:----------------------------|
|
||||
| 查询列表 | `GET /users` |
|
||||
| 分页查询 | `GET /users/{page}/{limit}` |
|
||||
| 查询单个 | `GET /users/{id}` |
|
||||
| 新增 | `POST /users` |
|
||||
| 更新 | `PUT /users/{id}` |
|
||||
| 删除 | `DELETE /users/{id}` |
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
import type { Plugin } from "vite";
|
||||
import gradient from "gradient-string";
|
||||
import { getPackageSize } from "./utils";
|
||||
import dayjs, { type Dayjs } from "dayjs";
|
||||
import duration from "dayjs/plugin/duration";
|
||||
import boxen, { type Options as BoxenOptions } from "boxen";
|
||||
import boxen, { type Options as BoxenOptions } from 'boxen';
|
||||
import dayjs, { type Dayjs } from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import gradient from 'gradient-string';
|
||||
import type { Plugin } from 'vite';
|
||||
import { getPackageSize } from './utils';
|
||||
dayjs.extend(duration);
|
||||
|
||||
const welcomeMessage = gradient(["cyan", "magenta"]).multiline(
|
||||
`您好! 欢迎使用 pure-admin 开源项目\n我们为您精心准备了下面两个贴心的保姆级文档\nhttps://pure-admin.cn\nhttps://pure-admin-utils.netlify.app`
|
||||
);
|
||||
const welcomeMessage = (VITE_PORT: number) =>
|
||||
gradient(['cyan', 'magenta']).multiline(
|
||||
`您好! 欢迎使用 bunny 系列开发模板项目访问地址如下:\nhttp://localhost:${VITE_PORT}
|
||||
pure-admin 开源项目保姆级文档:\nhttps://pure-admin.cn`
|
||||
);
|
||||
|
||||
const boxenOptions: BoxenOptions = {
|
||||
padding: 0.5,
|
||||
borderColor: "cyan",
|
||||
borderStyle: "round"
|
||||
borderColor: 'cyan',
|
||||
borderStyle: 'round',
|
||||
};
|
||||
|
||||
export function viteBuildInfo(): Plugin {
|
||||
export function viteBuildInfo(VITE_PORT: number): Plugin {
|
||||
let config: { command: string };
|
||||
let startTime: Dayjs;
|
||||
let endTime: Dayjs;
|
||||
let outDir: string;
|
||||
return {
|
||||
name: "vite:buildInfo",
|
||||
name: 'vite:buildInfo',
|
||||
configResolved(resolvedConfig) {
|
||||
config = resolvedConfig;
|
||||
outDir = resolvedConfig.build?.outDir ?? "dist";
|
||||
outDir = resolvedConfig.build?.outDir ?? 'dist';
|
||||
},
|
||||
buildStart() {
|
||||
console.log(boxen(welcomeMessage, boxenOptions));
|
||||
if (config.command === "build") {
|
||||
console.log(boxen(welcomeMessage(VITE_PORT), boxenOptions));
|
||||
if (config.command === 'build') {
|
||||
startTime = dayjs(new Date());
|
||||
}
|
||||
},
|
||||
closeBundle() {
|
||||
if (config.command === "build") {
|
||||
if (config.command === 'build') {
|
||||
endTime = dayjs(new Date());
|
||||
getPackageSize({
|
||||
folder: outDir,
|
||||
callback: (size: string) => {
|
||||
console.log(
|
||||
boxen(
|
||||
gradient(["cyan", "magenta"]).multiline(
|
||||
`🎉 恭喜打包完成(总用时${dayjs
|
||||
.duration(endTime.diff(startTime))
|
||||
.format("mm分ss秒")},打包后的大小为${size})`
|
||||
gradient(['cyan', 'magenta']).multiline(
|
||||
`🎉 恭喜打包完成(总用时${dayjs.duration(endTime.diff(startTime)).format('mm分ss秒')},打包后的大小为${size})`
|
||||
),
|
||||
boxenOptions
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,33 +1,28 @@
|
|||
import { cdn } from "./cdn";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { pathResolve } from "./utils";
|
||||
import { viteBuildInfo } from "./info";
|
||||
import svgLoader from "vite-svg-loader";
|
||||
import Icons from "unplugin-icons/vite";
|
||||
import type { PluginOption } from "vite";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { configCompressPlugin } from "./compress";
|
||||
import removeNoMatch from "vite-plugin-router-warn";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import removeConsole from "vite-plugin-remove-console";
|
||||
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
||||
import { codeInspectorPlugin } from "code-inspector-plugin";
|
||||
import { vitePluginFakeServer } from "vite-plugin-fake-server";
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { codeInspectorPlugin } from 'code-inspector-plugin';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
import type { PluginOption } from 'vite';
|
||||
import removeConsole from 'vite-plugin-remove-console';
|
||||
import removeNoMatch from 'vite-plugin-router-warn';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
import { cdn } from './cdn';
|
||||
import { configCompressPlugin } from './compress';
|
||||
import { viteBuildInfo } from './info';
|
||||
|
||||
export function getPluginsList(
|
||||
VITE_CDN: boolean,
|
||||
VITE_COMPRESSION: ViteCompression
|
||||
): PluginOption[] {
|
||||
export function getPluginsList(VITE_CDN: boolean, VITE_COMPRESSION: ViteCompression, VITE_PORT: number): PluginOption[] {
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
return [
|
||||
tailwindcss(),
|
||||
vue({
|
||||
template: {
|
||||
compilerOptions: {
|
||||
isCustomElement: tag => tag === "deep-chat"
|
||||
}
|
||||
}
|
||||
isCustomElement: (tag) => tag === 'deep-chat',
|
||||
},
|
||||
},
|
||||
}),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
|
@ -41,10 +36,10 @@ export function getPluginsList(
|
|||
* 更多用法看 https://inspector.fe-dev.cn/guide/start.html
|
||||
*/
|
||||
codeInspectorPlugin({
|
||||
bundler: "vite",
|
||||
hideConsole: true
|
||||
bundler: 'vite',
|
||||
hideConsole: true,
|
||||
}),
|
||||
viteBuildInfo(),
|
||||
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
|
||||
|
@ -62,16 +57,14 @@ export function getPluginsList(
|
|||
svgLoader(),
|
||||
// 自动按需加载图标
|
||||
Icons({
|
||||
compiler: "vue3",
|
||||
scale: 1
|
||||
compiler: 'vue3',
|
||||
scale: 1,
|
||||
}),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
// 线上环境删除console
|
||||
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
||||
removeConsole({ external: ['src/assets/iconfont/iconfont.js'] }),
|
||||
// 打包分析
|
||||
lifecycle === "report"
|
||||
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
|
||||
: (null as any)
|
||||
lifecycle === 'report' ? visualizer({ open: true, brotliSize: true, filename: 'report.html' }) : (null as any),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import Sortable from 'sortablejs';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { computed, defineComponent, getCurrentInstance, nextTick, type PropType, ref, unref } from 'vue';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
import { cloneDeep, delay, getKeyList, isBoolean, isFunction } from '@pureadmin/utils';
|
||||
import Sortable from 'sortablejs';
|
||||
import { computed, defineComponent, getCurrentInstance, nextTick, type PropType, ref, unref } from 'vue';
|
||||
|
||||
import Fullscreen from '~icons/ri/fullscreen-fill';
|
||||
import ExitFullscreen from '~icons/ri/fullscreen-exit-fill';
|
||||
import CollapseIcon from '@/assets/table-bar/collapse.svg?component';
|
||||
import DragIcon from '@/assets/table-bar/drag.svg?component';
|
||||
import ExpandIcon from '@/assets/table-bar/expand.svg?component';
|
||||
import RefreshIcon from '@/assets/table-bar/refresh.svg?component';
|
||||
import SettingIcon from '@/assets/table-bar/settings.svg?component';
|
||||
import CollapseIcon from '@/assets/table-bar/collapse.svg?component';
|
||||
import ExitFullscreen from '~icons/ri/fullscreen-exit-fill';
|
||||
import Fullscreen from '~icons/ri/fullscreen-fill';
|
||||
|
||||
const props = {
|
||||
/** 头部最左边的标题 */
|
||||
|
@ -112,7 +112,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
function handleCheckColumnListChange(val: boolean, label: string) {
|
||||
dynamicColumns.value.filter((item) => $t(item.label) === $t(label))[0].hide = !val;
|
||||
dynamicColumns.value.filter((item) => item.label === label)[0].hide = !val;
|
||||
}
|
||||
|
||||
async function onReset() {
|
||||
|
@ -171,7 +171,7 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
const isFixedColumn = (label: string) => {
|
||||
return dynamicColumns.value.filter((item) => $t(item.label) === $t(label))[0].fixed;
|
||||
return dynamicColumns.value.filter((item) => item.label === label)[0].fixed;
|
||||
};
|
||||
|
||||
const rendTippyProps = (content: string) => {
|
||||
|
@ -230,7 +230,7 @@ export default defineComponent({
|
|||
onChange={(value) => handleCheckAllChange(value)}
|
||||
/>
|
||||
<el-button type="primary" link onClick={() => onReset()}>
|
||||
重置
|
||||
{$t('buttons.reset')}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
@ -250,8 +250,8 @@ export default defineComponent({
|
|||
onMouseenter={(event: { preventDefault: () => void }) => rowDrop(event)}
|
||||
/>
|
||||
<el-checkbox key={index} label={item} value={item} onChange={(value) => handleCheckColumnListChange(value, item)}>
|
||||
<span title={$t(item)} class="inline-block w-[120px] truncate hover:text-text_color_primary">
|
||||
{$t(item)}
|
||||
<span title={item} class="inline-block w-[120px] truncate hover:text-text_color_primary">
|
||||
{item}
|
||||
</span>
|
||||
</el-checkbox>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Sortable from 'sortablejs';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
import { computed, defineComponent, getCurrentInstance, nextTick, type PropType, ref, unref } from 'vue';
|
||||
import { cloneDeep, delay, getKeyList, isBoolean, isFunction } from '@pureadmin/utils';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { computed } from 'vue';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
|
||||
/**
|
||||
* * 表格头部样式
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import LayFrame from '../lay-frame/index.vue';
|
||||
import LayFooter from '../lay-footer/index.vue';
|
||||
import { useTags } from '@/layout/hooks/useTag';
|
||||
import { isNumber, useGlobal } from '@pureadmin/utils';
|
||||
import BackTopIcon from '@/assets/svg/back_top.svg?component';
|
||||
import { useTags } from '@/layout/hooks/useTag';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { isNumber, useGlobal } from '@pureadmin/utils';
|
||||
import { computed, defineComponent, h, Transition } from 'vue';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import LayFooter from '../lay-footer/index.vue';
|
||||
import LayFrame from '../lay-frame/index.vue';
|
||||
|
||||
const props = defineProps({
|
||||
fixedHeader: Boolean,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { getConfig } from '@/config';
|
||||
import { useMultiFrame } from '@/layout/hooks/useMultiFrame';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { type Component, computed, shallowRef, watch } from 'vue';
|
||||
import { RouteLocationNormalizedLoaded, type RouteRecordRaw } from 'vue-router';
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { ListItem } from '../data';
|
||||
import { nextTick, PropType, ref } from 'vue';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { deviceDetection } from '@pureadmin/utils';
|
||||
import { nextTick, PropType, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ListItem } from '../data';
|
||||
|
||||
defineProps({
|
||||
noticeItem: {
|
||||
|
@ -50,7 +50,7 @@ function goMessageDetail(message: ListItem) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="notice-container border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]" @click="goMessageDetail(noticeItem)">
|
||||
<div class="notice-container border-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]" @click="goMessageDetail(noticeItem)">
|
||||
<!--<el-avatar v-if="noticeItem.cover" :size="30" :src="noticeItem.cover" class="notice-container-avatar" />-->
|
||||
<img v-if="noticeItem.cover" :src="noticeItem.cover" alt="" class="notice-container-avatar" />
|
||||
<div class="notice-container-text">
|
||||
|
@ -101,6 +101,7 @@ function goMessageDetail(message: ListItem) {
|
|||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 12px 0;
|
||||
margin: 2px 0 0 0;
|
||||
|
||||
// border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import Sortable from 'sortablejs';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import SearchHistoryItem from './SearchHistoryItem.vue';
|
||||
import type { dragItem, optionsItem, Props } from '../types';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
import { delay, isArray, useResizeObserver } from '@pureadmin/utils';
|
||||
import { computed, getCurrentInstance, nextTick, ref, watch } from 'vue';
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import SearchHistory from './SearchHistory.vue';
|
|||
import type { dragItem, optionsItem } from '../types';
|
||||
import { computed, ref, shallowRef, watch } from 'vue';
|
||||
import { onKeyStroke, useDebounceFn } from '@vueuse/core';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { cloneDeep, isAllEmpty, storageLocal } from '@pureadmin/utils';
|
||||
import SearchIcon from '~icons/ri/search-line';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import EnterOutlined from '@/assets/svg/enter_outlined.svg?component';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
import { useResizeObserver } from '@pureadmin/utils';
|
||||
import { computed, getCurrentInstance, onMounted, ref } from 'vue';
|
||||
import type { Props } from '../types';
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, nextTick, onBeforeMount, onUnmounted, reactive, ref, unref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { emitter } from '@/utils/mitt';
|
||||
import LayPanel from '../lay-panel/index.vue';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { useAppStoreHook } from '@/store/modules/app';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import Segmented, { type OptionsType } from '@/components/ReSegmented';
|
||||
import { useDataThemeChange } from '@/layout/hooks/useDataThemeChange';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { useAppStoreHook } from '@/store/modules/app';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { emitter } from '@/utils/mitt';
|
||||
import { debounce, isNumber, useDark, useGlobal } from '@pureadmin/utils';
|
||||
import { computed, nextTick, onBeforeMount, onUnmounted, reactive, ref, unref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import LayPanel from '../lay-panel/index.vue';
|
||||
|
||||
import DarkIcon from '@/assets/svg/dark.svg?component';
|
||||
import DayIcon from '@/assets/svg/day.svg?component';
|
||||
import SystemIcon from '@/assets/svg/system.svg?component';
|
||||
import Check from '~icons/ep/check';
|
||||
import LeftArrow from '~icons/ri/arrow-left-s-line?width=20&height=20';
|
||||
import RightArrow from '~icons/ri/arrow-right-s-line?width=20&height=20';
|
||||
import DayIcon from '@/assets/svg/day.svg?component';
|
||||
import DarkIcon from '@/assets/svg/dark.svg?component';
|
||||
import SystemIcon from '@/assets/svg/system.svg?component';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { device } = useNav();
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<script lang="ts" setup>
|
||||
import { emitter } from '@/utils/mitt';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import LaySearch from '../lay-search/index.vue';
|
||||
import LayNotice from '../lay-notice/index.vue';
|
||||
import { responsiveStorageNameSpace } from '@/config';
|
||||
import { computed, nextTick, onMounted, ref } from 'vue';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { emitter } from '@/utils/mitt';
|
||||
import { isAllEmpty, storageLocal } from '@pureadmin/utils';
|
||||
import { computed, nextTick, onMounted, ref } from 'vue';
|
||||
import { useTranslationLang } from '../../hooks/useTranslationLang';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import LaySidebarItem from '../lay-sidebar/components/SidebarItem.vue';
|
||||
import LayNotice from '../lay-notice/index.vue';
|
||||
import LaySearch from '../lay-search/index.vue';
|
||||
import LaySidebarFullScreen from '../lay-sidebar/components/SidebarFullScreen.vue';
|
||||
import LaySidebarItem from '../lay-sidebar/components/SidebarItem.vue';
|
||||
|
||||
import GlobalizationIcon from '@/assets/svg/globalization.svg?component';
|
||||
import LogoutCircleRLine from '~icons/ri/logout-circle-r-line';
|
||||
import Setting from '~icons/ri/settings-3-line';
|
||||
import Check from '~icons/ep/check';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
import Check from '~icons/ep/check';
|
||||
import LogoutCircleRLine from '~icons/ri/logout-circle-r-line';
|
||||
import Setting from '~icons/ri/settings-3-line';
|
||||
|
||||
const menuRef = ref();
|
||||
const showLogo = ref(storageLocal().getItem<StorageConfigs>(`${responsiveStorageNameSpace()}configure`)?.showLogo ?? true);
|
||||
|
||||
const { t, route, locale, translation } = useTranslationLang(menuRef);
|
||||
const { route, locale, translation } = useTranslationLang(menuRef);
|
||||
const { title, logout, onPanel, getLogo, username, userAvatar, backTopMenu, avatarsStyle, getDropdownItemStyle, getDropdownItemClass } = useNav();
|
||||
|
||||
const defaultActive = computed(() => (!isAllEmpty(route.meta?.activePath) ? route.meta.activePath : route.path));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { useNav } from '@/layout/hooks/useNav';
|
||||
import { findRouteByPath, getParentPaths } from '@/router/utils';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { isAllEmpty } from '@pureadmin/utils';
|
||||
import { nextTick, onMounted, ref, toRaw, watch } from 'vue';
|
||||
import { useTranslationLang } from '../../hooks/useTranslationLang';
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useNav } from '@/layout/hooks/useNav';
|
|||
import { responsiveStorageNameSpace } from '@/config';
|
||||
import { isAllEmpty, storageLocal } from '@pureadmin/utils';
|
||||
import { findRouteByPath, getParentPaths } from '@/router/utils';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import LaySidebarLogo from '../lay-sidebar/components/SidebarLogo.vue';
|
||||
import LaySidebarItem from '../lay-sidebar/components/SidebarItem.vue';
|
||||
|
|
|
@ -4,7 +4,7 @@ import { $t } from '@/plugins/i18n';
|
|||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { onMounted, ref, toRaw, watch } from 'vue';
|
||||
import { findRouteByPath, getParentPaths } from '@/router/utils';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
|
||||
const route = useRoute();
|
||||
const levelList = ref([]);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import { routerArrays } from '@/layout/types';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { getTopMenu, handleAliveRoute } from '@/router/utils';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { useSettingStoreHook } from '@/store/modules/settings';
|
||||
import { emitter } from '@/utils/mitt';
|
||||
import { delay, isAllEmpty, isEqual, useResizeObserver } from '@pureadmin/utils';
|
||||
|
|
|
@ -6,8 +6,8 @@ import { routerArrays } from '@/layout/types';
|
|||
import { resetRouter, router } from '@/router';
|
||||
import type { themeColorsType } from '../types';
|
||||
import { useAppStoreHook } from '@/store/modules/app';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { darken, lighten, storageLocal, useGlobal } from '@pureadmin/utils';
|
||||
|
||||
export function useDataThemeChange() {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { computed } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { routerArrays } from '../types';
|
||||
import { useGlobal } from '@pureadmin/utils';
|
||||
import { useMultiTagsStore } from '@/store/multiTags';
|
||||
import { useMultiTagsStore } from '@/store/modules/multiTags';
|
||||
|
||||
export function useLayout() {
|
||||
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
|
||||
|
|
|
@ -12,8 +12,8 @@ import { computed, type CSSProperties } from 'vue';
|
|||
import { useAppStoreHook } from '@/store/modules/app';
|
||||
import { useUserStoreHook } from '@/store/system/user';
|
||||
import { isAllEmpty, useGlobal } from '@pureadmin/utils';
|
||||
import { useEpThemeStoreHook } from '@/store/epTheme';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { useEpThemeStoreHook } from '@/store/modules/epTheme';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import ExitFullscreen from '~icons/ri/fullscreen-exit-fill';
|
||||
import Fullscreen from '~icons/ri/fullscreen-fill';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
import { $t } from '@/plugins/i18n';
|
||||
import { responsiveStorageNameSpace } from '@/config';
|
||||
import { useSettingStoreHook } from '@/store/modules/settings';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { hasClass, isBoolean, isEqual, storageLocal, toggleClass } from '@pureadmin/utils';
|
||||
|
||||
import Fullscreen from '~icons/ri/fullscreen-fill';
|
||||
|
|
|
@ -5,8 +5,8 @@ import NProgress from '@/utils/progress';
|
|||
import { $t } from '@/plugins/i18n';
|
||||
import { buildHierarchyTree } from '@/utils/tree';
|
||||
import remainingRouter from './modules/remaining';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
import { isAllEmpty, isUrl, openLink, storageLocal } from '@pureadmin/utils';
|
||||
import {
|
||||
ascending,
|
||||
|
|
|
@ -7,8 +7,8 @@ import { getConfig } from '@/config';
|
|||
import { buildHierarchyTree } from '@/utils/tree';
|
||||
import { type DataInfo, userKey } from '@/utils/auth';
|
||||
import { type menuType, routerArrays } from '@/layout/types';
|
||||
import { useMultiTagsStoreHook } from '@/store/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/permission';
|
||||
import { useMultiTagsStoreHook } from '@/store/modules/multiTags';
|
||||
import { usePermissionStoreHook } from '@/store/modules/permission';
|
||||
// 动态路由
|
||||
import { fetchRouterAsync } from '@/api/v1/system/system';
|
||||
// import { getAsyncRoutes } from '@/api/routes';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { getConfig, responsiveStorageNameSpace, storageLocal, store } from './utils';
|
||||
import { getConfig, responsiveStorageNameSpace, storageLocal, store } from '../utils';
|
||||
|
||||
export const useEpThemeStore = defineStore('pure-epTheme', {
|
||||
state: () => ({
|
|
@ -11,7 +11,7 @@ import {
|
|||
routerArrays,
|
||||
storageLocal,
|
||||
store,
|
||||
} from './utils';
|
||||
} from '../utils';
|
||||
import { usePermissionStoreHook } from './permission';
|
||||
|
||||
export const useMultiTagsStore = defineStore('pure-multiTags', {
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { ascending, type cacheType, constantMenus, debounce, filterNoPermissionTree, filterTree, formatFlatteningRoutes, getKeyList, store } from './utils';
|
||||
import { ascending, type cacheType, constantMenus, debounce, filterNoPermissionTree, filterTree, formatFlatteningRoutes, getKeyList, store } from '../utils';
|
||||
import { useMultiTagsStoreHook } from './multiTags';
|
||||
|
||||
export const usePermissionStore = defineStore('pure-permission', {
|
|
@ -25,7 +25,7 @@ export const useRoleStore = defineStore('roleStore', {
|
|||
// 分页查询结果
|
||||
pagination: {
|
||||
currentPage: 1,
|
||||
pageSize: 30,
|
||||
pageSize: 15,
|
||||
total: 1,
|
||||
pageSizes,
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { resetRouter, router, routerArrays, storageLocal, store, type userType } from '../utils';
|
||||
import { getUserinfo, logout, refreshTokenApi, sendLoginEmail, userLogin } from '@/api/v1/system/adminUser';
|
||||
import { useMultiTagsStoreHook } from '../multiTags';
|
||||
import { useMultiTagsStoreHook } from '../modules/multiTags';
|
||||
import { type DataInfo, removeToken, setToken, userKey } from '@/utils/auth';
|
||||
import { message, storeMessage } from '@/utils/message';
|
||||
import { createUserRole, getRoleListByUserId } from '@/api/v1/system/role';
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<script lang="tsx" setup>
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useEmailTemplateStore } from '@/store/configuration/emailTemplate';
|
||||
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
||||
import { auth, columns, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate, selectRows } from '@/views/configuration/email-template/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import View from '~icons/ep/view';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
|
||||
defineOptions({ name: 'EmailTemplate' });
|
||||
|
||||
|
|
|
@ -15,17 +15,15 @@ export const columns: TableColumnList = [
|
|||
{
|
||||
label: $t('emailTemplate_templateName'),
|
||||
prop: 'templateName',
|
||||
width: 150,
|
||||
},
|
||||
// 模板名称
|
||||
{
|
||||
label: $t('emailTemplate_emailUser'),
|
||||
prop: 'emailUser',
|
||||
slot: 'emailUser',
|
||||
width: 180,
|
||||
},
|
||||
// 主题
|
||||
{ label: $t('emailTemplate_subject'), prop: 'subject', width: 200 },
|
||||
{ label: $t('emailTemplate_subject'), prop: 'subject' },
|
||||
// 邮件内容
|
||||
{ label: $t('emailTemplate_body'), prop: 'body', width: 150 },
|
||||
// 邮件类型
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { enabledOrNotStatus } from '@/enums/baseConstant';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
||||
import {
|
||||
auth,
|
||||
columns,
|
||||
|
@ -12,21 +19,14 @@ import {
|
|||
onUpdate,
|
||||
switchLoadMap,
|
||||
} from '@/views/configuration/email-user/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~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/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';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'EmailUsersConfiguration' });
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ export const columns: TableColumnList = [
|
|||
width: 60,
|
||||
},
|
||||
// 邮箱
|
||||
{ label: $t('emailUsers_email'), prop: 'email', width: 180 },
|
||||
{ label: $t('emailUsers_email'), prop: 'email', minWidth: 100 },
|
||||
// 密码
|
||||
{ label: $t('emailUsers_password'), prop: 'password', width: 160 },
|
||||
{ label: $t('emailUsers_password'), prop: 'password', minWidth: 100 },
|
||||
// Host地址
|
||||
{ label: $t('emailUsers_host'), prop: 'host', width: 150 },
|
||||
// 端口号
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { auth, columns, deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/configuration/menu-icon/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useMenuIconStore } from '@/store/configuration/menuIcon';
|
||||
import MenuIconSelectIconName from '@/views/configuration/menu-icon/components/menu-icon-select-icon-name.vue';
|
||||
import { auth, columns, deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/configuration/menu-icon/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useMenuIconStore } from '@/store/configuration/menuIcon';
|
||||
import MenuIconSelectIconName from '@/views/configuration/menu-icon/components/menu-icon-select-icon-name.vue';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'MenuIconConfiguration' });
|
||||
const tableRef = ref();
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { userI18nStore } from '@/store/i18n/i18n';
|
||||
import {
|
||||
auth,
|
||||
|
@ -13,19 +18,14 @@ import {
|
|||
onUpdate,
|
||||
updateI18nSetting,
|
||||
} from '@/views/i18n/i18n-setting/utils';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Download from '~icons/ep/download';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import Upload from '~icons/ri/upload-line';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
defineOptions({ name: 'I18n' });
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import { messageBox } from '@/utils/message';
|
|||
import I18nDialog from '@/views/i18n/i18n-setting/components/i18n-dialog.vue';
|
||||
import type { FormProps } from '@/views/i18n/i18n-setting/utils/types';
|
||||
import { h, ref } from 'vue';
|
||||
import I18nUseFileUploadDoalog from '@/views/i18n/i18n-setting/components/i18n-use-file-upload-doalog.vue';
|
||||
import I18NUploadDialog from '@/views/i18n/i18n-setting/components/i18n-upload-dialog.vue';
|
||||
|
||||
export const formRef = ref();
|
||||
const i18nStore = userI18nStore();
|
||||
|
@ -25,7 +25,7 @@ export const downloadI18nSetting = (type: string) => {
|
|||
|
||||
/* 下载多语言配置 */
|
||||
export const updateI18nSetting = (fileType: string) => {
|
||||
const i18nUseFileUploadRef = ref();
|
||||
const uploadFormRef = ref();
|
||||
|
||||
addDialog({
|
||||
title: $t('update_multilingual'),
|
||||
|
@ -34,9 +34,9 @@ export const updateI18nSetting = (fileType: string) => {
|
|||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
props: { form: { type: undefined, file: undefined, fileType } },
|
||||
contentRenderer: () => h(I18nUseFileUploadDoalog, { ref: i18nUseFileUploadRef }),
|
||||
contentRenderer: () => h(I18NUploadDialog, { ref: uploadFormRef, form: { type: '', file: undefined, fileType } }),
|
||||
beforeSure: async (done, { options }) => {
|
||||
i18nUseFileUploadRef.value.formRef.validate(async (valid: any) => {
|
||||
uploadFormRef.value.formRef.validate(async (valid: any) => {
|
||||
if (!valid) return;
|
||||
const { type, file, fileType } = options.props.form;
|
||||
await i18nStore.editI18nByFile({ type, file: file[0].raw, fileType });
|
||||
|
@ -56,7 +56,7 @@ export const onAdd = () => {
|
|||
draggable: true,
|
||||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(I18nDialog, { ref: formRef }),
|
||||
contentRenderer: () => h(I18nDialog, { ref: formRef, formInline: { keyName: '', translation: '', typeName: '' } }),
|
||||
footerButtons: [
|
||||
{
|
||||
label: $t('cancel'),
|
||||
|
@ -75,7 +75,6 @@ export const onAdd = () => {
|
|||
const form = options.props.formInline as FormProps;
|
||||
formRef.value.ruleFormRef.validate(async (valid: any) => {
|
||||
if (!valid) return;
|
||||
|
||||
const result = await i18nStore.addI18n(form);
|
||||
if (!result) return;
|
||||
closeDialog(options, index);
|
||||
|
@ -110,16 +109,16 @@ export const onUpdate = (row: any) => {
|
|||
title: $t('update_multilingual'),
|
||||
width: '30%',
|
||||
props: {
|
||||
formInline: {
|
||||
keyName: row.keyName,
|
||||
translation: row.translation,
|
||||
typeName: row.typeName,
|
||||
},
|
||||
formInline: { keyName: row.keyName, translation: row.translation, typeName: row.typeName },
|
||||
},
|
||||
draggable: true,
|
||||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(I18nDialog, { ref: formRef }),
|
||||
contentRenderer: () =>
|
||||
h(I18nDialog, {
|
||||
ref: formRef,
|
||||
formInline: { keyName: row.keyName, translation: row.translation, typeName: row.typeName },
|
||||
}),
|
||||
beforeSure: (done, { options }) => {
|
||||
const form = options.props.formInline as FormProps;
|
||||
formRef.value.ruleFormRef.validate(async (valid: any) => {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<script lang="ts" setup>
|
||||
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/ReIcon/src/hooks';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import TableIsDefaultTag from '@/components/Table/TableIsDefaultTag.vue';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
import { auth, columns, onAdd, onDelete, onSearch, onUpdate } from '@/views/i18n/i18n-type-setting/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'I18nType' });
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { columns, markAsAllRead, markAsRead, onDelete, onSearch, selectIds } from '@/views/message-manger/message-detail/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { Message } from '@element-plus/icons-vue';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { isReadStatus } from '@/enums/baseConstant';
|
||||
import { useMessageUserStore } from '@/store/message/messageUser';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { useMessageUserStore } from '@/store/message/messageUser';
|
||||
import { columns, markAsAllRead, markAsRead, onDelete, onSearch, selectIds } from '@/views/message-manger/message-detail/utils';
|
||||
import { Message } from '@element-plus/icons-vue';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import Delete from '~icons/ep/delete';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { auth, columns, onDeleteBatch, onSearch, selectIds, updateMarkMessageReceived } from '@/views/message-manger/message-received/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { messageLevel } from '@/views/message-manger/message-editing/utils';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { isReadStatus } from '@/enums/baseConstant';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useMessageReceivedStore } from '@/store/message/messageReceived';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { messageLevel } from '@/views/message-manger/message-editing/utils';
|
||||
import { auth, columns, onDeleteBatch, onSearch, selectIds, updateMarkMessageReceived } from '@/views/message-manger/message-received/utils';
|
||||
import { Message } from '@element-plus/icons-vue';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
|
||||
defineOptions({ name: 'MessageReceived' });
|
||||
|
||||
|
|
|
@ -11,41 +11,41 @@ export const columns: TableColumnList = [
|
|||
width: 60,
|
||||
},
|
||||
// 消息标题
|
||||
{ label: $t('title'), prop: 'title', width: 150 },
|
||||
{ label: $t('title'), prop: 'title', minWidth: 150 },
|
||||
// 消息简介
|
||||
{ label: $t('summary'), prop: 'summary', width: 200 },
|
||||
{ label: $t('summary'), prop: 'summary', minWidth: 200 },
|
||||
// 发送人昵称
|
||||
{
|
||||
label: $t('sendNickname'),
|
||||
prop: 'sendNickname',
|
||||
slot: 'sendNickname',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
// 接受人昵称
|
||||
{
|
||||
label: $t('receivedUserNickname'),
|
||||
prop: 'receivedUserNickname',
|
||||
slot: 'receivedUserNickname',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
},
|
||||
// 消息类型
|
||||
{
|
||||
label: $t('messageType'),
|
||||
prop: 'messageType',
|
||||
slot: 'messageType',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
// 编辑器类型
|
||||
{
|
||||
label: $t('editorType'),
|
||||
prop: 'editorType',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
formatter({ editorType }) {
|
||||
return editorType === 'rich' ? <ElText type={'info'}>{editorType}</ElText> : <ElText type={'warning'}>{editorType}</ElText>;
|
||||
},
|
||||
},
|
||||
// 封面
|
||||
{ label: $t('cover'), prop: 'cover', slot: 'cover', width: 80 },
|
||||
{ label: $t('cover'), prop: 'cover', slot: 'cover', minWidth: 80 },
|
||||
// 消息等级
|
||||
{
|
||||
label: $t('level'),
|
||||
|
@ -59,10 +59,10 @@ export const columns: TableColumnList = [
|
|||
)
|
||||
);
|
||||
},
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
// 消息等级详情
|
||||
{ label: $t('extra'), prop: 'extra', slot: 'extra', width: 230 },
|
||||
{ label: $t('extra'), prop: 'extra', slot: 'extra', minWidth: 230 },
|
||||
// 0:未读 1:已读
|
||||
{
|
||||
label: $t('status'),
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { isReadStatus } from '@/enums/baseConstant';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useMessageSendStore } from '@/store/message/messageSend';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { messageLevel } from '@/views/message-manger/message-editing/utils';
|
||||
import { auth, columns, deleteIds, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/message-manger/message-send/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
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';
|
||||
|
||||
defineOptions({ name: 'MessageSender' });
|
||||
|
||||
|
|
|
@ -12,33 +12,33 @@ export const columns: TableColumnList = [
|
|||
width: 60,
|
||||
},
|
||||
// 消息标题
|
||||
{ label: $t('title'), prop: 'title', width: 150 },
|
||||
{ label: $t('title'), prop: 'title', minWidth: 150 },
|
||||
// 消息简介
|
||||
{ label: $t('summary'), prop: 'summary', width: 200 },
|
||||
{ label: $t('summary'), prop: 'summary', minWidth: 200 },
|
||||
// 发送人昵称
|
||||
{
|
||||
label: $t('sendNickname'),
|
||||
prop: 'sendNickname',
|
||||
slot: 'sendNickname',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
// 接受人昵称
|
||||
{
|
||||
label: $t('receivedUserNickname'),
|
||||
prop: 'receivedUserNickname',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
},
|
||||
// 消息类型
|
||||
{
|
||||
label: $t('messageType'),
|
||||
prop: 'messageType',
|
||||
slot: 'messageType',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
// 编辑器类型
|
||||
{ label: $t('editorType'), prop: 'editorType', width: 105 },
|
||||
{ label: $t('editorType'), prop: 'editorType', minWidth: 105 },
|
||||
// 封面
|
||||
{ label: $t('cover'), prop: 'cover', slot: 'cover', width: 80 },
|
||||
{ label: $t('cover'), prop: 'cover', slot: 'cover', minWidth: 80 },
|
||||
// 消息等级
|
||||
{
|
||||
label: $t('level'),
|
||||
|
@ -52,33 +52,33 @@ export const columns: TableColumnList = [
|
|||
)
|
||||
);
|
||||
},
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
// 消息等级详情
|
||||
{ label: $t('extra'), prop: 'extra', slot: 'extra', width: 230 },
|
||||
{ label: $t('extra'), prop: 'extra', slot: 'extra', minWidth: 230 },
|
||||
{
|
||||
label: $t('table.updateTime'),
|
||||
prop: 'updateTime',
|
||||
sortable: true,
|
||||
width: 160,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
label: $t('table.createTime'),
|
||||
prop: 'createTime',
|
||||
sortable: true,
|
||||
width: 160,
|
||||
minWidth: 160,
|
||||
},
|
||||
{
|
||||
label: $t('table.createUser'),
|
||||
prop: 'createUser',
|
||||
slot: 'createUser',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
label: $t('table.updateUser'),
|
||||
prop: 'updateUser',
|
||||
slot: 'updateUser',
|
||||
width: 130,
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
label: $t('table.operation'),
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { enabledOrNotStatus } from '@/enums/baseConstant';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
import { auth, columns, deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/message-manger/message-type/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~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/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';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'MessageType' });
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { auth, columns, deleteIds, onDelete, onDeleteBatch, onSearch, onView, state } from '@/views/monitor/scheduler-execute-log/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useQuartzExecuteLogStore } from '@/store/monitor/quartzExecuteLog';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { auth, columns, deleteIds, onDelete, onDeleteBatch, onSearch, onView, state } from '@/views/monitor/scheduler-execute-log/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import View from '~icons/ep/view';
|
||||
import { onMounted, ref } from 'vue';
|
||||
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';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import View from '~icons/ep/view';
|
||||
|
||||
defineOptions({ name: 'SchedulerExecuteLog' });
|
||||
|
||||
|
|
|
@ -11,14 +11,14 @@ export const columns: TableColumnList = [
|
|||
width: 60,
|
||||
},
|
||||
// 任务名称
|
||||
{ label: $t('quartzExecuteLog_jobName'), prop: 'jobName', width: 100 },
|
||||
{ label: $t('quartzExecuteLog_jobName'), prop: 'jobName', minWidth: 100 },
|
||||
// 任务分组
|
||||
{ label: $t('quartzExecuteLog_jobGroup'), prop: 'jobGroup', width: 100 },
|
||||
{ label: $t('quartzExecuteLog_jobGroup'), prop: 'jobGroup', minWidth: 100 },
|
||||
// 执行任务类名
|
||||
{
|
||||
label: $t('quartzExecuteLog_jobClassName'),
|
||||
prop: 'jobClassName',
|
||||
width: 300,
|
||||
minWidth: 300,
|
||||
},
|
||||
// 执行任务core表达式
|
||||
{
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { auth, columns, deleteIds, onDelete, onDeleteBatch, onSearch, onView } from '@/views/monitor/user-login-log/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import View from '~icons/ep/view';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
||||
import { auth, columns, deleteIds, onDelete, onDeleteBatch, onSearch, onView } from '@/views/monitor/user-login-log/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import View from '~icons/ep/view';
|
||||
|
||||
defineOptions({ name: 'UserLoginLog' });
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ export const columns: TableColumnList = [
|
|||
width: 60,
|
||||
},
|
||||
// 用户名
|
||||
{ label: $t('userLoginLog_username'), prop: 'username', width: 180 },
|
||||
{ label: $t('userLoginLog_username'), prop: 'username', minWidth: 180 },
|
||||
// 登录Ip
|
||||
{ label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', width: 130 },
|
||||
{ label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', minWidth: 130 },
|
||||
// 登录Ip归属地
|
||||
{ label: $t('userLoginLog_ipRegion'), prop: 'ipRegion', width: 160 },
|
||||
{ label: $t('userLoginLog_ipRegion'), prop: 'ipRegion', minWidth: 160 },
|
||||
// 登录时代理
|
||||
{ label: $t('userLoginLog_userAgent'), prop: 'userAgent', width: 200 },
|
||||
{ label: $t('userLoginLog_userAgent'), prop: 'userAgent', minWidth: 200 },
|
||||
// 操作类型
|
||||
{ label: $t('userLoginLog_type'), prop: 'type', width: 130 },
|
||||
// 标识客户端是否是通过Ajax发送请求的
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
||||
import { auth, columns, deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/scheduler/schedulers-group/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~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/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'SchedulerGroup' });
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useSchedulersStore } from '@/store/scheduler/schedulers';
|
||||
import { auth, columns, onAdd, onDelete, onPause, onResume, onSearch, onUpdate } from '@/views/scheduler/schedulers/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~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/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'SchedulerTask' });
|
||||
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Airplane from '@/assets/svg/airplane.svg';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { sexConstant, tableSelectButtonClass, UserAvatar, userStatus } from '@/enums/baseConstant';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useAdminUserStore } from '@/store/system/adminUser';
|
||||
import { useDeptStore } from '@/store/system/dept';
|
||||
import { usePublicHooks } from '@/views/hooks';
|
||||
import Tree from '@/views/system/admin-user/components/tree.vue';
|
||||
import {
|
||||
auth,
|
||||
columns,
|
||||
|
@ -18,29 +29,18 @@ import {
|
|||
switchLoadMap,
|
||||
updateUserStatus,
|
||||
} from '@/views/system/admin-user/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { deviceDetection } from '@pureadmin/utils';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import More from '~icons/ep/more-filled';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import Upload from '~icons/ri/upload-line';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import Role from '~icons/ri/admin-line';
|
||||
import Password from '~icons/ri/lock-password-line';
|
||||
import More from '~icons/ep/more-filled';
|
||||
import { useAdminUserStore } from '@/store/system/adminUser';
|
||||
import { sexConstant, tableSelectButtonClass, UserAvatar, userStatus } from '@/enums/baseConstant';
|
||||
import { deviceDetection } from '@pureadmin/utils';
|
||||
import Tree from '@/views/system/admin-user/components/tree.vue';
|
||||
import Airplane from '@/assets/svg/airplane.svg';
|
||||
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';
|
||||
import Upload from '~icons/ri/upload-line';
|
||||
|
||||
defineOptions({ name: 'AdminUserManger' });
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ export const columns: TableColumnList = [
|
|||
{ type: 'selection', align: 'left' },
|
||||
{ type: 'index', index: (index: number) => index + 1, label: $t('index'), width: 60 },
|
||||
// 用户名
|
||||
{ label: $t('adminUser_username'), prop: 'username', width: 260 },
|
||||
{ label: $t('adminUser_username'), prop: 'username' },
|
||||
// 状态
|
||||
{ label: $t('adminUser_status'), prop: 'status', slot: 'status', width: 100 },
|
||||
// 昵称
|
||||
|
@ -34,7 +34,7 @@ export const columns: TableColumnList = [
|
|||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
||||
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 130 },
|
||||
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 130 },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 210, slot: 'operation' },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 220, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
|
|
|
@ -9,7 +9,7 @@ import { isAddUserinfo } from '@/views/system/admin-user/utils/columns';
|
|||
import ResetPasswordDialog from '@/components/Table/ResetPasswords.vue';
|
||||
import { deviceDetection, handleTree } from '@pureadmin/utils';
|
||||
import CropperPreview from '@/components/ReCropperPreview';
|
||||
import AssignUserToRole from '@/views/system/admin-user/components/assign-roles-to-user.vue';
|
||||
import RolesToUser from '@/views/system/admin-user/components/roles-to-user.vue';
|
||||
import { useUserStore } from '@/store/system/user';
|
||||
import { useDeptStore } from '@/store/system/dept';
|
||||
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||
|
@ -262,7 +262,7 @@ export const onAssignRolesToUser = (row: any) => {
|
|||
draggable: true,
|
||||
closeOnClickModal: false,
|
||||
fullscreenIcon: true,
|
||||
contentRenderer: () => <AssignUserToRole ref={assignRolesRef} userId={row.id} />,
|
||||
contentRenderer: () => <RolesToUser ref={assignRolesRef} userId={row.id} />,
|
||||
beforeSure: async (done: any) => {
|
||||
// 分配用户角色
|
||||
const data = { userId: row.id, roleIds: assignRolesRef.value.assignRoles };
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useDeptStore } from '@/store/system/dept';
|
||||
import { handleTree } from '@/utils/tree';
|
||||
import { auth, columns, deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/system/dept/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useDeptStore } from '@/store/system/dept';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { handleTree } from '@/utils/tree';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'DeptManger' });
|
||||
const tableRef = ref();
|
||||
|
|
|
@ -8,9 +8,9 @@ export const columns: TableColumnList = [
|
|||
// 部门名称
|
||||
{ label: $t('dept_deptName'), prop: 'deptName', width: 200 },
|
||||
// 管理者
|
||||
{ label: $t('dept_manager'), prop: 'manager', width: 220 },
|
||||
{ label: $t('dept_manager'), prop: 'manager' },
|
||||
// 部门简介
|
||||
{ label: $t('dept_summary'), prop: 'summary', width: 360 },
|
||||
{ label: $t('dept_summary'), prop: 'summary' },
|
||||
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
|
||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
||||
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 130 },
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useFilesStore } from '@/store/monitor/files';
|
||||
import { auth, columns, onAdd, onDelete, onDeleteBatch, onDownload, onDownloadBatch, onSearch, onUpdate, selectRows } from '@/views/system/files/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Download from '~icons/ep/download';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useFilesStore } from '@/store/monitor/files';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
|
||||
defineOptions({ name: 'FileManger' });
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ export const columns: TableColumnList = [
|
|||
// 文件的名称
|
||||
{ label: $t('files_filename'), prop: 'filename', width: 280 },
|
||||
// 文件在服务器上的存储路径
|
||||
{ label: $t('files_filepath'), prop: 'filepath', width: 280 },
|
||||
{ label: $t('files_filepath'), prop: 'filepath' },
|
||||
// 文件的MIME类型
|
||||
{ label: $t('files_fileType'), prop: 'fileType', width: 180 },
|
||||
// 下载数量
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { userMenuStore } from '@/store/system/menu';
|
||||
import { auth, clearAllRolesSelect, columns, mergeArgs, onAdd, onDelete, onSearch, onUpdate, selectIds, tableRef } from '@/views/system/menu/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import { auth, clearAllRolesSelect, columns, mergeArgs, onAdd, onDelete, onSearch, onUpdate, selectIds, tableRef } from '@/views/system/menu/utils';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { userMenuStore } from '@/store/system/menu';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
|
||||
defineOptions({ name: 'MenuManger' });
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, h, onMounted, ref } from 'vue';
|
||||
import { auth, columns, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate, onUpdateBatchParent, powerIds } from '@/views/system/permission/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { usePermissionStore } from '@/store/system/power';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { RequestMethod } from '@/enums/baseConstant';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { usePermissionStore } from '@/store/system/power';
|
||||
import { auth, columns, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate, onUpdateBatchParent, powerIds } from '@/views/system/permission/utils';
|
||||
import FileUploadDialog from '@/views/system/role/components/file-upload-dialog.vue';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { handleTree } from '@pureadmin/utils';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { RequestMethod } from '@/enums/baseConstant';
|
||||
import { computed, h, onMounted, ref } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Download from '~icons/ep/download';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import Upload from '~icons/ri/upload-line';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import FileUpdateRoleDialog from '@/views/system/role/components/file-update-role-dialog.vue';
|
||||
|
||||
defineOptions({ name: 'PermissionManger' });
|
||||
|
||||
|
@ -68,7 +68,7 @@ const uploadPermission = async (type: string) => {
|
|||
draggable: true,
|
||||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(FileUpdateRoleDialog, { ref: formRef }),
|
||||
contentRenderer: () => h(FileUploadDialog, { ref: formRef }),
|
||||
beforeSure: (done, { options }) => {
|
||||
const form = options.props.form;
|
||||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { reactive } from 'vue';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import type { FormRules } from 'element-plus';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
// 表格列
|
||||
export const columns: TableColumnList = [
|
||||
|
@ -11,7 +11,7 @@ export const columns: TableColumnList = [
|
|||
// 权限名称
|
||||
{ label: $t('power_powerName'), prop: 'powerName', width: 220 },
|
||||
// 请求路径
|
||||
{ label: $t('power_requestUrl'), prop: 'requestUrl', width: 360, align: 'left' },
|
||||
{ label: $t('power_requestUrl'), prop: 'requestUrl', align: 'left' },
|
||||
{ label: $t('requestMethod'), prop: 'requestMethod', width: 90 },
|
||||
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
|
||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
||||
|
|
|
@ -72,7 +72,7 @@ onMounted(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="powerTreeIsShow" class="!min-w-[calc(100vw-60vw-268px)] w-full mt-2 px-2 pb-2 bg-bg_color ml-2 overflow-auto">
|
||||
<div v-if="powerTreeIsShow" class="min-w-[calc(100vw-60vw-268px)]! w-full mt-2 px-2 pb-2 bg-bg_color ml-2 overflow-auto">
|
||||
<div class="flex justify-between w-full px-3 pt-5 pb-4">
|
||||
<div class="flex">
|
||||
<span :class="iconClass">
|
|
@ -22,10 +22,10 @@ defineExpose({ formRef });
|
|||
<template>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="auto">
|
||||
<el-form-item :label="$t('role_roleCode')" prop="roleCode">
|
||||
<el-input v-model="form.roleCode" autocomplete="off" type="text" />
|
||||
<el-input v-model="form.roleCode" autocomplete="off" clearable type="text" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('role_description')" prop="description">
|
||||
<el-input v-model="form.description" autocomplete="off" type="text" />
|
||||
<el-input v-model="form.description" autocomplete="off" clearable type="text" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<script lang="ts" setup>
|
||||
import { h, onMounted } from 'vue';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { PureTableBar } from '@/components/RePureTableBar';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import { useRoleStore } from '@/store/system/role';
|
||||
import FileUploadDialog from '@/views/system/role/components/file-upload-dialog.vue';
|
||||
import {
|
||||
auth,
|
||||
columns,
|
||||
|
@ -15,26 +22,18 @@ import {
|
|||
powerTreeIsShow,
|
||||
tableRef,
|
||||
} from '@/views/system/role/utils';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useRoleStore } from '@/store/system/role';
|
||||
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
||||
import { deviceDetection } from '@pureadmin/utils';
|
||||
import Menu from '~icons/ep/menu';
|
||||
import AssignPowersToRole from '@/views/system/role/components/assign-powers-to-role.vue';
|
||||
import { hasAuth } from '@/router/utils';
|
||||
import ReAuth from '@/components/ReAuth/src/auth';
|
||||
import Download from '~icons/ep/download';
|
||||
import Upload from '~icons/ri/upload-line';
|
||||
import { addDialog } from '@/components/ReDialog/index';
|
||||
import FileUpdateRoleDialog from '@/views/system/role/components/file-update-role-dialog.vue';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { h, onMounted } from 'vue';
|
||||
import Delete from '~icons/ep/delete';
|
||||
import Download from '~icons/ep/download';
|
||||
import EditPen from '~icons/ep/edit-pen';
|
||||
import Menu from '~icons/ep/menu';
|
||||
import Refresh from '~icons/ep/refresh';
|
||||
import AddFill from '~icons/ri/add-circle-line';
|
||||
import Upload from '~icons/ri/upload-line';
|
||||
import PowersToRole from '@/views/system/role/components/powers-to-role.vue';
|
||||
|
||||
defineOptions({ name: 'RoleManger' });
|
||||
|
||||
|
@ -78,7 +77,7 @@ const onUpdateByFile = () => {
|
|||
draggable: true,
|
||||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(FileUpdateRoleDialog, { ref: formRef }),
|
||||
contentRenderer: () => h(FileUploadDialog, { ref: formRef }),
|
||||
beforeSure: (done, { options }) => {
|
||||
const form = options.props.form;
|
||||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
|
@ -103,7 +102,7 @@ onMounted(() => {
|
|||
<template>
|
||||
<div class="main">
|
||||
<ReAuth :value="auth.query">
|
||||
<el-form ref="formRef" :inline="true" :model="roleStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||
<el-form ref="formRef" :inline="true" :model="roleStore.form" class="search-form bg-bg_color w-full pl-8 pt-[12px] overflow-auto">
|
||||
<el-form-item :label="$t('role_roleCode')" prop="roleCode">
|
||||
<el-input v-model="roleStore.form.roleCode" :placeholder="`${$t('input')}${$t('role_roleCode')}`" class="!w-[180px]" clearable />
|
||||
</el-form-item>
|
||||
|
@ -121,10 +120,10 @@ onMounted(() => {
|
|||
|
||||
<div ref="contentRef" :class="['flex', deviceDetection() ? 'flex-wrap' : '']">
|
||||
<PureTableBar
|
||||
:class="[powerTreeIsShow && !deviceDetection() ? '!w-[60vw]' : 'w-full']"
|
||||
:class="[powerTreeIsShow && !deviceDetection() ? 'w-[60vw]!' : 'w-full']"
|
||||
:columns="columns"
|
||||
:title="$t('role')"
|
||||
style="transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1)"
|
||||
style="transition: width 330ms cubic-bezier(0.4, 0, 0.2, 1)"
|
||||
@fullscreen="tableRef.setAdaptive()"
|
||||
@refresh="onSearch"
|
||||
>
|
||||
|
@ -169,17 +168,6 @@ onMounted(() => {
|
|||
@page-current-change="onCurrentPageChange"
|
||||
@selection-change="onSelectionChange"
|
||||
>
|
||||
<template #createUser="{ row }">
|
||||
<el-button v-show="row.createUser" link type="primary" @click="selectUserinfo(row.createUser)">
|
||||
{{ row.createUsername }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<template #updateUser="{ row }">
|
||||
<el-button v-show="row.updateUser" link type="primary" @click="selectUserinfo(row.updateUser)">
|
||||
{{ row.updateUsername }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<!-- 修改 -->
|
||||
<el-button
|
||||
|
@ -220,7 +208,7 @@ onMounted(() => {
|
|||
</PureTableBar>
|
||||
|
||||
<!-- 为角色分配角色 -->
|
||||
<assign-powers-to-role />
|
||||
<powers-to-role />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
import { $t } from '@/plugins/i18n';
|
||||
import { computed, reactive } from 'vue';
|
||||
|
||||
// 表格列
|
||||
export const columns: TableColumnList = [
|
||||
{ type: 'selection', align: 'left' },
|
||||
{ type: 'index', index: (index: number) => index + 1, label: $t('index'), width: 60 },
|
||||
// 角色代码
|
||||
{ label: $t('role_roleCode'), prop: 'roleCode' },
|
||||
// 描述
|
||||
{ label: $t('role_description'), prop: 'description' },
|
||||
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true },
|
||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true },
|
||||
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 130 },
|
||||
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 130 },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 240, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
export const rules = reactive({
|
||||
// 角色代码
|
||||
roleCode: [{ required: true, message: `${$t('input')}${$t('role_roleCode')}`, trigger: 'blur' }],
|
||||
// 描述
|
||||
description: [{ required: true, message: `${$t('input')}${$t('role_description')}`, trigger: 'blur' }],
|
||||
});
|
||||
|
||||
// 权限显示图标类名
|
||||
export const iconClass = computed(() => [
|
||||
'w-[22px]',
|
||||
'h-[22px]',
|
||||
'flex',
|
||||
'justify-center',
|
||||
'items-center',
|
||||
'outline-none',
|
||||
'rounded-[4px]',
|
||||
'cursor-pointer',
|
||||
'transition-colors',
|
||||
'hover:bg-[#0000000f]',
|
||||
'dark:hover:bg-[#ffffff1f]',
|
||||
'dark:hover:text-[#ffffffd9]',
|
||||
]);
|
|
@ -0,0 +1,70 @@
|
|||
import { $t } from '@/plugins/i18n';
|
||||
import { computed, reactive } from 'vue';
|
||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||
|
||||
// 表格列
|
||||
export const columns: TableColumnList = [
|
||||
{ type: 'selection', align: 'left' },
|
||||
{ type: 'index', index: (index: number) => index + 1, label: $t('index'), width: 60 },
|
||||
// 角色代码
|
||||
{ label: $t('role_roleCode'), prop: 'roleCode' },
|
||||
// 描述
|
||||
{ label: $t('role_description'), prop: 'description' },
|
||||
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true },
|
||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true },
|
||||
{
|
||||
label: $t('table.createUser'),
|
||||
prop: 'createUser',
|
||||
cellRenderer({ row }) {
|
||||
return (
|
||||
row.createUser && (
|
||||
<el-button link type="primary" onClick={() => selectUserinfo(row.createUser)}>
|
||||
{row.createUsername}
|
||||
</el-button>
|
||||
)
|
||||
);
|
||||
},
|
||||
width: 130,
|
||||
},
|
||||
{
|
||||
label: $t('table.updateUser'),
|
||||
prop: 'updateUser',
|
||||
cellRenderer({ row }) {
|
||||
return (
|
||||
row.updateUser && (
|
||||
<el-button link type="primary" onClick={() => selectUserinfo(row.updateUser)}>
|
||||
{row.updateUsername}
|
||||
</el-button>
|
||||
)
|
||||
);
|
||||
},
|
||||
width: 130,
|
||||
},
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 240, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
export const rules = reactive({
|
||||
// 角色代码
|
||||
roleCode: [{ required: true, message: `${$t('input')}${$t('role_roleCode')}`, trigger: 'blur' }],
|
||||
// 描述
|
||||
description: [{ required: true, message: `${$t('input')}${$t('role_description')}`, trigger: 'blur' }],
|
||||
});
|
||||
|
||||
// 权限显示图标类名
|
||||
export const iconClass = computed(() => {
|
||||
return [
|
||||
'w-[22px]',
|
||||
'h-[22px]',
|
||||
'flex',
|
||||
'justify-center',
|
||||
'items-center',
|
||||
'outline-hidden',
|
||||
'rounded-[4px]',
|
||||
'cursor-pointer',
|
||||
'transition-colors',
|
||||
'hover:bg-[#0000000f]',
|
||||
'dark:hover:bg-[#ffffff1f]',
|
||||
'dark:hover:text-[#ffffffd9]',
|
||||
];
|
||||
});
|
|
@ -6,7 +6,6 @@ import { messageBox } from '@/utils/message';
|
|||
import type { FormItemProps } from '@/views/system/role/utils/types';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { getPowerListByRoleId } from '@/api/v1/system/power';
|
||||
import { isAllEmpty } from '@pureadmin/utils';
|
||||
|
||||
// 表格ref
|
||||
export const tableRef = ref();
|
||||
|
@ -40,7 +39,7 @@ export function onAdd() {
|
|||
draggable: true,
|
||||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(RoleDialog, { ref: formRef }),
|
||||
contentRenderer: () => h(RoleDialog, { ref: formRef, formInline: { roleCode: undefined, description: undefined } }),
|
||||
beforeSure: (done, { options }) => {
|
||||
const form = options.props.formInline as FormItemProps;
|
||||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
|
@ -64,7 +63,7 @@ export function onUpdate(row: any) {
|
|||
draggable: true,
|
||||
fullscreenIcon: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(RoleDialog, { ref: formRef }),
|
||||
contentRenderer: () => h(RoleDialog, { ref: formRef, formInline: { roleCode: row.roleCode, description: row.description } }),
|
||||
beforeSure: (done, { options }) => {
|
||||
const form = options.props.formInline as FormItemProps;
|
||||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
|
@ -118,12 +117,13 @@ export const onDeleteBatch = async () => {
|
|||
export const onMenuPowerClick = async (row: any) => {
|
||||
const { id } = row;
|
||||
|
||||
if (isAllEmpty(id)) {
|
||||
if (!id) {
|
||||
currentRow.value = null;
|
||||
powerTreeIsShow.value = false;
|
||||
} else {
|
||||
currentRow.value = row;
|
||||
powerTreeIsShow.value = true;
|
||||
|
||||
const { data } = await getPowerListByRoleId({ id });
|
||||
powerTreeRef.value.setCheckedKeys(data);
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"moduleResolution": "node",
|
||||
"strict": false,
|
||||
"strictFunctionTypes": false,
|
||||
"noImplicitThis": true,
|
||||
|
@ -18,38 +18,13 @@
|
|||
"baseUrl": ".",
|
||||
"allowJs": false,
|
||||
"resolveJsonModule": true,
|
||||
"lib": [
|
||||
"ESNext",
|
||||
"DOM"
|
||||
],
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
"@build/*": [
|
||||
"build/*"
|
||||
]
|
||||
"@/*": ["src/*"],
|
||||
"@build/*": ["build/*"]
|
||||
},
|
||||
"types": [
|
||||
"node",
|
||||
"vite/client",
|
||||
"element-plus/global",
|
||||
"@pureadmin/table/volar",
|
||||
"unplugin-icons/types/vue",
|
||||
"@pureadmin/descriptions/volar"
|
||||
]
|
||||
"types": ["node", "vite/client", "element-plus/global", "@pureadmin/table/volar", "unplugin-icons/types/vue", "@pureadmin/descriptions/volar"]
|
||||
},
|
||||
"include": [
|
||||
"mock/*.ts",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"types/*.d.ts",
|
||||
"vite.config.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"dist",
|
||||
"**/*.js",
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
"include": ["mock/*.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "types/*.d.ts", "vite.config.ts"],
|
||||
"exclude": ["dist", "**/*.js", "node_modules"]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getPluginsList } from './build/plugins';
|
||||
import { exclude, include } from './build/optimize';
|
||||
import { type ConfigEnv, loadEnv, type UserConfigExport } from 'vite';
|
||||
import { exclude, include } from './build/optimize';
|
||||
import { getPluginsList } from './build/plugins';
|
||||
import { __APP_INFO__, alias, pathResolve, root, wrapperEnv } from './build/utils';
|
||||
|
||||
export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
|
@ -33,7 +33,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
|||
clientFiles: ['./index.html', './src/{views,components}/*'],
|
||||
},
|
||||
},
|
||||
plugins: getPluginsList(VITE_CDN, VITE_COMPRESSION),
|
||||
plugins: getPluginsList(VITE_CDN, VITE_COMPRESSION, VITE_PORT),
|
||||
// https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options
|
||||
optimizeDeps: {
|
||||
include,
|
||||
|
|
Loading…
Reference in New Issue