From cc9b67d4676dd51a6b2d88e92607aca2629ee54d Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期五, 22 十二月 2023 13:26:26 +0800
Subject: [PATCH] !72 发布 vue 版本 5.1.2 与 cloud 版本 2.1.2 Merge pull request !72 from 疯狂的狮子Li/temp

---
 src/views/index.vue                           |    4 
 src/views/system/role/index.vue               |    2 
 src/views/system/oss/config.vue               |   10 +-
 src/views/system/user/profile/userAvatar.vue  |    6 +-
 src/views/register.vue                        |    4 
 src/views/system/menu/index.vue               |    2 
 src/views/system/dict/data.vue                |    4 
 src/router/index.ts                           |    2 
 src/layout/components/Sidebar/SidebarItem.vue |    4 
 src/components/DictTag/index.vue              |    4 
 src/views/system/dept/index.vue               |    2 
 src/utils/request.ts                          |   21 ++++++-
 src/store/modules/tagsView.ts                 |   11 +++
 src/types/env.d.ts                            |    1 
 src/utils/crypto.ts                           |   21 +++++++
 src/store/modules/user.ts                     |    7 ++
 src/views/monitor/online/index.vue            |   12 ++-
 README.md                                     |    4 +
 src/permission.ts                             |    2 
 .env.development                              |    2 
 src/components/IconSelect/index.vue           |    2 
 src/utils/jsencrypt.ts                        |    2 
 src/views/tool/gen/index.vue                  |    4 
 package.json                                  |    2 
 .env.production                               |    2 
 25 files changed, 99 insertions(+), 38 deletions(-)

diff --git a/.env.development b/.env.development
index 53750c9..7edd98a 100644
--- a/.env.development
+++ b/.env.development
@@ -20,6 +20,8 @@
 
 # 鎺ュ彛鍔犲瘑浼犺緭 RSA 鍏挜涓庡悗绔В瀵嗙閽ュ搴� 濡傛洿鎹㈤渶鍓嶅悗绔竴鍚屾洿鎹�
 VITE_APP_RSA_PUBLIC_KEY = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
+# 鎺ュ彛鍝嶅簲瑙e瘑 RSA 绉侀挜涓庡悗绔姞瀵嗗叕閽ュ搴� 濡傛洿鎹㈤渶鍓嶅悗绔竴鍚屾洿鎹�
+VITE_APP_RSA_PRIVATE_KEY = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE='
 
 # 瀹㈡埛绔痠d
 VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
diff --git a/.env.production b/.env.production
index c463542..0e3b9fc 100644
--- a/.env.production
+++ b/.env.production
@@ -23,6 +23,8 @@
 
 # 鎺ュ彛鍔犲瘑浼犺緭 RSA 鍏挜涓庡悗绔В瀵嗙閽ュ搴� 濡傛洿鎹㈤渶鍓嶅悗绔竴鍚屾洿鎹�
 VITE_APP_RSA_PUBLIC_KEY = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
+# 鎺ュ彛鍝嶅簲瑙e瘑 RSA 绉侀挜涓庡悗绔姞瀵嗗叕閽ュ搴� 濡傛洿鎹㈤渶鍓嶅悗绔竴鍚屾洿鎹�
+VITE_APP_RSA_PRIVATE_KEY = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE='
 
 # 瀹㈡埛绔痠d
 VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
diff --git a/README.md b/README.md
index 6644daf..2742463 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,9 @@
 # 鍚姩鏈嶅姟
 npm run dev
 
-# 鏋勫缓鐢熶骇鐜 yarn build:prod
+# 鏋勫缓鐢熶骇鐜 
+npm run build:prod
+
 # 鍓嶇璁块棶鍦板潃 http://localhost:80
 ```
 
diff --git a/package.json b/package.json
index 13e0f92..6af6ba2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "ruoyi-vue-plus",
-  "version": "5.1.1",
+  "version": "5.1.2",
   "description": "RuoYi-Vue-Plus澶氱鎴风鐞嗙郴缁�",
   "author": "LionLi",
   "license": "MIT",
diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue
index 1057b3f..45b288b 100644
--- a/src/components/DictTag/index.vue
+++ b/src/components/DictTag/index.vue
@@ -2,7 +2,7 @@
   <div>
     <template v-for="(item, index) in options">
       <template v-if="values.includes(item.value)">
-        <span v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)"
+        <span v-if="(item.elTagType === 'default' || item.elTagType === '') && (item.elTagClass === '' || item.elTagClass == null)"
               :key="item.value" :index="index" :class="item.elTagClass">
           {{ item.label + " " }}
         </span>
@@ -11,7 +11,7 @@
           :disable-transitions="true"
           :key="item.value + ''"
           :index="index"
-          :type="item.elTagType === 'primary' ? '' : item.elTagType"
+          :type="(item.elTagType === 'primary' || item.elTagType === 'default')? '' : item.elTagType"
           :class="item.elTagClass"
         >
           {{ item.label + " " }}
diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue
index a275954..1cd0023 100644
--- a/src/components/IconSelect/index.vue
+++ b/src/components/IconSelect/index.vue
@@ -2,7 +2,7 @@
   <div class="relative" :style="{ width: width }">
     <el-input v-model="modelValue" readonly @click="visible = !visible" placeholder="鐐瑰嚮閫夋嫨鍥炬爣">
       <template #prepend>
-        <svg-icon :icon-class="modelValue as string" />
+        <svg-icon :icon-class="modelValue" />
       </template>
     </el-input>
 
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index 204b19b..4459cdf 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -18,8 +18,8 @@
       </template>
 
       <sidebar-item
-        v-for="(child) in item.children as RouteOption[]"
-        :key="child.path"
+        v-for="(child, index) in item.children"
+        :key="child.path + index"
         :is-nest="true"
         :item="child"
         :base-path="resolvePath(child.path)"
diff --git a/src/permission.ts b/src/permission.ts
index 4543d08..c819ff4 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -20,6 +20,8 @@
     if (to.path === '/login') {
       next({ path: '/' });
       NProgress.done();
+    } else if (whiteList.indexOf(to.path) !== -1) {
+      next()
     } else {
       if (useUserStore().roles.length === 0) {
         isRelogin.show = true;
diff --git a/src/router/index.ts b/src/router/index.ts
index 6c56cd3..271385c 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -139,7 +139,7 @@
     path: '/system/oss-config',
     component: Layout,
     hidden: true,
-    permissions: ['system:oss:list'],
+    permissions: ['system:ossConfig:list'],
     children: [
       {
         path: 'index',
diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts
index cd065d1..1c1c9a2 100644
--- a/src/store/modules/tagsView.ts
+++ b/src/store/modules/tagsView.ts
@@ -1,4 +1,4 @@
-import { TagView } from 'vue-router';
+import { TagView, RouteRecordNormalized } from 'vue-router';
 
 export const useTagsViewStore = defineStore('tagsView', () => {
   const visitedViews = ref<TagView[]>([]);
@@ -35,7 +35,9 @@
   const delView = (view: TagView): Promise<{ visitedViews: TagView[]; cachedViews: string[] }> => {
     return new Promise((resolve) => {
       delVisitedView(view);
-      delCachedView(view);
+      if (!isDynamicRoute(view)) {
+        delCachedView(view);
+      }
       resolve({
         visitedViews: [...visitedViews.value],
         cachedViews: [...cachedViews.value]
@@ -177,6 +179,11 @@
     }
   };
 
+  const isDynamicRoute = (view: any): boolean => {
+    // 妫�鏌ュ尮閰嶇殑璺敱璁板綍涓槸鍚︽湁鍔ㄦ�佹
+    return view.matched.some((m: RouteRecordNormalized) => m.path.includes(':'));
+  };
+
   return {
     visitedViews,
     cachedViews,
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 2593d1a..7c02de0 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -63,6 +63,10 @@
     removeToken();
   };
 
+  const setAvatar = (value: string) => {
+    avatar.value = value;
+  };
+
   return {
     userId,
     token,
@@ -72,7 +76,8 @@
     permissions,
     login,
     getInfo,
-    logout
+    logout,
+    setAvatar
   };
 });
 
diff --git a/src/types/env.d.ts b/src/types/env.d.ts
index 15fa03a..9560307 100644
--- a/src/types/env.d.ts
+++ b/src/types/env.d.ts
@@ -68,6 +68,7 @@
   VITE_APP_POWERJOB_ADMIN: string;
   VITE_APP_ENV: string;
   VITE_APP_RSA_PUBLIC_KEY: string;
+  VITE_APP_RSA_PRIVATE_KEY: string;
   VITE_APP_CLIENT_ID: string;
   VITE_APP_WEBSOCKET: string;
 }
diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts
index 133893e..8217146 100644
--- a/src/utils/crypto.ts
+++ b/src/utils/crypto.ts
@@ -31,6 +31,13 @@
 };
 
 /**
+ * 瑙e瘑base64
+ */
+export const decryptBase64 = (str: string) => {
+  return CryptoJS.enc.Base64.parse(str);
+};
+
+/**
  * 浣跨敤瀵嗛挜瀵规暟鎹繘琛屽姞瀵�
  * @param message
  * @param aesKey
@@ -43,3 +50,17 @@
   });
   return encrypted.toString();
 };
+
+/**
+ * 浣跨敤瀵嗛挜瀵规暟鎹繘琛岃В瀵�
+ * @param message
+ * @param aesKey
+ * @returns {string}
+ */
+export const decryptWithAes = (message: string, aesKey: CryptoJS.lib.WordArray) => {
+  const decrypted = CryptoJS.AES.decrypt(message, aesKey, {
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7
+  });
+  return decrypted.toString(CryptoJS.enc.Utf8);
+};
diff --git a/src/utils/jsencrypt.ts b/src/utils/jsencrypt.ts
index 98114b4..42de5a0 100644
--- a/src/utils/jsencrypt.ts
+++ b/src/utils/jsencrypt.ts
@@ -4,7 +4,7 @@
 const publicKey = import.meta.env.VITE_APP_RSA_PUBLIC_KEY;
 
 // 鍓嶇涓嶅缓璁瓨鏀剧閽� 涓嶅缓璁В瀵嗘暟鎹� 鍥犱负閮芥槸閫忔槑鐨勬剰涔変笉澶�
-const privateKey = '**********';
+const privateKey = import.meta.env.VITE_APP_RSA_PRIVATE_KEY;
 
 // 鍔犲瘑
 export const encrypt = (txt: string) => {
diff --git a/src/utils/request.ts b/src/utils/request.ts
index ed67713..a183ca6 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -8,9 +8,10 @@
 import { LoadingInstance } from 'element-plus/es/components/loading/src/loading';
 import FileSaver from 'file-saver';
 import { getLanguage } from '@/lang';
-import { encryptBase64, encryptWithAes, generateAesKey } from '@/utils/crypto';
-import { encrypt } from '@/utils/jsencrypt';
+import { encryptBase64, encryptWithAes, generateAesKey, decryptWithAes, decryptBase64 } from '@/utils/crypto';
+import { encrypt, decrypt } from '@/utils/jsencrypt';
 
+const encryptHeader = 'encrypt-key';
 let downloadLoadingInstance: LoadingInstance;
 // 鏄惁鏄剧ず閲嶆柊鐧诲綍
 export const isRelogin = { show: false };
@@ -78,7 +79,7 @@
     if (isEncrypt && (config.method === 'post' || config.method === 'put')) {
       // 鐢熸垚涓�涓� AES 瀵嗛挜
       const aesKey = generateAesKey();
-      config.headers['encrypt-key'] = encrypt(encryptBase64(aesKey));
+      config.headers[encryptHeader] = encrypt(encryptBase64(aesKey));
       config.data = typeof config.data === 'object' ? encryptWithAes(JSON.stringify(config.data), aesKey) : encryptWithAes(config.data, aesKey);
     }
     // FormData鏁版嵁鍘昏姹傚ごContent-Type
@@ -96,6 +97,20 @@
 // 鍝嶅簲鎷︽埅鍣�
 service.interceptors.response.use(
   (res: AxiosResponse) => {
+    // 鍔犲瘑鍚庣殑 AES 绉橀挜
+    const keyStr = res.headers[encryptHeader];
+    // 鍔犲瘑
+    if (keyStr != null && keyStr != '') {
+      const data = res.data;
+      // 璇锋眰浣� AES 瑙e瘑
+      const base64Str = decrypt(keyStr);
+      // base64 瑙g爜 寰楀埌璇锋眰澶寸殑 AES 绉橀挜
+      const aesKey = decryptBase64(base64Str.toString());
+      // aesKey 瑙g爜 data
+      const decryptData = decryptWithAes(data, aesKey);
+      // 灏嗙粨鏋� (寰楀埌鐨勬槸 JSON 瀛楃涓�) 杞负 JSON
+      res.data = JSON.parse(decryptData);
+    }
     // 鏈缃姸鎬佺爜鍒欓粯璁ゆ垚鍔熺姸鎬�
     const code = res.data.code || HttpStatus.SUCCESS;
     // 鑾峰彇閿欒淇℃伅
diff --git a/src/views/index.vue b/src/views/index.vue
index 7f658d8..12d764b 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -33,7 +33,7 @@
           * 閮ㄧ讲鏂瑰紡 Docker 瀹瑰櫒缂栨帓 涓�閿儴缃蹭笟鍔¢泦缇�<br />
           * 鍥介檯鍖� SpringMessage Spring鏍囧噯鍥介檯鍖栨柟妗�<br />
         </p>
-        <p><b>褰撳墠鐗堟湰:</b> <span>v5.1.1</span></p>
+        <p><b>褰撳墠鐗堟湰:</b> <span>v5.1.2</span></p>
         <p>
           <el-tag type="danger">&yen;鍏嶈垂寮�婧�</el-tag>
         </p>
@@ -78,7 +78,7 @@
           * 鍒嗗竷寮忕洃鎺� Prometheus銆丟rafana 鍏ㄦ柟浣嶆�ц兘鐩戞帶<br />
           * 鍏朵綑涓� Vue 鐗堟湰涓�鑷�<br />
         </p>
-        <p><b>褰撳墠鐗堟湰:</b> <span>v2.1.1</span></p>
+        <p><b>褰撳墠鐗堟湰:</b> <span>v2.1.2</span></p>
         <p>
           <el-tag type="danger">&yen;鍏嶈垂寮�婧�</el-tag>
         </p>
diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index 1a25dc5..d105cd7 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -63,6 +63,8 @@
 <script setup name="Online" lang="ts">
 import { forceLogout, list as initData } from "@/api/monitor/online";
 import { OnlineQuery, OnlineVO } from "@/api/monitor/online/types";
+import api from "@/api/system/user";
+import {to} from "await-to-js";
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { sys_device_type } = toRefs<any>(proxy?.useDict("sys_device_type"));
@@ -100,10 +102,12 @@
 }
 /** 寮洪��鎸夐挳鎿嶄綔 */
 const handleForceLogout = async (row: OnlineVO) => {
-  await proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?');
-  await forceLogout(row.tokenId);
-  await getList();
-  proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+  const [err] = await to(proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?') as any);
+  if (!err) {
+    await forceLogout(row.tokenId);
+    await getList();
+    proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+  }
 }
 
 onMounted(() => {
diff --git a/src/views/register.vue b/src/views/register.vue
index c2dd6a3..ad78cf1 100644
--- a/src/views/register.vue
+++ b/src/views/register.vue
@@ -105,12 +105,12 @@
 const codeUrl = ref("");
 const loading = ref(false);
 const captchaEnabled = ref(true);
-const registerRef = ref(ElForm);
+const registerRef = ref<ElFormInstance>();
 // 绉熸埛鍒楄〃
 const tenantList = ref<TenantVO[]>([]);
 
 const handleRegister = () => {
-  registerRef.value.validate(async (valid: boolean) => {
+  registerRef.value?.validate(async (valid: boolean) => {
     if (valid) {
       loading.value = true;
       const [err] = await to(register(registerForm.value));
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index ea3321d..9797125 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -70,7 +70,7 @@
       </el-table>
     </el-card>
 
-    <el-dialog :title="dialog.title" v-model="dialog.visible" destroy-on-close append-to-bod width="600px">
+    <el-dialog :title="dialog.title" v-model="dialog.visible" destroy-on-close append-to-body width="600px">
       <el-form ref="deptFormRef" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="24" v-if="form.parentId !== 0">
diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue
index 53ed0d2..c2ef550 100644
--- a/src/views/system/dict/data.vue
+++ b/src/views/system/dict/data.vue
@@ -49,8 +49,8 @@
         <el-table-column label="瀛楀吀缂栫爜" align="center" prop="dictCode" v-if="false" />
         <el-table-column label="瀛楀吀鏍囩" align="center" prop="dictLabel">
           <template #default="scope">
-            <span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
-            <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
+            <span v-if="(scope.row.listClass === '' || scope.row.listClass === 'default') && (scope.row.cssClass === '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
+            <el-tag v-else :type="(scope.row.listClass === 'primary' || scope.row.listClass === 'default') ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
           </template>
         </el-table-column>
         <el-table-column label="瀛楀吀閿��" align="center" prop="dictValue" />
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index e889876..06cd928 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -169,7 +169,7 @@
               <el-input v-model="form.perms" placeholder="璇疯緭鍏ユ潈闄愭爣璇�" maxlength="100" />
               <template #label>
                 <span>
-                  <el-tooltip content="鎺у埗鍣ㄤ腑瀹氫箟鐨勬潈闄愬瓧绗︼紝濡傦細@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top">
+                  <el-tooltip content="鎺у埗鍣ㄤ腑瀹氫箟鐨勬潈闄愬瓧绗︼紝濡傦細@SaCheckPermission('system:user:list')" placement="top">
                     <el-icon>
                       <question-filled />
                     </el-icon>
diff --git a/src/views/system/oss/config.vue b/src/views/system/oss/config.vue
index 1fd14fc..876347a 100644
--- a/src/views/system/oss/config.vue
+++ b/src/views/system/oss/config.vue
@@ -29,13 +29,13 @@
       <template #header>
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
-            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:oss:add']">鏂板</el-button>
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:ossConfig:add']">鏂板</el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:oss:edit']">淇敼</el-button>
+            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:ossConfig:edit']">淇敼</el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:oss:remove']">
+            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:ossConfig:remove']">
               鍒犻櫎
             </el-button>
           </el-col>
@@ -67,10 +67,10 @@
         <el-table-column label="鎿嶄綔" fixed="right" align="center" width="150" class-name="small-padding">
           <template #default="scope">
             <el-tooltip content="淇敼" placement="top">
-              <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:oss:edit']"></el-button>
+              <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:ossConfig:edit']"></el-button>
             </el-tooltip>
             <el-tooltip content="鍒犻櫎" placement="top">
-              <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:oss:remove']"></el-button>
+              <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:ossConfig:remove']"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index ffbd67c..bb6fc2c 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -107,7 +107,7 @@
         <el-form-item prop="roleKey">
           <template #label>
             <span>
-              <el-tooltip content="鎺у埗鍣ㄤ腑瀹氫箟鐨勬潈闄愬瓧绗︼紝濡傦細@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
+              <el-tooltip content="鎺у埗鍣ㄤ腑瀹氫箟鐨勬潈闄愬瓧绗︼紝濡傦細@SaCheckRole('admin')" placement="top">
                 <el-icon><question-filled /></el-icon>
               </el-tooltip>
               鏉冮檺瀛楃
diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue
index 0796765..ce25c11 100644
--- a/src/views/system/user/profile/userAvatar.vue
+++ b/src/views/system/user/profile/userAvatar.vue
@@ -1,6 +1,6 @@
 <template>
   <div class="user-info-head" @click="editCropper()">
-    <img :src="options.img as string" title="鐐瑰嚮涓婁紶澶村儚" class="img-circle img-lg" />
+    <img :src="options.img" title="鐐瑰嚮涓婁紶澶村儚" class="img-circle img-lg" />
     <el-dialog :title="title" v-model="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
       <el-row>
         <el-col :xs="24" :md="12" :style="{ height: '350px' }">
@@ -62,7 +62,7 @@
 import useUserStore from "@/store/modules/user";
 
 interface Options {
-  img: string | ArrayBuffer | null; // 瑁佸壀鍥剧墖鐨勫湴鍧�
+  img: string | any; // 瑁佸壀鍥剧墖鐨勫湴鍧�
   autoCrop: boolean; // 鏄惁榛樿鐢熸垚鎴浘妗�
   autoCropWidth: number; // 榛樿鐢熸垚鎴浘妗嗗搴�
   autoCropHeight: number; // 榛樿鐢熸垚鎴浘妗嗛珮搴�
@@ -140,7 +140,7 @@
     const res = await uploadAvatar(formData);
     open.value = false;
     options.img = res.data.imgUrl;
-    userStore.avatar = options.img as string
+    userStore.setAvatar(options.img as string)
     proxy?.$modal.msgSuccess("淇敼鎴愬姛");
     visible.value = false;
   });
diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue
index 82d5228..cb684f8 100644
--- a/src/views/tool/gen/index.vue
+++ b/src/views/tool/gen/index.vue
@@ -97,8 +97,8 @@
       <el-tabs v-model="preview.activeName">
         <el-tab-pane
           v-for="(value, key) in preview.data"
-          :label="(key as any).substring((key as any).lastIndexOf('/') + 1, (key as any).indexOf('.vm'))"
-          :name="(key as any).substring((key as any).lastIndexOf('/') + 1, (key as any).indexOf('.vm'))"
+          :label="key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))"
+          :name="key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))"
           :key="value"
         >
           <el-link :underline="false" icon="DocumentCopy" v-copyText="value" v-copyText:callback="copyTextSuccess" style="float:right">

--
Gitblit v1.9.3