Browse Source

2023年2月13日 17点12分

shaojie32 2 years ago
parent
commit
6ab5496b70
100 changed files with 0 additions and 13091 deletions
  1. 0 11
      nextadmin_vue3/.env
  2. 0 6
      nextadmin_vue3/.env.development
  3. 0 5
      nextadmin_vue3/.env.production
  4. 0 6
      nextadmin_vue3/.env.test
  5. 0 31
      nextadmin_vue3/index.html
  6. 0 84
      nextadmin_vue3/package.json
  7. 0 3
      nextadmin_vue3/plugins.d.ts
  8. 0 13
      nextadmin_vue3/shim.d.ts
  9. 0 6
      nextadmin_vue3/source.d.ts
  10. 0 92
      nextadmin_vue3/src/App.vue
  11. 0 80
      nextadmin_vue3/src/api/Company.ts
  12. 0 36
      nextadmin_vue3/src/api/Protocol.ts
  13. 0 59
      nextadmin_vue3/src/api/Urls.ts
  14. 0 63
      nextadmin_vue3/src/api/User.ts
  15. 0 31
      nextadmin_vue3/src/api/menu/index.ts
  16. 0 27
      nextadmin_vue3/src/components/auth/auth.vue
  17. 0 28
      nextadmin_vue3/src/components/auth/authAll.vue
  18. 0 33
      nextadmin_vue3/src/components/auth/auths.vue
  19. 0 148
      nextadmin_vue3/src/components/cropper/index.vue
  20. 0 79
      nextadmin_vue3/src/components/editor/index.vue
  21. 0 242
      nextadmin_vue3/src/components/iconSelector/index.vue
  22. 0 194
      nextadmin_vue3/src/components/noticeBar/index.vue
  23. 0 41
      nextadmin_vue3/src/components/svgIcon/index.vue
  24. 0 27
      nextadmin_vue3/src/config.ts
  25. 0 55
      nextadmin_vue3/src/i18n/index.ts
  26. 0 157
      nextadmin_vue3/src/layout/component/aside.vue
  27. 0 294
      nextadmin_vue3/src/layout/component/columnsAside.vue
  28. 0 32
      nextadmin_vue3/src/layout/component/header.vue
  29. 0 84
      nextadmin_vue3/src/layout/component/main.vue
  30. 0 46
      nextadmin_vue3/src/layout/footer/index.vue
  31. 0 56
      nextadmin_vue3/src/layout/index.vue
  32. 0 370
      nextadmin_vue3/src/layout/lockScreen/index.vue
  33. 0 36
      nextadmin_vue3/src/layout/main/classic.vue
  34. 0 38
      nextadmin_vue3/src/layout/main/columns.vue
  35. 0 44
      nextadmin_vue3/src/layout/main/defaults.vue
  36. 0 16
      nextadmin_vue3/src/layout/main/transverse.vue
  37. 0 152
      nextadmin_vue3/src/layout/navBars/breadcrumb/breadcrumb.vue
  38. 0 63
      nextadmin_vue3/src/layout/navBars/breadcrumb/closeFull.vue
  39. 0 115
      nextadmin_vue3/src/layout/navBars/breadcrumb/index.vue
  40. 0 134
      nextadmin_vue3/src/layout/navBars/breadcrumb/search.vue
  41. 0 295
      nextadmin_vue3/src/layout/navBars/breadcrumb/user.vue
  42. 0 114
      nextadmin_vue3/src/layout/navBars/breadcrumb/userNews.vue
  43. 0 37
      nextadmin_vue3/src/layout/navBars/index.vue
  44. 0 137
      nextadmin_vue3/src/layout/navBars/tagsView/contextmenu.vue
  45. 0 681
      nextadmin_vue3/src/layout/navBars/tagsView/tagsView.vue
  46. 0 151
      nextadmin_vue3/src/layout/navMenu/horizontal.vue
  47. 0 98
      nextadmin_vue3/src/layout/navMenu/vertical.vue
  48. 0 60
      nextadmin_vue3/src/layout/routerView/iframes.vue
  49. 0 59
      nextadmin_vue3/src/layout/routerView/link.vue
  50. 0 83
      nextadmin_vue3/src/layout/routerView/parent.vue
  51. 0 102
      nextadmin_vue3/src/router/backEnd.ts
  52. 0 24
      nextadmin_vue3/src/router/frontEnd.ts
  53. 0 232
      nextadmin_vue3/src/router/index.ts
  54. 0 1180
      nextadmin_vue3/src/router/route.bak.ts
  55. 0 88
      nextadmin_vue3/src/router/route.ts
  56. 0 27
      nextadmin_vue3/src/store/index.ts
  57. 0 23
      nextadmin_vue3/src/store/modules/keepAliveNames.ts
  58. 0 23
      nextadmin_vue3/src/store/modules/requestOldRoutes.ts
  59. 0 41
      nextadmin_vue3/src/store/modules/routesList.ts
  60. 0 34
      nextadmin_vue3/src/store/modules/tagsViewRoutes.ts
  61. 0 34
      nextadmin_vue3/src/store/modules/userInfos.ts
  62. 0 227
      nextadmin_vue3/src/theme/element.scss
  63. 0 70
      nextadmin_vue3/src/theme/iconSelector.scss
  64. 0 16
      nextadmin_vue3/src/theme/media/form.scss
  65. 0 63
      nextadmin_vue3/src/theme/media/login.scss
  66. 0 28
      nextadmin_vue3/src/theme/other.scss
  67. 0 570
      nextadmin_vue3/src/theme/yckj-common.scss
  68. 0 41
      nextadmin_vue3/src/utils/arrayOperation.ts
  69. 0 42
      nextadmin_vue3/src/utils/loading.ts
  70. 0 134
      nextadmin_vue3/src/utils/other.ts
  71. 0 59
      nextadmin_vue3/src/utils/theme.ts
  72. 0 36
      nextadmin_vue3/src/utils/viteBuild.ts
  73. 0 158
      nextadmin_vue3/src/views/company/component/account.vue
  74. 0 272
      nextadmin_vue3/src/views/company/component/accountEdit.vue
  75. 0 387
      nextadmin_vue3/src/views/company/component/edit.vue
  76. 0 158
      nextadmin_vue3/src/views/company/component/photo.vue
  77. 0 188
      nextadmin_vue3/src/views/company/index.vue
  78. 0 19
      nextadmin_vue3/src/views/home/index.vue
  79. 0 219
      nextadmin_vue3/src/views/login/component/account.vue
  80. 0 58
      nextadmin_vue3/src/views/login/component/scan.vue
  81. 0 194
      nextadmin_vue3/src/views/login/index.vue
  82. 0 201
      nextadmin_vue3/src/views/protocol/component/edit.vue
  83. 0 140
      nextadmin_vue3/src/views/protocol/index.vue
  84. 0 173
      nextadmin_vue3/src/views/system/dept/component/addDept.vue
  85. 0 179
      nextadmin_vue3/src/views/system/dept/component/editDept.vue
  86. 0 163
      nextadmin_vue3/src/views/system/dept/index.vue
  87. 0 128
      nextadmin_vue3/src/views/system/dic/component/addDic.vue
  88. 0 162
      nextadmin_vue3/src/views/system/dic/component/editDic.vue
  89. 0 159
      nextadmin_vue3/src/views/system/dic/index.vue
  90. 0 227
      nextadmin_vue3/src/views/system/menu/component/addMenu.vue
  91. 0 230
      nextadmin_vue3/src/views/system/menu/component/editMenu.vue
  92. 0 111
      nextadmin_vue3/src/views/system/menu/index.vue
  93. 0 239
      nextadmin_vue3/src/views/system/role/component/addRole.vue
  94. 0 241
      nextadmin_vue3/src/views/system/role/component/editRole.vue
  95. 0 162
      nextadmin_vue3/src/views/system/role/index.vue
  96. 0 200
      nextadmin_vue3/src/views/system/user/component/addUser.vue
  97. 0 202
      nextadmin_vue3/src/views/system/user/component/editUser.vue
  98. 0 177
      nextadmin_vue3/src/views/system/user/index.vue
  99. 0 498
      nextadmin_vue3/src/views/tools/index.vue
  100. 0 0
      nextadmin_vue3/vite.config.ts

+ 0 - 11
nextadmin_vue3/.env

@@ -1,11 +0,0 @@
-# port 端口号
-VITE_PORT = 8000
-
-# open 运行 npm run dev 时自动打开浏览器
-VITE_OPEN = false
-
-
-# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
-
-VITE_PUBLIC_PATH = "/platform/"
-VITE_OUTPUT_DIR= "../api/public/platform"

+ 0 - 6
nextadmin_vue3/.env.development

@@ -1,6 +0,0 @@
-# 本地环境
-ENV = 'development'
-
-# 本地环境接口地址
-VITE_API_URL = http://local.lzj/office_kpi/api/public/index.php
-VITE_PUBLIC_PATH = /dev/

+ 0 - 5
nextadmin_vue3/.env.production

@@ -1,5 +0,0 @@
-# 线上环境
-ENV = 'production'
-
-# 线上环境接口地址
-VITE_API_URL = http://local.lzj/office_kpi/api/public/index.php

+ 0 - 6
nextadmin_vue3/.env.test

@@ -1,6 +0,0 @@
-# 测试环境
-ENV = 'production'
-
-# 线上环境接口地址
-VITE_OUTPUT_DIR= ../api/public/platform_test
-VITE_PUBLIC_PATH = "/office_kpi/api/public/platform_test/"

+ 0 - 31
nextadmin_vue3/index.html

@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh-CN">
-
-<head>
-	<meta charset="utf-8" />
-	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
-	<meta name="keywords"
-		content="vue-next-admin,vue-prev-admin,vue-admin-wonderful,后台管理系统一站式平台模板,希望可以帮你完成快速开发。vue2.x,vue2.0,vue2,vue3,vue3.x,vue3.0,CompositionAPI,typescript,element plus,element,plus,admin,wonderful,wonderful-next,vue-next-admin,vite,vite-admin,快速,高效,后台模板,后台系统,管理系统" />
-	<meta name="description"
-		content="vue-next-admin,基于 vue3 + CompositionAPI + typescript + vite + element plus,适配手机、平板、pc 的后台开源免费管理系统模板!vue-prev-admin,基于 vue2 +  element ui,适配手机、平板、pc 的后台开源免费管理系统模板!" />
-	<link rel="icon" href="/favicon.ico" />
-	<title>vue-next-admin</title>
-</head>
-
-<body>
-	<div id="app"></div>
-	<script type="text/javascript">
-		var _hmt = _hmt || [];
-		(function () {
-			var hm = document.createElement('script');
-			hm.src = 'https://hm.baidu.com/hm.js?d9c8b87d10717013641458b300c552e4';
-			var s = document.getElementsByTagName('script')[0];
-			s.parentNode.insertBefore(hm, s);
-		})();
-	</script>
-	<script type="module" src="/src/main.ts"></script>
-
-</body>
-
-</html>

+ 0 - 84
nextadmin_vue3/package.json

@@ -1,84 +0,0 @@
-{
-	"name": "office_kpi_platform",
-	"version": "2.0.0",
-	"description": "vue3 vite next admin template",
-	"author": "lyt_20201208",
-	"license": "MIT",
-	"scripts": {
-		"dev": "vite --force --mode development",
-		"build": "vite build",
-		"build:test": "set NODE_ENV=test && vite build --mode test ",
-		"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
-	},
-	"dependencies": {
-		"@element-plus/icons-vue": "^0.2.7",
-		"await-to-js": "^3.0.0",
-		"axios": "^0.26.0",
-		"countup.js": "^2.0.8",
-		"cropperjs": "^1.5.12",
-		"echarts": "^5.3.0",
-		"echarts-gl": "^2.0.8",
-		"echarts-wordcloud": "^2.0.0",
-		"element-plus": "^2.0.2",
-		"js-md5": "^0.7.3",
-		"jsplumb": "^2.15.6",
-		"mitt": "^3.0.0",
-		"nprogress": "^0.2.0",
-		"print-js": "^1.6.0",
-		"qrcodejs2-fixes": "^0.0.2",
-		"screenfull": "^6.0.1",
-		"sortablejs": "^1.14.0",
-		"splitpanes": "^3.0.6",
-		"vue": "^3.2.31",
-		"vue-clipboard3": "^1.0.1",
-		"vue-grid-layout": "^3.0.0-beta1",
-		"vue-i18n": "^9.1.9",
-		"vue-layer": "^1.2.5",
-		"vue-router": "^4.0.12",
-		"vuex": "^4.0.2",
-		"wangeditor": "^4.7.11"
-	},
-	"devDependencies": {
-		"@types/node": "^17.0.19",
-		"@types/nprogress": "^0.2.0",
-		"@types/sortablejs": "^1.10.7",
-		"@typescript-eslint/eslint-plugin": "^5.12.0",
-		"@typescript-eslint/parser": "^5.12.0",
-		"@vitejs/plugin-vue": "^2.2.2",
-		"@vue/compiler-sfc": "^3.2.31",
-		"dotenv": "^16.0.0",
-		"eslint": "^8.9.0",
-		"eslint-plugin-vue": "^8.4.1",
-		"prettier": "^2.5.1",
-		"sass": "^1.49.8",
-		"sass-loader": "^12.6.0",
-		"typescript": "^4.5.5",
-		"vite": "^2.8.4",
-		"vue-eslint-parser": "^8.2.0"
-	},
-	"browserslist": [
-		"> 1%",
-		"last 2 versions",
-		"not dead"
-	],
-	"bugs": {
-		"url": "https://gitee.com/lyt-top/vue-next-admin/issues"
-	},
-	"engines": {
-		"node": ">=12.0.0",
-		"npm": ">= 6.0.0"
-	},
-	"keywords": [
-		"vue",
-		"vue3",
-		"vuejs/vue-next",
-		"element-ui",
-		"element-plus",
-		"vue-next-admin",
-		"next-admin"
-	],
-	"repository": {
-		"type": "git",
-		"url": "https://gitee.com/lyt-top/vue-next-admin.git"
-	}
-}

+ 0 - 3
nextadmin_vue3/plugins.d.ts

@@ -1,3 +0,0 @@
-declare module 'vue-grid-layout';
-declare module 'qrcodejs2-fixes';
-declare module 'splitpanes';

+ 0 - 13
nextadmin_vue3/shim.d.ts

@@ -1,13 +0,0 @@
-/* eslint-disable */
-
-// 声明文件,*.vue 后缀的文件交给 vue 模块来处理
-declare module '*.vue' {
-	import type { DefineComponent } from 'vue';
-	const component: DefineComponent<{}, {}, any>;
-	export default component;
-}
-
-// 声明文件,定义全局变量。其它 app.config.globalProperties.xxx,使用 getCurrentInstance() 来获取
-interface Window {
-	nextLoading: boolean;
-}

+ 0 - 6
nextadmin_vue3/source.d.ts

@@ -1,6 +0,0 @@
-declare module '*.json';
-declare module '*.png';
-declare module '*.jpg';
-declare module '*.scss';
-declare module '*.ts';
-declare module '*.js';

+ 0 - 92
nextadmin_vue3/src/App.vue

@@ -1,92 +0,0 @@
-<template>
-	<el-config-provider :size="getGlobalComponentSize" :locale="i18nLocale">
-		<router-view v-show="getThemeConfig.lockScreenTime !== 0" />
-		<LockScreen v-if="getThemeConfig.isLockScreen" />
-		<Setings ref="setingsRef" v-show="getThemeConfig.lockScreenTime !== 0" />
-		<CloseFull />
-	</el-config-provider>
-</template>
-
-<script lang="ts">
-import { computed, ref, getCurrentInstance, onBeforeMount, onMounted, onUnmounted, nextTick, defineComponent, watch, reactive, toRefs } from 'vue';
-import { useRoute } from 'vue-router';
-import { useStore } from '/@/store/index';
-import other from '/@/utils/other';
-import { Local, Session } from '/@/utils/storage';
-import setIntroduction from '/@/utils/setIconfont';
-import LockScreen from '/@/layout/lockScreen/index.vue';
-import Setings from '/@/layout/navBars/breadcrumb/setings.vue';
-import CloseFull from '/@/layout/navBars/breadcrumb/closeFull.vue';
-export default defineComponent({
-	name: 'app',
-	components: { LockScreen, Setings, CloseFull },
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const setingsRef = ref();
-		const route = useRoute();
-		const store = useStore();
-		const state = reactive({
-			i18nLocale: null,
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 获取全局组件大小
-		const getGlobalComponentSize = computed(() => {
-			return other.globalComponentSize;
-		});
-		// 布局配置弹窗打开
-		const openSetingsDrawer = () => {
-			setingsRef.value.openDrawer();
-		};
-		// 设置初始化,防止刷新时恢复默认
-		onBeforeMount(() => {
-			// 设置批量第三方 icon 图标
-			setIntroduction.cssCdn();
-			// 设置批量第三方 js
-			setIntroduction.jsCdn();
-		});
-		// 页面加载时
-		onMounted(() => {
-			nextTick(() => {
-				// 监听布局配置弹窗点击打开
-				proxy.mittBus.on('openSetingsDrawer', () => {
-					openSetingsDrawer();
-				});
-				// 设置 i18n,App.vue 中的 el-config-provider
-				proxy.mittBus.on('getI18nConfig', (locale: string) => {
-					(state.i18nLocale as string | null) = locale;
-				});
-				// 获取缓存中的布局配置
-				if (Local.get('themeConfig')) {
-					store.dispatch('themeConfig/setThemeConfig', Local.get('themeConfig'));
-					document.documentElement.style.cssText = Local.get('themeConfigStyle');
-				}
-				// 获取缓存中的全屏配置
-				if (Session.get('isTagsViewCurrenFull')) {
-					store.dispatch('tagsViewRoutes/setCurrenFullscreen', Session.get('isTagsViewCurrenFull'));
-				}
-			});
-		});
-		// 页面销毁时,关闭监听布局配置/i18n监听
-		onUnmounted(() => {
-			proxy.mittBus.off('openSetingsDrawer', () => {});
-			proxy.mittBus.off('getI18nConfig', () => {});
-		});
-		// 监听路由的变化,设置网站标题
-		watch(
-			() => route.path,
-			() => {
-				other.useTitle();
-			}
-		);
-		return {
-			setingsRef,
-			getThemeConfig,
-			getGlobalComponentSize,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 80
nextadmin_vue3/src/api/Company.ts

@@ -1,80 +0,0 @@
-import Http from "../utils/net/Http";
-import Urls from "./Urls";
-const tagInfo = "[/src/api/Company.ts]:";
-/**
- * 企业模型
- */
-let Company = {
-	/**
-	 * 添加企业
-	 * @returns
-	 */
-	async add(param: object = {}): Promise<any> {
-		let url = Urls.company.addEnterPrise;
-		let res = await Http.post(url, param);
-		return res;
-	},
-	async edit(param: object = {}): Promise<any> {
-		let url = Urls.company.editEnterPrise;
-		let res = await Http.post(url, param);
-		return res;
-	},
-	/**
-	 * 获取企业列表
-	 * @returns
-	 */
-	async getEnterpriseList(keyword: string = "", page: number = 1, pageSize: number = 10): Promise<any> {
-		let url = Urls.company.getEnterprise;
-		let param = {
-			keyword,
-			page,
-			pageSize
-		};
-		let res = await Http.get(url, param);
-		return res;
-	},
-	/**
-	 * 获取企业详情
-	 * @param id 企业id
-	 * @returns
-	 */
-	async getEnterpriseDetail(id: number | string): Promise<any> {
-		let url = Urls.company.getEnterpriseDetail;
-		let param = {
-			enterprise_id: id
-		};
-		let res = await Http.get(url, param);
-		if (res.code != 0) {
-			return res;
-		}
-		let photoList: Array<any> = [];
-		if (res.data.enterprise.photo) {
-			//如果有相册
-			let photoListOrg = res.data.enterprise.photo.split(",");
-			//console.log(tagInfo, "photoListOrg", photoListOrg);
-			photoListOrg.forEach((item: string) => {
-				let obj = {
-					url: item
-				};
-				photoList.push(obj);
-			});
-		}
-		res.data.enterprise.photo_list = photoList;
-		//console.log(tagInfo, "getEnterpriseDetail res.data.enterprise.photo_list", res.data.enterprise, res.data.enterprise.photo_list);
-		return res;
-	},
-	/**
-	 * 删除企业
-	 * @param ids  	删除的企业id集合以逗号隔开
-	 * @returns
-	 */
-	async delEnterPrise(ids: Array<number | string>): Promise<any> {
-		let url = Urls.company.delEnterPrise;
-		let param = {
-			ids
-		};
-		let res = await Http.get(url, param);
-		return res;
-	}
-};
-export default Company;

+ 0 - 36
nextadmin_vue3/src/api/Protocol.ts

@@ -1,36 +0,0 @@
-import Http from "../utils/net/Http";
-import Urls from "./Urls";
-const tagInfo = "[/src/api/Protocol.ts]:";
-
-let Protocol = {
-	async list(keyword:string = '',page: number = 1, pageSize: number = 10){
-		let url = Urls.protocol.list;
-		let param = {
-			keyword,
-			page,
-			pageSize
-		};
-		let res = await Http.get(url, param);
-		return res;
-	},
-	async detail(id: number){
-		let url = Urls.protocol.detail;
-		let param = {
-			id
-		};
-		let res = await Http.get(url, param);
-		return res;
-	},
-	async add(param: object = {}): Promise<any> {
-		let url = Urls.protocol.add;
-		let res = await Http.post(url, param);
-		return res;
-	},
-	async edit(param: object = {}): Promise<any> {
-		let url = Urls.protocol.edit;
-		let res = await Http.post(url, param);
-		return res;
-	}
-	
-};
-export default Protocol;

+ 0 - 59
nextadmin_vue3/src/api/Urls.ts

@@ -1,59 +0,0 @@
-const Urls = {
-    // 列表
-    index: {
-        login: "/api/index/login"
-    },
-    common: {
-        menuList: "/api/menu/getListPlatform"
-    },
-    /**
-     * 上传类
-     */
-    upload: {
-        file: "/api/upload/file"
-    },
-    /**
-     * 企业模块
-     */
-    company: {
-        /**
-         * 添加企业
-         */
-        addEnterPrise: "/api/enterprise/addEnterPrise",
-        /**
-         * 获取企业列表
-         */
-        getEnterprise: "/api/index/getEnterprise",
-        /**
-         * 企业详情
-         */
-        getEnterpriseDetail: "/api/Enterprise/getEnterpriseDetail",
-        /**
-         * 编辑企业
-         */
-        editEnterPrise: "/api/enterprise/editEnterPrise",
-        /**
-         * 删除企业
-         */
-        delEnterPrise: "/api/enterprise/delEnterPrise"
-    },
-    user: {
-        list: "/api/user/getUserList",//客户,员工,管理员列表
-        add: "/api/user/addUser", //添加用户
-        detail: "/api/user/getUserDetail",//客户,员工,管理员详情
-        edit: "/api/user/editUser",//编辑员工,客户
-        staffList: "/api/staff/getList",
-
-    },
-	
-	/**
-	 * 企业模块
-	 */
-	protocol: {
-	    list: "/api/protocol/getList",
-	    add: "/api/protocol/addProtocol",
-	    edit: "/api/protocol/editProtocol",
-		detail: "/api/protocol/getDetail",
-	},
-};
-export default Urls;

+ 0 - 63
nextadmin_vue3/src/api/User.ts

@@ -1,63 +0,0 @@
-import Http from "../utils/net/Http";
-import Urls from "./Urls";
-const User = {
-    /**
-     * 用户登录
-     * @param phone 
-     * @param password 
-     * @returns 
-     */
-    async login(phone: string, password: string): Promise<any> {
-        let url = Urls.index.login;
-        let res = await Http.get(url, { phone, password });
-        return res;
-    },
-    /**
-     * 添加用户
-     * @params params 
-     * @returns 
-     */
-    async add(params: any): Promise<any> {
-        let url = Urls.user.add;
-        let res = await Http.post(url, params);
-        return res;
-    },
-    /**
-     * 用户详情
-     */
-    async detail(id: number): Promise<any> {
-        let url = Urls.user.detail;
-        let params = {
-            id
-        };
-        let res = await Http.get(url, params);
-        return res;
-    },
-    /**
-     * 用户编辑
-     * @param params 
-     * @returns 
-     */
-    async edit(params: any): Promise<any> {
-        let url = Urls.user.edit;
-        let res = await Http.post(url, params);
-        return res;
-    },
-    /**
-     * 用户列表
-     * @param params 
-     * @returns 
-     */
-    async list(params: any): Promise<any> {
-        let url = Urls.user.list;
-        let res = await Http.get(url, params);
-        return res;
-    },
-    async staffList(params: any): Promise<any> {
-        let url = Urls.user.staffList;
-        let res = await Http.get(url, params);
-        return res;
-    }
-
-};
-export default User;

+ 0 - 31
nextadmin_vue3/src/api/menu/index.ts

@@ -1,31 +0,0 @@
-import request from '/@/utils/request';
-import Http from '/@/utils/net/Http';
-import Menu from '../Menu';
-/**
- * 后端控制菜单模拟json,路径在 https://gitee.com/lyt-top/vue-next-admin-images/tree/master/menu
- * 后端控制路由,isRequestRoutes 为 true,则开启后端控制路由
- * @method getMenuAdmin 获取后端动态路由菜单(admin)
- * @method getMenuTest 获取后端动态路由菜单(test)
- */
-export function useMenuApi() {
-	return {
-		getMenuAdmin: async (params?: object) => {
-			//TODO: 要改成远程获取		
-			let res: any = await Menu.getList();
-			let menu = {
-				code: 0,
-				type: "adminMenu",
-				data: res.data.menu
-			}
-			console.log("menu result", menu);
-			return menu;
-		},
-		getMenuTest: (params?: object) => {
-			return request({
-				url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/testMenu.json',
-				method: 'get',
-				params,
-			});
-		},
-	};
-}

+ 0 - 27
nextadmin_vue3/src/components/auth/auth.vue

@@ -1,27 +0,0 @@
-<template>
-	<slot v-if="getUserAuthBtnList" />
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-export default defineComponent({
-	name: 'auth',
-	props: {
-		value: {
-			type: String,
-			default: () => '',
-		},
-	},
-	setup(props) {
-		const store = useStore();
-		// 获取 vuex 中的用户权限
-		const getUserAuthBtnList = computed(() => {
-			return store.state.userInfos.userInfos.authBtnList.some((v: string) => v === props.value);
-		});
-		return {
-			getUserAuthBtnList,
-		};
-	},
-});
-</script>

+ 0 - 28
nextadmin_vue3/src/components/auth/authAll.vue

@@ -1,28 +0,0 @@
-<template>
-	<slot v-if="getUserAuthBtnList" />
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import { judementSameArr } from '/@/utils/arrayOperation';
-export default defineComponent({
-	name: 'authAll',
-	props: {
-		value: {
-			type: Array,
-			default: () => [],
-		},
-	},
-	setup(props) {
-		const store = useStore();
-		// 获取 vuex 中的用户权限
-		const getUserAuthBtnList = computed(() => {
-			return judementSameArr(props.value, store.state.userInfos.userInfos.authBtnList);
-		});
-		return {
-			getUserAuthBtnList,
-		};
-	},
-});
-</script>

+ 0 - 33
nextadmin_vue3/src/components/auth/auths.vue

@@ -1,33 +0,0 @@
-<template>
-	<slot v-if="getUserAuthBtnList" />
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-export default defineComponent({
-	name: 'auths',
-	props: {
-		value: {
-			type: Array,
-			default: () => [],
-		},
-	},
-	setup(props) {
-		const store = useStore();
-		// 获取 vuex 中的用户权限
-		const getUserAuthBtnList = computed(() => {
-			let flag = false;
-			store.state.userInfos.userInfos.authBtnList.map((val: string) => {
-				props.value.map((v) => {
-					if (val === v) flag = true;
-				});
-			});
-			return flag;
-		});
-		return {
-			getUserAuthBtnList,
-		};
-	},
-});
-</script>

+ 0 - 148
nextadmin_vue3/src/components/cropper/index.vue

@@ -1,148 +0,0 @@
-<template>
-	<div>
-		<el-dialog title="更换头像" v-model="isShowDialog" width="769px">
-			<div class="cropper-warp">
-				<div class="cropper-warp-left">
-					<img :src="cropperImg" class="cropper-warp-left-img" />
-				</div>
-				<div class="cropper-warp-right">
-					<div class="cropper-warp-right-title">预览</div>
-					<div class="cropper-warp-right-item">
-						<div class="cropper-warp-right-value">
-							<img :src="cropperImgBase64" class="cropper-warp-right-value-img" />
-						</div>
-						<div class="cropper-warp-right-label">100 x 100</div>
-					</div>
-					<div class="cropper-warp-right-item">
-						<div class="cropper-warp-right-value">
-							<img :src="cropperImgBase64" class="cropper-warp-right-value-img cropper-size" />
-						</div>
-						<div class="cropper-warp-right-label">50 x 50</div>
-					</div>
-				</div>
-			</div>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >更 换</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, nextTick, defineComponent } from 'vue';
-import Cropper from 'cropperjs';
-import 'cropperjs/dist/cropper.css';
-export default defineComponent({
-	name: 'cropperIndex',
-	setup() {
-		const state = reactive({
-			isShowDialog: false,
-			cropperImg: '',
-			cropperImgBase64: '',
-			cropper: null,
-		});
-		// 打开弹窗
-		const openDialog = (imgs: any) => {
-			state.cropperImg = imgs;
-			state.isShowDialog = true;
-			nextTick(() => {
-				initCropper();
-			});
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 更换
-		const onSubmit = () => {
-			// state.cropperImgBase64 = state.cropper.getCroppedCanvas().toDataURL('image/jpeg');
-		};
-		// 初始化cropperjs图片裁剪
-		const initCropper = () => {
-			const letImg: any = document.querySelector('.cropper-warp-left-img');
-			(<any>state.cropper) = new Cropper(letImg, {
-				viewMode: 1,
-				dragMode: 'none',
-				initialAspectRatio: 1,
-				aspectRatio: 1,
-				preview: '.before',
-				background: false,
-				autoCropArea: 0.6,
-				zoomOnWheel: false,
-				crop: () => {
-					state.cropperImgBase64 = (<any>state.cropper).getCroppedCanvas().toDataURL('image/jpeg');
-				},
-			});
-		};
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			initCropper,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.cropper-warp {
-	display: flex;
-	.cropper-warp-left {
-		position: relative;
-		display: inline-block;
-		height: 350px;
-		flex: 1;
-		border: var(--el-border-base);
-		background: var(--el-color-white);
-		overflow: hidden;
-		background-repeat: no-repeat;
-		cursor: move;
-		border-radius: var(--el-border-radius-base);
-		.cropper-warp-left-img {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.cropper-warp-right {
-		width: 150px;
-		height: 350px;
-		.cropper-warp-right-title {
-			text-align: center;
-			height: 20px;
-			line-height: 20px;
-		}
-		.cropper-warp-right-item {
-			margin: 15px 0;
-			.cropper-warp-right-value {
-				display: flex;
-				.cropper-warp-right-value-img {
-					width: 100px;
-					height: 100px;
-					border-radius: var(--el-border-radius-circle);
-					margin: auto;
-				}
-				.cropper-size {
-					width: 50px;
-					height: 50px;
-				}
-			}
-			.cropper-warp-right-label {
-				text-align: center;
-				font-size: 12px;
-				color: var(--el-text-color-primary);
-				height: 30px;
-				line-height: 30px;
-			}
-		}
-	}
-}
-</style>

+ 0 - 79
nextadmin_vue3/src/components/editor/index.vue

@@ -1,79 +0,0 @@
-<template>
-	<div class="editor-container">
-		<div :id="id"></div>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, onMounted, watch, defineComponent } from 'vue';
-import wangeditor from 'wangeditor';
-
-// 定义接口来定义对象的类型
-interface WangeditorState {
-	editor: any;
-}
-
-export default defineComponent({
-	name: 'wngEditor',
-	props: {
-		// 节点 id
-		id: {
-			type: String,
-			default: () => 'wangeditor',
-		},
-		// 是否禁用
-		isDisable: {
-			type: Boolean,
-			default: () => false,
-		},
-		// 内容框默认 placeholder
-		placeholder: {
-			type: String,
-			default: () => '请输入内容',
-		},
-		// 双向绑定
-		// 双向绑定值,字段名为固定,改了之后将不生效
-		// 参考:https://v3.cn.vuejs.org/guide/migration/v-model.html#%E8%BF%81%E7%A7%BB%E7%AD%96%E7%95%A5
-		modelValue: String,
-	},
-	setup(props, { emit }) {
-		const state = reactive<WangeditorState>({
-			editor: null,
-		});
-		// 初始化富文本
-		// https://doc.wangeditor.com/
-		const initWangeditor = () => {
-			state.editor = new wangeditor(`#${props.id}`);
-			state.editor.config.zIndex = 1;
-			state.editor.config.placeholder = props.placeholder;
-			state.editor.config.uploadImgShowBase64 = true;
-			state.editor.config.showLinkImg = false;
-			onWangeditorChange();
-			state.editor.create();
-			state.editor.txt.html(props.modelValue);
-			props.isDisable ? state.editor.disable() : state.editor.enable();
-		};
-		// 内容改变时
-		const onWangeditorChange = () => {
-			state.editor.config.onchange = (html: string) => {
-				emit('update:modelValue', html);
-			};
-		};
-		// 页面加载时
-		onMounted(() => {
-			initWangeditor();
-		});
-		// 监听双向绑定值的改变
-		// https://gitee.com/lyt-top/vue-next-admin/issues/I4LM7I
-		watch(
-			() => props.modelValue,
-			(value) => {
-				state.editor.txt.html(value);
-			}
-		);
-		return {
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 242
nextadmin_vue3/src/components/iconSelector/index.vue

@@ -1,242 +0,0 @@
-<template>
-	<div class="icon-selector">
-		<el-popover placement="bottom" :width="fontIconWidth" v-model:visible="fontIconVisible" popper-class="icon-selector-popper">
-			<template #reference>
-				<el-input
-					v-model="fontIconSearch"
-					:placeholder="fontIconPlaceholder"
-					:clearable="clearable"
-					:disabled="disabled"
-					:size="size"
-					ref="inputWidthRef"
-					@clear="onClearFontIcon"
-					@focus="onIconFocus"
-					@blur="onIconBlur"
-				>
-					<template #prepend>
-						<SvgIcon
-							:name="fontIconPrefix === '' ? prepend : fontIconPrefix"
-							class="font14"
-							v-if="fontIconPrefix === '' ? prepend?.indexOf('ele-') > -1 : fontIconPrefix?.indexOf('ele-') > -1"
-						/>
-						<i v-else :class="fontIconPrefix === '' ? prepend : fontIconPrefix" class="font14"></i>
-					</template>
-				</el-input>
-			</template>
-			<transition name="el-zoom-in-top">
-				<div class="icon-selector-warp" v-show="fontIconVisible">
-					<div class="icon-selector-warp-title flex">
-						<div class="flex-auto">{{ title }}</div>
-						<div class="icon-selector-warp-title-tab" v-if="type === 'all'">
-							<span :class="{ 'span-active': fontIconType === 'ali' }" @click="onIconChange('ali')" class="ml10" title="iconfont 图标">ali</span>
-							<span :class="{ 'span-active': fontIconType === 'ele' }" @click="onIconChange('ele')" class="ml10" title="elementPlus 图标">ele</span>
-							<span :class="{ 'span-active': fontIconType === 'awe' }" @click="onIconChange('awe')" class="ml10" title="fontawesome 图标">awe</span>
-						</div>
-					</div>
-					<div class="icon-selector-warp-row">
-						<el-scrollbar ref="selectorScrollbarRef">
-							<el-row :gutter="10" v-if="fontIconSheetsFilterList.length > 0">
-								<el-col :xs="6" :sm="4" :md="4" :lg="4" :xl="4" @click="onColClick(v)" v-for="(v, k) in fontIconSheetsFilterList" :key="k">
-									<div class="icon-selector-warp-item" :class="{ 'icon-selector-active': fontIconPrefix === v }">
-										<div class="flex-margin">
-											<div class="icon-selector-warp-item-value">
-												<SvgIcon :name="v" />
-											</div>
-										</div>
-									</div>
-								</el-col>
-							</el-row>
-							<el-empty :image-size="100" v-if="fontIconSheetsFilterList.length <= 0" :description="emptyDescription"></el-empty>
-						</el-scrollbar>
-					</div>
-				</div>
-			</transition>
-		</el-popover>
-	</div>
-</template>
-
-<script lang="ts">
-import { ref, toRefs, reactive, onMounted, nextTick, computed, watch, defineComponent } from 'vue';
-import initIconfont from '/@/utils/getStyleSheets';
-export default defineComponent({
-	name: 'iconSelector',
-	emits: ['update:modelValue', 'get', 'clear'],
-	props: {
-		// 输入框前置内容
-		prepend: {
-			type: String,
-			default: () => 'ele-Pointer',
-		},
-		// 输入框占位文本
-		placeholder: {
-			type: String,
-			default: () => '请输入内容搜索图标或者选择图标',
-		},
-		// 输入框占位文本
-		size: {
-			type: String,
-			default: () => 'default',
-		},
-		// 弹窗标题
-		title: {
-			type: String,
-			default: () => '请选择图标',
-		},
-		// icon 图标类型
-		type: {
-			type: String,
-			default: () => 'ele',
-		},
-		// 禁用
-		disabled: {
-			type: Boolean,
-			default: () => false,
-		},
-		// 是否可清空
-		clearable: {
-			type: Boolean,
-			default: () => true,
-		},
-		// 自定义空状态描述文字
-		emptyDescription: {
-			type: String,
-			default: () => '无相关图标',
-		},
-		// 双向绑定值,字段名为固定,改了之后将不生效
-		// 参考:https://v3.cn.vuejs.org/guide/migration/v-model.html#%E8%BF%81%E7%A7%BB%E7%AD%96%E7%95%A5
-		modelValue: String,
-	},
-	setup(props, { emit }) {
-		const inputWidthRef = ref();
-		const selectorScrollbarRef = ref();
-		const state = reactive({
-			fontIconPrefix: '',
-			fontIconVisible: false,
-			fontIconWidth: 0,
-			fontIconSearch: '',
-			fontIconTabsIndex: 0,
-			fontIconSheetsList: [],
-			fontIconPlaceholder: '',
-			fontIconType: 'ali',
-			fontIconShow: true,
-		});
-		// 处理 input 获取焦点时,modelValue 有值时,改变 input 的 placeholder 值
-		const onIconFocus = () => {
-			state.fontIconVisible = true;
-			if (!props.modelValue) return false;
-			state.fontIconSearch = '';
-			state.fontIconPlaceholder = props.modelValue;
-		};
-		// 处理 input 失去焦点时,为空将清空 input 值,为点击选中图标时,将取原先值
-		const onIconBlur = () => {
-			setTimeout(() => {
-				const icon = state.fontIconSheetsList.filter((icon: string) => icon === state.fontIconSearch);
-				if (icon.length <= 0) state.fontIconSearch = '';
-			}, 300);
-		};
-		// 处理 icon 双向绑定数值回显
-		const initModeValueEcho = () => {
-			if (props.modelValue === '') return false;
-			(<string | undefined>state.fontIconPlaceholder) = props.modelValue;
-			(<string | undefined>state.fontIconPrefix) = props.modelValue;
-		};
-		// 图标搜索及图标数据显示
-		const fontIconSheetsFilterList = computed(() => {
-			if (!state.fontIconSearch) return state.fontIconSheetsList;
-			let search = state.fontIconSearch.trim().toLowerCase();
-			return state.fontIconSheetsList.filter((item: any) => {
-				if (item.toLowerCase().indexOf(search) !== -1) return item;
-			});
-		});
-		// 获取 input 的宽度
-		const getInputWidth = () => {
-			nextTick(() => {
-				state.fontIconWidth = inputWidthRef.value.$el.offsetWidth;
-			});
-		};
-		// 监听页面宽度改变
-		const initResize = () => {
-			window.addEventListener('resize', () => {
-				getInputWidth();
-			});
-		};
-		// 初始化数据
-		const initFontIconData = async (type: string) => {
-			state.fontIconSheetsList = [];
-			if (type === 'ali') {
-				await initIconfont.ali().then((res: any) => {
-					// 阿里字体图标使用 `iconfont xxx`
-					state.fontIconSheetsList = res.map((i: string) => `iconfont ${i}`);
-				});
-			} else if (type === 'ele') {
-				await initIconfont.ele().then((res: any) => {
-					state.fontIconSheetsList = res;
-				});
-			} else if (type === 'awe') {
-				await initIconfont.awe().then((res: any) => {
-					// fontawesome字体图标使用 `fa xxx`
-					state.fontIconSheetsList = res.map((i: string) => `fa ${i}`);
-				});
-			}
-			// 初始化 input 的 placeholder
-			// 参考(单项数据流):https://cn.vuejs.org/v2/guide/components-props.html?#%E5%8D%95%E5%90%91%E6%95%B0%E6%8D%AE%E6%B5%81
-			state.fontIconPlaceholder = props.placeholder;
-			// 初始化双向绑定回显
-			initModeValueEcho();
-			// 切换时,滚动条置顶。感兴趣可以使用 keep-alive <component :is="xxx"/> 进行缓存
-			selectorScrollbarRef.value.wrap$.scrollTop = 0;
-		};
-		// 图标点击切换
-		const onIconChange = (type: string) => {
-			state.fontIconType = type;
-			initFontIconData(type);
-		};
-		// 获取当前点击的 icon 图标
-		const onColClick = (v: any) => {
-			state.fontIconPlaceholder = v;
-			state.fontIconVisible = false;
-			state.fontIconPrefix = v;
-			emit('get', state.fontIconPrefix);
-			emit('update:modelValue', state.fontIconPrefix);
-		};
-		// 清空当前点击的 icon 图标
-		const onClearFontIcon = () => {
-			state.fontIconPrefix = '';
-			emit('clear', state.fontIconPrefix);
-			emit('update:modelValue', state.fontIconPrefix);
-		};
-		// 页面加载时
-		onMounted(() => {
-			// 判断默认进来是什么类型图标,进行 tab 回显
-			if (props.type === 'all') {
-				if ((<any>props.modelValue)?.indexOf('iconfont') > -1) onIconChange('ali');
-				else if ((<any>props.modelValue)?.indexOf('ele-') > -1) onIconChange('ele');
-				else if ((<any>props.modelValue)?.indexOf('fa') > -1) onIconChange('awe');
-				else onIconChange('ali');
-			} else {
-				onIconChange(props.type);
-			}
-			initResize();
-			getInputWidth();
-		});
-		// 监听双向绑定 modelValue 的变化
-		watch(
-			() => props.modelValue,
-			() => {
-				initModeValueEcho();
-			}
-		);
-		return {
-			inputWidthRef,
-			selectorScrollbarRef,
-			fontIconSheetsFilterList,
-			onColClick,
-			onIconChange,
-			onClearFontIcon,
-			onIconFocus,
-			onIconBlur,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 194
nextadmin_vue3/src/components/noticeBar/index.vue

@@ -1,194 +0,0 @@
-<template>
-	<div class="notice-bar" :style="{ background, height: `${height}px` }" v-show="!isMode">
-		<div class="notice-bar-warp" :style="{ color, fontSize: `${size}px` }">
-			<i v-if="leftIcon" class="notice-bar-warp-left-icon" :class="leftIcon"></i>
-			<div class="notice-bar-warp-text-box" ref="noticeBarWarpRef">
-				<div class="notice-bar-warp-text" ref="noticeBarTextRef" v-if="!scrollable">{{ text }}</div>
-				<div class="notice-bar-warp-slot" v-else><slot /></div>
-			</div>
-			<SvgIcon :name="rightIcon" v-if="rightIcon" class="notice-bar-warp-right-icon" @click="onRightIconClick" />
-		</div>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, defineComponent, ref, onMounted, nextTick } from 'vue';
-export default defineComponent({
-	name: 'noticeBar',
-	props: {
-		// 通知栏模式,可选值为 closeable link
-		mode: {
-			type: String,
-			default: () => '',
-		},
-		// 通知文本内容
-		text: {
-			type: String,
-			default: () => '',
-		},
-		// 通知文本颜色
-		color: {
-			type: String,
-			default: () => 'var(--color-warning)',
-		},
-		// 通知背景色
-		background: {
-			type: String,
-			default: () => 'var(--color-warning-light-9)',
-		},
-		// 字体大小,单位px
-		size: {
-			type: [Number, String],
-			default: () => 14,
-		},
-		// 通知栏高度,单位px
-		height: {
-			type: Number,
-			default: () => 40,
-		},
-		// 动画延迟时间 (s)
-		delay: {
-			type: Number,
-			default: () => 1,
-		},
-		// 滚动速率 (px/s)
-		speed: {
-			type: Number,
-			default: () => 100,
-		},
-		// 是否开启垂直滚动
-		scrollable: {
-			type: Boolean,
-			default: () => false,
-		},
-		// 自定义左侧图标
-		leftIcon: {
-			type: String,
-			default: () => '',
-		},
-		// 自定义右侧图标
-		rightIcon: {
-			type: String,
-			default: () => '',
-		},
-	},
-	setup(props, { emit }) {
-		const noticeBarWarpRef = ref();
-		const noticeBarTextRef = ref();
-		const state = reactive({
-			order: 1,
-			oneTime: 0,
-			twoTime: 0,
-			warpOWidth: 0,
-			textOWidth: 0,
-			isMode: false,
-		});
-		// 初始化 animation 各项参数
-		const initAnimation = () => {
-			nextTick(() => {
-				state.warpOWidth = noticeBarWarpRef.value.offsetWidth;
-				state.textOWidth = noticeBarTextRef.value.offsetWidth;
-				document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${state.textOWidth}px;}}`);
-				document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${state.warpOWidth}px;} 100% {left: -${state.textOWidth}px;}}`);
-				computeAnimationTime();
-				setTimeout(() => {
-					changeAnimation();
-				}, props.delay * 1000);
-			});
-		};
-		// 计算 animation 滚动时长
-		const computeAnimationTime = () => {
-			state.oneTime = state.textOWidth / props.speed;
-			state.twoTime = (state.textOWidth + state.warpOWidth) / props.speed;
-		};
-		// 改变 animation 动画调用
-		const changeAnimation = () => {
-			if (state.order === 1) {
-				noticeBarTextRef.value.style.cssText = `animation: oneAnimation ${state.oneTime}s linear; opactity: 1;}`;
-				state.order = 2;
-			} else {
-				noticeBarTextRef.value.style.cssText = `animation: twoAnimation ${state.twoTime}s linear infinite; opacity: 1;`;
-			}
-		};
-		// 监听 animation 动画的结束
-		const listenerAnimationend = () => {
-			noticeBarTextRef.value.addEventListener(
-				'animationend',
-				() => {
-					changeAnimation();
-				},
-				false
-			);
-		};
-		// 右侧 icon 图标点击
-		const onRightIconClick = () => {
-			if (!props.mode) return false;
-			if (props.mode === 'closeable') {
-				state.isMode = true;
-				emit('close');
-			} else if (props.mode === 'link') {
-				emit('link');
-			}
-		};
-		// 页面加载时
-		onMounted(() => {
-			if (props.scrollable) return false;
-			initAnimation();
-			listenerAnimationend();
-		});
-		return {
-			noticeBarWarpRef,
-			noticeBarTextRef,
-			onRightIconClick,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.notice-bar {
-	padding: 0 15px;
-	width: 100%;
-	border-radius: 4px;
-	.notice-bar-warp {
-		display: flex;
-		align-items: center;
-		width: 100%;
-		height: inherit;
-		.notice-bar-warp-text-box {
-			flex: 1;
-			height: inherit;
-			display: flex;
-			align-items: center;
-			overflow: hidden;
-			position: relative;
-			.notice-bar-warp-text {
-				white-space: nowrap;
-				position: absolute;
-				left: 0;
-			}
-			.notice-bar-warp-slot {
-				width: 100%;
-				white-space: nowrap;
-				::v-deep(.el-carousel__item) {
-					display: flex;
-					align-items: center;
-				}
-			}
-		}
-		.notice-bar-warp-left-icon {
-			width: 24px;
-			font-size: inherit !important;
-		}
-		.notice-bar-warp-right-icon {
-			width: 24px;
-			text-align: right;
-			font-size: inherit !important;
-			&:hover {
-				cursor: pointer;
-			}
-		}
-	}
-}
-</style>

+ 0 - 41
nextadmin_vue3/src/components/svgIcon/index.vue

@@ -1,41 +0,0 @@
-<script lang="ts">
-// 渲染函数:https://v3.cn.vuejs.org/guide/render-function.html
-import { h, resolveComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface SvgIconProps {
-	name: string;
-	size: number;
-	color: string;
-}
-
-export default {
-	name: 'svgIcon',
-	props: {
-		// svg 图标组件名字
-		name: {
-			type: String,
-		},
-		// svg 大小
-		size: {
-			type: Number,
-			default: () => 14,
-		},
-		// svg 颜色
-		color: {
-			type: String,
-		},
-	},
-	setup(props: SvgIconProps) {
-		// 定义变量
-		const linesString: string[] = ['https', 'http', '/src', '/assets'];
-		const onLineStyle: string = `font-size: ${props.size}px;color: ${props.color}`;
-		const localsStyle: string = `width: ${props.size}px;height: ${props.size}px`;
-
-		// 逻辑判断
-		if (props.name?.startsWith('ele-')) return () => h('i', { class: 'el-icon', style: onLineStyle }, [h(resolveComponent(props.name))]);
-		else if (linesString.find((str) => props.name?.startsWith(str))) return () => h('img', { src: props.name, style: localsStyle });
-		else return () => h('i', { class: props.name, style: onLineStyle });
-	},
-};
-</script>

+ 0 - 27
nextadmin_vue3/src/config.ts

@@ -1,27 +0,0 @@
-/**
- * 系统设置
- */
-const config = {
-    /**
-     * 请求接口域名
-     */
-    host: "http://ssl.ycxxkj.com/office_kpi/api/public/index.php",
-    /**
-     * 接口签名密钥
-     */
-    apiSignKey: "32a1ff74699ff2d6ce4c497cb94cb5c8",
-}
-let env = import.meta.env;
-console.log("==env.Mode:==", env.MODE);
-if (env.MODE == "development") {
-    // config.host = " http://local.lzj/office_kpi/api/public/index.php";
-	// config.host = " http://192.168.0.200:3838/index.php";
-	config.host = "http://192.168.0.200:3838/index.php";
-	config.domain = "http://192.168.0.200:3838";
-}
-if (env.MODE == "test") {
-    // config.host = " http://local.lzj/office_kpi/api/public/index.php";
-
-}
-console.log("==config:==", config);
-export default config;

+ 0 - 55
nextadmin_vue3/src/i18n/index.ts

@@ -1,55 +0,0 @@
-import { createI18n } from 'vue-i18n';
-import zhcnLocale from 'element-plus/lib/locale/lang/zh-cn';
-import enLocale from 'element-plus/lib/locale/lang/en';
-import zhtwLocale from 'element-plus/lib/locale/lang/zh-tw';
-import { store } from '/@/store/index';
-
-import nextZhcn from '/@/i18n/lang/zh-cn';
-
-
-import pagesLoginZhcn from '/@/i18n/pages/login/zh-cn';
-import pagesLoginEn from '/@/i18n/pages/login/en';
-import pagesLoginZhtw from '/@/i18n/pages/login/zh-tw';
-import pagesFormI18nZhcn from '/@/i18n/pages/formI18n/zh-cn';
-import pagesFormI18nEn from '/@/i18n/pages/formI18n/en';
-import pagesFormI18nZhtw from '/@/i18n/pages/formI18n/zh-tw';
-
-// 定义语言国际化内容
-/**
- * 说明:
- * /src/i18n/lang 下的 ts 为框架的国际化内容
- * /src/i18n/pages 下的 ts 为各界面的国际化内容
- */
-const messages = {
-	[zhcnLocale.name]: {
-		...zhcnLocale,
-		message: {
-			...nextZhcn,
-			...pagesLoginZhcn,
-			...pagesFormI18nZhcn,
-		},
-	},
-	[enLocale.name]: {
-		...enLocale,
-		message: {
-
-			...pagesLoginEn,
-			...pagesFormI18nEn,
-		},
-	},
-	[zhtwLocale.name]: {
-		...zhtwLocale,
-		message: {
-
-			...pagesLoginZhtw,
-			...pagesFormI18nZhtw,
-		},
-	},
-};
-
-// 导出语言国际化
-export const i18n = createI18n({
-	locale: store.state.themeConfig.themeConfig.globalI18n,
-	fallbackLocale: zhcnLocale.name,
-	messages,
-});

+ 0 - 157
nextadmin_vue3/src/layout/component/aside.vue

@@ -1,157 +0,0 @@
-<template>
-	<div class="h100" v-show="!isTagsViewCurrenFull">
-		<el-aside class="layout-aside" :class="setCollapseStyle">
-			<Logo v-if="setShowLogo" />
-			<el-scrollbar class="flex-auto" ref="layoutAsideScrollbarRef" @mouseenter="onAsideEnterLeave(true)" @mouseleave="onAsideEnterLeave(false)">
-				<Vertical :menuList="menuList" />
-			</el-scrollbar>
-		</el-aside>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, computed, watch, getCurrentInstance, onBeforeMount, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import Logo from '/@/layout/logo/index.vue';
-import Vertical from '/@/layout/navMenu/vertical.vue';
-export default defineComponent({
-	name: 'layoutAside',
-	components: { Logo, Vertical },
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const store = useStore();
-		const state = reactive({
-			menuList: [],
-			clientWidth: 0,
-		});
-		// 获取卡片全屏信息
-		const isTagsViewCurrenFull = computed(() => {
-			return store.state.tagsViewRoutes.isTagsViewCurrenFull;
-		});
-		// 设置菜单展开/收起时的宽度
-		const setCollapseStyle = computed(() => {
-			const { layout, isCollapse, menuBar } = store.state.themeConfig.themeConfig;
-			const asideBrTheme = ['#FFFFFF', '#FFF', '#fff', '#ffffff'];
-			const asideBrColor = asideBrTheme.includes(menuBar) ? 'layout-el-aside-br-color' : '';
-			// 判断是否是手机端
-			if (state.clientWidth <= 1000) {
-				if (isCollapse) {
-					document.body.setAttribute('class', 'el-popup-parent--hidden');
-					const asideEle = document.querySelector('.layout-container') as HTMLElement;
-					const modeDivs = document.createElement('div');
-					modeDivs.setAttribute('class', 'layout-aside-mobile-mode');
-					asideEle.appendChild(modeDivs);
-					modeDivs.addEventListener('click', closeLayoutAsideMobileMode);
-					return [asideBrColor, 'layout-aside-mobile', 'layout-aside-mobile-open'];
-				} else {
-					// 关闭弹窗
-					closeLayoutAsideMobileMode();
-					return [asideBrColor, 'layout-aside-mobile', 'layout-aside-mobile-close'];
-				}
-			} else {
-				if (layout === 'columns') {
-					// 分栏布局,菜单收起时宽度给 1px
-					if (isCollapse) {
-						return [asideBrColor, 'layout-aside-pc-1'];
-					} else {
-						return [asideBrColor, 'layout-aside-pc-220'];
-					}
-				} else {
-					// 其它布局给 64px
-					if (isCollapse) {
-						return [asideBrColor, 'layout-aside-pc-64'];
-					} else {
-						return [asideBrColor, 'layout-aside-pc-220'];
-					}
-				}
-			}
-		});
-		// 关闭移动端蒙版
-		const closeLayoutAsideMobileMode = () => {
-			const el = document.querySelector('.layout-aside-mobile-mode');
-			el?.setAttribute('style', 'animation: error-img-two 0.3s');
-			setTimeout(() => {
-				el?.parentNode?.removeChild(el);
-			}, 300);
-			const clientWidth = document.body.clientWidth;
-			if (clientWidth < 1000) store.state.themeConfig.themeConfig.isCollapse = false;
-			document.body.setAttribute('class', '');
-		};
-		// 设置显示/隐藏 logo
-		const setShowLogo = computed(() => {
-			let { layout, isShowLogo } = store.state.themeConfig.themeConfig;
-			return (isShowLogo && layout === 'defaults') || (isShowLogo && layout === 'columns');
-		});
-		// 设置/过滤路由(非静态路由/是否显示在菜单中)
-		const setFilterRoutes = () => {
-			if (store.state.themeConfig.themeConfig.layout === 'columns') return false;
-			(state.menuList as any) = filterRoutesFun(store.state.routesList.routesList);
-		};
-		// 路由过滤递归函数
-		const filterRoutesFun = (arr: Array<object>) => {
-			return arr
-				.filter((item: any) => !item.meta.isHide)
-				.map((item: any) => {
-					item = Object.assign({}, item);
-					if (item.children) item.children = filterRoutesFun(item.children);
-					return item;
-				});
-		};
-		// 设置菜单导航是否固定(移动端)
-		const initMenuFixed = (clientWidth: number) => {
-			state.clientWidth = clientWidth;
-		};
-		// 鼠标移入、移出
-		const onAsideEnterLeave = (bool: Boolean) => {
-			let { layout } = store.state.themeConfig.themeConfig;
-			if (layout !== 'columns') return false;
-			if (!bool) proxy.mittBus.emit('restoreDefault');
-			store.dispatch('routesList/setColumnsMenuHover', bool);
-		};
-		// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
-		watch(store.state.themeConfig.themeConfig, (val) => {
-			if (val.isShowLogoChange !== val.isShowLogo) {
-				if (!proxy.$refs.layoutAsideScrollbarRef) return false;
-				proxy.$refs.layoutAsideScrollbarRef.update();
-			}
-		});
-		// 监听vuex值的变化,动态赋值给菜单中
-		watch(store.state, (val) => {
-			let { layout, isClassicSplitMenu } = val.themeConfig.themeConfig;
-			if (layout === 'classic' && isClassicSplitMenu) return false;
-			setFilterRoutes();
-		});
-		// 页面加载前
-		onBeforeMount(() => {
-			initMenuFixed(document.body.clientWidth);
-			setFilterRoutes();
-			// 此界面不需要取消监听(proxy.mittBus.off('setSendColumnsChildren))
-			// 因为切换布局时有的监听需要使用,取消了监听,某些操作将不生效
-			proxy.mittBus.on('setSendColumnsChildren', (res: any) => {
-				state.menuList = res.children;
-			});
-			proxy.mittBus.on('setSendClassicChildren', (res: any) => {
-				let { layout, isClassicSplitMenu } = store.state.themeConfig.themeConfig;
-				if (layout === 'classic' && isClassicSplitMenu) {
-					state.menuList = [];
-					state.menuList = res.children;
-				}
-			});
-			proxy.mittBus.on('getBreadcrumbIndexSetFilterRoutes', () => {
-				setFilterRoutes();
-			});
-			proxy.mittBus.on('layoutMobileResize', (res: any) => {
-				initMenuFixed(res.clientWidth);
-				closeLayoutAsideMobileMode();
-			});
-		});
-		return {
-			setCollapseStyle,
-			setShowLogo,
-			isTagsViewCurrenFull,
-			onAsideEnterLeave,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 294
nextadmin_vue3/src/layout/component/columnsAside.vue

@@ -1,294 +0,0 @@
-<template>
-	<div class="layout-columns-aside">
-		<el-scrollbar>
-			<ul @mouseleave="onColumnsAsideMenuMouseleave()">
-				<li
-					v-for="(v, k) in columnsAsideList"
-					:key="k"
-					@click="onColumnsAsideMenuClick(v, k)"
-					@mouseenter="onColumnsAsideMenuMouseenter(v, k)"
-					:ref="
-						(el) => {
-							if (el) columnsAsideOffsetTopRefs[k] = el;
-						}
-					"
-					:class="{ 'layout-columns-active': liIndex === k, 'layout-columns-hover': liHoverIndex === k }"
-					:title="$t(v.meta.title)"
-				>
-					<div :class="setColumnsAsidelayout" v-if="!v.meta.isLink || (v.meta.isLink && v.meta.isIframe)">
-						<SvgIcon :name="v.meta.icon" />
-						<div class="columns-vertical-title font12">
-							{{
-								$t(v.meta.title) && $t(v.meta.title).length >= 4
-									? $t(v.meta.title).substr(0, setColumnsAsidelayout === 'columns-vertical' ? 4 : 3)
-									: $t(v.meta.title)
-							}}
-						</div>
-					</div>
-					<div :class="setColumnsAsidelayout" v-else>
-						<a :href="v.meta.isLink" target="_blank">
-							<SvgIcon :name="v.meta.icon" />
-							<div class="columns-vertical-title font12">
-								{{
-									$t(v.meta.title) && $t(v.meta.title).length >= 4
-										? $t(v.meta.title).substr(0, setColumnsAsidelayout === 'columns-vertical' ? 4 : 3)
-										: $t(v.meta.title)
-								}}
-							</div>
-						</a>
-					</div>
-				</li>
-				<div ref="columnsAsideActiveRef" :class="setColumnsAsideStyle"></div>
-			</ul>
-		</el-scrollbar>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, ref, computed, onMounted, nextTick, getCurrentInstance, watch, onUnmounted, defineComponent } from 'vue';
-import { useRoute, useRouter, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
-import { useStore } from '/@/store/index';
-
-// 定义接口来定义对象的类型
-interface ColumnsAsideState {
-	columnsAsideList: any[];
-	liIndex: number;
-	liOldIndex: null | number;
-	liHoverIndex: null | number;
-	liOldPath: null | string;
-	difference: number;
-	routeSplit: string[];
-	isNavHover: boolean;
-}
-
-export default defineComponent({
-	name: 'layoutColumnsAside',
-	setup() {
-		const columnsAsideOffsetTopRefs: any = ref([]);
-		const columnsAsideActiveRef = ref();
-		const { proxy } = <any>getCurrentInstance();
-		const store = useStore();
-		const route = useRoute();
-		const router = useRouter();
-		const state = reactive<ColumnsAsideState>({
-			columnsAsideList: [],
-			liIndex: 0,
-			liOldIndex: null,
-			liHoverIndex: null,
-			liOldPath: null,
-			difference: 0,
-			routeSplit: [],
-			isNavHover: false,
-		});
-		// 设置分栏高亮风格
-		const setColumnsAsideStyle = computed(() => {
-			return store.state.themeConfig.themeConfig.columnsAsideStyle;
-		});
-		// 设置分栏布局风格
-		const setColumnsAsidelayout = computed(() => {
-			return store.state.themeConfig.themeConfig.columnsAsideLayout;
-		});
-		// 设置菜单高亮位置移动
-		const setColumnsAsideMove = (k: number) => {
-			state.liIndex = k;
-			columnsAsideActiveRef.value.style.top = `${columnsAsideOffsetTopRefs.value[k].offsetTop + state.difference}px`;
-		};
-		// 菜单高亮点击事件
-		const onColumnsAsideMenuClick = (v: Object, k: number) => {
-			setColumnsAsideMove(k);
-			let { path, redirect } = v as any;
-			if (redirect) router.push(redirect);
-			else router.push(path);
-		};
-		// 鼠标移入时,显示当前的子级菜单
-		const onColumnsAsideMenuMouseenter = (v: RouteRecordRaw, k: number) => {
-			let { path } = v;
-			state.liOldPath = path;
-			state.liOldIndex = k;
-			state.liHoverIndex = k;
-			proxy.mittBus.emit('setSendColumnsChildren', setSendChildren(path));
-			store.dispatch('routesList/setColumnsMenuHover', false);
-			store.dispatch('routesList/setColumnsNavHover', true);
-			state.isNavHover = true;
-		};
-		// 鼠标移走时,显示原来的子级菜单
-		const onColumnsAsideMenuMouseleave = async () => {
-			await store.dispatch('routesList/setColumnsNavHover', false);
-			// 添加延时器,防止拿到的 store.state.routesList 值不是最新的
-			setTimeout(() => {
-				const { isColumnsMenuHover, isColumnsNavHover } = store.state.routesList;
-				if (!isColumnsMenuHover && !isColumnsNavHover) proxy.mittBus.emit('restoreDefault');
-			}, 100);
-			// state.isNavHover = false;
-		};
-		// 设置高亮动态位置
-		const onColumnsAsideDown = (k: number) => {
-			nextTick(() => {
-				setColumnsAsideMove(k);
-			});
-		};
-		// 设置/过滤路由(非静态路由/是否显示在菜单中)
-		const setFilterRoutes = () => {
-			state.columnsAsideList = filterRoutesFun(store.state.routesList.routesList);
-			const resData: any = setSendChildren(route.path);
-			if (Object.keys(resData).length <= 0) return false;
-			onColumnsAsideDown(resData.item[0].k);
-			proxy.mittBus.emit('setSendColumnsChildren', resData);
-		};
-		// 传送当前子级数据到菜单中
-		const setSendChildren = (path: string) => {
-			const currentPathSplit = path.split('/');
-			let currentData: any = {};
-			state.columnsAsideList.map((v: any, k: number) => {
-				if (v.path === `/${currentPathSplit[1]}`) {
-					v['k'] = k;
-					currentData['item'] = [{ ...v }];
-					currentData['children'] = [{ ...v }];
-					if (v.children) currentData['children'] = v.children;
-				}
-			});
-			return currentData;
-		};
-		// 路由过滤递归函数
-		const filterRoutesFun = (arr: Array<object>) => {
-			return arr
-				.filter((item: any) => !item.meta.isHide)
-				.map((item: any) => {
-					item = Object.assign({}, item);
-					if (item.children) item.children = filterRoutesFun(item.children);
-					return item;
-				});
-		};
-		// tagsView 点击时,根据路由查找下标 columnsAsideList,实现左侧菜单高亮
-		const setColumnsMenuHighlight = (path: string) => {
-			state.routeSplit = path.split('/');
-			state.routeSplit.shift();
-			const routeFirst = `/${state.routeSplit[0]}`;
-			const currentSplitRoute = state.columnsAsideList.find((v: any) => v.path === routeFirst);
-			if (!currentSplitRoute) return false;
-			// 延迟拿值,防止取不到
-			setTimeout(() => {
-				onColumnsAsideDown((<any>currentSplitRoute).k);
-			}, 0);
-		};
-		// 监听布局配置信息的变化,动态增加菜单高亮位置移动像素
-		watch(store.state, (val) => {
-			val.themeConfig.themeConfig.columnsAsideStyle === 'columnsRound' ? (state.difference = 3) : (state.difference = 0);
-			if (!val.routesList.isColumnsMenuHover && !val.routesList.isColumnsNavHover) {
-				state.liHoverIndex = null;
-				proxy.mittBus.emit('setSendColumnsChildren', setSendChildren(route.path));
-			} else {
-				state.liHoverIndex = state.liOldIndex;
-				if (!state.liOldPath) return false;
-				proxy.mittBus.emit('setSendColumnsChildren', setSendChildren(state.liOldPath));
-			}
-		});
-		// 页面加载时
-		onMounted(() => {
-			setFilterRoutes();
-			// 销毁变量,防止鼠标再次移入时,保留了上次的记录
-			proxy.mittBus.on('restoreDefault', () => {
-				state.liOldIndex = null;
-				state.liOldPath = null;
-			});
-		});
-		// 页面卸载时
-		onUnmounted(() => {
-			proxy.mittBus.off('restoreDefault', () => {});
-		});
-		// 路由更新时
-		onBeforeRouteUpdate((to) => {
-			setColumnsMenuHighlight(to.path);
-			proxy.mittBus.emit('setSendColumnsChildren', setSendChildren(to.path));
-		});
-		return {
-			columnsAsideOffsetTopRefs,
-			columnsAsideActiveRef,
-			onColumnsAsideDown,
-			setColumnsAsideStyle,
-			setColumnsAsidelayout,
-			onColumnsAsideMenuClick,
-			onColumnsAsideMenuMouseenter,
-			onColumnsAsideMenuMouseleave,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-columns-aside {
-	width: 70px;
-	height: 100%;
-	background: var(--next-bg-columnsMenuBar);
-	ul {
-		position: relative;
-		li {
-			color: var(--next-bg-columnsMenuBarColor);
-			width: 100%;
-			height: 50px;
-			text-align: center;
-			display: flex;
-			cursor: pointer;
-			position: relative;
-			z-index: 1;
-			.columns-vertical {
-				margin: auto;
-				.columns-vertical-title {
-					padding-top: 1px;
-				}
-			}
-			.columns-horizontal {
-				display: flex;
-				height: 50px;
-				width: 100%;
-				align-items: center;
-				padding: 0 5px;
-				i {
-					margin-right: 3px;
-				}
-				a {
-					display: flex;
-					.columns-horizontal-title {
-						padding-top: 1px;
-					}
-				}
-			}
-			a {
-				text-decoration: none;
-				color: var(--next-bg-columnsMenuBarColor);
-			}
-		}
-		.layout-columns-active {
-			color: var(--el-color-white);
-			transition: 0.3s ease-in-out;
-		}
-		.layout-columns-hover {
-			color: var(--el-color-primary);
-			a {
-				color: var(--el-color-primary);
-			}
-		}
-		.columns-round {
-			background: var(--el-color-primary);
-			color: var(--el-color-white);
-			position: absolute;
-			left: 50%;
-			top: 2px;
-			height: 44px;
-			width: 65px;
-			transform: translateX(-50%);
-			z-index: 0;
-			transition: 0.3s ease-in-out;
-			border-radius: 5px;
-		}
-		.columns-card {
-			@extend .columns-round;
-			top: 0;
-			height: 50px;
-			width: 100%;
-			border-radius: 0;
-		}
-	}
-}
-</style>

+ 0 - 32
nextadmin_vue3/src/layout/component/header.vue

@@ -1,32 +0,0 @@
-<template>
-	<el-header class="layout-header" :height="setHeaderHeight" v-show="!isTagsViewCurrenFull">
-		<NavBarsIndex />
-	</el-header>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import NavBarsIndex from '/@/layout/navBars/index.vue';
-export default defineComponent({
-	name: 'layoutHeader',
-	components: { NavBarsIndex },
-	setup() {
-		const store = useStore();
-		// 设置 header 的高度
-		const setHeaderHeight = computed(() => {
-			let { isTagsview, layout } = store.state.themeConfig.themeConfig;
-			if (isTagsview && layout !== 'classic') return '84px';
-			else return '50px';
-		});
-		// 获取卡片全屏信息
-		const isTagsViewCurrenFull = computed(() => {
-			return store.state.tagsViewRoutes.isTagsViewCurrenFull;
-		});
-		return {
-			setHeaderHeight,
-			isTagsViewCurrenFull,
-		};
-	},
-});
-</script>

+ 0 - 84
nextadmin_vue3/src/layout/component/main.vue

@@ -1,84 +0,0 @@
-<template>
-	<el-main class="layout-main">
-		<el-scrollbar
-			class="layout-scrollbar"
-			ref="layoutScrollbarRef"
-			:style="{ padding: currentRouteMeta.isLink && currentRouteMeta.isIframe ? 0 : '', transition: 'padding 0.3s ease-in-out' }"
-		>
-			<LayoutParentView :style="{ minHeight: `calc(100vh - ${headerHeight})` }" />
-			<Footer v-if="getThemeConfig.isFooter" />
-		</el-scrollbar>
-	</el-main>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent, toRefs, reactive, getCurrentInstance, watch, onMounted } from 'vue';
-import { useStore } from '/@/store/index';
-import { useRoute } from 'vue-router';
-import LayoutParentView from '/@/layout/routerView/parent.vue';
-import Footer from '/@/layout/footer/index.vue';
-
-// 定义接口来定义对象的类型
-interface MainState {
-	headerHeight: string | number;
-	currentRouteMeta: any;
-}
-
-export default defineComponent({
-	name: 'layoutMain',
-	components: { LayoutParentView, Footer },
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const route = useRoute();
-		const store = useStore();
-		const state = reactive<MainState>({
-			headerHeight: '',
-			currentRouteMeta: {},
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 设置 main 的高度
-		const initHeaderHeight = () => {
-			const bool = state.currentRouteMeta.isLink && state.currentRouteMeta.isIframe;
-			let { isTagsview } = store.state.themeConfig.themeConfig;
-			if (isTagsview) return (state.headerHeight = bool ? `85px` : `114px`);
-			else return (state.headerHeight = `51px`);
-		};
-		// 初始化获取当前路由 meta,用于设置 iframes padding
-		const initGetMeta = () => {
-			state.currentRouteMeta = route.meta;
-		};
-		// 页面加载前
-		onMounted(async () => {
-			await initGetMeta();
-			initHeaderHeight();
-		});
-		// 监听路由变化
-		watch(
-			() => route.path,
-			() => {
-				state.currentRouteMeta = route.meta;
-				const bool = state.currentRouteMeta.isLink && state.currentRouteMeta.isIframe;
-				state.headerHeight = bool ? `85px` : `114px`;
-				proxy.$refs.layoutScrollbarRef.update();
-			}
-		);
-		// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
-		watch(store.state.themeConfig.themeConfig, (val) => {
-			state.currentRouteMeta = route.meta;
-			const bool = state.currentRouteMeta.isLink && state.currentRouteMeta.isIframe;
-			state.headerHeight = val.isTagsview ? (bool ? `85px` : `114px`) : '51px';
-			if (val.isFixedHeaderChange !== val.isFixedHeader) {
-				if (!proxy.$refs.layoutScrollbarRef) return false;
-				proxy.$refs.layoutScrollbarRef.update();
-			}
-		});
-		return {
-			getThemeConfig,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 46
nextadmin_vue3/src/layout/footer/index.vue

@@ -1,46 +0,0 @@
-<template>
-	<div class="layout-footer mt15" v-show="isDelayFooter">
-		<div class="layout-footer-warp">
-			<div>vue-next-admin,Made by lyt with ❤️</div>
-			<div class="mt5">深圳市 xxx 公司版权所有</div>
-		</div>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, defineComponent } from 'vue';
-import { onBeforeRouteUpdate } from 'vue-router';
-export default defineComponent({
-	name: 'layoutFooter',
-	setup() {
-		const state = reactive({
-			isDelayFooter: true,
-		});
-		// 路由改变时,等主界面动画加载完毕再显示 footer
-		onBeforeRouteUpdate(() => {
-			setTimeout(() => {
-				state.isDelayFooter = false;
-				setTimeout(() => {
-					state.isDelayFooter = true;
-				}, 800);
-			}, 0);
-		});
-		return {
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-footer {
-	width: 100%;
-	display: flex;
-	&-warp {
-		margin: auto;
-		color: var(--el-text-color-secondary);
-		text-align: center;
-		animation: error-num 1s ease-in-out;
-	}
-}
-</style>

+ 0 - 56
nextadmin_vue3/src/layout/index.vue

@@ -1,56 +0,0 @@
-<template>
-	<component :is="getThemeConfig.layout" />
-</template>
-
-<script lang="ts">
-import { computed, onBeforeMount, onUnmounted, getCurrentInstance, defineComponent, defineAsyncComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import { Local } from '/@/utils/storage';
-export default defineComponent({
-	name: 'layout',
-	components: {
-		defaults: defineAsyncComponent(() => import('/@/layout/main/defaults.vue')),
-		classic: defineAsyncComponent(() => import('/@/layout/main/classic.vue')),
-		transverse: defineAsyncComponent(() => import('/@/layout/main/transverse.vue')),
-		columns: defineAsyncComponent(() => import('/@/layout/main/columns.vue')),
-	},
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const store = useStore();
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 窗口大小改变时(适配移动端)
-		const onLayoutResize = () => {
-			if (!Local.get('oldLayout')) Local.set('oldLayout', getThemeConfig.value.layout);
-			const clientWidth = document.body.clientWidth;
-			if (clientWidth < 1000) {
-				getThemeConfig.value.isCollapse = false;
-				proxy.mittBus.emit('layoutMobileResize', {
-					layout: 'defaults',
-					clientWidth,
-				});
-			} else {
-				proxy.mittBus.emit('layoutMobileResize', {
-					layout: Local.get('oldLayout') ? Local.get('oldLayout') : getThemeConfig.value.layout,
-					clientWidth,
-				});
-			}
-		};
-		// 页面加载前
-		onBeforeMount(() => {
-			onLayoutResize();
-			window.addEventListener('resize', onLayoutResize);
-		});
-		// 页面卸载时
-		onUnmounted(() => {
-			window.removeEventListener('resize', onLayoutResize);
-		});
-		console.log('getThemeConfig', getThemeConfig);
-		return {
-			getThemeConfig,
-		};
-	},
-});
-</script>

+ 0 - 370
nextadmin_vue3/src/layout/lockScreen/index.vue

@@ -1,370 +0,0 @@
-<template>
-	<div v-show="isShowLockScreen">
-		<div class="layout-lock-screen-mask"></div>
-		<div class="layout-lock-screen-img" :class="{ 'layout-lock-screen-filter': isShowLoockLogin }"></div>
-		<div class="layout-lock-screen">
-			<div
-				class="layout-lock-screen-date"
-				ref="layoutLockScreenDateRef"
-				@mousedown="onDown"
-				@mousemove="onMove"
-				@mouseup="onEnd"
-				@touchstart.stop="onDown"
-				@touchmove.stop="onMove"
-				@touchend.stop="onEnd"
-			>
-				<div class="layout-lock-screen-date-box">
-					<div class="layout-lock-screen-date-box-time">
-						{{ time.hm }}<span class="layout-lock-screen-date-box-minutes">{{ time.s }}</span>
-					</div>
-					<div class="layout-lock-screen-date-box-info">{{ time.mdq }}</div>
-				</div>
-				<div class="layout-lock-screen-date-top">
-					<SvgIcon name="ele-Top" />
-					<div class="layout-lock-screen-date-top-text">上滑解锁</div>
-				</div>
-			</div>
-			<transition name="el-zoom-in-center">
-				<div v-show="isShowLoockLogin" class="layout-lock-screen-login">
-					<div class="layout-lock-screen-login-box">
-						<div class="layout-lock-screen-login-box-img">
-							<img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1813762643,1914315241&fm=26&gp=0.jpg" />
-						</div>
-						<div class="layout-lock-screen-login-box-name">Administrator</div>
-						<div class="layout-lock-screen-login-box-value">
-							<el-input
-								placeholder="请输入密码"
-								ref="layoutLockScreenInputRef"
-								v-model="lockScreenPassword"
-								@keyup.enter.native.stop="onLockScreenSubmit()"
-							>
-								<template #append>
-									<el-button @click="onLockScreenSubmit">
-										<el-icon class="el-input__icon">
-											<ele-Right />
-										</el-icon>
-									</el-button>
-								</template>
-							</el-input>
-						</div>
-					</div>
-					<div class="layout-lock-screen-login-icon">
-						<SvgIcon name="ele-Microphone" />
-						<SvgIcon name="ele-AlarmClock" />
-						<SvgIcon name="ele-SwitchButton" />
-					</div>
-				</div>
-			</transition>
-		</div>
-	</div>
-</template>
-
-<script lang="ts">
-import { nextTick, onMounted, reactive, toRefs, ref, onUnmounted, getCurrentInstance, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import { formatDate } from '/@/utils/formatTime';
-import { Local } from '/@/utils/storage';
-
-// 定义接口来定义对象的类型
-interface LockScreenState {
-	transparency: number;
-	downClientY: number;
-	moveDifference: number;
-	isShowLoockLogin: boolean;
-	isFlags: boolean;
-	querySelectorEl: HTMLElement | string;
-	time: {
-		hm: string;
-		s: string;
-		mdq: string;
-	};
-	setIntervalTime: number;
-	isShowLockScreen: boolean;
-	isShowLockScreenIntervalTime: number;
-	lockScreenPassword: string;
-}
-
-export default defineComponent({
-	name: 'layoutLockScreen',
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const layoutLockScreenInputRef = ref();
-		const store = useStore();
-		const state = reactive<LockScreenState>({
-			transparency: 1,
-			downClientY: 0,
-			moveDifference: 0,
-			isShowLoockLogin: false,
-			isFlags: false,
-			querySelectorEl: '',
-			time: {
-				hm: '',
-				s: '',
-				mdq: '',
-			},
-			setIntervalTime: 0,
-			isShowLockScreen: false,
-			isShowLockScreenIntervalTime: 0,
-			lockScreenPassword: '',
-		});
-		// 鼠标按下
-		const onDown = (down: any) => {
-			state.isFlags = true;
-			state.downClientY = down.touches ? down.touches[0].clientY : down.clientY;
-		};
-		// 鼠标移动
-		const onMove = (move: any) => {
-			if (state.isFlags) {
-				const el = <HTMLElement>state.querySelectorEl;
-				const opacitys = (state.transparency -= 1 / 200);
-				if (move.touches) {
-					state.moveDifference = move.touches[0].clientY - state.downClientY;
-				} else {
-					state.moveDifference = move.clientY - state.downClientY;
-				}
-				if (state.moveDifference >= 0) return false;
-				el.setAttribute('style', `top:${state.moveDifference}px;cursor:pointer;opacity:${opacitys};`);
-				if (state.moveDifference < -400) {
-					el.setAttribute('style', `top:${-el.clientHeight}px;cursor:pointer;transition:all 0.3s ease;`);
-					state.moveDifference = -el.clientHeight;
-					setTimeout(() => {
-						el && el.parentNode?.removeChild(el);
-					}, 300);
-				}
-				if (state.moveDifference === -el.clientHeight) {
-					state.isShowLoockLogin = true;
-					layoutLockScreenInputRef.value.focus();
-				}
-			}
-		};
-		// 鼠标松开
-		const onEnd = () => {
-			state.isFlags = false;
-			state.transparency = 1;
-			if (state.moveDifference >= -400) {
-				(<HTMLElement>state.querySelectorEl).setAttribute('style', `top:0px;opacity:1;transition:all 0.3s ease;`);
-			}
-		};
-		// 获取要拖拽的初始元素
-		const initGetElement = () => {
-			nextTick(() => {
-				state.querySelectorEl = proxy.$refs.layoutLockScreenDateRef;
-			});
-		};
-		// 时间初始化
-		const initTime = () => {
-			state.time.hm = formatDate(new Date(), 'HH:MM');
-			state.time.s = formatDate(new Date(), 'SS');
-			state.time.mdq = formatDate(new Date(), 'mm月dd日,WWW');
-		};
-		// 时间初始化定时器
-		const initSetTime = () => {
-			initTime();
-			state.setIntervalTime = window.setInterval(() => {
-				initTime();
-			}, 1000);
-		};
-		// 锁屏时间定时器
-		const initLockScreen = () => {
-			if (store.state.themeConfig.themeConfig.isLockScreen) {
-				state.isShowLockScreenIntervalTime = window.setInterval(() => {
-					if (store.state.themeConfig.themeConfig.lockScreenTime <= 1) {
-						state.isShowLockScreen = true;
-						setLocalThemeConfig();
-						return false;
-					}
-					store.state.themeConfig.themeConfig.lockScreenTime--;
-				}, 1000);
-			} else {
-				clearInterval(state.isShowLockScreenIntervalTime);
-			}
-		};
-		// 存储布局配置
-		const setLocalThemeConfig = () => {
-			store.state.themeConfig.themeConfig.isDrawer = false;
-			Local.set('themeConfig', store.state.themeConfig.themeConfig);
-		};
-		// 密码输入点击事件
-		const onLockScreenSubmit = () => {
-			store.state.themeConfig.themeConfig.isLockScreen = false;
-			store.state.themeConfig.themeConfig.lockScreenTime = 30;
-			setLocalThemeConfig();
-		};
-		// 页面加载时
-		onMounted(() => {
-			initGetElement();
-			initSetTime();
-			initLockScreen();
-		});
-		// 页面卸载时
-		onUnmounted(() => {
-			window.clearInterval(state.setIntervalTime);
-			window.clearInterval(state.isShowLockScreenIntervalTime);
-		});
-		return {
-			layoutLockScreenInputRef,
-			onDown,
-			onMove,
-			onEnd,
-			onLockScreenSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-lock-screen-fixed {
-	position: fixed;
-	top: 0;
-	left: 0;
-	width: 100%;
-	height: 100%;
-}
-.layout-lock-screen-filter {
-	filter: blur(1px);
-}
-.layout-lock-screen-mask {
-	background: var(--el-color-white);
-	@extend .layout-lock-screen-fixed;
-	z-index: 9999990;
-}
-.layout-lock-screen-img {
-	@extend .layout-lock-screen-fixed;
-	background-image: url('https://gitee.com/lyt-top/vue-next-admin-images/raw/master/images/03.jpg');
-	background-size: 100% 100%;
-	z-index: 9999991;
-}
-.layout-lock-screen {
-	@extend .layout-lock-screen-fixed;
-	z-index: 9999992;
-	&-date {
-		position: absolute;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		color: var(--el-color-white);
-		z-index: 9999993;
-		user-select: none;
-		&-box {
-			position: absolute;
-			left: 30px;
-			bottom: 50px;
-			&-time {
-				font-size: 100px;
-				color: var(--color-whites);
-			}
-			&-info {
-				font-size: 40px;
-				color: var(--color-whites);
-			}
-			&-minutes {
-				font-size: 16px;
-			}
-		}
-		&-top {
-			width: 40px;
-			height: 40px;
-			line-height: 40px;
-			border-radius: 100%;
-			border: 1px solid var(--el-border-color-light, #ebeef5);
-			background: rgba(255, 255, 255, 0.1);
-			color: var(--color-whites);
-			opacity: 0.8;
-			position: absolute;
-			right: 30px;
-			bottom: 50px;
-			text-align: center;
-			overflow: hidden;
-			transition: all 0.3s ease;
-			i {
-				transition: all 0.3s ease;
-			}
-			&-text {
-				opacity: 0;
-				position: absolute;
-				top: 150%;
-				font-size: 12px;
-				color: var(--color-whites);
-				left: 50%;
-				line-height: 1.2;
-				transform: translate(-50%, -50%);
-				transition: all 0.3s ease;
-				width: 35px;
-			}
-			&:hover {
-				border: 1px solid rgba(255, 255, 255, 0.5);
-				background: rgba(255, 255, 255, 0.2);
-				box-shadow: 0 0 12px 0 rgba(255, 255, 255, 0.5);
-				color: var(--color-whites);
-				opacity: 1;
-				transition: all 0.3s ease;
-				i {
-					transform: translateY(-40px);
-					transition: all 0.3s ease;
-				}
-				.layout-lock-screen-date-top-text {
-					opacity: 1;
-					top: 50%;
-					transition: all 0.3s ease;
-				}
-			}
-		}
-	}
-	&-login {
-		position: relative;
-		z-index: 9999994;
-		width: 100%;
-		height: 100%;
-		left: 0;
-		top: 0;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		color: var(--color-whites);
-		&-box {
-			text-align: center;
-			margin: auto;
-			&-img {
-				width: 180px;
-				height: 180px;
-				margin: auto;
-				img {
-					width: 100%;
-					height: 100%;
-					border-radius: 100%;
-				}
-			}
-			&-name {
-				font-size: 26px;
-				margin: 15px 0 30px;
-			}
-		}
-		&-icon {
-			position: absolute;
-			right: 30px;
-			bottom: 30px;
-			i {
-				font-size: 20px;
-				margin-left: 15px;
-				cursor: pointer;
-				opacity: 0.8;
-				&:hover {
-					opacity: 1;
-				}
-			}
-		}
-	}
-}
-::v-deep(.el-input-group__append) {
-	background: var(--el-color-white);
-	padding: 0px 15px;
-}
-::v-deep(.el-input__inner) {
-	border-right-color: var(--el-border-color-extra-light);
-	&:hover {
-		border-color: var(--el-border-color-extra-light);
-	}
-}
-</style>

+ 0 - 36
nextadmin_vue3/src/layout/main/classic.vue

@@ -1,36 +0,0 @@
-<template>
-	<el-container class="layout-container flex-center">
-		<Header />
-		<el-container class="layout-mian-height-50">
-			<Aside />
-			<div class="flex-center layout-backtop">
-				<TagsView v-if="getThemeConfig.isTagsview" />
-				<Main />
-			</div>
-		</el-container>
-		<el-backtop target=".layout-backtop .el-main .el-scrollbar__wrap"></el-backtop>
-	</el-container>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import Aside from '/@/layout/component/aside.vue';
-import Header from '/@/layout/component/header.vue';
-import Main from '/@/layout/component/main.vue';
-import TagsView from '/@/layout/navBars/tagsView/tagsView.vue';
-export default defineComponent({
-	name: 'layoutClassic',
-	components: { Aside, Header, Main, TagsView },
-	setup() {
-		const store = useStore();
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		return {
-			getThemeConfig,
-		};
-	},
-});
-</script>

+ 0 - 38
nextadmin_vue3/src/layout/main/columns.vue

@@ -1,38 +0,0 @@
-<template>
-	<el-container class="layout-container">
-		<ColumnsAside />
-		<div class="layout-columns-warp">
-			<Aside />
-			<el-container class="flex-center layout-backtop" :class="{ 'layout-backtop': !isFixedHeader }">
-				<Header v-if="isFixedHeader" />
-				<el-scrollbar :class="{ 'layout-backtop': isFixedHeader }">
-					<Header v-if="!isFixedHeader" />
-					<Main />
-				</el-scrollbar>
-			</el-container>
-		</div>
-		<el-backtop target=".layout-backtop .el-scrollbar__wrap"></el-backtop>
-	</el-container>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import Aside from '/@/layout/component/aside.vue';
-import Header from '/@/layout/component/header.vue';
-import Main from '/@/layout/component/main.vue';
-import ColumnsAside from '/@/layout/component/columnsAside.vue';
-export default defineComponent({
-	name: 'layoutColumns',
-	components: { Aside, Header, Main, ColumnsAside },
-	setup() {
-		const store = useStore();
-		const isFixedHeader = computed(() => {
-			return store.state.themeConfig.themeConfig.isFixedHeader;
-		});
-		return {
-			isFixedHeader,
-		};
-	},
-});
-</script>

+ 0 - 44
nextadmin_vue3/src/layout/main/defaults.vue

@@ -1,44 +0,0 @@
-<template>
-	<el-container class="layout-container">
-		<Aside />
-		<el-container class="flex-center" :class="{ 'layout-backtop': !isFixedHeader }">
-			<Header v-if="isFixedHeader" />
-			<el-scrollbar ref="layoutDefaultsScrollbarRef" :class="{ 'layout-backtop': isFixedHeader }">
-				<Header v-if="!isFixedHeader" />
-				<Main />
-			</el-scrollbar>
-		</el-container>
-		<el-backtop target=".layout-backtop .el-scrollbar__wrap"></el-backtop>
-	</el-container>
-</template>
-
-<script lang="ts">
-import { computed, getCurrentInstance, watch, defineComponent } from 'vue';
-import { useRoute } from 'vue-router';
-import { useStore } from '/@/store/index';
-import Aside from '/@/layout/component/aside.vue';
-import Header from '/@/layout/component/header.vue';
-import Main from '/@/layout/component/main.vue';
-export default defineComponent({
-	name: 'layoutDefaults',
-	components: { Aside, Header, Main },
-	setup() {
-		const { proxy } = getCurrentInstance() as any;
-		const store = useStore();
-		const route = useRoute();
-		const isFixedHeader = computed(() => {
-			return store.state.themeConfig.themeConfig.isFixedHeader;
-		});
-		// 监听路由的变化
-		watch(
-			() => route.path,
-			() => {
-				proxy.$refs.layoutDefaultsScrollbarRef.wrap$.scrollTop = 0;
-			}
-		);
-		return {
-			isFixedHeader,
-		};
-	},
-});
-</script>

+ 0 - 16
nextadmin_vue3/src/layout/main/transverse.vue

@@ -1,16 +0,0 @@
-<template>
-	<el-container class="layout-container flex-center layout-backtop">
-		<Header />
-		<Main />
-		<el-backtop target=".layout-backtop .el-main .el-scrollbar__wrap"></el-backtop>
-	</el-container>
-</template>
-
-<script lang="ts">
-import Header from '/@/layout/component/header.vue';
-import Main from '/@/layout/component/main.vue';
-export default {
-	name: 'layoutTransverse',
-	components: { Header, Main },
-};
-</script>

+ 0 - 152
nextadmin_vue3/src/layout/navBars/breadcrumb/breadcrumb.vue

@@ -1,152 +0,0 @@
-<template>
-	<div class="layout-navbars-breadcrumb" :style="{ display: isShowBreadcrumb }">
-		<SvgIcon
-			class="layout-navbars-breadcrumb-icon"
-			:name="getThemeConfig.isCollapse ? 'ele-Expand' : 'ele-Fold'"
-			:size="16"
-			@click="onThemeConfigChange"
-		/>
-		<el-breadcrumb class="layout-navbars-breadcrumb-hide">
-			<transition-group name="breadcrumb" mode="out-in">
-				<el-breadcrumb-item v-for="(v, k) in breadcrumbList" :key="v.meta.title">
-					<span v-if="k === breadcrumbList.length - 1" class="layout-navbars-breadcrumb-span">
-						<SvgIcon :name="v.meta.icon" class="layout-navbars-breadcrumb-iconfont" v-if="getThemeConfig.isBreadcrumbIcon" />{{ $t(v.meta.title) }}
-					</span>
-					<a v-else @click.prevent="onBreadcrumbClick(v)">
-						<SvgIcon :name="v.meta.icon" class="layout-navbars-breadcrumb-iconfont" v-if="getThemeConfig.isBreadcrumbIcon" />{{ $t(v.meta.title) }}
-					</a>
-				</el-breadcrumb-item>
-			</transition-group>
-		</el-breadcrumb>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, computed, onMounted, defineComponent } from 'vue';
-import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router';
-import { useStore } from '/@/store/index';
-import { Local } from '/@/utils/storage';
-
-// 定义接口来定义对象的类型
-interface BreadcrumbState {
-	breadcrumbList: Array<any>;
-	routeSplit: Array<string>;
-	routeSplitFirst: string;
-	routeSplitIndex: number;
-}
-
-export default defineComponent({
-	name: 'layoutBreadcrumb',
-	setup() {
-		const store = useStore();
-		const route = useRoute();
-		const router = useRouter();
-		const state = reactive<BreadcrumbState>({
-			breadcrumbList: [],
-			routeSplit: [],
-			routeSplitFirst: '',
-			routeSplitIndex: 1,
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 动态设置经典、横向布局不显示
-		const isShowBreadcrumb = computed(() => {
-			initRouteSplit(route.path);
-			const { layout, isBreadcrumb } = store.state.themeConfig.themeConfig;
-			if (layout === 'classic' || layout === 'transverse') return 'none';
-			else return isBreadcrumb ? '' : 'none';
-		});
-		// 面包屑点击时
-		const onBreadcrumbClick = (v: any) => {
-			const { redirect, path } = v;
-			if (redirect) router.push(redirect);
-			else router.push(path);
-		};
-		// 展开/收起左侧菜单点击
-		const onThemeConfigChange = () => {
-			store.state.themeConfig.themeConfig.isCollapse = !store.state.themeConfig.themeConfig.isCollapse;
-			setLocalThemeConfig();
-		};
-		// 存储布局配置
-		const setLocalThemeConfig = () => {
-			Local.remove('themeConfig');
-			Local.set('themeConfig', getThemeConfig.value);
-		};
-		// 处理面包屑数据
-		const getBreadcrumbList = (arr: Array<object>) => {
-			arr.map((item: any) => {
-				state.routeSplit.map((v: any, k: number, arrs: any) => {
-					if (state.routeSplitFirst === item.path) {
-						state.routeSplitFirst += `/${arrs[state.routeSplitIndex]}`;
-						state.breadcrumbList.push(item);
-						state.routeSplitIndex++;
-						if (item.children) getBreadcrumbList(item.children);
-					}
-				});
-			});
-		};
-		// 当前路由字符串切割成数组,并删除第一项空内容
-		const initRouteSplit = (path: string) => {
-			if (!store.state.themeConfig.themeConfig.isBreadcrumb) return false;
-			state.breadcrumbList = [store.state.routesList.routesList[0]];
-			state.routeSplit = path.split('/');
-			state.routeSplit.shift();
-			state.routeSplitFirst = `/${state.routeSplit[0]}`;
-			state.routeSplitIndex = 1;
-			getBreadcrumbList(store.state.routesList.routesList);
-		};
-		// 页面加载时
-		onMounted(() => {
-			initRouteSplit(route.path);
-		});
-		// 路由更新时
-		onBeforeRouteUpdate((to) => {
-			initRouteSplit(to.path);
-		});
-		return {
-			onThemeConfigChange,
-			isShowBreadcrumb,
-			getThemeConfig,
-			onBreadcrumbClick,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-breadcrumb {
-	flex: 1;
-	height: inherit;
-	display: flex;
-	align-items: center;
-	padding-left: 15px;
-	.layout-navbars-breadcrumb-icon {
-		cursor: pointer;
-		font-size: 18px;
-		margin-right: 15px;
-		color: var(--next-bg-topBarColor);
-	}
-	.layout-navbars-breadcrumb-span {
-		opacity: 0.7;
-		color: var(--next-bg-topBarColor);
-	}
-	.layout-navbars-breadcrumb-iconfont {
-		font-size: 14px;
-		margin-right: 5px;
-	}
-	::v-deep(.el-breadcrumb__separator) {
-		opacity: 0.7;
-		color: var(--next-bg-topBarColor);
-	}
-	::v-deep(.el-breadcrumb__inner a, .el-breadcrumb__inner.is-link) {
-		font-weight: unset !important;
-		color: var(--next-bg-topBarColor);
-		&:hover {
-			color: var(--el-color-primary) !important;
-		}
-	}
-}
-</style>

+ 0 - 63
nextadmin_vue3/src/layout/navBars/breadcrumb/closeFull.vue

@@ -1,63 +0,0 @@
-<template>
-	<div class="layout-navbars-close-full" v-if="isTagsViewCurrenFull">
-		<div class="layout-navbars-close-full-box" :title="$t('message.tagsView.closeFullscreen')" @click="onCloseFullscreen">
-			<SvgIcon name="ele-Close" />
-		</div>
-	</div>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-export default defineComponent({
-	name: 'layoutCloseFull',
-	setup() {
-		const store = useStore();
-		// 获取卡片全屏信息
-		const isTagsViewCurrenFull = computed(() => {
-			return store.state.tagsViewRoutes.isTagsViewCurrenFull;
-		});
-		// 关闭当前全屏
-		const onCloseFullscreen = () => {
-			store.dispatch('tagsViewRoutes/setCurrenFullscreen', false);
-		};
-		return {
-			isTagsViewCurrenFull,
-			onCloseFullscreen,
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-close-full {
-	position: fixed;
-	z-index: 9999999999;
-	right: -30px;
-	top: -30px;
-	.layout-navbars-close-full-box {
-		width: 60px;
-		height: 60px;
-		border-radius: 100%;
-		position: relative;
-		cursor: pointer;
-		background: rgba(0, 0, 0, 0.1);
-		transition: all 0.3s ease;
-		i {
-			position: absolute;
-			left: 11px;
-			top: 35px;
-			color: #333333;
-			transition: all 0.3s ease;
-		}
-		&:hover {
-			background: rgba(0, 0, 0, 0.2);
-			transition: all 0.3s ease;
-			i {
-				color: var(--el-color-primary);
-				transition: all 0.3s ease;
-			}
-		}
-	}
-}
-</style>

+ 0 - 115
nextadmin_vue3/src/layout/navBars/breadcrumb/index.vue

@@ -1,115 +0,0 @@
-<template>
-	<div class="layout-navbars-breadcrumb-index">
-		<Logo v-if="setIsShowLogo" />
-		<Breadcrumb />
-		<Horizontal :menuList="menuList" v-if="isLayoutTransverse" />
-		<User />
-	</div>
-</template>
-
-<script lang="ts">
-import { computed, reactive, toRefs, onMounted, onUnmounted, getCurrentInstance, defineComponent } from 'vue';
-import { useRoute } from 'vue-router';
-import { useStore } from '/@/store/index';
-import Breadcrumb from '/@/layout/navBars/breadcrumb/breadcrumb.vue';
-import User from '/@/layout/navBars/breadcrumb/user.vue';
-import Logo from '/@/layout/logo/index.vue';
-import Horizontal from '/@/layout/navMenu/horizontal.vue';
-
-// 定义接口来定义对象的类型
-interface IndexState {
-	menuList: object[];
-}
-
-export default defineComponent({
-	name: 'layoutBreadcrumbIndex',
-	components: { Breadcrumb, User, Logo, Horizontal },
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const store = useStore();
-		const route = useRoute();
-		const state = reactive<IndexState>({
-			menuList: [],
-		});
-		// 设置 logo 显示/隐藏
-		const setIsShowLogo = computed(() => {
-			let { isShowLogo, layout } = store.state.themeConfig.themeConfig;
-			return (isShowLogo && layout === 'classic') || (isShowLogo && layout === 'transverse');
-		});
-		// 设置是否显示横向导航菜单
-		const isLayoutTransverse = computed(() => {
-			let { layout, isClassicSplitMenu } = store.state.themeConfig.themeConfig;
-			return layout === 'transverse' || (isClassicSplitMenu && layout === 'classic');
-		});
-		// 设置/过滤路由(非静态路由/是否显示在菜单中)
-		const setFilterRoutes = () => {
-			let { layout, isClassicSplitMenu } = store.state.themeConfig.themeConfig;
-			if (layout === 'classic' && isClassicSplitMenu) {
-				state.menuList = delClassicChildren(filterRoutesFun(store.state.routesList.routesList));
-				const resData = setSendClassicChildren(route.path);
-				proxy.mittBus.emit('setSendClassicChildren', resData);
-			} else {
-				state.menuList = filterRoutesFun(store.state.routesList.routesList);
-			}
-		};
-		// 设置了分割菜单时,删除底下 children
-		const delClassicChildren = (arr: Array<object>) => {
-			arr.map((v: any) => {
-				if (v.children) delete v.children;
-			});
-			return arr;
-		};
-		// 路由过滤递归函数
-		const filterRoutesFun = (arr: Array<object>) => {
-			return arr
-				.filter((item: any) => !item.meta.isHide)
-				.map((item: any) => {
-					item = Object.assign({}, item);
-					if (item.children) item.children = filterRoutesFun(item.children);
-					return item;
-				});
-		};
-		// 传送当前子级数据到菜单中
-		const setSendClassicChildren = (path: string) => {
-			const currentPathSplit = path.split('/');
-			let currentData: any = {};
-			filterRoutesFun(store.state.routesList.routesList).map((v, k) => {
-				if (v.path === `/${currentPathSplit[1]}`) {
-					v['k'] = k;
-					currentData['item'] = [{ ...v }];
-					currentData['children'] = [{ ...v }];
-					if (v.children) currentData['children'] = v.children;
-				}
-			});
-			return currentData;
-		};
-		// 页面加载时
-		onMounted(() => {
-			setFilterRoutes();
-			proxy.mittBus.on('getBreadcrumbIndexSetFilterRoutes', () => {
-				setFilterRoutes();
-			});
-		});
-		// 页面卸载时
-		onUnmounted(() => {
-			proxy.mittBus.off('getBreadcrumbIndexSetFilterRoutes');
-		});
-		return {
-			setIsShowLogo,
-			isLayoutTransverse,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-breadcrumb-index {
-	height: 50px;
-	display: flex;
-	align-items: center;
-	padding-right: 15px;
-	background: var(--next-bg-topBar);
-	border-bottom: 1px solid var(--next-border-color-light);
-}
-</style>

+ 0 - 134
nextadmin_vue3/src/layout/navBars/breadcrumb/search.vue

@@ -1,134 +0,0 @@
-<template>
-	<div class="layout-search-dialog">
-		<el-dialog v-model="isShowSearch" width="300px" destroy-on-close :modal="false" fullscreen :show-close="false">
-			<el-autocomplete
-				v-model="menuQuery"
-				:fetch-suggestions="menuSearch"
-				:placeholder="$t('message.user.searchPlaceholder')"
-				ref="layoutMenuAutocompleteRef"
-				@select="onHandleSelect"
-				@blur="onSearchBlur"
-			>
-				<template #prefix>
-					<el-icon class="el-input__icon">
-						<ele-Search />
-					</el-icon>
-				</template>
-				<template #default="{ item }">
-					<div>
-						<SvgIcon :name="item.meta.icon" class="mr5" />
-						{{ $t(item.meta.title) }}
-					</div>
-				</template>
-			</el-autocomplete>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent, ref, nextTick } from 'vue';
-import { useRouter } from 'vue-router';
-import { useI18n } from 'vue-i18n';
-import { useStore } from '/@/store/index';
-
-// 定义接口来定义对象的类型
-interface SearchState {
-	isShowSearch: boolean;
-	menuQuery: string;
-	tagsViewList: object[];
-}
-interface Restaurant {
-	path: string;
-	meta: {
-		title: string;
-	};
-}
-
-export default defineComponent({
-	name: 'layoutBreadcrumbSearch',
-	setup() {
-		const layoutMenuAutocompleteRef = ref();
-		const { t } = useI18n();
-		const store = useStore();
-		const router = useRouter();
-		const state = reactive<SearchState>({
-			isShowSearch: false,
-			menuQuery: '',
-			tagsViewList: [],
-		});
-		// 搜索弹窗打开
-		const openSearch = () => {
-			state.menuQuery = '';
-			state.isShowSearch = true;
-			initTageView();
-			nextTick(() => {
-				layoutMenuAutocompleteRef.value.focus();
-			});
-		};
-		// 搜索弹窗关闭
-		const closeSearch = () => {
-			state.isShowSearch = false;
-		};
-		// 菜单搜索数据过滤
-		const menuSearch = (queryString: string, cb: Function) => {
-			let results = queryString ? state.tagsViewList.filter(createFilter(queryString)) : state.tagsViewList;
-			cb(results);
-		};
-		// 菜单搜索过滤
-		const createFilter: any = (queryString: string) => {
-			return (restaurant: Restaurant) => {
-				return (
-					restaurant.path.toLowerCase().indexOf(queryString.toLowerCase()) > -1 ||
-					restaurant.meta.title.toLowerCase().indexOf(queryString.toLowerCase()) > -1 ||
-					t(restaurant.meta.title).indexOf(queryString.toLowerCase()) > -1
-				);
-			};
-		};
-		// 初始化菜单数据
-		const initTageView = () => {
-			if (state.tagsViewList.length > 0) return false;
-			store.state.tagsViewRoutes.tagsViewRoutes.map((v: any) => {
-				if (!v.meta.isHide) state.tagsViewList.push({ ...v });
-			});
-		};
-		// 当前菜单选中时
-		const onHandleSelect = (item: any) => {
-			let { path, redirect } = item;
-			if (item.meta.isLink && !item.meta.isIframe) window.open(item.meta.isLink);
-			else if (redirect) router.push(redirect);
-			else router.push(path);
-			closeSearch();
-		};
-		// input 失去焦点时
-		const onSearchBlur = () => {
-			closeSearch();
-		};
-		return {
-			layoutMenuAutocompleteRef,
-			openSearch,
-			closeSearch,
-			menuSearch,
-			onHandleSelect,
-			onSearchBlur,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-search-dialog {
-	::v-deep(.el-dialog) {
-		box-shadow: unset !important;
-		border-radius: 0 !important;
-		background: rgba(0, 0, 0, 0.5);
-	}
-	::v-deep(.el-autocomplete) {
-		width: 560px;
-		position: absolute;
-		top: 100px;
-		left: 50%;
-		transform: translateX(-50%);
-	}
-}
-</style>

+ 0 - 295
nextadmin_vue3/src/layout/navBars/breadcrumb/user.vue

@@ -1,295 +0,0 @@
-<template>
-	<div class="layout-navbars-breadcrumb-user" :style="{ flex: layoutUserFlexNum }">
-		<el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onComponentSizeChange">
-			<div class="layout-navbars-breadcrumb-user-icon">
-				<i class="iconfont icon-ziti" :title="$t('message.user.title0')"></i>
-			</div>
-			<template #dropdown>
-				<el-dropdown-menu>
-					<el-dropdown-item command="large" :disabled="disabledSize === 'large'">{{ $t('message.user.dropdownLarge') }}</el-dropdown-item>
-					<el-dropdown-item command="default" :disabled="disabledSize === 'default'">{{ $t('message.user.dropdownDefault') }}</el-dropdown-item>
-					<el-dropdown-item command="small" :disabled="disabledSize === 'small'">{{ $t('message.user.dropdownSmall') }}</el-dropdown-item>
-				</el-dropdown-menu>
-			</template>
-		</el-dropdown>
-		<el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">
-			<div class="layout-navbars-breadcrumb-user-icon">
-				<i class="iconfont" :class="disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'" :title="$t('message.user.title1')"></i>
-			</div>
-			<template #dropdown>
-				<el-dropdown-menu>
-					<el-dropdown-item command="zh-cn" :disabled="disabledI18n === 'zh-cn'">简体中文</el-dropdown-item>
-				</el-dropdown-menu>
-			</template>
-		</el-dropdown>
-		<div class="layout-navbars-breadcrumb-user-icon" @click="onSearchClick">
-			<el-icon :title="$t('message.user.title2')">
-				<ele-Search />
-			</el-icon>
-		</div>
-		<div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">
-			<i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>
-		</div>
-		<div class="layout-navbars-breadcrumb-user-icon">
-			<el-popover placement="bottom" trigger="click" :width="300">
-				<template #reference>
-					<el-badge :is-dot="true">
-						<el-icon :title="$t('message.user.title4')">
-							<ele-Bell />
-						</el-icon>
-					</el-badge>
-				</template>
-				<UserNews />
-			</el-popover>
-		</div>
-		<div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick">
-			<i
-				class="iconfont"
-				:title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')"
-				:class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"
-			></i>
-		</div>
-		<el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick">
-			<span class="layout-navbars-breadcrumb-user-link">
-				<img :src="getUserInfos.photo" class="layout-navbars-breadcrumb-user-link-photo mr5" />
-				{{ getUserInfos.userName === '' ? 'common' : getUserInfos.userName }}
-				<el-icon class="el-icon--right">
-					<ele-ArrowDown />
-				</el-icon>
-			</span>
-			<template #dropdown>
-				<el-dropdown-menu>
-					<el-dropdown-item divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item>
-				</el-dropdown-menu>
-			</template>
-		</el-dropdown>
-		<Search ref="searchRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { ref, getCurrentInstance, computed, reactive, toRefs, onMounted, defineComponent } from 'vue';
-import { useRouter } from 'vue-router';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import screenfull from 'screenfull';
-import { useI18n } from 'vue-i18n';
-import { resetRoute } from '/@/router/index';
-import { useStore } from '/@/store/index';
-import other from '/@/utils/other';
-import { Session, Local } from '/@/utils/storage';
-import UserNews from '/@/layout/navBars/breadcrumb/userNews.vue';
-import Search from '/@/layout/navBars/breadcrumb/search.vue';
-export default defineComponent({
-	name: 'layoutBreadcrumbUser',
-	components: { UserNews, Search },
-	setup() {
-		const { t } = useI18n();
-		const { proxy } = <any>getCurrentInstance();
-		const router = useRouter();
-		const store = useStore();
-		const searchRef = ref();
-		const state = reactive({
-			isScreenfull: false,
-			disabledI18n: 'zh-cn',
-			disabledSize: 'large',
-		});
-		// 获取用户信息 vuex
-		const getUserInfos = computed(() => {
-			return <any>store.state.userInfos.userInfos;
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 设置分割样式
-		const layoutUserFlexNum = computed(() => {
-			let num: string | number = '';
-			const { layout, isClassicSplitMenu } = getThemeConfig.value;
-			const layoutArr: string[] = ['defaults', 'columns'];
-			if (layoutArr.includes(layout) || (layout === 'classic' && !isClassicSplitMenu)) num = '1';
-			else num = '';
-			return num;
-		});
-		// 全屏点击时
-		const onScreenfullClick = () => {
-			if (!screenfull.isEnabled) {
-				ElMessage.warning('暂不不支持全屏');
-				return false;
-			}
-			screenfull.toggle();
-			screenfull.on('change', () => {
-				if (screenfull.isFullscreen) state.isScreenfull = true;
-				else state.isScreenfull = false;
-			});
-		};
-		// 布局配置 icon 点击时
-		const onLayoutSetingClick = () => {
-			proxy.mittBus.emit('openSetingsDrawer');
-		};
-		// 下拉菜单点击时
-		const onHandleCommandClick = (path: string) => {
-			if (path === 'logOut') {
-				ElMessageBox({
-					closeOnClickModal: false,
-					closeOnPressEscape: false,
-					title: t('message.user.logOutTitle'),
-					message: t('message.user.logOutMessage'),
-					showCancelButton: true,
-					confirmButtonText: t('message.user.logOutConfirm'),
-					cancelButtonText: t('message.user.logOutCancel'),
-					buttonSize: 'default',
-					beforeClose: (action, instance, done) => {
-						if (action === 'confirm') {
-							instance.confirmButtonLoading = true;
-							instance.confirmButtonText = t('message.user.logOutExit');
-							setTimeout(() => {
-								done();
-								setTimeout(() => {
-									instance.confirmButtonLoading = false;
-								}, 300);
-							}, 700);
-						} else {
-							done();
-						}
-					},
-				})
-					.then(async () => {
-						Session.clear(); // 清除缓存/token等
-						await resetRoute(); // 删除/重置路由
-						ElMessage.success(t('message.user.logOutSuccess'));
-						setTimeout(() => {
-							window.location.href = ''; // 去登录页
-						}, 500);
-					})
-					.catch(() => {});
-			} else if (path === 'wareHouse') {
-				window.open('https://gitee.com/lyt-top/vue-next-admin');
-			} else {
-				router.push(path);
-			}
-		};
-		// 菜单搜索点击
-		const onSearchClick = () => {
-			searchRef.value.openSearch();
-		};
-		// 组件大小改变
-		const onComponentSizeChange = (size: string) => {
-			Local.remove('themeConfig');
-			getThemeConfig.value.globalComponentSize = size;
-			Local.set('themeConfig', getThemeConfig.value);
-			initComponentSize();
-			window.location.reload();
-		};
-		// 语言切换
-		const onLanguageChange = (lang: string) => {
-			Local.remove('themeConfig');
-			getThemeConfig.value.globalI18n = lang;
-			Local.set('themeConfig', getThemeConfig.value);
-			proxy.$i18n.locale = lang;
-			initI18n();
-			other.useTitle();
-		};
-		// 设置 element plus 组件的国际化
-		const setI18nConfig = (locale: string) => {
-			proxy.mittBus.emit('getI18nConfig', proxy.$i18n.messages[locale]);
-		};
-		// 初始化言语国际化
-		const initI18n = () => {
-			switch (Local.get('themeConfig').globalI18n) {
-				case 'zh-cn':
-					state.disabledI18n = 'zh-cn';
-					setI18nConfig('zh-cn');
-					break;
-				case 'en':
-					state.disabledI18n = 'en';
-					setI18nConfig('en');
-					break;
-				case 'zh-tw':
-					state.disabledI18n = 'zh-tw';
-					setI18nConfig('zh-tw');
-					break;
-			}
-		};
-		// 初始化全局组件大小
-		const initComponentSize = () => {
-			switch (Local.get('themeConfig').globalComponentSize) {
-				case 'large':
-					state.disabledSize = 'large';
-					break;
-				case 'default':
-					state.disabledSize = 'default';
-					break;
-				case 'small':
-					state.disabledSize = 'small';
-					break;
-			}
-		};
-		// 页面加载时
-		onMounted(() => {
-			if (Local.get('themeConfig')) {
-				initI18n();
-				initComponentSize();
-			}
-		});
-		return {
-			getUserInfos,
-			onLayoutSetingClick,
-			onHandleCommandClick,
-			onScreenfullClick,
-			onSearchClick,
-			onComponentSizeChange,
-			onLanguageChange,
-			searchRef,
-			layoutUserFlexNum,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-breadcrumb-user {
-	display: flex;
-	align-items: center;
-	justify-content: flex-end;
-	&-link {
-		height: 100%;
-		display: flex;
-		align-items: center;
-		white-space: nowrap;
-		&-photo {
-			width: 25px;
-			height: 25px;
-			border-radius: 100%;
-		}
-	}
-	&-icon {
-		padding: 0 10px;
-		cursor: pointer;
-		color: var(--next-bg-topBarColor);
-		height: 50px;
-		line-height: 50px;
-		display: flex;
-		align-items: center;
-		&:hover {
-			background: var(--next-color-user-hover);
-			i {
-				display: inline-block;
-				animation: logoAnimation 0.3s ease-in-out;
-			}
-		}
-	}
-	::v-deep(.el-dropdown) {
-		color: var(--next-bg-topBarColor);
-	}
-	::v-deep(.el-badge) {
-		height: 40px;
-		line-height: 40px;
-		display: flex;
-		align-items: center;
-	}
-	::v-deep(.el-badge__content.is-fixed) {
-		top: 12px;
-	}
-}
-</style>

+ 0 - 114
nextadmin_vue3/src/layout/navBars/breadcrumb/userNews.vue

@@ -1,114 +0,0 @@
-<template>
-	<div class="layout-navbars-breadcrumb-user-news">
-		<div class="head-box">
-			<div class="head-box-title">{{ $t('message.user.newTitle') }}</div>
-			<div class="head-box-btn" v-if="newsList.length > 0" @click="onAllReadClick">{{ $t('message.user.newBtn') }}</div>
-		</div>
-		<div class="content-box">
-			<template v-if="newsList.length > 0">
-				<div class="content-box-item" v-for="(v, k) in newsList" :key="k">
-					<div>{{ v.label }}</div>
-					<div class="content-box-msg">
-						{{ v.value }}
-					</div>
-					<div class="content-box-time">{{ v.time }}</div>
-				</div>
-			</template>
-			<el-empty :description="$t('message.user.newDesc')" v-else></el-empty>
-		</div>
-		<div class="foot-box" @click="onGoToGiteeClick" v-if="newsList.length > 0">{{ $t('message.user.newGo') }}</div>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent } from 'vue';
-export default defineComponent({
-	name: 'layoutBreadcrumbUserNews',
-	setup() {
-		const state = reactive({
-			newsList: [
-				{
-					label: '关于版本发布的通知',
-					value: 'vue-next-admin,基于 vue3 + CompositionAPI + typescript + vite + element plus,正式发布时间:2021年02月28日!',
-					time: '2020-12-08',
-				},
-				{
-					label: '关于学习交流的通知',
-					value: 'QQ群号码 665452019,欢迎小伙伴入群学习交流探讨!',
-					time: '2020-12-08',
-				},
-			],
-		});
-		// 全部已读点击
-		const onAllReadClick = () => {
-			state.newsList = [];
-		};
-		// 前往通知中心点击
-		const onGoToGiteeClick = () => {
-			window.open('https://gitee.com/lyt-top/vue-next-admin');
-		};
-		return {
-			onAllReadClick,
-			onGoToGiteeClick,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-breadcrumb-user-news {
-	.head-box {
-		display: flex;
-		border-bottom: 1px solid var(--el-border-color-lighter);
-		box-sizing: border-box;
-		color: var(--el-text-color-primary);
-		justify-content: space-between;
-		height: 35px;
-		align-items: center;
-		.head-box-btn {
-			color: var(--el-color-primary);
-			font-size: 13px;
-			cursor: pointer;
-			opacity: 0.8;
-			&:hover {
-				opacity: 1;
-			}
-		}
-	}
-	.content-box {
-		font-size: 13px;
-		.content-box-item {
-			padding-top: 12px;
-			&:last-of-type {
-				padding-bottom: 12px;
-			}
-			.content-box-msg {
-				color: var(--el-text-color-secondary);
-				margin-top: 5px;
-				margin-bottom: 5px;
-			}
-			.content-box-time {
-				color: var(--el-text-color-secondary);
-			}
-		}
-	}
-	.foot-box {
-		height: 35px;
-		color: var(--el-color-primary);
-		font-size: 13px;
-		cursor: pointer;
-		opacity: 0.8;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		border-top: 1px solid var(--el-border-color-lighter);
-		&:hover {
-			opacity: 1;
-		}
-	}
-	::v-deep(.el-empty__description p) {
-		font-size: 13px;
-	}
-}
-</style>

+ 0 - 37
nextadmin_vue3/src/layout/navBars/index.vue

@@ -1,37 +0,0 @@
-<template>
-	<div class="layout-navbars-container">
-		<BreadcrumbIndex />
-		<TagsView v-if="setShowTagsView" />
-	</div>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import BreadcrumbIndex from '/@/layout/navBars/breadcrumb/index.vue';
-import TagsView from '/@/layout/navBars/tagsView/tagsView.vue';
-export default defineComponent({
-	name: 'layoutNavBars',
-	components: { BreadcrumbIndex, TagsView },
-	setup() {
-		const store = useStore();
-		// 是否显示 tagsView
-		const setShowTagsView = computed(() => {
-			let { layout, isTagsview } = store.state.themeConfig.themeConfig;
-			return layout !== 'classic' && isTagsview;
-		});
-		return {
-			setShowTagsView,
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-container {
-	display: flex;
-	flex-direction: column;
-	width: 100%;
-	height: 100%;
-}
-</style>

+ 0 - 137
nextadmin_vue3/src/layout/navBars/tagsView/contextmenu.vue

@@ -1,137 +0,0 @@
-<template>
-	<transition name="el-zoom-in-center">
-		<div
-			aria-hidden="true"
-			class="el-dropdown__popper el-popper is-light is-pure custom-contextmenu"
-			role="tooltip"
-			data-popper-placement="bottom"
-			:style="`top: ${dropdowns.y + 5}px;left: ${dropdowns.x}px;`"
-			:key="Math.random()"
-			v-show="isShow"
-		>
-			<ul class="el-dropdown-menu">
-				<template v-for="(v, k) in dropdownList">
-					<li
-						class="el-dropdown-menu__item"
-						aria-disabled="false"
-						tabindex="-1"
-						:key="k"
-						v-if="!v.affix"
-						@click="onCurrentContextmenuClick(v.contextMenuClickId)"
-					>
-						<SvgIcon :name="v.icon" />
-						<span>{{ $t(v.txt) }}</span>
-					</li>
-				</template>
-			</ul>
-			<div class="el-popper__arrow" :style="{ left: `${arrowLeft}px` }"></div>
-		</div>
-	</transition>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent, reactive, toRefs, onMounted, onUnmounted, watch } from 'vue';
-export default defineComponent({
-	name: 'layoutTagsViewContextmenu',
-	props: {
-		dropdown: {
-			type: Object,
-			default: () => {
-				return {
-					x: 0,
-					y: 0,
-				};
-			},
-		},
-	},
-	setup(props, { emit }) {
-		const state = reactive({
-			isShow: false,
-			dropdownList: [
-				{ contextMenuClickId: 0, txt: 'message.tagsView.refresh', affix: false, icon: 'ele-RefreshRight' },
-				{ contextMenuClickId: 1, txt: 'message.tagsView.close', affix: false, icon: 'ele-Close' },
-				{ contextMenuClickId: 2, txt: 'message.tagsView.closeOther', affix: false, icon: 'ele-CircleClose' },
-				{ contextMenuClickId: 3, txt: 'message.tagsView.closeAll', affix: false, icon: 'ele-FolderDelete' },
-				{
-					contextMenuClickId: 4,
-					txt: 'message.tagsView.fullscreen',
-					affix: false,
-					icon: 'iconfont icon-fullscreen',
-				},
-			],
-			item: {},
-			arrowLeft: 10,
-		});
-		// 父级传过来的坐标 x,y 值
-		const dropdowns = computed(() => {
-			// 117 为 `Dropdown 下拉菜单` 的宽度
-			if (props.dropdown.x + 117 > document.documentElement.clientWidth) {
-				return {
-					x: document.documentElement.clientWidth - 117 - 5,
-					y: props.dropdown.y,
-				};
-			} else {
-				return props.dropdown;
-			}
-		});
-		// 当前项菜单点击
-		const onCurrentContextmenuClick = (contextMenuClickId: number) => {
-			emit('currentContextmenuClick', Object.assign({}, { contextMenuClickId }, state.item));
-		};
-		// 打开右键菜单:判断是否固定,固定则不显示关闭按钮
-		const openContextmenu = (item: any) => {
-			state.item = item;
-			item.meta.isAffix ? (state.dropdownList[1].affix = true) : (state.dropdownList[1].affix = false);
-			closeContextmenu();
-			setTimeout(() => {
-				state.isShow = true;
-			}, 10);
-		};
-		// 关闭右键菜单
-		const closeContextmenu = () => {
-			state.isShow = false;
-		};
-		// 监听页面监听进行右键菜单的关闭
-		onMounted(() => {
-			document.body.addEventListener('click', closeContextmenu);
-		});
-		// 页面卸载时,移除右键菜单监听事件
-		onUnmounted(() => {
-			document.body.removeEventListener('click', closeContextmenu);
-		});
-		// 监听下拉菜单位置
-		watch(
-			() => props.dropdown,
-			({ x }) => {
-				if (x + 117 > document.documentElement.clientWidth) state.arrowLeft = 117 - (document.documentElement.clientWidth - x);
-				else state.arrowLeft = 10;
-			},
-			{
-				deep: true,
-			}
-		);
-		return {
-			dropdowns,
-			openContextmenu,
-			closeContextmenu,
-			onCurrentContextmenuClick,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.custom-contextmenu {
-	transform-origin: center top;
-	z-index: 2190;
-	position: fixed;
-	.el-dropdown-menu__item {
-		font-size: 12px !important;
-		white-space: nowrap;
-		i {
-			font-size: 12px !important;
-		}
-	}
-}
-</style>

+ 0 - 681
nextadmin_vue3/src/layout/navBars/tagsView/tagsView.vue

@@ -1,681 +0,0 @@
-<template>
-	<div class="layout-navbars-tagsview" :class="{ 'layout-navbars-tagsview-shadow': getThemeConfig.layout === 'classic' }">
-		<el-scrollbar ref="scrollbarRef" @wheel.native.prevent="onHandleScroll">
-			<ul class="layout-navbars-tagsview-ul" :class="setTagsStyle" ref="tagsUlRef">
-				<li
-					v-for="(v, k) in tagsViewList"
-					:key="k"
-					class="layout-navbars-tagsview-ul-li"
-					:data-url="v.url"
-					:class="{ 'is-active': isActive(v) }"
-					@contextmenu.prevent="onContextmenu(v, $event)"
-					@click="onTagsClick(v, k)"
-					:ref="
-						(el) => {
-							if (el) tagsRefs[k] = el;
-						}
-					"
-				>
-					<i class="iconfont icon-webicon318 layout-navbars-tagsview-ul-li-iconfont font14" v-if="isActive(v)"></i>
-					<SvgIcon :name="v.meta.icon" class="layout-navbars-tagsview-ul-li-iconfont" v-if="!isActive(v) && getThemeConfig.isTagsviewIcon" />
-					<span>{{ $t(v.meta.title) }}</span>
-					<template v-if="isActive(v)">
-						<SvgIcon
-							name="ele-RefreshRight"
-							class="ml5 layout-navbars-tagsview-ul-li-refresh"
-							@click.stop="refreshCurrentTagsView($route.fullPath)"
-						/>
-						<SvgIcon
-							name="ele-Close"
-							class="layout-navbars-tagsview-ul-li-icon layout-icon-active"
-							v-if="!v.meta.isAffix"
-							@click.stop="closeCurrentTagsView(getThemeConfig.isShareTagsView ? v.path : v.url)"
-						/>
-					</template>
-					<SvgIcon
-						name="ele-Close"
-						class="layout-navbars-tagsview-ul-li-icon layout-icon-three"
-						v-if="!v.meta.isAffix"
-						@click.stop="closeCurrentTagsView(getThemeConfig.isShareTagsView ? v.path : v.url)"
-					/>
-				</li>
-			</ul>
-		</el-scrollbar>
-		<Contextmenu :dropdown="dropdown" ref="contextmenuRef" @currentContextmenuClick="onCurrentContextmenuClick" />
-	</div>
-</template>
-
-<script lang="ts">
-import {
-	toRefs,
-	reactive,
-	onMounted,
-	computed,
-	ref,
-	nextTick,
-	onBeforeUpdate,
-	onBeforeMount,
-	onUnmounted,
-	getCurrentInstance,
-	watch,
-	defineComponent,
-} from 'vue';
-import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
-import Sortable from 'sortablejs';
-import { ElMessage } from 'element-plus';
-import { useStore } from '/@/store/index';
-import { Session } from '/@/utils/storage';
-import { isObjectValueEqual } from '/@/utils/arrayOperation';
-import other from '/@/utils/other';
-import Contextmenu from '/@/layout/navBars/tagsView/contextmenu.vue';
-
-// 定义接口来定义对象的类型
-interface TagsViewState {
-	routeActive: string;
-	routePath: string | unknown;
-	dropdown: {
-		x: string | number;
-		y: string | number;
-	};
-	tagsRefsIndex: number;
-	tagsViewList: any[];
-	sortable: any;
-	tagsViewRoutesList: any[];
-}
-interface RouteParams {
-	path: string;
-	url: string;
-}
-interface CurrentContextmenu {
-	meta: {
-		isDynamic: boolean;
-	};
-	params: any;
-	query: any;
-	path: string;
-	contextMenuClickId: string | number;
-}
-
-export default defineComponent({
-	name: 'layoutTagsView',
-	components: { Contextmenu },
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const tagsRefs = ref<any[]>([]);
-		const scrollbarRef = ref();
-		const contextmenuRef = ref();
-		const tagsUlRef = ref();
-		const store = useStore();
-		const route = useRoute();
-		const router = useRouter();
-		const state = reactive<TagsViewState>({
-			routeActive: '',
-			routePath: route.path,
-			dropdown: { x: '', y: '' },
-			tagsRefsIndex: 0,
-			tagsViewList: [],
-			sortable: '',
-			tagsViewRoutesList: [],
-		});
-		// 动态设置 tagsView 风格样式
-		const setTagsStyle = computed(() => {
-			return store.state.themeConfig.themeConfig.tagsStyle;
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 设置 tagsView 高亮
-		const isActive = (v: RouteParams) => {
-			if (getThemeConfig.value.isShareTagsView) {
-				return v.path === state.routePath;
-			} else {
-				return v.url ? v.url === state.routeActive : v.path === state.routeActive;
-			}
-		};
-		// 存储 tagsViewList 到浏览器临时缓存中,页面刷新时,保留记录
-		const addBrowserSetSession = (tagsViewList: Array<object>) => {
-			Session.set('tagsViewList', tagsViewList);
-		};
-		// 获取 vuex 中的 tagsViewRoutes 列表
-		const getTagsViewRoutes = async () => {
-			state.routeActive = await setTagsViewHighlight(route);
-			state.routePath = (await route.meta.isDynamic) ? route.meta.isDynamicPath : route.path;
-			state.tagsViewList = [];
-			state.tagsViewRoutesList = store.state.tagsViewRoutes.tagsViewRoutes;
-			initTagsView();
-		};
-		// vuex 中获取路由信息:如果是设置了固定的(isAffix),进行初始化显示
-		const initTagsView = async () => {
-			if (Session.get('tagsViewList') && getThemeConfig.value.isCacheTagsView) {
-				state.tagsViewList = await Session.get('tagsViewList');
-			} else {
-				await state.tagsViewRoutesList.map((v: any) => {
-					if (v.meta.isAffix && !v.meta.isHide) {
-						v.url = setTagsViewHighlight(v);
-						state.tagsViewList.push({ ...v });
-					}
-				});
-				await addTagsView(route.path, route);
-			}
-			// 初始化当前元素(li)的下标
-			getTagsRefsIndex(getThemeConfig.value.isShareTagsView ? state.routePath : state.routeActive);
-		};
-		// 处理可开启多标签详情,单标签详情(动态路由(xxx/:id/:name"),普通路由处理)
-		const solveAddTagsView = async (path: string, to?: any) => {
-			let isDynamicPath = to.meta.isDynamic ? to.meta.isDynamicPath : path;
-			let current = state.tagsViewList.filter(
-				(v: any) =>
-					v.path === isDynamicPath &&
-					isObjectValueEqual(
-						to.meta.isDynamic ? (v.params ? v.params : null) : v.query ? v.query : null,
-						to.meta.isDynamic ? (to?.params ? to?.params : null) : to?.query ? to?.query : null
-					)
-			);
-			if (current.length <= 0) {
-				// 防止:Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.
-				let findItem = state.tagsViewRoutesList.find((v: any) => v.path === isDynamicPath);
-				if (findItem.meta.isAffix) return false;
-				if (findItem.meta.isLink && !findItem.meta.isIframe) return false;
-				to.meta.isDynamic ? (findItem.params = to.params) : (findItem.query = to.query);
-				findItem.url = setTagsViewHighlight(findItem);
-				state.tagsViewList.push({ ...findItem });
-				addBrowserSetSession(state.tagsViewList);
-			}
-		};
-		// 处理单标签时,第二次的值未覆盖第一次的 tagsViewList 值(Session Storage)
-		const singleAddTagsView = (path: string, to?: any) => {
-			let isDynamicPath = to.meta.isDynamic ? to.meta.isDynamicPath : path;
-			state.tagsViewList.forEach((v) => {
-				if (
-					v.path === isDynamicPath &&
-					!isObjectValueEqual(
-						to.meta.isDynamic ? (v.params ? v.params : null) : v.query ? v.query : null,
-						to.meta.isDynamic ? (to?.params ? to?.params : null) : to?.query ? to?.query : null
-					)
-				) {
-					to.meta.isDynamic ? (v.params = to.params) : (v.query = to.query);
-					v.url = setTagsViewHighlight(v);
-					addBrowserSetSession(state.tagsViewList);
-				}
-			});
-		};
-		// 1、添加 tagsView:未设置隐藏(isHide)也添加到在 tagsView 中(可开启多标签详情,单标签详情)
-		const addTagsView = (path: string, to?: any) => {
-			// 防止拿取不到路由信息
-			nextTick(async () => {
-				// 修复:https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
-				let item: any = '';
-				if (to && to.meta.isDynamic) {
-					// 动态路由(xxx/:id/:name"):参数不同,开启多个 tagsview
-					if (!getThemeConfig.value.isShareTagsView) await solveAddTagsView(path, to);
-					else await singleAddTagsView(path, to);
-					if (state.tagsViewList.some((v: any) => v.path === to.meta.isDynamicPath)) return false;
-					item = state.tagsViewRoutesList.find((v: any) => v.path === to.meta.isDynamicPath);
-				} else {
-					// 普通路由:参数不同,开启多个 tagsview
-					if (!getThemeConfig.value.isShareTagsView) await solveAddTagsView(path, to);
-					else await singleAddTagsView(path, to);
-					if (state.tagsViewList.some((v: any) => v.path === path)) return false;
-					item = state.tagsViewRoutesList.find((v: any) => v.path === path);
-				}
-				if (item.meta.isLink && !item.meta.isIframe) return false;
-				if (to && to.meta.isDynamic) item.params = to?.params ? to?.params : route.params;
-				else item.query = to?.query ? to?.query : route.query;
-				item.url = setTagsViewHighlight(item);
-				await state.tagsViewList.push({ ...item });
-				await addBrowserSetSession(state.tagsViewList);
-			});
-		};
-		// 2、刷新当前 tagsView:
-		const refreshCurrentTagsView = (fullPath: string) => {
-			proxy.mittBus.emit('onTagsViewRefreshRouterView', fullPath);
-		};
-		// 3、关闭当前 tagsView:如果是设置了固定的(isAffix),不可以关闭
-		const closeCurrentTagsView = (path: string) => {
-			state.tagsViewList.map((v: any, k: number, arr: any) => {
-				if (!v.meta.isAffix) {
-					if (getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path) {
-						state.tagsViewList.splice(k, 1);
-						setTimeout(() => {
-							if (state.tagsViewList.length === k && getThemeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
-								// 最后一个且高亮时
-								if (arr[arr.length - 1].meta.isDynamic) {
-									// 动态路由(xxx/:id/:name")
-									if (k !== arr.length) router.push({ name: arr[k].name, params: arr[k].params });
-									else router.push({ name: arr[arr.length - 1].name, params: arr[arr.length - 1].params });
-								} else {
-									// 普通路由
-									if (k !== arr.length) router.push({ path: arr[k].path, query: arr[k].query });
-									else router.push({ path: arr[arr.length - 1].path, query: arr[arr.length - 1].query });
-								}
-							} else {
-								// 非最后一个且高亮时,跳转到下一个
-								if (state.tagsViewList.length !== k && getThemeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
-									if (arr[k].meta.isDynamic) {
-										// 动态路由(xxx/:id/:name")
-										router.push({ name: arr[k].name, params: arr[k].params });
-									} else {
-										// 普通路由
-										router.push({ path: arr[k].path, query: arr[k].query });
-									}
-								}
-							}
-						}, 0);
-					}
-				}
-			});
-			addBrowserSetSession(state.tagsViewList);
-		};
-		// 4、关闭其它 tagsView:如果是设置了固定的(isAffix),不进行关闭
-		const closeOtherTagsView = (path: string) => {
-			state.tagsViewList = [];
-			state.tagsViewRoutesList.map((v: any) => {
-				if (v.meta.isAffix && !v.meta.isHide) state.tagsViewList.push({ ...v });
-			});
-			addTagsView(path, route);
-		};
-		// 5、关闭全部 tagsView:如果是设置了固定的(isAffix),不进行关闭
-		const closeAllTagsView = () => {
-			state.tagsViewList = [];
-			state.tagsViewRoutesList.map((v: any) => {
-				if (v.meta.isAffix && !v.meta.isHide) {
-					state.tagsViewList.push({ ...v });
-					router.push({ path: state.tagsViewList[state.tagsViewList.length - 1].path });
-				}
-			});
-			addBrowserSetSession(state.tagsViewList);
-		};
-		// 6、开启当前页面全屏
-		const openCurrenFullscreen = async (path: string) => {
-			const item = state.tagsViewList.find((v: any) => (getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path));
-			if (item.meta.isDynamic) await router.push({ name: item.name, params: item.params });
-			else await router.push({ name: item.name, query: item.query });
-			store.dispatch('tagsViewRoutes/setCurrenFullscreen', true);
-		};
-		// 当前项右键菜单点击,拿当前点击的路由路径对比 浏览器缓存中的 tagsView 路由数组,取当前点击项的详细路由信息
-		// 防止 tagsView 非当前页演示时,操作异常
-		const getCurrentRouteItem = (path: string, cParams: any) => {
-			const itemRoute = Session.get('tagsViewList') ? Session.get('tagsViewList') : state.tagsViewList;
-			return itemRoute.find((v: any) => {
-				if (
-					v.path === path &&
-					isObjectValueEqual(
-						v.meta.isDynamic ? (v.params ? v.params : null) : v.query ? v.query : null,
-						cParams && Object.keys(cParams ? cParams : {}).length > 0 ? cParams : null
-					)
-				) {
-					return v;
-				} else if (v.path === path && Object.keys(cParams ? cParams : {}).length <= 0) {
-					return v;
-				}
-			});
-		};
-		// 当前项右键菜单点击
-		const onCurrentContextmenuClick = async (item: CurrentContextmenu) => {
-			const cParams = item.meta.isDynamic ? item.params : item.query;
-			if (!getCurrentRouteItem(item.path, cParams)) return ElMessage({ type: 'warning', message: '请正确输入路径及完整参数(query、params)' });
-			const { path, name, params, query, meta, url } = getCurrentRouteItem(item.path, cParams);
-			switch (item.contextMenuClickId) {
-				case 0:
-					// 刷新当前
-					if (meta.isDynamic) await router.push({ name, params });
-					else await router.push({ path, query });
-					refreshCurrentTagsView(route.fullPath);
-					break;
-				case 1:
-					// 关闭当前
-					closeCurrentTagsView(getThemeConfig.value.isShareTagsView ? path : url);
-					break;
-				case 2:
-					// 关闭其它
-					if (meta.isDynamic) await router.push({ name, params });
-					else await router.push({ path, query });
-					closeOtherTagsView(path);
-					break;
-				case 3:
-					// 关闭全部
-					closeAllTagsView();
-					break;
-				case 4:
-					// 开启当前页面全屏
-					openCurrenFullscreen(getThemeConfig.value.isShareTagsView ? path : url);
-					break;
-			}
-		};
-		// 右键点击时:传 x,y 坐标值到子组件中(props)
-		const onContextmenu = (v: any, e: any) => {
-			const { clientX, clientY } = e;
-			state.dropdown.x = clientX;
-			state.dropdown.y = clientY;
-			contextmenuRef.value.openContextmenu(v);
-		};
-		// 当前的 tagsView 项点击时
-		const onTagsClick = (v: any, k: number) => {
-			state.tagsRefsIndex = k;
-			router.push(v);
-		};
-		// 处理 tagsView 高亮(多标签详情时使用,单标签详情未使用)
-		const setTagsViewHighlight = (v: any) => {
-			let params = v.query && Object.keys(v.query).length > 0 ? v.query : v.params;
-			if (!params || Object.keys(params).length <= 0) return v.path;
-			let path = '';
-			for (let i in params) {
-				path += params[i];
-			}
-			// 判断是否是动态路由(xxx/:id/:name")
-			return `${v.meta.isDynamic ? v.meta.isDynamicPath : v.path}-${path}`;
-		};
-		// 更新滚动条显示
-		const updateScrollbar = () => {
-			proxy.$refs.scrollbarRef.update();
-		};
-		// 鼠标滚轮滚动
-		const onHandleScroll = (e: any) => {
-			proxy.$refs.scrollbarRef.$refs.wrap$.scrollLeft += e.wheelDelta / 4;
-		};
-		// tagsView 横向滚动
-		const tagsViewmoveToCurrentTag = () => {
-			nextTick(() => {
-				if (tagsRefs.value.length <= 0) return false;
-				// 当前 li 元素
-				let liDom = tagsRefs.value[state.tagsRefsIndex];
-				// 当前 li 元素下标
-				let liIndex = state.tagsRefsIndex;
-				// 当前 ul 下 li 元素总长度
-				let liLength = tagsRefs.value.length;
-				// 最前 li
-				let liFirst: any = tagsRefs.value[0];
-				// 最后 li
-				let liLast: any = tagsRefs.value[tagsRefs.value.length - 1];
-				// 当前滚动条的值
-				let scrollRefs = proxy.$refs.scrollbarRef.$refs.wrap$;
-				// 当前滚动条滚动宽度
-				let scrollS = scrollRefs.scrollWidth;
-				// 当前滚动条偏移宽度
-				let offsetW = scrollRefs.offsetWidth;
-				// 当前滚动条偏移距离
-				let scrollL = scrollRefs.scrollLeft;
-				// 上一个 tags li dom
-				let liPrevTag: any = tagsRefs.value[state.tagsRefsIndex - 1];
-				// 下一个 tags li dom
-				let liNextTag: any = tagsRefs.value[state.tagsRefsIndex + 1];
-				// 上一个 tags li dom 的偏移距离
-				let beforePrevL: any = '';
-				// 下一个 tags li dom 的偏移距离
-				let afterNextL: any = '';
-				if (liDom === liFirst) {
-					// 头部
-					scrollRefs.scrollLeft = 0;
-				} else if (liDom === liLast) {
-					// 尾部
-					scrollRefs.scrollLeft = scrollS - offsetW;
-				} else {
-					// 非头/尾部
-					if (liIndex === 0) beforePrevL = liFirst.offsetLeft - 5;
-					else beforePrevL = liPrevTag?.offsetLeft - 5;
-					if (liIndex === liLength) afterNextL = liLast.offsetLeft + liLast.offsetWidth + 5;
-					else afterNextL = liNextTag.offsetLeft + liNextTag.offsetWidth + 5;
-					if (afterNextL > scrollL + offsetW) {
-						scrollRefs.scrollLeft = afterNextL - offsetW;
-					} else if (beforePrevL < scrollL) {
-						scrollRefs.scrollLeft = beforePrevL;
-					}
-				}
-				// 更新滚动条,防止不出现
-				updateScrollbar();
-			});
-		};
-		// 获取 tagsView 的下标:用于处理 tagsView 点击时的横向滚动
-		const getTagsRefsIndex = (path: string | unknown) => {
-			nextTick(async () => {
-				// await 使用该写法,防止拿取不到 tagsViewList 列表数据不完整
-				let tagsViewList = await state.tagsViewList;
-				state.tagsRefsIndex = tagsViewList.findIndex((v: any) => {
-					if (getThemeConfig.value.isShareTagsView) {
-						return v.path === path;
-					} else {
-						return v.url === path;
-					}
-				});
-				// 添加初始化横向滚动条移动到对应位置
-				tagsViewmoveToCurrentTag();
-			});
-		};
-		// 设置 tagsView 可以进行拖拽
-		const initSortable = async () => {
-			const el = <HTMLElement>document.querySelector('.layout-navbars-tagsview-ul');
-			if (!el) return false;
-			state.sortable.el && state.sortable.destroy();
-			state.sortable = Sortable.create(el, {
-				animation: 300,
-				dataIdAttr: 'data-url',
-				disabled: getThemeConfig.value.isSortableTagsView ? false : true,
-				onEnd: () => {
-					const sortEndList: any = [];
-					state.sortable.toArray().map((val: any) => {
-						state.tagsViewList.map((v: any) => {
-							if (v.url === val) sortEndList.push({ ...v });
-						});
-					});
-					addBrowserSetSession(sortEndList);
-				},
-			});
-		};
-		// 拖动问题,https://gitee.com/lyt-top/vue-next-admin/issues/I3ZRRI
-		const onSortableResize = async () => {
-			await initSortable();
-			if (other.isMobile()) state.sortable.el && state.sortable.destroy();
-		};
-		// 页面加载前
-		onBeforeMount(() => {
-			// 初始化,防止手机端直接访问时还可以拖拽
-			onSortableResize();
-			// 拖动问题,https://gitee.com/lyt-top/vue-next-admin/issues/I3ZRRI
-			window.addEventListener('resize', onSortableResize);
-			// 监听非本页面调用 0 刷新当前,1 关闭当前,2 关闭其它,3 关闭全部 4 当前页全屏
-			proxy.mittBus.on('onCurrentContextmenuClick', (data: CurrentContextmenu) => {
-				onCurrentContextmenuClick(data);
-			});
-			// 监听布局配置界面开启/关闭拖拽
-			proxy.mittBus.on('openOrCloseSortable', () => {
-				initSortable();
-			});
-			// 监听布局配置开启 TagsView 共用,为了演示还原默认值
-			proxy.mittBus.on('openShareTagsView', () => {
-				if (getThemeConfig.value.isShareTagsView) {
-					router.push('/home');
-					state.tagsViewList = [];
-					state.tagsViewRoutesList.map((v: any) => {
-						if (v.meta.isAffix && !v.meta.isHide) {
-							v.url = setTagsViewHighlight(v);
-							state.tagsViewList.push({ ...v });
-						}
-					});
-				}
-			});
-		});
-		// 页面卸载时
-		onUnmounted(() => {
-			// 取消非本页面调用监听
-			proxy.mittBus.off('onCurrentContextmenuClick');
-			// 取消监听布局配置界面开启/关闭拖拽
-			proxy.mittBus.off('openOrCloseSortable');
-			// 取消监听布局配置开启 TagsView 共用
-			proxy.mittBus.off('openShareTagsView');
-			// 取消窗口 resize 监听
-			window.removeEventListener('resize', onSortableResize);
-		});
-		// 页面更新时
-		onBeforeUpdate(() => {
-			tagsRefs.value = [];
-		});
-		// 页面加载时
-		onMounted(() => {
-			// 初始化 vuex 中的 tagsViewRoutes 列表
-			getTagsViewRoutes();
-			initSortable();
-		});
-		// 路由更新时
-		onBeforeRouteUpdate(async (to) => {
-			state.routeActive = setTagsViewHighlight(to);
-			state.routePath = to.meta.isDynamic ? to.meta.isDynamicPath : to.path;
-			await addTagsView(to.path, to);
-			getTagsRefsIndex(getThemeConfig.value.isShareTagsView ? state.routePath : state.routeActive);
-		});
-		// 监听路由的变化,动态赋值给 tagsView
-		watch(store.state, (val) => {
-			if (val.tagsViewRoutes.tagsViewRoutes.length === state.tagsViewRoutesList.length) return false;
-			getTagsViewRoutes();
-		});
-		return {
-			isActive,
-			onContextmenu,
-			onTagsClick,
-			tagsRefs,
-			contextmenuRef,
-			scrollbarRef,
-			tagsUlRef,
-			onHandleScroll,
-			getThemeConfig,
-			setTagsStyle,
-			refreshCurrentTagsView,
-			closeCurrentTagsView,
-			onCurrentContextmenuClick,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.layout-navbars-tagsview {
-	background-color: var(--el-color-white);
-	border-bottom: 1px solid var(--next-border-color-light);
-	position: relative;
-	z-index: 4;
-	::v-deep(.el-scrollbar__wrap) {
-		overflow-x: auto !important;
-	}
-	&-ul {
-		list-style: none;
-		margin: 0;
-		padding: 0;
-		height: 34px;
-		display: flex;
-		align-items: center;
-		color: var(--el-text-color-regular);
-		font-size: 12px;
-		white-space: nowrap;
-		padding: 0 15px;
-		&-li {
-			height: 26px;
-			line-height: 26px;
-			display: flex;
-			align-items: center;
-			border: 1px solid #e6e6e6;
-			padding: 0 15px;
-			margin-right: 5px;
-			border-radius: 2px;
-			position: relative;
-			z-index: 0;
-			cursor: pointer;
-			justify-content: space-between;
-			&:hover {
-				background-color: var(--el-color-primary-light-9);
-				color: var(--el-color-primary);
-				border-color: var(--el-color-primary-light-6);
-			}
-			&-iconfont {
-				position: relative;
-				left: -5px;
-				font-size: 12px;
-			}
-			&-icon {
-				border-radius: 100%;
-				position: relative;
-				height: 14px;
-				width: 14px;
-				text-align: center;
-				line-height: 14px;
-				right: -5px;
-				&:hover {
-					color: var(--el-color-white);
-					background-color: var(--el-color-primary-light-3);
-				}
-			}
-			.layout-icon-active {
-				display: block;
-			}
-			.layout-icon-three {
-				display: none;
-			}
-		}
-		.is-active {
-			color: var(--el-color-white);
-			background: var(--el-color-primary);
-			border-color: var(--el-color-primary);
-			transition: border-color 3s ease;
-		}
-	}
-	// 风格4
-	.tags-style-four {
-		.layout-navbars-tagsview-ul-li {
-			margin-right: 0 !important;
-			border: none !important;
-			position: relative;
-			border-radius: 3px !important;
-			.layout-icon-active {
-				display: none;
-			}
-			.layout-icon-three {
-				display: block;
-			}
-			&:hover {
-				background: none !important;
-			}
-		}
-		.is-active {
-			background: none !important;
-			color: var(--el-color-primary) !important;
-		}
-	}
-	// 风格5
-	.tags-style-five {
-		align-items: flex-end;
-		.tags-style-five-svg {
-			-webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width='68' height='34' viewBox='0 0 68 34' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m27,0c-7.99582,0 -11.95105,0.00205 -12,12l0,6c0,8.284 -0.48549,16.49691 -8.76949,16.49691l54.37857,-0.11145c-8.284,0 -8.60908,-8.10146 -8.60908,-16.38546l0,-6c0.11145,-12.08445 -4.38441,-12 -12,-12l-13,0z' fill='%23409eff'/%3E%3C/svg%3E")
-				12 27 15;
-		}
-		.layout-navbars-tagsview-ul-li {
-			padding: 0 5px;
-			border-width: 15px 27px 15px;
-			border-style: solid;
-			border-color: transparent;
-			margin: 0 -15px;
-			.layout-icon-active,
-			.layout-navbars-tagsview-ul-li-iconfont,
-			.layout-navbars-tagsview-ul-li-refresh {
-				display: none;
-			}
-			.layout-icon-three {
-				display: block;
-			}
-			&:hover {
-				@extend .tags-style-five-svg;
-				background: var(--el-color-primary-light-9);
-				color: unset;
-			}
-		}
-		.is-active {
-			@extend .tags-style-five-svg;
-			background: var(--el-color-primary-light-9) !important;
-			color: var(--el-color-primary) !important;
-			z-index: 1;
-		}
-	}
-}
-.layout-navbars-tagsview-shadow {
-	box-shadow: rgb(0 21 41 / 4%) 0px 1px 4px;
-}
-</style>

+ 0 - 151
nextadmin_vue3/src/layout/navMenu/horizontal.vue

@@ -1,151 +0,0 @@
-<template>
-	<div class="el-menu-horizontal-warp">
-		<el-scrollbar @wheel.native.prevent="onElMenuHorizontalScroll" ref="elMenuHorizontalScrollRef">
-			<el-menu router :default-active="defaultActive" background-color="transparent" mode="horizontal">
-				<template v-for="val in menuLists">
-					<el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
-						<template #title>
-							<SvgIcon :name="val.meta.icon" />
-							<span>{{ $t(val.meta.title) }}</span>
-						</template>
-						<SubItem :chil="val.children" />
-					</el-sub-menu>
-					<template v-else>
-						<el-menu-item :index="val.path" :key="val.path">
-							<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
-								<SvgIcon :name="val.meta.icon" />
-								{{ $t(val.meta.title) }}
-							</template>
-							<template #title v-else>
-								<a :href="val.meta.isLink" target="_blank" rel="opener" class="w100">
-									<SvgIcon :name="val.meta.icon" />
-									{{ $t(val.meta.title) }}
-								</a>
-							</template>
-						</el-menu-item>
-					</template>
-				</template>
-			</el-menu>
-		</el-scrollbar>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, computed, defineComponent, getCurrentInstance, onMounted, nextTick, onBeforeMount } from 'vue';
-import { useRoute, onBeforeRouteUpdate } from 'vue-router';
-import { useStore } from '/@/store/index';
-import SubItem from '/@/layout/navMenu/subItem.vue';
-export default defineComponent({
-	name: 'navMenuHorizontal',
-	components: { SubItem },
-	props: {
-		menuList: {
-			type: Array,
-			default: () => [],
-		},
-	},
-	setup(props) {
-		const { proxy } = <any>getCurrentInstance();
-		const route = useRoute();
-		const store = useStore();
-		const state = reactive({
-			defaultActive: null,
-		});
-		// 获取父级菜单数据
-		const menuLists = computed(() => {
-			return <any>props.menuList;
-		});
-		// 设置横向滚动条可以鼠标滚轮滚动
-		const onElMenuHorizontalScroll = (e: any) => {
-			const eventDelta = e.wheelDelta || -e.deltaY * 40;
-			proxy.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft = proxy.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft + eventDelta / 4;
-		};
-		// 初始化数据,页面刷新时,滚动条滚动到对应位置
-		const initElMenuOffsetLeft = () => {
-			nextTick(() => {
-				let els: any = document.querySelector('.el-menu.el-menu--horizontal li.is-active');
-				if (!els) return false;
-				proxy.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft = els.offsetLeft;
-			});
-		};
-		// 路由过滤递归函数
-		const filterRoutesFun = (arr: Array<object>) => {
-			return arr
-				.filter((item: any) => !item.meta.isHide)
-				.map((item: any) => {
-					item = Object.assign({}, item);
-					if (item.children) item.children = filterRoutesFun(item.children);
-					return item;
-				});
-		};
-		// 传送当前子级数据到菜单中
-		const setSendClassicChildren = (path: string) => {
-			const currentPathSplit = path.split('/');
-			let currentData: any = {};
-			filterRoutesFun(store.state.routesList.routesList).map((v, k) => {
-				if (v.path === `/${currentPathSplit[1]}`) {
-					v['k'] = k;
-					currentData['item'] = [{ ...v }];
-					currentData['children'] = [{ ...v }];
-					if (v.children) currentData['children'] = v.children;
-				}
-			});
-			return currentData;
-		};
-		// 设置页面当前路由高亮
-		const setCurrentRouterHighlight = (currentRoute: any) => {
-			const { path, meta } = currentRoute;
-			if (store.state.themeConfig.themeConfig.layout === 'classic') {
-				(<any>state.defaultActive) = `/${path.split('/')[1]}`;
-			} else {
-				const pathSplit = meta.isDynamic ? meta.isDynamicPath.split('/') : path.split('/');
-				if (pathSplit.length >= 4 && meta.isHide) state.defaultActive = pathSplit.splice(0, 3).join('/');
-				else state.defaultActive = path;
-			}
-		};
-		// 页面加载前
-		onBeforeMount(() => {
-			setCurrentRouterHighlight(route);
-		});
-		// 页面加载时
-		onMounted(() => {
-			initElMenuOffsetLeft();
-		});
-		// 路由更新时
-		onBeforeRouteUpdate((to) => {
-			// 修复:https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
-			setCurrentRouterHighlight(to);
-			// 修复经典布局开启切割菜单时,点击tagsView后左侧导航菜单数据不变的问题
-			let { layout, isClassicSplitMenu } = store.state.themeConfig.themeConfig;
-			if (layout === 'classic' && isClassicSplitMenu) {
-				proxy.mittBus.emit('setSendClassicChildren', setSendClassicChildren(to.path));
-			}
-		});
-		return {
-			menuLists,
-			onElMenuHorizontalScroll,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.el-menu-horizontal-warp {
-	flex: 1;
-	overflow: hidden;
-	margin-right: 30px;
-	::v-deep(.el-scrollbar__bar.is-vertical) {
-		display: none;
-	}
-	::v-deep(a) {
-		width: 100%;
-	}
-	.el-menu.el-menu--horizontal {
-		display: flex;
-		height: 100%;
-		width: 100%;
-		box-sizing: border-box;
-	}
-}
-</style>

+ 0 - 98
nextadmin_vue3/src/layout/navMenu/vertical.vue

@@ -1,98 +0,0 @@
-<template>
-	<el-menu
-		router
-		:default-active="defaultActive"
-		background-color="transparent"
-		:collapse="isCollapse"
-		:unique-opened="getThemeConfig.isUniqueOpened"
-		:collapse-transition="false"
-	>
-		<template v-for="val in menuLists">
-			<el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
-				<template #title>
-					<SvgIcon :name="val.meta.icon" />
-					<span>{{ $t(val.meta.title) }}</span>
-				</template>
-				<SubItem :chil="val.children" />
-			</el-sub-menu>
-			<template v-else>
-				<el-menu-item :index="val.path" :key="val.path">
-					<SvgIcon :name="val.meta.icon" />
-					<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
-						<span>{{ $t(val.meta.title) }}</span>
-					</template>
-					<template #title v-else>
-						<a :href="val.meta.isLink" target="_blank" rel="opener" class="w100">{{ $t(val.meta.title) }}</a>
-					</template>
-				</el-menu-item>
-			</template>
-		</template>
-	</el-menu>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, computed, defineComponent, onMounted, watch } from 'vue';
-import { useRoute, onBeforeRouteUpdate } from 'vue-router';
-import { useStore } from '/@/store/index';
-import SubItem from '/@/layout/navMenu/subItem.vue';
-export default defineComponent({
-	name: 'navMenuVertical',
-	components: { SubItem },
-	props: {
-		menuList: {
-			type: Array,
-			default: () => [],
-		},
-	},
-	setup(props) {
-		const store = useStore();
-		const route = useRoute();
-		const state = reactive({
-			// 修复:https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
-			defaultActive: route.meta.isDynamic ? route.meta.isDynamicPath : route.path,
-			isCollapse: false,
-		});
-		// 获取父级菜单数据
-		const menuLists = computed(() => {
-			return <any>props.menuList;
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 菜单高亮(详情时,父级高亮)
-		const setParentHighlight = (currentRoute: any) => {
-			const { path, meta } = currentRoute;
-			const pathSplit = meta.isDynamic ? meta.isDynamicPath.split('/') : path.split('/');
-			if (pathSplit.length >= 4 && meta.isHide) return pathSplit.splice(0, 3).join('/');
-			else return path;
-		};
-		// 设置菜单的收起/展开
-		watch(
-			store.state.themeConfig.themeConfig,
-			() => {
-				document.body.clientWidth <= 1000 ? (state.isCollapse = false) : (state.isCollapse = getThemeConfig.value.isCollapse);
-			},
-			{
-				immediate: true,
-			}
-		);
-		// 页面加载时
-		onMounted(() => {
-			state.defaultActive = setParentHighlight(route);
-		});
-		// 路由更新时
-		onBeforeRouteUpdate((to) => {
-			// 修复:https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
-			state.defaultActive = setParentHighlight(to);
-			const clientWidth = document.body.clientWidth;
-			if (clientWidth < 1000) getThemeConfig.value.isCollapse = false;
-		});
-		return {
-			menuLists,
-			getThemeConfig,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 60
nextadmin_vue3/src/layout/routerView/iframes.vue

@@ -1,60 +0,0 @@
-<template>
-	<div class="layout-view-bg-white flex mt1" :style="{ height: `calc(100vh - ${setIframeHeight}`, border: 'none' }" v-loading="iframeLoading">
-		<iframe :src="iframeUrl" frameborder="0" height="100%" width="100%" id="iframe" v-show="!iframeLoading"></iframe>
-	</div>
-</template>
-
-<script lang="ts">
-import { defineComponent, reactive, toRefs, onMounted, nextTick, watch, computed } from 'vue';
-import { useRoute } from 'vue-router';
-import { useStore } from '/@/store/index';
-export default defineComponent({
-	name: 'layoutIfameView',
-	setup() {
-		const route = useRoute();
-		const store = useStore();
-		const state = reactive({
-			iframeLoading: true,
-			iframeUrl: '',
-		});
-		// 初始化页面加载 loading
-		const initIframeLoad = () => {
-			state.iframeUrl = <any>route.meta.isLink;
-			nextTick(() => {
-				state.iframeLoading = true;
-				const iframe = document.getElementById('iframe');
-				if (!iframe) return false;
-				iframe.onload = () => {
-					state.iframeLoading = false;
-				};
-			});
-		};
-		// 设置 iframe 的高度
-		const setIframeHeight = computed(() => {
-			let { isTagsview } = store.state.themeConfig.themeConfig;
-			let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
-			if (isTagsViewCurrenFull) {
-				return `1px`;
-			} else {
-				if (isTagsview) return `85px`;
-				else return `51px`;
-			}
-		});
-		// 页面加载时
-		onMounted(() => {
-			initIframeLoad();
-		});
-		// 监听路由变化,多个 iframe 时使用
-		watch(
-			() => route.path,
-			() => {
-				initIframeLoad();
-			}
-		);
-		return {
-			setIframeHeight,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 59
nextadmin_vue3/src/layout/routerView/link.vue

@@ -1,59 +0,0 @@
-<template>
-	<div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }">
-		<a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin">
-			{{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }}
-		</a>
-	</div>
-</template>
-
-<script lang="ts">
-import { defineComponent, toRefs, reactive, computed, watch } from 'vue';
-import { useRoute, RouteMeta } from 'vue-router';
-import { useStore } from '/@/store/index';
-
-// 定义接口来定义对象的类型
-interface LinkViewState {
-	currentRouteMeta: {
-		isLink: string;
-		title: string;
-	};
-}
-interface LinkViewRouteMeta extends RouteMeta {
-	isLink: string;
-	title: string;
-}
-
-export default defineComponent({
-	name: 'layoutLinkView',
-	setup() {
-		const route = useRoute();
-		const store = useStore();
-		const state = reactive<LinkViewState>({
-			currentRouteMeta: {
-				isLink: '',
-				title: '',
-			},
-		});
-		// 设置 link 的高度
-		const setLinkHeight = computed(() => {
-			let { isTagsview } = store.state.themeConfig.themeConfig;
-			if (isTagsview) return `114px`;
-			else return `80px`;
-		});
-		// 监听路由的变化,设置内容
-		watch(
-			() => route.path,
-			() => {
-				state.currentRouteMeta = <LinkViewRouteMeta>route.meta;
-			},
-			{
-				immediate: true,
-			}
-		);
-		return {
-			setLinkHeight,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 83
nextadmin_vue3/src/layout/routerView/parent.vue

@@ -1,83 +0,0 @@
-<template>
-	<div class="h100">
-		<router-view v-slot="{ Component }">
-			<transition :name="setTransitionName" mode="out-in">
-				<keep-alive :include="keepAliveNameList">
-					<component :is="Component" :key="refreshRouterViewKey" class="w100" :style="{ minHeight }" />
-				</keep-alive>
-			</transition>
-		</router-view>
-	</div>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent, toRefs, reactive, getCurrentInstance, onBeforeMount, onUnmounted, nextTick, watch } from 'vue';
-import { useRoute } from 'vue-router';
-import { useStore } from '/@/store/index';
-
-// 定义接口来定义对象的类型
-interface ParentViewState {
-	refreshRouterViewKey: null | string;
-	keepAliveNameList: string[];
-}
-
-export default defineComponent({
-	name: 'layoutParentView',
-	props: {
-		minHeight: {
-			type: String,
-			default: '',
-		},
-	},
-	setup() {
-		const { proxy } = <any>getCurrentInstance();
-		const route = useRoute();
-		const store = useStore();
-		const state = reactive<ParentViewState>({
-			refreshRouterViewKey: null,
-			keepAliveNameList: [],
-		});
-		// 设置主界面切换动画
-		const setTransitionName = computed(() => {
-			return store.state.themeConfig.themeConfig.animation;
-		});
-		// 获取布局配置信息
-		const getThemeConfig = computed(() => {
-			return store.state.themeConfig.themeConfig;
-		});
-		// 获取组件缓存列表(name值)
-		const getKeepAliveNames = computed(() => {
-			return store.state.keepAliveNames.keepAliveNames;
-		});
-		// 页面加载前,处理缓存,页面刷新时路由缓存处理
-		onBeforeMount(() => {
-			state.keepAliveNameList = getKeepAliveNames.value;
-			proxy.mittBus.on('onTagsViewRefreshRouterView', (fullPath: string) => {
-				state.keepAliveNameList = getKeepAliveNames.value.filter((name: string) => route.name !== name);
-				state.refreshRouterViewKey = null;
-				nextTick(() => {
-					state.refreshRouterViewKey = fullPath;
-					state.keepAliveNameList = getKeepAliveNames.value;
-				});
-			});
-		});
-		// 页面卸载时
-		onUnmounted(() => {
-			proxy.mittBus.off('onTagsViewRefreshRouterView');
-		});
-		// 监听路由变化,防止 tagsView 多标签时,切换动画消失
-		watch(
-			() => route.fullPath,
-			() => {
-				state.refreshRouterViewKey = route.fullPath;
-			}
-		);
-		return {
-			getThemeConfig,
-			getKeepAliveNames,
-			setTransitionName,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 102
nextadmin_vue3/src/router/backEnd.ts

@@ -1,102 +0,0 @@
-import { store } from '/@/store/index.ts';
-import { Session } from '/@/utils/storage';
-import { NextLoading } from '/@/utils/loading';
-import { setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '/@/router/index';
-import { dynamicRoutes } from '/@/router/route';
-import { useMenuApi } from '/@/api/menu/index';
-
-const menuApi = useMenuApi();
-
-const layouModules: any = import.meta.glob('../layout/routerView/*.{vue,tsx}');
-const viewsModules: any = import.meta.glob('../views/**/*.{vue,tsx}');
-/**
- * 获取目录下的 .vue、.tsx 全部文件
- * @method import.meta.glob
- * @link 参考:https://cn.vitejs.dev/guide/features.html#json
- */
-const dynamicViewsModules: Record<string, Function> = Object.assign({}, { ...layouModules }, { ...viewsModules });
-
-/**
- * 后端控制路由:初始化方法,防止刷新时路由丢失
- * @method  NextLoading 界面 loading 动画开始执行
- * @method store.dispatch('userInfos/setUserInfos') 触发初始化用户信息
- * @method store.dispatch('requestOldRoutes/setBackEndControlRoutes') 存储接口原始路由(未处理component),根据需求选择使用
- * @method setAddRoute 添加动态路由
- * @method setFilterMenuAndCacheTagsViewRoutes 设置递归过滤有权限的路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
- */
-export async function initBackEndControlRoutes() {
-	// 界面 loading 动画开始执行
-	if (window.nextLoading === undefined) NextLoading.start();
-	// 无 token 停止执行下一步
-	if (!Session.get('token')) return false;
-	// 触发初始化用户信息
-	store.dispatch('userInfos/setUserInfos');
-	// 获取路由菜单数据	
-	const res = await getBackEndControlRoutes();
-	// 存储接口原始路由(未处理component),根据需求选择使用
-	store.dispatch('requestOldRoutes/setBackEndControlRoutes', JSON.parse(JSON.stringify(res.data)));
-	// 处理路由(component),替换 dynamicRoutes(/@/router/route)第一个顶级 children 的路由
-	dynamicRoutes[0].children = await backEndComponent(res.data);
-	// 添加动态路由
-	await setAddRoute();
-	// 设置递归过滤有权限的路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
-	setFilterMenuAndCacheTagsViewRoutes();
-}
-
-/**
- * 请求后端路由菜单接口
- * @description isRequestRoutes 为 true,则开启后端控制路由
- * @returns 返回后端路由菜单数据
- */
-export function getBackEndControlRoutes() {
-	// 模拟 admin 与 test
-	const auth = store.state.userInfos.userInfos.roles[0];
-	// 管理员 admin
-	if (auth === 'admin') return menuApi.getMenuAdmin();
-	// 其它用户 test
-	else return menuApi.getMenuTest();
-}
-
-/**
- * 重新请求后端路由菜单接口
- * @description 用于菜单管理界面刷新菜单(未进行测试)
- * @description 路径:/src/views/system/menu/component/addMenu.vue
- */
-export function setBackEndControlRefreshRoutes() {
-	getBackEndControlRoutes();
-}
-
-/**
- * 后端路由 component 转换
- * @param routes 后端返回的路由表数组
- * @returns 返回处理成函数后的 component
- */
-export function backEndComponent(routes: any) {
-	if (!routes) return;
-	return routes.map((item: any) => {
-		if (item.component) item.component = dynamicImport(dynamicViewsModules, item.component as string);
-		item.children && backEndComponent(item.children);
-		return item;
-	});
-}
-
-/**
- * 后端路由 component 转换函数
- * @param dynamicViewsModules 获取目录下的 .vue、.tsx 全部文件
- * @param component 当前要处理项 component
- * @returns 返回处理成函数后的 component
- */
-export function dynamicImport(dynamicViewsModules: Record<string, Function>, component: string) {
-	const keys = Object.keys(dynamicViewsModules);
-	const matchKeys = keys.filter((key) => {
-		const k = key.replace(/..\/views|../, '');
-		return k.startsWith(`${component}`) || k.startsWith(`/${component}`);
-	});
-	if (matchKeys?.length === 1) {
-		const matchKey = matchKeys[0];
-		return dynamicViewsModules[matchKey];
-	}
-	if (matchKeys?.length > 1) {
-		return false;
-	}
-}

+ 0 - 24
nextadmin_vue3/src/router/frontEnd.ts

@@ -1,24 +0,0 @@
-import { store } from '/@/store/index';
-import { Session } from '/@/utils/storage';
-import { NextLoading } from '/@/utils/loading';
-import { setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '/@/router/index';
-
-/**
- * 前端控制路由:初始化方法,防止刷新时路由丢失
- * @method  NextLoading 界面 loading 动画开始执行
- * @method store.dispatch('userInfos/setUserInfos') 触发初始化用户信息
- * @method setAddRoute 添加动态路由
- * @method setFilterMenuAndCacheTagsViewRoutes 设置递归过滤有权限的路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
- */
-export async function initFrontEndControlRoutes() {
-	// 界面 loading 动画开始执行
-	if (window.nextLoading === undefined) NextLoading.start();
-	// 无 token 停止执行下一步
-	if (!Session.get('token')) return false;
-	// 触发初始化用户信息
-	store.dispatch('userInfos/setUserInfos');
-	// 添加动态路由
-	await setAddRoute();
-	// 设置递归过滤有权限的路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
-	setFilterMenuAndCacheTagsViewRoutes();
-}

+ 0 - 232
nextadmin_vue3/src/router/index.ts

@@ -1,232 +0,0 @@
-import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
-import NProgress from 'nprogress';
-import 'nprogress/nprogress.css';
-import { store } from '/@/store/index.ts';
-import { Session } from '/@/utils/storage';
-import { NextLoading } from '/@/utils/loading';
-import { staticRoutes, dynamicRoutes } from '/@/router/route';
-import { initFrontEndControlRoutes } from '/@/router/frontEnd';
-import { initBackEndControlRoutes } from '/@/router/backEnd';
-
-/**
- * 创建一个可以被 Vue 应用程序使用的路由实例
- * @method createRouter(options: RouterOptions): Router
- * @link 参考:https://next.router.vuejs.org/zh/api/#createrouter
- */
-const router = createRouter({
-	history: createWebHashHistory(),
-	routes: staticRoutes,
-});
-
-/**
- * 定义404界面
- * @link 参考:https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify
- */
-const pathMatch = {
-	path: '/:path(.*)*',
-	redirect: '/404',
-};
-
-/**
- * 路由多级嵌套数组处理成一维数组
- * @param arr 传入路由菜单数据数组
- * @returns 返回处理后的一维路由菜单数组
- */
-export function formatFlatteningRoutes(arr: any) {
-	if (arr.length <= 0) return false;
-	for (let i = 0; i < arr.length; i++) {
-		if (arr[i].children) {
-			arr = arr.slice(0, i + 1).concat(arr[i].children, arr.slice(i + 1));
-		}
-	}
-	return arr;
-}
-
-/**
- * 一维数组处理成多级嵌套数组(只保留二级:也就是二级以上全部处理成只有二级,keep-alive 支持二级缓存)
- * @description isKeepAlive 处理 `name` 值,进行缓存。顶级关闭,全部不缓存
- * @link 参考:https://v3.cn.vuejs.org/api/built-in-components.html#keep-alive
- * @param arr 处理后的一维路由菜单数组
- * @returns 返回将一维数组重新处理成 `定义动态路由(dynamicRoutes)` 的格式
- */
-export function formatTwoStageRoutes(arr: any) {
-	if (arr.length <= 0) return false;
-	const newArr: any = [];
-	const cacheList: Array<string> = [];
-	arr.forEach((v: any) => {
-		if (v.path === '/') {
-			newArr.push({ component: v.component, name: v.name, path: v.path, redirect: v.redirect, meta: v.meta, children: [] });
-		} else {
-			// 判断是否是动态路由(xx/:id/:name),用于 tagsView 等中使用
-			// 修复:https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
-			if (v.path.indexOf('/:') > -1) {
-				v.meta['isDynamic'] = true;
-				v.meta['isDynamicPath'] = v.path;
-			}
-			newArr[0].children.push({ ...v });
-			// 存 name 值,keep-alive 中 include 使用,实现路由的缓存
-			// 路径:/@/layout/routerView/parent.vue
-			if (newArr[0].meta.isKeepAlive && v.meta.isKeepAlive) {
-				cacheList.push(v.name);
-				store.dispatch('keepAliveNames/setCacheKeepAlive', cacheList);
-			}
-		}
-	});
-	return newArr;
-}
-
-/**
- * 缓存多级嵌套数组处理后的一维数组
- * @description 用于 tagsView、菜单搜索中:未过滤隐藏的(isHide)
- */
-export function setCacheTagsViewRoutes() {
-	// 获取有权限的路由,否则 tagsView、菜单搜索中无权限的路由也将显示
-	let rolesRoutes = setFilterHasRolesMenu(dynamicRoutes, store.state.userInfos.userInfos.roles);
-	// 添加到 vuex setTagsViewRoutes 中
-	store.dispatch('tagsViewRoutes/setTagsViewRoutes', formatTwoStageRoutes(formatFlatteningRoutes(rolesRoutes))[0].children);
-}
-
-/**
- * 判断路由 `meta.roles` 中是否包含当前登录用户权限字段
- * @param roles 用户权限标识,在 userInfos(用户信息)的 roles(登录页登录时缓存到浏览器)数组
- * @param route 当前循环时的路由项
- * @returns 返回对比后有权限的路由项
- */
-export function hasRoles(roles: any, route: any) {
-	if (route.meta && route.meta.roles) return roles.some((role: any) => route.meta.roles.includes(role));
-	else return true;
-}
-
-/**
- * 获取当前用户权限标识去比对路由表,设置递归过滤有权限的路由
- * @param routes 当前路由 children
- * @param roles 用户权限标识,在 userInfos(用户信息)的 roles(登录页登录时缓存到浏览器)数组
- * @returns 返回有权限的路由数组 `meta.roles` 中控制
- */
-export function setFilterHasRolesMenu(routes: any, roles: any) {
-	const menu: any = [];
-	routes.forEach((route: any) => {
-		const item = { ...route };
-		if (hasRoles(roles, item)) {
-			if (item.children) item.children = setFilterHasRolesMenu(item.children, roles);
-			menu.push(item);
-		}
-	});
-	return menu;
-}
-
-/**
- * 设置递归过滤有权限的路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
- * @description 用于左侧菜单、横向菜单的显示
- * @description 用于 tagsView、菜单搜索中:未过滤隐藏的(isHide)
- */
-export function setFilterMenuAndCacheTagsViewRoutes() {
-	store.dispatch('routesList/setRoutesList', setFilterHasRolesMenu(dynamicRoutes[0].children, store.state.userInfos.userInfos.roles));
-	setCacheTagsViewRoutes();
-}
-
-/**
- * 获取当前用户权限标识去比对路由表(未处理成多级嵌套路由)
- * @description 这里主要用于动态路由的添加,router.addRoute
- * @link 参考:https://next.router.vuejs.org/zh/api/#addroute
- * @param chil dynamicRoutes(/@/router/route)第一个顶级 children 的下路由集合
- * @returns 返回有当前用户权限标识的路由数组
- */
-export function setFilterRoute(chil: any) {
-	let filterRoute: any = [];
-	chil.forEach((route: any) => {
-		if (route.meta.roles) {
-			route.meta.roles.forEach((metaRoles: any) => {
-				store.state.userInfos.userInfos.roles.forEach((roles: any) => {
-					if (metaRoles === roles) filterRoute.push({ ...route });
-				});
-			});
-		}
-	});
-	return filterRoute;
-}
-
-/**
- * 获取有当前用户权限标识的路由数组,进行对原路由的替换
- * @description 替换 dynamicRoutes(/@/router/route)第一个顶级 children 的路由
- * @returns 返回替换后的路由数组
- */
-export function setFilterRouteEnd() {
-	let filterRouteEnd: any = formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes));
-	filterRouteEnd[0].children = [...setFilterRoute(filterRouteEnd[0].children), { ...pathMatch }];
-	return filterRouteEnd;
-}
-
-/**
- * 添加动态路由
- * @method router.addRoute
- * @description 此处循环为 dynamicRoutes(/@/router/route)第一个顶级 children 的路由一维数组,非多级嵌套
- * @link 参考:https://next.router.vuejs.org/zh/api/#addroute
- */
-export async function setAddRoute() {
-	await setFilterRouteEnd().forEach((route: RouteRecordRaw) => {
-		const routeName: any = route.name;
-		if (!router.hasRoute(routeName)) router.addRoute(route);
-	});
-}
-
-/**
- * 删除/重置路由
- * @method router.removeRoute
- * @description 此处循环为 dynamicRoutes(/@/router/route)第一个顶级 children 的路由一维数组,非多级嵌套
- * @link 参考:https://next.router.vuejs.org/zh/api/#push
- */
-export async function resetRoute() {
-	await setFilterRouteEnd().forEach((route: RouteRecordRaw) => {
-		const routeName: any = route.name;
-		router.hasRoute(routeName) && router.removeRoute(routeName);
-	});
-}
-
-// isRequestRoutes 为 true,则开启后端控制路由,路径:`/src/store/modules/themeConfig.ts`
-const { isRequestRoutes } = store.state.themeConfig.themeConfig;
-
-// 前端控制路由:初始化方法,防止刷新时路由丢失
-if (!isRequestRoutes) initFrontEndControlRoutes();
-
-// 路由加载前
-router.beforeEach(async (to, from, next) => {
-	NProgress.configure({ showSpinner: false });
-	if (to.meta.title) NProgress.start();
-	const token = Session.get('token');//获取token,判断有没有登录 
-	if (to.path === '/login' && !token) {
-		next();
-		NProgress.done();
-	} else {
-		if (!token) {
-			next(`/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`);
-			Session.clear();
-			resetRoute();
-			NProgress.done();
-		} else if (token && to.path === '/login') {
-			next('/home');
-			NProgress.done();
-		} else {
-			if (store.state.routesList.routesList.length === 0) {
-				if (isRequestRoutes) {
-					// 后端控制路由:路由数据初始化,防止刷新时丢失
-					await initBackEndControlRoutes();
-					// 动态添加路由:防止非首页刷新时跳转回首页的问题
-					// 确保 addRoute() 时动态添加的路由已经被完全加载上去
-					next({ ...to, replace: true });
-				}
-			} else {
-				next();
-			}
-		}
-	}
-});
-
-// 路由加载后
-router.afterEach(() => {
-	NProgress.done();
-	NextLoading.done();//移除loding
-});
-
-// 导出路由
-export default router;

File diff suppressed because it is too large
+ 0 - 1180
nextadmin_vue3/src/router/route.bak.ts


+ 0 - 88
nextadmin_vue3/src/router/route.ts

@@ -1,88 +0,0 @@
-import { RouteRecordRaw } from 'vue-router';
-
-/**
- * 路由meta对象参数说明
- * meta: {
- *      title:          菜单栏及 tagsView 栏、菜单搜索名称(国际化)
- *      isLink:        是否超链接菜单,开启外链条件,`1、isLink:true 2、链接地址不为空`
- *      isHide:        是否隐藏此路由
- *      isKeepAlive:   是否缓存组件状态
- *      isAffix:       是否固定在 tagsView 栏上
- *      isIframe:      是否内嵌窗口,,开启条件,`1、isIframe:true 2、链接地址不为空`
- *      roles:         当前路由权限标识,取角色管理。控制路由显示、隐藏。超级管理员:admin 普通角色:common
- *      icon:          菜单、tagsView 图标,阿里:加 `iconfont xxx`,fontawesome:加 `fa xxx`
- * }
- */
-
-/**
- * 定义动态路由
- * @description 未开启 isRequestRoutes 为 true 时使用(前端控制路由),开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据
- * @description 各字段请查看 `/@/views/system/menu/component/addMenu.vue 下的 ruleForm`
- * @returns 返回路由菜单数据
- */
-export const dynamicRoutes: Array<RouteRecordRaw> = [
-	{
-		path: '/',
-		name: '/',
-		component: () => import('/@/layout/index.vue'),
-		redirect: '/home',
-		meta: {
-			isKeepAlive: true,
-		},
-		children: [
-			{
-				path: '/system_menu',
-				name: 'systemMenu',
-				component: () => import('/@/views/system/menu/index.vue'),
-				meta: {
-					title: 'message.router.systemMenu',
-					isLink: '',
-					isHide: false,
-					isKeepAlive: true,
-					isAffix: false,
-					isIframe: false,
-					roles: ['admin'],
-					icon: 'iconfont icon-caidan',
-				},
-			},
-		]
-	},
-
-];
-
-/**
- * 定义静态路由
- * @description 前端控制直接改 dynamicRoutes 中的路由,后端控制不需要修改,请求接口路由数据时,会覆盖 dynamicRoutes 第一个顶级 children 的内容(全屏,不包含 layout 中的路由出口)
- * @returns 返回路由菜单数据
- */
-export const staticRoutes: Array<RouteRecordRaw> = [
-	{
-		path: '/login',
-		name: 'login',
-		component: () => import('/@/views/login/index.vue'),
-		meta: {
-			title: '登录',
-		},
-	},
-	{
-		path: '/404',
-		name: 'notFound',
-		component: () => import('/@/views/error/404.vue'),
-		meta: {
-			title: 'message.staticRoutes.notFound',
-		},
-	},
-	{
-		path: '/401',
-		name: 'noPower',
-		component: () => import('/@/views/error/401.vue'),
-		meta: {
-			title: 'message.staticRoutes.noPower',
-		},
-	},
-	/**
-	 * 提示:写在这里的为全屏界面,不建议写在这里
-	 * 请写在 `dynamicRoutes` 路由数组中
-	 */
-
-];

+ 0 - 27
nextadmin_vue3/src/store/index.ts

@@ -1,27 +0,0 @@
-import { InjectionKey } from 'vue';
-import { createStore, useStore as baseUseStore, Store } from 'vuex';
-import { RootStateTypes } from '/@/store/interface/index';
-
-// Vite supports importing multiple modules from the file system using the special import.meta.glob function
-// see https://cn.vitejs.dev/guide/features.html#glob-import
-const modulesFiles = import.meta.globEager('./modules/*.ts');
-const pathList: string[] = [];
-
-for (const path in modulesFiles) {
-	pathList.push(path);
-}
-
-const modules = pathList.reduce((modules: { [x: string]: any }, modulePath: string) => {
-	const moduleName = modulePath.replace(/^\.\/modules\/(.*)\.\w+$/, '$1');
-	const value = modulesFiles[modulePath];
-	modules[moduleName] = value.default;
-	return modules;
-}, {});
-
-export const key: InjectionKey<Store<RootStateTypes>> = Symbol();
-
-export const store = createStore<RootStateTypes>({ modules });
-
-export function useStore() {
-	return baseUseStore(key);
-}

+ 0 - 23
nextadmin_vue3/src/store/modules/keepAliveNames.ts

@@ -1,23 +0,0 @@
-import { Module } from 'vuex';
-import { KeepAliveNamesState, RootStateTypes } from '/@/store/interface/index';
-
-const keepAliveNamesModule: Module<KeepAliveNamesState, RootStateTypes> = {
-	namespaced: true,
-	state: {
-		keepAliveNames: [],
-	},
-	mutations: {
-		// 设置路由缓存(name字段)
-		getCacheKeepAlive(state: any, data: Array<string>) {
-			state.keepAliveNames = data;
-		},
-	},
-	actions: {
-		// 设置路由缓存(name字段)
-		async setCacheKeepAlive({ commit }, data: Array<string>) {
-			commit('getCacheKeepAlive', data);
-		},
-	},
-};
-
-export default keepAliveNamesModule;

+ 0 - 23
nextadmin_vue3/src/store/modules/requestOldRoutes.ts

@@ -1,23 +0,0 @@
-import { Module } from 'vuex';
-import { RequestOldRoutesState, RootStateTypes } from '/@/store/interface/index';
-
-const requestOldRoutesModule: Module<RequestOldRoutesState, RootStateTypes> = {
-	namespaced: true,
-	state: {
-		requestOldRoutes: [],
-	},
-	mutations: {
-		// 后端控制路由
-		getBackEndControlRoutes(state: any, data: object) {
-			state.requestOldRoutes = data;
-		},
-	},
-	actions: {
-		// 后端控制路由
-		setBackEndControlRoutes({ commit }, routes: Array<string>) {
-			commit('getBackEndControlRoutes', routes);
-		},
-	},
-};
-
-export default requestOldRoutesModule;

+ 0 - 41
nextadmin_vue3/src/store/modules/routesList.ts

@@ -1,41 +0,0 @@
-import { Module } from 'vuex';
-import { RoutesListState, RootStateTypes } from '/@/store/interface/index';
-
-const routesListModule: Module<RoutesListState, RootStateTypes> = {
-	namespaced: true,
-	state: {
-		routesList: [],
-		isColumnsMenuHover: false,
-		isColumnsNavHover: false,
-	},
-	mutations: {
-		// 设置路由,菜单中使用到
-		getRoutesList(state: any, data: Array<object>) {
-			state.routesList = data;
-		},
-		// 设置分栏布局,鼠标是否移入移出(菜单)
-		getColumnsMenuHover(state: any, bool: Boolean) {
-			state.isColumnsMenuHover = bool;
-		},
-		// 设置分栏布局,鼠标是否移入移出(导航)
-		getColumnsNavHover(state: any, bool: Boolean) {
-			state.isColumnsNavHover = bool;
-		},
-	},
-	actions: {
-		// 设置路由,菜单中使用到
-		async setRoutesList({ commit }, data: any) {
-			commit('getRoutesList', data);
-		},
-		// 设置分栏布局,鼠标是否移入移出(菜单)
-		async setColumnsMenuHover({ commit }, bool: Boolean) {
-			commit('getColumnsMenuHover', bool);
-		},
-		// 设置分栏布局,鼠标是否移入移出(菜单)
-		async setColumnsNavHover({ commit }, bool: Boolean) {
-			commit('getColumnsNavHover', bool);
-		},
-	},
-};
-
-export default routesListModule;

+ 0 - 34
nextadmin_vue3/src/store/modules/tagsViewRoutes.ts

@@ -1,34 +0,0 @@
-import { Module } from 'vuex';
-import { TagsViewRoutesState, RootStateTypes } from '/@/store/interface/index';
-import { Session } from '/@/utils/storage';
-
-const tagsViewRoutesModule: Module<TagsViewRoutesState, RootStateTypes> = {
-	namespaced: true,
-	state: {
-		tagsViewRoutes: [],
-		isTagsViewCurrenFull: false,
-	},
-	mutations: {
-		// 设置 TagsView 路由
-		getTagsViewRoutes(state: any, data: Array<string>) {
-			state.tagsViewRoutes = data;
-		},
-		// 设置卡片全屏
-		getCurrenFullscreen(state: any, bool: boolean) {
-			Session.set('isTagsViewCurrenFull', bool);
-			state.isTagsViewCurrenFull = bool;
-		},
-	},
-	actions: {
-		// 设置 TagsView 路由
-		async setTagsViewRoutes({ commit }, data: Array<string>) {
-			commit('getTagsViewRoutes', data);
-		},
-		// 设置卡片全屏
-		setCurrenFullscreen({ commit }, bool: Boolean) {
-			commit('getCurrenFullscreen', bool);
-		},
-	},
-};
-
-export default tagsViewRoutesModule;

+ 0 - 34
nextadmin_vue3/src/store/modules/userInfos.ts

@@ -1,34 +0,0 @@
-import { Module } from 'vuex';
-import { Session } from '/@/utils/storage';
-import { UserInfosState, RootStateTypes } from '/@/store/interface/index';
-
-const userInfosModule: Module<UserInfosState, RootStateTypes> = {
-	namespaced: true,
-	state: {
-		userInfos: {
-			authBtnList: [],
-			photo: '',
-			roles: [],
-			time: 0,
-			userName: '',
-		},
-	},
-	mutations: {
-		// 设置用户信息
-		getUserInfos(state, data: any) {
-			state.userInfos = data;
-		},
-	},
-	actions: {
-		// 设置用户信息
-		async setUserInfos({ commit }, data: UserInfosState) {
-			if (data) {
-				commit('getUserInfos', data);
-			} else {
-				if (Session.get('userInfo')) commit('getUserInfos', Session.get('userInfo'));
-			}
-		},
-	},
-};
-
-export default userInfosModule;

+ 0 - 227
nextadmin_vue3/src/theme/element.scss

@@ -1,227 +0,0 @@
-@import 'mixins/index.scss';
-
-/* Button 按钮
-------------------------------- */
-// 第三方字体图标大小
-.el-button i.el-icon,
-.el-button i.iconfont,
-.el-button i.fa,
-.el-button--default i.iconfont,
-.el-button--default i.fa {
-	font-size: 14px !important;
-	margin-right: 5px;
-}
-.el-button--small i.iconfont,
-.el-button--small i.fa {
-	font-size: 12px !important;
-	margin-right: 5px;
-}
-
-/* Input 输入框、InputNumber 计数器
-------------------------------- */
-// 菜单搜索
-.el-autocomplete-suggestion__wrap {
-	max-height: 280px !important;
-}
-
-/* Form 表单
-------------------------------- */
-.el-form {
-	.el-form-item:last-of-type {
-		margin-bottom: 0 !important;
-	}
-}
-
-/* Alert 警告
-------------------------------- */
-.el-alert__title {
-	word-break: break-all;
-}
-
-/* Message 消息提示
-------------------------------- */
-.el-message {
-	min-width: unset !important;
-	padding: 15px !important;
-	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.02);
-}
-
-/* NavMenu 导航菜单
-------------------------------- */
-// 鼠标 hover 时颜色
-.el-menu-hover-bg-color {
-	background-color: var(--next-color-menu-hover) !important;
-}
-// 默认样式修改
-.el-menu {
-	border-right: none !important;
-	width: 220px;
-}
-// 修复点击左侧菜单折叠再展开时,宽度不跟随问题
-.el-menu--collapse {
-	width: 64px !important;
-}
-.el-menu-item,
-.el-sub-menu__title {
-	color: var(--next-bg-menuBarColor);
-}
-.el-menu.el-menu--horizontal {
-	border-bottom: none !important;
-}
-.el-menu-item {
-	height: 56px !important;
-	line-height: 56px !important;
-}
-// 外部链接时
-.el-menu-item a,
-.el-menu-item a:hover,
-.el-menu-item i,
-.el-sub-menu__title i {
-	color: inherit;
-	text-decoration: none;
-}
-// 第三方图标字体间距/大小设置
-.el-menu-item .iconfont,
-.el-sub-menu .iconfont,
-.el-menu-item .fa,
-.el-sub-menu .fa {
-	@include generalIcon;
-}
-// 高亮时
-.el-menu-item.is-active,
-.el-sub-menu.is-active .el-sub-menu__title {
-	@extend .el-menu-hover-bg-color;
-	i,
-	span {
-		color: var(--el-menu-active-color) !important;
-	}
-}
-.el-sub-menu.is-active.is-opened {
-	.el-sub-menu__title {
-		background-color: unset !important;
-	}
-	i,
-	span {
-		color: unset !important;
-	}
-}
-// 鼠标 hover 时
-.el-menu-item:hover,
-.el-sub-menu__title:hover {
-	@extend .el-menu-hover-bg-color;
-}
-// 菜单收起时且时 a 链接
-.el-popper.is-dark a {
-	color: var(--el-color-white) !important;
-	text-decoration: none;
-}
-// 菜单收起时鼠标经过背景颜色/字体颜色
-.el-popper.is-light {
-	.el-menu--vertical {
-		.el-menu {
-			background: var(--next-bg-menuBar);
-		}
-	}
-	.el-menu--horizontal {
-		background: var(--next-bg-topBar);
-		.el-menu,
-		.el-menu-item,
-		.el-sub-menu__title {
-			color: var(--next-bg-topBarColor);
-			background: var(--next-bg-topBar);
-		}
-	}
-}
-
-/* Tabs 标签页
-------------------------------- */
-.el-tabs__nav-wrap::after {
-	height: 1px !important;
-}
-
-/* Dropdown 下拉菜单
-------------------------------- */
-.el-dropdown-menu .el-dropdown-menu__item {
-	white-space: nowrap;
-}
-
-/* Steps 步骤条
-------------------------------- */
-.el-step__icon-inner {
-	font-size: 30px !important;
-	font-weight: 400 !important;
-}
-.el-step__title {
-	font-size: 14px;
-}
-
-/* Dialog 对话框
-------------------------------- */
-.el-overlay {
-	overflow: hidden;
-	.el-overlay-dialog {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		position: unset !important;
-		width: 100%;
-		height: 100%;
-		.el-dialog {
-			margin: 0 auto !important;
-			position: absolute;
-			.el-dialog__body {
-				padding: 20px !important;
-			}
-		}
-	}
-}
-.el-dialog__body {
-	max-height: calc(90vh - 111px) !important;
-	overflow-y: auto;
-	overflow-x: hidden;
-}
-
-/* Card 卡片
-------------------------------- */
-.el-card__header {
-	padding: 15px 20px;
-}
-
-/* scrollbar
-------------------------------- */
-.el-scrollbar__bar {
-	z-index: 4;
-}
-.el-scrollbar__wrap {
-	overflow-x: hidden !important;
-	max-height: 100%; /*防止页面切换时,滚动条高度不变的问题(滚动条高度非滚动条滚动高度)*/
-}
-.el-select-dropdown .el-scrollbar__wrap {
-	overflow-x: scroll !important;
-}
-.el-select-dropdown__wrap {
-	max-height: 274px !important; /*修复Select 选择器高度问题*/
-}
-.el-cascader-menu__wrap.el-scrollbar__wrap {
-	height: 204px !important; /*修复Cascader 级联选择器高度问题*/
-}
-
-/* Drawer 抽屉
-------------------------------- */
-.el-drawer {
-	--el-drawer-padding-primary: unset !important;
-	.el-drawer__header {
-		padding: 0 15px !important;
-		height: 50px;
-		display: flex;
-		align-items: center;
-		margin-bottom: 0 !important;
-		border-bottom: 1px solid var(--el-border-color-base);
-		color: var(--el-text-color-primary);
-	}
-	.el-drawer__body {
-		width: 100%;
-		height: 100%;
-		overflow: auto;
-	}
-}

+ 0 - 70
nextadmin_vue3/src/theme/iconSelector.scss

@@ -1,70 +0,0 @@
-/* Popover 弹出框(图标选择器)
-------------------------------- */
-.icon-selector-popper {
-	padding: 0 !important;
-	.icon-selector-warp {
-		height: 260px;
-		overflow: hidden;
-		.icon-selector-warp-title {
-			height: 40px;
-			line-height: 40px;
-			padding: 0 15px;
-			.icon-selector-warp-title-tab {
-				span {
-					cursor: pointer;
-					&:hover {
-						color: var(--el-color-primary);
-						text-decoration: underline;
-					}
-				}
-				.span-active {
-					color: var(--el-color-primary);
-					text-decoration: underline;
-				}
-			}
-		}
-		.icon-selector-warp-row {
-			height: 230px;
-			overflow: hidden;
-			border-top: var(--el-border-base);
-			.el-row {
-				padding: 15px;
-			}
-			.el-scrollbar__bar.is-horizontal {
-				display: none;
-			}
-			.icon-selector-warp-item {
-				display: flex;
-				border: var(--el-border-base);
-				padding: 5px;
-				border-radius: 5px;
-				margin-bottom: 10px;
-				.icon-selector-warp-item-value {
-					i {
-						font-size: 20px;
-						color: var(--el-text-color-regular);
-					}
-				}
-				&:hover {
-					cursor: pointer;
-					background-color: var(--el-color-primary-light-9);
-					border: 1px solid var(--el-color-primary-light-6);
-					.icon-selector-warp-item-value {
-						i {
-							color: var(--el-color-primary);
-						}
-					}
-				}
-			}
-			.icon-selector-active {
-				background-color: var(--el-color-primary-light-9);
-				border: 1px solid var(--el-color-primary-light-6);
-				.icon-selector-warp-item-value {
-					i {
-						color: var(--el-color-primary);
-					}
-				}
-			}
-		}
-	}
-}

+ 0 - 16
nextadmin_vue3/src/theme/media/form.scss

@@ -1,16 +0,0 @@
-@import './index.scss';
-
-/* 页面宽度小于576px
-------------------------------- */
-@media screen and (max-width: $xs) {
-	.el-form-item__label {
-		width: 100% !important;
-		text-align: left !important;
-	}
-	.el-form-item__content {
-		margin-left: 0 !important;
-	}
-	.el-form-item {
-		display: unset !important;
-	}
-}

+ 0 - 63
nextadmin_vue3/src/theme/media/login.scss

@@ -1,63 +0,0 @@
-@import './index.scss';
-
-/* 页面宽度小于992px
-------------------------------- */
-@media screen and (max-width: $lg) {
-	.login-container {
-		.login-icon-group {
-			&::before {
-				content: '';
-				height: 70% !important;
-				transition: all 0.3s ease;
-			}
-			&::after {
-				content: '';
-				width: 100px !important;
-				height: 200px !important;
-				transition: all 0.3s ease;
-			}
-		}
-	}
-}
-
-/* 页面宽度小于992px
-------------------------------- */
-@media screen and (max-width: $md) {
-	.login-content {
-		right: unset !important;
-		left: 50% !important;
-		transform: translate(-50%, -50%) translate3d(0, 0, 0) !important;
-	}
-}
-
-/* 页面宽度小于576px
-------------------------------- */
-@media screen and (max-width: $xs) {
-	.login-container {
-		.login-icon-group {
-			display: none !important;
-		}
-		.login-content {
-			width: 100% !important;
-			height: 100% !important;
-			padding: 20px 0 !important;
-			border-radius: 0 !important;
-			box-shadow: unset !important;
-			border: none !important;
-		}
-		.el-form-item {
-			display: flex !important;
-		}
-	}
-}
-
-/* 页面宽度小于375px
-------------------------------- */
-@media screen and (max-width: $us) {
-	.login-container {
-		.login-content-title {
-			font-size: 18px !important;
-			transition: all 0.3s ease;
-		}
-	}
-}

+ 0 - 28
nextadmin_vue3/src/theme/other.scss

@@ -1,28 +0,0 @@
-/* wangeditor富文本编辑器
-------------------------------- */
-.w-e-toolbar {
-	border: 1px solid #ebeef5 !important;
-	border-bottom: 1px solid #ebeef5 !important;
-	border-top-left-radius: 3px;
-	border-top-right-radius: 3px;
-	z-index: 2 !important;
-}
-.w-e-text-container {
-	border: 1px solid #ebeef5 !important;
-	border-top: none !important;
-	border-bottom-left-radius: 3px;
-	border-bottom-right-radius: 3px;
-	z-index: 1 !important;
-}
-
-/* web端自定义截屏
-------------------------------- */
-#screenShotContainer {
-	z-index: 9998 !important;
-}
-#toolPanel {
-	height: 42px !important;
-}
-#optionPanel {
-	height: 37px !important;
-}

+ 0 - 570
nextadmin_vue3/src/theme/yckj-common.scss

@@ -1,570 +0,0 @@
-/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
-// 主色
-$color-primary: #409EFF;
-
-// 辅助色
-$color-info: #909399;
-$color-success: #67C23A;
-$color-warning: #E6A23C;
-$color-danger: #F56C6C;
-
-// 文字
-$color-text-main: #303133;
-$color-text-normal: #606266;
-$color-text-sub: #909399;
-$color-text-placehoder: #C0C4CC;
-
-// 边框
-$color-border-1: #DCDFE6;
-$color-border-2: #E4E7ED;
-$color-border-3: #EBEEF5;
-$color-border-4: #F2F6FC;
-
-// 背景
-$color-bg: #f8f8f9;
-
-//文字颜色
-.text_color_primary {
-	color: $color-primary;
-}
-
-.text_color_success {
-	color: $color-success;
-}
-
-.text_color_warning {
-	color: $color-warning;
-}
-
-
-.text_color_danger {
-	color: $color-danger;
-}
-
-
-.text_color_main {
-	color: $color-text-main;
-}
-
-.text_color_normal {
-	color: $color-text-normal;
-}
-
-.text_color_content {
-	color: $color-info;
-}
-
-.text_color_tips {
-	color: $color-text-sub;
-}
-
-.text_color_placehoder {
-	color: $color-text-placehoder;
-}
-
-.white {
-	color: #fff !important;
-}
-
-.red {
-	color: #ff0000 !important;
-}
-
-.black {
-	color: #000 !important;
-}
-
-.grey {
-	color: grey !important;
-}
-
-.blue {
-	color: blue !important;
-}
-
-.light-blue {
-	color: #009ceb !important;
-}
-
-.color_link {
-	color: #409eff;
-}
-
-//END 文字颜色
-
-.blank_s {
-	height: 8px;
-}
-
-.blank_m {
-	height: 16px;
-}
-
-.blank_l {
-	height: 26px;
-}
-
-.tc {
-	text-align: center;
-}
-
-.tl {
-	text-align: left;
-}
-
-.tr {
-	text-align: right;
-}
-
-//边框
-//全边框
-.bds_1 {
-	border: solid 1px $color-border-1 !important;
-}
-
-.bds_2 {
-	border: solid 1px $color-border-2 !important;
-}
-
-.bds_3 {
-	border: solid 1px $color-border-3 !important;
-}
-
-.bds_4 {
-	border: solid 1px $color-border-4 !important;
-}
-
-.bdd_1 {
-	border: dashed 1px $color-border-1 !important;
-}
-
-.bdd_2 {
-	border: dashed 1px $color-border-2 !important;
-}
-
-.bdd_3 {
-	border: dashed 1px $color-border-3 !important;
-}
-
-.bdd_4 {
-	border: dashed 1px $color-border-4 !important;
-}
-
-//上边框
-.bdd_t_1 {
-	border-top: dashed 1px $color-border-1 !important;
-}
-
-.bdd_t_2 {
-	border-top: dashed 1px $color-border-2 !important;
-}
-
-.bdd_t_3 {
-	border-top: dashed 1px $color-border-3 !important;
-}
-
-.bdd_t_4 {
-	border-top: dashed 1px $color-border-4 !important;
-}
-
-.bds_t_1 {
-	border-top: solid 1px $color-border-1 !important;
-}
-
-.bds_t_2 {
-	border-top: solid 1px $color-border-2 !important;
-}
-
-.bds_t_3 {
-	border-top: solid 1px $color-border-3 !important;
-}
-
-.bds_t_4 {
-	border-top: solid 1px $color-border-4 !important;
-}
-
-//左边框
-.bdd_l_1 {
-	border-left: dashed 1px $color-border-1 !important;
-}
-
-.bdd_l_2 {
-	border-left: dashed 1px $color-border-2 !important;
-}
-
-.bdd_l_3 {
-	border-left: dashed 1px $color-border-3 !important;
-}
-
-.bdd_l_4 {
-	border-left: dashed 1px $color-border-4 !important;
-}
-
-.bds_l_1 {
-	border-left: solid 1px $color-border-1 !important;
-}
-
-.bds_l_2 {
-	border-left: solid 1px $color-border-2 !important;
-}
-
-.bds_l_3 {
-	border-left: solid 1px $color-border-3 !important;
-}
-
-.bds_l_4 {
-	border-left: solid 1px $color-border-4 !important;
-}
-
-//右边框
-.bdd_r_1 {
-	border-right: dashed 1px $color-border-1 !important;
-}
-
-.bdd_r_2 {
-	border-right: dashed 1px $color-border-2 !important;
-}
-
-.bdd_r_3 {
-	border-right: dashed 1px $color-border-3 !important;
-}
-
-.bdd_r_4 {
-	border-right: dashed 1px $color-border-4 !important;
-}
-
-.bds_r_1 {
-	border-right: solid 1px $color-border-1 !important;
-}
-
-.bds_r_2 {
-	border-right: solid 1px $color-border-2 !important;
-}
-
-.bds_r_3 {
-	border-right: solid 1px $color-border-3 !important;
-}
-
-.bds_r_4 {
-	border-right: solid 1px $color-border-4 !important;
-}
-
-//下边框
-.bds_b_1 {
-	border-bottom: solid 1px $color-border-1 !important;
-}
-
-.bds_b_2 {
-	border-bottom: solid 1px $color-border-2 !important;
-}
-
-.bds_b_3 {
-	border-bottom: solid 1px $color-border-3 !important;
-}
-
-.bds_b_4 {
-	border-bottom: solid 1px $color-border-4 !important;
-}
-
-.bdd_b_1 {
-	border-bottom: dashed 1px $color-border-1 !important;
-}
-
-.bdd_b_2 {
-	border-bottom: dashed 1px $color-border-2 !important;
-}
-
-.bdd_b_3 {
-	border-bottom: dashed 1px $color-border-3 !important;
-}
-
-.bdd_b_4 {
-	border-bottom: dashed 1px $color-border-4 !important;
-}
-
-.bdn {
-	border: none !important;
-}
-
-.bdn_b {
-	border-bottom: none !important;
-}
-
-.bdn_t {
-	border-top: none !important;
-}
-
-.bdn_l {
-	border-left: none !important;
-}
-
-//end 边框
-.bg_white {
-	background: #fff !important;
-}
-
-.bg_f5 {
-	background: #f5f5f5 !important;
-}
-
-.bg_ff {
-	background: #fff !important;
-}
-
-.bg_none {
-	background: none !important;
-}
-
-.cursor {
-	//不要使用,即将废弃
-	cursor: pointer;
-}
-
-.cursor_pointer {
-	cursor: pointer;
-}
-
-.cursor_none {
-	cursor: default !important;
-}
-
-//禁用互动的鼠标样式
-.cursor_not_allowed {
-	cursor: not-allowed;
-}
-
-.dis_blk {
-	display: block !important;
-}
-
-.dis_none {
-	display: none !important;
-}
-
-.dis_inline {
-	display: inline !important;
-}
-
-.dis_inb {
-	display: inline-block !important;
-}
-
-.clearfix {
-	clear: both;
-}
-
-.clearfix:after {
-	content: 'clearfix';
-	display: block;
-	height: 0;
-	clear: both;
-	visibility: hidden;
-}
-
-.clear {
-	clear: both;
-}
-
-.fl {
-	float: left !important;
-}
-
-.fwb {
-	font-weight: bold;
-}
-
-.bgc_grey {
-	background: #ccc;
-}
-
-@for $i from 12 through 50 {
-	.fs#{$i} {
-		font-size: $i * 1px !important;
-	}
-}
-
-.fr {
-	float: right !important;
-}
-
-//border-radius
-@for $i from 10 through 30 {
-	.lh#{$i*1} {
-		line-height: calc($i /10);
-	}
-}
-
-@for $i from 1 through 10 {
-	.br#{$i*10} {
-		border-radius: #{$i * 1}px !important;
-	}
-}
-
-@for $i from 1 through 20 {
-	.height#{$i*10} {
-		height: #{$i * 10}px !important;
-	}
-}
-
-
-
-@for $i from 0 through 12 {
-	.mb#{$i*5} {
-		margin-bottom: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.mt#{$i*5} {
-		margin-top: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.ml#{$i*5} {
-		margin-left: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.mr#{$i*5} {
-		margin-right: #{$i * 5}px !important;
-	}
-}
-
-.m0 {
-	margin: 0 !important;
-}
-
-.ma0 {
-	margin: 0 auto;
-}
-
-.maf1 {
-	margin-left: -1px;
-}
-
-.pb0 {
-	padding-bottom: 0 !important;
-}
-
-@for $i from 0 through 12 {
-	.p#{$i*5} {
-		padding: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.pl#{$i*5} {
-		padding-left: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.pr#{$i*5} {
-		padding-right: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.pb#{$i*5} {
-		padding-bottom: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 0 through 12 {
-	.pt#{$i*5} {
-		padding-top: #{$i * 5}px !important;
-	}
-}
-
-@for $i from 1 through 100 {
-	.pct#{$i} {
-		width: $i * 1%;
-	}
-}
-
-.nowrap {
-	overflow: hidden;
-	-o-text-overflow: ellipsis;
-	/*兼容opera*/
-	text-overflow: ellipsis;
-	/*这就是省略号喽*/
-	overflow: hidden;
-	/*设置超过的隐藏*/
-	white-space: nowrap;
-	/*设置不折行*/
-}
-
-.pos_r {
-	position: relative;
-}
-
-.pos_a {
-	position: absolute;
-}
-
-.pos_f {
-	position: fixed;
-}
-
-.text_l {
-	text-align: left !important;
-}
-
-.text_r {
-	text-align: right !important;
-}
-
-.text_c {
-	text-align: center !important;
-}
-
-@for $i from 0 through 90 {
-	.width#{$i*20} {
-		width: #{$i * 20}px !important;
-	}
-}
-
-.container_min {
-	min-width: 1100px;
-}
-
-.container_main {
-	box-sizing: border-box;
-	width: 1100px;
-	margin: 0 auto;
-}
-
-//layer 相关
-.vl-notify-mask {
-	z-index: 10;
-}
-
-.vl-notify-content {
-	height: auto !important;
-	background: #ffffff;
-}
-
-//点击遮罩层
-.cover_out {
-	position: relative;
-	display: inline-block;
-	margin-right: 20px;
-
-	.cover {
-		position: absolute;
-		z-index: 2;
-		width: 100%;
-		height: 100%;
-		left: 0;
-		top: 0;
-		cursor: pointer;
-	}
-}
-
-.vl-notify-mask {
-	background-color: #000000 !important;
-	opacity: 0.6 !important;
-	//z-index: 1000;
-}

+ 0 - 41
nextadmin_vue3/src/utils/arrayOperation.ts

@@ -1,41 +0,0 @@
-/**
- * 判断两数组是否相同
- * @param news 新数据
- * @param old 源数据
- * @returns 两数组相同返回 `true`,反之则反
- */
-export function judementSameArr(news: unknown[] | string[], old: string[]): boolean {
-	let count = 0;
-	const leng = old.length;
-	for (let i in old) {
-		for (let j in news) {
-			if (old[i] === news[j]) count++;
-		}
-	}
-	return count === leng ? true : false;
-}
-
-/**
- * 判断两个对象是否相同
- * @param a 要比较的对象一
- * @param b 要比较的对象二
- * @returns 相同返回 true,反之则反
- */
-export function isObjectValueEqual(a: { [key: string]: any }, b: { [key: string]: any }) {
-	if (!a || !b) return false;
-	let aProps = Object.getOwnPropertyNames(a);
-	let bProps = Object.getOwnPropertyNames(b);
-	if (aProps.length != bProps.length) return false;
-	for (let i = 0; i < aProps.length; i++) {
-		let propName = aProps[i];
-		let propA = a[propName];
-		let propB = b[propName];
-		if (!b.hasOwnProperty(propName)) return false;
-		if (propA instanceof Object) {
-			if (!isObjectValueEqual(propA, propB)) return false;
-		} else if (propA !== propB) {
-			return false;
-		}
-	}
-	return true;
-}

+ 0 - 42
nextadmin_vue3/src/utils/loading.ts

@@ -1,42 +0,0 @@
-import { nextTick } from 'vue';
-import '/@/theme/loading.scss';
-
-/**
- * 页面全局 Loading
- * @method start 创建 loading
- * @method done 移除 loading
- */
-export const NextLoading = {
-	// 创建 loading
-	start: () => {
-		const bodys: Element = document.body;
-		const div = <HTMLElement>document.createElement('div');
-		div.setAttribute('class', 'loading-next');
-		const htmls = `
-			<div class="loading-next-box">
-			<div class="loading-next-box-warp">
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-				<div class="loading-next-box-item"></div>
-			</div>
-		</div>
-		`;
-		div.innerHTML = htmls;
-		bodys.insertBefore(div, bodys.childNodes[0]);
-		window.nextLoading = true;
-	},
-	// 移除 loading
-	done: () => {
-		nextTick(() => {
-			window.nextLoading = false;
-			const el = <HTMLElement>document.querySelector('.loading-next');
-			el?.parentNode?.removeChild(el);
-		});
-	},
-};

+ 0 - 134
nextadmin_vue3/src/utils/other.ts

@@ -1,134 +0,0 @@
-import { nextTick } from 'vue';
-import type { App } from 'vue';
-import * as svg from '@element-plus/icons-vue';
-import router from '/@/router/index';
-import { store } from '/@/store/index';
-import { i18n } from '/@/i18n/index';
-import { Local } from '/@/utils/storage';
-import SvgIcon from '/@/components/svgIcon/index.vue';
-
-/**
- * 导出全局注册 element plus svg 图标
- * @param app vue 实例
- * @description 使用:https://element-plus.gitee.io/zh-CN/component/icon.html
- */
-export function elSvg(app: App) {
-	const icons = svg as any;
-	for (const i in icons) {
-		app.component(`ele-${icons[i].name}`, icons[i]);
-	}
-	app.component('SvgIcon', SvgIcon);
-}
-
-/**
- * 设置浏览器标题国际化
- * @method const title = useTitle(); ==> title()
- */
-export function useTitle() {
-	nextTick(() => {
-		let webTitle = '';
-		let globalTitle: string = store.state.themeConfig.themeConfig.globalTitle;
-		router.currentRoute.value.path === '/login'
-			? (webTitle = router.currentRoute.value.meta.title as any)
-			: (webTitle = i18n.global.t(router.currentRoute.value.meta.title as any));
-		document.title = `${webTitle} - ${globalTitle}` || globalTitle;
-	});
-}
-
-/**
- * 图片懒加载
- * @param el dom 目标元素
- * @param arr 列表数据
- * @description data-xxx 属性用于存储页面或应用程序的私有自定义数据
- */
-export const lazyImg = (el: any, arr: any) => {
-	const io = new IntersectionObserver((res) => {
-		res.forEach((v: any) => {
-			if (v.isIntersecting) {
-				const { img, key } = v.target.dataset;
-				v.target.src = img;
-				v.target.onload = () => {
-					io.unobserve(v.target);
-					arr[key]['loading'] = false;
-				};
-			}
-		});
-	});
-	nextTick(() => {
-		document.querySelectorAll(el).forEach((img) => io.observe(img));
-	});
-};
-
-/**
- * 全局组件大小
- * @returns 返回 `window.localStorage` 中读取的缓存值 `globalComponentSize`
- */
-export const globalComponentSize: string = Local.get('themeConfig')?.globalComponentSize || store.state.themeConfig.themeConfig?.globalComponentSize;
-
-/**
- * 对象深克隆
- * @param obj 源对象
- * @returns 克隆后的对象
- */
-export function deepClone(obj: any) {
-	let newObj: any;
-	try {
-		newObj = obj.push ? [] : {};
-	} catch (error) {
-		newObj = {};
-	}
-	for (let attr in obj) {
-		if (typeof obj[attr] === 'object') {
-			newObj[attr] = deepClone(obj[attr]);
-		} else {
-			newObj[attr] = obj[attr];
-		}
-	}
-	return newObj;
-}
-
-/**
- * 判断是否是移动端
- */
-export function isMobile() {
-	if (
-		navigator.userAgent.match(
-			/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i
-		)
-	) {
-		return true;
-	} else {
-		return false;
-	}
-}
-
-/**
- * 统一批量导出
- * @method elSvg 导出全局注册 element plus svg 图标
- * @method useTitle 设置浏览器标题国际化
- * @method lazyImg 图片懒加载
- * @method globalComponentSize element plus 全局组件大小
- * @method deepClone 对象深克隆
- * @method isMobile 判断是否是移动端
- */
-const other = {
-	elSvg: (app: App) => {
-		elSvg(app);
-	},
-	useTitle: () => {
-		useTitle();
-	},
-	lazyImg: (el: any, arr: any) => {
-		lazyImg(el, arr);
-	},
-	globalComponentSize,
-	deepClone: (obj: any) => {
-		deepClone(obj);
-	},
-	isMobile: () => {
-		return isMobile();
-	},
-};
-
-// 统一批量导出
-export default other;

+ 0 - 59
nextadmin_vue3/src/utils/theme.ts

@@ -1,59 +0,0 @@
-import { ElMessage } from 'element-plus';
-
-/**
- * hex颜色转rgb颜色
- * @param str 颜色值字符串
- * @returns 返回处理后的颜色值
- */
-export function hexToRgb(str: any) {
-	let hexs: any = '';
-	let reg = /^\#?[0-9A-Fa-f]{6}$/;
-	if (!reg.test(str)) return ElMessage.warning('输入错误的hex');
-	str = str.replace('#', '');
-	hexs = str.match(/../g);
-	for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16);
-	return hexs;
-}
-
-/**
- * rgb颜色转Hex颜色
- * @param r 代表红色
- * @param g 代表绿色
- * @param b 代表蓝色
- * @returns 返回处理后的颜色值
- */
-export function rgbToHex(r: any, g: any, b: any) {
-	let reg = /^\d{1,3}$/;
-	if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return ElMessage.warning('输入错误的rgb颜色值');
-	let hexs = [r.toString(16), g.toString(16), b.toString(16)];
-	for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}`;
-	return `#${hexs.join('')}`;
-}
-
-/**
- * 加深颜色值
- * @param color 颜色值字符串
- * @param level 加深的程度,限0-1之间
- * @returns 返回处理后的颜色值
- */
-export function getDarkColor(color: string, level: number) {
-	let reg = /^\#?[0-9A-Fa-f]{6}$/;
-	if (!reg.test(color)) return ElMessage.warning('输入错误的hex颜色值');
-	let rgb = hexToRgb(color);
-	for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level));
-	return rgbToHex(rgb[0], rgb[1], rgb[2]);
-}
-
-/**
- * 变浅颜色值
- * @param color 颜色值字符串
- * @param level 加深的程度,限0-1之间
- * @returns 返回处理后的颜色值
- */
-export function getLightColor(color: string, level: number) {
-	let reg = /^\#?[0-9A-Fa-f]{6}$/;
-	if (!reg.test(color)) return ElMessage.warning('输入错误的hex颜色值');
-	let rgb = hexToRgb(color);
-	for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]);
-	return rgbToHex(rgb[0], rgb[1], rgb[2]);
-}

+ 0 - 36
nextadmin_vue3/src/utils/viteBuild.ts

@@ -1,36 +0,0 @@
-import dotenv from 'dotenv';
-
-// 定义接口类型声明
-export interface ViteEnv {
-	VITE_PORT: number;
-	VITE_OPEN: boolean;
-	VITE_PUBLIC_PATH: string;
-}
-
-/**
- * vite 打包相关
- * @link 参考:https://cn.vitejs.dev/guide/env-and-mode.html
- * @returns 返回 `VITE_xxx` 环境变量和模式信息
- */
-export function loadEnv(): ViteEnv {
-	console.log("process.env.NODE_ENV=========", process.env.NODE_ENV);
-	const env = process.env.NODE_ENV?.trim();
-	console.log("ViteEnv", env);
-	const ret: any = {};
-	const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];
-	console.log("envList", envList);
-	envList.forEach((e) => {
-		dotenv.config({ path: e });
-	});
-	//console.log("process.env", process.env);
-	for (const envName of Object.keys(process.env)) {
-		let realName = (process.env as any)[envName].replace(/\\n/g, '\n');
-		realName = realName === 'true' ? true : realName === 'false' ? false : realName;
-		if (envName === 'VITE_PORT') realName = Number(realName);
-		if (envName === 'VITE_OPEN') realName = Boolean(realName);
-		ret[envName] = realName;
-		process.env[envName] = realName;
-	}
-	//console.log("ret", ret);
-	return ret;
-}

+ 0 - 158
nextadmin_vue3/src/views/company/component/account.vue

@@ -1,158 +0,0 @@
-<template>
-	<div v-loading="loading" v-if="isShowDialog">
-		<el-dialog title="企业账号" v-model="isShowDialog" width="70%" :close-on-click-modal="false">
-			<div class="system-user-search mb15">
-				<el-input   v-model="param.keyword" placeholder="请输入账号名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10" @click="onSearch">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="editUser(0)">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增账号
-				</el-button>
-			</div>
-			<!-- 表格 -->
-			<el-table :data="tableData" style="width: 100%">
-				<el-table-column type="index" label="序号" width="60" />
-				<el-table-column prop="user.real_name" label="真实姓名" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="user.phone" label="手机号" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="user.gender" label="性别" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="user.id_number" label="身份证" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="update_time" label="更新时间" show-overflow-tooltip> </el-table-column>
-				<el-table-column label="操作" width="60">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="editUser(scope.row.user.id, scope.row.user)">修改</el-button>
-						<!-- <el-button size="small" type="text" @click="onRowDel(scope.row)">删除</el-button> -->
-						<!-- <el-button size="small" type="text" @click="onAccountShow(scope.row)">重置密码</el-button> -->
-					</template>
-				</el-table-column>
-			</el-table>
-			<!-- 分页 -->
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="param.pageSizeList"
-				v-model:current-page="param.page"
-				background
-				v-model:page-size="param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="param.total"
-			>
-			</el-pagination>
-			<account-edit ref="accountEdit" @finished="initTableData"></account-edit>
-		</el-dialog>
-	</div>
-</template>
-<script lang="ts">
-import { defineComponent, reactive, onMounted, toRefs, ref } from 'vue';
-import accountEdit from './accountEdit.vue';
-import User from '/@/api/User';
-import { ElMessageBox, ElMessage } from 'element-plus';
-const tagInfo = '[/views/company/component/account.vue]';
-export default defineComponent({
-	components: { accountEdit },
-	setup() {
-		const accountEdit = ref();
-		const state = reactive({
-			loading: false,
-			isShowDialog: false,
-			param: {
-				enterprise_id: 0,
-				type: 0,
-				keyword: '',
-				page: 1,
-				pageSize: 10,
-				pageSizeList: [10, 20, 30],
-				total: 0,
-			},
-			enterprise_id: 0, //企业 ID
-			tableData: [],
-		});
-		const onSearch = () => {
-			state.param.page = 1;
-			state.param.keyword = '';
-			initTableData();
-		};
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.param.pageSize = val;
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.param.page = val;
-		};
-		// 删除用户
-		const onRowDel = (row: any) => {
-			ElMessageBox.confirm(`此操作将永久删除账户名称:“${row.user.real_name}”,是否继续?`, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		/**
-		 * 编辑或新增
-		 */
-		const editUser = (id: number = 0, userInfo: any = null) => {
-			console.log(tagInfo, 'editUser', id, accountEdit.value);
-			accountEdit.value.openDialog(state.enterprise_id, id, userInfo);
-		};
-		// 打开弹窗
-		const openDialog = (enterprise_id: number = 0) => {
-			state.param.enterprise_id = state.enterprise_id = enterprise_id;
-			onSearch();
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		const initTableData = async () => {
-			let res = await User.staffList(state.param);
-			console.log(tagInfo, 'initTAbleData', res);
-			if (res.code != 0) {
-				return;
-			}
-			state.tableData = res.data.data;
-			state.param.total = res.data.total;
-			console.log('state', state, state.tableData);
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			editUser,
-			accountEdit,
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			onHandleCurrentChange,
-			onHandleSizeChange,
-			initTableData,
-			onSearch,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 272
nextadmin_vue3/src/views/company/component/accountEdit.vue

@@ -1,272 +0,0 @@
-<template>
-	<div class="system-edit-user-container" v-if="isShowDialog" v-loading="loading">
-		<el-dialog :title="submitName + '用户'" v-model="isShowDialog" width="60%" :close-on-click-modal="false">
-			<el-form :model="form" ref="refForm" label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="真实姓名" prop="real_name" :rules="[{ required: true, message: '真实姓名不能为空' }]">
-							<el-input type="text" v-model="form.real_name" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" v-if="user_id == 0">
-						<el-form-item label="密码" prop="password" :rules="[{ required: true, message: '密码不能为空' }]">
-							<el-input type="password" v-model="form.password" autocomplete="off" show-password></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" v-else>
-						<el-form-item label="密码" prop="password">
-							<el-input type="password" v-model="form.password" placeholder="不填则表示不修改密码" autocomplete="off" show-password></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="所属企业" prop="size"> {{ companyName }} </el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="性别" prop="gender" :rules="[{ required: true, message: '请选择性别' }]">
-							<el-radio v-model="form.gender" :label="1">男</el-radio>
-							<el-radio v-model="form.gender" :label="2">女</el-radio>
-						</el-form-item>
-					</el-col>
-
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="联系电话" prop="phone" :rules="[{ required: true, message: '请填写联系电话' }]">
-							<el-input type="text" v-model="form.phone" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="身份证" prop="card_number" :rules="[{ required: true, message: '请填写身份证' }]">
-							<el-input type="text" v-model="form.card_number" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="头像" prop="header_img" :rules="[{ required: true, message: '请上传用户头像' }]">
-							<el-upload
-								class="avatar-uploader"
-								:action="uploadUrl"
-								:show-file-list="false"
-								:on-success="handleLogoSuccess"
-								:before-upload="beforeLogoUpload"
-							>
-								<img v-if="form.header_img" :src="form.header_img" class="avatar" />
-								<el-icon v-else>
-									<ele-Plus />
-								</el-icon>
-							</el-upload>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="closeDialog"  >取消</el-button>
-					<el-button type="primary" @click="onSubmit(refForm)"  >{{ submitName }}</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent, ref } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import type { ElForm } from 'element-plus';
-import Company from '/@/api/Company';
-import User from '/@/api/User';
-import config from '/@/config';
-
-import Urls from '/@/api/Urls';
-
-const tagInfo = '[/views/company/component/accountEdit.vue]';
-type FormInstance = InstanceType<typeof ElForm>;
-export default defineComponent({
-	setup(props, context) {
-		const state = reactive<any>({
-			loading: false,
-			isShowDialog: false,
-			enterprise_id: 0,
-			user_id: 0,
-			companyName: '', //企业名称
-			form: {
-				real_name: '', //
-				phone: '', //
-				gender: '', //
-				enterprise_id: 0, //
-				card_number: '', //
-				password: '', //
-				type: 1, //
-				header_img: '', //
-				qr_code: '', //
-				is_root: 1,
-			},
-			uploadUrl: config.host + Urls.upload.file,
-			submitName: '新增',
-			deptData: [], // 部门数据
-		});
-		const refForm = ref<FormInstance>();
-		// 打开弹窗
-		const openDialog = (enterprise_id: number = 0, user_id: number = 0, userInfo: any = null) => {
-			console.log(tagInfo, 'openDialog0', enterprise_id, user_id, state);
-			state.enterprise_id = enterprise_id;
-			state.user_id = user_id;
-			state.isShowDialog = true;
-			initTableData();
-			if (userInfo) {
-				state.form = {
-					id: userInfo.id,
-					real_name: userInfo.real_name, //
-					phone: userInfo.phone, //
-					gender: userInfo.gender, //
-					enterprise_id: enterprise_id, //
-					card_number: userInfo.id_number, //
-					password: '', //
-					type: userInfo.type, //
-					header_img: userInfo.header_img, //
-					qr_code: userInfo.qr_code, //
-				};
-			}
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = (formEl: FormInstance | undefined) => {
-			console.log(tagInfo, 'onSubmit formEl', formEl);
-			if (!formEl) return;
-			formEl.validate(async (valid) => {
-				if (valid) {
-					let res: any = null;
-					if (state.user_id) {
-						res = await User.edit(state.form);
-					} else {
-						res = await User.add(state.form);
-					}
-					if (res.code != 0) {
-						ElMessage.error(res.msg);
-						return;
-					}
-					context.emit('finished');
-					closeDialog();
-					console.log('submit!');
-				} else {
-					console.log('error submit!');
-					return false;
-				}
-			});
-		};
-		// 初始化
-		const initTableData = async () => {
-			let compnayRes = await Company.getEnterpriseDetail(state.enterprise_id);
-			if (compnayRes.code != 0) {
-				return;
-			}
-
-			state.companyName = compnayRes?.data?.enterprise?.name;
-			console.log(tagInfo, 'state.user_id', state.user_id);
-			if (state.user_id == 0) {
-				state.submitName = '新增';
-				state.form = {
-					real_name: '', //
-					phone: '', //
-					gender: '', //
-					enterprise_id: state.enterprise_id, //
-					card_number: '', //
-					password: '', //
-					type: 1, //
-					header_img: '', //
-					qr_code: '', //
-					is_root: 1,
-					// delete_time: '2022-03-02 14:43:00',
-				};
-				return;
-			}
-			state.submitName = '修改';
-		};
-		const beforeLogoUpload = (file: any) => {
-			console.log(tagInfo, 'beforeLogoUpload', file);
-			const isJPG = file.type === 'image/jpeg';
-			const isLt2M = file.size / 1024 / 1024 < 2;
-
-			if (!isJPG) {
-				//this.$message.error("上传头像图片只能是 JPG 格式!");
-			}
-			if (!isLt2M) {
-				ElMessage.error('上传logo图片大小不能超过 2MB!');
-			}
-			return isJPG && isLt2M;
-		};
-		/**
-		 * logo上传完成
-		 * @param {*} res
-		 * @param {*} file
-		 */
-		const handleLogoSuccess = (res: any, file: any) => {
-			console.log(tagInfo, 'handleLogoSuccess', res, file);
-			state.form.header_img = res.data.url; // URL.createObjectURL(file.raw);
-		};
-		// 页面加载时
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			handleLogoSuccess,
-			beforeLogoUpload,
-			refForm,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-<style lang="scss" >
-.form_detail {
-	height: 60px;
-}
-.avatar-uploader {
-	display: flex;
-}
-.avatar-uploader .el-upload {
-	border: 1px dashed #d9d9d9;
-	border-radius: 6px;
-	cursor: pointer;
-	position: relative;
-	overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-	border-color: #409eff;
-}
-.avatar-uploader-icon {
-	font-size: 28px;
-	color: #8c939d;
-	width: 100px;
-	height: 100px;
-	line-height: 100px;
-	text-align: center;
-}
-.el-upload-list--picture-card {
-	display: flex;
-}
-.el-upload-list--picture-card .el-upload-list__item,
-.el-upload--picture-card,
-.el-upload {
-	width: 100px;
-	height: 100px;
-	line-height: 100px;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
-.el-upload--picture-card i {
-	margin-top: 0;
-}
-
-.avatar {
-	width: 100px;
-	height: 100px;
-	display: block;
-}
-</style>

+ 0 - 387
nextadmin_vue3/src/views/company/component/edit.vue

@@ -1,387 +0,0 @@
-<template>
-	<div class="system-edit-user-container" v-loading="loading">
-		<el-dialog :title="submitName + '企业'" v-model="isShowDialog" width="70%" :close-on-click-modal="false">
-			<el-form :model="form" ref="refForm" label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="公司名称" prop="name" :rules="[{ required: true, message: '公司名称不能为空' }]">
-							<el-input type="text" v-model="form.name" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="公司规模" prop="size" :rules="[{ required: true, message: '请选择公司规模' }]">
-							<el-select v-model="form.size" placeholder="请选择">
-								<el-option v-for="item in companySizeOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
-							</el-select>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="注册金额" prop="register_amount" :rules="[{ required: true, message: '注册金额不能为空' }]">
-							<div class="dis_inb width120"><el-input type="text" v-model="form.register_amount" autocomplete="off"></el-input></div>
-							<div class="dis_inb ml5">万元</div>
-						</el-form-item>
-					</el-col>
-					
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="成立日期" prop="establish_time" :rules="[{ required: true, message: '请选择成立日期' }]">
-							<el-date-picker v-model="form.establish_time" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" format="YYYY-MM-DD">
-							</el-date-picker>
-						</el-form-item>
-					</el-col>
-					
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="联系电话" prop="phone" :rules="[{ required: true, message: '请填写联系电话' }]">
-							<el-input type="text" v-model="form.phone" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="20" class="mb20">
-						<el-form-item label="企业地址" prop="address" :rules="[{ required: true, message: '请填写企业地址' }]">
-							<el-input type="text" v-model="form.address" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="20" class="mb20">
-						<el-form-item label="企业介绍" prop="detail" :rules="[{ required: true, message: '请填写企业介绍' }]">
-							<el-input type="textarea" placeholder="请输入内容" v-model="form.detail" maxlength="500" show-word-limit rows="4"> </el-input>
-						</el-form-item>
-					</el-col>
-
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="logo" prop="logo" :rules="[{ required: true, message: '请上传企业logo' }]">
-							<el-upload
-								class="avatar-uploader"
-								:action="uploadUrl"
-								:show-file-list="false"
-								:on-success="handleLogoSuccess"
-								:before-upload="beforeLogoUpload"
-							>
-								<img v-if="form.logo" :src="form.logo" class="avatar" />
-								<el-icon v-else>
-									<ele-Plus />
-								</el-icon>
-							</el-upload>
-						</el-form-item>
-					</el-col>
-					
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="背景图" prop="bg_image" :rules="[{ required: true, message: '请上传背景图' }]">
-							<el-upload
-								class="avatar-uploader"
-								:action="uploadUrl"
-								:show-file-list="false"
-								:on-success="handleBgSuccess"
-								:before-upload="beforeBgUpload"
-							>
-								<img v-if="form.bg_image" :src="form.bg_image" class="avatar" />
-								<el-icon v-else>
-									<ele-Plus />
-								</el-icon>
-							</el-upload>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="closeDialog">取消</el-button>
-					<el-button type="primary" @click="onSubmit('refForm')">{{ submitName }}</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent, ref } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import type { ElForm } from 'element-plus';
-import Urls from '/@/api/Urls';
-import Company from '/@/api/Company';
-import config from '/@/config';
-const tagInfo = '[company/edit.vue]';
-// 定义接口来定义对象的类型
-interface DeptData {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number | string;
-	describe: string;
-	id: number;
-	children?: DeptData[];
-}
-interface RuleFormRow {
-	name: string;
-	size: string;
-	register_amount: string;
-	establish_time: string;
-	detail: string;
-	phone: string;
-	logo: string;
-	bg_image: string;
-	address:string
-}
-interface UserState {
-	isShowDialog: boolean;
-	ruleForm: RuleFormRow;
-	deptData: Array<DeptData>;
-}
-
-export default defineComponent({
-	name: 'companyEdit',
-
-	data() {
-		return {
-			id: 0,
-			isShowDialog: false,
-			mainform: {} as any,
-			form: {
-				id: 0,
-				name: '',
-				size: '',
-				register_amount: '',
-				establish_time: '',
-				detail: '',
-				phone: '',
-				logo: '',
-				bg_image: '',
-				address:''
-			},
-			companySizeOptions: [
-				{ value: '10人以下', label: '10人以下' },
-				{ value: '10至50人', label: '10至50人' },
-				{ value: '50至100人', label: '50至100人' },
-				{ value: '100人以上', label: '100人以上' },
-			],
-			photoList: [] as any,
-			uploadUrl: config.host + Urls.upload.file,
-			domain:config.domain,
-			deptData: [], // 部门数据
-			submitName: '新增',
-			loading: false,
-		};
-	},
-	created() {},
-	methods: {
-		openDialog(id: number = 0) {
-			this.id = id;
-			this.isShowDialog = true;
-			this.loadData();
-		},
-		closeDialog() {
-			this.isShowDialog = false;
-		},
-		/**
-		 * 载入数据
-		 */
-		async loadData() {
-			if (this.id == 0) {
-				this.form = {
-					id: 0,
-					name: '',
-					size: '',
-					register_amount: '',
-					establish_time: '',
-					detail: '',
-					phone: '',
-					logo: '',
-					bg_image: '',
-					address:''
-				};
-				this.photoList = [];
-				return;
-			}
-			this.loading = true;
-			this.submitName = '修改';
-			let res: any = await Company.getEnterpriseDetail(this.id);
-			if (res.code != 0) {
-				ElMessage.error(res.msg);
-				return;
-			}
-			console.log(tagInfo, 'loaddata', res, this.form);
-			this.form = {
-				id: res.data.enterprise.id,
-				name: res.data.enterprise.name,
-				size: res.data.enterprise.size,
-				register_amount: res.data.enterprise.register_amount,
-				establish_time: res.data.enterprise.establish_time,
-				detail: res.data.enterprise.detail,
-				phone: res.data.enterprise.phone,
-				logo: res.data.enterprise.logo,
-				bg_image: res.data.enterprise.bg_image,
-				address: res.data.enterprise.address,
-			};
-			this.photoList = res.data.enterprise.photo_list;
-			console.log(tagInfo, 'loaddata this.form', this.form);
-			this.loading = false;
-		},
-		/**
-		 * 提交表单
-		 * @param {*} formName
-		 */
-		onSubmit(formName: any) {
-			this.$refs.refForm.validate(async (valid: any) => {
-				if (valid) {
-					let res;
-					if (this.form.id > 0) {
-						res = await Company.edit(this.form);
-					} else {
-						res = await Company.add(this.form);
-					}
-					if (res.code != 0) {
-						ElMessage.error(res.msg);
-						return;
-					}
-					ElMessage.success('操作成功');
-					this.$emit('finished');
-					this.closeDialog();
-				} else {
-					console.log('数据验证不通过');
-					return false;
-				}
-			});
-		},
-		/**
-		 * 重置表单
-		 * @param {*} formName
-		 */
-		/* resetForm(formName) {
-			this.$refs[formName].resetFields();
-		}, */
-		
-		
-		/**
-		 * logo上传完成
-		 * @param {*} res
-		 * @param {*} file
-		 */
-		handleLogoSuccess(res: any, file: any) {
-			console.log(tagInfo, 'handleLogoSuccess', res, file);
-			this.form.logo = res.data.url; // URL.createObjectURL(file.raw);
-		},
-		/**
-		 * logo上传时
-		 */
-		beforeLogoUpload(file: any) {
-			console.log(tagInfo, 'beforeLogoUpload', file);
-			const isJPG = file.type === 'image/jpeg';
-			const isLt2M = file.size / 1024 / 1024 < 2;
-
-			if (!isJPG) {
-				//this.$message.error("上传头像图片只能是 JPG 格式!");
-			}
-			if (!isLt2M) {
-				ElMessage.error('上传logo图片大小不能超过 2MB!');
-			}
-			return isJPG && isLt2M;
-		},
-		
-		/**
-		 * bg上传完成
-		 * @param {*} res
-		 * @param {*} file
-		 */
-		handleBgSuccess(res: any, file: any) {
-			console.log(tagInfo, 'handleBgSuccess', res, file);
-			this.form.bg_image = res.data.url; // URL.createObjectURL(file.raw);
-		},
-		/**
-		 * bg上传时
-		 */
-		beforeBgUpload(file: any) {
-			console.log(tagInfo, 'beforeBgUpload', file);
-			const isJPG = file.type === 'image/jpeg';
-			const isLt2M = file.size / 1024 / 1024 < 2;
-		
-			if (!isJPG) {
-				//this.$message.error("上传头像图片只能是 JPG 格式!");
-			}
-			if (!isLt2M) {
-				ElMessage.error('上传背景图片大小不能超过 2MB!');
-			}
-			return isJPG && isLt2M;
-		},
-		
-		
-		/**
-		 * 相册上传完成
-		 * @param {*} res
-		 * @param {*} file
-		 */
-		handlePhotoSuccess(res: any, file: any) {
-			this.photoList.push({ url: this.domain+res.data.url }); // URL.createObjectURL(file.raw);
-			let dot = '';
-			let photo = '';
-			this.photoList.forEach((item: any) => {
-				photo += dot + item.url;
-				dot = ',';
-			});
-			this.form.photo = photo;
-			console.log('this.photoList', this.photoList);
-		},
-		/**
-		 * 移除相册文件
-		 * @param {*} file
-		 * @param {*} fileList
-		 */
-		handleRemove(file: any, fileList: any) {
-			console.log(file, fileList);
-			for (let i = 0; i < this.photoList.length; i++) {
-				if (this.photoList[i].uid == file.uid) {
-					console.log('删除', i, '--', this.photoList[i].uid, file.uid);
-					this.photoList.splice(i, 1);
-					break;
-				}
-			}
-		},
-	},
-});
-</script>
-<style lang="scss" >
-.form_detail {
-	height: 60px;
-}
-.avatar-uploader {
-	display: flex;
-}
-.avatar-uploader .el-upload {
-	border: 1px dashed #d9d9d9;
-	border-radius: 6px;
-	cursor: pointer;
-	position: relative;
-	overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-	border-color: #409eff;
-}
-.avatar-uploader-icon {
-	font-size: 28px;
-	color: #8c939d;
-	width: 100px;
-	height: 100px;
-	line-height: 100px;
-	text-align: center;
-}
-.el-upload-list--picture-card {
-	display: flex;
-}
-.el-upload-list--picture-card .el-upload-list__item,
-.el-upload--picture-card,
-.el-upload {
-	width: 100px;
-	height: 100px;
-	line-height: 100px;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
-.el-upload--picture-card i {
-	margin-top: 0;
-}
-
-.avatar {
-	width: 100px;
-	height: 100px;
-	display: block;
-}
-</style>

+ 0 - 158
nextadmin_vue3/src/views/company/component/photo.vue

@@ -1,158 +0,0 @@
-<template>
-	<div v-loading="loading" v-if="isShowDialog">
-		<el-dialog title="企业账号" v-model="isShowDialog" width="70%" :close-on-click-modal="false">
-			<div class="system-user-search mb15">
-				<el-input   v-model="param.keyword" placeholder="请输入账号名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10" @click="onSearch">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="editUser(0)">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增账号
-				</el-button>
-			</div>
-			<!-- 表格 -->
-			<el-table :data="tableData" style="width: 100%">
-				<el-table-column type="index" label="序号" width="60" />
-				<el-table-column prop="user.real_name" label="真实姓名" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="user.phone" label="手机号" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="user.gender" label="性别" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="user.id_number" label="身份证" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="update_time" label="更新时间" show-overflow-tooltip> </el-table-column>
-				<el-table-column label="操作" width="60">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="editUser(scope.row.user.id, scope.row.user)">修改</el-button>
-						<!-- <el-button size="small" type="text" @click="onRowDel(scope.row)">删除</el-button> -->
-						<!-- <el-button size="small" type="text" @click="onAccountShow(scope.row)">重置密码</el-button> -->
-					</template>
-				</el-table-column>
-			</el-table>
-			<!-- 分页 -->
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="param.pageSizeList"
-				v-model:current-page="param.page"
-				background
-				v-model:page-size="param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="param.total"
-			>
-			</el-pagination>
-			<account-edit ref="accountEdit" @finished="initTableData"></account-edit>
-		</el-dialog>
-	</div>
-</template>
-<script lang="ts">
-import { defineComponent, reactive, onMounted, toRefs, ref } from 'vue';
-import accountEdit from './accountEdit.vue';
-import User from '/@/api/User';
-import { ElMessageBox, ElMessage } from 'element-plus';
-const tagInfo = '[/views/company/component/photo.vue]';
-export default defineComponent({
-	components: { accountEdit },
-	setup() {
-		const accountEdit = ref();
-		const state = reactive({
-			loading: false,
-			isShowDialog: false,
-			param: {
-				enterprise_id: 0,
-				type: 0,
-				keyword: '',
-				page: 1,
-				pageSize: 10,
-				pageSizeList: [10, 20, 30],
-				total: 0,
-			},
-			enterprise_id: 0, //企业 ID
-			tableData: [],
-		});
-		const onSearch = () => {
-			state.param.page = 1;
-			state.param.keyword = '';
-			initTableData();
-		};
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.param.pageSize = val;
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.param.page = val;
-		};
-		// 删除用户
-		const onRowDel = (row: any) => {
-			ElMessageBox.confirm(`此操作将永久删除账户名称:“${row.user.real_name}”,是否继续?`, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		/**
-		 * 编辑或新增
-		 */
-		const editUser = (id: number = 0, userInfo: any = null) => {
-			console.log(tagInfo, 'editUser', id, accountEdit.value);
-			accountEdit.value.openDialog(state.enterprise_id, id, userInfo);
-		};
-		// 打开弹窗
-		const openDialog = (enterprise_id: number = 0) => {
-			state.param.enterprise_id = state.enterprise_id = enterprise_id;
-			onSearch();
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		const initTableData = async () => {
-			let res = await User.staffList(state.param);
-			console.log(tagInfo, 'initTAbleData', res);
-			if (res.code != 0) {
-				return;
-			}
-			state.tableData = res.data.data;
-			state.param.total = res.data.total;
-			console.log('state', state, state.tableData);
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			editUser,
-			accountEdit,
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			onHandleCurrentChange,
-			onHandleSizeChange,
-			initTableData,
-			onSearch,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 188
nextadmin_vue3/src/views/company/index.vue

@@ -1,188 +0,0 @@
-<template>
-	<div class="system-user-container">
-		<el-card shadow="hover">
-			<div class="system-user-search mb15">
-				<el-input   v-model="tableData.param.keyword" placeholder="请输入企业名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10" @click="onSearch">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="onOpenEdit">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增企业
-				</el-button>
-			</div>
-			<el-table :data="tableData.data" style="width: 100%">
-				<el-table-column type="index" label="序号" width="60" />
-				<el-table-column prop="name" label="企业名称" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="size" label="规模" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="register_amount" label="注册金额" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="establish_time" label="成立时间" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="phone" label="手机号" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="update_time" label="更新时间" show-overflow-tooltip> </el-table-column>
-				<el-table-column label="操作" width="200">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="onOpenEdit(scope.row.id)">修改</el-button>
-						<el-button size="small" type="text" @click="onRowDel(scope.row)">删除</el-button>
-						<el-button size="small" type="text" @click="onAccountShow(scope.row)">账号</el-button>
-						<!-- <el-button size="small" type="text" @click="onPhotoShow(scope.row)">相册</el-button> -->
-					</template>
-				</el-table-column>
-			</el-table>
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="[10, 20, 30]"
-				v-model:current-page="tableData.param.pageNum"
-				background
-				v-model:page-size="tableData.param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="tableData.total"
-			>
-			</el-pagination>
-		</el-card>
-		<edit ref="editRef" @finished="initTableData" />
-		<edit ref="addRef" @finished="onSearch" />
-		<account ref="accountRef" />
-		<photo ref="photoRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import account from './component/account.vue';
-import photo from './component/photo.vue';
-import edit from './component/edit.vue';
-import Company from '/@/api/Company';
-const tagInfo = '[/src/views/company/index.vue]:';
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	name: string;
-	size: string;
-	register_amount: string;
-	establish_time: string;
-	detail: string;
-	phone: string;
-	logo: string;
-}
-
-interface TableDataState {
-	tableData: {
-		data: Array<any>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-		};
-	};
-}
-
-export default defineComponent({
-	name: 'systemUser',
-	components: { edit, account,photo },
-	setup() {
-		const addRef = ref();
-		const editRef = ref();
-		const accountRef = ref();
-		const photoRef = ref();
-		const state = reactive({
-			tableData: {
-				data: [],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-					keyword: '',
-				},
-			},
-			accountShow: false,
-		});
-		const onSearch = () => {
-			state.tableData.param.pageNum = 1;
-			initTableData();
-		};
-		// 初始化表格数据
-		const initTableData = async () => {
-			const data: Array<any> = [];
-			let res = await Company.getEnterpriseList(state.tableData.param.keyword, state.tableData.param.pageNum, state.tableData.param.pageSize);
-			if (res.code != 0) {
-				ElMessage.error(res.msg);
-				return;
-			}
-			state.tableData.total = res.data.total;
-			state.tableData.data = res.data.data;
-		};
-		// 打开新增或修改用户弹窗
-		const onOpenEdit = (id = 0) => {
-			console.log('onOpenEdit', id);
-			if (id > 0) {
-				editRef.value.openDialog(id);
-			} else {
-				addRef.value.openDialog(0);
-			}
-		};
-		//打开账号列表弹窗
-		const onAccountShow = (row: any) => {
-			accountRef.value.openDialog(row.id);
-		};
-		//打开相册列表弹窗
-		const onPhotoShow = (row: any) => {
-			photoRef.value.openDialog(row.id);
-		};
-
-		// 删除用户
-		const onRowDel = (row: any) => {
-			ElMessageBox.confirm(`此操作将永久企业:“${row.name}”,是否继续?`, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(async () => {
-					ElMessage.success('删除成功');
-					await Company.delEnterPrise(row.id);
-					initTableData();
-				})
-				.catch(() => {});
-		};
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.tableData.param.pageSize = val;
-			initTableData();
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.tableData.param.pageNum = val;
-			initTableData();
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			editRef,
-			addRef,
-			photoRef,
-			accountRef,
-			onOpenEdit,
-			onAccountShow,
-			onPhotoShow,
-			onRowDel,
-			onHandleSizeChange,
-			onHandleCurrentChange,
-			onSearch,
-			initTableData,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 19
nextadmin_vue3/src/views/home/index.vue

@@ -1,19 +0,0 @@
-<template>
-	<div class="home-container">
-		<h1>欢迎使用</h1>
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, defineComponent, onMounted, ref, watch, nextTick, onActivated } from 'vue';
-
-export default defineComponent({
-	name: 'home',
-	setup() {
-		return {};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-</style>

+ 0 - 219
nextadmin_vue3/src/views/login/component/account.vue

@@ -1,219 +0,0 @@
-<template>
-	<el-form size="large" class="login-content-form">
-		<el-form-item class="login-animation1">
-			<el-input type="text" :placeholder="$t('message.account.accountPlaceholder1')" v-model="ruleForm.userName" clearable autocomplete="off">
-				<template #prefix>
-					<el-icon class="el-input__icon"><ele-User /></el-icon>
-				</template>
-			</el-input>
-		</el-form-item>
-		<el-form-item class="login-animation2">
-			<el-input
-				:type="isShowPassword ? 'text' : 'password'"
-				:placeholder="$t('message.account.accountPlaceholder2')"
-				v-model="ruleForm.password"
-				autocomplete="off"
-			>
-				<template #prefix>
-					<el-icon class="el-input__icon"><ele-Unlock /></el-icon>
-				</template>
-				<template #suffix>
-					<i
-						class="iconfont el-input__icon login-content-password"
-						:class="isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'"
-						@click="isShowPassword = !isShowPassword"
-					>
-					</i>
-				</template>
-			</el-input>
-		</el-form-item>
-		<el-form-item class="login-animation3">
-			<el-col :span="15">
-				<el-input
-					type="text"
-					maxlength="4"
-					:placeholder="$t('message.account.accountPlaceholder3')"
-					v-model="ruleForm.code"
-					clearable
-					autocomplete="off"
-				>
-					<template #prefix>
-						<el-icon class="el-input__icon"><ele-Position /></el-icon>
-					</template>
-				</el-input>
-			</el-col>
-			<el-col :span="1"></el-col>
-			<el-col :span="8">
-				<el-button class="login-content-code" @click="updateVerifyCode">{{ verify_code }}</el-button>
-			</el-col>
-		</el-form-item>
-		<el-form-item class="login-animation4">
-			<el-button type="primary" class="login-content-submit" round @click="onSignIn" :loading="loading.signIn">
-				<span>{{ $t('message.account.accountBtnText') }}</span>
-			</el-button>
-		</el-form-item>
-	</el-form>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, defineComponent, computed } from 'vue';
-import { useRoute, useRouter } from 'vue-router';
-import { ElMessage } from 'element-plus';
-import { useI18n } from 'vue-i18n';
-import { initFrontEndControlRoutes } from '/@/router/frontEnd';
-import { initBackEndControlRoutes } from '/@/router/backEnd';
-import { useStore } from '/@/store/index';
-import { Session } from '/@/utils/storage';
-import { formatAxis } from '/@/utils/formatTime';
-import User from '/@/api/User';
-export default defineComponent({
-	name: 'loginAccount',
-	setup() {
-		const { t } = useI18n();
-		const store = useStore();
-		const route = useRoute();
-		const router = useRouter();
-		const state = reactive({
-			isShowPassword: false,
-			ruleForm: {
-				userName: '13800138000',
-				password: '123456',
-				code: '',
-			},
-			verify_code: '',
-			loading: {
-				signIn: false,
-			},
-		});
-		// 时间获取
-		const currentTime = computed(() => {
-			return formatAxis(new Date());
-		});
-		const updateVerifyCode = () => {
-			let randCode: string = Math.random().toString();
-			state.verify_code = randCode.substring(randCode.length - 4);
-			console.log('updateVerifyCode click', randCode);
-		};
-		updateVerifyCode();
-		// 登录
-		const onSignIn = async () => {
-			// 模拟数据
-			console.log('userinfo', state.ruleForm);
-			if (!state.ruleForm.userName || !state.ruleForm.password) {
-				ElMessage.error('账号密码不能为空');
-				return;
-			}
-			if (state.ruleForm.code != state.verify_code) {
-				ElMessage.error('验证码不正确');
-				return;
-			}
-			let res = await User.login(state.ruleForm.userName, state.ruleForm.password);
-			console.log('onSignIn res', res);
-			if (res.code != 0) {
-				ElMessage.error(res.msg);
-				return;
-			}
-			let user = res.data;
-			state.loading.signIn = true;
-			let defaultRoles: Array<string> = [];
-			let defaultAuthBtnList: Array<string> = [];
-			// admin 页面权限标识,对应路由 meta.roles,用于控制路由的显示/隐藏
-			let adminRoles: Array<string> = ['admin'];
-			// admin 按钮权限标识
-			let adminAuthBtnList: Array<string> = ['btn.add', 'btn.del', 'btn.edit', 'btn.link'];
-			// test 页面权限标识,对应路由 meta.roles,用于控制路由的显示/隐藏
-			let testRoles: Array<string> = ['common'];
-			// test 按钮权限标识
-			let testAuthBtnList: Array<string> = ['btn.add', 'btn.link'];
-			// 不同用户模拟不同的用户权限
-			defaultRoles = adminRoles;
-			defaultAuthBtnList = adminAuthBtnList;
-			// 用户信息模拟数据
-			const userInfos = {
-				userName: user.real_name,
-				photo: user.header_img,
-				roles: defaultRoles,
-				authBtnList: defaultAuthBtnList,
-			};
-			// 存储 token 到浏览器缓存
-			Session.set('token', user.token);
-			// 存储用户信息到浏览器缓存
-			Session.set('userInfo', userInfos);
-			// 1、请注意执行顺序(存储用户信息到vuex)
-			store.dispatch('userInfos/setUserInfos', userInfos);
-			if (!store.state.themeConfig.themeConfig.isRequestRoutes) {
-				// 前端控制路由,2、请注意执行顺序
-				await initFrontEndControlRoutes();
-				signInSuccess();
-			} else {
-				// 模拟后端控制路由,isRequestRoutes 为 true,则开启后端控制路由
-				// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path "/"
-				await initBackEndControlRoutes();
-				// 执行完 initBackEndControlRoutes,再执行 signInSuccess
-				signInSuccess();
-			}
-		};
-		// 登录成功后的跳转
-		const signInSuccess = () => {
-			// 初始化登录成功时间问候语
-			let currentTimeInfo = currentTime.value;
-			// 登录成功,跳到转首页
-			// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path "/"
-			// 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中
-			if (route.query?.redirect) {
-				router.push({
-					path: <string>route.query?.redirect,
-					query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '',
-				});
-			} else {
-				router.push('/');
-			}
-			// 登录成功提示
-			// 关闭 loading
-			state.loading.signIn = true;
-			const signInText = t('message.signInText');
-			ElMessage.success(`${currentTimeInfo},${signInText}`);
-		};
-		return {
-			onSignIn,
-			updateVerifyCode,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.login-content-form {
-	margin-top: 20px;
-	@for $i from 1 through 4 {
-		.login-animation#{$i} {
-			opacity: 0;
-			animation-name: error-num;
-			animation-duration: 0.5s;
-			animation-fill-mode: forwards;
-			animation-delay: calc($i/10) + s;
-		}
-	}
-	.login-content-password {
-		display: inline-block;
-		width: 20px;
-		cursor: pointer;
-		&:hover {
-			color: #909399;
-		}
-	}
-	.login-content-code {
-		width: 100%;
-		padding: 0;
-		font-weight: bold;
-		letter-spacing: 5px;
-	}
-	.login-content-submit {
-		width: 100%;
-		letter-spacing: 2px;
-		font-weight: 300;
-		margin-top: 15px;
-	}
-}
-</style>

+ 0 - 58
nextadmin_vue3/src/views/login/component/scan.vue

@@ -1,58 +0,0 @@
-<template>
-	<div class="login-scan-container">
-		<div ref="qrcodeRef"></div>
-		<div class="font12 mt20 login-msg">{{ $t('message.scan.text') }}</div>
-	</div>
-</template>
-
-<script lang="ts">
-import { ref, defineComponent, onMounted } from 'vue';
-import QRCode from 'qrcodejs2-fixes';
-export default defineComponent({
-	name: 'loginScan',
-	setup() {
-		const qrcodeRef = ref<HTMLElement | null>(null);
-		// 初始化生成二维码
-		const initQrcode = () => {
-			(qrcodeRef.value as HTMLElement).innerHTML = '';
-			new QRCode(qrcodeRef.value, {
-				text: `https://qm.qq.com/cgi-bin/qm/qr?k=RdUY97Vx0T0vZ_1OOu-X1yFNkWgDwbjC&jump_from=webapi`,
-				width: 260,
-				height: 260,
-				colorDark: '#000000',
-				colorLight: '#ffffff',
-			});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initQrcode();
-		});
-		return { qrcodeRef };
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.login-scan-animation {
-	opacity: 0;
-	animation-name: error-num;
-	animation-duration: 0.5s;
-	animation-fill-mode: forwards;
-}
-.login-scan-container {
-	padding: 20px;
-	display: flex;
-	flex-direction: column;
-	text-align: center;
-	@extend .login-scan-animation;
-	animation-delay: 0.1s;
-	::v-deep(img) {
-		margin: auto;
-	}
-	.login-msg {
-		color: var(--el-text-color-placeholder);
-		@extend .login-scan-animation;
-		animation-delay: 0.2s;
-	}
-}
-</style>

File diff suppressed because it is too large
+ 0 - 194
nextadmin_vue3/src/views/login/index.vue


+ 0 - 201
nextadmin_vue3/src/views/protocol/component/edit.vue

@@ -1,201 +0,0 @@
-<template>
-	<div class="system-edit-user-container" v-loading="loading">
-		<el-dialog :title="submitName + '协议'" v-model="isShowDialog" width="70%" :close-on-click-modal="false">
-			<el-form :model="form" ref="refForm" label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="8" class="mb20">
-						<el-form-item label="协议标题" prop="title" :rules="[{ required: true, message: '协议标题不能为空' }]">
-							<el-input type="text" v-model="form.title" autocomplete="off"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="17" class="mb20">
-						<el-form-item label="协议内容" prop="content" :rules="[{ required: true, message: '协议内容不能为空' }]">
-							<el-input type="textarea"  v-model="form.content" autocomplete="off" ></el-input>
-						</el-form-item>
-					</el-col>
-					
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="8" class="mb20">
-						<el-form-item label="协议编码" prop="code" :rules="[{ required: true, message: '协议编码不能为空' }]">
-							<el-input type="text" v-model="form.code" autocomplete="off" :disabled="true"></el-input>
-						</el-form-item>
-					</el-col>
-				
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="closeDialog">取消</el-button>
-					<el-button type="primary" @click="onSubmit('refForm')">{{ submitName }}</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent, ref } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import type { ElForm } from 'element-plus';
-import Urls from '/@/api/Urls';
-import Protocol from '/@/api/Protocol';
-import config from '/@/config';
-const tagInfo = '[protocol/edit.vue]';
-// 定义接口来定义对象的类型
-interface DeptData {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number | string;
-	describe: string;
-	id: number;
-	children?: DeptData[];
-}
-interface RuleFormRow {
-	title: string;
-	content: string;
-	code: string;
-}
-interface UserState {
-	isShowDialog: boolean;
-	ruleForm: RuleFormRow;
-	deptData: Array<DeptData>;
-}
-
-export default defineComponent({
-	name: 'protocolEdit',
-
-	data() {
-		return {
-			id: 0,
-			isShowDialog: false,
-			mainform: {} as any,
-			form: {
-				id: 0,
-				title: '',
-				content: '',
-				code: '',
-			},
-			submitName: '新增',
-			loading: false,
-		};
-	},
-	created() {},
-	methods: {
-		openDialog(id: number = 0) {
-			this.id = id;
-			this.isShowDialog = true;
-			this.loadData();
-		},
-		closeDialog() {
-			this.isShowDialog = false;
-		},
-		/**
-		 * 载入数据
-		 */
-		async loadData() {
-			if (this.id == 0) {
-				this.form = {
-					id: 0,
-					title: '',
-					content: '',
-					code: '',
-				};
-				this.photoList = [];
-				return;
-			}
-			this.loading = true;
-			this.submitName = '修改';
-
-			let res: any = await Protocol.detail(this.id);
-			if (res.code != 0) {
-				ElMessage.error(res.msg);
-				return;
-			}
-			console.log(tagInfo, 'loaddata', res, this.form);
-			this.form = {
-				id: res.data.id,
-				title: res.data.title,
-				content: res.data.content,
-				code: res.data.code,
-			};
-			this.loading = false;
-		},
-		/**
-		 * 提交表单
-		 * @param {*} formName
-		 */
-		onSubmit(formName: any) {
-			this.$refs.refForm.validate(async (valid: any) => {
-				if (valid) {
-					let res;
-					if (this.form.id > 0) {
-						res = await Protocol.edit(this.form);
-					} else {
-						res = await Protocol.add(this.form);
-					}
-					if (res.code != 0) {
-						ElMessage.error(res.msg);
-						return;
-					}
-					ElMessage.success('操作成功');
-					this.$emit('finished');
-					this.closeDialog();
-				} else {
-					console.log('数据验证不通过');
-					return false;
-				}
-			});
-		},
-
-
-	},
-});
-</script>
-<style lang="scss" >
-.form_detail {
-	height: 60px;
-}
-.avatar-uploader {
-	display: flex;
-}
-.avatar-uploader .el-upload {
-	border: 1px dashed #d9d9d9;
-	border-radius: 6px;
-	cursor: pointer;
-	position: relative;
-	overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-	border-color: #409eff;
-}
-.avatar-uploader-icon {
-	font-size: 28px;
-	color: #8c939d;
-	width: 100px;
-	height: 100px;
-	line-height: 100px;
-	text-align: center;
-}
-.el-upload-list--picture-card {
-	display: flex;
-}
-.el-upload-list--picture-card .el-upload-list__item,
-.el-upload--picture-card,
-.el-upload {
-	width: 100px;
-	height: 100px;
-	line-height: 100px;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
-.el-upload--picture-card i {
-	margin-top: 0;
-}
-
-.avatar {
-	width: 100px;
-	height: 100px;
-	display: block;
-}
-</style>

+ 0 - 140
nextadmin_vue3/src/views/protocol/index.vue

@@ -1,140 +0,0 @@
-<template>
-	<div class="system-user-container">
-		<el-card shadow="hover">
-			<div class="system-user-search mb15">
-				<el-input   v-model="tableData.param.keyword" placeholder="请输入企业名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10" @click="onSearch">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-			</div>
-			<el-table :data="tableData.data" style="width: 100%">
-				<el-table-column type="index" label="序号" width="60" />
-				<el-table-column prop="title" label="协议标题" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="content" label="协议内容" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="code" label="协议编码" show-overflow-tooltip></el-table-column>
-				<el-table-column label="操作" width="200">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="onOpenEdit(scope.row.id)">修改</el-button>
-						<!-- <el-button size="small" type="text" @click="onPhotoShow(scope.row)">相册</el-button> -->
-					</template>
-				</el-table-column>
-			</el-table>
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="[10, 20, 30]"
-				v-model:current-page="tableData.param.pageNum"
-				background
-				v-model:page-size="tableData.param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="tableData.total"
-			>
-			</el-pagination>
-		</el-card>
-		<edit ref="editRef" @finished="initTableData" />
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import edit from './component/edit.vue';
-import Protocol from '/@/api/Protocol';
-const tagInfo = '[/src/views/protocol/index.vue]:';
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	name: string;
-	size: string;
-	register_amount: string;
-	establish_time: string;
-	detail: string;
-	phone: string;
-	logo: string;
-}
-
-interface TableDataState {
-	tableData: {
-		data: Array<any>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-		};
-	};
-}
-
-export default defineComponent({
-	name: 'systemUser',
-	components: { edit},
-	setup() {
-		const editRef = ref();
-		const state = reactive({
-			tableData: {
-				data: [],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-					keyword: '',
-				},
-			},
-			accountShow: false,
-		});
-		const onSearch = () => {
-			state.tableData.param.pageNum = 1;
-			initTableData();
-		};
-		// 初始化表格数据
-		const initTableData = async () => {
-			const data: Array<any> = [];
-			let res = await Protocol.list(state.tableData.param.keyword, state.tableData.param.pageNum, state.tableData.param.pageSize);
-			if (res.code != 0) {
-				ElMessage.error(res.msg);
-				return;
-			}
-			state.tableData.total = res.data.total;
-			state.tableData.data = res.data.data;
-		};
-		// 打开新增或修改用户弹窗
-		const onOpenEdit = (id = 0) => {
-			console.log('onOpenEdit', id);
-			if (id > 0) {
-				editRef.value.openDialog(id);
-			} else {
-				addRef.value.openDialog(0);
-			}
-		};
-		
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.tableData.param.pageSize = val;
-			initTableData();
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.tableData.param.pageNum = val;
-			initTableData();
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			editRef,
-			onOpenEdit,
-			onHandleSizeChange,
-			onHandleCurrentChange,
-			onSearch,
-			initTableData,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 173
nextadmin_vue3/src/views/system/dept/component/addDept.vue

@@ -1,173 +0,0 @@
-<template>
-	<div class="system-add-dept-container">
-		<el-dialog title="新增部门" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="上级部门">
-							<el-cascader
-								:options="deptData"
-								:props="{ checkStrictly: true, value: 'deptName', label: 'deptName' }"
-								placeholder="请选择部门"
-								clearable
-								class="w100"
-								v-model="ruleForm.deptLevel"
-							>
-								<template #default="{ node, data }">
-									<span>{{ data.deptName }}</span>
-									<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
-								</template>
-							</el-cascader>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="部门名称">
-							<el-input v-model="ruleForm.deptName" placeholder="请输入部门名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="负责人">
-							<el-input v-model="ruleForm.person" placeholder="请输入负责人" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="手机号">
-							<el-input v-model="ruleForm.phone" placeholder="请输入手机号" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="邮箱">
-							<el-input v-model="ruleForm.email" placeholder="请输入" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="排序">
-							<el-input-number v-model="ruleForm.sort" :min="0" :max="999" controls-position="right" placeholder="请输入排序" class="w100" />
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="部门状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="部门描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入部门描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >新 增</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number;
-	describe: string;
-	id: number;
-	children?: TableDataRow[];
-}
-interface DeptSate {
-	isShowDialog: boolean;
-	ruleForm: {
-		deptLevel: Array<string>;
-		deptName: string;
-		person: string;
-		phone: string | number;
-		email: string;
-		sort: number;
-		status: boolean;
-		describe: string;
-	};
-	deptData: Array<TableDataRow>;
-}
-
-export default defineComponent({
-	name: 'systemAddDept',
-	setup() {
-		const state = reactive<DeptSate>({
-			isShowDialog: false,
-			ruleForm: {
-				deptLevel: [], // 上级部门
-				deptName: '', // 部门名称
-				person: '', // 负责人
-				phone: '', // 手机号
-				email: '', // 邮箱
-				sort: 0, // 排序
-				status: true, // 部门状态
-				describe: '', // 部门描述
-			},
-			deptData: [], // 部门数据
-		});
-		// 打开弹窗
-		const openDialog = () => {
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 初始化部门数据
-		const initTableData = () => {
-			state.deptData.push({
-				deptName: 'vueNextAdmin',
-				createTime: new Date().toLocaleString(),
-				status: true,
-				sort: Math.random(),
-				describe: '顶级部门',
-				id: Math.random(),
-				children: [
-					{
-						deptName: 'IT外包服务',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '总部',
-						id: Math.random(),
-					},
-					{
-						deptName: '资本控股',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '分部',
-						id: Math.random(),
-					},
-				],
-			});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 179
nextadmin_vue3/src/views/system/dept/component/editDept.vue

@@ -1,179 +0,0 @@
-<template>
-	<div class="system-edit-dept-container">
-		<el-dialog title="修改部门" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="上级部门">
-							<el-cascader
-								:options="deptData"
-								:props="{ checkStrictly: true, value: 'deptName', label: 'deptName' }"
-								placeholder="请选择部门"
-								clearable
-								class="w100"
-								v-model="ruleForm.deptLevel"
-							>
-								<template #default="{ node, data }">
-									<span>{{ data.deptName }}</span>
-									<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
-								</template>
-							</el-cascader>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="部门名称">
-							<el-input v-model="ruleForm.deptName" placeholder="请输入部门名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="负责人">
-							<el-input v-model="ruleForm.person" placeholder="请输入负责人" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="手机号">
-							<el-input v-model="ruleForm.phone" placeholder="请输入手机号" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="邮箱">
-							<el-input v-model="ruleForm.email" placeholder="请输入" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="排序">
-							<el-input-number v-model="ruleForm.sort" :min="0" :max="999" controls-position="right" placeholder="请输入排序" class="w100" />
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="部门状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="部门描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入部门描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >修 改</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number;
-	describe: string;
-	id: number;
-	children?: TableDataRow[];
-}
-interface RuleFormState {
-	deptLevel: Array<string>;
-	deptName: string;
-	person: string;
-	phone: string | number;
-	email: string;
-	sort: number;
-	status: boolean;
-	describe: string;
-}
-interface DeptSate {
-	isShowDialog: boolean;
-	ruleForm: RuleFormState;
-	deptData: Array<TableDataRow>;
-}
-
-export default defineComponent({
-	name: 'systemEditDept',
-	setup() {
-		const state = reactive<DeptSate>({
-			isShowDialog: false,
-			ruleForm: {
-				deptLevel: [], // 上级部门
-				deptName: '', // 部门名称
-				person: '', // 负责人
-				phone: '', // 手机号
-				email: '', // 邮箱
-				sort: 0, // 排序
-				status: true, // 部门状态
-				describe: '', // 部门描述
-			},
-			deptData: [], // 部门数据
-		});
-		// 打开弹窗
-		const openDialog = (row: RuleFormState) => {
-			row.deptLevel = ['vueNextAdmin'];
-			row.person = 'lyt';
-			row.phone = '12345678910';
-			row.email = 'vueNextAdmin@123.com';
-			state.ruleForm = row;
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 初始化部门数据
-		const initTableData = () => {
-			state.deptData.push({
-				deptName: 'vueNextAdmin',
-				createTime: new Date().toLocaleString(),
-				status: true,
-				sort: Math.random(),
-				describe: '顶级部门',
-				id: Math.random(),
-				children: [
-					{
-						deptName: 'IT外包服务',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '总部',
-						id: Math.random(),
-					},
-					{
-						deptName: '资本控股',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '分部',
-						id: Math.random(),
-					},
-				],
-			});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 163
nextadmin_vue3/src/views/system/dept/index.vue

@@ -1,163 +0,0 @@
-<template>
-	<div class="system-dept-container">
-		<el-card shadow="hover">
-			<div class="system-dept-search mb15">
-				<el-input   placeholder="请输入部门名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="onOpenAddDept">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增部门
-				</el-button>
-			</div>
-			<el-table
-				:data="tableData.data"
-				style="width: 100%"
-				row-key="id"
-				default-expand-all
-				:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
-			>
-				<el-table-column prop="deptName" label="部门名称" show-overflow-tooltip> </el-table-column>
-				<el-table-column label="排序" show-overflow-tooltip width="80">
-					<template #default="scope">
-						{{ scope.$index }}
-					</template>
-				</el-table-column>
-				<el-table-column prop="status" label="部门状态" show-overflow-tooltip>
-					<template #default="scope">
-						<el-tag type="success" v-if="scope.row.status">启用</el-tag>
-						<el-tag type="info" v-else>禁用</el-tag>
-					</template>
-				</el-table-column>
-				<el-table-column prop="describe" label="部门描述" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column label="操作" show-overflow-tooltip width="140">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="onOpenAddDept">新增</el-button>
-						<el-button size="small" type="text" @click="onOpenEditDept(scope.row)">修改</el-button>
-						<el-button size="small" type="text" @click="onTabelRowDel(scope.row)">删除</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-		</el-card>
-		<AddDept ref="addDeptRef" />
-		<EditDept ref="editDeptRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import AddDept from '/@/views/system/dept/component/addDept.vue';
-import EditDept from '/@/views/system/dept/component/editDept.vue';
-
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number;
-	describe: string;
-	id: number;
-	children?: TableDataRow[];
-}
-interface TableDataState {
-	tableData: {
-		data: Array<TableDataRow>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-		};
-	};
-}
-
-export default defineComponent({
-	name: 'systemDept',
-	components: { AddDept, EditDept },
-	setup() {
-		const addDeptRef = ref();
-		const editDeptRef = ref();
-		const state = reactive<TableDataState>({
-			tableData: {
-				data: [],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-				},
-			},
-		});
-		// 初始化表格数据
-		const initTableData = () => {
-			state.tableData.data.push({
-				deptName: 'vueNextAdmin',
-				createTime: new Date().toLocaleString(),
-				status: true,
-				sort: Math.random(),
-				describe: '顶级部门',
-				id: Math.random(),
-				children: [
-					{
-						deptName: 'IT外包服务',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '总部',
-						id: Math.random(),
-					},
-					{
-						deptName: '资本控股',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '分部',
-						id: Math.random(),
-					},
-				],
-			});
-			state.tableData.total = state.tableData.data.length;
-		};
-		// 打开新增菜单弹窗
-		const onOpenAddDept = () => {
-			addDeptRef.value.openDialog();
-		};
-		// 打开编辑菜单弹窗
-		const onOpenEditDept = (row: TableDataRow) => {
-			editDeptRef.value.openDialog(row);
-		};
-		// 删除当前行
-		const onTabelRowDel = (row: TableDataRow) => {
-			ElMessageBox.confirm(`此操作将永久删除部门:${row.deptName}, 是否继续?`, '提示', {
-				confirmButtonText: '删除',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			addDeptRef,
-			editDeptRef,
-			onOpenAddDept,
-			onOpenEditDept,
-			onTabelRowDel,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 128
nextadmin_vue3/src/views/system/dic/component/addDic.vue

@@ -1,128 +0,0 @@
-<template>
-	<div class="system-add-dic-container">
-		<el-dialog title="新增字典" v-model="isShowDialog" width="769px">
-			<el-alert title="半成品,交互过于复杂,请自行扩展!" type="warning" :closable="false" class="mb20"> </el-alert>
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="字典名称">
-							<el-input v-model="ruleForm.dicName" placeholder="请输入字典名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="字段名">
-							<el-input v-model="ruleForm.fieldName" placeholder="请输入字段名,拼接 ruleForm.list" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="字典状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-row :gutter="35" v-for="(v, k) in ruleForm.list" :key="k">
-							<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-								<el-form-item :prop="`list[${k}].label`">
-									<template #label>
-										<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === 0">
-											<el-icon>
-												<ele-Plus />
-											</el-icon>
-										</el-button>
-										<el-button type="danger" circle size="small" @click="onDelRow(k)" v-else>
-											<el-icon>
-												<ele-Delete />
-											</el-icon>
-										</el-button>
-										<span class="ml10">字段</span>
-									</template>
-									<el-input v-model="v.label" style="width: 100%" placeholder="请输入字段名"> </el-input>
-								</el-form-item>
-							</el-col>
-							<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-								<el-form-item label="属性" :prop="`list[${k}].value`">
-									<el-input v-model="v.value" style="width: 100%" placeholder="请输入属性值"> </el-input>
-								</el-form-item>
-							</el-col>
-						</el-row>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="字典描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入字典描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >新 增</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent } from 'vue';
-export default defineComponent({
-	name: 'systemAddDic',
-	setup() {
-		const state = reactive({
-			isShowDialog: false,
-			ruleForm: {
-				dicName: '', // 字典名称
-				fieldName: '', // 字段名
-				status: true, // 字典状态
-				list: [
-					// 子集字段 + 属性值
-					{
-						id: Math.random(),
-						label: '',
-						value: '',
-					},
-				],
-				describe: '', // 字典描述
-				fieldNameList: [], // 字段名: [{子集字段 + 属性值}]
-			},
-		});
-		// 打开弹窗
-		const openDialog = () => {
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 新增行
-		const onAddRow = () => {
-			state.ruleForm.list.push({
-				id: Math.random(),
-				label: '',
-				value: '',
-			});
-		};
-		// 删除行
-		const onDelRow = (k: number) => {
-			state.ruleForm.list.splice(k, 1);
-		};
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			onAddRow,
-			onDelRow,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 162
nextadmin_vue3/src/views/system/dic/component/editDic.vue

@@ -1,162 +0,0 @@
-<template>
-	<div class="system-edit-dic-container">
-		<el-dialog title="修改字典" v-model="isShowDialog" width="769px">
-			<el-alert title="半成品,交互过于复杂,请自行扩展!" type="warning" :closable="false" class="mb20"> </el-alert>
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="字典名称">
-							<el-input v-model="ruleForm.dicName" placeholder="请输入字典名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="字段名">
-							<el-input v-model="ruleForm.fieldName" placeholder="请输入字段名,拼接 ruleForm.list" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="字典状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-row :gutter="35" v-for="(v, k) in ruleForm.list" :key="k">
-							<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-								<el-form-item :prop="`list[${k}].label`">
-									<template #label>
-										<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === 0">
-											<el-icon>
-												<ele-Plus />
-											</el-icon>
-										</el-button>
-										<el-button type="danger" circle size="small" @click="onDelRow(k)" v-else>
-											<el-icon>
-												<ele-Delete />
-											</el-icon>
-										</el-button>
-										<span class="ml10">字段</span>
-									</template>
-									<el-input v-model="v.label" style="width: 100%" placeholder="请输入字段名"> </el-input>
-								</el-form-item>
-							</el-col>
-							<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-								<el-form-item label="属性" :prop="`list[${k}].value`">
-									<el-input v-model="v.value" style="width: 100%" placeholder="请输入属性值"> </el-input>
-								</el-form-item>
-							</el-col>
-						</el-row>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="字典描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入字典描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >修 改</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface RuleFormList {
-	id: number;
-	label: string;
-	value: string;
-}
-interface RuleFormState {
-	dicName: string;
-	fieldName: string;
-	status: boolean;
-	list: RuleFormList[];
-	describe: string;
-	fieldNameList: Array<any>;
-}
-interface DicState {
-	isShowDialog: boolean;
-	ruleForm: RuleFormState;
-}
-
-export default defineComponent({
-	name: 'systemEditDic',
-	setup() {
-		const state = reactive<DicState>({
-			isShowDialog: false,
-			ruleForm: {
-				dicName: '', // 字典名称
-				fieldName: '', // 字段名
-				status: true, // 字典状态
-				list: [
-					// 子集字段 + 属性值
-					{
-						id: Math.random(),
-						label: '',
-						value: '',
-					},
-				],
-				describe: '', // 字典描述
-				fieldNameList: [], // 字段名: [{子集字段 + 属性值}]
-			},
-		});
-		// 打开弹窗
-		const openDialog = (row: RuleFormState) => {
-			if (row.fieldName === 'SYS_UERINFO') {
-				row.list = [
-					{ id: Math.random(), label: 'sex', value: '1' },
-					{ id: Math.random(), label: 'sex', value: '0' },
-				];
-			} else {
-				row.list = [
-					{ id: Math.random(), label: 'role', value: 'admin' },
-					{ id: Math.random(), label: 'role', value: 'common' },
-					{ id: Math.random(), label: 'roleName', value: '超级管理员' },
-					{ id: Math.random(), label: 'roleName', value: '普通用户' },
-				];
-			}
-			state.ruleForm = row;
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 新增行
-		const onAddRow = () => {
-			state.ruleForm.list.push({
-				id: Math.random(),
-				label: '',
-				value: '',
-			});
-		};
-		// 删除行
-		const onDelRow = (k: number) => {
-			state.ruleForm.list.splice(k, 1);
-		};
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			onAddRow,
-			onDelRow,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 159
nextadmin_vue3/src/views/system/dic/index.vue

@@ -1,159 +0,0 @@
-<template>
-	<div class="system-dic-container">
-		<el-card shadow="hover">
-			<div class="system-user-search mb15">
-				<el-input   placeholder="请输入字典名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="onOpenAddDic">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增字典
-				</el-button>
-			</div>
-			<el-table :data="tableData.data" style="width: 100%">
-				<el-table-column type="index" label="序号" width="50" />
-				<el-table-column prop="dicName" label="字典名称" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="fieldName" label="字段名" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="status" label="字典状态" show-overflow-tooltip>
-					<template #default="scope">
-						<el-tag type="success" v-if="scope.row.status">启用</el-tag>
-						<el-tag type="info" v-else>禁用</el-tag>
-					</template>
-				</el-table-column>
-				<el-table-column prop="describe" label="字典描述" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column label="操作" width="100">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="onOpenEditDic(scope.row)">修改</el-button>
-						<el-button size="small" type="text" @click="onRowDel(scope.row)">删除</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="[10, 20, 30]"
-				v-model:current-page="tableData.param.pageNum"
-				background
-				v-model:page-size="tableData.param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="tableData.total"
-			>
-			</el-pagination>
-		</el-card>
-		<AddDic ref="addDicRef" />
-		<EditDic ref="editDicRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import AddDic from '/@/views/system/dic/component/addDic.vue';
-import EditDic from '/@/views/system/dic/component/editDic.vue';
-
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	dicName: string;
-	fieldName: string;
-	describe: string;
-	status: boolean;
-	createTime: string;
-}
-interface TableDataState {
-	tableData: {
-		data: Array<TableDataRow>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-		};
-	};
-}
-
-export default defineComponent({
-	name: 'systemDic',
-	components: { AddDic, EditDic },
-	setup() {
-		const addDicRef = ref();
-		const editDicRef = ref();
-		const state = reactive<TableDataState>({
-			tableData: {
-				data: [],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-				},
-			},
-		});
-		// 初始化表格数据
-		const initTableData = () => {
-			const data: Array<TableDataRow> = [];
-			for (let i = 0; i < 2; i++) {
-				data.push({
-					dicName: i === 0 ? '角色标识' : '用户性别',
-					fieldName: i === 0 ? 'SYS_ROLE' : 'SYS_UERINFO',
-					describe: i === 0 ? '这是角色字典' : '这是用户性别字典',
-					status: true,
-					createTime: new Date().toLocaleString(),
-				});
-			}
-			state.tableData.data = data;
-			state.tableData.total = state.tableData.data.length;
-		};
-		// 打开新增字典弹窗
-		const onOpenAddDic = () => {
-			addDicRef.value.openDialog();
-		};
-		// 打开修改字典弹窗
-		const onOpenEditDic = (row: TableDataRow) => {
-			editDicRef.value.openDialog(row);
-		};
-		// 删除字典
-		const onRowDel = (row: TableDataRow) => {
-			ElMessageBox.confirm(`此操作将永久删除字典名称:“${row.dicName}”,是否继续?`, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.tableData.param.pageSize = val;
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.tableData.param.pageNum = val;
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			addDicRef,
-			editDicRef,
-			onOpenAddDic,
-			onOpenEditDic,
-			onRowDel,
-			onHandleSizeChange,
-			onHandleCurrentChange,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 227
nextadmin_vue3/src/views/system/menu/component/addMenu.vue

@@ -1,227 +0,0 @@
-<template>
-	<div class="system-add-menu-container">
-		<el-dialog title="新增菜单" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="80px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="上级菜单">
-							<el-cascader
-								:options="menuData"
-								:props="{ checkStrictly: true, value: 'path', label: 'title' }"
-								placeholder="请选择上级菜单"
-								clearable
-								class="w100"
-								v-model="ruleForm.menuSuperior"
-							>
-								<template #default="{ node, data }">
-									<span>{{ data.title }}</span>
-									<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
-								</template>
-							</el-cascader>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="菜单类型">
-							<el-radio-group v-model="ruleForm.menuType">
-								<el-radio label="menu">菜单</el-radio>
-								<el-radio label="btn">按钮</el-radio>
-							</el-radio-group>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="菜单名称">
-							<el-input v-model="ruleForm.meta.title" placeholder="格式:message.router.xxx" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<template v-if="ruleForm.menuType === 'menu'">
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="路由名称">
-								<el-input v-model="ruleForm.name" placeholder="路由中的 name 值" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="路由路径">
-								<el-input v-model="ruleForm.path" placeholder="路由中的 path 值" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="重定向">
-								<el-input v-model="ruleForm.redirect" placeholder="请输入路由重定向" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="菜单图标">
-								<IconSelector placeholder="请输入菜单图标" v-model="ruleForm.meta.icon" type="all" />
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="组件路径">
-								<el-input v-model="ruleForm.component" placeholder="组件路径" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="链接地址">
-								<el-input v-model="ruleForm.meta.isLink" placeholder="外链/内嵌时链接地址(http:xxx.com)" clearable :disabled="!ruleForm.isLink">
-								</el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="权限标识">
-								<el-select v-model="ruleForm.meta.roles" multiple placeholder="取角色管理" clearable class="w100">
-									<el-option label="admin" value="admin"></el-option>
-									<el-option label="common" value="common"></el-option>
-								</el-select>
-							</el-form-item>
-						</el-col>
-					</template>
-					<template v-if="ruleForm.menuType === 'btn'">
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="权限标识">
-								<el-input v-model="ruleForm.btnPower" placeholder="请输入权限标识" clearable></el-input>
-							</el-form-item>
-						</el-col>
-					</template>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="菜单排序">
-							<el-input-number v-model="ruleForm.menuSort" controls-position="right" placeholder="请输入排序" class="w100" />
-						</el-form-item>
-					</el-col>
-					<template v-if="ruleForm.menuType === 'menu'">
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否隐藏">
-								<el-radio-group v-model="ruleForm.meta.isHide">
-									<el-radio :label="true">隐藏</el-radio>
-									<el-radio :label="false">不隐藏</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="页面缓存">
-								<el-radio-group v-model="ruleForm.meta.isKeepAlive">
-									<el-radio :label="true">缓存</el-radio>
-									<el-radio :label="false">不缓存</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否固定">
-								<el-radio-group v-model="ruleForm.meta.isAffix">
-									<el-radio :label="true">固定</el-radio>
-									<el-radio :label="false">不固定</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否外链">
-								<el-radio-group v-model="ruleForm.isLink" :disabled="ruleForm.meta.isIframe">
-									<el-radio :label="true">是</el-radio>
-									<el-radio :label="false">否</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否内嵌">
-								<el-radio-group v-model="ruleForm.meta.isIframe" @change="onSelectIframeChange">
-									<el-radio :label="true">是</el-radio>
-									<el-radio :label="false">否</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-					</template>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >新 增</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import { i18n } from '/@/i18n/index';
-import IconSelector from '/@/components/iconSelector/index.vue';
-// import { setBackEndControlRefreshRoutes } from "/@/router/backEnd";
-export default defineComponent({
-	name: 'systemAddMenu',
-	components: { IconSelector },
-	setup() {
-		const store = useStore();
-		const state = reactive({
-			isShowDialog: false,
-			// 参数请参考 `/src/router/route.ts` 中的 `dynamicRoutes` 路由菜单格式
-			ruleForm: {
-				menuSuperior: [], // 上级菜单
-				menuType: 'menu', // 菜单类型
-				name: '', // 路由名称
-				component: '', // 组件路径
-				isLink: false, // 是否外链
-				menuSort: 0, // 菜单排序
-				path: '', // 路由路径
-				redirect: '', // 路由重定向,有子集 children 时
-				meta: {
-					title: '', // 菜单名称
-					icon: '', // 菜单图标
-					isHide: false, // 是否隐藏
-					isKeepAlive: true, // 是否缓存
-					isAffix: false, // 是否固定
-					isLink: '', // 外链/内嵌时链接地址(http:xxx.com),开启外链条件,`1、isLink:true 2、链接地址不为空`
-					isIframe: false, // 是否内嵌,开启条件,`1、isIframe:true 2、链接地址不为空`
-					roles: '', // 权限标识,取角色管理
-				},
-				btnPower: '', // 菜单类型为按钮时,权限标识
-			},
-			menuData: [], // 上级菜单数据
-		});
-		// 获取 vuex 中的路由
-		const getMenuData = (routes: any) => {
-			const arr: any = [];
-			routes.map((val: any) => {
-				val['title'] = i18n.global.t(val.meta.title);
-				val['id'] = Math.random();
-				arr.push({ ...val });
-				if (val.children) getMenuData(val.children);
-			});
-			return arr;
-		};
-		// 打开弹窗
-		const openDialog = () => {
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 是否内嵌下拉改变
-		const onSelectIframeChange = () => {
-			if (state.ruleForm.meta.isIframe) state.ruleForm.isLink = true;
-			else state.ruleForm.isLink = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog(); // 关闭弹窗
-			// setBackEndControlRefreshRoutes() // 刷新菜单,未进行后端接口测试
-		};
-		// 页面加载时
-		onMounted(() => {
-			state.menuData = getMenuData(store.state.routesList.routesList);
-		});
-		return {
-			openDialog,
-			closeDialog,
-			onSelectIframeChange,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 230
nextadmin_vue3/src/views/system/menu/component/editMenu.vue

@@ -1,230 +0,0 @@
-<template>
-	<div class="system-edit-menu-container">
-		<el-dialog title="修改菜单" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="80px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="上级菜单">
-							<el-cascader
-								:options="menuData"
-								:props="{ checkStrictly: true, value: 'path', label: 'title' }"
-								placeholder="请选择上级菜单"
-								clearable
-								class="w100"
-								v-model="ruleForm.menuSuperior"
-							>
-								<template #default="{ node, data }">
-									<span>{{ data.title }}</span>
-									<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
-								</template>
-							</el-cascader>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="菜单类型">
-							<el-radio-group v-model="ruleForm.menuType">
-								<el-radio label="menu">菜单</el-radio>
-								<el-radio label="btn">按钮</el-radio>
-							</el-radio-group>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="菜单名称">
-							<el-input v-model="ruleForm.meta.title" placeholder="格式:message.router.xxx" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<template v-if="ruleForm.menuType === 'menu'">
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="路由名称">
-								<el-input v-model="ruleForm.name" placeholder="路由中的 name 值" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="路由路径">
-								<el-input v-model="ruleForm.path" placeholder="路由中的 path 值" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="重定向">
-								<el-input v-model="ruleForm.redirect" placeholder="请输入路由重定向" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="菜单图标">
-								<IconSelector placeholder="请输入菜单图标" v-model="ruleForm.meta.icon" type="all" />
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="组件路径">
-								<el-input v-model="ruleForm.component" placeholder="组件路径" clearable></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="链接地址">
-								<el-input v-model="ruleForm.meta.isLink" placeholder="外链/内嵌时链接地址(http:xxx.com)" clearable :disabled="!ruleForm.isLink">
-								</el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="权限标识">
-								<el-select v-model="ruleForm.meta.roles" multiple placeholder="取角色管理" clearable class="w100">
-									<el-option label="admin" value="admin"></el-option>
-									<el-option label="common" value="common"></el-option>
-								</el-select>
-							</el-form-item>
-						</el-col>
-					</template>
-					<template v-if="ruleForm.menuType === 'btn'">
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="权限标识">
-								<el-input v-model="ruleForm.btnPower" placeholder="请输入权限标识" clearable></el-input>
-							</el-form-item>
-						</el-col>
-					</template>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="菜单排序">
-							<el-input-number v-model="ruleForm.menuSort" controls-position="right" placeholder="请输入排序" class="w100" />
-						</el-form-item>
-					</el-col>
-					<template v-if="ruleForm.menuType === 'menu'">
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否隐藏">
-								<el-radio-group v-model="ruleForm.meta.isHide">
-									<el-radio :label="true">隐藏</el-radio>
-									<el-radio :label="false">不隐藏</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="页面缓存">
-								<el-radio-group v-model="ruleForm.meta.isKeepAlive">
-									<el-radio :label="true">缓存</el-radio>
-									<el-radio :label="false">不缓存</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否固定">
-								<el-radio-group v-model="ruleForm.meta.isAffix">
-									<el-radio :label="true">固定</el-radio>
-									<el-radio :label="false">不固定</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否外链">
-								<el-radio-group v-model="ruleForm.isLink" :disabled="ruleForm.meta.isIframe">
-									<el-radio :label="true">是</el-radio>
-									<el-radio :label="false">否</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-						<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-							<el-form-item label="是否内嵌">
-								<el-radio-group v-model="ruleForm.meta.isIframe" @change="onSelectIframeChange">
-									<el-radio :label="true">是</el-radio>
-									<el-radio :label="false">否</el-radio>
-								</el-radio-group>
-							</el-form-item>
-						</el-col>
-					</template>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >修 改</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent } from 'vue';
-import { useStore } from '/@/store/index';
-import { i18n } from '/@/i18n/index';
-import IconSelector from '/@/components/iconSelector/index.vue';
-// import { setBackEndControlRefreshRoutes } from "/@/router/backEnd";
-export default defineComponent({
-	name: 'systemEditMenu',
-	components: { IconSelector },
-	setup() {
-		const store = useStore();
-		const state = reactive({
-			isShowDialog: false,
-			// 参数请参考 `/src/router/route.ts` 中的 `dynamicRoutes` 路由菜单格式
-			ruleForm: {
-				menuSuperior: [], // 上级菜单
-				menuType: 'menu', // 菜单类型
-				name: '', // 路由名称
-				component: '', // 组件路径
-				isLink: false, // 是否外链
-				menuSort: 0, // 菜单排序
-				path: '', // 路由路径
-				redirect: '', // 路由重定向,有子集 children 时
-				meta: {
-					title: '', // 菜单名称
-					icon: '', // 菜单图标
-					isHide: false, // 是否隐藏
-					isKeepAlive: true, // 是否缓存
-					isAffix: false, // 是否固定
-					isLink: '', // 外链/内嵌时链接地址(http:xxx.com),开启外链条件,`1、isLink:true 2、链接地址不为空`
-					isIframe: false, // 是否内嵌,开启条件,`1、isIframe:true 2、链接地址不为空`
-					roles: '', // 权限标识,取角色管理
-				},
-				btnPower: '', // 菜单类型为按钮时,权限标识
-			},
-			menuData: [], // 上级菜单数据
-		});
-		// 获取 vuex 中的路由
-		const getMenuData = (routes: any) => {
-			const arr: any = [];
-			routes.map((val: any) => {
-				val['title'] = i18n.global.t(val.meta.title);
-				val['id'] = Math.random();
-				arr.push({ ...val });
-				if (val.children) getMenuData(val.children);
-			});
-			return arr;
-		};
-		// 打开弹窗
-		const openDialog = (row: any) => {
-			row.menuType = 'menu';
-			row.menuSort = Math.random();
-			state.ruleForm = row;
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 是否内嵌下拉改变
-		const onSelectIframeChange = () => {
-			if (state.ruleForm.meta.isIframe) state.ruleForm.isLink = true;
-			else state.ruleForm.isLink = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog(); // 关闭弹窗
-			// setBackEndControlRefreshRoutes() // 刷新菜单,未进行后端接口测试
-		};
-		// 页面加载时
-		onMounted(() => {
-			state.menuData = getMenuData(store.state.routesList.routesList);
-		});
-		return {
-			openDialog,
-			closeDialog,
-			onSelectIframeChange,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 111
nextadmin_vue3/src/views/system/menu/index.vue

@@ -1,111 +0,0 @@
-<template>
-	<div class="system-menu-container">
-		<el-card shadow="hover">
-			<div class="system-menu-search mb15">
-				<el-input   placeholder="请输入菜单名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="onOpenAddMenu">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增菜单
-				</el-button>
-			</div>
-			<el-table :data="menuTableData" style="width: 100%" row-key="path" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
-				<el-table-column label="菜单名称" show-overflow-tooltip>
-					<template #default="scope">
-						<SvgIcon :name="scope.row.meta.icon" />
-						<span class="ml10">{{ $t(scope.row.meta.title) }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column prop="path" label="路由路径" show-overflow-tooltip></el-table-column>
-				<el-table-column label="组件路径" show-overflow-tooltip>
-					<template #default="scope">
-						<span>{{ scope.row.component }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column label="权限标识" show-overflow-tooltip>
-					<template #default="scope">
-						<span>{{ scope.row.meta.roles }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column label="排序" show-overflow-tooltip width="80">
-					<template #default="scope">
-						{{ scope.$index }}
-					</template>
-				</el-table-column>
-				<el-table-column label="类型" show-overflow-tooltip width="80">
-					<template #default="scope">
-						<el-tag type="success" size="small">{{ scope.row.xx }}菜单</el-tag>
-					</template>
-				</el-table-column>
-				<el-table-column label="操作" show-overflow-tooltip width="140">
-					<template #default="scope">
-						<el-button size="small" type="text" @click="onOpenAddMenu">新增</el-button>
-						<el-button size="small" type="text" @click="onOpenEditMenu(scope.row)">修改</el-button>
-						<el-button size="small" type="text" @click="onTabelRowDel(scope.row)">删除</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-		</el-card>
-		<AddMenu ref="addMenuRef" />
-		<EditMenu ref="editMenuRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { ref, toRefs, reactive, computed, defineComponent } from 'vue';
-import { RouteRecordRaw } from 'vue-router';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import { useStore } from '/@/store/index';
-import AddMenu from '/@/views/system/menu/component/addMenu.vue';
-import EditMenu from '/@/views/system/menu/component/editMenu.vue';
-export default defineComponent({
-	name: 'systemMenu',
-	components: { AddMenu, EditMenu },
-	setup() {
-		const store = useStore();
-		const addMenuRef = ref();
-		const editMenuRef = ref();
-		const state = reactive({});
-		// 获取 vuex 中的路由
-		const menuTableData = computed(() => {
-			return store.state.routesList.routesList;
-		});
-		// 打开新增菜单弹窗
-		const onOpenAddMenu = () => {
-			addMenuRef.value.openDialog();
-		};
-		// 打开编辑菜单弹窗
-		const onOpenEditMenu = (row: RouteRecordRaw) => {
-			editMenuRef.value.openDialog(row);
-		};
-		// 删除当前行
-		const onTabelRowDel = (row: RouteRecordRaw) => {
-			ElMessageBox.confirm(`此操作将永久删除路由:${row.path}, 是否继续?`, '提示', {
-				confirmButtonText: '删除',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		return {
-			addMenuRef,
-			editMenuRef,
-			onOpenAddMenu,
-			onOpenEditMenu,
-			menuTableData,
-			onTabelRowDel,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 239
nextadmin_vue3/src/views/system/role/component/addRole.vue

@@ -1,239 +0,0 @@
-<template>
-	<div class="system-add-role-container">
-		<el-dialog title="新增角色" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="角色名称">
-							<el-input v-model="ruleForm.roleName" placeholder="请输入角色名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="角色标识">
-							<template #label>
-								<el-tooltip effect="dark" content="用于 `router/route.ts` meta.roles" placement="top-start">
-									<span>角色标识</span>
-								</el-tooltip>
-							</template>
-							<el-input v-model="ruleForm.roleSign" placeholder="请输入角色标识" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="排序">
-							<el-input-number v-model="ruleForm.sort" :min="0" :max="999" controls-position="right" placeholder="请输入排序" class="w100" />
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="角色状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="角色描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入角色描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="菜单权限">
-							<el-tree :data="menuData" :props="menuProps" show-checkbox class="menu-data-tree" />
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >新 增</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface MenuDataTree {
-	id: number;
-	label: string;
-	children?: MenuDataTree[];
-}
-interface RoleState {
-	isShowDialog: boolean;
-	ruleForm: {
-		roleName: string;
-		roleSign: string;
-		sort: number;
-		status: boolean;
-		describe: string;
-	};
-	menuData: Array<MenuDataTree>;
-	menuProps: {
-		children: string;
-		label: string;
-	};
-}
-
-export default defineComponent({
-	name: 'systemAddRole',
-	setup() {
-		const state = reactive<RoleState>({
-			isShowDialog: false,
-			ruleForm: {
-				roleName: '', // 角色名称
-				roleSign: '', // 角色标识
-				sort: 0, // 排序
-				status: true, // 角色状态
-				describe: '', // 角色描述
-			},
-			menuData: [],
-			menuProps: {
-				children: 'children',
-				label: 'label',
-			},
-		});
-		// 打开弹窗
-		const openDialog = () => {
-			state.isShowDialog = true;
-			getMenuData();
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 获取菜单结构数据
-		const getMenuData = () => {
-			state.menuData = [
-				{
-					id: 1,
-					label: '系统管理',
-					children: [
-						{
-							id: 11,
-							label: '菜单管理',
-							children: [
-								{
-									id: 111,
-									label: '菜单新增',
-								},
-								{
-									id: 112,
-									label: '菜单修改',
-								},
-								{
-									id: 113,
-									label: '菜单删除',
-								},
-								{
-									id: 114,
-									label: '菜单查询',
-								},
-							],
-						},
-						{
-							id: 12,
-							label: '角色管理',
-							children: [
-								{
-									id: 121,
-									label: '角色新增',
-								},
-								{
-									id: 122,
-									label: '角色修改',
-								},
-								{
-									id: 123,
-									label: '角色删除',
-								},
-								{
-									id: 124,
-									label: '角色查询',
-								},
-							],
-						},
-						{
-							id: 13,
-							label: '用户管理',
-							children: [
-								{
-									id: 131,
-									label: '用户新增',
-								},
-								{
-									id: 132,
-									label: '用户修改',
-								},
-								{
-									id: 133,
-									label: '用户删除',
-								},
-								{
-									id: 134,
-									label: '用户查询',
-								},
-							],
-						},
-					],
-				},
-				{
-					id: 2,
-					label: '权限管理',
-					children: [
-						{
-							id: 21,
-							label: '前端控制',
-							children: [
-								{
-									id: 211,
-									label: '页面权限',
-								},
-								{
-									id: 212,
-									label: '页面权限',
-								},
-							],
-						},
-						{
-							id: 22,
-							label: '后端控制',
-							children: [
-								{
-									id: 221,
-									label: '页面权限',
-								},
-							],
-						},
-					],
-				},
-			];
-		};
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.system-add-role-container {
-	.menu-data-tree {
-		border: var(--el-input-border, var(--el-border-base));
-		border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
-		padding: 5px;
-	}
-}
-</style>

+ 0 - 241
nextadmin_vue3/src/views/system/role/component/editRole.vue

@@ -1,241 +0,0 @@
-<template>
-	<div class="system-edit-role-container">
-		<el-dialog title="修改角色" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="角色名称">
-							<el-input v-model="ruleForm.roleName" placeholder="请输入角色名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="角色标识">
-							<template #label>
-								<el-tooltip effect="dark" content="用于 `router/route.ts` meta.roles" placement="top-start">
-									<span>角色标识</span>
-								</el-tooltip>
-							</template>
-							<el-input v-model="ruleForm.roleSign" placeholder="请输入角色标识" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="排序">
-							<el-input-number v-model="ruleForm.sort" :min="0" :max="999" controls-position="right" placeholder="请输入排序" class="w100" />
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="角色状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="角色描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入角色描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="菜单权限">
-							<el-tree :data="menuData" :props="menuProps" :default-checked-keys="[112, 113]" node-key="id" show-checkbox class="menu-data-tree" />
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >修 改</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface MenuDataTree {
-	id: number;
-	label: string;
-	children?: MenuDataTree[];
-}
-interface DialogRow {
-	roleName: string;
-	roleSign: string;
-	sort: number;
-	status: boolean;
-	describe: string;
-}
-interface RoleState {
-	isShowDialog: boolean;
-	ruleForm: DialogRow;
-	menuData: Array<MenuDataTree>;
-	menuProps: {
-		children: string;
-		label: string;
-	};
-}
-
-export default defineComponent({
-	name: 'systemEditRole',
-	setup() {
-		const state = reactive<RoleState>({
-			isShowDialog: false,
-			ruleForm: {
-				roleName: '', // 角色名称
-				roleSign: '', // 角色标识
-				sort: 0, // 排序
-				status: true, // 角色状态
-				describe: '', // 角色描述
-			},
-			menuData: [],
-			menuProps: {
-				children: 'children',
-				label: 'label',
-			},
-		});
-		// 打开弹窗
-		const openDialog = (row: DialogRow) => {
-			state.ruleForm = row;
-			state.isShowDialog = true;
-			getMenuData();
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 获取菜单结构数据
-		const getMenuData = () => {
-			state.menuData = [
-				{
-					id: 1,
-					label: '系统管理',
-					children: [
-						{
-							id: 11,
-							label: '菜单管理',
-							children: [
-								{
-									id: 111,
-									label: '菜单新增',
-								},
-								{
-									id: 112,
-									label: '菜单修改',
-								},
-								{
-									id: 113,
-									label: '菜单删除',
-								},
-								{
-									id: 114,
-									label: '菜单查询',
-								},
-							],
-						},
-						{
-							id: 12,
-							label: '角色管理',
-							children: [
-								{
-									id: 121,
-									label: '角色新增',
-								},
-								{
-									id: 122,
-									label: '角色修改',
-								},
-								{
-									id: 123,
-									label: '角色删除',
-								},
-								{
-									id: 124,
-									label: '角色查询',
-								},
-							],
-						},
-						{
-							id: 13,
-							label: '用户管理',
-							children: [
-								{
-									id: 131,
-									label: '用户新增',
-								},
-								{
-									id: 132,
-									label: '用户修改',
-								},
-								{
-									id: 133,
-									label: '用户删除',
-								},
-								{
-									id: 134,
-									label: '用户查询',
-								},
-							],
-						},
-					],
-				},
-				{
-					id: 2,
-					label: '权限管理',
-					children: [
-						{
-							id: 21,
-							label: '前端控制',
-							children: [
-								{
-									id: 211,
-									label: '页面权限',
-								},
-								{
-									id: 212,
-									label: '页面权限',
-								},
-							],
-						},
-						{
-							id: 22,
-							label: '后端控制',
-							children: [
-								{
-									id: 221,
-									label: '页面权限',
-								},
-							],
-						},
-					],
-				},
-			];
-		};
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.system-edit-role-container {
-	.menu-data-tree {
-		border: var(--el-input-border, var(--el-border-base));
-		border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
-		padding: 5px;
-	}
-}
-</style>

+ 0 - 162
nextadmin_vue3/src/views/system/role/index.vue

@@ -1,162 +0,0 @@
-<template>
-	<div class="system-role-container">
-		<el-card shadow="hover">
-			<div class="system-user-search mb15">
-				<el-input   placeholder="请输入角色名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="onOpenAddRole">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增角色
-				</el-button>
-			</div>
-			<el-table :data="tableData.data" style="width: 100%">
-				<el-table-column type="index" label="序号" width="60" />
-				<el-table-column prop="roleName" label="角色名称" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="roleSign" label="角色标识" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="sort" label="排序" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="status" label="角色状态" show-overflow-tooltip>
-					<template #default="scope">
-						<el-tag type="success" v-if="scope.row.status">启用</el-tag>
-						<el-tag type="info" v-else>禁用</el-tag>
-					</template>
-				</el-table-column>
-				<el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column label="操作" width="100">
-					<template #default="scope">
-						<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" type="text" @click="onOpenEditRole(scope.row)">修改</el-button>
-						<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" type="text" @click="onRowDel(scope.row)">删除</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="[10, 20, 30]"
-				v-model:current-page="tableData.param.pageNum"
-				background
-				v-model:page-size="tableData.param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="tableData.total"
-			>
-			</el-pagination>
-		</el-card>
-		<AddRole ref="addRoleRef" />
-		<EditRole ref="editRoleRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import AddRole from '/@/views/system/role/component/addRole.vue';
-import EditRole from '/@/views/system/role/component/editRole.vue';
-
-// 定义接口来定义对象的类型
-interface TableData {
-	roleName: string;
-	roleSign: string;
-	describe: string;
-	sort: number;
-	status: boolean;
-	createTime: string;
-}
-interface TableDataState {
-	tableData: {
-		data: Array<TableData>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-		};
-	};
-}
-
-export default defineComponent({
-	name: 'systemRole',
-	components: { AddRole, EditRole },
-	setup() {
-		const addRoleRef = ref();
-		const editRoleRef = ref();
-		const state = reactive<TableDataState>({
-			tableData: {
-				data: [],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-				},
-			},
-		});
-		// 初始化表格数据
-		const initTableData = () => {
-			const data: Array<TableData> = [];
-			for (let i = 0; i < 2; i++) {
-				data.push({
-					roleName: i === 0 ? '超级管理员' : '普通用户',
-					roleSign: i === 0 ? 'admin' : 'common',
-					describe: `测试角色${i + 1}`,
-					sort: i,
-					status: true,
-					createTime: new Date().toLocaleString(),
-				});
-			}
-			state.tableData.data = data;
-			state.tableData.total = state.tableData.data.length;
-		};
-		// 打开新增角色弹窗
-		const onOpenAddRole = () => {
-			addRoleRef.value.openDialog();
-		};
-		// 打开修改角色弹窗
-		const onOpenEditRole = (row: Object) => {
-			editRoleRef.value.openDialog(row);
-		};
-		// 删除角色
-		const onRowDel = (row: any) => {
-			ElMessageBox.confirm(`此操作将永久删除角色名称:“${row.roleName}”,是否继续?`, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.tableData.param.pageSize = val;
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.tableData.param.pageNum = val;
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			addRoleRef,
-			editRoleRef,
-			onOpenAddRole,
-			onOpenEditRole,
-			onRowDel,
-			onHandleSizeChange,
-			onHandleCurrentChange,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 200
nextadmin_vue3/src/views/system/user/component/addUser.vue

@@ -1,200 +0,0 @@
-<template>
-	<div class="system-add-user-container">
-		<el-dialog title="新增用户" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="账户名称">
-							<el-input v-model="ruleForm.userName" placeholder="请输入账户名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="用户昵称">
-							<el-input v-model="ruleForm.userNickname" placeholder="请输入用户昵称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="关联角色">
-							<el-select v-model="ruleForm.roleSign" placeholder="请选择" clearable class="w100">
-								<el-option label="超级管理员" value="admin"></el-option>
-								<el-option label="普通用户" value="common"></el-option>
-							</el-select>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="部门">
-							<el-cascader
-								:options="deptData"
-								:props="{ checkStrictly: true, value: 'deptName', label: 'deptName' }"
-								placeholder="请选择部门"
-								clearable
-								class="w100"
-								v-model="ruleForm.department"
-							>
-								<template #default="{ node, data }">
-									<span>{{ data.deptName }}</span>
-									<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
-								</template>
-							</el-cascader>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="手机号">
-							<el-input v-model="ruleForm.phone" placeholder="请输入手机号" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="邮箱">
-							<el-input v-model="ruleForm.email" placeholder="请输入" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="性别">
-							<el-select v-model="ruleForm.sex" placeholder="请选择" clearable class="w100">
-								<el-option label="男" value="男"></el-option>
-								<el-option label="女" value="女"></el-option>
-							</el-select>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="账户密码">
-							<el-input v-model="ruleForm.password" placeholder="请输入" type="password" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="账户过期">
-							<el-date-picker v-model="ruleForm.overdueTime" type="date" placeholder="请选择" class="w100"> </el-date-picker>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="用户状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="用户描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入用户描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >新 增</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface DeptData {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number | string;
-	describe: string;
-	id: number;
-	children?: DeptData[];
-}
-interface UserState {
-	isShowDialog: boolean;
-	ruleForm: {
-		userName: string;
-		userNickname: string;
-		roleSign: string;
-		department: any;
-		phone: string;
-		email: string;
-		sex: string;
-		password: string;
-		overdueTime: string;
-		status: boolean;
-		describe: string;
-	};
-	deptData: Array<DeptData>;
-}
-
-export default defineComponent({
-	name: 'systemAddUser',
-	setup() {
-		const state = reactive<UserState>({
-			isShowDialog: false,
-			ruleForm: {
-				userName: '', // 账户名称
-				userNickname: '', // 用户昵称
-				roleSign: '', // 关联角色
-				department: [], // 部门
-				phone: '', // 手机号
-				email: '', // 邮箱
-				sex: '', // 性别
-				password: '', // 账户密码
-				overdueTime: '', // 账户过期
-				status: true, // 用户状态
-				describe: '', // 用户描述
-			},
-			deptData: [], // 部门数据
-		});
-		// 打开弹窗
-		const openDialog = () => {
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 初始化部门数据
-		const initTableData = () => {
-			state.deptData.push({
-				deptName: 'vueNextAdmin',
-				createTime: new Date().toLocaleString(),
-				status: true,
-				sort: Math.random(),
-				describe: '顶级部门',
-				id: Math.random(),
-				children: [
-					{
-						deptName: 'IT外包服务',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '总部',
-						id: Math.random(),
-					},
-					{
-						deptName: '资本控股',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '分部',
-						id: Math.random(),
-					},
-				],
-			});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 202
nextadmin_vue3/src/views/system/user/component/editUser.vue

@@ -1,202 +0,0 @@
-<template>
-	<div class="system-edit-user-container">
-		<el-dialog title="修改用户" v-model="isShowDialog" width="769px">
-			<el-form :model="ruleForm"   label-width="90px">
-				<el-row :gutter="35">
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="账户名称">
-							<el-input v-model="ruleForm.userName" placeholder="请输入账户名称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="用户昵称">
-							<el-input v-model="ruleForm.userNickname" placeholder="请输入用户昵称" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="关联角色">
-							<el-select v-model="ruleForm.roleSign" placeholder="请选择" clearable class="w100">
-								<el-option label="超级管理员" value="admin"></el-option>
-								<el-option label="普通用户" value="common"></el-option>
-							</el-select>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="部门">
-							<el-cascader
-								:options="deptData"
-								:props="{ checkStrictly: true, value: 'deptName', label: 'deptName' }"
-								placeholder="请选择部门"
-								clearable
-								class="w100"
-								v-model="ruleForm.department"
-							>
-								<template #default="{ node, data }">
-									<span>{{ data.deptName }}</span>
-									<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
-								</template>
-							</el-cascader>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="手机号">
-							<el-input v-model="ruleForm.phone" placeholder="请输入手机号" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="邮箱">
-							<el-input v-model="ruleForm.email" placeholder="请输入" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="性别">
-							<el-select v-model="ruleForm.sex" placeholder="请选择" clearable class="w100">
-								<el-option label="男" value="男"></el-option>
-								<el-option label="女" value="女"></el-option>
-							</el-select>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="账户密码">
-							<el-input v-model="ruleForm.password" placeholder="请输入" type="password" clearable></el-input>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="账户过期">
-							<el-date-picker v-model="ruleForm.overdueTime" type="date" placeholder="请选择" class="w100"> </el-date-picker>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-						<el-form-item label="用户状态">
-							<el-switch v-model="ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-						</el-form-item>
-					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-						<el-form-item label="用户描述">
-							<el-input v-model="ruleForm.describe" type="textarea" placeholder="请输入用户描述" maxlength="150"></el-input>
-						</el-form-item>
-					</el-col>
-				</el-row>
-			</el-form>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel"  >取 消</el-button>
-					<el-button type="primary" @click="onSubmit"  >修 改</el-button>
-				</span>
-			</template>
-		</el-dialog>
-	</div>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, onMounted, defineComponent } from 'vue';
-
-// 定义接口来定义对象的类型
-interface DeptData {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number | string;
-	describe: string;
-	id: number;
-	children?: DeptData[];
-}
-interface RuleFormRow {
-	userName: string;
-	userNickname: string;
-	roleSign: string;
-	department: any;
-	phone: string;
-	email: string;
-	sex: string;
-	password: string;
-	overdueTime: string;
-	status: boolean;
-	describe: string;
-}
-interface UserState {
-	isShowDialog: boolean;
-	ruleForm: RuleFormRow;
-	deptData: Array<DeptData>;
-}
-
-export default defineComponent({
-	// name: 'systemEditUser',
-	setup() {
-		const state = reactive<UserState>({
-			isShowDialog: false,
-			ruleForm: {
-				userName: '', // 账户名称
-				userNickname: '', // 用户昵称
-				roleSign: '', // 关联角色
-				department: [], // 部门
-				phone: '', // 手机号
-				email: '', // 邮箱
-				sex: '', // 性别
-				password: '', // 账户密码
-				overdueTime: '', // 账户过期
-				status: true, // 用户状态
-				describe: '', // 用户描述
-			},
-			deptData: [], // 部门数据
-		});
-		// 打开弹窗
-		const openDialog = (row: RuleFormRow) => {
-			state.ruleForm = row;
-			state.isShowDialog = true;
-		};
-		// 关闭弹窗
-		const closeDialog = () => {
-			state.isShowDialog = false;
-		};
-		// 取消
-		const onCancel = () => {
-			closeDialog();
-		};
-		// 新增
-		const onSubmit = () => {
-			closeDialog();
-		};
-		// 初始化部门数据
-		const initTableData = () => {
-			state.deptData.push({
-				deptName: 'vueNextAdmin',
-				createTime: new Date().toLocaleString(),
-				status: true,
-				sort: Math.random(),
-				describe: '顶级部门',
-				id: Math.random(),
-				children: [
-					{
-						deptName: 'IT外包服务',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '总部',
-						id: Math.random(),
-					},
-					{
-						deptName: '资本控股',
-						createTime: new Date().toLocaleString(),
-						status: true,
-						sort: Math.random(),
-						describe: '分部',
-						id: Math.random(),
-					},
-				],
-			});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			openDialog,
-			closeDialog,
-			onCancel,
-			onSubmit,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 177
nextadmin_vue3/src/views/system/user/index.vue

@@ -1,177 +0,0 @@
-<template>
-	<div class="system-user-container">
-		<el-card shadow="hover">
-			<div class="system-user-search mb15">
-				<el-input   placeholder="请输入用户名称" style="max-width: 180px"> </el-input>
-				<el-button   type="primary" class="ml10">
-					<el-icon>
-						<ele-Search />
-					</el-icon>
-					查询
-				</el-button>
-				<el-button   type="success" class="ml10" @click="onOpenAddUser">
-					<el-icon>
-						<ele-FolderAdd />
-					</el-icon>
-					新增用户
-				</el-button>
-			</div>
-			<el-table :data="tableData.data" style="width: 100%">
-				<el-table-column type="index" label="序号" width="60" />
-				<el-table-column prop="userName" label="账户名称" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="userNickname" label="用户昵称" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="roleSign" label="关联角色" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="department" label="部门" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="phone" label="手机号" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="email" label="邮箱" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="status" label="用户状态" show-overflow-tooltip>
-					<template #default="scope">
-						<el-tag type="success" v-if="scope.row.status">启用</el-tag>
-						<el-tag type="info" v-else>禁用</el-tag>
-					</template>
-				</el-table-column>
-				<el-table-column prop="describe" label="用户描述" show-overflow-tooltip></el-table-column>
-				<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
-				<el-table-column label="操作" width="100">
-					<template #default="scope">
-						<el-button :disabled="scope.row.userName === 'admin'" size="small" type="text" @click="onOpenEditUser(scope.row)">修改</el-button>
-						<el-button :disabled="scope.row.userName === 'admin'" size="small" type="text" @click="onRowDel(scope.row)">删除</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-			<el-pagination
-				@size-change="onHandleSizeChange"
-				@current-change="onHandleCurrentChange"
-				class="mt15"
-				:pager-count="5"
-				:page-sizes="[10, 20, 30]"
-				v-model:current-page="tableData.param.pageNum"
-				background
-				v-model:page-size="tableData.param.pageSize"
-				layout="total, sizes, prev, pager, next, jumper"
-				:total="tableData.total"
-			>
-			</el-pagination>
-		</el-card>
-		<AddUer ref="addUserRef" />
-		<EditUser ref="editUserRef" />
-	</div>
-</template>
-
-<script lang="ts">
-import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
-import { ElMessageBox, ElMessage } from 'element-plus';
-import AddUer from '/@/views/system/user/component/addUser.vue';
-import EditUser from '/@/views/system/user/component/editUser.vue';
-
-// 定义接口来定义对象的类型
-interface TableDataRow {
-	userName: string;
-	userNickname: string;
-	roleSign: string;
-	department: string[];
-	phone: string;
-	email: string;
-	sex: string;
-	password: string;
-	overdueTime: Date;
-	status: boolean;
-	describe: string;
-	createTime: string;
-}
-interface TableDataState {
-	tableData: {
-		data: Array<TableDataRow>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-		};
-	};
-}
-
-export default defineComponent({
-	name: 'systemUser',
-	components: { AddUer, EditUser },
-	setup() {
-		const addUserRef = ref();
-		const editUserRef = ref();
-		const state = reactive<TableDataState>({
-			tableData: {
-				data: [],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-				},
-			},
-		});
-		// 初始化表格数据
-		const initTableData = () => {
-			const data: Array<TableDataRow> = [];
-			for (let i = 0; i < 2; i++) {
-				data.push({
-					userName: i === 0 ? 'admin' : 'test',
-					userNickname: i === 0 ? '我是管理员' : '我是普通用户',
-					roleSign: i === 0 ? 'admin' : 'common',
-					department: i === 0 ? ['vueNextAdmin', 'IT外包服务'] : ['vueNextAdmin', '资本控股'],
-					phone: '12345678910',
-					email: 'vueNextAdmin@123.com',
-					sex: '女',
-					password: '123456',
-					overdueTime: new Date(),
-					status: true,
-					describe: i === 0 ? '不可删除' : '测试用户',
-					createTime: new Date().toLocaleString(),
-				});
-			}
-			state.tableData.data = data;
-			state.tableData.total = state.tableData.data.length;
-		};
-		// 打开新增用户弹窗
-		const onOpenAddUser = () => {
-			addUserRef.value.openDialog();
-		};
-		// 打开修改用户弹窗
-		const onOpenEditUser = (row: TableDataRow) => {
-			editUserRef.value.openDialog(row);
-		};
-		// 删除用户
-		const onRowDel = (row: TableDataRow) => {
-			ElMessageBox.confirm(`此操作将永久删除账户名称:“${row.userName}”,是否继续?`, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					ElMessage.success('删除成功');
-				})
-				.catch(() => {});
-		};
-		// 分页改变
-		const onHandleSizeChange = (val: number) => {
-			state.tableData.param.pageSize = val;
-		};
-		// 分页改变
-		const onHandleCurrentChange = (val: number) => {
-			state.tableData.param.pageNum = val;
-		};
-		// 页面加载时
-		onMounted(() => {
-			initTableData();
-		});
-		return {
-			addUserRef,
-			editUserRef,
-			onOpenAddUser,
-			onOpenEditUser,
-			onRowDel,
-			onHandleSizeChange,
-			onHandleCurrentChange,
-			...toRefs(state),
-		};
-	},
-});
-</script>

+ 0 - 498
nextadmin_vue3/src/views/tools/index.vue

@@ -1,498 +0,0 @@
-<template>
-	<el-card shadow="hover" header="正则验证(一些项目中常用的正则)">
-		<el-form :model="ruleForm" :rules="rules" class="tools-warp-form"   label-position="top">
-			<el-form-item label="验证百分比(不可以小数):" prop="a22">
-				<div class="tools-warp-form-msg">验证可以输入大于0小于100的数字</div>
-				<div>
-					<el-input v-model="ruleForm.a22" @input="onVerifyNumberPercentage($event)" placeholder="请输入数字进行测试">
-						<template #append> % </template>
-					</el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="验证百分比(可以小数):" prop="a23" class="mt20">
-				<div class="tools-warp-form-msg">验证可以输入大于0小于100的数字</div>
-				<div>
-					<el-input v-model="ruleForm.a23" @input="onVerifyNumberPercentageFloat($event)" placeholder="请输入数字进行测试">
-						<template #append> % </template>
-					</el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="小数或整数:" prop="a1" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证可以输入小数或整数,0 开始, . 只能出现一次,保留小数点后保留2位小数。(负数时,模拟拼接负号给后台)。
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a1" @input="onVerifyNumberIntegerAndFloat($event)" placeholder="请输入小数或整数进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="正整数:" prop="a2" class="mt20">
-				<div class="tools-warp-form-msg">验证只可以输入正整数,0 开始后面将不可以输入。</div>
-				<div>
-					<el-input v-model="ruleForm.a2" @input="onVerifiyNumberInteger($event)" placeholder="请输入整数进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="去掉中文及空格:" prop="a3" class="mt20">
-				<div class="tools-warp-form-msg">验证不可以输入空格与中文。</div>
-				<div>
-					<el-input v-model="ruleForm.a3" @input="onVerifyCnAndSpace($event)" placeholder="请输入内容进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="去掉英文及空格:" prop="a4" class="mt20">
-				<div class="tools-warp-form-msg">验证不可以输入空格与英文。</div>
-				<div>
-					<el-input v-model="ruleForm.a4" @input="onVerifyEnAndSpace($event)" placeholder="请输入内容进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="禁止输入空格:" prop="a5" class="mt20">
-				<div class="tools-warp-form-msg">验证不可以输入空格。</div>
-				<div>
-					<el-input v-model="ruleForm.a5" @input="onVerifyAndSpace($event)" placeholder="请输入内容进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="金额用 `,` 区分开:" prop="a6" class="mt20">
-				<div class="tools-warp-form-msg">金额添加 `,` 进行区分,便于阅读。{{ ruleForm.a6 }}</div>
-				<div>
-					<el-input v-model="ruleForm.a6" @input="onVerifyNumberComma($event)" placeholder="请输入金额进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="匹配文字变色(搜索时):" prop="a7" class="mt20">
-				<div class="tools-warp-form-msg">示例:<span v-html="text"></span></div>
-				<div>
-					<el-input v-model="ruleForm.a7" @input="onVerifyTextColor($event)" placeholder="请输入示例中的部分文字"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="数字转中文大写:" prop="a8" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证数字转成中文的大写。<span class="tools-warp-form-msg-red">{{ cnText }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a8" @input="onVerifyNumberCnUppercase($event)" placeholder="请输入金额进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="手机号码:" prop="a9" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证手机号码 (true: 正确,false: 不正确)。<span class="tools-warp-form-msg-red">{{ phone }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a9" @input="onVerifyPhone($event)" placeholder="请输入手机号进行测试" maxlength="11"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="国内电话号码:" prop="a10" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证国内电话号码 (true: 正确,false: 不正确)。<span class="tools-warp-form-msg-red">{{ telePhone }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a10" @input="onVerifyTelPhone($event)" placeholder="请输入国内电话号码进行测试" maxlength="12"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="登录账号:" prop="a11" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证登录账号是否正确。字母开头,允许5-16字节,允许字母数字下划线 (true: 正确,false: 不正确)。<span class="tools-warp-form-msg-red">{{
-						account
-					}}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a11" @input="onVerifyAccount($event)" placeholder="请输入账号进行测试" maxlength="16"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="密码:" prop="a12" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证密码是否正确。以字母开头,长度在6~16之间,只能包含字母、数字和下划线 (true: 正确,false: 不正确)。<span
-						class="tools-warp-form-msg-red"
-						>{{ password }}</span
-					>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a12" @input="onVerifyPassword($event)" placeholder="请输入密码进行测试" maxlength="16"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="强密码:" prop="a13" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证强密码是否正确。字母+数字+特殊字符,长度在6-16之间 (true: 正确,false: 不正确)。<span class="tools-warp-form-msg-red">{{
-						passwordPowerful
-					}}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a13" @input="onVerifyPasswordPowerful($event)" placeholder="请输入密码进行测试" maxlength="16"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="密码强度:" prop="a14" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证密码强度。返回 强、中、弱。(弱:纯数字,纯字母,纯特殊字符,中:字母+数字,字母+特殊字符,数字+特殊字符,强:字母+数字+特殊字符)<span
-						class="tools-warp-form-msg-red"
-						>{{ passwordStrength }}</span
-					>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a14" @input="onVerifyPasswordStrength($event)" placeholder="请输入密码进行测试" maxlength="16"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="IP地址:" prop="a15" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证IP地址是否正确。(true: 正确,false: 不正确)。<span class="tools-warp-form-msg-red">{{ iPAddress }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a15" @input="onVerifyIPAddress($event)" placeholder="请输入IP地址进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="邮箱:" prop="a16" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证邮箱是否正确。(true: 正确,false:不正确)。<span class="tools-warp-form-msg-red">{{ email }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a16" @input="onVerifyEmail($event)" placeholder="请输入邮箱进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="身份证:" prop="a17" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证身份证是否正确。(true: 正确,false:不正确)。<span class="tools-warp-form-msg-red">{{ idCard }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a17" @input="onVerifyIDCard($event)" placeholder="请输入身份证进行测试" maxlength="18"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="姓名:" prop="a18" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证姓名是否正确,包括少数民族名字。(true: 正确,false:不正确)。<span class="tools-warp-form-msg-red">{{ fullName }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a18" @input="onVerifyFullName($event)" placeholder="请输入姓名进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="邮政编码:" prop="a19" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证邮政编码是否正确,不能以 0 开始。(true: 正确,false:不正确)。<span class="tools-warp-form-msg-red">{{ postalCode }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a19" @input="onVerifyPostalCode($event)" placeholder="请输入邮政编码进行测试" maxlength="6"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="url:" prop="a20" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证url是否正确。(true: 正确,false:不正确)。<span class="tools-warp-form-msg-red">{{ url }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a20" @input="onVerifyUrl($event)" placeholder="请输入内容进行测试"> </el-input>
-				</div>
-			</el-form-item>
-			<el-form-item label="车牌号:" prop="a21" class="mt20">
-				<div class="tools-warp-form-msg">
-					验证车牌号是否正确。(true: 正确,false:不正确)。<span class="tools-warp-form-msg-red">{{ carNum }}</span>
-				</div>
-				<div>
-					<el-input v-model="ruleForm.a21" @input="onVerifyCarNum($event)" placeholder="请输入车牌号进行测试"> </el-input>
-				</div>
-			</el-form-item>
-		</el-form>
-	</el-card>
-</template>
-
-<script lang="ts">
-import { reactive, toRefs, defineComponent } from 'vue';
-import {
-	verifyNumberPercentage,
-	verifyNumberPercentageFloat,
-	verifyNumberIntegerAndFloat,
-	verifiyNumberInteger,
-	verifyCnAndSpace,
-	verifyEnAndSpace,
-	verifyAndSpace,
-	verifyNumberComma,
-	verifyTextColor,
-	verifyNumberCnUppercase,
-	verifyPhone,
-	verifyTelPhone,
-	verifyAccount,
-	verifyPassword,
-	verifyPasswordPowerful,
-	verifyPasswordStrength,
-	verifyIPAddress,
-	verifyEmail,
-	verifyIdCard,
-	verifyFullName,
-	verifyPostalCode,
-	verifyUrl,
-	verifyCarNum,
-} from '/@/utils/toolsValidate';
-export default defineComponent({
-	name: 'tools',
-	setup() {
-		const state = reactive({
-			text: '世间美好,与你环环相扣,祝你开心每一天!',
-			phone: false,
-			cnText: '',
-			telePhone: false,
-			account: false,
-			password: false,
-			passwordPowerful: false,
-			passwordStrength: '',
-			iPAddress: false,
-			email: false,
-			idCard: false,
-			fullName: false,
-			postalCode: false,
-			url: false,
-			carNum: false,
-			/**
-			 * 变量名为了方便,随便取了,
-			 * 实际中,按正常程序进行命名
-			 */
-			ruleForm: {
-				a1: '',
-				a2: '',
-				a3: '',
-				a4: '',
-				a5: '',
-				a6: '',
-				a7: '',
-				a8: '',
-				a9: '',
-				a10: '',
-				a11: '',
-				a12: '',
-				a13: '',
-				a14: '',
-				a15: '',
-				a16: '',
-				a17: '',
-				a18: '',
-				a19: '',
-				a20: '',
-				a21: '',
-				a22: '',
-				a23: '',
-			},
-			rules: {
-				a1: [
-					{
-						required: true,
-						message: '请输入小数或整数进行测试',
-						trigger: 'change',
-					},
-				],
-				a2: [
-					{
-						required: true,
-						message: '请输入正整数进行测试',
-						trigger: 'change',
-					},
-				],
-				a3: [{ required: true, message: '请输入内容进行测试', trigger: 'change' }],
-				a4: [{ required: true, message: '请输入内容进行测试', trigger: 'change' }],
-				a5: [{ required: true, message: '请输入内容进行测试', trigger: 'change' }],
-				a6: [
-					{
-						required: true,
-						message: '请输入小数或整数进行测试',
-						trigger: 'change',
-					},
-				],
-				a7: [{ required: true, message: '请输入内容进行测试', trigger: 'change' }],
-				a8: [{ required: true, message: '请输入金额进行测试', trigger: 'change' }],
-				a9: [
-					{
-						required: true,
-						message: '请输入手机号进行测试',
-						trigger: 'change',
-					},
-				],
-				a10: [
-					{
-						required: true,
-						message: '请输入国内电话号码进行测试',
-						trigger: 'change',
-					},
-				],
-				a11: [{ required: true, message: '请输入账号进行测试', trigger: 'change' }],
-				a12: [{ required: true, message: '请输入密码进行测试', trigger: 'change' }],
-				a13: [{ required: true, message: '请输入密码进行测试', trigger: 'change' }],
-				a14: [{ required: true, message: '请输入密码进行测试', trigger: 'change' }],
-				a15: [
-					{
-						required: true,
-						message: '请输入IP地址进行测试',
-						trigger: 'change',
-					},
-				],
-				a16: [{ required: true, message: '请输入邮箱进行测试', trigger: 'change' }],
-				a17: [
-					{
-						required: true,
-						message: '请输入身份证进行测试',
-						trigger: 'change',
-					},
-				],
-				a18: [{ required: true, message: '请输入姓名进行测试', trigger: 'change' }],
-				a19: [
-					{
-						required: true,
-						message: '请输入邮政编码进行测试',
-						trigger: 'change',
-					},
-				],
-				a20: [{ required: true, message: '请输入内容进行测试', trigger: 'change' }],
-				a21: [
-					{
-						required: true,
-						message: '请输入车牌号进行测试',
-						trigger: 'change',
-					},
-				],
-				a22: [{ required: true, message: '请输入数字进行测试', trigger: 'change' }],
-				a23: [{ required: true, message: '请输入数字进行测试', trigger: 'change' }],
-			},
-		});
-		// 验证百分比(不可以小数)
-		const onVerifyNumberPercentage = (val: string) => {
-			state.ruleForm.a22 = verifyNumberPercentage(val);
-		};
-		// 验证百分比(可以小数)
-		const onVerifyNumberPercentageFloat = (val: string) => {
-			state.ruleForm.a23 = verifyNumberPercentageFloat(val);
-		};
-		// 小数或整数
-		const onVerifyNumberIntegerAndFloat = (val: string) => {
-			state.ruleForm.a1 = verifyNumberIntegerAndFloat(val);
-		};
-		// 正整数
-		const onVerifiyNumberInteger = (val: string) => {
-			state.ruleForm.a2 = verifiyNumberInteger(val);
-		};
-		// 去掉中文及空格
-		const onVerifyCnAndSpace = (val: string) => {
-			state.ruleForm.a3 = verifyCnAndSpace(val);
-		};
-		// 去掉英文及空格
-		const onVerifyEnAndSpace = (val: string) => {
-			state.ruleForm.a4 = verifyEnAndSpace(val);
-		};
-		// 禁止输入空格
-		const onVerifyAndSpace = (val: string) => {
-			state.ruleForm.a5 = verifyAndSpace(val);
-		};
-		// 金额用 `,` 区分开
-		const onVerifyNumberComma = (val: string) => {
-			state.ruleForm.a6 = verifyNumberComma(val);
-		};
-		// 匹配文字变色(搜索时)
-		const onVerifyTextColor = (val: string) => {
-			state.ruleForm.a7 = verifyAndSpace(val);
-			if (state.ruleForm.a7 === '') state.text = `世间美好,与你环环相扣,祝你开心每一天!`;
-			else state.text = verifyTextColor(state.ruleForm.a7, state.text);
-		};
-		// 数字转中文大写
-		const onVerifyNumberCnUppercase = (val: string) => {
-			state.ruleForm.a8 = verifyNumberIntegerAndFloat(val);
-			if (state.ruleForm.a8 === '') state.cnText = '';
-			else state.cnText = verifyNumberCnUppercase(state.ruleForm.a8);
-		};
-		// 手机号码
-		const onVerifyPhone = (val: string) => {
-			state.phone = verifyPhone(val);
-		};
-		// 国内电话号码
-		const onVerifyTelPhone = (val: string) => {
-			state.telePhone = verifyTelPhone(val);
-		};
-		// 登录账号
-		const onVerifyAccount = (val: string) => {
-			state.ruleForm.a11 = verifyCnAndSpace(val);
-			state.account = verifyAccount(state.ruleForm.a11);
-		};
-		// 密码
-		const onVerifyPassword = (val: string) => {
-			state.ruleForm.a12 = verifyCnAndSpace(val);
-			state.password = verifyPassword(state.ruleForm.a12);
-		};
-		// 强密码
-		const onVerifyPasswordPowerful = (val: string) => {
-			state.ruleForm.a13 = verifyCnAndSpace(val);
-			state.passwordPowerful = verifyPasswordPowerful(state.ruleForm.a13);
-		};
-		// 密码强度
-		const onVerifyPasswordStrength = (val: string) => {
-			state.ruleForm.a14 = verifyCnAndSpace(val);
-			state.passwordStrength = verifyPasswordStrength(state.ruleForm.a14);
-		};
-		// IP地址
-		const onVerifyIPAddress = (val: string) => {
-			state.iPAddress = verifyIPAddress(val);
-		};
-		// 邮箱
-		const onVerifyEmail = (val: string) => {
-			state.ruleForm.a16 = verifyCnAndSpace(val);
-			state.email = verifyEmail(state.ruleForm.a16);
-		};
-		// 身份证
-		const onVerifyIDCard = (val: string) => {
-			state.ruleForm.a17 = verifyCnAndSpace(val);
-			state.idCard = verifyIdCard(state.ruleForm.a17);
-		};
-		// 姓名
-		const onVerifyFullName = (val: string) => {
-			state.ruleForm.a18 = verifyAndSpace(val);
-			state.fullName = verifyFullName(state.ruleForm.a18);
-		};
-		// 邮政编码
-		const onVerifyPostalCode = (val: string) => {
-			state.ruleForm.a19 = verifiyNumberInteger(val);
-			state.postalCode = verifyPostalCode(state.ruleForm.a19);
-		};
-		// url
-		const onVerifyUrl = (val: string) => {
-			state.ruleForm.a20 = verifyAndSpace(val);
-			state.url = verifyUrl(state.ruleForm.a20);
-		};
-		// 车牌号
-		const onVerifyCarNum = (val: string) => {
-			state.ruleForm.a21 = verifyAndSpace(val);
-			state.carNum = verifyCarNum(state.ruleForm.a21);
-		};
-		return {
-			onVerifyNumberPercentage,
-			onVerifyNumberPercentageFloat,
-			onVerifyNumberIntegerAndFloat,
-			onVerifiyNumberInteger,
-			onVerifyCnAndSpace,
-			onVerifyEnAndSpace,
-			onVerifyAndSpace,
-			onVerifyNumberComma,
-			onVerifyTextColor,
-			onVerifyNumberCnUppercase,
-			onVerifyPhone,
-			onVerifyTelPhone,
-			onVerifyAccount,
-			onVerifyPassword,
-			onVerifyPasswordPowerful,
-			onVerifyPasswordStrength,
-			onVerifyIPAddress,
-			onVerifyEmail,
-			onVerifyIDCard,
-			onVerifyFullName,
-			onVerifyPostalCode,
-			onVerifyUrl,
-			onVerifyCarNum,
-			...toRefs(state),
-		};
-	},
-});
-</script>
-
-<style scoped lang="scss">
-.tools-warp-form {
-	::v-deep(.el-form-item--small.el-form-item) {
-		margin-bottom: 0 !important;
-	}
-	.tools-warp-form-msg {
-		color: #666666;
-		font-size: 14px;
-		width: 100%;
-		.tools-warp-form-msg-red {
-			color: red;
-		}
-	}
-	.tools-warp-form-msg + div {
-		width: 100%;
-	}
-}
-</style>

+ 0 - 0
nextadmin_vue3/vite.config.ts


Some files were not shown because too many files changed in this diff