3
0
Эх сурвалжийг харах

[Pref 0000] 删除Electron依赖,格式化项目

houzekong 5 сар өмнө
parent
commit
1fd72adb57
100 өөрчлөгдсөн 541 нэмэгдсэн , 1354 устгасан
  1. 0 38
      .env.prod_electron
  2. 0 8
      build/script/buildConf.ts
  3. 1 8
      build/utils.ts
  4. 0 34
      build/vite/plugin/electron.ts
  5. 1 11
      build/vite/plugin/index.ts
  6. 0 24
      electron-builder.yaml
  7. 0 29
      electron.md
  8. 0 18
      electron/env.ts
  9. BIN
      electron/icons/app.ico
  10. BIN
      electron/icons/installer.ico
  11. BIN
      electron/icons/mac/dock.png
  12. BIN
      electron/icons/mac/tray-icon.png
  13. BIN
      electron/icons/mac/tray-icon@2x.png
  14. 0 43
      electron/ipc/index.ts
  15. 0 62
      electron/main.ts
  16. 0 18
      electron/paths.ts
  17. 0 20
      electron/preload/index.ts
  18. 0 1
      electron/script/buildAfter.ts
  19. 0 27
      electron/script/buildBefore.ts
  20. 0 31
      electron/utils/index.ts
  21. 0 200
      electron/utils/tray.ts
  22. 0 100
      electron/utils/window.ts
  23. 12 12
      pnpm-lock.yaml
  24. 2 2
      src/api/common/api.ts
  25. 2 2
      src/api/model/baseModel.ts
  26. 4 4
      src/api/sys/user.ts
  27. 1 1
      src/components/Form/src/hooks/useAdvanced.ts
  28. 7 7
      src/components/Form/src/hooks/useForm.ts
  29. 2 2
      src/components/Form/src/hooks/useFormEvents.ts
  30. 2 2
      src/components/Form/src/jeecg/components/JEasyCron/tabs/useTabMixin.ts
  31. 7 7
      src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useLinkTable.ts
  32. 66 63
      src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useTableColumns.ts
  33. 1 1
      src/components/Form/src/jeecg/hooks/useCodeHinting.ts
  34. 7 7
      src/components/Form/src/jeecg/hooks/useSelectBiz.ts
  35. 8 8
      src/components/Form/src/jeecg/hooks/useTreeBiz.ts
  36. 6 6
      src/components/Form/src/utils/Area.ts
  37. 8 8
      src/components/JVxeCustom/src/components/JVxeSelectDictSearchCell.ts
  38. 3 3
      src/components/JVxeCustom/src/hooks/useFileCell.ts
  39. 0 7
      src/components/Markdown/src/Markdown.vue
  40. 4 4
      src/components/Table/src/hooks/useColumnsCache.ts
  41. 3 3
      src/components/Table/src/hooks/useCustomSelection.tsx
  42. 1 1
      src/components/Table/src/hooks/useDataSource.ts
  43. 3 3
      src/components/jeecg/JVxeTable/src/JVxeTable.ts
  44. 4 4
      src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts
  45. 1 1
      src/components/jeecg/JVxeTable/src/components/cells/JVxeSlotCell.ts
  46. 6 6
      src/components/jeecg/JVxeTable/src/hooks/cells/useJVxeUploadCell.ts
  47. 13 13
      src/components/jeecg/JVxeTable/src/hooks/useColumns.ts
  48. 3 3
      src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts
  49. 3 3
      src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts
  50. 7 7
      src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts
  51. 12 12
      src/components/jeecg/JVxeTable/src/hooks/useLinkage.ts
  52. 60 60
      src/components/jeecg/JVxeTable/src/hooks/useMethods.ts
  53. 6 6
      src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts
  54. 8 8
      src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts
  55. 6 6
      src/components/jeecg/JVxeTable/src/install.ts
  56. 7 7
      src/components/jeecg/JVxeTable/src/utils/authUtils.ts
  57. 4 4
      src/components/jeecg/JVxeTable/src/utils/enhancedUtils.ts
  58. 10 10
      src/components/jeecg/JVxeTable/utils.ts
  59. 61 61
      src/components/jeecg/OnLine/hooks/usePopBiz.ts
  60. 24 24
      src/components/jeecg/comment/useComment.ts
  61. 1 1
      src/components/jeecg/thirdApp/jThirdApp.api.ts
  62. 0 72
      src/electron/index.ts
  63. 0 4
      src/enums/jeecgEnum.ts
  64. 1 1
      src/hooks/jeecg/useAdaptiveWidth.ts
  65. 0 3
      src/hooks/setting/index.ts
  66. 1 1
      src/hooks/system/useAutoAdapt.ts
  67. 10 10
      src/hooks/system/useJvxeMethods.ts
  68. 10 10
      src/hooks/system/useListPage.ts
  69. 7 7
      src/hooks/system/useMethods.ts
  70. 7 7
      src/hooks/system/useThirdLogin.ts
  71. 1 1
      src/hooks/web/useCopyModal.ts
  72. 7 7
      src/hooks/web/usePermission.ts
  73. 3 3
      src/hooks/web/useSso.ts
  74. 1 1
      src/hooks/web/useTabs.ts
  75. 1 42
      src/layouts/default/header/components/notify/index.vue
  76. 1 1
      src/logics/theme/updateBackground.ts
  77. 3 7
      src/main.ts
  78. 3 3
      src/router/guard/permissionGuard.ts
  79. 7 14
      src/router/index.ts
  80. 1 1
      src/router/router.ts
  81. 5 5
      src/settings/componentSetting.ts
  82. 34 34
      src/utils/common/compUtils.ts
  83. 3 3
      src/utils/common/renderUtils.ts
  84. 10 10
      src/utils/common/vxeUtils.ts
  85. 0 3
      src/utils/env.ts
  86. 1 1
      src/utils/helper/validator.ts
  87. 1 6
      src/utils/http/axios/index.ts
  88. 12 12
      src/utils/index.ts
  89. 4 4
      src/views/demo/document/form/example.data.ts
  90. 3 3
      src/views/demo/jeecg/erplist/erplist.api.ts
  91. 1 1
      src/views/demo/vextable/jvxetable/jvxetable.api.ts
  92. 1 1
      src/views/monitor/datasource/datasource.api.ts
  93. 2 2
      src/views/monitor/log/log.data.ts
  94. 1 1
      src/views/monitor/quartz/quartz.api.ts
  95. 3 3
      src/views/monitor/trace/trace.data.ts
  96. 3 3
      src/views/report/chartdemo/chartdemo.data.ts
  97. 3 3
      src/views/sys/login/useLogin.ts
  98. 1 1
      src/views/system/appconfig/ThirdApp.api.ts
  99. 1 1
      src/views/system/category/category.api.ts
  100. 1 1
      src/views/system/checkRule/check.rule.api.ts

+ 0 - 38
.env.prod_electron

@@ -1,38 +0,0 @@
-# 是否启用mock
-VITE_USE_MOCK = false
-
-# 后台接口父地址(必填)
-VITE_GLOB_DOMAIN_URL=/modelreq
-
-#后台接口父地址(必填)
-# 【Electron下需要与 VITE_GLOB_DOMAIN_URL 配置保持一致】
-VITE_GLOB_API_URL=/modelreq
-
-# 接口父路径前缀
-VITE_GLOB_API_URL_PREFIX=
-
-# 在线文档编辑版本。可选属性:wps, offlineWps(离线版), onlyoffice
-VITE_GLOB_ONLINE_DOCUMENT_VERSION=wps
-
-# 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开
-#VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs
-
-# -----------------------------------------
-# ------------ 以下参数不建议修改 ------------
-# -----------------------------------------
-
-# 发布路径
-# 【election下只能是 . 开头的相对路径,建议为 ./ 】
-VITE_PUBLIC_PATH = ./
-
-# 是否启用gzip或brotli压缩
-# 选项值: gzip | brotli | none
-# 如果需要多个可以使用“,”分隔
-# 【electron下由于是本地html文件访问,所以不需要压缩】
-VITE_BUILD_COMPRESS = 'none'
-
-# 使用压缩时是否删除原始文件,默认为false
-VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
-
-# ※ 请勿修改此项 ※
-VITE_GLOB_RUN_PLATFORM=electron

+ 0 - 8
build/script/buildConf.ts

@@ -35,14 +35,6 @@ function createConfig(params: CreateConfigParams) {
 
     console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
     console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n');
-
-    // 如果是 Electron 环境,还需要将配置文件写入到 JSON 文件中
-    if (config.VITE_GLOB_RUN_PLATFORM === 'electron') {
-      writeFileSync(getRootPath(`${OUTPUT_DIR}/electron/env.json`), JSON.stringify(config));
-      console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - electron env file is build successfully:`);
-      console.log(colors.gray(OUTPUT_DIR + '/' + colors.green('electron/env.json')) + '\n');
-    }
-
   } catch (error) {
     console.log(colors.red('configuration file configuration file failed to package:\n' + error));
   }

+ 1 - 8
build/utils.ts

@@ -32,7 +32,7 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
       try {
         realName = JSON.parse(realName.replace(/'/g, '"'));
       } catch (error) {
-        console.log("PARSE VITE PROXY ERROR:", error);
+        console.log('PARSE VITE PROXY ERROR:', error);
         realName = '';
       }
     }
@@ -50,13 +50,6 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
  * 获取当前环境下生效的配置文件名
  */
 function getConfFiles() {
-
-  // 代码逻辑说明: 【QQYUN-9685】构建 electron 桌面应用
-  const {VITE_GLOB_RUN_PLATFORM} = process.env
-  if (VITE_GLOB_RUN_PLATFORM === 'electron') {
-    return ['.env', '.env.prod_electron'];
-  }
-
   const script = process.env.npm_lifecycle_script;
   // 代码逻辑说明: 【QQYUN-8690】修正获取当前环境下的文件名
   const reg = new RegExp('NODE_ENV=([a-z_\\d]+)');

+ 0 - 34
build/vite/plugin/electron.ts

@@ -1,34 +0,0 @@
-// import electron from 'vite-plugin-electron/simple'
-//
-// export function configElectronPlugin(_viteEnv: ViteEnv, isBuild: boolean) {
-//   return electron({
-//     main: {
-//       // 主进程入口
-//       entry: 'electron/main.ts',
-//       vite: {
-//         build: {
-//           sourcemap: !isBuild,
-//           outDir: 'dist/electron',
-//         },
-//       },
-//       onstart: ({startup}) => {
-//         // 开发热重载
-//         startup()
-//       },
-//     },
-//     preload: {
-//       input: 'electron/preload/index.ts',
-//       vite: {
-//         build: {
-//           sourcemap: !isBuild,
-//           outDir: 'dist/electron/preload',
-//         },
-//       },
-//       onstart: ({startup}) => {
-//         // 开发热重载
-//         startup()
-//       },
-//     }
-//   })
-//
-// }

+ 1 - 11
build/vite/plugin/index.ts

@@ -16,8 +16,6 @@ import { configVisualizerConfig } from './visualizer';
 import { configThemePlugin } from './theme';
 import { configSvgIconsPlugin } from './svgSprite';
 import { configPwaPlugin } from './pwa';
-// // electron plugin
-// import { configElectronPlugin } from "./electron";
 // //预编译加载插件(不支持vite3作废)
 // import OptimizationPersist from 'vite-plugin-optimize-persist';
 // import PkgConfig from 'vite-plugin-package-config';
@@ -63,21 +61,13 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
   // vite-plugin-theme
   vitePlugins.push(configThemePlugin(isBuild));
 
-  // // electron plugin
-  const isElectron = viteEnv.VITE_GLOB_RUN_PLATFORM === 'electron';
-  // if (isElectron) {
-  //   vitePlugins.push(configElectronPlugin(viteEnv, isBuild))
-  // }
-
   // The following plugins only work in the production environment
   if (isBuild) {
     // rollup-plugin-gzip
     vitePlugins.push(configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE));
 
     // vite-plugin-pwa (PWA 插件注册)
-    if (!isElectron) {
-      vitePlugins.push(configPwaPlugin(isBuild));
-    }
+    vitePlugins.push(configPwaPlugin(isBuild));
   }
 
   // //vite-plugin-theme【预编译加载插件,解决vite首次打开界面加载慢问题】

+ 0 - 24
electron-builder.yaml

@@ -1,24 +0,0 @@
-appId: 'com.jeecg.boot3'
-# 产品名称
-productName: 'jeecgboot'
-files:
-  # 仅包含 dist 目录下所有文件
-  - 'dist/**/*'
-  # 特别排除 node_modules 目录
-  - '!node_modules'
-directories:
-  # 输出目录
-  output: 'dist-electron'
-win:
-  # win exe 程序图标
-  icon: 'electron/icons/app.ico'
-  artifactName: 'jeecgboot-setup-${version}.exe'
-# 安装包配置
-nsis:
-  oneClick: false
-  # 是否允许用户选择安装目录
-  allowToChangeInstallationDirectory: true
-  # 是否创建桌面快捷方式
-  createDesktopShortcut: true
-  # 安装程序的图标
-  installerIcon: 'electron/icons/installer.ico'

+ 0 - 29
electron.md

@@ -1,29 +0,0 @@
-# Electron桌面应用打包
-
-- 1.安装依赖很慢,得10分钟左右
-- 2.electron桌面应用打包文档 https://help.jeecg.com/ui/setup/electron-build
-- 3.临时注释掉electron功能注释代码:build/vite/plugin/electron.ts修改build/vite/plugin/index.ts,搜索`electron plugin`注释相关逻辑代码修改package.json删除相关依赖
-
-```yaml
-{
-  'main': 'dist/electron/main.js',
-  'scripts':
-    {
-      'electron:dev': 'cross-env VITE_GLOB_RUN_PLATFORM=electron npm run dev',
-      'electron:build-all': 'npm run electron:build-web && npm run electron:build-app',
-      'electron:build-web': 'cross-env VITE_GLOB_RUN_PLATFORM=electron NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 vite build --mode prod_electron && cross-env VITE_GLOB_RUN_PLATFORM=electron esno ./build/script/postBuild.ts',
-      'electron:build-app': 'esno ./electron/script/buildBefore.ts && electron-builder && esno ./electron/script/buildAfter.ts',
-      'electron:install': 'cross-env ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ node node_modules/electron/install.js',
-    },
-  'devDependencies': { 'electron': '35.1.4', 'electron-builder': '^26.0.12', 'vite-plugin-electron': '^0.29.0' },
-}
-```
-
-> 提示:在执行`pnpm install`后如果Electron安装失败,可以尝试运行`npm run electron:install`进行安装
-
-# Electron桌面通知示例和代码位置
-
-1. 代码位置:electron/utils/tray.ts
-2. 发送系统通知调用:sendDesktopNotice
-3. 开始托盘图标闪动调用:startBlink
-4. 停止托盘图标闪动调用:stopBlink

+ 0 - 18
electron/env.ts

@@ -1,18 +0,0 @@
-// 不能直接使用 process.env,会报错
-export const $ps = process;
-
-export const isDev = !!$ps.env.VITE_DEV_SERVER_URL;
-
-export const $env = getEnv();
-
-function getEnv() {
-  if (isDev) {
-    return $ps.env;
-  }
-  // 非开发环境,从 JSON 文件中获取环境变量
-  const env = require('./env.json');
-  return {
-    ...$ps.env,
-    ...env,
-  };
-}

BIN
electron/icons/app.ico


BIN
electron/icons/installer.ico


BIN
electron/icons/mac/dock.png


BIN
electron/icons/mac/tray-icon.png


BIN
electron/icons/mac/tray-icon@2x.png


+ 0 - 43
electron/ipc/index.ts

@@ -1,43 +0,0 @@
-import { Tray, ipcMain, BrowserWindow, app, Notification } from 'electron';
-import type { NotificationConstructorOptions, IpcMainInvokeEvent } from 'electron';
-import { openInBrowser } from '../utils';
-import { omit } from 'lodash-es';
-
-ipcMain.on('open-in-browser', (event: IpcMainInvokeEvent, url: string) => openInBrowser(url));
-// 处理任务栏闪烁
-ipcMain.on('notify-flash', (event: IpcMainInvokeEvent, count: number = 0) => {
-  const win = BrowserWindow.getAllWindows()[0];
-  if (!win) return;
-  if (win.isFocused()) return;
-  if (process.platform === 'win32') {
-    // windows
-    win.flashFrame(true);
-  } else if (process.platform === 'darwin') {
-    // Mac
-    if (app.dock) {
-      app.dock.bounce('informational');
-      // 设置角标(未读消息)
-      if (count > 0) {
-        app.dock.setBadge(count.toString());
-      } else {
-        app.dock.setBadge('');
-      }
-    }
-  }
-});
-// 通知 (点击通知打开指定页面)
-ipcMain.on('notify-with-path', (event: IpcMainInvokeEvent, options: NotificationConstructorOptions & { path: string }) => {
-  const win = BrowserWindow.getAllWindows()[0];
-  if (!win) return;
-  if (win.isFocused()) return;
-  const notification = new Notification({
-    ...omit(options, 'path'),
-  });
-  notification.on('click', () => {
-    if (win.isMinimized()) win.restore();
-    win.show();
-    win.focus();
-    // win.webContents.send('navigate-to', options.path);
-  });
-  notification.show();
-});

+ 0 - 62
electron/main.ts

@@ -1,62 +0,0 @@
-import { app, BrowserWindow, Menu } from 'electron';
-import { isDev } from './env';
-import { createMainWindow, createIndexWindow } from './utils/window';
-import { getAppInfo } from './utils';
-import './ipc';
-
-// 隐藏所有菜单
-Menu.setApplicationMenu(null);
-
-let mainWindow: BrowserWindow | null = null;
-
-function main() {
-  mainWindow = createMainWindow();
-  // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
-  mainWindow.on('focus', () => {
-    // 清除任务栏闪烁
-    if (process.platform === 'win32') {
-      mainWindow!.flashFrame(false);
-    }
-  });
-  return mainWindow;
-}
-
-// 非开发环境,只允许一个实例运行
-if (!isDev) {
-  // 是否取得了单一实例锁
-  const gotTheLock = app.requestSingleInstanceLock();
-
-  if (gotTheLock) {
-    app.on('second-instance', () => {
-      // 开启一个新的窗口
-      createIndexWindow();
-    });
-  } else {
-    // 没有取得单一实例锁,则退出应用
-    app.exit(0);
-  }
-}
-
-// 生命周期管理
-app.whenReady().then(() => {
-  // 获取应用信息
-  const $appInfo = getAppInfo();
-  if ($appInfo?.productName && $appInfo?.appId) {
-    app.setName($appInfo.productName);
-    app.setAppUserModelId($appInfo.appId);
-  }
-
-  main();
-
-  app.on('activate', () => {
-    if (BrowserWindow.getAllWindows().length === 0) {
-      main();
-    }
-  });
-});
-
-app.on('window-all-closed', () => {
-  if (process.platform !== 'darwin') {
-    app.quit();
-  }
-});

+ 0 - 18
electron/paths.ts

@@ -1,18 +0,0 @@
-import path from 'path'
-import {isDev} from "./env";
-
-export const _PATHS = getPaths()
-
-function getPaths() {
-  const _root = __dirname;
-  const publicRoot = path.join(_root, isDev ? '../../public' : '..');
-  const preloadRoot = path.join(_root, 'preload')
-
-  return {
-    electronRoot: _root,
-    publicRoot,
-    preloadRoot,
-
-    appIcon: path.join(_root, `icons/app.ico`).replace(/[\\/]dist[\\/]/, '/'),
-  }
-}

+ 0 - 20
electron/preload/index.ts

@@ -1,20 +0,0 @@
-import { contextBridge, ipcRenderer } from 'electron';
-import { ElectronEnum } from '../../src/enums/jeecgEnum';
-
-contextBridge.exposeInMainWorld(ElectronEnum.ELECTRON_API, {
-  openInBrowser: (url: string) => ipcRenderer.send('open-in-browser', url),
-  // 发送消息通知
-  sendNotification: (title: string, body: string, path: string) => {
-    ipcRenderer.send('notify-with-path', { title, body, path });
-  },
-  // 绑定路由跳转
-  onNavigate: (cb: (path: string) => void) => {
-    ipcRenderer.on('navigate-to', (_, path) => cb(path));
-  },
-  // 任务栏闪
-  sendNotifyFlash: () => ipcRenderer.send('notify-flash'),
-  // 托盘闪动
-  trayFlash: () => ipcRenderer.send('tray-flash'),
-  // 托盘停止闪动
-  trayFlashStop: () => ipcRenderer.send('tray-flash-stop'),
-});

+ 0 - 1
electron/script/buildAfter.ts

@@ -1 +0,0 @@
-console.log('build elctron is done.');

+ 0 - 27
electron/script/buildBefore.ts

@@ -1,27 +0,0 @@
-import path from 'path';
-import fs from 'fs';
-
-const root = path.join(__dirname, '../../');
-const electronDistRoot = path.join(root, 'dist/electron');
-
-let yamlName = 'electron-builder.yaml';
-const sourcePath = fs.readFileSync(path.join(root, yamlName), 'utf-8');
-
-try {
-  // 通过正则表达式匹配 appId 和 productName
-  const appIdMatch = sourcePath.match(/appId:\s*['"]([^'"]+)['"]/);
-  const productNameMatch = sourcePath.match(/productName:\s*['"]([^'"]+)['"]/);
-  if (appIdMatch && productNameMatch) {
-    const fileContent = `${appIdMatch[0]}\n${productNameMatch[0]}`;
-    yamlName = 'env.yaml';
-    const targetPath = path.join(electronDistRoot, yamlName);
-    fs.writeFileSync(targetPath, fileContent, 'utf-8');
-    console.log(`✨ write dist ${yamlName} successfully.`);
-  } else {
-    throw new Error('appId or productName not found');
-  }
-} catch (e) {
-  console.error(e);
-  console.error(`请检查 ${yamlName} 是否存在,或者内容是否正确`);
-  process.exit(1);
-}

+ 0 - 31
electron/utils/index.ts

@@ -1,31 +0,0 @@
-import fs from 'fs';
-import path from 'path'
-import {shell, dialog} from 'electron'
-import {_PATHS} from "../paths";
-import {isDev} from "../env";
-
-// 通过浏览器打开链接
-export function openInBrowser(url: string) {
-  return shell.openExternal(url);
-}
-
-
-export function getAppInfo(): any {
-  try {
-    const yamlPath = isDev ? path.join(_PATHS.publicRoot, '../electron-builder.yaml') : path.join(_PATHS.electronRoot, 'env.yaml');
-    const yamlContent = fs.readFileSync(yamlPath, 'utf-8');
-    // 通过正则表达式匹配 appId 和 productName
-    const appIdMatch = yamlContent.match(/appId:\s*['"]([^'"]+)['"]/);
-    const productNameMatch = yamlContent.match(/productName:\s*['"]([^'"]+)['"]/);
-    const appId = appIdMatch ? appIdMatch[1] : '';
-    const productName = productNameMatch ? productNameMatch[1] : '';
-    return {appId, productName}
-  } catch (e) {
-    dialog.showMessageBoxSync(null, {
-      type: 'error',
-      title: '错误',
-      message: '应用启动失败,请从官网下载最新版本安装包后重新安装!',
-    });
-    process.exit(-1);
-  }
-}

+ 0 - 200
electron/utils/tray.ts

@@ -1,200 +0,0 @@
-// tray = 系统托盘
-import path from 'path';
-import { Tray, Menu, app, dialog, nativeImage, BrowserWindow, Notification, ipcMain } from 'electron';
-import type { IpcMainInvokeEvent } from 'electron';
-import {_PATHS} from '../paths';
-import {$env, isDev} from '../env';
-
-const TrayIcons = {
-  // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
-  normal: nativeImage.createFromPath(
-    process.platform === 'win32'
-      ? path.join(_PATHS.publicRoot, 'logo.png')
-      : path.join(_PATHS.electronRoot, './icons/mac/tray-icon.png').replace(/[\\/]dist[\\/]/, '/')
-  ),
-  empty: nativeImage.createEmpty(),
-};
-
-// 创建托盘图标
-export function createTray(win: BrowserWindow) {
-  const tray = new Tray(TrayIcons.normal);
-
-  const TrayUtils = useTray(tray, win);
-
-  tray.setToolTip($env.VITE_GLOB_APP_TITLE! + (isDev ? ' (开发环境)' : ''));
-
-  // 左键托盘图标显示主窗口
-  tray.on('click', () => TrayUtils.showMainWindow());
-  // 右键托盘图标显示托盘菜单
-  tray.on('right-click', () => showTrayContextMenu());
-
-  function showTrayContextMenu() {
-    const trayContextMenu = getTrayMenus(win, TrayUtils);
-    // 弹出托盘菜单,不使用 setContextMenu 方法是因为要实时更新菜单内容
-    tray.popUpContextMenu(trayContextMenu);
-  }
-}
-
-export function useTray(tray: Tray, win: BrowserWindow) {
-  let isBlinking = false;
-  let blinkTimer: NodeJS.Timeout | null = null;
-
-  function showMainWindow() {
-    win.show();
-  }
-
-  // 开始闪动
-  function startBlink() {
-    isBlinking = true;
-    tray.setImage(TrayIcons.empty);
-    blinkTimer = setTimeout(() => {
-      tray.setImage(TrayIcons.normal);
-      setTimeout(() => {
-        if (isBlinking) {
-          startBlink();
-        }
-      }, 500);
-    }, 500);
-  }
-
-  // 结束闪动
-  function stopBlink() {
-    isBlinking = false;
-    if (blinkTimer) {
-      clearTimeout(blinkTimer);
-      blinkTimer = null;
-    }
-    tray.setImage(TrayIcons.normal);
-  }
-  ipcMain.on('tray-flash', (event: IpcMainInvokeEvent) => {
-    // 仅在 Windows 系统中闪烁
-    if (process.platform === 'win32') {
-      startBlink();
-    }
-  });
-  ipcMain.on('tray-flash-stop', (event: IpcMainInvokeEvent) => {
-    // 仅在 Windows 系统中停止闪烁
-    if (process.platform === 'win32') {
-      stopBlink();
-    }
-  });
-  win.on('focus', () => {
-    stopBlink();
-  });
-  // 发送桌面通知
-  function sendDesktopNotice() {
-    // 判断是否支持桌面通知
-    if (!Notification.isSupported()) {
-      // todo 实际开发中不需要提示,直接返回或者换一种提示方式
-      dialog.showMessageBoxSync(win, {
-        type: 'error',
-        title: '错误',
-        message: '当前系统不支持桌面通知',
-      });
-      return;
-    }
-    const ins = new Notification({
-      title: '通知标题',
-      body: '通知内容第一行\n通知内容第二行',
-      // icon: TrayIcons.normal.resize({width: 32, height: 32}),
-    });
-
-    ins.on('click', () => {
-      dialog.showMessageBoxSync(win, {
-        type: 'info',
-        title: '提示',
-        message: '通知被点击',
-      });
-    });
-
-    ins.show();
-  }
-
-  return {
-    showMainWindow,
-
-    startBlink,
-    stopBlink,
-    isBlinking: () => isBlinking,
-
-    sendDesktopNotice,
-  };
-}
-
-const MenuIcon = {
-  exit: nativeImage
-    .createFromDataURL(
-      'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACJ0lEQVR4nH1TzWvUQBRP7fpxsWqVXsSLiAevRWhhN28msRJo981kay4WRBCF/QdEFJpbaUHw4kFBQTwUKX4gKh48KPiBBcGLJ1F0uzPZ7ibWXf0DIjObielS+mDIm/fxm9/85sWyBixN06E0CIaV3wB2XhC8puOWNZSG4Y7B+k2mi7Kl9l2n9rHnzvbWJoLRYn7r5jTViQjwzM8ynlC+AFyVgN2NU8G+Rnn6QETx3FfP223A/jeHfWqCsAUJ7Hlryh9Te0nYqiDsz9rE6VHVIABvNwEf/ADYk4OsZPeVFbwiCHtcZBVR9k4CJhJmDuUxwEVJ8H4fINOkC9Vjbeq/UTR1IgPturX3f93Z35+B7ddxgJL6dih/skF9zE9KCJ//5bDLpii1+npIuzolKTubC5gBxzarJo6vWWjrUP+etFlF+ds9lRFOXalN+NPEmxvRDS3KH34v8+PFIgNmTh0EahH+InGCwzoQEbYcuTMnlR8aYbaxGHFvRNiznssP6sA65UsxrdU1+hYnFhlpAGAkdvzlPLFu88mY8pcrVjCsxcqGapC2eYW249/tUH4xS4QaVQLeigi/YWJqPl4DlNRSrAwzSaoXIspeWUYrI9qXINglgT1qAt5JPG+kkNN5BSAJuyoJfhAVdmST4PlPBFASNs6rIgnspqC8HlF+SQAuRQTfKpYiEy6fwuIdP42P71T+t0l/TBKcE8AXm4DXBfB6w50+apgUhf4HZ5j+Z5+zNTAAAAAASUVORK5CYII='
-    )
-    .resize({
-      width: 16,
-      height: 16,
-    }),
-};
-
-// 设置托盘菜单
-function getTrayMenus(win: BrowserWindow, TrayUtils: ReturnType<typeof useTray>) {
-  const {startBlink, stopBlink, sendDesktopNotice} = TrayUtils;
-  const isBlinking = TrayUtils.isBlinking();
-
-  return Menu.buildFromTemplate([
-    ...(isDev
-      ? [
-        {
-          label: '开发工具',
-          submenu: [
-            {
-              label: '以下菜单仅显示在开发环境',
-              sublabel: '当前为开发环境',
-              enabled: false,
-            },
-            {type: 'separator'},
-            {
-              label: '切换 DevTools',
-              click: () => win.webContents.toggleDevTools(),
-            },
-            {
-              label: `托盘图标${isBlinking ? '停止' : '开始'}闪烁`,
-              sublabel: '模拟新消息提醒',
-              click: () => (isBlinking ? stopBlink() : startBlink()),
-            },
-            {
-              label: '发送桌面通知示例',
-              click: () => sendDesktopNotice(),
-            },
-          ],
-        },
-        {type: 'separator'},
-      ]
-      : ([] as any)),
-    {
-      label: '显示主窗口',
-      // 文件图标
-      icon: TrayIcons.normal.resize({width: 16, height: 16}),
-      click: () => win.show(),
-    },
-    {type: 'separator'},
-    {
-      label: '退出',
-      // base64图标
-      icon: MenuIcon.exit,
-      click: () => {
-        // 弹出是否确认退出提示框
-        const choice = dialog.showMessageBoxSync(win, {
-          type: 'question',
-          title: '提示',
-          message: '确定要退出应用吗?',
-          buttons: ['退出', '取消'],
-          defaultId: 1,
-          cancelId: 1,
-          noLink: true,
-        });
-        // 用户选择了退出,直接 exit
-        if (choice === 0) {
-          // global.isQuitting = true;
-          app.exit(0);
-        }
-      },
-    },
-  ]);
-}

+ 0 - 100
electron/utils/window.ts

@@ -1,100 +0,0 @@
-import type {BrowserWindowConstructorOptions} from 'electron';
-import {app, BrowserWindow, dialog} from 'electron';
-import path from 'path';
-import {_PATHS} from '../paths';
-import {$env, isDev} from '../env';
-import {createTray} from './tray';
-
-// 获取公共窗口选项
-export function getBrowserWindowOptions(options?: BrowserWindowConstructorOptions): BrowserWindowConstructorOptions {
-  return {
-    width: 1200,
-    height: 800,
-    webPreferences: {
-      preload: path.join(_PATHS.preloadRoot, 'index.js'),
-      nodeIntegration: false,
-      contextIsolation: true,
-    },
-    // 应用图标
-    icon: isDev ? _PATHS.appIcon : void 0,
-    ...options,
-  }
-}
-
-// 创建窗口
-export function createBrowserWindow(options?: BrowserWindowConstructorOptions) {
-  const win = new BrowserWindow(getBrowserWindowOptions(options));
-  // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
-  if (process.platform === 'darwin') { // 仅 macOS 生效
-    if (app.dock) {
-      app.dock.setIcon(path.join(_PATHS.electronRoot, './icons/mac/dock.png').replace(/[\\/]dist[\\/]/, '/'));
-    }
-  }
-
-  // 设置窗口打开处理器
-  win.webContents.setWindowOpenHandler(() => {
-    return {
-      action: 'allow',
-      // 覆写新窗口的选项,用于调整默认尺寸和加载preload脚本等
-      overrideBrowserWindowOptions: getBrowserWindowOptions(),
-    }
-  });
-
-  // 当 beforeunload 阻止窗口关闭时触发
-  win.webContents.on('will-prevent-unload', () => {
-    const choice = dialog.showMessageBoxSync(win, {
-      type: 'question',
-      title: '确认关闭吗?',
-      message: '系统可能不会保存您所做的更改。',
-      buttons: ['关闭', '取消'],
-      defaultId: 1,
-      cancelId: 1,
-      noLink: true,
-    });
-    // 用户选择了关闭,直接销毁窗口
-    if (choice === 0) {
-      win.destroy();
-    }
-  });
-
-  return win;
-}
-
-// 创建主窗口、系统托盘
-export function createMainWindow() {
-  const win = createIndexWindow()
-
-  // 设置系统托盘图标
-  createTray(win);
-
-  // 主窗口尝试关闭时,默认不直接退出应用,而是隐藏到托盘
-  win.on('close', (event) => {
-    event.preventDefault();
-    win.hide();
-  });
-
-  return win;
-}
-
-// 创建索引窗口
-export function createIndexWindow() {
-  const win = createBrowserWindow({
-    width: 1600,
-    height: 1000,
-    title: $env.VITE_GLOB_APP_TITLE!,
-  });
-
-  // 开发环境加载Vite服务,生产加载打包文件
-  if (isDev) {
-    let serverUrl = $env.VITE_DEV_SERVER_URL! as string;
-    // 【JHHB-936】由于wps预览不能使用localhost访问,所以把localhost替换为127.0.0.1
-    serverUrl = serverUrl.replace('localhost', '127.0.0.1');
-    win.loadURL(serverUrl)
-    // 开发环境下,自动打开调试工具
-    // win.webContents.openDevTools()
-  } else {
-    win.loadFile(path.join(_PATHS.publicRoot, 'index.html'));
-  }
-
-  return win;
-}

+ 12 - 12
pnpm-lock.yaml

@@ -4298,14 +4298,14 @@ packages:
       - vue
     dev: false
 
-  /@vxe-ui/core@4.2.15(vue@3.5.25):
-    resolution: {integrity: sha512-kpregErCgRpz3joGeVOrnOADHOOG/454kGXVy/JqBb4w7ENzCk1OmqDCrvCjaugP09FE0exaTiSdfcv3/+kRQg==}
+  /@vxe-ui/core@4.2.16(vue@3.5.25):
+    resolution: {integrity: sha512-clfS0UcW15I+vWDVv7+D7ifYb1UgG1As3lUPPyROSN01bDiAzbDEoyOg4bLlvjhySN+m4qbSb+SEV6gosbo9yA==}
     peerDependencies:
       vue: ^3.2.0
     dependencies:
       dom-zindex: 1.0.6
       vue: 3.5.25(typescript@5.9.3)
-      xe-utils: 3.7.9
+      xe-utils: 3.8.0
     dev: false
 
   /@zxcvbn-ts/core@3.0.4:
@@ -4764,8 +4764,8 @@ packages:
       pascalcase: 0.1.1
     dev: true
 
-  /baseline-browser-mapping@2.9.2:
-    resolution: {integrity: sha512-PxSsosKQjI38iXkmb3d0Y32efqyA0uW4s41u4IVBsLlWLhCiYNpH/AfNOVWRqCQBlD8TFJTz6OUWNd4DFJCnmw==}
+  /baseline-browser-mapping@2.9.4:
+    resolution: {integrity: sha512-ZCQ9GEWl73BVm8bu5Fts8nt7MHdbt5vY9bP6WGnUh+r3l8M7CgfyTlwsgCbMC66BNxPr6Xoce3j66Ms5YUQTNA==}
     hasBin: true
     dev: true
 
@@ -4848,7 +4848,7 @@ packages:
     engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
     hasBin: true
     dependencies:
-      baseline-browser-mapping: 2.9.2
+      baseline-browser-mapping: 2.9.4
       caniuse-lite: 1.0.30001759
       electron-to-chromium: 1.5.266
       node-releases: 2.0.27
@@ -4906,7 +4906,7 @@ packages:
       '@cacheable/utils': 2.3.2
       hookified: 1.13.0
       keyv: 5.5.5
-      qified: 0.5.2
+      qified: 0.5.3
     dev: true
 
   /cachedir@2.3.0:
@@ -10470,8 +10470,8 @@ packages:
     resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==}
     dev: true
 
-  /qified@0.5.2:
-    resolution: {integrity: sha512-7gJ6mxcQb9vUBOtbKm5mDevbe2uRcOEVp1g4gb/Q+oLntB3HY8eBhOYRxFI2mlDFlY1e4DOSCptzxarXRvzxCA==}
+  /qified@0.5.3:
+    resolution: {integrity: sha512-kXuQdQTB6oN3KhI6V4acnBSZx8D2I4xzZvn9+wFLLFCoBNQY/sFnCW6c43OL7pOQ2HvGV4lnWIXNmgfp7cTWhQ==}
     engines: {node: '>=20'}
     dependencies:
       hookified: 1.13.0
@@ -12735,7 +12735,7 @@ packages:
   /vxe-pc-ui@4.6.12(vue@3.5.25):
     resolution: {integrity: sha512-57sRB/ksP8ip4l0hPcph5qXt/qGlrCjO2/Y6ZL4sHkGdb+CBWgbzvUPcq3GYgSSPdZg+Ae++UcGqgRGMZss+RQ==}
     dependencies:
-      '@vxe-ui/core': 4.2.15(vue@3.5.25)
+      '@vxe-ui/core': 4.2.16(vue@3.5.25)
     transitivePeerDependencies:
       - vue
     dev: false
@@ -13090,8 +13090,8 @@ packages:
     resolution: {integrity: sha512-u9R7RqWDumamToEelrCv2nVA2PBJSPPUubvmiMcuHeFxwbYeBsouoi/opejmr7AdPlSj92FifF7IKFzFrczU7w==}
     dev: false
 
-  /xe-utils@3.7.9:
-    resolution: {integrity: sha512-LWH6M7g+TKX8P2fqGxDPgJQygiULhbMtpmfxTMxJTUjuUv9y2+I45UCcVLh5AnmJSxDV1xTxsq7G5P9Eid06JQ==}
+  /xe-utils@3.8.0:
+    resolution: {integrity: sha512-eziNd3IyxzUBAZByQhNuxcd9UUKN2yqR0w2zjPMtXWzzM3GFg6ztjRH76aSfxIZCco1o53TX3uJ7EY3jNpVo/A==}
     dev: false
 
   /xml-name-validator@4.0.0:

+ 2 - 2
src/api/common/api.ts

@@ -142,8 +142,8 @@ export const downloadFile = (url, fileName?, parameter?) => {
     if (typeof window.navigator.msSaveBlob !== 'undefined') {
       window.navigator.msSaveBlob(new Blob([data]), fileName);
     } else {
-      let url = window.URL.createObjectURL(new Blob([data]));
-      let link = document.createElement('a');
+      const url = window.URL.createObjectURL(new Blob([data]));
+      const link = document.createElement('a');
       link.style.display = 'none';
       link.href = url;
       link.setAttribute('download', fileName);

+ 2 - 2
src/api/model/baseModel.ts

@@ -3,12 +3,12 @@ export interface BasicPageParams {
   pageSize: number;
 }
 
-export interface BasicFetchResult<T extends any> {
+export interface BasicFetchResult<T = any> {
   items: T[];
   total: number;
 }
 
-export interface BasicResult<T extends any> {
+export interface BasicResult<T = any> {
   records: T[];
   total: number;
 }

+ 4 - 4
src/api/sys/user.ts

@@ -106,7 +106,7 @@ export function doLogout() {
 }
 
 export function getCodeInfo(currdatetime) {
-  let url = Api.getInputCode + `/${currdatetime}`;
+  const url = Api.getInputCode + `/${currdatetime}`;
   return defHttp.get({ url: url });
 }
 /**
@@ -195,7 +195,7 @@ export function setThirdCaptcha(params) {
  * 获取登录二维码信息
  */
 export function getLoginQrcode() {
-  let url = Api.getLoginQrcode;
+  const url = Api.getLoginQrcode;
   return defHttp.get({ url: url });
 }
 
@@ -203,7 +203,7 @@ export function getLoginQrcode() {
  * 监控扫码状态
  */
 export function getQrcodeToken(params) {
-  let url = Api.getQrcodeToken;
+  const url = Api.getQrcodeToken;
   return defHttp.get({ url: url, params });
 }
 
@@ -211,6 +211,6 @@ export function getQrcodeToken(params) {
  * SSO登录校验
  */
 export async function validateCasLogin(params) {
-  let url = Api.validateCasLogin;
+  const url = Api.validateCasLogin;
   return defHttp.get({ url: url, params });
 }

+ 1 - 1
src/components/Form/src/hooks/useAdvanced.ts

@@ -73,7 +73,7 @@ export default function ({ advanceState, emit, getProps, getSchema, formModel, d
       itemColSum += xxlWidth;
     }
 
-    let autoAdvancedCol = unref(getProps).autoAdvancedCol ?? 3;
+    const autoAdvancedCol = unref(getProps).autoAdvancedCol ?? 3;
 
     if (isLastAction) {
       advanceState.hideAdvanceBtn = unref(getSchema).length <= autoAdvancedCol;

+ 7 - 7
src/components/Form/src/hooks/useForm.ts

@@ -5,7 +5,7 @@ import { handleRangeValue } from '../utils/formUtils';
 import { ref, onUnmounted, unref, nextTick, watch } from 'vue';
 import { isProdMode } from '/@/utils/env';
 import { error } from '/@/utils/log';
-import { getDynamicProps, getValueType, getValueTypeBySchema } from '/@/utils';
+import { getDynamicProps, getValueTypeBySchema } from '/@/utils';
 
 export declare type ValidateFields = (nameList?: NamePath[], options?: ValidateOptions) => Promise<Recordable>;
 
@@ -85,12 +85,12 @@ export function useForm(props?: Props): UseFormReturnType {
     // TODO promisify
     getFieldsValue: <T>() => {
       // 代码逻辑说明: VUEN-1341【流程】编码方式 流程节点编辑表单时,填写数据报错 包括用户组件、部门组件、省市区
-      let values = unref(formRef)?.getFieldsValue() as T;
+      const values = unref(formRef)?.getFieldsValue() as T;
       if (values) {
         Object.keys(values).map((key) => {
           if (values[key] instanceof Array) {
             // 代码逻辑说明: 【issues/4330】判断如果是对象数组,则不拼接
-            let isObject = typeof (values[key][0] || '') === 'object';
+            const isObject = typeof (values[key][0] || '') === 'object';
             if (!isObject) {
               values[key] = values[key].join(',');
             }
@@ -123,11 +123,11 @@ export function useForm(props?: Props): UseFormReturnType {
      */
     validate: async (nameList?: NamePath[]): Promise<Recordable> => {
       const form = await getForm();
-      let getProps = props || form.getProps;
-      let values = form.validate(nameList).then((values) => {
-        for (let key in values) {
+      const getProps = props || form.getProps;
+      const values = form.validate(nameList).then((values) => {
+        for (const key in values) {
           if (values[key] instanceof Array) {
-            let valueType = getValueTypeBySchema(form.getSchemaByField(key)!, form);
+            const valueType = getValueTypeBySchema(form.getSchemaByField(key)!, form);
             if (valueType === 'string') {
               values[key] = values[key].join(',');
             }

+ 2 - 2
src/components/Form/src/hooks/useFormEvents.ts

@@ -257,9 +257,9 @@ export function useFormEvents({
     try {
       const values = await validate();
       //代码逻辑说明: 对查询表单提交的数组处理成字符串------
-      for (let key in values) {
+      for (const key in values) {
         if (values[key] instanceof Array) {
-          let valueType = getValueType(getProps, key);
+          const valueType = getValueType(getProps, key);
           if (valueType === 'string') {
             values[key] = values[key].join(',');
           }

+ 2 - 2
src/components/Form/src/jeecg/components/JEasyCron/tabs/useTabMixin.ts

@@ -45,7 +45,7 @@ export function useTabSetup(props, context, options) {
 
   // 根据不同的类型计算出的value
   const computeValue = computed(() => {
-    let valueArray: any[] = [];
+    const valueArray: any[] = [];
     switch (type.value) {
       case TypeEnum.unset:
         valueArray.push('?');
@@ -79,7 +79,7 @@ export function useTabSetup(props, context, options) {
   });
   // 指定值范围区间,介于最小值和最大值之间
   const specifyRange = computed(() => {
-    let range: number[] = [];
+    const range: number[] = [];
     if (maxValue.value != null) {
       for (let i = minValue.value; i <= maxValue.value; i++) {
         range.push(i);

+ 7 - 7
src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useLinkTable.ts

@@ -210,22 +210,22 @@ export function useLinkTable(props) {
     if (!value) {
       return [];
     }
-    let valueFieldName = props.valueField;
-    let params = {
+    const valueFieldName = props.valueField;
+    const params = {
       ...baseParam.value,
       pageSize: 100,
       pageNo: pageNo.value,
     };
     params['superQueryMatchType'] = 'and';
-    let valueCondition = [{ field: valueFieldName, rule: 'in', val: value }];
+    const valueCondition = [{ field: valueFieldName, rule: 'in', val: value }];
     params['superQueryParams'] = encodeURI(JSON.stringify(valueCondition));
     const data = await queryTableData(props.tableName, params);
-    let records = data.records;
+    const records = data.records;
     //tableTitle.value = data.head.tableTxt;
-    let dataList: any[] = [];
+    const dataList: any[] = [];
     if (records && records.length > 0) {
-      for (let item of records) {
-        let temp = { ...item };
+      for (const item of records) {
+        const temp = { ...item };
         transData(temp);
         dataList.push(temp);
       }

+ 66 - 63
src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useTableColumns.ts

@@ -18,7 +18,7 @@ import { getWeekMonthQuarterYear, split } from '/@/utils';
  */
 export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | undefined>) {
   // 获取路由器对象 href跳转用到
-  let router = useRouter();
+  const router = useRouter();
 
   // 列信息
   const columns = ref<Array<OnlineColumn>>([]);
@@ -33,9 +33,9 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
   // 选择列配置 --computed有问题
   const rowSelection = ref<any>(null);
   // 是否有滚动条
-  let enableScrollBar = ref(true);
+  const enableScrollBar = ref(true);
   // table属性scroll
-  let tableScroll = computed(() => {
+  const tableScroll = computed(() => {
     if (enableScrollBar.value == true) {
       return undefined;
     } else {
@@ -46,10 +46,10 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
 
   //用于 online列表的 某列的点击弹窗事件-弹窗显示其他表单
   const [registerOnlineHrefModal, { openModal: openOnlineHrefModal }] = useModal();
-  const hrefMainTableId = ref('')
+  const hrefMainTableId = ref('');
   // 用于 online表单中 弹出别的表单
   const [registerPopModal, { openModal: openPopModal }] = useModal();
-  const popTableId = ref('')
+  const popTableId = ref('');
 
   // 对查询列信息的请求结果 处理方法
   function handleColumnResult(result, type = 'checkbox') {
@@ -68,7 +68,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
     // 是否允许滚动条
     enableScrollBar.value = result.scrollFlag == 1;
 
-    let dataColumns = result.columns;
+    const dataColumns = result.columns;
     dataColumns.forEach((column) => {
       // update-begin--author:liaozhiyang---date:20230818---for:【QQYUN-4161】列支持固定功能
       if (column.fieldExtendJson) {
@@ -95,7 +95,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
     });
 
     // href 跳转
-    let fieldHrefSlots: HrefSlots[] = result.fieldHrefSlots;
+    const fieldHrefSlots: HrefSlots[] = result.fieldHrefSlots;
     const fieldHrefSlotKeysMap = {};
     fieldHrefSlots.forEach((item) => (fieldHrefSlotKeysMap[item.slotName] = item));
 
@@ -109,7 +109,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
     // 如果是树列表 需要设置第一列字段 及 第一列align
     if (onlineTableContext.isTree() === true) {
       // 找到第一列的配置
-      let firstField = result.textField;
+      const firstField = result.textField;
       let index = -1;
       for (let i = 0; i < tableColumns.length; i++) {
         if (tableColumns[i].dataIndex == firstField) {
@@ -119,7 +119,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
       }
       if (index > 0) {
         //如果是0或是-1不需要处理
-        let deleteColumns = tableColumns.splice(index, 1);
+        const deleteColumns = tableColumns.splice(index, 1);
         tableColumns.unshift(deleteColumns[0]);
       }
       //第一列居左
@@ -147,7 +147,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
    * 处理列的href和字典翻译
    */
   function handleColumnHrefAndDict(columns: OnlineColumn[], fieldHrefSlotKeysMap: {}): OnlineColumn[] {
-    for (let column of columns) {
+    for (const column of columns) {
       let { customRender, hrefSlotName, fieldType } = column;
       // online 报表中类型配置为日期(yyyy-MM-dd ),但是实际展示为日期时间格式(yyyy-MM-dd HH:mm:ss) issues/3042
       if (fieldType == 'date' || fieldType == 'Date') {
@@ -170,23 +170,23 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
           if (!text) {
             return '';
           }
-          if(onlineTableContext.isPopList===true){
+          if (onlineTableContext.isPopList === true) {
             // 如果是弹窗的列表,关联记录的列只支持数据翻译,不需要跳转逻辑
-            return record[column.dataIndex+"_dictText"]
-          }else{
-            let tempIdArray = (text+'').split(',');
+            return record[column.dataIndex + '_dictText'];
+          } else {
+            const tempIdArray = (text + '').split(',');
             //update-begin-author:taoyan date:2023-2-15 for: QQYUN-4286【online表单】主子表开启联合查询 功能测试报错打不开
             let tempLabelArray = [];
-            if(record[column.dataIndex+"_dictText"]){
-              tempLabelArray = record[column.dataIndex+"_dictText"].split(',');
+            if (record[column.dataIndex + '_dictText']) {
+              tempLabelArray = record[column.dataIndex + '_dictText'].split(',');
             }
             //update-end-author:taoyan date:2023-2-15 for: QQYUN-4286【online表单】主子表开启联合查询 功能测试报错打不开
-            let renderResult:any = []
-            if(renderResult.length==0){
-              return ''
+            const renderResult: any = [];
+            if (renderResult.length == 0) {
+              return '';
             }
             //如果需要显示全,但是会换行:display: flex;width: 100%;flex-wrap: wrap;flex-direction: row;
-            return h('div',{style:{'overflow':'hidden'}}, renderResult);
+            return h('div', { style: { overflow: 'hidden' } }, renderResult);
           }
         };
       } else if (fieldType === 'popup_dict') {
@@ -210,8 +210,8 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
         // 如果 hrefSlotName 有值则代表使用了href跳转
         // 两者可以兼容。兼容的具体思路为:先获取到字典替换的值,再添加href链接跳转
         if (customRender || hrefSlotName) {
-          let dictCode = customRender as string;
-          let replaceFlag = '_replace_text_';
+          const dictCode = customRender as string;
+          const replaceFlag = '_replace_text_';
           // 自定义渲染函数的列 需要手动配置ellipsis
           column.ellipsis = true;
           column.customRender = ({ text, record }) => {
@@ -219,7 +219,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
             // 如果 dictCode 有值,就进行字典转换
             if (dictCode) {
               if (dictCode.startsWith(replaceFlag)) {
-                let textFieldName = dictCode.replace(replaceFlag, '');
+                const textFieldName = dictCode.replace(replaceFlag, '');
                 value = record[textFieldName];
               } else {
                 value = filterMultiDictText(unref(dictOptionInfo)[dictCode], text + '');
@@ -233,7 +233,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
             }
             // 如果 hrefSlotName 有值,就生成一个 a 标签,包裹住字典替换后(或原生)的值
             if (hrefSlotName) {
-              let field = fieldHrefSlotKeysMap[hrefSlotName];
+              const field = fieldHrefSlotKeysMap[hrefSlotName];
               if (field) {
                 return h(
                   'a',
@@ -252,7 +252,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
         if (column.scopedSlots) {
           // slot的列 需要手动配置ellipsis
           column.ellipsis = true;
-          let slots = column.scopedSlots;
+          const slots = column.scopedSlots;
           column['slots'] = slots;
           delete column.scopedSlots;
         }
@@ -268,22 +268,22 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
    */
   function handleClickFieldHref(field, record) {
     let href = field.href;
-    let urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/;
-    let compPattern = /\.vue(\?.*)?$/;
-    let jsPattern = /{{([^}]+)}}/g; // {{ xxx }}
+    const urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/;
+    const compPattern = /\.vue(\?.*)?$/;
+    const jsPattern = /{{([^}]+)}}/g; // {{ xxx }}
     if (typeof href === 'string') {
-      if(href.startsWith('ONLINE:')){
+      if (href.startsWith('ONLINE:')) {
         // ONLINE:tableId:fieldName
-        let arr = href.split(':')
+        const arr = href.split(':');
         hrefMainTableId.value = arr[1];
-        let fieldName = arr[2];
+        const fieldName = arr[2];
         openOnlineHrefModal(true, {
           isUpdate: true,
           disableSubmit: true,
           hideSub: true,
-          record:{id: record[fieldName]},
-        })
-      }else{
+          record: { id: record[fieldName] },
+        });
+      } else {
         href = href.trim().replace(/\${([^}]+)?}/g, (_s1, s2) => record[s2]);
         // 执行 {{...}} JS增强语句
         if (jsPattern.test(href)) {
@@ -291,7 +291,7 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
             try {
               // 支持 {{ ACCESS_TOKEN }} 占位符
               if (s0.trim() === 'ACCESS_TOKEN') {
-                return getToken()
+                return getToken();
               }
 
               // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告
@@ -351,15 +351,15 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
   // 超链点击事件--> 打开一个modal窗口
   function openHrefCompModal(href) {
     // 解析 href 参数
-    let index = href.indexOf('?');
+    const index = href.indexOf('?');
     let path = href;
     if (index !== -1) {
       path = href.substring(0, index);
-      let paramString = href.substring(index + 1, href.length);
-      let paramArray = paramString.split('&');
-      let params = {};
+      const paramString = href.substring(index + 1, href.length);
+      const paramArray = paramString.split('&');
+      const params = {};
       paramArray.forEach((paramObject) => {
-        let paramItem = paramObject.split('=');
+        const paramItem = paramObject.split('=');
         params[paramItem[0]] = paramItem[1];
       });
       hrefComponent.params = params;
@@ -374,9 +374,9 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
   }
 
   //如果是树列表 操作列只能右侧固定
-  let fixedAction:any = 'left';
-  if(onlineTableContext.isTree()){
-    fixedAction = 'right'
+  let fixedAction: any = 'left';
+  if (onlineTableContext.isTree()) {
+    fixedAction = 'right';
   }
   const actionColumn = reactive<OnlineColumn>({
     title: '操作',
@@ -388,22 +388,25 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
   });
 
   // 监听扩展参数的固定列配置,动态改变操作列的固定方式
-  watch(() => extConfigJson?.value, () => {
-    if (extConfigJson?.value?.tableFixedAction === 1) {
-      actionColumn.fixed = extConfigJson?.value?.tableFixedActionType || 'right';
-      // 如果是树列表 操作列只能右侧固定
-      if(onlineTableContext.isTree()){
-        actionColumn.fixed = 'right'
+  watch(
+    () => extConfigJson?.value,
+    () => {
+      if (extConfigJson?.value?.tableFixedAction === 1) {
+        actionColumn.fixed = extConfigJson?.value?.tableFixedActionType || 'right';
+        // 如果是树列表 操作列只能右侧固定
+        if (onlineTableContext.isTree()) {
+          actionColumn.fixed = 'right';
+        }
       }
     }
-  });
+  );
 
   // 流程按钮状态
   function bpmStatusFilter(tableColumns: OnlineColumn[]): boolean {
     let flag = false;
     for (let i = 0; i < tableColumns.length; i++) {
-      let item = tableColumns[i];
-      let fieldName = item.dataIndex;
+      const item = tableColumns[i];
+      const fieldName = item.dataIndex;
       if (fieldName!.toLowerCase() == 'bpm_status') {
         flag = true;
         break;
@@ -496,11 +499,11 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
    */
   function viewOnlineCellImage(text) {
     if (text) {
-      let imgList: any = [];
+      const imgList: any = [];
       // update-begin--author:liaozhiyang---date:20250325---for:【issues/7990】图片参数中包含逗号会错误的识别成多张图
       const arr = split(text);
       // update-end--author:liaozhiyang---date:20250325---for:【issues/7990】图片参数中包含逗号会错误的识别成多张图
-      for (let str of arr) {
+      for (const str of arr) {
         if (str) {
           imgList.push(getFileAccessHttpUrl(str));
         }
@@ -515,31 +518,31 @@ export function useTableColumns(onlineTableContext, extConfigJson: Ref<any | und
    * @param hrefTableName
    */
   const onlinePopModalRef = ref();
-  async function handleClickLinkTable(id, hrefTableName, isListReadOnly){
+  async function handleClickLinkTable(id, hrefTableName, isListReadOnly) {
     popTableId.value = hrefTableName;
-    let formStatus =  await onlinePopModalRef.value.getFormStatus();
+    const formStatus = await onlinePopModalRef.value.getFormStatus();
     // 判断当前表单是否支持编辑,不能编辑跳详情表单
-    if(formStatus==true){
+    if (formStatus == true) {
       hrefMainTableId.value = hrefTableName;
       openOnlineHrefModal(true, {
         isUpdate: true,
         disableSubmit: true,
         hideSub: true,
-        record:{id: id},
-      })
-    }else{
+        record: { id: id },
+      });
+    } else {
       openPopModal(true, {
         isUpdate: true,
         // update-begin--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读
         disableSubmit: isListReadOnly ? true : false,
         // update-end--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读
         record: {
-          id: id
-        }
+          id: id,
+        },
       });
     }
   }
-  
+
   return {
     columns,
     actionColumn,

+ 1 - 1
src/components/Form/src/jeecg/hooks/useCodeHinting.ts

@@ -75,7 +75,7 @@ export const useCodeHinting = (CodeMirror, keywords, language) => {
             .filter((item) => {
               const { text } = item;
               const index = findIdx(text, str);
-              let result = text.startsWith('.') ? index === 1 : index === 0;
+              const result = text.startsWith('.') ? index === 1 : index === 0;
               return result;
             })
             .sort((a, b) => {

+ 7 - 7
src/components/Form/src/jeecg/hooks/useSelectBiz.ts

@@ -29,7 +29,7 @@ export function useSelectBiz(getList, props, emit?) {
       //if (selectValues['change'] == false && !isEmpty(selectValues['value'])) {
       if (selectValues['change'] == false && !isEmpty(selectValues['value'])) {
         // 代码逻辑说明: 【issues/7405】部门选择用户同时全部选择两页用户,回显到父页面。第二页用户显示的不是真是姓名
-        let params = { isMultiTranslate: 'true', pageSize: selectValues.value?.length };
+        const params = { isMultiTranslate: 'true', pageSize: selectValues.value?.length };
         params[props.rowKey] = selectValues['value'].join(',');
         loadingEcho.value = isFirstLoadEcho;
         isFirstLoadEcho = false;
@@ -50,7 +50,7 @@ export function useSelectBiz(getList, props, emit?) {
     checkedKeys.value = selectedRowKeys;
     //判断全选的问题checkedKeys和selectRows必须一致
     if (props.showSelected && unref(checkedKeys).length !== unref(selectRow).length) {
-      let { records } = await getList({
+      const { records } = await getList({
         code: unref(checkedKeys).join(','),
         pageSize: unref(checkedKeys).length,
       });
@@ -87,10 +87,10 @@ export function useSelectBiz(getList, props, emit?) {
    * @param flag 是否是默认回显模式加载
    */
   async function getDataSource(params, flag) {
-    let { records } = await getList(params);
+    const { records } = await getList(params);
     dataSource.value = records;
     if (flag) {
-      let options = <any[]>[];
+      const options = <any[]>[];
       records.forEach((item) => {
         options.push({ label: item[props.labelKey], value: item[props.rowKey] });
       });
@@ -98,7 +98,7 @@ export function useSelectBiz(getList, props, emit?) {
     }
   }
   async function initSelectRows() {
-    let { records } = await getList({
+    const { records } = await getList({
       code: selectValues['value'].join(','),
       pageSize: selectValues['value'].length,
     });
@@ -126,8 +126,8 @@ export function useSelectBiz(getList, props, emit?) {
    * 确定选择
    */
   function getSelectResult(success) {
-    let options = <any[]>[];
-    let values = <any[]>[];
+    const options = <any[]>[];
+    const values = <any[]>[];
     selectRows.value.forEach((item) => {
       options.push({ label: item[props.labelKey], value: item[props.rowKey] });
     });

+ 8 - 8
src/components/Form/src/jeecg/hooks/useTreeBiz.ts

@@ -137,7 +137,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
     if (props.checkable == false) {
       checkedKeys.value = props.checkStrictly ? keys.checked : keys;
       const { selectedNodes } = info;
-      let rows = <any[]>[];
+      const rows = <any[]>[];
       selectedNodes.forEach((item) => {
         rows.push(item);
       });
@@ -158,8 +158,8 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
         if (info.checked) {
           // 代码逻辑说明: 单选模式下,设定rowKey,无法选中数据-
           checkedKeys.value = [info.node.eventKey];
-          let rowKey = props.rowKey;
-          let temp = info.checkedNodes.find((n) => n[rowKey] === info.node.eventKey);
+          const rowKey = props.rowKey;
+          const temp = info.checkedNodes.find((n) => n[rowKey] === info.node.eventKey);
           selectRows.value = [temp];
         } else {
           checkedKeys.value = [];
@@ -170,7 +170,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
       // 代码逻辑说明: 【JHHB-250】选择部门加一个层级关联/独立的配置,现在是点击就全勾选了---
       checkedKeys.value = checkStrictly.value ? keys.checked : keys;
       const { checkedNodes } = info;
-      let rows = <any[]>[];
+      const rows = <any[]>[];
       checkedNodes.forEach((item) => {
         rows.push(item);
       });
@@ -218,7 +218,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
    * 加载树数据
    */
   async function onLoadData(treeNode, ids) {
-    let params = {};
+    const params = {};
     let startPid = '';
     if (treeNode) {
       startPid = treeNode.eventKey;
@@ -234,7 +234,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
       params['departIds'] = props.params.departIds;
     }
     let record = await getList(params);
-    let optionData = record;
+    const optionData = record;
     //只展示公司信息(公司+子公司)
     if(props.onlyShowCompany){
       record = getCompanyData(record)
@@ -296,7 +296,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
    */
   function checkHasChild(pid, treeArray) {
     if (treeArray && treeArray.length > 0) {
-      for (let item of treeArray) {
+      for (const item of treeArray) {
         if (item.key == pid) {
           if (!item.child) {
             item.isLeaf = true;
@@ -418,7 +418,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
    */
   async function onSearch(value) {
     if(value){
-      let result = await defHttp.get({ url: "/sys/sysDepart/searchBy", params: { keyWord: value, orgCategory: "3",...props.params } });
+      const result = await defHttp.get({ url: "/sys/sysDepart/searchBy", params: { keyWord: value, orgCategory: "3",...props.params } });
       if (Array.isArray(result)) {
         treeData.value = result;
       } else {

+ 6 - 6
src/components/Form/src/utils/Area.ts

@@ -24,7 +24,7 @@ class Area {
     if (!pcaa) {
       pcaa = REGION_DATA;
     }
-    let arr: PlainPca[] = [];
+    const arr: PlainPca[] = [];
     const province = pcaa['86'];
     Object.keys(province).map((key) => {
       arr.push({ id: key, text: province[key], pid: '86', index: 1 });
@@ -50,7 +50,7 @@ class Area {
     if (!text || text.length == 0) {
       return '';
     }
-    for (let item of this.all) {
+    for (const item of this.all) {
       if (item.text === text) {
         return item.id;
       }
@@ -62,19 +62,19 @@ class Area {
     if (!code || code.length == 0) {
       return '';
     }
-    let arr = [];
+    const arr = [];
     this.getAreaBycode(code, arr, index);
     return arr.join('/');
   }
 
   getRealCode(code) {
-    let arr = [];
+    const arr = [];
     this.getPcode(code, arr, 3);
     return arr;
   }
 
   getPcode(id, arr, index) {
-    for (let item of this.all) {
+    for (const item of this.all) {
       if (item.id === id && item.index == index) {
         arr.unshift(id);
         if (item.pid != '86') {
@@ -85,7 +85,7 @@ class Area {
   }
 
   getAreaBycode(code, arr, index) {
-    for (let item of this.all) {
+    for (const item of this.all) {
       if (item.id === code && item.index == index) {
         arr.unshift(item.text);
         if (item.pid != '86') {

+ 8 - 8
src/components/JVxeCustom/src/components/JVxeSelectDictSearchCell.ts

@@ -65,7 +65,7 @@ export const DictSearchInputCell = defineComponent({
           if (currentRequestId !== requestId) {
             return;
           }
-          let { success, result, message } = res;
+          const { success, result, message } = res;
           if (success) {
             innerOptions.value = result;
             result.forEach((item) => {
@@ -97,7 +97,7 @@ export const DictSearchInputCell = defineComponent({
     }
 
     function renderOptionItem() {
-      let optionItems: any[] = [];
+      const optionItems: any[] = [];
       options.value.forEach(({ value, text, label, title, disabled }) => {
         optionItems.push(
           h(
@@ -176,7 +176,7 @@ function useSelectDictSearch(props) {
   const dict = computed(() => originColumn.value.dict);
   // 是否是异步模式
   const isAsync = computed(() => {
-    let isAsync = originColumn.value.async;
+    const isAsync = originColumn.value.async;
     return isAsync != null && isAsync !== '' ? !!isAsync : true;
   });
   const options = computed(() => {
@@ -208,7 +208,7 @@ function useSelectDictSearch(props) {
         if (LabelMap.has(value)) {
           innerOptions.value = cloneDeep(LabelMap.get(value));
         } else {
-          let result = await loadDictItem(dict.value, value);
+          const result = await loadDictItem(dict.value, value);
           if (result && result.length > 0) {
             innerOptions.value = [{ value: value, text: result[0] }];
             LabelMap.set(value, cloneDeep(innerOptions.value));
@@ -227,22 +227,22 @@ function useSelectDictSearch(props) {
         // 根据字典Code, 初始化字典数组
         let dictStr = '';
         if (dict.value) {
-          let arr = dict.value.split(',');
+          const arr = dict.value.split(',');
           if (arr[0].indexOf('where') > 0) {
-            let tbInfo = arr[0].split('where');
+            const tbInfo = arr[0].split('where');
             dictStr = tbInfo[0].trim() + ',' + arr[1] + ',' + arr[2] + ',' + encodeURIComponent(tbInfo[1]);
           } else {
             dictStr = dict.value;
           }
           if (dict.value.indexOf(',') === -1) {
             //优先从缓存中读取字典配置
-            let cache = getDictItemsByCode(dict.value);
+            const cache = getDictItemsByCode(dict.value);
             if (cache) {
               innerOptions.value = cache;
               return;
             }
           }
-          let { success, result } = await ajaxGetDictItems(dictStr, null);
+          const { success, result } = await ajaxGetDictItems(dictStr, null);
           if (success) {
             innerOptions.value = result;
           }

+ 3 - 3
src/components/JVxeCustom/src/hooks/useFileCell.ts

@@ -16,8 +16,8 @@ export function useFileCell(props, fileType: UploadTypeEnum, options?) {
 
   // 截取文件名
   const ellipsisFileName = computed(() => {
-    let length = 5;
-    let file = innerFile.value;
+    const length = 5;
+    const file = innerFile.value;
     if (!file || !file.name) {
       return '';
     }
@@ -42,7 +42,7 @@ export function useFileCell(props, fileType: UploadTypeEnum, options?) {
     let maxCount = originColumn.value.maxCount;
     // online 扩展JSON
     if (originColumn.value && originColumn.value.fieldExtendJson) {
-      let json = JSON.parse(originColumn.value.fieldExtendJson);
+      const json = JSON.parse(originColumn.value.fieldExtendJson);
       maxCount = json.uploadnum ? json.uploadnum : 0;
     }
     return maxCount ?? 0;

+ 0 - 7
src/components/Markdown/src/Markdown.vue

@@ -13,7 +13,6 @@
   import { getTenantId, getToken } from '/@/utils/auth';
   import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
   import { uploadFile } from '@/api/common/api';
-  import { $electron } from '@/electron';
 
   type Lang = 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' | undefined;
 
@@ -110,12 +109,6 @@
         const wrapEl = unref(wrapRef) as HTMLElement;
         if (!wrapEl) return;
 
-        // vditor组件本地化的路径配置【QQYUN-12053】
-        let localCdn = '/resource/vditor@3.9.4';
-        if ($electron.isElectron()) {
-          localCdn = '.' + localCdn;
-        }
-
         const bindValue = { ...attrs, ...props };
         const insEditor = new Vditor(wrapEl, {
           theme: getDarkMode.value === 'dark' ? 'dark' : 'classic',

+ 4 - 4
src/components/Table/src/hooks/useColumnsCache.ts

@@ -19,7 +19,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
     // 代码逻辑说明: 【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题)
     const path = route.path;
     let key = path.replace(/[\/\\]/g, '_');
-    let cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
+    const cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
     if (cacheKey) {
       key += ':' + cacheKey;
     }
@@ -38,7 +38,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
       return;
     }
     isInit = true;
-    let columnCache = $ls.get(cacheKey.value);
+    const columnCache = $ls.get(cacheKey.value);
     if (columnCache && columnCache.checkedList) {
       const { checkedList, sortedList, sortableOrder, checkIndex } = columnCache;
       await nextTick();
@@ -67,7 +67,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
     const { fixedColumns } = columnCache;
     const columns = opt.plainOptions.value;
     for (const column of columns) {
-      let fixedCol = fixedColumns.find((fc) => fc.key === (column.key || column.dataIndex));
+      const fixedCol = fixedColumns.find((fc) => fc.key === (column.key || column.dataIndex));
       if (fixedCol) {
         await nextTick();
         handleColumnFixed(column, fixedCol.fixed);
@@ -80,7 +80,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
 
   /** 获取被固定的列 */
   function getFixedColumns() {
-    let fixedColumns: any[] = [];
+    const fixedColumns: any[] = [];
     const columns = opt.plainOptions.value;
     for (const column of columns) {
       if (fixedReg.test((column.fixed ?? '').toString())) {

+ 3 - 3
src/components/Table/src/hooks/useCustomSelection.tsx

@@ -201,7 +201,7 @@ export function useCustomSelection(
     if (bodyEl.value) {
       // 监听div高度变化
       bodyResizeObserver = new ResizeObserver((entries) => {
-        for (let entry of entries) {
+        for (const entry of entries) {
           if (entry.target === bodyEl.value && entry.contentRect) {
             const { height } = entry.contentRect;
             bodyHeight.value = Math.ceil(height);
@@ -268,7 +268,7 @@ export function useCustomSelection(
       }
       let showCount = 0;
       // 最小选中数量
-      let minSelect = 100;
+      const minSelect = 100;
       const hidden: Recordable[] = [];
       flattedData.value.forEach((item, index, array) => {
         if (array.length > 120) {
@@ -440,7 +440,7 @@ export function useCustomSelection(
     function findParent(tree, record, children = 'children') {
       let parent = null;
       function search(nodes) {
-        for (let node of nodes) {
+        for (const node of nodes) {
           if (node[children]?.some((child) => getRecordKey(child) === getRecordKey(record))) {
             parent = node;
             return true;

+ 1 - 1
src/components/Table/src/hooks/useDataSource.ts

@@ -260,7 +260,7 @@ export function useDataSource(
         params = (await beforeFetch(params)) || params;
       }
       // 代码逻辑说明: 【QQYUN-8316】table查询条件,请求剔除空字符串字段
-      for (let item of Object.entries(params)) {
+      for (const item of Object.entries(params)) {
         const [key, val] = item;
         if (val === '') {
           delete params[key];

+ 3 - 3
src/components/jeecg/JVxeTable/src/JVxeTable.ts

@@ -42,6 +42,9 @@ export default defineComponent({
       vxeDataSource: data.vxeDataSource,
     };
   },
+  created() {
+    this.instanceRef = this;
+  },
   render() {
     return h(
       'div',
@@ -75,7 +78,4 @@ export default defineComponent({
       )
     );
   },
-  created() {
-    this.instanceRef = this;
-  },
 });

+ 4 - 4
src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts

@@ -25,7 +25,7 @@ export default defineComponent({
       () => props.vNode,
       (_vNode, old) => {
         if (props.effect && old != null) {
-          let topLayer = renderSpan(old, 'top');
+          const topLayer = renderSpan(old, 'top');
           effectList.value.push(topLayer);
         }
       },
@@ -37,13 +37,13 @@ export default defineComponent({
       if (props.vNode == null) {
         return null;
       }
-      let bottom = renderSpan(props.vNode, 'bottom');
+      const bottom = renderSpan(props.vNode, 'bottom');
       // 启用了特效,并且有旧数据,就渲染特效顶层
       if (innerEffect.value && effectList.value.length > 0) {
         emit('effectBegin');
         // 1.4s 以后关闭特效
         window.setTimeout(() => {
-          let item = effectList.value[effectIdx.value];
+          const item = effectList.value[effectIdx.value];
           if (item && item.elm) {
             // 特效结束后,展示先把 display 设为 none,而不是直接删掉该元素,
             // 目的是为了防止页面重新渲染,导致动画重置
@@ -65,7 +65,7 @@ export default defineComponent({
 
     // 渲染内容 span
     function renderSpan(vNode, layer) {
-      let options = {
+      const options = {
         key: layer + effectIdx.value + randomString(6),
         class: ['j-vxe-reload-effect-span', `layer-${layer}`],
         style: {},

+ 1 - 1
src/components/jeecg/JVxeTable/src/components/cells/JVxeSlotCell.ts

@@ -24,7 +24,7 @@ export default defineComponent({
       };
     });
     return () => {
-      let { slot } = props.renderOptions;
+      const { slot } = props.renderOptions;
       if (slot) {
         return h('div', {}, slot(slotProps.value));
       } else {

+ 6 - 6
src/components/jeecg/JVxeTable/src/hooks/cells/useJVxeUploadCell.ts

@@ -18,11 +18,11 @@ export function useJVxeUploadCell(props: JVxeComponent.Props, options?) {
 
   /** upload headers */
   const uploadHeaders = computed(() => {
-    let headers = {};
+    const headers = {};
     if ((originColumn.value.token ?? options?.token ?? false) === true) {
       headers['X-Access-Token'] = getToken();
     }
-    let tenantId = getTenantId();
+    const tenantId = getTenantId();
     headers['X-Tenant-Id'] = tenantId ? tenantId : '0';
     return headers;
   });
@@ -51,8 +51,8 @@ export function useJVxeUploadCell(props: JVxeComponent.Props, options?) {
   );
 
   function handleChangeUpload(info) {
-    let { file } = info;
-    let value = {
+    const { file } = info;
+    const value = {
       name: file.name,
       type: file.type,
       size: file.size,
@@ -127,8 +127,8 @@ export function fileGetValue(value) {
 
 export function fileSetValue(value) {
   if (value) {
-    let first = value.split(',')[0];
-    let name = first.substring(first.lastIndexOf('/') + 1);
+    const first = value.split(',')[0];
+    const name = first.substring(first.lastIndexOf('/') + 1);
     return {
       name: name,
       path: value,

+ 13 - 13
src/components/jeecg/JVxeTable/src/hooks/useColumns.ts

@@ -30,7 +30,7 @@ export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods:
     if (linkageConfig) {
       // console.log(linkageConfig);
     }
-    let columns: JVxeColumn[] = [];
+    const columns: JVxeColumn[] = [];
     if (isArray(props.columns)) {
       // handle 方法参数
       const args: HandleArgs = { props, slots, data, methods, columns };
@@ -38,7 +38,7 @@ export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods:
 
       const handleColumn = (column: JVxeColumn, container: JVxeColumn[]) => {
         // 排除未授权的列 1 = 显示/隐藏; 2 = 禁用
-        let auth = methods.getColAuth(column.key);
+        const auth = methods.getColAuth(column.key);
         if (auth?.type == '1' && !auth.isAuth) {
           return;
         } else if (auth?.type == '2' && !auth.isAuth) {
@@ -48,7 +48,7 @@ export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods:
         if (column.type == null || isEmpty(column.type)) {
           column.type = JVxeTypes.normal;
         }
-        let col: JVxeColumn = cloneDeep(column);
+        const col: JVxeColumn = cloneDeep(column);
         // 处理隐藏列
         if (col.type === JVxeTypes.hidden) {
           return handleInnerColumn(args, col, handleHiddenColumn);
@@ -150,7 +150,7 @@ function customComponentAddStar(columns) {
 
 /** 处理内置列 */
 function handleInnerColumn(args: HandleArgs, col: JVxeColumn, handler: (args: HandleArgs) => void, assign?: boolean) {
-  let renderOptions = col?.editRender || col?.cellRender;
+  const renderOptions = col?.editRender || col?.cellRender;
   return handler({
     ...args,
     col: col,
@@ -175,7 +175,7 @@ function handleHiddenColumn({ col, columns }: HandleArgs) {
 function handleSeqColumn({ props, col, columns }: HandleArgs) {
   // 判断是否开启了行号列
   if (props.rowNumber) {
-    let column = {
+    const column = {
       type: 'seq',
       title: '#',
       width: 60,
@@ -207,7 +207,7 @@ function handleSelectionColumn({ props, data, col, columns }: HandleArgs) {
     if (data.statistics.has && !props.rowExpand && !props.dragSort) {
       width = 60;
     }
-    let column: any = {
+    const column: any = {
       type: props.rowSelectionType,
       width: width,
       fixed: 'left',
@@ -235,7 +235,7 @@ function handleExpandColumn({ props, data, col, columns }: HandleArgs) {
     if (data.statistics.has && !props.dragSort) {
       width = 60;
     }
-    let column = {
+    const column = {
       type: 'expand',
       title: '',
       width: width,
@@ -259,7 +259,7 @@ function handleDragSortColumn({ props, data, col, columns, renderOptions }: Hand
     if (data.statistics.has) {
       width = 60;
     }
-    let column: any = {
+    const column: any = {
       title: '',
       width: width,
       fixed: 'left',
@@ -275,7 +275,7 @@ function handleDragSortColumn({ props, data, col, columns, renderOptions }: Hand
     if (props.dragSortFixed === 'none') {
       delete column.fixed;
     }
-    let cellRender = {
+    const cellRender = {
       name: JVxeTypePrefix + JVxeTypes.rowDragSort,
       sortKey: props.sortKey,
     };
@@ -296,12 +296,12 @@ function handleDragSortColumn({ props, data, col, columns, renderOptions }: Hand
 function handlerCol(args: HandleArgs) {
   const { props, col, columns, enhanced } = args;
   if (!col) return;
-  let { type } = col;
+  const { type } = col;
   col.field = col.key;
   delete col.type;
   let renderName = 'cellRender';
   // 渲染选项
-  let $renderOptions: any = { name: JVxeTypePrefix + type };
+  const $renderOptions: any = { name: JVxeTypePrefix + type };
   if (enhanced?.switches.editRender) {
     if (!(enhanced.switches.visible || props.alwaysEdit)) {
       renderName = 'editRender';
@@ -343,7 +343,7 @@ async function handleDict({ col, methods }: HandleArgs) {
             dictCodeString = encodeURI(dictCodeString);
           }
           const dictOptions: any = await initDictOptions(dictCodeString);
-          let options = col.params.options ?? [];
+          const options = col.params.options ?? [];
           dictOptions.forEach((dict) => {
             // 过滤重复数据
             if (options.findIndex((o) => o.value === dict.value) === -1) {
@@ -382,7 +382,7 @@ function handleStatistics({ col, data }: HandleArgs) {
     data.statistics.has = true;
     col.statistics.forEach((item) => {
       if (!isEmpty(item)) {
-        let arr = data.statistics[(item as string).toLowerCase()];
+        const arr = data.statistics[(item as string).toLowerCase()];
         if (isArray(arr)) {
           pushIfNotExist(arr, col.key);
         }

+ 3 - 3
src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts

@@ -21,10 +21,10 @@ export function useDragSort(props: JVxeTableProps, methods: JVxeTableMethods) {
     });
 
     function createSortable() {
-      let xTable = methods.getXTable();
+      const xTable = methods.getXTable();
       // let dom = xTable.$el.querySelector('.vxe-table--fixed-wrapper .vxe-table--body tbody')
       // let dom = xTable.$el.querySelector('.body--wrapper>.vxe-table--body tbody');
-      let dom = xTable.$el.querySelector('.vxe-table--body-inner-wrapper > .vxe-table--body tbody');
+      const dom = xTable.$el.querySelector('.vxe-table--body-inner-wrapper > .vxe-table--body tbody');
       if (!dom) {
         console.warn('[JVxeTable] 拖拽排序初始化失败,可能是vxe-table升级导致的版本不兼容。');
         return;
@@ -38,7 +38,7 @@ export function useDragSort(props: JVxeTableProps, methods: JVxeTableMethods) {
         direction: 'vertical',
         animation: 300,
         onStart(e) {
-          let from = e.from;
+          const from = e.from;
           // @ts-ignore
           startChildren = [...from.children];
         },

+ 3 - 3
src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts

@@ -13,8 +13,8 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
   const vxeEditRules = computed(() => merge({}, props.editRules, data.innerEditRules));
   // vxe 最终 events
   const vxeEvents = computed(() => {
-    let listeners = { ...unref(attrs) };
-    let events = {
+    const listeners = { ...unref(attrs) };
+    const events = {
       onScroll: methods.handleVxeScroll,
       onCellClick: methods.handleCellClick,
       onEditClosed: methods.handleEditClosed,
@@ -47,7 +47,7 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
     if (props.dragSort) {
       rowClass = {
         rowClassName: (params) => {
-          let { row } = params;
+          const { row } = params;
           const find = props.notAllowDrag?.find((item:any) => {
             const {key, value} = item;
             return row[key] == value;

+ 7 - 7
src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts

@@ -56,10 +56,10 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
     return innerValue.value
   });
   const cellProps = computed(() => {
-    let renderOptions = props.renderOptions;
-    let col = originColumn.value;
+    const renderOptions = props.renderOptions;
+    const col = originColumn.value;
 
-    let cellProps = {};
+    const cellProps = {};
 
     // 输入占位符
     cellProps['placeholder'] = replaceProps(col, col.placeholder);
@@ -105,7 +105,7 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
   });
 
   const listeners = computed(() => {
-    let listeners = Object.assign({}, props.renderOptions.listeners || {});
+    const listeners = Object.assign({}, props.renderOptions.listeners || {});
     // 默认change事件
     if (!listeners.change) {
       listeners.change = async (event) => {
@@ -145,7 +145,7 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
       enhanced = getEnhanced(props.type);
       // -update-end--author:liaozhiyang---date:20241210---for:【issues/7497】隐藏某一列后,字典没翻译,恢复后
       // 验证值格式
-      let getValue = enhanced.getValue(newValue, ctx);
+      const getValue = enhanced.getValue(newValue, ctx);
       if (newValue !== getValue) {
         // 值格式不正确,重新赋值
         newValue = getValue;
@@ -169,7 +169,7 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
       // 判断是否启用翻译
       if (props.renderType === JVxeRenderType.spaner && enhanced.translate.enabled === true) {
         if (isFunction(enhanced.translate.handler)) {
-          let res = enhanced.translate.handler(newValue, ctx);
+          const res = enhanced.translate.handler(newValue, ctx);
           // 异步翻译,可解决字典查询慢的问题
           if (isPromise(res)) {
             res.then((v) => (innerValue.value = v));
@@ -226,7 +226,7 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
    * @param args 其他附带参数
    */
   function trigger(name, event?, args: any[] = []) {
-    let listener = listeners.value[name];
+    const listener = listeners.value[name];
     if (isFunction(listener)) {
       if (isObject(event)) {
         event = packageEvent(name, event);

+ 12 - 12
src/components/jeecg/JVxeTable/src/hooks/useLinkage.ts

@@ -13,9 +13,9 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
       data.innerLinkageConfig.clear();
       if (isArray(linkageConfig) && linkageConfig.length > 0) {
         linkageConfig.forEach((config) => {
-          let keys = getLinkageKeys(config.key, []);
+          const keys = getLinkageKeys(config.key, []);
           // 多个key共享一个,引用地址
-          let configItem = {
+          const configItem = {
             ...config,
             keys,
             optionsMap: new Map(),
@@ -29,7 +29,7 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
 
   // 获取联动的key顺序
   function getLinkageKeys(key: string, keys: string[]): string[] {
-    let col = props.columns?.find((col: JVxeColumn) => col.key === key) as JVxeColumn;
+    const col = props.columns?.find((col: JVxeColumn) => col.key === key) as JVxeColumn;
     if (col) {
       keys.push(col.key);
       // 寻找下级
@@ -43,7 +43,7 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
   // 处理联动回显数据
   function handleLinkageBackData(row) {
     if (data.innerLinkageConfig.size > 0) {
-      for (let configItem of data.innerLinkageConfig.values()) {
+      for (const configItem of data.innerLinkageConfig.values()) {
         autoSetLinkageOptionsByData(row, '', configItem, 0);
       }
     }
@@ -55,8 +55,8 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
     let key = '';
     if (col.key !== config.key) {
       // 就找出联动上级列
-      let idx = config.keys.findIndex((k) => col.key === k);
-      let parentKey = config.keys[idx - 1];
+      const idx = config.keys.findIndex((k) => col.key === k);
+      const parentKey = config.keys[idx - 1];
       key = row[parentKey];
       // 如果联动上级列没有选择数据,就直接返回空数组
       if (key === '' || key == null) {
@@ -68,7 +68,7 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
     let options = config.optionsMap.get(key);
     if (!Array.isArray(options)) {
       if (request) {
-        let parent = key === 'root' ? '' : key;
+        const parent = key === 'root' ? '' : key;
         return getLinkageOptionsAsync(config, parent);
       } else {
         options = [];
@@ -80,7 +80,7 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
   /** 【多级联动】获取联动下拉选项(异步) */
   function getLinkageOptionsAsync(config, parent) {
     return new Promise((resolve) => {
-      let key = parent ? parent : 'root';
+      const key = parent ? parent : 'root';
       let options;
       if (config.optionsMap.has(key)) {
         options = config.optionsMap.get(key);
@@ -95,7 +95,7 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
       } else if (isFunction(config.requestData)) {
         // 调用requestData方法,通过传入parent来获取子级
         // noinspection JSVoidFunctionReturnValueUsed,TypeScriptValidateJSTypes
-        let promise = config.requestData(parent);
+        const promise = config.requestData(parent);
         config.optionsMap.set(key, promise);
         promise.then((opt) => {
           config.optionsMap.set(key, opt);
@@ -115,7 +115,7 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
       getLinkageOptionsAsync(config, parent);
     }
     if (config.keys.length - 1 > level) {
-      let value = data[config.keys[level]];
+      const value = data[config.keys[level]];
       if (value) {
         autoSetLinkageOptionsByData(data, value, config, level + 1);
       }
@@ -126,8 +126,8 @@ export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods)
   function handleLinkageSelectChange(row, col, config, value) {
     if (col.linkageKey) {
       getLinkageOptionsAsync(config, value);
-      let idx = config.keys.findIndex((k) => k === col.key);
-      let values = {};
+      const idx = config.keys.findIndex((k) => k === col.key);
+      const values = {};
       for (let i = idx; i < config.keys.length; i++) {
         values[config.keys[i]] = '';
       }

+ 60 - 60
src/components/jeecg/JVxeTable/src/hooks/useMethods.ts

@@ -68,7 +68,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   /** 监听vxe滚动条位置 */
   function handleVxeScroll(event) {
-    let { scroll } = data;
+    const { scroll } = data;
 
     // 记录滚动条的位置
     scroll.top = event.scrollTop;
@@ -81,7 +81,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   // 当手动勾选单选时触发的事件
   function handleVxeRadioChange(event) {
-    let row = event.$table.getRadioRecord();
+    const row = event.$table.getRadioRecord();
     data.selectedRows.value = row ? [row] : [];
     handleSelectChange('radio', data.selectedRows.value, event);
   }
@@ -122,7 +122,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   // 点击单元格时触发的事件
   function handleCellClick(event) {
-    let { row, column, $event, $table } = event;
+    const { row, column, $event, $table } = event;
 
     // 点击了可编辑的
     if (column.editRender) {
@@ -187,7 +187,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   // 返回值决定单元格是否可以编辑
   function handleActiveMethod({ row, column }) {
-    let flag = (() => {
+    const flag = (() => {
       if (props.disabled) {
         return false;
       }
@@ -226,12 +226,12 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
       return false;
     }
     let disabled: boolean = false;
-    let keys: string[] = Object.keys(props.disabledRows);
+    const keys: string[] = Object.keys(props.disabledRows);
     for (const key of keys) {
       // 判断是否有该属性
       if (row.hasOwnProperty(key)) {
-        let value = row[key];
-        let temp: any = props.disabledRows![key];
+        const value = row[key];
+        const temp: any = props.disabledRows![key];
         // 禁用规则可以是一个函数
         if (typeof temp === 'function') {
           disabled = temp(value, row, rowIndex);
@@ -252,7 +252,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   // 重新计算禁用行
   function recalcDisableRows() {
-    let xTable = getXTable();
+    const xTable = getXTable();
     data.disabledRowIds = [];
     const { tableFullData } = xTable.internalData;
     tableFullData.forEach((row, rowIndex) => {
@@ -283,7 +283,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
   /** 表尾数据处理方法,用于显示统计信息 */
   function handleFooterMethod({ columns, data: $data }) {
     const { statistics } = data;
-    let footers: any[] = [];
+    const footers: any[] = [];
     if (statistics.has) {
       if (statistics.sum.length > 0) {
         footers.push(
@@ -324,24 +324,24 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   // 创建新行,自动添加默认值
   function createRow(record: Recordable = {}) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     // 添加默认值
     xTable.internalData.tableFullColumn.forEach((column) => {
-      let col = column.params;
+      const col = column.params;
       // 不能被注册的列不获取增强
       if (col && !excludeKeywords.includes(col.type)) {
         if (col.key && (record[col.key] == null || record[col.key] === '')) {
           // 设置默认值
-          let createValue = getEnhanced(col.type).createValue;
-          let defaultValue = col.defaultValue ?? '';
-          let ctx = { context: { row: record, column, $table: xTable } };
+          const createValue = getEnhanced(col.type).createValue;
+          const defaultValue = col.defaultValue ?? '';
+          const ctx = { context: { row: record, column, $table: xTable } };
           record[col.key] = createValue(defaultValue, ctx);
         }
         // 处理联动列
         if (col.type === JVxeTypes.select && data.innerLinkageConfig.size > 0) {
           // 判断当前列是否是联动列
           if (data.innerLinkageConfig.has(col.key)) {
-            let configItem = data.innerLinkageConfig.get(col.key);
+            const configItem = data.innerLinkageConfig.get(col.key);
             linkageMethods.getLinkageOptionsAsync(configItem, '');
           }
         }
@@ -353,7 +353,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
   }
 
   async function addOrInsert(rows: Recordable | Recordable[] = {}, index, triggerName, options?: IAddRowsOptions) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     let records;
     if (isArray(rows)) {
       records = rows;
@@ -362,14 +362,14 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     }
     // 遍历添加默认值
     records.forEach((record) => createRow(record));
-    let setActive = options?.setActive ?? props.addSetActive ?? true;
-    let result = await pushRows(records, { index: index, setActive });
+    const setActive = options?.setActive ?? props.addSetActive ?? true;
+    const result = await pushRows(records, { index: index, setActive });
     // 遍历插入的行
     // online js增强时以传过来值为准,不再赋默认值
     if (!(options?.isOnlineJS ?? false)) {
       if (triggerName != null) {
         for (let i = 0; i < result.rows.length; i++) {
-          let row = result.rows[i];
+          const row = result.rows[i];
           trigger(triggerName, {
             row: row,
             rows: result.rows,
@@ -405,12 +405,12 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    */
   async function addRows(rows: Recordable | Recordable[] = {}, options?: IAddRowsOptions) {
     // 代码逻辑说明: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改
-    let result = await addOrInsert(rows, -1, 'added', options);
+    const result = await addOrInsert(rows, -1, 'added', options);
     if(options && options!.emitChange==true){
       trigger('valueChange', {column: 'all', row: result.row})
     }
     // 代码逻辑说明: 【TV360X-279】行编辑添加新字段滚动对应位置
-    let xTable = getXTable();
+    const xTable = getXTable();
     setTimeout(() => {
       xTable.scrollToRow(result.row);
     }, 0);
@@ -424,12 +424,12 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    * @param options.setActive 是否激活最后一行的编辑模式
    */
   async function pushRows(rows: Recordable | Recordable[] = {}, options = { setActive: false, index: -1 }) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     let { setActive, index } = options;
     index = index === -1 ? index : xTable.internalData.tableFullData[index];
     index = index == null ? -1 : index;
     // 插入行
-    let result = await xTable.insertAt(rows, index);
+    const result = await xTable.insertAt(rows, index);
     if (setActive) {
       // -update-begin--author:liaozhiyang---date:20240619---for:【TV360X-1404】vxetable警告
       // 激活最后一行的编辑模式
@@ -458,7 +458,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   /** 获取表格表单里的值 */
   function getValues(callback, rowIds) {
-    let tableData = getTableData({ rowIds: rowIds });
+    const tableData = getTableData({ rowIds: rowIds });
     // 代码逻辑说明: 【issues/7631】JVxeTable组件的getValues回调函数参数修正
     callback(tableData, tableData);
   }
@@ -471,13 +471,13 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   /** 获取表格数据 */
   function getTableData(options: getTableDataOptions = {}) {
-    let { rowIds } = options;
+    const { rowIds } = options;
     let tableData;
     // 仅查询指定id的行
     if (isArray(rowIds) && rowIds.length > 0) {
       tableData = [];
       rowIds.forEach((rowId) => {
-        let { row } = getIfRowById(rowId);
+        const { row } = getIfRowById(rowId);
         if (row) {
           tableData.push(row);
         }
@@ -494,20 +494,20 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   /** 仅获取新增的数据 */
   function getNewData() {
-    let newData = getNewDataWithId();
+    const newData = getNewDataWithId();
     newData.forEach((row) => delete row.id);
     return newData;
   }
 
   /** 仅获取新增的数据,带有id */
   function getNewDataWithId() {
-    let xTable = getXTable();
+    const xTable = getXTable();
     return cloneDeep(xTable.getInsertRecords());
   }
 
   /** 根据ID获取行,新增的行也能查出来 */
   function getIfRowById(id) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     let row = xTable.getRowById(id),
       isNew = false;
     if (!row) {
@@ -523,8 +523,8 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   /** 通过临时ID获取新增的行 */
   function getNewRowById(id) {
-    let records = getXTable().getInsertRecords();
-    for (let record of records) {
+    const records = getXTable().getInsertRecords();
+    for (const record of records) {
       if (record.id === id) {
         return record;
       }
@@ -544,13 +544,13 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    * @param handler function
    */
   function filterNewRows(rows, optOrRm:filterNewRowsOptions = true, handler?: Fn) {
-    let insertRecords = getXTable().getInsertRecords();
-    let records: Recordable[] = [];
+    const insertRecords = getXTable().getInsertRecords();
+    const records: Recordable[] = [];
     optOrRm = typeof optOrRm === 'boolean' ? { removeNewLine: optOrRm } : optOrRm;
     // true = 删除新增,false=只删除id
-    let removeNewLine = optOrRm?.removeNewLine ?? true;
-    for (let row of rows) {
-      let item = cloneDeep(row);
+    const removeNewLine = optOrRm?.removeNewLine ?? true;
+    for (const row of rows) {
+      const item = cloneDeep(row);
       if (insertRecords.includes(row)) {
         handler ? handler({ item, row, insertRecords }) : null;
         if (removeNewLine) {
@@ -570,20 +570,20 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    * @param top 新top位置,留空则滚动到上次记录的位置,用于解决切换tab选项卡时导致白屏以及自动将滚动条滚动到顶部的问题
    */
   function resetScrollTop(top?) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     xTable.scrollTo(null, top == null || top === '' ? data.scroll.top : top);
   }
 
   /** 校验table,失败返回errMap,成功返回null */
   async function validateTable(rows?) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     const errMap = await xTable.validate(rows ?? true).catch((errMap) => errMap);
     return errMap ? errMap : null;
   }
 
   /** 完整校验 */
   async function fullValidateTable(rows?) {
-    let xTable = getXTable();
+    const xTable = getXTable();
     const errMap = await xTable.fullValidate(rows ?? true).catch((errMap) => errMap);
     return errMap ? errMap : null;
   }
@@ -601,19 +601,19 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
       console.warn(`[JVxeTable] setValues 必须传递数组`);
       return 0;
     }
-    let xTable = getXTable();
+    const xTable = getXTable();
     let count = 0;
     values.forEach((item) => {
-      let { rowKey, values: record } = item;
-      let { row } = getIfRowById(rowKey);
+      const { rowKey, values: record } = item;
+      const { row } = getIfRowById(rowKey);
       if (!row) {
         return;
       }
       Object.keys(record).forEach((colKey) => {
-        let column = xTable.getColumnByField(colKey);
+        const column = xTable.getColumnByField(colKey);
         if (column) {
-          let oldValue = row[colKey];
-          let newValue = record[colKey];
+          const oldValue = row[colKey];
+          const newValue = record[colKey];
           if (newValue !== oldValue) {
             row[colKey] = newValue;
             // 触发 valueChange 事件
@@ -642,7 +642,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
   /** 清空选择行 */
   async function clearSelection() {
     const xTable = getXTable();
-    let event = { $table: xTable, target: instanceRef.value };
+    const event = { $table: xTable, target: instanceRef.value };
     if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
       await xTable.clearRadioRow();
       handleVxeRadioChange(event);
@@ -659,7 +659,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
   function getSelectionData(isFull?: boolean) {
     const xTable = getXTable();
     if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
-      let row = xTable.getRadioRecord(isFull);
+      const row = xTable.getRadioRecord(isFull);
       if (isNull(row)) {
         return [];
       }
@@ -723,9 +723,9 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     } else {
       rowIds = [rowId];
     }
-    let rows = rowIds
+    const rows = rowIds
       .map((id) => {
-        let { row } = getIfRowById(id);
+        const { row } = getIfRowById(id);
         if (!row) {
           return;
         }
@@ -742,7 +742,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
 
   // 删除选中的数据
   async function removeSelection() {
-    let xTable = getXTable();
+    const xTable = getXTable();
     let res;
     if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
       res = await xTable.removeRadioRow();
@@ -757,8 +757,8 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
   /** 重新计算排序字段的数值 */
   async function recalcSortNumber(force = false) {
     if (props.dragSort || force) {
-      let xTable = getXTable();
-      let sortKey = props.sortKey ?? 'orderNum';
+      const xTable = getXTable();
+      const sortKey = props.sortKey ?? 'orderNum';
       let sortBegin = props.sortBegin ?? 0;
       xTable.internalData.tableFullData.forEach((data) => (data[sortKey] = sortBegin++));
       // 4.1.0
@@ -777,10 +777,10 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    */
   async function doSort(oldIndex: number, newIndex: number, force = false) {
     if (props.dragSort || force) {
-      let xTable = getXTable();
-      let sort = (array) => {
+      const xTable = getXTable();
+      const sort = (array) => {
         // 存储old数据,并删除该项
-        let row = array.splice(oldIndex, 1)[0];
+        const row = array.splice(oldIndex, 1)[0];
         // 向newIndex处添加old数据
         array.splice(newIndex, 0, row);
       };
@@ -818,7 +818,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    */
   function getAuth(authCode) {
     if (data.authsMap.value != null && props.authPre) {
-      let prefix = getPrefix(props.authPre);
+      const prefix = getPrefix(props.authPre);
       return data.authsMap.value.get(prefix + authCode);
     }
     return null;
@@ -860,7 +860,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     const xTable = getXTable();
     let rows:any[] = []
     if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
-      let row = xTable.getRadioRecord(isFull);
+      const row = xTable.getRadioRecord(isFull);
       if (isNull(row)) {
         return [];
       }
@@ -868,9 +868,9 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     } else {
       rows = xTable.getCheckboxRecords(isFull)
     }
-    let records: Recordable[] = [];
-    for (let row of rows) {
-      let item = cloneDeep(row);
+    const records: Recordable[] = [];
+    for (const row of rows) {
+      const item = cloneDeep(row);
       records.push(item);
     }
     return records;

+ 6 - 6
src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts

@@ -6,10 +6,10 @@ import { replaceProps } from '../utils/enhancedUtils';
 export function useValidateRules(args: HandleArgs) {
   const { data } = args;
   const col = args.col!;
-  let rules: VxeTablePropTypes.EditRules[] = [];
+  const rules: VxeTablePropTypes.EditRules[] = [];
   if (isArray(col.validateRules)) {
-    for (let rule of col.validateRules) {
-      let replace = {
+    for (const rule of col.validateRules) {
+      const replace = {
         message: replaceProps(col, rule.message),
       };
       if (rule.unique || rule.pattern === 'only') {
@@ -22,7 +22,7 @@ export function useValidateRules(args: HandleArgs) {
           delete rule.pattern;
         } else {
           // 兼容Online表单的特殊规则
-          for (let foo of fooPatterns) {
+          for (const foo of fooPatterns) {
             if (foo.value === rule.pattern) {
               rule.pattern = foo.pattern;
               break;
@@ -45,9 +45,9 @@ function uniqueValidator({ methods }: HandleArgs) {
     const { cellValue, column, rule } = event;
     // 代码逻辑说明: 【TV360X-299】JVxetable组件中唯一校验过滤掉空字符串
     if (cellValue == '') return Promise.resolve();
-    let tableData = methods.getTableData();
+    const tableData = methods.getTableData();
     let findCount = 0;
-    for (let rowData of tableData) {
+    for (const rowData of tableData) {
       if (rowData[column.params.key] === cellValue) {
         if (++findCount >= 2) {
           return Promise.reject(new Error(rule.message));

+ 8 - 8
src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts

@@ -57,7 +57,7 @@ const vs = {
       const domain = domainURL.replace('https://', 'wss://').replace('http://', 'ws://');
       const url = `${domain}/vxeSocket/${userId}/${this.pageId}`;
       // 代码逻辑说明: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
-      let token = (getToken() || '') as string;
+      const token = (getToken() || '') as string;
       this.ws = new WebSocket(url, [token]);
       this.ws.onopen = this.on.open.bind(this);
       this.ws.onerror = this.on.error.bind(this);
@@ -69,7 +69,7 @@ const vs = {
   // 发送消息
   sendMessage(type, message) {
     try {
-      let ws = this.ws;
+      const ws = this.ws;
       if (ws != null && ws.readyState === ws.OPEN) {
         ws.send(
           JSON.stringify({
@@ -87,7 +87,7 @@ const vs = {
   tableMap: new Map(),
   /** 添加绑定 */
   addBind(map, key, value: VmArgs) {
-    let binds = map.get(key);
+    const binds = map.get(key);
     if (isArray(binds)) {
       binds.push(value);
     } else {
@@ -96,10 +96,10 @@ const vs = {
   },
   /** 移除绑定 */
   removeBind(map, key, value: VmArgs) {
-    let binds = map.get(key);
+    const binds = map.get(key);
     if (isArray(binds)) {
       for (let i = 0; i < binds.length; i++) {
-        let bind = binds[i];
+        const bind = binds[i];
         if (bind === value) {
           binds.splice(i, 1);
           break;
@@ -114,7 +114,7 @@ const vs = {
   },
   // 呼叫绑定的表单
   callBind(map, key, callback) {
-    let binds = map.get(key);
+    const binds = map.get(key);
     if (isArray(binds)) {
       binds.forEach(callback);
     }
@@ -154,8 +154,8 @@ const vs = {
         console.warn('【JVxeWebSocket】收到无法解析的消息:', e.data);
         return;
       }
-      let type = json[this.constants.TYPE];
-      let data = json[this.constants.DATA];
+      const type = json[this.constants.TYPE];
+      const data = json[this.constants.DATA];
       switch (type) {
         // 心跳检测
         case this.constants.TYPE_HB:

+ 6 - 6
src/components/jeecg/JVxeTable/src/install.ts

@@ -41,22 +41,22 @@ export function registerJVxeTable(app: App) {
  */
 function preventClosingPopUp(this: any, params) {
   // 获取组件增强
-  let col = params.column.params;
+  const col = params.column.params;
   // 代码逻辑说明: 【issues/8178】使用原生vxe-table组件编辑模式下失去焦点报错
   if (col === undefined) {
     // 说明使用的是纯原生的vxe-table
     return;
   }
-  let { $event } = params;
+  const { $event } = params;
   const interceptor = getEnhanced(col.type).interceptor;
   // 执行增强
-  let flag = interceptor['event.clearActived']?.call(this, ...arguments);
+  const flag = interceptor['event.clearActived']?.call(this, ...arguments);
   if (flag === false) {
     return false;
   }
 
-  let path = getEventPath($event);
-  for (let p of path) {
+  const path = getEventPath($event);
+  for (const p of path) {
     let className: any = p.className || '';
     className = typeof className === 'string' ? className : className.toString();
 
@@ -75,7 +75,7 @@ function preventClosingPopUp(this: any, params) {
       return false;
     }
     // 执行增强
-    let flag = interceptor['event.clearActived.className']?.call(this, className, ...arguments);
+    const flag = interceptor['event.clearActived.className']?.call(this, className, ...arguments);
     if (flag === false) {
       return false;
     }

+ 7 - 7
src/components/jeecg/JVxeTable/src/utils/authUtils.ts

@@ -8,28 +8,28 @@ import { usePermissionStoreWithOut } from '/@/store/modules/permission';
 export function getJVxeAuths(prefix) {
   const permissionStore = usePermissionStoreWithOut();
   prefix = getPrefix(prefix);
-  let { authList, allAuthList } = permissionStore;
-  let authsMap = new Map<string, typeof allAuthList[0]>();
+  const { authList, allAuthList } = permissionStore;
+  const authsMap = new Map<string, typeof allAuthList[0]>();
   if (!prefix || prefix.length == 0) {
     return authsMap;
   }
   // 将所有vxe用到的权限取出来
-  for (let auth of allAuthList) {
+  for (const auth of allAuthList) {
     if (auth.status == '1' && (auth.action || '').startsWith(prefix)) {
       authsMap.set(auth.action, { ...auth, isAuth: false });
     }
   }
   // 设置是否已授权
-  for (let auth of authList) {
-    let getAuth = authsMap.get(auth.action);
+  for (const auth of authList) {
+    const getAuth = authsMap.get(auth.action);
     if (getAuth != null) {
       getAuth.isAuth = true;
     }
   }
   // 代码逻辑说明: VUEN-1162 子表按钮没控制
-  let onlineButtonAuths = permissionStore.getOnlineSubTableAuth(prefix);
+  const onlineButtonAuths = permissionStore.getOnlineSubTableAuth(prefix);
   if (onlineButtonAuths && onlineButtonAuths.length > 0) {
-    for (let auth of onlineButtonAuths) {
+    for (const auth of onlineButtonAuths) {
       authsMap.set(prefix + 'btn:' + auth, { action: auth, type: 1, status: 1, isAuth: false });
     }
   }

+ 4 - 4
src/components/jeecg/JVxeTable/src/utils/enhancedUtils.ts

@@ -12,14 +12,14 @@ const enhancedMap = new Map<JVxeTypes, JVxeComponent.Enhanced>();
  * @param type JVxeTypes
  */
 export function getEnhanced(type: JVxeTypes | string): JVxeComponent.Enhanced {
-  let $type: JVxeTypes = <JVxeTypes>type;
+  const $type: JVxeTypes = <JVxeTypes>type;
   if (!enhancedMap.has($type)) {
-    let defaultEnhanced = useDefaultEnhanced();
+    const defaultEnhanced = useDefaultEnhanced();
     if (componentMap.has($type)) {
-      let enhanced = componentMap.get($type)?.enhanced ?? {};
+      const enhanced = componentMap.get($type)?.enhanced ?? {};
       if (isObject(enhanced)) {
         Object.keys(defaultEnhanced).forEach((key) => {
-          let def = defaultEnhanced[key];
+          const def = defaultEnhanced[key];
           if (enhanced.hasOwnProperty(key)) {
             // 方法如果存在就不覆盖
             if (!isFunction(def) && !isString(def)) {

+ 10 - 10
src/components/jeecg/JVxeTable/utils.ts

@@ -30,11 +30,11 @@ export function dispatchEvent(options: dispatchEventOptions) {
   if (props && props.alwaysEdit) {
     return;
   }
-  let getCell = () => {
-    let paths: HTMLElement[] = [...($event?.path ?? [])];
+  const getCell = () => {
+    const paths: HTMLElement[] = [...($event?.path ?? [])];
     // 通过 instance 获取 cell dom对象
     if (row && column) {
-      let selector = `table.vxe-table--body tbody tr[rowid='${row.id}'] td[colid='${column.id}']`;
+      const selector = `table.vxe-table--body tbody tr[rowid='${row.id}'] td[colid='${column.id}']`;
       let cellDom = instance!.vnode?.el?.querySelector(selector);
       // -update-begin--author:liaozhiyang---date:20230830---for:【QQYUN-6390】解决online新增字段警告(兼容下)
       if (!cellDom) {
@@ -52,11 +52,11 @@ export function dispatchEvent(options: dispatchEventOptions) {
     }
     return null;
   };
-  let cell = getCell();
+  const cell = getCell();
   if (cell) {
     window.setTimeout(() => {
-      let getElement = () => {
-        let classList = className.split(' ');
+      const getElement = () => {
+        const classList = className.split(' ');
         if (classList.length > 0) {
           const getClassName = (cls: string) => {
             if (cls.startsWith('.')) {
@@ -64,8 +64,8 @@ export function dispatchEvent(options: dispatchEventOptions) {
             }
             return cls;
           };
-          let get = (target, className, idx = 0) => {
-            let elements = target.getElementsByClassName(getClassName(className));
+          const get = (target, className, idx = 0) => {
+            const elements = target.getElementsByClassName(getClassName(className));
             if (elements && elements.length > 0) {
               return elements[idx];
             }
@@ -82,7 +82,7 @@ export function dispatchEvent(options: dispatchEventOptions) {
         }
         return null;
       };
-      let element = getElement();
+      const element = getElement();
       if (element) {
         if (isFunction(handler)) {
           handler(element);
@@ -104,7 +104,7 @@ export function dispatchEvent(options: dispatchEventOptions) {
 /** 绑定 VxeTable 数据 */
 export function vModel(value, row, column: Ref<any> | string) {
   // @ts-ignore
-  let property = isRef(column) ? column.value.property : column;
+  const property = isRef(column) ? column.value.property : column;
   unref(row)[property] = value;
 }
 

+ 61 - 61
src/components/jeecg/OnLine/hooks/usePopBiz.ts

@@ -155,7 +155,7 @@ export function usePopBiz(ob, tableRef?) {
    */
   function filterUnuseSelect() {
     selectRows.value = unref(selectRows).filter((item) => {
-      let combineKey = combineRowKey(item);
+      const combineKey = combineRowKey(item);
       return unref(checkedKeys).indexOf(combineKey) >= 0;
     });
   }
@@ -165,7 +165,7 @@ export function usePopBiz(ob, tableRef?) {
    * @param key
    */
   function getRowByKey(key) {
-    let row = unref(dataSource).filter((record) => combineRowKey(record) === key);
+    const row = unref(dataSource).filter((record) => combineRowKey(record) === key);
     return row && row.length > 0 ? row[0] : '';
   }
 
@@ -191,18 +191,18 @@ export function usePopBiz(ob, tableRef?) {
    */
   function loadColumnsInfo() {
     const {code} = handleCodeParams(true)
-    let url = `${configUrl.getColumns}${code}`;
+    const url = `${configUrl.getColumns}${code}`;
     //缓存key
-    let groupIdKey = props.groupId ? `${props.groupId}${url}` : '';
+    const groupIdKey = props.groupId ? `${props.groupId}${url}` : '';
     httpGroupRequest(() => defHttp.get({ url }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => {
       if (res.success) {
         initDictOptionData(res.result.dictOptions);
         cgRpConfigId.value = res.result.cgRpConfigId;
         title.value = res.result.cgRpConfigName;
-        let currColumns = res.result.columns;
+        const currColumns = res.result.columns;
         for (let a = 0; a < currColumns.length; a++) {
           if (currColumns[a].customRender) {
-            let dictCode = currColumns[a].customRender;
+            const dictCode = currColumns[a].customRender;
             currColumns[a].customRender = ({ text }) => {
               return filterMultiDictText(unref(dictOptions)[dictCode], text + '');
             };
@@ -256,12 +256,12 @@ export function usePopBiz(ob, tableRef?) {
       url = url + query
     }
     //缓存key
-    let groupIdKey = props.groupId ? `${props.groupId}${url}` : '';
+    const groupIdKey = props.groupId ? `${props.groupId}${url}` : '';
     httpGroupRequest(() => defHttp.get({ url }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => {
       if (res.success) {
         initDictOptionData(res.result.dictOptions);
         cgRpConfigId.value = props.id;
-        let { columns: metaColumnList, cgreportHeadName, fieldHrefSlots, isGroupTitle } = res.result;
+        const { columns: metaColumnList, cgreportHeadName, fieldHrefSlots, isGroupTitle } = res.result;
         title.value = cgreportHeadName;
         // href 跳转
         const fieldHrefSlotKeysMap = {};
@@ -341,7 +341,7 @@ export function usePopBiz(ob, tableRef?) {
    */
   function handleSumColumn(metaColumnList: OnlineColumn[], dataTotal: number): void {
     // 获取需要合计列的dataIndex
-    let sumColumnList = getNeedSumColumns(metaColumnList);
+    const sumColumnList = getNeedSumColumns(metaColumnList);
     // 判断是否为第一次获取数据,如果是的话,则需要重新设置pageSize
     if (pagination.isTotal == '') {
       if (sumColumnList.length > 0) {
@@ -349,7 +349,7 @@ export function usePopBiz(ob, tableRef?) {
         // 有合计字段时,每次最多查询原pageSize-1条记录,另外需要第一次时将查询的10条中删除最后一条
         // 删除最后一条数据 如果第一次得到的数据长度等于pageSize的话,则删除最后一条
         if (dataSource.value.length == pagination.pageSize) {
-          let remove_data = dataSource.value.pop();
+          const remove_data = dataSource.value.pop();
         }
         pagination.realPageSize = pagination.pageSize - 1;
       } else {
@@ -358,7 +358,7 @@ export function usePopBiz(ob, tableRef?) {
     }
     // 需要添加合计字段
     if (pagination.isTotal) {
-      let totalRow = {};
+      const totalRow = {};
       sumColumnList.forEach((dataIndex) => {
         let count = 0;
         dataSource.value.forEach((row) => {
@@ -370,7 +370,7 @@ export function usePopBiz(ob, tableRef?) {
         totalRow[dataIndex] = isNaN(count) ? '包含非数字内容' : count.toFixed(2);
 
         // 长整形时合计不显示.00后缀
-        let v = metaColumnList.find((v) => v.dataIndex == dataIndex);
+        const v = metaColumnList.find((v) => v.dataIndex == dataIndex);
         if (v && v.fieldType == 'Long') {
           totalRow[dataIndex] = parseInt(totalRow[dataIndex]);
         }
@@ -386,14 +386,14 @@ export function usePopBiz(ob, tableRef?) {
    * @param columns
    */
   function getNeedSumColumns(columns: OnlineColumn[]): string[] {
-    let arr: string[] = [];
-    for (let column of columns) {
+    const arr: string[] = [];
+    for (const column of columns) {
       if (column.isTotal === '1') {
         arr.push(column.dataIndex!);
       }
         // 【VUEN-1569】【online报表】合计无效
       if (column.children && column.children.length > 0) {
-        let subArray = getNeedSumColumns(column.children);
+        const subArray = getNeedSumColumns(column.children);
         if (subArray.length > 0) {
           arr.push(...subArray);
         }
@@ -406,7 +406,7 @@ export function usePopBiz(ob, tableRef?) {
    * 处理列的href和字典翻译
    */
   function handleColumnHrefAndDict(columns: OnlineColumn[], fieldHrefSlotKeysMap: {}): OnlineColumn[] {
-    for (let column of columns) {
+    for (const column of columns) {
       let { customRender, hrefSlotName, fieldType } = column;
       // online 报表中类型配置为日期(yyyy-MM-dd ),但是实际展示为日期时间格式(yyyy-MM-dd HH:mm:ss) issues/3042
       if (fieldType == 'Date') {
@@ -430,14 +430,14 @@ export function usePopBiz(ob, tableRef?) {
         // 如果 hrefSlotName 有值则代表使用了href跳转
         // 两者可以兼容。兼容的具体思路为:先获取到字典替换的值,再添加href链接跳转
         if (customRender || hrefSlotName) {
-          let dictCode = customRender as string;
-          let replaceFlag = '_replace_text_';
+          const dictCode = customRender as string;
+          const replaceFlag = '_replace_text_';
           column.customRender = ({ text, record }) => {
             let value = text;
             // 如果 dictCode 有值,就进行字典转换
             if (dictCode) {
               if (dictCode.startsWith(replaceFlag)) {
-                let textFieldName = dictCode.replace(replaceFlag, '');
+                const textFieldName = dictCode.replace(replaceFlag, '');
                 value = record[textFieldName];
               } else {
                 value = filterMultiDictText(unref(dictOptions)[dictCode], text + '');
@@ -451,7 +451,7 @@ export function usePopBiz(ob, tableRef?) {
             }
             // 如果 hrefSlotName 有值,就生成一个 a 标签,包裹住字典替换后(或原生)的值
             if (hrefSlotName) {
-              let field = fieldHrefSlotKeysMap[hrefSlotName];
+              const field = fieldHrefSlotKeysMap[hrefSlotName];
               if (field) {
                 return h(
                   'a',
@@ -475,21 +475,21 @@ export function usePopBiz(ob, tableRef?) {
    * @param columns
    */
   function handleGroupTitle(columns: OnlineColumn[]): OnlineColumn[] {
-    let newColumns: OnlineColumn[] = [];
-    for (let column of columns) {
+    const newColumns: OnlineColumn[] = [];
+    for (const column of columns) {
       //排序字段受控  ---- 此逻辑为新增逻辑 待
       if (unref(iSorter) && column.dataIndex === unref(iSorter).column) {
         column.sortOrder = unref(iSorter).order === 'asc' ? 'ascend' : 'descend';
       }
       //判断字段是否需要合并表头
       if (column.groupTitle) {
-        let clIndex = newColumns.findIndex((im) => im.title === column.groupTitle);
+        const clIndex = newColumns.findIndex((im) => im.title === column.groupTitle);
         if (clIndex !== -1) {
           //表头已存在直接push children
           newColumns[clIndex].children!.push(column);
         } else {
           //表头不存在组装表头信息
-          let clGroup: OnlineColumn = {},
+          const clGroup: OnlineColumn = {},
             child: OnlineColumn[] = [];
           child.push(column);
           clGroup.title = column.groupTitle;
@@ -505,7 +505,7 @@ export function usePopBiz(ob, tableRef?) {
   }
 
   // 获取路由器对象 href跳转用到
-  let router = useRouter();
+  const router = useRouter();
   /**
    * href 点击事件
    * @param field
@@ -513,9 +513,9 @@ export function usePopBiz(ob, tableRef?) {
    */
   function handleClickFieldHref(field, record) {
     let href = field.href;
-    let urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/;
-    let compPattern = /\.vue(\?.*)?$/;
-    let jsPattern = /{{([^}]+)}}/g; // {{ xxx }}
+    const urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/;
+    const compPattern = /\.vue(\?.*)?$/;
+    const jsPattern = /{{([^}]+)}}/g; // {{ xxx }}
     if (typeof href === 'string') {
       href = href.trim().replace(/\${([^}]+)?}/g, (s1, s2) => record[s2]);
       // 执行 {{...}} JS增强语句
@@ -551,8 +551,8 @@ export function usePopBiz(ob, tableRef?) {
    */
   function handleExport() {
     const { handleExportXls } = useMethods();
-    let url = `${configUrl.export}${cgRpConfigId.value}`;
-    let params = getQueryParams(); //查询条件
+    const url = `${configUrl.export}${cgRpConfigId.value}`;
+    const params = getQueryParams(); //查询条件
     // 【VUEN-1568】如果选中了某些行,就只导出选中的行
     let keys = unref(checkedKeys);
     if (keys.length > 0) {
@@ -593,9 +593,9 @@ export function usePopBiz(ob, tableRef?) {
    */
   function onShowTotal(total) {
     // 重新根据是否有合计计算每页显示的数据
-    let start = (pagination.current - 1) * pagination.realPageSize + 1;
-    let end = start + (pagination.isTotal ? dataSource.value.length - 1 : dataSource.value.length) - 1;
-    let realTotal = pagination.isTotal ? pagination.realTotal : total;
+    const start = (pagination.current - 1) * pagination.realPageSize + 1;
+    const end = start + (pagination.isTotal ? dataSource.value.length - 1 : dataSource.value.length) - 1;
+    const realTotal = pagination.isTotal ? pagination.realTotal : total;
     return start + '-' + end + ' 共' + realTotal + '条';
   }
 
@@ -612,9 +612,9 @@ export function usePopBiz(ob, tableRef?) {
    * @param data 数据结果集
    */
   function initQueryInfo(data) {
-    let url = `${configUrl.getQueryInfo}${unref(cgRpConfigId)}`;
+    const url = `${configUrl.getQueryInfo}${unref(cgRpConfigId)}`;
     //缓存key
-    let groupIdKey = props.groupId ? `${props.groupId}${url}` : '';
+    const groupIdKey = props.groupId ? `${props.groupId}${url}` : '';
     httpGroupRequest(() => defHttp.get({ url }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => {
       // console.log("获取查询条件", res);
       if (res.success) {
@@ -644,7 +644,7 @@ export function usePopBiz(ob, tableRef?) {
     if (arg == 1) {
       pagination.current = 1;
     }
-    let params = getQueryParams(); //查询条件
+    const params = getQueryParams(); //查询条件
     params['onlRepUrlParamStr'] = getUrlParamString();
     console.log('params', params);
     loading.value = true;
@@ -655,13 +655,13 @@ export function usePopBiz(ob, tableRef?) {
       url = url + query
     }
     //缓存key
-    let groupIdKey = props.groupId ? `${props.groupId}${url}${JSON.stringify(params)}` : '';
+    const groupIdKey = props.groupId ? `${props.groupId}${url}${JSON.stringify(params)}` : '';
     httpGroupRequest(() => defHttp.get({ url, params }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => {
       // 代码逻辑说明: 【TV360X-578】online报表SQL翻译,第二页不翻页数据
       res.result.dictOptions && initDictOptionData(res.result.dictOptions);
       loading.value = false;
       // 代码逻辑说明: 【TV360X-578】online报表SQL翻译,第二页不翻页数据
-      let data = res.result.data;
+      const data = res.result.data;
       console.log('表格信息:', data);
       setDataSource(data);
     });
@@ -671,8 +671,8 @@ export function usePopBiz(ob, tableRef?) {
    * 获取地址栏的参数
    */
   function getUrlParamString() {
-   let query = route.query;
-   let arr:any[] = []
+   const query = route.query;
+   const arr:any[] = []
    if(query && Object.keys(query).length>0){
      Object.keys(query).map(k=>{
        arr.push(`${k}=${query[k]}`)
@@ -687,7 +687,7 @@ export function usePopBiz(ob, tableRef?) {
   function setDataSource(data) {
     if (data) {
       pagination.total = Number(data.total);
-      let currentPage = pagination?.current ?? 1;
+      const currentPage = pagination?.current ?? 1;
       for (let a = 0; a < data.records.length; a++) {
         if (!data.records[a].rowIndex) {
           data.records[a].rowIndex = a + (currentPage - 1) * 10;
@@ -710,14 +710,14 @@ export function usePopBiz(ob, tableRef?) {
    * 获取查询参数
    */
   function getQueryParams() {
-    let paramTarget = {};
+    const paramTarget = {};
     if (unref(dynamicParam)) {
       //处理自定义参数
       Object.keys(unref(dynamicParam)).map((key) => {
         paramTarget['self_' + key] = unref(dynamicParam)[key];
       });
     }
-    let param = Object.assign(paramTarget, unref(queryParam), unref(iSorter));
+    const param = Object.assign(paramTarget, unref(queryParam), unref(iSorter));
     param.pageNo = pagination.current;
     // 合计逻辑 [待优化 3.0]
     //  实际查询时不使用table组件的pageSize,而使用自定义的realPageSize,realPageSize会在第一次获取到数据后变化
@@ -731,8 +731,8 @@ export function usePopBiz(ob, tableRef?) {
   function dynamicParamHandler(arr?) {
     if (arr && arr.length > 0) {
       //第一次加载查询条件前 初始化queryParam为空对象
-      let queryTemp = {};
-      for (let item of arr) {
+      const queryTemp = {};
+      for (const item of arr) {
         if (item.mode === 'single') {
           queryTemp[item.field] = '';
         }
@@ -744,7 +744,7 @@ export function usePopBiz(ob, tableRef?) {
       queryParam.value = Object.assign(queryParam.value, props.routeQuery);
     }
 
-    let dynamicTemp = {};
+    const dynamicTemp = {};
     if (props.param) {
       Object.keys(props.param).map((key) => {
         let str = props.param[key];
@@ -799,9 +799,9 @@ export function usePopBiz(ob, tableRef?) {
         selectRows.value = [];
         checkedKeys.value = [];
       }
-      let rowKey = combineRowKey(record);
+      const rowKey = combineRowKey(record);
       if (!unref(checkedKeys) || unref(checkedKeys).length == 0) {
-        let arr1: any[] = [],
+        const arr1: any[] = [],
           arr2: any[] = [];
         arr1.push(record);
         arr2.push(rowKey);
@@ -814,7 +814,7 @@ export function usePopBiz(ob, tableRef?) {
           //selectRows.value.push(record);
         } else {
           //已选中就取消
-          let rowKey_index = unref(checkedKeys).indexOf(rowKey);
+          const rowKey_index = unref(checkedKeys).indexOf(rowKey);
           checkedKeys.value.splice(rowKey_index, 1);
           //selectRows.value.splice(rowKey_index, 1);
         }
@@ -826,7 +826,7 @@ export function usePopBiz(ob, tableRef?) {
 
   //防止字典中有垃圾数据
   function initDictOptionData(arr) {
-    let obj = {};
+    const obj = {};
     Object.keys(arr).map((k) => {
       obj[k] = arr[k].filter((item) => {
         return item != null;
@@ -845,7 +845,7 @@ export function usePopBiz(ob, tableRef?) {
       return;
     }
 
-    for (let key in obj) {
+    for (const key in obj) {
       if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
         delete obj[key];
       }
@@ -892,15 +892,15 @@ export function usePopBiz(ob, tableRef?) {
   // 超链点击事件--> 打开一个modal窗口
   function openHrefCompModal(href) {
     // 解析 href 参数
-    let index = href.indexOf('?');
+    const index = href.indexOf('?');
     let path = href;
     if (index !== -1) {
       path = href.substring(0, index);
-      let paramString = href.substring(index + 1, href.length);
-      let paramArray = paramString.split('&');
-      let params = {};
+      const paramString = href.substring(index + 1, href.length);
+      const paramArray = paramString.split('&');
+      const params = {};
       paramArray.forEach((paramObject) => {
-        let paramItem = paramObject.split('=');
+        const paramItem = paramObject.split('=');
         params[paramItem[0]] = paramItem[1];
       });
       hrefComponent.value.params = params;
@@ -916,8 +916,8 @@ export function usePopBiz(ob, tableRef?) {
    * emit事件 获取选中的行数据
    */
   function getOkSelectRows(): any[] {
-    let arr = unref(selectRows);
-    let selectedRowKeys = checkedKeys.value;
+    const arr = unref(selectRows);
+    const selectedRowKeys = checkedKeys.value;
     console.log('arr', arr);
     if (!selectedRowKeys || selectedRowKeys.length <= 0) {
       return [];
@@ -925,10 +925,10 @@ export function usePopBiz(ob, tableRef?) {
     if (!arr || arr.length <= 0) {
       return [];
     }
-    let rows: any = [];
-    for (let key of selectedRowKeys) {
+    const rows: any = [];
+    for (const key of selectedRowKeys) {
       for (let i = 0; i < arr.length; i++) {
-        let combineKey = combineRowKey(arr[i]);
+        const combineKey = combineRowKey(arr[i]);
         if (key === combineKey) {
           rows.push(toRaw(arr[i]));
           break;

+ 24 - 24
src/components/jeecg/comment/useComment.ts

@@ -62,7 +62,7 @@ export function getGloablEmojiIndex(){
  * @param params
  */
 export const queryById = (id) => {
-  let params = { id: id };
+  const params = { id: id };
   return defHttp.get({ url: Api.queryById, params },{ isTransformResponse: false });
 };
 
@@ -84,7 +84,7 @@ export const deleteOne = (params) => {
  * @param params
  */
 export const saveOne = (params) => {
-  let url = Api.addText;
+  const url = Api.addText;
   return defHttp.post({ url: url, params }, { isTransformResponse: false });
 };
 
@@ -101,7 +101,7 @@ export const getLogList = (params) => defHttp.get({ url: Api.logList, params },
 export const uploadFileUrl = `${baseUploadUrl}/sys/comment/addFile`;
 
 export function useCommentWithFile(props) {
-  let uploadData = {
+  const uploadData = {
     biz: 'comment',
     commentId: '',
   };
@@ -123,7 +123,7 @@ export function useCommentWithFile(props) {
    */
   async function saveComment(obj) {
     const {fromUserId, toUserId, commentId, commentContent} = obj;
-    let commentData = {
+    const commentData = {
       tableId: props.tableId,
       tableName: props.tableName,
       tableDataId: props.dataId,
@@ -149,7 +149,7 @@ export function useCommentWithFile(props) {
   }
 
   async function uploadOne(file) {
-    let url = uploadFileUrl;
+    const url = uploadFileUrl;
     const formData = new FormData();
     formData.append('file', file);
     formData.append('tableName', props.tableName);
@@ -179,8 +179,8 @@ export function useCommentWithFile(props) {
    * @param file
    */
   async function saveSysFormFile(file){
-    let url = '/sys/comment/addFile';
-    let params = {
+    const url = '/sys/comment/addFile';
+    const params = {
       fileId: file.id,
       commentId: uploadData.commentId
     }
@@ -190,7 +190,7 @@ export function useCommentWithFile(props) {
   async function uploadFiles(fileList) {
     if (fileList && fileList.length > 0) {
       for (let i = 0; i < fileList.length; i++) {
-        let file = toRaw(fileList[i]);
+        const file = toRaw(fileList[i]);
         if(file.exist === true){
           await saveSysFormFile(file);
         }else{
@@ -209,11 +209,11 @@ export function useCommentWithFile(props) {
 export function uploadMu(fileList) {
   const formData = new FormData();
   // let arr = []
-  for(let file of fileList){
+  for(const file of fileList){
     formData.append('files[]', file.originFileObj);
   }
   console.log(formData)
-  let url = `${baseUploadUrl}/sys/comment/addFile2`;
+  const url = `${baseUploadUrl}/sys/comment/addFile2`;
   uploadMyFile(url, formData).then((res: any) => {
     console.log('uploadMyFile', res);
   });
@@ -259,13 +259,13 @@ export function useFileList() {
   function getBase64(file, id){
     return new Promise((resolve, reject) => {
       //声明js的文件流
-      let reader = new FileReader();
+      const reader = new FileReader();
       if(file){
         //通过文件流将文件转换成Base64字符串
         reader.readAsDataURL(file);
         //转换成功后
         reader.onload = function () {
-          let base = reader.result;
+          const base = reader.result;
           console.log('base', base)
           imageSrcMap[id] = base;
           console.log('imageSrcMap', imageSrcMap)
@@ -278,24 +278,24 @@ export function useFileList() {
   }
   function handleImageSrc(file){
     if(isImage(file)){
-      let id = file.uid;
+      const id = file.uid;
       getBase64(file, id);
     }
   }
 
   function downLoad(file) {
-    let url = getFileAccessHttpUrl(file.url);
+    const url = getFileAccessHttpUrl(file.url);
     if (url) {
       window.open(url);
     }
   }
 
   function getFileSize(item) {
-    let size = item.fileSize;
+    const size = item.fileSize;
     if (!size) {
       return '0B';
     }
-    let temp = Math.round(size / 1024);
+    const temp = Math.round(size / 1024);
     return temp + ' KB';
   }
 
@@ -327,14 +327,14 @@ export function useFileList() {
       return getFileAccessHttpUrl(file.url);
     }
     if(isImage(file)){
-      let id = file.uid;
+      const id = file.uid;
       if(id){
         if(imageSrcMap[id]){
           return imageSrcMap[id];
         }
       }else if(file.url){
         //数据库中地址
-        let url = getFileAccessHttpUrl(file.url);
+        const url = getFileAccessHttpUrl(file.url);
         return url;
       }
     }
@@ -366,20 +366,20 @@ export function useFileList() {
    */
   async function viewImage(file) {
     if(isImage(file)){
-      let text = getImageSrc(file)
+      const text = getImageSrc(file)
       if (text) {
-        let imgList = [text];
+        const imgList = [text];
         createImgPreview({ imageList: imgList });
       }
     }else{
       if(file.url){
         //数据库中地址
-        let url = getFileAccessHttpUrl(file.url);
+        const url = getFileAccessHttpUrl(file.url);
         await initViewDomain();
         //本地测试需要将文件地址的localhost/127.0.0.1替换成IP, 或是直接修改全局domain
         //url = url.replace('localhost', '192.168.1.100')
         // 代码逻辑说明: 【TV360X-952】升级到kkfileview4.1.0---
-        let previewUrl = encodeURIComponent(encryptByBase64(url));
+        const previewUrl = encodeURIComponent(encryptByBase64(url));
         window.open(onlinePreviewDomain+'?url='+previewUrl);
       }
     }
@@ -427,7 +427,7 @@ export function useEmojiHtml(globalEmojiIndex){
       if (endsWith(before, 'alt="') || endsWith(before, 'data-text="')) {
         return match
       }
-      let emoji = globalEmojiIndex.findEmoji(p2)
+      const emoji = globalEmojiIndex.findEmoji(p2)
       if (!emoji) {
         return match
       }
@@ -441,7 +441,7 @@ export function useEmojiHtml(globalEmojiIndex){
   }
 
   function emoji2Html(emoji) {
-    let style = `position: absolute;top: -3px;left: 3px;width: 18px; height: 18px;background-position: ${emoji.getPosition()}`
+    const style = `position: absolute;top: -3px;left: 3px;width: 18px; height: 18px;background-position: ${emoji.getPosition()}`
     return `<span style="width: 24px" class="emoji-mart-emoji"><span class="my-emoji-icon emoji-set-apple emoji-type-image" style="${style}"> </span> </span>`
   }
   

+ 1 - 1
src/components/jeecg/thirdApp/jThirdApp.api.ts

@@ -24,7 +24,7 @@ export const getEnabledTypes = async () => {
   if (enabledTypes != null) {
     return cloneObject(enabledTypes);
   } else {
-    let { success, result } = await defHttp.get({ url: backEndUrl.getEnabledType }, { isTransformResponse: false });
+    const { success, result } = await defHttp.get({ url: backEndUrl.getEnabledType }, { isTransformResponse: false });
     if (success) {
       // 在此缓存
       enabledTypes = cloneObject(result);

+ 0 - 72
src/electron/index.ts

@@ -1,72 +0,0 @@
-import type {App} from "vue";
-import {router} from "@/router";
-import {useGlobSetting} from "@/hooks/setting";
-import { ElectronEnum } from '/@/enums/jeecgEnum'
-const glob = useGlobSetting();
-
-const _PRELOAD_UTILS = ElectronEnum.ELECTRON_API;
-
-export const $electron = {
-  // 当前是否为Electron平台
-  isElectron: () => glob.isElectronPlatform,
-
-  // 通过浏览器打开链接
-  openInBrowser: bindUtils('openInBrowser') as (url: string) => void,
-
-  resolveRoutePath,
-}
-
-function bindUtils(n: string) {
-  const fn = window[_PRELOAD_UTILS]?.[n];
-  if (typeof fn?.bind === 'function') {
-    return fn.bind(null);
-  }
-  return () => console.warn(`Electron preload util ${n} is not a function`);
-}
-
-// 解析路由路径
-function resolveRoutePath(path: string) {
-  return window.location.origin + window.location.pathname + router.resolve(path).href;
-}
-
-/**
- * 配置Electron
- */
-export function setupElectron(_: App) {
-  // 非Electron平台不执行
-  if (!$electron.isElectron()) {
-    return;
-  }
-  hookWindowOpen();
-  // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
-  hookNavigate();
-}
-function hookNavigate() {
-  // @ts-ignore
-  window[ElectronEnum.ELECTRON_API].onNavigate((path) => {
-    router.push({ path });
-  });
-}
-function hookWindowOpen() {
-  // 保存原生方法引用
-  const originFunc = window.open;
-  // 重写window.open方法
-  window['open'] = function (url, windowName, windowFeatures) {
-    url = typeof url === 'string' ? url.trim() : '';
-    if (!url) {
-      throw new Error('window.open: url is required');
-    }
-    // 判断是否以http或https开头
-    if (/^https?:\/\//.test(url)) {
-      // 判断是否为本地地址
-      if (url.startsWith(window.location.origin) || url.startsWith(window['_CONFIG']['domianURL'])) {
-        // 直接打开
-        return originFunc(url, windowName, windowFeatures);
-      }
-      // 调用Electron进行外部浏览器打开
-      return $electron.openInBrowser(url) as any;
-    }
-    // 自定义逻辑
-    return originFunc(url, windowName, windowFeatures)
-  }
-}

+ 0 - 4
src/enums/jeecgEnum.ts

@@ -21,7 +21,3 @@ export enum JDragConfigEnum {
   //拖拽缓存前缀
   DRAG_CACHE_PREFIX = 'drag-cache:',
 }
-// electron 枚举
-export enum ElectronEnum {
-  ELECTRON_API = '_ELECTRON_PRELOAD_UTILS_',
-}

+ 1 - 1
src/hooks/jeecg/useAdaptiveWidth.ts

@@ -41,7 +41,7 @@ export function useAdaptiveWidth(widthConfig = defWidthConfig, assign = true, de
     for (const key of configKeys) {
       try {
         // 通过js运算
-        let flag = new Function(`return ${innerWidth} ${key}`)();
+        const flag = new Function(`return ${innerWidth} ${key}`)();
         if (flag) {
           width = widthConfigAssign[key];
           break;

+ 0 - 3
src/hooks/setting/index.ts

@@ -12,7 +12,6 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
     VITE_GLOB_APP_OPEN_SSO,
     VITE_GLOB_DOMAIN_URL,
     VITE_GLOB_ONLINE_VIEW_URL,
-    VITE_GLOB_RUN_PLATFORM,
   } = getAppEnvConfig();
 
   // if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
@@ -37,8 +36,6 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
     viewUrl: VITE_GLOB_ONLINE_VIEW_URL,
     // true: 新任务办理页面弹窗, false:旧的任务办理页面弹窗
     useNewTaskModal: true,
-    // 当前是否运行在 electron 平台
-    isElectronPlatform: VITE_GLOB_RUN_PLATFORM === 'electron',
   };
 
   // 【JEECG作为乾坤子应用】乾坤子应用下,需要定义一下

+ 1 - 1
src/hooks/system/useAutoAdapt.ts

@@ -25,7 +25,7 @@ export function useAdapt(props?: AdaptOptions) {
   useWindowSizeFn(calcWidth, 100, { immediate: true });
   //计算宽度
   function calcWidth() {
-    let windowWidth = document.documentElement.clientWidth;
+    const windowWidth = document.documentElement.clientWidth;
     switch (true) {
       case windowWidth > ScreenSizeEnum.XL:
         width.value = props?.xl || '600px';

+ 10 - 10
src/hooks/system/useJvxeMethods.ts

@@ -10,7 +10,7 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
     defHttp
       .get({ url, params }, { isTransformResponse: false })
       .then((res) => {
-        let { result } = res;
+        const { result } = res;
         if (res.success && result) {
           if (Array.isArray(result)) {
             tab.dataSource = result;
@@ -35,7 +35,7 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
 
   /** 获取所有的editableTable实例*/
   function getAllTable() {
-    let values = Object.values(tableRefs);
+    const values = Object.values(tableRefs);
     return Promise.all(values);
   }
   /** 确定按钮点击事件 */
@@ -43,7 +43,7 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
     /** 触发表单验证 */
     getAllTable()
       .then((tables) => {
-        let values = formRef.value.getFieldsValue();
+        const values = formRef.value.getFieldsValue();
         return validateFormModelAndTables(formRef.value.validate, values, tables, formRef.value.getProps, false);
       })
       .then((allValues) => {
@@ -54,7 +54,7 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
         if (typeof classifyIntoFormData !== 'function') {
           throw throwNotFunction('classifyIntoFormData');
         }
-        let formData = classifyIntoFormData(allValues);
+        const formData = classifyIntoFormData(allValues);
         // 发起请求
         return requestAddOrEdit(formData);
       })
@@ -116,19 +116,19 @@ export function useValidateAntFormAndTable(activeKey, refMap) {
    * 获取所有子表数据
    */
   async function getSubFormAndTableData() {
-    let formData = {};
-    let all = Object.keys(refMap);
+    const formData = {};
+    const all = Object.keys(refMap);
     let key = '';
     for (let i = 0; i < all.length; i++) {
       key = all[i];
-      let instance = refMap[key].value;
+      const instance = refMap[key].value;
       if (instance.isForm) {
-        let subFormData = await validateFormAndGetData(instance, key);
+        const subFormData = await validateFormAndGetData(instance, key);
         if (subFormData) {
           formData[key + 'List'] = [subFormData];
         }
       } else {
-        let arr = await validateTableAndGetData(instance, key);
+        const arr = await validateTableAndGetData(instance, key);
         if (arr && arr.length > 0) {
           formData[key + 'List'] = arr;
         }
@@ -176,7 +176,7 @@ export function useValidateAntFormAndTable(activeKey, refMap) {
    */
   async function validateFormAndGetData(instance, key) {
     try {
-      let data = await instance.getFormData();
+      const data = await instance.getFormData();
       transformData(data);
       return data;
     } catch (e) {

+ 10 - 10
src/hooks/system/useListPage.ts

@@ -64,10 +64,10 @@ export function useListPage(options: ListPageOptions) {
   // 导出 excel
   async function onExportXls() {
     // 代码逻辑说明: 导出新增自定义参数------------
-    let { url, name, params } = options?.exportConfig ?? {};
-    let realUrl = typeof url === 'function' ? url() : url;
+    const { url, name, params } = options?.exportConfig ?? {};
+    const realUrl = typeof url === 'function' ? url() : url;
     if (realUrl) {
-      let title = typeof name === 'function' ? name() : name;
+      const title = typeof name === 'function' ? name() : name;
       // 代码逻辑说明: erp代码生成 子表 导出报错,原因未知-
       let paramsForm:any = {};
       try {
@@ -91,7 +91,7 @@ export function useListPage(options: ListPageOptions) {
         // 代码逻辑说明: [QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962
         const realParams = isFunction(params) ? await params() : { ...(params || {}) };
         Object.keys(realParams).map((k) => {
-          let temp = (realParams as object)[k];
+          const temp = (realParams as object)[k];
           if (temp) {
             paramsForm[k] = unref(temp);
           }
@@ -123,10 +123,10 @@ export function useListPage(options: ListPageOptions) {
    */
   async function exportColumns(paramsForm: any) {
     //获取表格的列
-    let columns = getColumns();
+    const columns = getColumns();
     if(columns && columns.length >0){
       //需要导出的字段
-      let exportFields:any = [];
+      const exportFields:any = [];
       //是否有隐藏列
       let hiddenColumns = false;
       for (const column of columns) {
@@ -148,9 +148,9 @@ export function useListPage(options: ListPageOptions) {
 
   // 导入 excel
   function onImportXls(file) {
-    let { url, success } = options?.importConfig ?? {};
+    const { url, success } = options?.importConfig ?? {};
     // 代码逻辑说明: erp代码生成 子表 导入地址是动态的
-    let realUrl = typeof url === 'function' ? url() : url;
+    const realUrl = typeof url === 'function' ? url() : url;
     if (realUrl) {
       return handleImportXls(file, realUrl, success || reload);
     } else {
@@ -371,10 +371,10 @@ export function useListTable(tableProps: TableProps): [
    */
   function setTableProps(formConfig: any) {
     const replaceAttributeArray: string[] = ['baseColProps','labelCol'];
-    for (let item of replaceAttributeArray) {
+    for (const item of replaceAttributeArray) {
       if(formConfig && formConfig[item]){
         if(defaultTableProps.formConfig){
-          let defaultFormConfig:any = defaultTableProps.formConfig;
+          const defaultFormConfig:any = defaultTableProps.formConfig;
           defaultFormConfig[item] = formConfig[item];
         }
         formConfig[item] = {};

+ 7 - 7
src/hooks/system/useMethods.ts

@@ -26,7 +26,7 @@ export function useMethods() {
   async function exportXls(name, url, params, isXlsx = false, timeout = 60000) {
     // 代码逻辑说明: 【JHHB-794】用户管理,跨页全选后,点击用户导出没反应---
     if(params?.selections){
-      let split = params.selections.split(",");
+      const split = params.selections.split(",");
       if(split && split.length > 100){
         createMessage.warning('最多可选择 100 项进行导出!');
         return;
@@ -49,7 +49,7 @@ export function useMethods() {
     }
     const data = response.data;
     // 代码逻辑说明: 导出excel失败提示,不进行导出---
-    let reader = new FileReader()
+    const reader = new FileReader()
     reader.readAsText(data, 'utf-8')
     reader.onload = async () => {
       if(reader.result){
@@ -82,11 +82,11 @@ export function useMethods() {
     const isReturn = (fileInfo) => {
       try {
         if (fileInfo.code === 201) {
-          let {
+          const {
             message,
             result: { msg, fileUrl, fileName },
           } = fileInfo;
-          let href = glob.uploadUrl + fileUrl;
+          const href = glob.uploadUrl + fileUrl;
           createWarningModal({
             title: message,
             centered: false,
@@ -126,7 +126,7 @@ export function useMethods() {
     if (!name || typeof name != 'string') {
       name = '导出文件';
     }
-    let blobOptions = { type: 'application/vnd.ms-excel' };
+    const blobOptions = { type: 'application/vnd.ms-excel' };
     let fileSuffix = '.xls';
     if (isXlsx) {
       blobOptions['type'] = XLSX_MIME_TYPE;
@@ -135,8 +135,8 @@ export function useMethods() {
     if (typeof window.navigator.msSaveBlob !== 'undefined') {
       window.navigator.msSaveBlob(new Blob([data], blobOptions), name + fileSuffix);
     } else {
-      let url = window.URL.createObjectURL(new Blob([data], blobOptions));
-      let link = document.createElement('a');
+      const url = window.URL.createObjectURL(new Blob([data], blobOptions));
+      const link = document.createElement('a');
       link.style.display = 'none';
       link.href = url;
       link.setAttribute('download', name + fileSuffix);

+ 7 - 7
src/hooks/system/useThirdLogin.ts

@@ -37,7 +37,7 @@ export function useThirdLogin() {
   const thirdCaptcha = ref('');
   //第三方登录
   function onThirdLogin(source) {
-    let url = `${glob.uploadUrl}/sys/thirdLogin/render/${source}`;
+    const url = `${glob.uploadUrl}/sys/thirdLogin/render/${source}`;
     const openWin = window.open(
       url,
       `login ${source}`,
@@ -46,15 +46,15 @@ export function useThirdLogin() {
     thirdType.value = source;
     thirdLoginInfo.value = {};
     thirdLoginState.value = false;
-    let receiveMessage = function (event) {
-      let token = event.data;
+    const receiveMessage = function (event) {
+      const token = event.data;
       if (typeof token === 'string') {
         //如果是字符串类型 说明是token信息
         if (token === '登录失败') {
           createMessage.warning(token);
         } else if (token.includes('绑定手机号')) {
           bindingPhoneModal.value = true;
-          let strings = token.split(',');
+          const strings = token.split(',');
           thirdUserUuid.value = strings[1];
         } else {
           doThirdLogin(token);
@@ -119,7 +119,7 @@ export function useThirdLogin() {
       .post({ url: '/sys/third/user/create', params: { thirdLoginInfo: unref(thirdLoginInfo) } }, { isTransformResponse: false })
       .then((res) => {
         if (res.success) {
-          let token = res.result;
+          const token = res.result;
           doThirdLogin(token);
           thirdConfirmShow.value = false;
         } else {
@@ -132,7 +132,7 @@ export function useThirdLogin() {
   }
   // 核实密码
   function thirdLoginCheckPassword() {
-    let params = Object.assign({}, unref(thirdLoginInfo), { password: unref(thirdLoginPassword) });
+    const params = Object.assign({}, unref(thirdLoginInfo), { password: unref(thirdLoginPassword) });
     defHttp.post({ url: '/sys/third/user/checkPassword', params }, { isTransformResponse: false }).then((res) => {
       if (res.success) {
         thirdLoginNoPassword();
@@ -162,7 +162,7 @@ export function useThirdLogin() {
     if (!unref(thirdCaptcha)) {
       cmsFailed('请输入验证码');
     }
-    let params = {
+    const params = {
       mobile: unref(thirdPhone),
       captcha: unref(thirdCaptcha),
       thirdUserUuid: unref(thirdUserUuid),

+ 1 - 1
src/hooks/web/useCopyModal.ts

@@ -19,7 +19,7 @@ const { createMessage, createConfirm } = useMessage();
 
 /** 创建复制弹窗 */
 function createCopyModal(options: Partial<IOptions>) {
-  let modal = createConfirm({
+  const modal = createConfirm({
     ...options,
     iconType: options.iconType ?? 'info',
     width: options.width ?? 500,

+ 7 - 7
src/hooks/web/usePermission.ts

@@ -33,10 +33,10 @@ export function usePermission() {
   function hasBpmPermission(code, type) {
     // 禁用-type=2
     // 显示-type=1
-    let codeList: string[] = [];
-    let permissionList = formData.permissionList;
+    const codeList: string[] = [];
+    const permissionList = formData.permissionList;
     if (permissionList && permissionList.length > 0) {
-      for (let item of permissionList) {
+      for (const item of permissionList) {
         if (item.type == type) {
           codeList.push(item.action);
         }
@@ -95,7 +95,7 @@ export function usePermission() {
       if (!isArray(value) && allCodeList && allCodeList.length > 0) {
         //=============================工作流权限判断-显示-begin==============================================
         if (formData) {
-          let code = value as string;
+          const code = value as string;
           if (hasBpmPermission(code, '1') === true) {
             return true;
           }
@@ -113,7 +113,7 @@ export function usePermission() {
   function isDisabledAuth(value?: RoleEnum | RoleEnum[] | string | string[], def = true): boolean {
     //=============================工作流权限判断-禁用-begin==============================================
     if (formData) {
-      let code = value as string;
+      const code = value as string;
       if (hasBpmPermission(code, '2') === true) {
         return true;
       }
@@ -153,9 +153,9 @@ export function usePermission() {
    * 判断是不是 代码里写了逻辑但是没有配置权限这种情况
    */
   function isCodingButNoConfig(code) {
-    let all = permissionStore.allAuthList;
+    const all = permissionStore.allAuthList;
     if (all && all instanceof Array) {
-      let temp = all.filter((item) => item.action == code);
+      const temp = all.filter((item) => item.action == code);
       if (temp && temp.length > 0) {
         if (temp[0].status == '0') {
           return true;

+ 3 - 3
src/hooks/web/useSso.ts

@@ -8,15 +8,15 @@ const globSetting = useGlobSetting();
 const openSso = globSetting.openSso;
 export function useSso() {
   // 代码逻辑说明: 【QQYUN-7805】SSO登录强制用http #957---
-  let locationUrl = document.location.protocol +"//" + window.location.host + '/';
+  const locationUrl = document.location.protocol +"//" + window.location.host + '/';
 
   /**
    * 单点登录
    */
   async function ssoLogin() {
     if (openSso == 'true') {
-      let token = getToken();
-      let ticket = getUrlParam('ticket');
+      const token = getToken();
+      const ticket = getUrlParam('ticket');
       if (!token) {
         if (ticket) {
           await validateCasLogin({

+ 1 - 1
src/hooks/web/useTabs.ts

@@ -103,7 +103,7 @@ export function useTabs(_router?: Router) {
     if(path.indexOf('?')>0){
       path = path.split('?')[0];
     }
-    let tab = tabStore.getTabList.find((item) => item.path.indexOf(path)>=0)!;
+    const tab = tabStore.getTabList.find((item) => item.path.indexOf(path)>=0)!;
     if(tab){
       tabStore.closeTab(tab, router);
     }

+ 1 - 42
src/layouts/default/header/components/notify/index.vue

@@ -33,7 +33,6 @@
 
   import SysMessageModal from '/@/views/system/message/components/SysMessageModal.vue';
   import ChangePasswordModal from './ChangePasswordModal.vue';
-  import { ElectronEnum } from '/@/enums/jeecgEnum';
   import { defHttp } from '@/utils/http/axios';
 
   export default defineComponent({
@@ -114,11 +113,6 @@
           // 代码逻辑说明: 【QQYUN-12162】OA项目改造,系统重消息拆分,目前消息都在一起 需按分类进行拆分---
           unReadNum.value = msgCount;
           messageCount.value = msgCount.count ? msgCount.count : 0;
-          // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
-          if (glob.isElectronPlatform) {
-            window[ElectronEnum.ELECTRON_API].sendNotifyFlash(messageCount.value);
-            window[ElectronEnum.ELECTRON_API].trayFlash();
-          }
         } catch (e) {
           console.warn('系统消息通知异常:', e);
         }
@@ -165,42 +159,7 @@
             noticeType.value = data.noticeType;
           }
           //后台保存数据太慢 前端延迟刷新消息
-          setTimeout(() => {
-            // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
-            notification(data);
-            loadData();
-          }, 1000);
-        }
-      }
-      // 桌面应用通知
-      function notification(data) {
-        if (glob.isElectronPlatform && (data.noticeType || data.cmd == 'email')) {
-          // 流程、文件、日程、系统、会议
-          // flow、file、plan、system、meeting
-          let title = '';
-          let msgTxt = '';
-          let path = '';
-          if (data.noticeType === 'flow') {
-            title = '流程';
-            path = '/task/myHandleTaskInfo';
-          } else if (data.noticeType === 'file') {
-            title = '文件';
-            path = '/file';
-          } else if (data.noticeType === 'plan') {
-            title = '日程';
-            path = '/plan/view';
-          } else if (data.noticeType === 'system') {
-            title = '系统';
-            path = '/monitor/mynews';
-          } else if (data.noticeType === 'meeting') {
-            title = '会议';
-            path = '/meeting';
-          } else if (data.cmd === 'email') {
-            title = '邮件';
-            path = '/eoa/email?type=inbox';
-          }
-          msgTxt = data.msgTxt ?? '查看详情';
-          window[ElectronEnum.ELECTRON_API].sendNotification(`有新的${title}消息`, msgTxt, path);
+          loadData();
         }
       }
       // 清空消息

+ 1 - 1
src/logics/theme/updateBackground.ts

@@ -62,7 +62,7 @@ export function updateSidebarBgColor(color?: string) {
     }
   }
   // 代码逻辑说明: 【QQYUN-5922】logo背景色渐变
-  let findIndex = SIDE_BAR_BG_COLOR_LIST.findIndex((item) => item === color);
+  const findIndex = SIDE_BAR_BG_COLOR_LIST.findIndex((item) => item === color);
   setCssVar(SIDER_LOGO_BG_COLOR, findIndex == -1 ? 'linear-gradient(180deg, #000000, #282828)' : SIDER_LOGO_BG_COLOR_LIST[findIndex]);
   setCssVar(SIDER_DARK_BG_COLOR, color);
   setCssVar(SIDER_DARK_DARKEN_BG_COLOR, darken(color!, 6));

+ 3 - 7
src/main.ts

@@ -14,7 +14,6 @@ import { setupRouterGuard } from '/@/router/guard';
 import { setupStore } from '/@/store';
 import { setupGlobDirectives } from '/@/directives';
 import { setupI18n } from '/@/locales/setupI18n';
-import { setupElectron } from '@/electron';
 import { registerGlobComp } from '/@/components/registerGlobComp';
 import { registerThirdComp } from '/@/settings/registerThirdComp';
 import { useSso } from '/@/hooks/web/useSso';
@@ -72,9 +71,6 @@ async function bootstrap(props?: MainAppProps) {
   // 注册第三方组件
   await registerThirdComp(app);
 
-  // 配置electron
-  setupElectron(app);
-
   // 当路由准备好时再执行挂载( https://next.router.vuejs.org/api/#isready)
   await router.isReady();
 
@@ -100,11 +96,11 @@ function getMainAppProps(): MainAppProps {
   // 从 queryString 中获取
   const searchParams = new URLSearchParams(window.location.search);
   // 隐藏侧边栏(菜单)
-  let hideSider = searchParams.get('hideSider') === 'true';
+  const hideSider = searchParams.get('hideSider') === 'true';
   // 隐藏顶部
-  let hideHeader = searchParams.get('hideHeader') === 'true';
+  const hideHeader = searchParams.get('hideHeader') === 'true';
   // 隐藏 多Tab 切换
-  let hideMultiTabs = searchParams.get('hideMultiTabs') === 'true';
+  const hideMultiTabs = searchParams.get('hideMultiTabs') === 'true';
 
   return {
     hideSider,

+ 3 - 3
src/router/guard/permissionGuard.ts

@@ -102,10 +102,10 @@ export function createPermissionGuard(router: Router) {
       } else {
         //----------【首次登陆并且是企业微信或者钉钉的情况下才会调用】-----------------------------------------------
         //只有首次登陆并且是企业微信或者钉钉的情况下才会调用
-        let href = window.location.href;
+        const href = window.location.href;
         //判断当前是auth2页面,并且是钉钉/企业微信,并且包含tenantId参数
         if(isOAuth2AppEnv() && href.indexOf("/tenantId/")!= -1){
-          let params = to.params;
+          const params = to.params;
           if(params && params.path && params.path.length>0){
             //直接获取参数最后一位
             setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,params.path[params.path.length-1])
@@ -127,7 +127,7 @@ export function createPermissionGuard(router: Router) {
         console.log("to.fullPath 1",to.fullPath)
         console.log("to.path 2",to.path)
         
-        let getFullPath = to.fullPath;
+        const getFullPath = to.fullPath;
         if(getFullPath=='/' || getFullPath=='/500' || getFullPath=='/400' || getFullPath=='/login?redirect=/' || getFullPath=='/login?redirect=/login?redirect=/'){
           return;
         }

+ 7 - 14
src/router/index.ts

@@ -1,9 +1,8 @@
 import type { RouteRecordRaw } from 'vue-router';
 import type { App } from 'vue';
 
-import { $electron } from "@/electron";
 import { basicRoutes } from './routes';
-import {createRouter as createVueRouter, destroyRouter, router} from './router'
+import { createRouter as createVueRouter, destroyRouter, router } from './router';
 
 // 白名单应该包含基本静态路由
 const WHITE_NAME_LIST: string[] = [];
@@ -18,14 +17,11 @@ getRouteNames(basicRoutes);
  * 创建路由实例
  */
 export function createRouter() {
-  let router = createVueRouter({
-      routes: basicRoutes as unknown as RouteRecordRaw[],
-      strict: true,
-      scrollBehavior: () => ({left: 0, top: 0}),
-    },
-    // 如果是 Electron 环境,则使用 hash 路由
-    $electron.isElectron(),
-  )
+  const router = createVueRouter({
+    routes: basicRoutes as unknown as RouteRecordRaw[],
+    strict: true,
+    scrollBehavior: () => ({ left: 0, top: 0 }),
+  });
 
   // TODO 【QQYUN-4517】【表单设计器】记录分享路由守卫测试
   // @ts-ignore
@@ -53,7 +49,4 @@ export function setupRouter(app: App<Element>) {
   app.use(router);
 }
 
-export {
-  router,
-  destroyRouter,
-}
+export { router, destroyRouter };

+ 1 - 1
src/router/router.ts

@@ -21,7 +21,7 @@ export function createRouter(options: Partial<RouterOptions>, useHashHistory = f
   const createFn = useHashHistory ? createWebHashHistory : createWebHistory;
   webHistory = createFn(import.meta.env.VITE_PUBLIC_PATH);
   // app router
-  let router = createVueRouter({
+  const router = createVueRouter({
     history: webHistory,
     routes: [],
     ...options,

+ 5 - 5
src/settings/componentSetting.ts

@@ -27,9 +27,9 @@ export default {
     defaultSortFn: (sortInfo: SorterResult) => {
       // 代码逻辑说明: VUEN-2199【表单设计器】多字段排序
       if(sortInfo instanceof Array){
-        let sortInfoArray:any[] = []
-        for(let item of sortInfo){
-          let info = getSort(item);
+        const sortInfoArray:any[] = []
+        for(const item of sortInfo){
+          const info = getSort(item);
           if(info){
             sortInfoArray.push(info)
           }
@@ -38,7 +38,7 @@ export default {
           sortInfoString: JSON.stringify(sortInfoArray)
         }
       }else{
-        let info = getSort(sortInfo)
+        const info = getSort(sortInfo)
         return info || {}
       }
     },
@@ -79,7 +79,7 @@ export default {
 function getSort(item){
   const { field, order } = item;
   if (field && order) {
-    let sortType = 'ascend' == order ? 'asc' : 'desc';
+    const sortType = 'ascend' == order ? 'asc' : 'desc';
     return {
       // 排序字段
       column: field,

+ 34 - 34
src/utils/common/compUtils.ts

@@ -26,9 +26,9 @@ export const getFileAccessHttpUrl = (fileUrl, prefix = 'http') => {
   try {
     if (fileUrl && fileUrl.length > 0 && !fileUrl.startsWith(prefix)) {
       //判断是否是数组格式
-      let isArray = fileUrl.indexOf('[') != -1;
+      const isArray = fileUrl.indexOf('[') != -1;
       if (!isArray) {
-        let prefix = `${baseApiUrl}/sys/common/static/`;
+        const prefix = `${baseApiUrl}/sys/common/static/`;
         // 判断是否已包含前缀
         if (!fileUrl.startsWith(prefix)) {
           result = `${prefix}${fileUrl}`;
@@ -43,7 +43,7 @@ export const getFileAccessHttpUrl = (fileUrl, prefix = 'http') => {
  * 触发 window.resize
  */
 export function triggerWindowResizeEvent() {
-  let event: any = document.createEvent('HTMLEvents');
+  const event: any = document.createEvent('HTMLEvents');
   event.initEvent('resize', true, true);
   event.eventType = 'message';
   window.dispatchEvent(event);
@@ -71,7 +71,7 @@ export function randomString(length: number, chats?: string) {
   }
   let str = '';
   for (let i = 0; i < length; i++) {
-    let num = random(0, chats.length - 1);
+    const num = random(0, chats.length - 1);
     str += chats[num];
   }
   return str;
@@ -145,7 +145,7 @@ export const toTree = (array, startPid, currentDept, opt) => {
  * @param fieldKeys 要计算合计的列字段
  */
 export function mapTableTotalSummary(tableData: Recordable[], fieldKeys: string[]) {
-  let totals: any = { _row: '合计', _index: '合计' };
+  const totals: any = { _row: '合计', _index: '合计' };
   fieldKeys.forEach((key) => {
     totals[key] = tableData.reduce((prev, next) => {
       // 代码逻辑说明: 【QQYUN-7891】PR 合计工具方法,转换为Nuber类型再计算
@@ -176,7 +176,7 @@ export function mapTableTotalSummary(tableData: Recordable[], fieldKeys: string[
 export function simpleDebounce(fn, delay = 100) {
   let timer: any | null = null;
   return function () {
-    let args = arguments;
+    const args = arguments;
     if (timer) {
       clearTimeout(timer);
     }
@@ -231,8 +231,8 @@ export function dateFormat(date, block) {
  * 目前使用的地方:JVxeTable Span模式
  */
 export function getEventPath(event) {
-  let target = event.target;
-  let path = (event.composedPath && event.composedPath()) || event.path;
+  const target = event.target;
+  const path = (event.composedPath && event.composedPath()) || event.path;
 
   if (path != null) {
     return path.indexOf(window) < 0 ? path.concat(window) : path;
@@ -242,7 +242,7 @@ export function getEventPath(event) {
     return [window];
   }
 
-  let getParents = (node, memo) => {
+  const getParents = (node, memo) => {
     const parentNode = node.parentNode;
 
     if (!parentNode) {
@@ -262,7 +262,7 @@ export function getEventPath(event) {
  * @returns {boolean} 成功 push 返回 true,不处理返回 false
  */
 export function pushIfNotExist(array, value, key?) {
-  for (let item of array) {
+  for (const item of array) {
     if (key && item[key] === value[key]) {
       return false;
     } else if (item === value) {
@@ -282,7 +282,7 @@ export function filterObj(obj) {
     return;
   }
 
-  for (let key in obj) {
+  for (const key in obj) {
     if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
       delete obj[key];
     }
@@ -306,13 +306,13 @@ export function underLine2CamelCase(string: string) {
  */
 export function findTree(treeList: any[], fn: Fn, childrenKey = 'children') {
   for (let i = 0; i < treeList.length; i++) {
-    let item = treeList[i];
+    const item = treeList[i];
     if (fn(item, i, treeList)) {
       return item;
     }
-    let children = item[childrenKey];
+    const children = item[childrenKey];
     if (isArray(children)) {
-      let findResult = findTree(children, fn, childrenKey);
+      const findResult = findTree(children, fn, childrenKey);
       if (findResult) {
         return findResult;
       }
@@ -374,7 +374,7 @@ export function getAutoScrollContainer(node: HTMLElement) {
  */
 export  function checkChildrenHidden(menuTreeItem){
   //是否是聚合路由
-  let alwaysShow=menuTreeItem.alwaysShow;
+  const alwaysShow=menuTreeItem.alwaysShow;
   if(alwaysShow){
     return false;
   }
@@ -410,7 +410,7 @@ export function calculateFileSize(fileSize, unit?) {
  * 获取上传header
  */
 export function getHeaders() {
-  let tenantId = getTenantId();
+  const tenantId = getTenantId();
   return reactive({
     'X-Access-Token': getToken(),
     'X-Tenant-Id': tenantId ? tenantId : '0',
@@ -431,7 +431,7 @@ export function getUserInfoByExpression(expression) {
     return dayjs().format('HH:mm:ss');
   }
   const userStore = useUserStoreWithOut();
-  let userInfo = userStore.getUserInfo;
+  const userInfo = userStore.getUserInfo;
   if (userInfo) {
     switch (expression) {
       case 'sysUserId':
@@ -470,10 +470,10 @@ export function replaceUserInfoByExpression(expression: string | any[]) {
     if (typeof str !== 'string') {
       return str;
     }
-    let result = str.match(reg);
+    const result = str.match(reg);
     if (result && result.length > 0) {
       result.forEach((item) => {
-        let userInfo = getUserInfoByExpression(item.substring(2, item.length - 1));
+        const userInfo = getUserInfoByExpression(item.substring(2, item.length - 1));
         str = str.replace(item, userInfo);
       });
     }
@@ -495,10 +495,10 @@ export async function userExitChangeLoginTenantId(tenantId){
   let currentTenantId = null;
   const data = await defHttp.get({ url });
   if(data && data.list){
-    let arr = data.list;
+    const arr = data.list;
     if(arr.length>0){
       //step 2.判断当前id是否存在用户租户中
-      let filterTenantId = arr.filter((item) => item.id == tenantId);
+      const filterTenantId = arr.filter((item) => item.id == tenantId);
       //存在说明不是退出的不是当前租户,还用用来的租户即可
       if(filterTenantId && filterTenantId.length>0){
         currentTenantId = tenantId;
@@ -508,7 +508,7 @@ export async function userExitChangeLoginTenantId(tenantId){
       }
     }
   }
-  let loginTenantId = getTenantId();
+  const loginTenantId = getTenantId();
   userStore.setTenant(currentTenantId);
 
   //租户为空,说明没有租户了,需要刷新页面。或者当前租户和退出的租户一致则需要刷新浏览器
@@ -523,7 +523,7 @@ export async function userExitChangeLoginTenantId(tenantId){
  * @param title 标题
  */
 export function tenantSaasMessage(title){
-  let tenantId = getTenantId();
+  const tenantId = getTenantId();
   if(!tenantId){
     Modal.confirm({
       title:title,
@@ -545,16 +545,16 @@ export function sameDay(dateStr) {
     return false;
   }
   // 获取当前日期
-  let currentDate = new Date();
-  let currentDay = currentDate.getDate();
-  let currentMonth = currentDate.getMonth();
-  let currentYear = currentDate.getFullYear();
+  const currentDate = new Date();
+  const currentDay = currentDate.getDate();
+  const currentMonth = currentDate.getMonth();
+  const currentYear = currentDate.getFullYear();
 
   //创建另一个日期进行比较
-  let otherDate = new Date(dateStr);
-  let otherDay = otherDate.getDate();
-  let otherMonth = otherDate.getMonth();
-  let otherYear = otherDate.getFullYear();
+  const otherDate = new Date(dateStr);
+  const otherDay = otherDate.getDate();
+  const otherMonth = otherDate.getMonth();
+  const otherYear = otherDate.getFullYear();
 
   //比较日期
   if (currentDay === otherDay && currentMonth === otherMonth && currentYear === otherYear) {
@@ -619,7 +619,7 @@ export async function getDepartPathNameByOrgCode(orgCode, label, depId){
   if (orgCode) {
     depId = "";
   }
-  let result = await defHttp.get({ url: "/sys/sysDepart/getDepartPathNameByOrgCode", params:{ orgCode: orgCode, depId: depId } }, { isTransformResponse: false });
+  const result = await defHttp.get({ url: "/sys/sysDepart/getDepartPathNameByOrgCode", params:{ orgCode: orgCode, depId: depId } }, { isTransformResponse: false });
   if (result.success) {
     return result.result;
   }
@@ -679,8 +679,8 @@ export function getMultiDepartPathName(title,id) {
  */
 export function getDepartName(departNamePath) {
   if(departNamePath){
-    let names = departNamePath.split(",");
-    let textElements:any = [];
+    const names = departNamePath.split(",");
+    const textElements:any = [];
     for (let i = 0; i < names.length; i++) {
       textElements.push(h("p", { style: { marginBottom: '2px'} }, names[i]));
     }

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 3 - 3
src/utils/common/renderUtils.ts


+ 10 - 10
src/utils/common/vxeUtils.ts

@@ -12,15 +12,15 @@ export async function validateFormModelAndTables(validate, formData, cases, prop
     throw `validate 参数需要的是一个方法,而传入的却是${typeof validate}`;
   }
   let dataMap = {};
-  let values = await new Promise((resolve, reject) => {
+  const values = await new Promise((resolve, reject) => {
     // 验证主表表单
     validate()
       .then(() => {
         // 代码逻辑说明: [VUEN-912]一对多用户组件(所有风格,单表和树没问题)保存报错------------
-        for (let data in formData) {
+        for (const data in formData) {
           //如果该数据是数组
           if (formData[data] instanceof Array) {
-            let valueType = getValueType(props, data);
+            const valueType = getValueType(props, data);
             //如果是字符串类型的需要变成以逗号分割的字符串
             if (valueType === 'string') {
               formData[data] = formData[data].join(',');
@@ -36,7 +36,7 @@ export async function validateFormModelAndTables(validate, formData, cases, prop
   });
   Object.assign(dataMap, { formValue: values });
   // 验证所有子表的表单
-  let subData = await validateTables(cases, autoJumpTab);
+  const subData = await validateTables(cases, autoJumpTab);
   // 合并最终数据
   dataMap = Object.assign(dataMap, { tablesValue: subData });
   return dataMap;
@@ -51,13 +51,13 @@ export function validateTables(cases, autoJumpTab = true) {
     throw `'validateTables'函数的'cases'参数需要的是一个数组,而传入的却是${typeof cases}`;
   }
   return new Promise((resolve, reject) => {
-    let tablesData: any = [];
+    const tablesData: any = [];
     let index = 0;
     if (!cases || cases.length === 0) {
       resolve(tablesData);
     }
     (function next() {
-      let vm = cases[index];
+      const vm = cases[index];
       vm.value.validateTable().then((errMap) => {
         // 校验通过
         if (!errMap) {
@@ -69,12 +69,12 @@ export function validateTables(cases, autoJumpTab = true) {
         } else {
           // 尝试获取tabKey,如果在ATab组件内即可获取
           let paneKey;
-          let tabPane = getVmParentByName(vm.value, 'ATabPane');
+          const tabPane = getVmParentByName(vm.value, 'ATabPane');
           if (tabPane) {
             paneKey = tabPane.$.vnode.key;
             // 自动跳转到该表格
             if (autoJumpTab) {
-              let tabs = getVmParentByName(tabPane, 'Tabs');
+              const tabs = getVmParentByName(tabPane, 'Tabs');
               tabs && tabs.setActiveKey && tabs.setActiveKey(paneKey);
             }
           }
@@ -88,12 +88,12 @@ export function validateTables(cases, autoJumpTab = true) {
 }
 
 export function getVmParentByName(vm, name) {
-  let parent = vm.$parent;
+  const parent = vm.$parent;
   if (parent && parent.$options) {
     if (parent.$options.name === name) {
       return parent;
     } else {
-      let res = getVmParentByName(parent, name);
+      const res = getVmParentByName(parent, name);
       if (res) {
         return res;
       }

+ 0 - 3
src/utils/env.ts

@@ -33,8 +33,6 @@ export function getAppEnvConfig() {
     VITE_GLOB_ONLINE_VIEW_URL,
     // 全局隐藏哪些布局,多个用逗号隔开
     VITE_GLOB_HIDE_LAYOUT_TYPES,
-    // 当前运行在什么平台
-    VITE_GLOB_RUN_PLATFORM,
 
     //在线文档编辑版本。可选属性:wps, onlyoffice
     VITE_GLOB_ONLINE_DOCUMENT_VERSION,
@@ -57,7 +55,6 @@ export function getAppEnvConfig() {
     VITE_GLOB_DOMAIN_URL,
     VITE_GLOB_ONLINE_VIEW_URL,
     VITE_GLOB_HIDE_LAYOUT_TYPES,
-    VITE_GLOB_RUN_PLATFORM,
 
     //在线文档编辑版本。可选属性:wps, onlyoffice
     VITE_GLOB_ONLINE_DOCUMENT_VERSION,

+ 1 - 1
src/utils/helper/validator.ts

@@ -135,7 +135,7 @@ export const rules = {
  */
 export async function duplicateValidate(tableName, fieldName, fieldVal, dataId) {
   try {
-    let params = {
+    const params = {
       tableName,
       fieldName,
       fieldVal,

+ 1 - 6
src/utils/http/axios/index.ts

@@ -98,11 +98,6 @@ const transform: AxiosTransform = {
     if (requestUrl != null && (requestUrl.startsWith('http:') || requestUrl.startsWith('https:'))) {
       isStartWithHttp = true;
     }
-    // 代码逻辑说明: 【QQYUN-9685】构建 electron 桌面应用
-    if (!isStartWithHttp && requestUrl != null) {
-      // 由于electron的url是file://开头的,所以需要判断一下
-      isStartWithHttp = requestUrl.startsWith('file://');
-    }
     if (!isStartWithHttp && joinPrefix) {
       config.url = `${urlPrefix}${config.url}`;
     }
@@ -185,7 +180,7 @@ const transform: AxiosTransform = {
 
       // ========================================================================================
       // 代码逻辑说明: 添加低代码应用ID
-      let routeParams = router.currentRoute.value.params;
+      const routeParams = router.currentRoute.value.params;
       if (routeParams.appId) {
         config.headers[ConfigEnum.X_LOW_APP_ID] = routeParams.appId;
         // lowApp自定义筛选条件

+ 12 - 12
src/utils/index.ts

@@ -95,10 +95,10 @@ export function getDynamicProps<T, U>(props: T): Partial<U> {
  * @updateBy:zyf
  */
 export function getValueType(props, field) {
-  let formSchema = unref(unref(props)?.schemas)
+  const formSchema = unref(unref(props)?.schemas)
   let valueType = 'string';
   if (formSchema) {
-    let schema = formSchema.filter((item) => item.field === field)[0];
+    const schema = formSchema.filter((item) => item.field === field)[0];
     // 代码逻辑说明: 【issues/8976】useListPage 查询中componentProps是函数时获取不到valueType
     if (schema && schema.componentProps) {
       if (isFunction(schema.componentProps)) {
@@ -202,11 +202,11 @@ export const withInstall = <T>(component: T, alias?: string) => {
  * @param paraName
  */
 export function getUrlParam(paraName) {
-  let url = document.location.toString();
-  let arrObj = url.split('?');
+  const url = document.location.toString();
+  const arrObj = url.split('?');
 
   if (arrObj.length > 1) {
-    let arrPara = arrObj[1].split('&');
+    const arrPara = arrObj[1].split('&');
     let arr;
 
     for (let i = 0; i < arrPara.length; i++) {
@@ -245,7 +245,7 @@ export function sleep(ms: number, fn?: Fn) {
  * @returns {String} 替换后的字符串
  */
 export function replaceAll(text, checker, replacer) {
-  let lastText = text;
+  const lastText = text;
   text = text.replace(checker, replacer);
   if (lastText !== text) {
     return replaceAll(text, checker, replacer);
@@ -260,14 +260,14 @@ export function replaceAll(text, checker, replacer) {
 export function getQueryVariable(url) {
   if (!url) return;
 
-  var t,
+  let t,
     n,
     r,
     i = url.split('?')[1],
     s = {};
   (t = i.split('&')), (r = null), (n = null);
-  for (var o in t) {
-    var u = t[o].indexOf('=');
+  for (const o in t) {
+    const u = t[o].indexOf('=');
     u !== -1 && ((r = t[o].substr(0, u)), (n = t[o].substr(u + 1)), (s[r] = n));
   }
   return s;
@@ -290,7 +290,7 @@ export function showDealBtn(bpmStatus) {
  */
 export function numToUpper(value) {
   if (value != '') {
-    let unit = new Array('仟', '佰', '拾', '', '仟', '佰', '拾', '', '角', '分');
+    const unit = ['仟', '佰', '拾', '', '仟', '佰', '拾', '', '角', '分'];
     const toDx = (n) => {
       switch (n) {
         case '0':
@@ -315,11 +315,11 @@ export function numToUpper(value) {
           return '玖';
       }
     };
-    let lth = value.toString().length;
+    const lth = value.toString().length;
     // 代码逻辑说明: 【issues/7493】numToUpper方法返回解决错误
     value = new Big(value).times(100);
     value += '';
-    let length = value.length;
+    const length = value.length;
     if (lth <= 8) {
       let result = '';
       for (let i = 0; i < length; i++) {

+ 4 - 4
src/views/demo/document/form/example.data.ts

@@ -237,8 +237,8 @@ export const schemas: FormSchema[] = [
       showToday: true,
       //不可选择日期
       disabledDate: (currentDate) => {
-        let date = dayjs(currentDate).format('YYYY-MM-DD');
-        let nowDate = dayjs(new Date()).format('YYYY-MM-DD');
+        const date = dayjs(currentDate).format('YYYY-MM-DD');
+        const nowDate = dayjs(new Date()).format('YYYY-MM-DD');
         //当天不可选择
         if (date == nowDate) {
           return true;
@@ -254,8 +254,8 @@ export const schemas: FormSchema[] = [
     componentProps: {
       //不可选择日期
       disabledDate: (currentDate) => {
-        let date = dayjs(currentDate).format('YYYY-MM');
-        let nowDate = dayjs(new Date()).format('YYYY-MM');
+        const date = dayjs(currentDate).format('YYYY-MM');
+        const nowDate = dayjs(new Date()).format('YYYY-MM');
         //当天不可选择
         if (date == nowDate) {
           return true;

+ 3 - 3
src/views/demo/jeecg/erplist/erplist.api.ts

@@ -55,7 +55,7 @@ export const batchDelete = (params, handleSuccess) => {
  * @param params
  */
 export const saveOrUpdate = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params });
 };
 
@@ -95,7 +95,7 @@ export const deleteBatchCustomer = (params, handleSuccess) => {
  * @param params
  */
 export const saveOrUpdateCustomer = (params, isUpdate) => {
-  let url = isUpdate ? Api.editCustomer : Api.saveCustomer;
+  const url = isUpdate ? Api.editCustomer : Api.saveCustomer;
   return defHttp.post({ url: url, params });
 };
 /**
@@ -134,6 +134,6 @@ export const deleteBatchTicket = (params, handleSuccess) => {
  * @param params
  */
 export const saveOrUpdateTicket = (params, isUpdate) => {
-  let url = isUpdate ? Api.editTicket : Api.saveTicket;
+  const url = isUpdate ? Api.editTicket : Api.saveTicket;
   return defHttp.post({ url: url, params });
 };

+ 1 - 1
src/views/demo/vextable/jvxetable/jvxetable.api.ts

@@ -12,6 +12,6 @@ export const orderTicketList = Api.orderTicketList;
  * @param params
  */
 export const saveOrUpdate = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params });
 };

+ 1 - 1
src/views/monitor/datasource/datasource.api.ts

@@ -34,7 +34,7 @@ export const getDataSourceList = (params) => {
  * @param params
  */
 export const saveOrUpdateDataSource = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params });
 };
 

+ 2 - 2
src/views/monitor/log/log.data.ts

@@ -74,8 +74,8 @@ export const exceptionColumns: BasicColumn[] = [
     dataIndex: 'username',
     width: 60,
     customRender: ({ record }) => {
-      let pname = record.username;
-      let pid = record.userid;
+      const pname = record.username;
+      const pid = record.userid;
       if(!pname && !pid){
         return "";
       }

+ 1 - 1
src/views/monitor/quartz/quartz.api.ts

@@ -36,7 +36,7 @@ export const getQuartzList = (params) => {
  * @param params
  */
 export const saveOrUpdateQuartz = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params });
 };
 

+ 3 - 3
src/views/monitor/trace/trace.data.ts

@@ -18,7 +18,7 @@ export const columns: BasicColumn[] = [
     dataIndex: 'request.method',
     width: 20,
     customRender({ record, column }) {
-      let value = _get(record, column.dataIndex!);
+      const value = _get(record, column.dataIndex!);
       let color = '';
       if (value === 'GET') {
         color = '#87d068';
@@ -48,7 +48,7 @@ export const columns: BasicColumn[] = [
     dataIndex: 'response.status',
     width: 50,
     customRender({ record, column }) {
-      let value = _get(record, column.dataIndex!);
+      const value = _get(record, column.dataIndex!);
       let color = '';
       if (value < 200) {
         color = 'pink';
@@ -69,7 +69,7 @@ export const columns: BasicColumn[] = [
     dataIndex: 'timeTaken',
     width: 50,
     customRender({ record, column }) {
-      let value = _get(record, column.dataIndex!);
+      const value = _get(record, column.dataIndex!);
       let color = 'red';
       if (value < 500) {
         color = 'green';

+ 3 - 3
src/views/report/chartdemo/chartdemo.data.ts

@@ -7,7 +7,7 @@ export const getData = (() => {
   const barLineColors: any[] = [];
 
   for (let i = 0; i < 20; i++) {
-    let obj = { name: '', value: 0 };
+    const obj = { name: '', value: 0 };
     const date = new Date((dottedBase += 1000 * 3600 * 24));
     obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-');
     obj.value = Math.random() * 200;
@@ -16,7 +16,7 @@ export const getData = (() => {
 
   for (let j = 0; j < 2; j++) {
     for (let i = 0; i < 20; i++) {
-      let obj = { name: '', value: 0, type: 2010 + j + '' };
+      const obj = { name: '', value: 0, type: 2010 + j + '' };
       const date = new Date(dottedBase + 1000 * 3600 * 24 * i);
       obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-');
       obj.value = Math.random() * 200;
@@ -40,7 +40,7 @@ export const getData = (() => {
   ];
   for (let j = 0; j < 2; j++) {
     for (let i = 0; i < 15; i++) {
-      let obj = { name: '', value: 0, type: 2010 + j + '', seriesType: j >= 1 ? 'line' : 'bar' };
+      const obj = { name: '', value: 0, type: 2010 + j + '', seriesType: j >= 1 ? 'line' : 'bar' };
       const date = new Date(dottedBase + 1000 * 3600 * 24 * i);
       obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-');
       obj.value = Math.random() * 200;

+ 3 - 3
src/views/sys/login/useLogin.ts

@@ -154,7 +154,7 @@ function checkUsername(rule, value, callback) {
 }
 async function checkPhone(rule, value, callback) {
   const { t } = useI18n();
-  var reg = /^1[3456789]\d{9}$/;
+  const reg = /^1[3456789]\d{9}$/;
   if (!reg.test(value)) {
     return Promise.reject(new Error('请输入正确手机号'));
   } else {
@@ -189,7 +189,7 @@ export function sysOAuth2Login(source) {
   let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`;
   url += `?state=${encodeURIComponent(window.location.origin)}`;
   // 代码逻辑说明: [QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
-  let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
+  const tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
   if(tenantId){
     url += `&tenantId=${tenantId}`;
   }
@@ -203,7 +203,7 @@ export function sysOAuth2Login(source) {
 export function sysOAuth2Callback(code:string) {
   let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/dingding/login`;
   url += `?state=${encodeURIComponent(window.location.origin)}&authCode=${code}`;
-  let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
+  const tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
   if(tenantId){
     url += `&tenantId=${tenantId}`;
   }

+ 1 - 1
src/views/system/appconfig/ThirdApp.api.ts

@@ -17,7 +17,7 @@ enum Api {
  * 第三方配置保存或者更新
  */
 export const saveOrUpdateThirdConfig = (params, isUpdate) => {
-  let url = isUpdate ? Api.editThirdAppConfig : Api.addThirdAppConfig;
+  const url = isUpdate ? Api.editThirdAppConfig : Api.addThirdAppConfig;
   return defHttp.post({ url: url, params }, { joinParamsToUrl: true });
 };
 

+ 1 - 1
src/views/system/category/category.api.ts

@@ -58,7 +58,7 @@ export const batchDeleteCategory = (params, handleSuccess) => {
  * @param params
  */
 export const saveOrUpdateDict = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params });
 };
 /**

+ 1 - 1
src/views/system/checkRule/check.rule.api.ts

@@ -65,7 +65,7 @@ export const batchDeleteCheckRule = (params, handleSuccess) => {
  */
 export const validateCheckRule = (ruleCode, value) => {
   value = encodeURIComponent(value);
-  let params = { ruleCode, value };
+  const params = { ruleCode, value };
   return defHttp.get({ url: Api.checkByCode, params }, { isTransformResponse: false });
 };
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно