Browse Source

refactor: 重写配置文件并删除 Electron 相关代码

- 修改 .env 文件中的应用标题和简称
- 更新 .env.development 文件中的代理配置
- 调整 ESLint 规则,放宽某些限制
- 删除 Electron 相关的配置文件和代码
- 移除 qiankun 微前端相关配置
- 精简 vite 插件配置
zhangtao 3 weeks ago
parent
commit
60aead8b5e
100 changed files with 784 additions and 5894 deletions
  1. 3 3
      .env
  2. 3 3
      .env.development
  3. 9 6
      .eslintrc.js
  4. 1 2
      build/utils.ts
  5. 0 34
      build/vite/plugin/electron.ts
  6. 2 5
      build/vite/plugin/html.ts
  7. 0 35
      build/vite/plugin/imagemin.ts
  8. 10 13
      build/vite/plugin/index.ts
  9. 0 19
      build/vite/plugin/mock.ts
  10. 0 16
      build/vite/plugin/qiankunMicro.ts
  11. 0 82
      build/vite/plugin/styleImport.ts
  12. 1 1
      build/vite/plugin/theme.ts
  13. 0 24
      electron-builder.yaml
  14. 0 35
      electron.md
  15. 0 18
      electron/env.ts
  16. BIN
      electron/icons/app.ico
  17. BIN
      electron/icons/installer.ico
  18. 0 4
      electron/ipc/index.ts
  19. 0 56
      electron/main.ts
  20. 0 18
      electron/paths.ts
  21. 0 5
      electron/preload/index.ts
  22. 0 1
      electron/script/buildAfter.ts
  23. 0 27
      electron/script/buildBefore.ts
  24. 0 31
      electron/utils/index.ts
  25. 0 181
      electron/utils/tray.ts
  26. 0 85
      electron/utils/window.ts
  27. 169 159
      index.html
  28. 0 18
      mock/_createProductionServer.ts
  29. 0 63
      mock/_util.ts
  30. 0 70
      mock/demo/account.ts
  31. 0 37
      mock/demo/select-demo.ts
  32. 0 298
      mock/demo/system.ts
  33. 0 57
      mock/demo/table-demo.ts
  34. 0 38
      mock/demo/tree-demo.ts
  35. 0 270
      mock/sys/menu.ts
  36. 0 119
      mock/sys/user.ts
  37. 0 0
      npm
  38. 16 26
      package.json
  39. 209 383
      pnpm-lock.yaml
  40. 25 21
      src/api/sys/user.ts
  41. 18 16
      src/components/Form/src/BasicForm.vue
  42. 4 4
      src/components/Form/src/jeecg/components/JSelectDept.vue
  43. 13 9
      src/components/Form/src/jeecg/components/JSelectUser.vue
  44. 1 1
      src/components/Form/src/utils/areaDataUtil.js
  45. 5 7
      src/components/Markdown/src/Markdown.vue
  46. 2 2
      src/components/Table/src/components/TableFooter.vue
  47. 0 89
      src/components/chart/Bar.vue
  48. 0 93
      src/components/chart/BarAndLine.vue
  49. 0 122
      src/components/chart/BarMulti.vue
  50. 0 109
      src/components/chart/ChartCard.vue
  51. 0 110
      src/components/chart/Gauge.vue
  52. 0 79
      src/components/chart/HeadInfo.vue
  53. 0 116
      src/components/chart/LineMulti.vue
  54. 0 89
      src/components/chart/Pie.vue
  55. 0 282
      src/components/chart/README.md
  56. 0 89
      src/components/chart/Radar.vue
  57. 0 79
      src/components/chart/RankList.vue
  58. 0 91
      src/components/chart/SingleLine.vue
  59. 0 107
      src/components/chart/StackBar.vue
  60. 0 90
      src/components/chart/Trend.vue
  61. 1 1
      src/components/jeecg/JVxeTable/src/hooks/useColumns.ts
  62. 19 17
      src/components/jeecg/JVxeTable/src/hooks/useMethods.ts
  63. 0 65
      src/electron/index.ts
  64. 8 10
      src/layouts/default/header/components/notify/index.vue
  65. 4 4
      src/layouts/default/header/components/notify/index_old.vue
  66. 12 10
      src/layouts/default/header/index.vue
  67. 39 28
      src/layouts/default/tabs/index.vue
  68. 18 24
      src/main.ts
  69. 0 22
      src/qiankun/apps.ts
  70. 0 73
      src/qiankun/index.ts
  71. 0 12
      src/qiankun/micro/index.ts
  72. 0 57
      src/qiankun/micro/qiankunMicro.ts
  73. 0 38
      src/qiankun/state.ts
  74. 5 5
      src/router/helper/menuHelper.ts
  75. 6 13
      src/router/index.ts
  76. 6 6
      src/router/router.ts
  77. 0 23
      src/router/routes/staticRouter.ts
  78. 1 2
      src/router/types.ts
  79. 5 6
      src/store/modules/permission.ts
  80. 86 0
      src/utils/common/common.ts
  81. 5 15
      src/utils/env.ts
  82. 10 12
      src/utils/http/axios/Axios.ts
  83. 6 7
      src/utils/http/axios/index.ts
  84. 2 2
      src/utils/monorepo/registerPackages.ts
  85. 30 48
      src/views/dashboard/Analysis/components/BdcTabCard.vue
  86. 0 109
      src/views/dashboard/Analysis/components/ChartGroupCard.vue
  87. 0 87
      src/views/dashboard/Analysis/components/SaleTabCard.vue
  88. 5 6
      src/views/dashboard/Analysis/homePage/IndexBdc.vue
  89. 0 149
      src/views/dashboard/Analysis/homePage/IndexChart.vue
  90. 0 2
      src/views/dashboard/Analysis/index.vue
  91. BIN
      src/views/dashboard/ai/components/aide/images/ai.png
  92. 0 77
      src/views/dashboard/ai/components/aide/index.vue
  93. 0 24
      src/views/dashboard/ai/index.vue
  94. 25 25
      src/views/openapi/SwaggerUI.vue
  95. 0 52
      src/views/report/chartdemo/chartdemo.data.ts
  96. 0 93
      src/views/report/chartdemo/index.vue
  97. 0 135
      src/views/report/statisticst/index.vue
  98. 0 103
      src/views/super/airag/aiapp/AiApp.api.ts
  99. 0 88
      src/views/super/airag/aiapp/AiApp.data.ts
  100. 0 597
      src/views/super/airag/aiapp/AiAppList.vue

+ 3 - 3
.env

@@ -2,10 +2,10 @@
 VITE_PORT = 3100
 
 #  网站标题
-VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台
+VITE_GLOB_APP_TITLE = 中数未来
 
 # 简称,此变量只能是字符/下划线
-VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro
+VITE_GLOB_APP_SHORT_NAME = zhonshuweilai
 
 # 单点登录服务端地址
 VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
@@ -14,7 +14,7 @@ VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
 VITE_GLOB_APP_OPEN_SSO = false
 
 # 开启微前端模式
-VITE_GLOB_APP_OPEN_QIANKUN=true
+VITE_GLOB_APP_OPEN_QIANKUN=false
 
 # 文件预览地址
 VITE_GLOB_ONLINE_VIEW_URL=http://fileview.jeecg.com/onlinePreview

+ 3 - 3
.env.development

@@ -1,15 +1,15 @@
 # 是否打开mock
-VITE_USE_MOCK = true
+VITE_USE_MOCK = false
 
 # 发布路径
 VITE_PUBLIC_PATH = /
 
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
-VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
+VITE_PROXY = [["/jeecgboot","http://192.168.1.34:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
 
 #后台接口全路径地址(必填)
-VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot
+VITE_GLOB_DOMAIN_URL=http://192.168.1.34:8080/jeecg-boot
 
 #后台接口父地址(必填)
 VITE_GLOB_API_URL=/jeecgboot

+ 9 - 6
.eslintrc.js

@@ -25,6 +25,7 @@ module.exports = defineConfig({
     'plugin:jest/recommended',
   ],
   rules: {
+    'vue/no-unused-components': 'off',
     'vue/script-setup-uses-vars': 'error',
     '@typescript-eslint/ban-ts-ignore': 'off',
     '@typescript-eslint/explicit-function-return-type': 'off',
@@ -38,6 +39,7 @@ module.exports = defineConfig({
     '@typescript-eslint/ban-types': 'off',
     '@typescript-eslint/no-non-null-assertion': 'off',
     '@typescript-eslint/explicit-module-boundary-types': 'off',
+
     '@typescript-eslint/no-unused-vars': [
       'error',
       {
@@ -53,7 +55,8 @@ module.exports = defineConfig({
       },
     ],
     'space-before-function-paren': 'off',
-
+    'prettier.semi': 'off', //关闭分号警告
+    'prefer-const': 'off',
     'vue/attributes-order': 'off',
     'vue/one-component-per-file': 'off',
     'vue/html-closing-bracket-newline': 'off',
@@ -66,12 +69,12 @@ module.exports = defineConfig({
       'error',
       {
         html: {
-          void: 'always',
-          normal: 'never',
-          component: 'always',
+          void: 'any',
+          normal: 'any',
+          component: 'any',
         },
-        svg: 'always',
-        math: 'always',
+        svg: 'any',
+        math: 'any',
       },
     ],
   },

+ 1 - 2
build/utils.ts

@@ -49,9 +49,8 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
  * 获取当前环境下生效的配置文件名
  */
 function getConfFiles() {
-
   // update-begin--author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用
-  const {VITE_GLOB_RUN_PLATFORM} = process.env
+  const { VITE_GLOB_RUN_PLATFORM } = process.env;
   if (VITE_GLOB_RUN_PLATFORM === 'electron') {
     return ['.env', '.env.prod_electron'];
   }

+ 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()
-//       },
-//     }
-//   })
-//
-// }

+ 2 - 5
build/vite/plugin/html.ts

@@ -7,7 +7,7 @@ import { createHtmlPlugin } from 'vite-plugin-html';
 import pkg from '../../../package.json';
 import { GLOB_CONFIG_FILE_NAME } from '../../constant';
 
-export function configHtmlPlugin(env: ViteEnv, isBuild: boolean, isQiankunMicro: boolean) {
+export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
   const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env;
 
   const path = VITE_PUBLIC_PATH.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`;
@@ -15,10 +15,7 @@ export function configHtmlPlugin(env: ViteEnv, isBuild: boolean, isQiankunMicro:
   const getAppConfigSrc = () => {
     return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`;
   };
-
-  // 【JEECG作为乾坤子应用】补充静态资源前缀
-  const {VITE_GLOB_QIANKUN_MICRO_APP_ENTRY} = env;
-  const basePublicPath = isQiankunMicro ? VITE_GLOB_QIANKUN_MICRO_APP_ENTRY : '';
+  const basePublicPath = '';
 
   const htmlPlugin: PluginOption[] = createHtmlPlugin({
     minify: isBuild,

+ 0 - 35
build/vite/plugin/imagemin.ts

@@ -1,35 +0,0 @@
-// 【图片压缩插件】
-// Image resource files used to compress the output of the production environment
-// https://github.com/anncwb/vite-plugin-imagemin
-import viteImagemin from 'vite-plugin-imagemin';
-
-export function configImageminPlugin() {
-  const plugin = viteImagemin({
-    gifsicle: {
-      optimizationLevel: 7,
-      interlaced: false,
-    },
-    optipng: {
-      optimizationLevel: 7,
-    },
-    mozjpeg: {
-      quality: 20,
-    },
-    pngquant: {
-      quality: [0.8, 0.9],
-      speed: 4,
-    },
-    svgo: {
-      plugins: [
-        {
-          name: 'removeViewBox',
-        },
-        {
-          name: 'removeEmptyAttrs',
-          active: false,
-        },
-      ],
-    },
-  });
-  return plugin;
-}

+ 10 - 13
build/vite/plugin/index.ts

@@ -9,18 +9,17 @@ import { presetTypography, presetUno } from 'unocss';
 import VitePluginCertificate from 'vite-plugin-mkcert';
 //[issues/555]开发环境,vscode断点调试,文件或行数对不上
 import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
-import { configHtmlPlugin } from './html';
-import { configMockPlugin } from './mock';
 import { configCompressPlugin } from './compress';
 import { configVisualizerConfig } from './visualizer';
 import { configThemePlugin } from './theme';
 import { configSvgIconsPlugin } from './svgSprite';
-import { configQiankunMicroPlugin } from './qiankunMicro';
+
 // // electron plugin
 // import { configElectronPlugin } from "./electron";
 // //预编译加载插件(不支持vite3作废)
 // import OptimizationPersist from 'vite-plugin-optimize-persist';
 // import PkgConfig from 'vite-plugin-package-config';
+import { configHtmlPlugin } from './html';
 
 /**
  *
@@ -28,8 +27,8 @@ import { configQiankunMicroPlugin } from './qiankunMicro';
  * @param isBuild
  * @param isQiankunMicro 是否【JEECG作为乾坤子应用】
  */
-export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunMicro: boolean) {
-  const { VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
+export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
+  const { VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
 
   const vitePlugins: (PluginOption | PluginOption[])[] = [
     // have to
@@ -47,13 +46,13 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunM
   vitePlugins.push(UnoCSS({ presets: [presetUno(), presetTypography()] }));
 
   // vite-plugin-html
-  vitePlugins.push(configHtmlPlugin(viteEnv, isBuild, isQiankunMicro));
+  vitePlugins.push(configHtmlPlugin(viteEnv, isBuild));
 
   // vite-plugin-svg-icons
   vitePlugins.push(configSvgIconsPlugin(isBuild));
 
   // vite-plugin-mock
-  VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild));
+  // VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild));
 
   // vite-plugin-purge-icons
   vitePlugins.push(purgeIcons());
@@ -65,10 +64,10 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunM
   vitePlugins.push(configThemePlugin(isBuild));
 
   // 【JEECG作为乾坤子应用】注册乾坤子应用模式插件
-  if (isQiankunMicro) {
-    // vite-plugin-qiankun
-    vitePlugins.push(...configQiankunMicroPlugin(viteEnv))
-  }
+  // if (isQiankunMicro) {
+  //   // vite-plugin-qiankun
+  //   vitePlugins.push(...configQiankunMicroPlugin(viteEnv))
+  // }
 
   // // electron plugin
   // const isElectron = viteEnv.VITE_GLOB_RUN_PLATFORM === 'electron';
@@ -78,10 +77,8 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunM
 
   // 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-theme【预编译加载插件,解决vite首次打开界面加载慢问题】

+ 0 - 19
build/vite/plugin/mock.ts

@@ -1,19 +0,0 @@
-/**
- * Mock plugin for development and production.
- * https://github.com/anncwb/vite-plugin-mock
- */
-import { viteMockServe } from 'vite-plugin-mock';
-
-export function configMockPlugin(isBuild: boolean) {
-  return viteMockServe({
-    ignore: /^\_/,
-    mockPath: 'mock',
-    localEnabled: !isBuild,
-    prodEnabled: isBuild,
-    injectCode: `
-      import { setupProdMockServer } from '../mock/_createProductionServer';
-
-      setupProdMockServer();
-      `,
-  });
-}

+ 0 - 16
build/vite/plugin/qiankunMicro.ts

@@ -1,16 +0,0 @@
-import qiankun from 'vite-plugin-qiankun';
-
-/**
- * 【JEECG作为乾坤子应用】Vite适配乾坤以子应用模式运行
- * @param env
- */
-export function configQiankunMicroPlugin(env: ViteEnv) {
-  const {VITE_GLOB_QIANKUN_MICRO_APP_NAME} = env
-
-  return [
-    qiankun(VITE_GLOB_QIANKUN_MICRO_APP_NAME!, {
-      useDevMode: true,
-    })
-  ]
-
-}

+ 0 - 82
build/vite/plugin/styleImport.ts

@@ -1,82 +0,0 @@
-/**
- * 【样式按需加载插件 ——主要处理antd的样式】
- *  Introduces component library styles on demand.
- * https://github.com/anncwb/vite-plugin-style-import
- */
-import { createStyleImportPlugin } from 'vite-plugin-style-import';
-
-export function configStyleImportPlugin(_isBuild: boolean) {
-  if (!_isBuild) {
-    return [];
-  }
-  const styleImportPlugin = createStyleImportPlugin({
-    libs: [
-      {
-        libraryName: 'ant-design-vue',
-        esModule: true,
-        resolveStyle: (name) => {
-          // 这里是无需额外引入样式文件的“子组件”列表
-          const ignoreList = [
-            'anchor-link',
-            'sub-menu',
-            'menu-item',
-            'menu-divider',
-            'menu-item-group',
-            'breadcrumb-item',
-            'breadcrumb-separator',
-            'form-item',
-            'step',
-            'select-option',
-            'select-opt-group',
-            'card-grid',
-            'card-meta',
-            'collapse-panel',
-            'descriptions-item',
-            'list-item',
-            'list-item-meta',
-            'table-column',
-            'table-column-group',
-            'tab-pane',
-            'tab-content',
-            'timeline-item',
-            'tree-node',
-            'skeleton-input',
-            'skeleton-avatar',
-            'skeleton-title',
-            'skeleton-paragraph',
-            'skeleton-image',
-            'skeleton-button',
-          ];
-          // 这里是需要额外引入样式的子组件列表
-          // 单独引入子组件时需引入组件样式,否则会在打包后导致子组件样式丢失
-          const replaceList = {
-            'typography-text': 'typography',
-            'typography-title': 'typography',
-            'typography-paragraph': 'typography',
-            'typography-link': 'typography',
-            'dropdown-button': 'dropdown',
-            'input-password': 'input',
-            'input-search': 'input',
-            'input-group': 'input',
-            'radio-group': 'radio',
-            'checkbox-group': 'checkbox',
-            'layout-sider': 'layout',
-            'layout-content': 'layout',
-            'layout-footer': 'layout',
-            'layout-header': 'layout',
-            'month-picker': 'date-picker',
-            'range-picker': 'date-picker',
-            'image-preview-group': 'image',
-          };
-
-          return ignoreList.includes(name)
-            ? ''
-            : replaceList.hasOwnProperty(name)
-            ? `ant-design-vue/es/${replaceList[name]}/style/index`
-            : `ant-design-vue/es/${name}/style/index`;
-        },
-      },
-    ],
-  });
-  return styleImportPlugin;
-}

+ 1 - 1
build/vite/plugin/theme.ts

@@ -64,7 +64,7 @@ export function configThemePlugin(isBuild: boolean): PluginOption[] {
       filter: (id) => (isBuild ? !id.endsWith('antd.less') : true),
       // extractCss: false,
       darkModifyVars: {
-        ...generateModifyVars(true),
+        ...generateModifyVars(),
         'text-color': '#c9d1d9',
         'primary-1': 'rgb(255 255 255 / 8%)',
         'text-color-base': '#c9d1d9',

+ 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 - 35
electron.md

@@ -1,35 +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 && esno ./build/script/copyChat.ts",
-    "electron:build-app": "esno ./electron/script/buildBefore.ts && electron-builder && esno ./electron/script/buildAfter.ts",
-  },
-  "devDependencies": {
-    "electron": "35.1.4",
-    "electron-builder": "^26.0.12",
-    "vite-plugin-electron": "^0.29.0",
-  },
-}
-
-```
-
-
-# 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


+ 0 - 4
electron/ipc/index.ts

@@ -1,4 +0,0 @@
-import {ipcMain} from 'electron'
-import {openInBrowser} from "../utils";
-
-ipcMain.on('open-in-browser', (event, url) => openInBrowser(url));

+ 0 - 56
electron/main.ts

@@ -1,56 +0,0 @@
-import './ipc';
-
-import { app, BrowserWindow, Menu } from 'electron';
-import { isDev } from './env';
-import { createMainWindow, createIndexWindow } from './utils/window';
-import { getAppInfo} from "./utils";
-
-// 隐藏所有菜单
-Menu.setApplicationMenu(null);
-
-let mainWindow: BrowserWindow | null = null;
-
-function main() {
-  mainWindow = createMainWindow();
-  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 - 5
electron/preload/index.ts

@@ -1,5 +0,0 @@
-import {contextBridge, ipcRenderer} from 'electron'
-
-contextBridge.exposeInMainWorld('_ELECTRON_PRELOAD_UTILS_', {
-  openInBrowser: (url: string) => ipcRenderer.send('open-in-browser', url),
-});

+ 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 - 181
electron/utils/tray.ts

@@ -1,181 +0,0 @@
-// tray = 系统托盘
-import path from 'path';
-import {Tray, Menu, app, dialog, nativeImage, BrowserWindow, Notification} from 'electron';
-import {_PATHS} from '../paths';
-import {$env, isDev} from '../env';
-
-const TrayIcons = {
-  normal: nativeImage.createFromPath(path.join(_PATHS.publicRoot, 'logo.png')),
-  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);
-  }
-
-  // 发送桌面通知
-  function sendDesktopNotice() {
-    // 判断是否支持桌面通知
-    if (!Notification.isSupported()) {
-      // todo 实际开发中不需要提示,直接返回或者换一种提示方式
-      dialog.showMessageBoxSync(win, {
-        type: 'error',
-        title: '错误',
-        message: '当前系统不支持桌面通知',
-      });
-      return;
-    }
-    const ins = new Notification({
-      title: '通知标题',
-      subtitle: '通知副标题',
-      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 - 85
electron/utils/window.ts

@@ -1,85 +0,0 @@
-import type {BrowserWindowConstructorOptions} from 'electron';
-import {BrowserWindow, dialog} from 'electron';
-import path from 'path';
-import {_PATHS} from '../paths';
-import {$env, isDev} from '../env';
-import {createTray} from './tray';
-
-// 创建窗口
-export function createBrowserWindow(options?: BrowserWindowConstructorOptions) {
-  const win = new BrowserWindow({
-    width: 1200,
-    height: 800,
-    webPreferences: {
-      preload: path.join(_PATHS.preloadRoot, 'index.js'),
-      nodeIntegration: false,
-      contextIsolation: true,
-    },
-    // 应用图标
-    icon: isDev ? _PATHS.appIcon : void 0,
-    ...options,
-  });
-
-  // 设置窗口打开处理器
-  win.webContents.setWindowOpenHandler(({url}) => {
-    const win = createBrowserWindow();
-    win.loadURL(url);
-    // 阻止创建新窗口,因为已经被接管
-    return {action: 'deny'};
-  });
-
-  // 当 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) {
-    win.loadURL($env.VITE_DEV_SERVER_URL!)
-    // 开发环境下,自动打开调试工具
-    // win.webContents.openDevTools()
-  } else {
-    win.loadFile(path.join(_PATHS.publicRoot, 'index.html'));
-  }
-
-  return win;
-}

+ 169 - 159
index.html

@@ -1,181 +1,191 @@
 <!DOCTYPE html>
 <html lang="zh_CN" id="htmlRoot">
-  <head>
-    <meta charset="UTF-8" />
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
-    <meta name="renderer" content="webkit" />
-    <meta
-      name="viewport"
-      content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
-    />
-
-    <title><%= title %></title>
-    <link rel="icon" href="<%= basePublicPath %>/logo.png" />
-    <!-- 全局配置 -->
-    <script>
-      window._CONFIG = {};
-    </script>
-  </head>
-  <body>
-    <script>
-      (() => {
-        var htmlRoot = document.getElementById('htmlRoot');
-        var theme = window.localStorage.getItem('__APP__DARK__MODE__');
-        if (htmlRoot && theme) {
-          htmlRoot.setAttribute('data-theme', theme);
-          theme = htmlRoot = null;
-        }
-      })();
-    </script>
-    <div id="app">
-      <style>
-        html[data-theme='dark'] .app-loading {
-          background-color: #2c344a;
-        }
 
-        html[data-theme='dark'] .app-loading .app-loading-title {
-          color: rgba(255, 255, 255, 0.85);
-        }
+<head>
+  <meta charset="UTF-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+  <meta name="renderer" content="webkit" />
+  <meta name="viewport"
+    content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
 
-        .app-loading {
-          display: flex;
-          width: 100%;
-          height: 100%;
-          justify-content: center;
-          align-items: center;
-          flex-direction: column;
-          background-color: #f4f7f9;
-        }
+  <title></title>
+  <link rel="icon" href="<%= basePublicPath %>/logo.png" />
+  <!-- 全局配置 -->
+  <script>
+    window._CONFIG = {};
 
-        .app-loading .app-loading-wrap {
-          position: absolute;
-          top: 50%;
-          left: 50%;
-          display: flex;
-          -webkit-transform: translate3d(-50%, -50%, 0);
-          transform: translate3d(-50%, -50%, 0);
-          justify-content: center;
-          align-items: center;
-          flex-direction: column;
-        }
+  </script>
+</head>
 
-        .app-loading .dots {
-          display: flex;
-          padding: 98px;
-          justify-content: center;
-          align-items: center;
-        }
+<body>
+  <script>
+    (() => {
+      var htmlRoot = document.getElementById('htmlRoot');
+      var theme = window.localStorage.getItem('__APP__DARK__MODE__');
+      if (htmlRoot && theme) {
+        htmlRoot.setAttribute('data-theme', theme);
+        theme = htmlRoot = null;
+      }
+    })();
 
-        .app-loading .app-loading-title {
-          display: flex;
-          margin-top: 30px;
-          font-size: 30px;
-          color: rgba(0, 0, 0, 0.85);
-          justify-content: center;
-          align-items: center;
-        }
+  </script>
+  <div id="app">
+    <style>
+      html[data-theme='dark'] .app-loading {
+        background-color: #2c344a;
+      }
 
-        .app-loading .app-loading-logo {
-          display: block;
-          width: 90px;
-          margin: 0 auto;
-          margin-bottom: 20px;
-        }
+      html[data-theme='dark'] .app-loading .app-loading-title {
+        color: rgba(255, 255, 255, 0.85);
+      }
 
-        .dot {
-          position: relative;
-          display: inline-block;
-          width: 48px;
-          height: 48px;
-          margin-top: 30px;
-          font-size: 32px;
-          transform: rotate(45deg);
-          box-sizing: border-box;
-          animation: antRotate 1.2s infinite linear;
-        }
+      .app-loading {
+        display: flex;
+        width: 100%;
+        height: 100%;
+        justify-content: center;
+        align-items: center;
+        flex-direction: column;
+        background-color: #f4f7f9;
+      }
 
-        .dot i {
-          position: absolute;
-          display: block;
-          width: 20px;
-          height: 20px;
-          background-color: #0065cc;
-          border-radius: 100%;
-          opacity: 0.3;
-          transform: scale(0.75);
-          animation: antSpinMove 1s infinite linear alternate;
-          transform-origin: 50% 50%;
-        }
+      .app-loading .app-loading-wrap {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        display: flex;
+        -webkit-transform: translate3d(-50%, -50%, 0);
+        transform: translate3d(-50%, -50%, 0);
+        justify-content: center;
+        align-items: center;
+        flex-direction: column;
+      }
 
-        .dot i:nth-child(1) {
-          top: 0;
-          left: 0;
-        }
+      .app-loading .dots {
+        display: flex;
+        padding: 98px;
+        justify-content: center;
+        align-items: center;
+      }
 
-        .dot i:nth-child(2) {
-          top: 0;
-          right: 0;
-          -webkit-animation-delay: 0.4s;
-          animation-delay: 0.4s;
-        }
+      .app-loading .app-loading-title {
+        display: flex;
+        margin-top: 30px;
+        font-size: 30px;
+        color: rgba(0, 0, 0, 0.85);
+        justify-content: center;
+        align-items: center;
+      }
 
-        .dot i:nth-child(3) {
-          right: 0;
-          bottom: 0;
-          -webkit-animation-delay: 0.8s;
-          animation-delay: 0.8s;
-        }
+      .app-loading .app-loading-logo {
+        display: block;
+        width: 90px;
+        margin: 0 auto;
+        margin-bottom: 20px;
+      }
 
-        .dot i:nth-child(4) {
-          bottom: 0;
-          left: 0;
-          -webkit-animation-delay: 1.2s;
-          animation-delay: 1.2s;
-        }
-        @keyframes antRotate {
-          to {
-            -webkit-transform: rotate(405deg);
-            transform: rotate(405deg);
-          }
+      .dot {
+        position: relative;
+        display: inline-block;
+        width: 48px;
+        height: 48px;
+        margin-top: 30px;
+        font-size: 32px;
+        transform: rotate(45deg);
+        box-sizing: border-box;
+        animation: antRotate 1.2s infinite linear;
+      }
+
+      .dot i {
+        position: absolute;
+        display: block;
+        width: 20px;
+        height: 20px;
+        background-color: #0065cc;
+        border-radius: 100%;
+        opacity: 0.3;
+        transform: scale(0.75);
+        animation: antSpinMove 1s infinite linear alternate;
+        transform-origin: 50% 50%;
+      }
+
+      .dot i:nth-child(1) {
+        top: 0;
+        left: 0;
+      }
+
+      .dot i:nth-child(2) {
+        top: 0;
+        right: 0;
+        -webkit-animation-delay: 0.4s;
+        animation-delay: 0.4s;
+      }
+
+      .dot i:nth-child(3) {
+        right: 0;
+        bottom: 0;
+        -webkit-animation-delay: 0.8s;
+        animation-delay: 0.8s;
+      }
+
+      .dot i:nth-child(4) {
+        bottom: 0;
+        left: 0;
+        -webkit-animation-delay: 1.2s;
+        animation-delay: 1.2s;
+      }
+
+      @keyframes antRotate {
+        to {
+          -webkit-transform: rotate(405deg);
+          transform: rotate(405deg);
         }
-        @-webkit-keyframes antRotate {
-          to {
-            -webkit-transform: rotate(405deg);
-            transform: rotate(405deg);
-          }
+      }
+
+      @-webkit-keyframes antRotate {
+        to {
+          -webkit-transform: rotate(405deg);
+          transform: rotate(405deg);
         }
-        @keyframes antSpinMove {
-          to {
-            opacity: 1;
-          }
+      }
+
+      @keyframes antSpinMove {
+        to {
+          opacity: 1;
         }
-        @-webkit-keyframes antSpinMove {
-          to {
-            opacity: 1;
-          }
+      }
+
+      @-webkit-keyframes antSpinMove {
+        to {
+          opacity: 1;
         }
-      </style>
-      <div class="app-loading">
-        <div class="app-loading-wrap">
-          <img src="<%= basePublicPath %>/resource/img/logo.png" class="app-loading-logo" alt="Logo" />
-          <div class="app-loading-dots">
-            <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
-          </div>
-          <div class="app-loading-title"><%= title %></div>
+      }
+
+    </style>
+    <div class="app-loading">
+      <div class="app-loading-wrap">
+        <img src="<%= basePublicPath %>/resource/img/logo.png" class="app-loading-logo"
+          alt="Logo" />
+        <div class="app-loading-dots">
+          <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
         </div>
+        <div class="app-loading-title"></div>
       </div>
     </div>
-    <script type="module" src="/src/main.ts"></script>
-    <!-- 百度统计 -->
-    <script>
-      var _hmt = _hmt || [];
-      (function() {
-        var hm = document.createElement("script");
-        hm.src = "https://hm.baidu.com/hm.js?0febd9e3cacb3f627ddac64d52caac39";
-        var s = document.getElementsByTagName("script")[0];
-        s.parentNode.insertBefore(hm, s);
-      })();
-    </script>
-
-  </body>
+  </div>
+  <script type="module" src="/src/main.ts"></script>
+  <!-- 百度统计 -->
+  <script>
+    var _hmt = _hmt || [];
+    (function () {
+      var hm = document.createElement("script");
+      hm.src = "https://hm.baidu.com/hm.js?0febd9e3cacb3f627ddac64d52caac39";
+      var s = document.getElementsByTagName("script")[0];
+      s.parentNode.insertBefore(hm, s);
+    })();
+
+  </script>
+
+</body>
+
 </html>

+ 0 - 18
mock/_createProductionServer.ts

@@ -1,18 +0,0 @@
-import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';
-
-const modules = import.meta.glob('./**/*.ts', { eager: true });
-
-const mockModules: any[] = [];
-Object.keys(modules).forEach((key) => {
-  if (key.includes('/_')) {
-    return;
-  }
-  mockModules.push(...(modules as Recordable)[key].default);
-});
-
-/**
- * Used in a production environment. Need to manually import all modules
- */
-export function setupProdMockServer() {
-  createProdMockServer(mockModules);
-}

+ 0 - 63
mock/_util.ts

@@ -1,63 +0,0 @@
-// Interface data format used to return a unified format
-
-export function resultSuccess<T = Recordable>(result: T, { message = 'ok' } = {}) {
-  return {
-    code: 0,
-    result,
-    message,
-    type: 'success',
-  };
-}
-
-export function resultPageSuccess<T = any>(
-  pageNo: number,
-  pageSize: number,
-  list: T[],
-  { message = 'ok' } = {}
-) {
-  const pageData = pagination(pageNo, pageSize, list);
-
-  return {
-    ...resultSuccess({
-      records: pageData,
-      total: list.length,
-    }),
-    message,
-  };
-}
-
-export function resultError(message = 'Request failed', { code = -1, result = null } = {}) {
-  return {
-    code,
-    result,
-    message,
-    type: 'error',
-  };
-}
-
-export function pagination<T = any>(pageNo: number, pageSize: number, array: T[]): T[] {
-  const offset = (pageNo - 1) * Number(pageSize);
-  const ret =
-    offset + Number(pageSize) >= array.length
-      ? array.slice(offset, array.length)
-      : array.slice(offset, offset + Number(pageSize));
-  return ret;
-}
-
-export interface requestParams {
-  method: string;
-  body: any;
-  headers?: { authorization?: string };
-  query: any;
-}
-
-/**
- * @description 本函数用于从request数据中获取token,请根据项目的实际情况修改
- *
- */
-export function getRequestToken({ headers }: requestParams): string | undefined {
-  return headers?.authorization;
-}
-
-//TODO 接口父路径(写死不够灵活)
-export const baseUrl = '/jeecgboot/mock';

+ 0 - 70
mock/demo/account.ts

@@ -1,70 +0,0 @@
-import { MockMethod } from 'vite-plugin-mock';
-import { resultSuccess, resultError, baseUrl } from '../_util';
-import { ResultEnum } from '../../src/enums/httpEnum';
-const userInfo = {
-  name: 'Jeecg',
-  userid: '00000001',
-  email: 'test@gmail.com',
-  signature: '海纳百川,有容乃大',
-  introduction: '微笑着,努力着,欣赏着',
-  title: '交互专家',
-  group: '某某某事业群-某某平台部-某某技术部-UED',
-  tags: [
-    {
-      key: '0',
-      label: '很有想法的',
-    },
-    {
-      key: '1',
-      label: '专注设计',
-    },
-    {
-      key: '2',
-      label: '辣~',
-    },
-    {
-      key: '3',
-      label: '大长腿',
-    },
-    {
-      key: '4',
-      label: '川妹子',
-    },
-    {
-      key: '5',
-      label: '海纳百川',
-    },
-  ],
-  notifyCount: 12,
-  unreadCount: 11,
-  country: 'China',
-  address: 'Xiamen City 77',
-  phone: '0592-268888888',
-};
-
-export default [
-  {
-    url: `${baseUrl}/account/getAccountInfo`,
-    timeout: 1000,
-    method: 'get',
-    response: () => {
-      return resultSuccess(userInfo);
-    },
-  },
-  {
-    url: `${baseUrl}/user/sessionTimeout`,
-    method: 'post',
-    statusCode: 401,
-    response: () => {
-      return resultError();
-    },
-  },
-  {
-    url: '/basic-api/user/tokenExpired',
-    method: 'post',
-    statusCode: 200,
-    response: () => {
-      return resultError('Token Expired!', { code: ResultEnum.TIMEOUT as number });
-    },
-  },
-] as MockMethod[];

+ 0 - 37
mock/demo/select-demo.ts

@@ -1,37 +0,0 @@
-import { MockMethod } from 'vite-plugin-mock';
-import { resultSuccess, baseUrl } from '../_util';
-
-const demoList = (keyword, count = 20) => {
-  const result = {
-    list: [] as any[],
-  };
-  for (let index = 0; index < count; index++) {
-    //根据搜索关键词做一下匹配
-    let name = `选项${index}`;
-    if(keyword && name.indexOf(keyword)!=-1){
-      result.list.push({
-        name: `选项${index}`,
-        id: `${index}`,
-      });
-    }else if(!keyword){
-      result.list.push({
-        name: `选项${index}`,
-        id: `${index}`,
-      });
-    }
-  }
-  return result;
-};
-
-export default [
-  {
-    url: `${baseUrl}/select/getDemoOptions`,
-    timeout: 1000,
-    method: 'get',
-    response: ({ query }) => {
-      const { keyword,count} = query;
-      console.log("查询条件:", keyword);
-      return resultSuccess(demoList(keyword,count));
-    },
-  },
-] as MockMethod[];

+ 0 - 298
mock/demo/system.ts

@@ -1,298 +0,0 @@
-import { MockMethod } from 'vite-plugin-mock';
-import { resultError, resultPageSuccess, resultSuccess, baseUrl } from '../_util';
-
-const accountList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 20; index++) {
-        result.push({
-            id: `${index}`,
-            account: '@first',
-            email: '@email',
-            nickname: '@cname()',
-            role: '@first',
-            createTime: '@datetime',
-            remark: '@cword(10,20)',
-            'status|1': ['0', '1'],
-        });
-    }
-    return result;
-})();
-
-const userList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 20; index++) {
-        result.push({
-            id: `${index}`,
-            username: '@first',
-            email: '@email',
-            realname: '@cname()',
-            createTime: '@datetime',
-            remark: '@cword(10,20)',
-            avatar: 'https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640'
-        });
-    }
-    return result;
-})();
-
-const roleList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 4; index++) {
-        result.push({
-            id: index + 1,
-            orderNo: `${index + 1}`,
-            roleName: ['超级管理员', '管理员', '文章管理员', '普通用户'][index],
-            roleValue: '@first',
-            createTime: '@datetime',
-            remark: '@cword(10,20)',
-            menu: [['0', '1', '2'], ['0', '1'], ['0', '2'], ['2']][index],
-            'status|1': ['0', '1'],
-        });
-    }
-    return result;
-})();
-
-const newRoleList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 4; index++) {
-        result.push({
-            id: index + 1,
-            orderNo: `${index + 1}`,
-            roleName: ['超级管理员', '管理员', '文章管理员', '普通用户'][index],
-            roleCode: '@first',
-            createTime: '@datetime',
-            remark: '@cword(10,20)'
-        });
-    }
-    return result;
-})();
-
-const testList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 4; index++) {
-        result.push({
-            id: index + 1,
-            orderNo: `${index + 1}`,
-            testName: ['数据1', '数据2', '数据3', '数据4'][index],
-            testValue: '@first',
-            createTime: '@datetime'
-        });
-    }
-    return result;
-})();
-
-const tableDemoList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 4; index++) {
-        result.push({
-            id: index + 1,
-            orderCode: '2008200' + `${index + 1}`,
-            orderMoney: '@natural(1000,3000)',
-            ctype: '@natural(1,2)',
-            content: '@cword(10,20)',
-            orderDate: '@datetime'
-        });
-    }
-    return result;
-})();
-
-const deptList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 3; index++) {
-        result.push({
-            id: `${index}`,
-            deptName: ['华东分部', '华南分部', '西北分部'][index],
-            orderNo: index + 1,
-            createTime: '@datetime',
-            remark: '@cword(10,20)',
-            'status|1': ['0', '0', '1'],
-            children: (() => {
-                const children: any[] = [];
-                for (let j = 0; j < 4; j++) {
-                    children.push({
-                        id: `${index}-${j}`,
-                        deptName: ['研发部', '市场部', '商务部', '财务部'][j],
-                        orderNo: j + 1,
-                        createTime: '@datetime',
-                        remark: '@cword(10,20)',
-                        'status|1': ['0', '1'],
-                        parentDept: `${index}`,
-                        children: undefined,
-                    });
-                }
-                return children;
-            })(),
-        });
-    }
-    return result;
-})();
-
-const menuList = (() => {
-    const result: any[] = [];
-    for (let index = 0; index < 3; index++) {
-        result.push({
-            id: `${index}`,
-            icon: ['ion:layers-outline', 'ion:git-compare-outline', 'ion:tv-outline'][index],
-            component: 'LAYOUT',
-            type: '0',
-            menuName: ['Dashboard', '权限管理', '功能'][index],
-            permission: '',
-            orderNo: index + 1,
-            createTime: '@datetime',
-            'status|1': ['0', '0', '1'],
-            children: (() => {
-                const children: any[] = [];
-                for (let j = 0; j < 4; j++) {
-                    children.push({
-                        id: `${index}-${j}`,
-                        type: '1',
-                        menuName: ['菜单1', '菜单2', '菜单3', '菜单4'][j],
-                        icon: 'ion:document',
-                        permission: ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index],
-                        component: [
-                            '/dashboard/welcome/index',
-                            '/dashboard/Analysis/index',
-                            '/dashboard/workbench/index',
-                            '/dashboard/test/index',
-                        ][j],
-                        orderNo: j + 1,
-                        createTime: '@datetime',
-                        'status|1': ['0', '1'],
-                        parentMenu: `${index}`,
-                        children: (() => {
-                            const children: any[] = [];
-                            for (let k = 0; k < 4; k++) {
-                                children.push({
-                                    id: `${index}-${j}-${k}`,
-                                    type: '2',
-                                    menuName: '按钮' + (j + 1) + '-' + (k + 1),
-                                    icon: '',
-                                    permission:
-                                        ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index] +
-                                        ':btn' +
-                                        (k + 1),
-                                    component: [
-                                        '/dashboard/welcome/index',
-                                        '/dashboard/Analysis/index',
-                                        '/dashboard/workbench/index',
-                                        '/dashboard/test/index',
-                                    ][j],
-                                    orderNo: j + 1,
-                                    createTime: '@datetime',
-                                    'status|1': ['0', '1'],
-                                    parentMenu: `${index}-${j}`,
-                                    children: undefined,
-                                });
-                            }
-                            return children;
-                        })(),
-                    });
-                }
-                return children;
-            })(),
-        });
-    }
-    return result;
-})();
-
-export default [
-  {
-    url: `${baseUrl}/system/getAccountList`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      return resultPageSuccess(page, pageSize, accountList);
-    },
-  },
-  {
-    url: `${baseUrl}/sys/user/list`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      return resultPageSuccess(page, pageSize, userList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/getRoleListByPage`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      return resultPageSuccess(page, pageSize, roleList);
-    },
-  },
-  {
-    url: `${baseUrl}/sys/role/list`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      return resultPageSuccess(page, pageSize, newRoleList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/getTestListByPage`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      return resultPageSuccess(page, pageSize, testList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/getDemoTableListByPage`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      return resultPageSuccess(page, pageSize, tableDemoList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/setRoleStatus`,
-    timeout: 500,
-    method: 'post',
-    response: ({ query }) => {
-      const { id, status } = query;
-      return resultSuccess({ id, status });
-    },
-  },
-  {
-    url: `${baseUrl}/system/getAllRoleList`,
-    timeout: 100,
-    method: 'get',
-    response: () => {
-      return resultSuccess(roleList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/getDeptList`,
-    timeout: 100,
-    method: 'get',
-    response: () => {
-      return resultSuccess(deptList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/getMenuList`,
-    timeout: 100,
-    method: 'get',
-    response: () => {
-      return resultSuccess(menuList);
-    },
-  },
-  {
-    url: `${baseUrl}/system/accountExist`,
-    timeout: 500,
-    method: 'post',
-    response: ({ body }) => {
-      const { account } = body || {};
-      if (account && account.indexOf('admin') !== -1) {
-        return resultError('该字段不能包含admin');
-      } else {
-        return resultSuccess(`${account} can use`);
-      }
-    },
-  },
-] as MockMethod[];

+ 0 - 57
mock/demo/table-demo.ts

@@ -1,57 +0,0 @@
-import { MockMethod } from 'vite-plugin-mock';
-import { Random } from 'mockjs';
-import { resultPageSuccess, baseUrl } from '../_util';
-
-function getRandomPics(count = 10): string[] {
-  const arr: string[] = [];
-  for (let i = 0; i < count; i++) {
-    arr.push(Random.image('800x600', Random.color(), Random.color(), Random.title()));
-  }
-  return arr;
-}
-
-const demoList = (() => {
-  const result: any[] = [];
-  for (let index = 0; index < 200; index++) {
-    result.push({
-      id: `${index}`,
-      beginTime: '@datetime',
-      endTime: '@datetime',
-      address: '@city()',
-      name: '@cname()',
-      name1: '@cname()',
-      name2: '@cname()',
-      name3: '@cname()',
-      name4: '@cname()',
-      name5: '@cname()',
-      name6: '@cname()',
-      name7: '@cname()',
-      name8: '@cname()',
-      avatar: Random.image('400x400', Random.color(), Random.color(), Random.first()),
-      imgArr: getRandomPics(Math.ceil(Math.random() * 3) + 1),
-      imgs: getRandomPics(Math.ceil(Math.random() * 3) + 1),
-      age: Math.ceil(Math.random() * 30) + 1,
-      score: Math.ceil(Math.random() * 80) + 1,
-      date: `@date('yyyy-MM-dd')`,
-      time: `@time('HH:mm')`,
-      'no|100000-10000000': 100000,
-      'status|1': ['normal', 'enable', 'disable'],
-    });
-  }
-  return result;
-})();
-
-export default [
-  {
-    url: `${baseUrl}/table/getDemoList`,
-    timeout: 100,
-    method: 'get',
-    response: ({ query }) => {
-      const { page = 1, pageSize = 20 } = query;
-      // update-begin--author:liaozhiyang---date:20240730---for:【issues/6943】mock翻页之后数据id和图片没自动刷新
-      const pageNo = +(query.pageNo ?? page);
-      return resultPageSuccess(pageNo, +pageSize, demoList);
-      // update-end--author:liaozhiyang---date:20240730---for:【issues/6943】mock翻页之后数据id和图片没自动刷新
-    },
-  },
-] as MockMethod[];

+ 0 - 38
mock/demo/tree-demo.ts

@@ -1,38 +0,0 @@
-import { MockMethod } from 'vite-plugin-mock';
-import { resultSuccess, baseUrl } from '../_util';
-
-const demoTreeList = (keyword) => {
-  const result = {
-    list: [] as Recordable[],
-  };
-  for (let index = 0; index < 5; index++) {
-    const children: Recordable[] = [];
-    for (let j = 0; j < 3; j++) {
-      children.push({
-        title: `${keyword ?? ''}选项${index}-${j}`,
-        value: `${index}-${j}`,
-        key: `${index}-${j}`,
-      });
-    }
-    result.list.push({
-      title: `${keyword ?? ''}选项${index}`,
-      value: `${index}`,
-      key: `${index}`,
-      children,
-    });
-  }
-  return result;
-};
-
-export default [
-  {
-    url: `${baseUrl}/tree/getDemoOptions`,
-    timeout: 1000,
-    method: 'get',
-    response: ({ query }) => {
-      const { keyword } = query;
-      console.log("查询条件:", keyword);
-      return resultSuccess(demoTreeList(keyword));
-    },
-  },
-] as MockMethod[];

+ 0 - 270
mock/sys/menu.ts

@@ -1,270 +0,0 @@
-import { resultSuccess, resultError, getRequestToken, requestParams,baseUrl} from '../_util';
-import { MockMethod } from 'vite-plugin-mock';
-import { createFakeUserList } from './user';
-
-// single
-const dashboardRoute = {
-  path: '/dashboard',
-  name: 'Dashboard',
-  component: 'LAYOUT',
-  redirect: '/dashboard/analysis',
-  meta: {
-    title: 'routes.dashboard.dashboard',
-    hideChildrenInMenu: true,
-    icon: 'bx:bx-home',
-  },
-  children: [
-    {
-      path: 'analysis',
-      name: 'Analysis',
-      component: '/dashboard/Analysis/index',
-      meta: {
-        hideMenu: true,
-        hideBreadcrumb: true,
-        title: 'routes.dashboard.analysis',
-        currentActiveMenu: '/dashboard',
-        icon: 'bx:bx-home',
-      },
-    },
-    {
-      path: 'workbench',
-      name: 'Workbench',
-      component: '/dashboard/workbench/index',
-      meta: {
-        hideMenu: true,
-        hideBreadcrumb: true,
-        title: 'routes.dashboard.workbench',
-        currentActiveMenu: '/dashboard',
-        icon: 'bx:bx-home',
-      },
-    },
-  ],
-};
-
-const backRoute = {
-  path: 'back',
-  name: 'PermissionBackDemo',
-  meta: {
-    title: 'routes.demo.permission.back',
-  },
-
-  children: [
-    {
-      path: 'page',
-      name: 'BackAuthPage',
-      component: '/demo/permission/back/index',
-      meta: {
-        title: 'routes.demo.permission.backPage',
-      },
-    },
-    {
-      path: 'btn',
-      name: 'BackAuthBtn',
-      component: '/demo/permission/back/Btn',
-      meta: {
-        title: 'routes.demo.permission.backBtn',
-      },
-    },
-  ],
-};
-
-const authRoute = {
-  path: '/permission',
-  name: 'Permission',
-  component: 'LAYOUT',
-  redirect: '/permission/front/page',
-  meta: {
-    icon: 'carbon:user-role',
-    title: 'routes.demo.permission.permission',
-  },
-  children: [backRoute],
-};
-
-const levelRoute = {
-  path: '/level',
-  name: 'Level',
-  component: 'LAYOUT',
-  redirect: '/level/menu1/menu1-1',
-  meta: {
-    icon: 'carbon:user-role',
-    title: 'routes.demo.level.level',
-  },
-
-  children: [
-    {
-      path: 'menu1',
-      name: 'Menu1Demo',
-      meta: {
-        title: 'Menu1',
-      },
-      children: [
-        {
-          path: 'menu1-1',
-          name: 'Menu11Demo',
-          meta: {
-            title: 'Menu1-1',
-          },
-          children: [
-            {
-              path: 'menu1-1-1',
-              name: 'Menu111Demo',
-              component: '/demo/level/Menu111',
-              meta: {
-                title: 'Menu111',
-              },
-            },
-          ],
-        },
-        {
-          path: 'menu1-2',
-          name: 'Menu12Demo',
-          component: '/demo/level/Menu12',
-          meta: {
-            title: 'Menu1-2',
-          },
-        },
-      ],
-    },
-    {
-      path: 'menu2',
-      name: 'Menu2Demo',
-      component: '/demo/level/Menu2',
-      meta: {
-        title: 'Menu2',
-      },
-    },
-  ],
-};
-
-const sysRoute = {
-  path: '/system',
-  name: 'System',
-  component: 'LAYOUT',
-  redirect: '/system/account',
-  meta: {
-    icon: 'ion:settings-outline',
-    title: 'routes.demo.system.moduleName',
-  },
-  children: [
-    {
-      path: 'account',
-      name: 'AccountManagement',
-      meta: {
-        title: 'routes.demo.system.account',
-        ignoreKeepAlive: true,
-      },
-      component: '/demo/system/account/index',
-    },
-    {
-      path: 'account_detail/:id',
-      name: 'AccountDetail',
-      meta: {
-        hideMenu: true,
-        title: 'routes.demo.system.account_detail',
-        ignoreKeepAlive: true,
-        showMenu: false,
-        currentActiveMenu: '/system/account',
-      },
-      component: '/demo/system/account/AccountDetail',
-    },
-    {
-      path: 'role',
-      name: 'RoleManagement',
-      meta: {
-        title: 'routes.demo.system.role',
-        ignoreKeepAlive: true,
-      },
-      component: '/demo/system/role/index',
-    },
-
-    {
-      path: 'menu',
-      name: 'MenuManagement',
-      meta: {
-        title: 'routes.demo.system.menu',
-        ignoreKeepAlive: true,
-      },
-      component: '/demo/system/menu/index',
-    },
-    {
-      path: 'dept',
-      name: 'DeptManagement',
-      meta: {
-        title: 'routes.demo.system.dept',
-        ignoreKeepAlive: true,
-      },
-      component: '/demo/system/dept/index',
-    },
-    {
-      path: 'changePassword',
-      name: 'ChangePassword',
-      meta: {
-        title: 'routes.demo.system.password',
-        ignoreKeepAlive: true,
-      },
-      component: '/demo/system/password/index',
-    },
-  ],
-};
-
-const linkRoute = {
-  path: '/link',
-  name: 'Link',
-  component: 'LAYOUT',
-  meta: {
-    icon: 'ion:tv-outline',
-    title: 'routes.demo.iframe.frame',
-  },
-  children: [
-    {
-      path: 'doc',
-      name: 'Doc',
-      meta: {
-        title: 'routes.demo.iframe.doc',
-        frameSrc: 'https://vvbin.cn/doc-next/',
-      },
-    },
-    {
-      path: 'https://vvbin.cn/doc-next/',
-      name: 'DocExternal',
-      component: 'LAYOUT',
-      meta: {
-        title: 'routes.demo.iframe.docExternal',
-      },
-    },
-  ],
-};
-
-export default [
-  {
-    url: `${baseUrl}/sys/permission/getUserPermissionByToken`,
-    timeout: 1000,
-    method: 'get',
-    response: (request: requestParams) => {
-      const token = getRequestToken(request);
-      if (!token) {
-        return resultError('Invalid token!');
-      }
-      const checkUser = createFakeUserList().find((item) => item.token === token);
-      if (!checkUser) {
-        return resultError('Invalid user token!');
-      }
-      const id = checkUser.userId;
-      let menu: Object[];
-      switch (id) {
-        case '1':
-          dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[0].path;
-          menu = [dashboardRoute, authRoute, levelRoute, sysRoute, linkRoute];
-          break;
-        case '2':
-          dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[1].path;
-          menu = [dashboardRoute, authRoute, levelRoute, linkRoute];
-          break;
-        default:
-          menu = [];
-      }
-
-      return resultSuccess(menu);
-    },
-  },
-] as MockMethod[];

File diff suppressed because it is too large
+ 0 - 119
mock/sys/user.ts


+ 0 - 0
npm


+ 16 - 26
package.json

@@ -1,8 +1,8 @@
 {
-  "name": "jeecgboot-vue3",
+  "name": "zhonshuweilai-vue3",
   "version": "3.8.1",
   "author": {
-    "name": "北京国炬信息技术有限公司",
+    "name": "中数未来",
     "email": "jeecgos@163.com",
     "url": "https://www.jeecg.com"
   },
@@ -21,22 +21,20 @@
     "husky:install": "husky install"
   },
   "dependencies": {
-    "@jeecg/online": "3.7.4-beta",
-    "@jeecg/aiflow": "1.1.1",
-    "@logicflow/core": "^2.0.10",
-    "@logicflow/extension": "^2.0.14",
-    "@logicflow/vue-node-registry": "^1.0.12",
-    "@iconify/iconify": "^3.1.1",
     "@ant-design/colors": "^7.2.0",
     "@ant-design/icons-vue": "^7.0.1",
+    "@iconify/iconify": "^3.1.1",
+    "@jeecg/online": "3.7.4-beta",
+    "@logicflow/vue-node-registry": "^1.0.12",
+    "@tinymce/tinymce-vue": "4.0.7",
+    "@types/lodash-es": "^4.17.12",
+    "@vant/area-data": "^1.5.2",
     "@vue/shared": "^3.5.13",
     "@vueuse/core": "^10.11.1",
-    "@tinymce/tinymce-vue": "4.0.7",
     "@zxcvbn-ts/core": "^3.0.4",
     "ant-design-vue": "^4.2.6",
     "axios": "^1.7.9",
     "china-area-data": "^5.0.1",
-    "@vant/area-data": "^1.5.2",
     "clipboard": "^2.0.11",
     "codemirror": "^5.65.18",
     "cron-parser": "^4.9.0",
@@ -50,19 +48,13 @@
     "intro.js": "^7.2.0",
     "lodash-es": "^4.17.21",
     "lodash.get": "^4.4.2",
-    "markdown-it": "^14.1.0",
-    "markdown-it-link-attributes": "^4.0.1",
-    "event-source-polyfill": "^1.0.31",
-    "highlight.js": "^11.11.1",
-    "@traptitech/markdown-it-katex": "^3.6.0",
     "md5": "^2.3.0",
-    "mockjs": "^1.1.0",
     "nprogress": "^0.2.0",
     "path-to-regexp": "^6.3.0",
     "pinia": "2.1.7",
     "print-js": "^1.6.0",
-    "qs": "^6.13.1",
     "qrcode": "^1.5.4",
+    "qs": "^6.13.1",
     "resize-observer-polyfill": "^1.5.1",
     "showdown": "^2.1.0",
     "sortablejs": "^1.15.6",
@@ -78,9 +70,9 @@
     "vue-router": "^4.5.0",
     "vue-types": "^5.1.3",
     "vuedraggable": "^4.1.0",
+    "vxe-pc-ui": "4.6.12",
     "vxe-table": "4.13.31",
     "vxe-table-plugin-antd": "4.0.8",
-    "vxe-pc-ui": "4.6.12",
     "xe-utils": "3.5.26",
     "xss": "^1.0.15"
   },
@@ -89,14 +81,13 @@
     "@commitlint/config-conventional": "^18.6.3",
     "@iconify/json": "^2.2.292",
     "@purge-icons/generated": "^0.10.0",
+    "@rys-fe/vite-plugin-theme": "^0.8.6",
     "@types/codemirror": "^5.60.15",
     "@types/crypto-js": "^4.2.2",
     "@types/fs-extra": "^11.0.4",
     "@types/inquirer": "^9.0.7",
     "@types/intro.js": "^5.1.5",
     "@types/jest": "^29.5.14",
-    "@types/lodash-es": "^4.17.12",
-    "@types/mockjs": "^1.0.10",
     "@types/node": "^20.17.12",
     "@types/nprogress": "^0.2.3",
     "@types/qrcode": "^1.5.5",
@@ -110,11 +101,13 @@
     "@vue/compiler-sfc": "^3.5.13",
     "@vue/test-utils": "^2.4.6",
     "autoprefixer": "^10.4.20",
+    "big.js": "^6.2.2",
     "commitizen": "^4.3.1",
     "conventional-changelog-cli": "^4.1.0",
     "cross-env": "^7.0.3",
     "cz-git": "^1.11.0",
     "czg": "^1.11.0",
+    "dingtalk-jsapi": "^3.0.42",
     "dotenv": "^16.4.7",
     "eslint": "^8.57.1",
     "eslint-config-prettier": "^9.1.0",
@@ -150,6 +143,7 @@
     "ts-jest": "^29.2.5",
     "ts-node": "^10.9.2",
     "typescript": "^4.9.5",
+    "unocss": "^0.58.9",
     "vite": "^6.0.7",
     "vite-plugin-compression": "^0.5.1",
     "vite-plugin-html": "^3.2.2",
@@ -158,15 +152,11 @@
     "vite-plugin-optimize-persist": "^0.1.2",
     "vite-plugin-package-config": "^0.1.1",
     "vite-plugin-purge-icons": "^0.10.0",
-    "vite-plugin-svg-icons": "^2.0.1",
     "vite-plugin-qiankun": "^1.0.15",
-    "@rys-fe/vite-plugin-theme": "^0.8.6",
+    "vite-plugin-svg-icons": "^2.0.1",
     "vite-plugin-vue-setup-extend-plus": "^0.1.0",
-    "unocss": "^0.58.9",
     "vue-eslint-parser": "^9.4.3",
-    "vue-tsc": "^1.8.27",
-    "dingtalk-jsapi": "^3.0.42",
-    "big.js": "^6.2.2"
+    "vue-tsc": "^1.8.27"
   },
   "repository": {
     "type": "git",

File diff suppressed because it is too large
+ 209 - 383
pnpm-lock.yaml


+ 25 - 21
src/api/sys/user.ts

@@ -8,7 +8,7 @@ import { setAuthCache } from '/@/utils/auth';
 import { TOKEN_KEY } from '/@/enums/cacheEnum';
 import { router } from '/@/router';
 import { PageEnum } from '/@/enums/pageEnum';
-import { ExceptionEnum } from "@/enums/exceptionEnum";
+import { ExceptionEnum } from '@/enums/exceptionEnum';
 
 const { createErrorModal } = useMessage();
 enum Api {
@@ -93,10 +93,9 @@ export function getUserInfo() {
         query: {
           // 传入当前的路由,登录成功后跳转到当前路由
           redirect: router.currentRoute.value.fullPath,
-        }
+        },
       });
       // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
-
     }
     // update-end--author:zyf---date:20220425---for:【VUEN-76】捕获接口超时异常,跳转到登录界面
   });
@@ -112,6 +111,8 @@ export function doLogout() {
 
 export function getCodeInfo(currdatetime) {
   let url = Api.getInputCode + `/${currdatetime}`;
+  console.log(url, '请求地址');
+
   return defHttp.get({ url: url });
 }
 /**
@@ -119,23 +120,26 @@ export function getCodeInfo(currdatetime) {
  */
 export function getCaptcha(params) {
   return new Promise((resolve, reject) => {
-    defHttp.post({ url: Api.getCaptcha, params }, { isTransformResponse: false }).then((res) => {
-      console.log(res);
-      if (res.success) {
-        resolve(true);
-      } else {
-        //update-begin---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
-        if(res.code != ExceptionEnum.PHONE_SMS_FAIL_CODE){
-          createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
-          reject();
+    defHttp
+      .post({ url: Api.getCaptcha, params }, { isTransformResponse: false })
+      .then((res) => {
+        console.log(res);
+        if (res.success) {
+          resolve(true);
+        } else {
+          //update-begin---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
+          if (res.code != ExceptionEnum.PHONE_SMS_FAIL_CODE) {
+            createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
+            reject();
+          }
+          reject(res);
+          //update-end---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
         }
-        reject(res);
-        //update-end---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
-      }
-    }).catch((res)=>{
-      createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
-      reject();
-    });
+      })
+      .catch((res) => {
+        createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
+        reject();
+      });
   });
 }
 
@@ -166,8 +170,8 @@ export const passwordChange = (params) => defHttp.get({ url: Api.passwordChange,
  */
 export function thirdLogin(params, mode: ErrorMessageMode = 'modal') {
   //==========begin 第三方登录/auth2登录需要传递租户id===========
-  let tenantId = "0";
-  if(!params.tenantId){
+  let tenantId = '0';
+  if (!params.tenantId) {
     tenantId = params.tenantId;
   }
   //==========end 第三方登录/auth2登录需要传递租户id===========

+ 18 - 16
src/components/Form/src/BasicForm.vue

@@ -44,7 +44,7 @@
   import { dateItemType } from './helper';
   import { dateUtil } from '/@/utils/dateUtil';
 
-  // import { cloneDeep } from 'lodash-es';
+  //import { cloneDeep } from 'lodash-es';
   import { deepMerge } from '/@/utils';
 
   import { useFormValues } from './hooks/useFormValues';
@@ -112,7 +112,7 @@
           prefixCls,
           {
             [`${prefixCls}--compact`]: unref(getProps).compact,
-            'jeecg-form-detail-effect': unref(getProps).disabled
+            'jeecg-form-detail-effect': unref(getProps).disabled,
           },
         ];
       });
@@ -126,7 +126,7 @@
         };
       });
 
-      const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) } as Recordable));
+      const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable);
 
       const getSchema = computed((): FormSchema[] => {
         const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any);
@@ -135,22 +135,22 @@
           // handle date type
           if (defaultValue && dateItemType.includes(component)) {
             //update-begin---author:wangshuai ---date:20230410  for:【issues/435】代码生成的日期控件赋默认值报错------------
-            let valueFormat:string = "";
-            if(componentProps){
+            let valueFormat: string = '';
+            if (componentProps) {
               valueFormat = componentProps?.valueFormat;
             }
-            if(!valueFormat){
-              console.warn("未配置valueFormat,可能导致格式化错误!");
+            if (!valueFormat) {
+              console.warn('未配置valueFormat,可能导致格式化错误!');
             }
             //update-end---author:wangshuai ---date:20230410  for:【issues/435】代码生成的日期控件赋默认值报错------------
             if (!Array.isArray(defaultValue)) {
               //update-begin---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
-              if(valueFormat){
+              if (valueFormat) {
                 // schema.defaultValue = dateUtil(defaultValue).format(valueFormat);
                 // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-346 】时间组件填写默认值有问题
                 schema.defaultValue = dateUtil(defaultValue, valueFormat).format(valueFormat);
                 // update-end--author:liaozhiyang---date:20240529---for:【TV360X-346 】时间组件填写默认值有问题
-              }else{
+              } else {
                 schema.defaultValue = dateUtil(defaultValue);
               }
               //update-end---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
@@ -158,11 +158,11 @@
               const def: dayjs.Dayjs[] = [];
               defaultValue.forEach((item) => {
                 //update-begin---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
-                if(valueFormat){
+                if (valueFormat) {
                   // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-346 】时间组件填写默认值有问题
                   def.push(dateUtil(item, valueFormat).format(valueFormat));
                   // update-end--author:liaozhiyang---date:20240529---for:【TV360X-346 】时间组件填写默认值有问题
-                }else{
+                } else {
                   def.push(dateUtil(item));
                 }
                 //update-end---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
@@ -285,7 +285,7 @@
         //   validateFields([key]).catch((_) => {});
         // }
         // update-end--author:liaozhiyang---date:20230922---for:【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
-        if(props.autoSearch === true){
+        if (props.autoSearch === true) {
           onFormSubmitWhenChange();
         }
       }
@@ -371,7 +371,7 @@
       // 表单组件中间件样式
       .j-form-item-middleware {
         flex: 1;
-        width: 100%
+        width: 100%;
       }
 
       &.suffix-item {
@@ -399,7 +399,7 @@
       }
     }
     /*【美化表单】form的字体改小一号*/
-/*    .ant-form-item-label > label{
+    /*    .ant-form-item-label > label{
       font-size: 13px;
     }
     .ant-form-item .ant-select {
@@ -415,7 +415,7 @@
       font-size: 13px;
     }*/
     /*【美化表单】form的字体改小一号*/
-    
+
     .ant-form-explain {
       font-size: 14px;
     }
@@ -428,7 +428,9 @@
     // update-begin--author:liaozhiyang---date:20231017---for:【QQYUN-6566】BasicForm支持一行显示(inline)
     &.ant-form-inline {
       & > .ant-row {
-        .ant-col { width:auto !important; }
+        .ant-col {
+          width: auto !important;
+        }
       }
     }
     // update-end--author:liaozhiyang---date:20231017---for:【QQYUN-6566】BasicForm支持一行显示(inline)

+ 4 - 4
src/components/Form/src/jeecg/components/JSelectDept.vue

@@ -1,10 +1,10 @@
 <!--部门选择组件-->
 <template>
   <div class="JSelectDept">
-    <JSelectBiz  @change="handleSelectChange" @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs"/>
+    <JSelectBiz @change="handleSelectChange" @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs" />
     <!-- update-begin--author:liaozhiyang---date:20240515---for:【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式 -->
     <a-form-item>
-      <DeptSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue" :multiple="multiple" @close="handleClose"/>
+      <DeptSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue" :multiple="multiple" @close="handleClose" />
     </a-form-item>
     <!-- update-end--author:liaozhiyang---date:20240515---for:【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式 -->
   </div>
@@ -136,7 +136,7 @@
       }
       const getBindValue = Object.assign({}, unref(props), unref(attrs));
 
-       // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-414】部门设置了默认值,查询重置变成空了(同步JSelectUser组件改法)
+      // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-414】部门设置了默认值,查询重置变成空了(同步JSelectUser组件改法)
       const handleClose = () => {
         if (tempSave.length) {
           selectValues.value = cloneDeep(tempSave);
@@ -159,7 +159,7 @@
         // update-end--author:liaozhiyang---date:20240627---for:【TV360X-1648】用户编辑界面“所属部门”与“负责部门”联动出错(同步之前丢的代码)
       };
       // update-end--author:liaozhiyang---date:20240527---for:【TV360X-414】部门设置了默认值,查询重置变成空了(同步JSelectUser组件改法)
-      
+
       return {
         // state,
         attrs,

+ 13 - 9
src/components/Form/src/jeecg/components/JSelectUser.vue

@@ -50,10 +50,10 @@
       },
       //update-begin---author:wangshuai ---date:20230703  for:【QQYUN-5685】5、离职人员可以选自己------------
       //排除用户id的集合
-      excludeUserIdList:{
+      excludeUserIdList: {
         type: Array,
         default: () => [],
-      }
+      },
       //update-end---author:wangshuai ---date:20230703  for:【QQYUN-5685】5、离职人员可以选自己------------
     },
     emits: ['options-change', 'change', 'update:value'],
@@ -110,15 +110,19 @@
 
       //update-begin---author:wangshuai ---date:20230703  for:【QQYUN-5685】5、离职人员可以选自己------------
       const excludeUserIdList = ref<any>([]);
-      
+
       /**
        * 需要监听一下excludeUserIdList,否则modal获取不到
-       */ 
-      watch(()=>props.excludeUserIdList,(data)=>{
-        excludeUserIdList.value = data;
-      },{ immediate: true })
+       */
+      watch(
+        () => props.excludeUserIdList,
+        (data) => {
+          excludeUserIdList.value = data;
+        },
+        { immediate: true }
+      );
       //update-end---author:wangshuai ---date:20230703  for:【QQYUN-5685】5、离职人员可以选自己------------
-      
+
       /**
        * 打卡弹出框
        */
@@ -169,7 +173,7 @@
         send(tempSave);
       };
       const send = (values) => {
-        let result = typeof props.value == "string" ? values.join(',') : values;
+        let result = typeof props.value == 'string' ? values.join(',') : values;
         emit('update:value', result);
         emit('change', result);
       };

+ 1 - 1
src/components/Form/src/utils/areaDataUtil.js

@@ -1,4 +1,4 @@
-import {pcaa as REGION_DATA} from "@/utils/areaData/pcaUtils";
+import { pcaa as REGION_DATA } from "@/utils/areaData/pcaUtils";
 import { cloneDeep } from 'lodash-es';
 
 // code转汉字大对象

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

@@ -13,8 +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;
 
   export default defineComponent({
@@ -25,7 +23,7 @@
     },
     emits: ['change', 'get', 'update:value'],
     setup(props, { attrs, emit }) {
-      console.log("---Markdown---初始化---")
+      console.log('---Markdown---初始化---');
       const wrapRef = ref<ElRef>(null);
       const vditorRef = ref(null) as Ref<Nullable<Vditor>>;
       const initedRef = ref(false);
@@ -112,10 +110,10 @@
         if (!wrapEl) return;
 
         // vditor组件本地化的路径配置【QQYUN-12053】
-        let localCdn = '/resource/vditor@3.9.4';
-        if ($electron.isElectron()) {
-          localCdn = '.' + localCdn;
-        }
+        // let localCdn = '/resource/vditor@3.9.4';
+        // if ($electron.isElectron()) {
+        //   localCdn = '.' + localCdn;
+        // }
 
         const bindValue = { ...attrs, ...props };
         const insEditor = new Vditor(wrapEl, {

+ 2 - 2
src/components/Table/src/components/TableFooter.vue

@@ -82,7 +82,7 @@
         // 是否有序号列
         let hasIndexCol = false;
         // 是否有选择列
-        let hasSelection = table.getRowSelection() && hasRowSummary
+        let hasSelection = table.getRowSelection() && hasRowSummary;
 
         if (index !== -1) {
           if (hasIndexSummary) {
@@ -104,7 +104,7 @@
             key: 'selectionKey',
             align: 'center',
             ...(isFixed ? { fixed: 'left' } : {}),
-            customRender: ({ record }) => hasIndexCol ? '' : record[SUMMARY_ROW_KEY],
+            customRender: ({ record }) => (hasIndexCol ? '' : record[SUMMARY_ROW_KEY]),
           });
         }
 

+ 0 - 89
src/components/chart/Bar.vue

@@ -1,89 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'bar',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-      // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-      seriesColor: {
-        type: String,
-        default: '#1890ff',
-      },
-      // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-    },
-    setup(props) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, echarts } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow',
-            label: {
-              show: true,
-              backgroundColor: '#333',
-            },
-          },
-        },
-        xAxis: {
-          type: 'category',
-          data: [],
-        },
-        yAxis: {
-          type: 'value',
-        },
-        series: [
-          {
-            name: 'bar',
-            type: 'bar',
-            data: [],
-            color: props.seriesColor,
-          },
-        ],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        let seriesData = props.chartData.map((item) => {
-          return item.value;
-        });
-        let xAxisData = props.chartData.map((item) => {
-          return item.name;
-        });
-        option.series[0].data = seriesData;
-        // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-        option.series[0].color = props.seriesColor;
-        // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-        option.xAxis.data = xAxisData;
-        setOptions(option);
-      }
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 93
src/components/chart/BarAndLine.vue

@@ -1,93 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'barAndLine',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-      customColor: {
-        type: Array,
-        default: () => [],
-      }
-    },
-    setup(props) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, echarts } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow',
-            label: {
-              show: true,
-              backgroundColor: '#333',
-            },
-          },
-        },
-        xAxis: {
-          type: 'category',
-          data: [],
-        },
-        yAxis: {
-          type: 'value',
-        },
-        series: [
-          {
-            name: 'bar',
-            type: 'bar',
-            data: [],
-          },
-        ],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        //图例类型
-        let typeArr = Array.from(new Set(props.chartData.map((item) => item.type)));
-        //轴数据
-        let xAxisData = Array.from(new Set(props.chartData.map((item) => item.name)));
-        let seriesData = [];
-        typeArr.forEach((type,index) => {
-          let obj = { name: type };
-          let chartArr = props.chartData.filter((item) => type === item.type);
-          //data数据
-          obj['data'] = chartArr.map((item) => item.value);
-          obj['type'] = chartArr[0].seriesType;
-          if(props?.customColor && props?.customColor[index]){
-            obj['color'] = props.customColor[index];
-          }
-          seriesData.push(obj);
-        });
-        option.series = seriesData;
-        option.xAxis.data = xAxisData;
-        setOptions(option);
-      }
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 122
src/components/chart/BarMulti.vue

@@ -1,122 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'BarMulti',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-        required: true,
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      type: {
-        type: String as PropType<string>,
-        default: 'bar',
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-      // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-      seriesColor: {
-        type: Array,
-        default: () => [],
-      },
-      // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-    },
-    emits: ['click'],
-    setup(props, { emit }) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, getInstance } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow',
-            label: {
-              show: true,
-              backgroundColor: '#333',
-            },
-          },
-        },
-        legend: {
-          top: 30,
-        },
-        grid: {
-          top: 60,
-        },
-        xAxis: {
-          type: 'category',
-          data: [],
-        },
-        yAxis: {
-          type: 'value',
-        },
-        series: [],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        //图例类型
-        let typeArr = Array.from(new Set(props.chartData.map((item) => item.type)));
-        //轴数据
-        let xAxisData = Array.from(new Set(props.chartData.map((item) => item.name)));
-        let seriesData = [];
-        typeArr.forEach((type) => {
-          let obj: any = { name: type, type: props.type };
-          // update-begin-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
-          let data = [];
-          xAxisData.forEach((x) => {
-            let dataArr = props.chartData.filter((item) => type === item.type && item.name == x);
-            if (dataArr && dataArr.length > 0) {
-              data.push(dataArr[0].value);
-            } else {
-              data.push(null);
-            }
-          });
-          // update-end-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
-          //data数据
-          obj['data'] = data;
-          // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-          if (props.seriesColor?.length) {
-            const findItem = props.seriesColor.find((item: any) => item.type === type);
-            if (findItem?.color) {
-              obj['color'] = findItem.color;
-            }
-          }
-          // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-          seriesData.push(obj);
-        });
-        option.series = seriesData;
-        option.xAxis.data = xAxisData;
-        setOptions(option);
-        getInstance()?.off('click', onClick);
-        getInstance()?.on('click', onClick);
-      }
-
-      function onClick(params) {
-        emit('click', params);
-      }
-
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 109
src/components/chart/ChartCard.vue

@@ -1,109 +0,0 @@
-<template>
-  <a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
-    <div class="chart-card-header">
-      <div class="meta">
-        <span class="chart-card-title">{{ title }}</span>
-        <span class="chart-card-action">
-          <slot name="action"></slot>
-        </span>
-      </div>
-      <div class="total"
-        ><span>{{ total }}</span></div
-      >
-    </div>
-    <div class="chart-card-content">
-      <div class="content-fix">
-        <slot></slot>
-      </div>
-    </div>
-    <div class="chart-card-footer">
-      <div class="field">
-        <slot name="footer"></slot>
-      </div>
-    </div>
-  </a-card>
-</template>
-
-<script lang="ts" setup>
-  defineProps({
-    title: {
-      type: String,
-      default: '',
-    },
-    total: {
-      type: [Number, String],
-      default: '',
-    },
-    loading: {
-      type: Boolean,
-      default: false,
-    },
-  });
-</script>
-
-<style lang="less" scoped>
-  .chart-card-header {
-    position: relative;
-    overflow: hidden;
-    width: 100%;
-
-    .meta {
-      position: relative;
-      overflow: hidden;
-      width: 100%;
-      color: rgba(0, 0, 0, 0.45);
-      font-size: 14px;
-      line-height: 22px;
-    }
-  }
-
-  .chart-card-action {
-    cursor: pointer;
-    position: absolute;
-    top: 0;
-    right: 0;
-  }
-
-  .chart-card-footer {
-    border-top: 1px solid #e8e8e8;
-    padding-top: 9px;
-    margin-top: 8px;
-
-    > * {
-      position: relative;
-    }
-
-    .field {
-      white-space: nowrap;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      margin: 0;
-    }
-  }
-
-  .chart-card-content {
-    margin-bottom: 12px;
-    position: relative;
-    height: 46px;
-    width: 100%;
-
-    .content-fix {
-      position: absolute;
-      left: 0;
-      bottom: 0;
-      width: 100%;
-    }
-  }
-
-  .total {
-    overflow: hidden;
-    text-overflow: ellipsis;
-    word-break: break-all;
-    white-space: nowrap;
-    margin-top: 4px;
-    margin-bottom: 0;
-    font-size: 30px;
-    line-height: 38px;
-    height: 38px;
-  }
-</style>

+ 0 - 110
src/components/chart/Gauge.vue

@@ -1,110 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { GaugeChart } from 'echarts/charts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'Gauge',
-    props: {
-      chartData: {
-        type: Object as PropType<Object>,
-        default: () => [],
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-      // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-      seriesColor: {
-        type: String,
-        default: '#1890ff',
-      },
-      // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-    },
-    setup(props) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, echarts } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        series: [
-          {
-            type: 'gauge',
-            progress: {
-              show: true,
-              width: 12,
-            },
-            axisLine: {
-              lineStyle: {
-                width: 12,
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-            splitLine: {
-              length: 12,
-              lineStyle: {
-                width: 1,
-                color: '#999',
-              },
-            },
-            axisLabel: {
-              distance: 25,
-              color: '#999',
-              fontSize: 12,
-            },
-            anchor: {
-              show: true,
-              showAbove: true,
-              size: 20,
-              itemStyle: {
-                borderWidth: 5,
-              },
-            },
-            title: {},
-            detail: {
-              valueAnimation: true,
-              fontSize: 25,
-              formatter: '{value}%',
-              offsetCenter: [0, '80%'],
-            },
-            data: [
-              {
-                value: 70,
-                name: '本地磁盘',
-              },
-            ],
-          },
-        ],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-
-      function initCharts() {
-        echarts.use(GaugeChart);
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        option.series[0].data[0].name = props.chartData.name;
-        option.series[0].data[0].value = props.chartData.value;
-        // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-        option.series[0].color = props.seriesColor;
-        // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-        setOptions(option);
-      }
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 79
src/components/chart/HeadInfo.vue

@@ -1,79 +0,0 @@
-<template>
-  <div class="head-info" :class="center && 'center'">
-    <span>{{ title }}</span>
-    <p :style="{ color: `${$props.iconColor}` }">{{ content }} <a-icon :type="icon" :style="{ fontSize: `24px`, color: `${$props.iconColor}` }" /></p>
-    <em v-if="bordered" />
-  </div>
-</template>
-
-<script lang="ts">
-  import { defineComponent } from 'vue';
-
-  export default defineComponent({
-    name: 'HeadInfo',
-    props: {
-      title: {
-        type: String,
-        default: '',
-      },
-      content: {
-        type: String,
-        default: '',
-      },
-      bordered: {
-        type: Boolean,
-        default: false,
-      },
-      center: {
-        type: Boolean,
-        default: true,
-      },
-      icon: {
-        type: String,
-        default: false,
-      },
-      // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-      iconColor: {
-        type: String,
-        default: '#2b99ff',
-      },
-      // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-    },
-  });
-</script>
-
-<style lang="less" scoped>
-  .head-info {
-    position: relative;
-    text-align: left;
-    padding: 0 32px 0 0;
-    min-width: 125px;
-
-    &.center {
-      text-align: center;
-      padding: 0 32px;
-    }
-
-    span {
-      display: inline-block;
-      font-size: 14px;
-      line-height: 22px;
-      margin-bottom: 4px;
-    }
-
-    p {
-      font-size: 24px;
-      line-height: 32px;
-      margin: 0;
-    }
-
-    em {
-      background-color: #e8e8e8;
-      position: absolute;
-      height: 56px;
-      width: 1px;
-      top: 0;
-      right: 0;
-    }
-  }
-</style>

+ 0 - 116
src/components/chart/LineMulti.vue

@@ -1,116 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-
-  export default defineComponent({
-    name: 'LineMulti',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-        required: true,
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      type: {
-        type: String as PropType<string>,
-        default: 'line',
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-    },
-    emits: ['click'],
-    setup(props, { emit }) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, getInstance } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow',
-            label: {
-              show: true,
-              backgroundColor: '#333',
-            },
-          },
-        },
-        legend: {
-          top: 30,
-        },
-        grid: {
-          top: 60,
-        },
-        xAxis: {
-          type: 'category',
-          data: [],
-        },
-        yAxis: {
-          type: 'value',
-        },
-        series: [],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        //图例类型
-        let typeArr = Array.from(new Set(props.chartData.map((item) => item.type)));
-        //轴数据
-        let xAxisData = Array.from(new Set(props.chartData.map((item) => item.name)));
-        let seriesData = [];
-        typeArr.forEach((type) => {
-          let obj: any = { name: type, type: props.type };
-          // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-          const findItem: any = props.chartData.find((item: any) => item.type == type);
-          if (findItem && findItem.color) {
-            obj.color = findItem.color;
-          }
-          // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-          // update-begin-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
-          let data = [];
-          xAxisData.forEach((x) => {
-            let dataArr = props.chartData.filter((item) => type === item.type && item.name == x);
-            if (dataArr && dataArr.length > 0) {
-              data.push(dataArr[0].value);
-            } else {
-              data.push(null);
-            }
-          });
-          // update-end-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
-          //data数据
-          obj['data'] = data;
-          seriesData.push(obj);
-        });
-        option.series = seriesData;
-        option.xAxis.data = xAxisData;
-        console.log('option', option);
-        setOptions(option);
-        getInstance()?.off('click', onClick);
-        getInstance()?.on('click', onClick);
-      }
-
-      function onClick(params) {
-        emit('click', params);
-      }
-
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 89
src/components/chart/Pie.vue

@@ -1,89 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, watchEffect, reactive, watch } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'Pie',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-      },
-      size: {
-        type: Object,
-        default: () => {},
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-    },
-    emits: ['click'],
-    setup(props, { emit }) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, getInstance, resize } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          formatter: '{b} ({c})',
-        },
-        series: [
-          {
-            type: 'pie',
-            radius: '72%',
-            center: ['50%', '55%'],
-            data: [],
-            labelLine: { show: true },
-            label: {
-              show: true,
-              formatter: '{b} \n ({d}%)',
-              color: '#B1B9D3',
-            },
-          },
-        ],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-      /**
-       * 监听拖拽大小变化
-       */
-      watch(
-        () => props.size,
-        () => {
-          resize();
-        },
-        {
-          immediate: true,
-        }
-      );
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        option.series[0].data = props.chartData;
-        setOptions(option);
-        resize();
-        getInstance()?.off('click', onClick);
-        getInstance()?.on('click', onClick);
-      }
-
-      function onClick(params) {
-        emit('click', params);
-      }
-
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 282
src/components/chart/README.md

@@ -1,282 +0,0 @@
-# 报表组件文档
-
-## 柱状图
-
-##### 引用方式
-
-```js
-import Bar from '/@/components/chart/Bar.vue';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-
-##### chartData 示例
-
-```json
-[
-  {
-    "name": "1月",
-    "value": 320
-  },
-  {
-    "name": "2月",
-    "value": 457
-  },
-  {
-    "name": "3月",
-    "value": 182
-  }
-]
-```
-
-##### 代码示例
-
-```html
-<template>
-  <Bar :chartData="chartData"></Bar>
-</template>
-
-<script lang="ts" setup>
-  import Bar from '/@/components/chart/Bar.vue';
-  const chartData = [
-    {
-      name: '1月',
-      value: 320,
-    },
-    {
-      name: '2月',
-      value: 457,
-    },
-    {
-      name: '3月',
-      value: 182,
-    },
-  ];
-</script>
-
-<style></style>
-```
-
-## 多列柱状图
-
-##### 引用方式
-
-```js
-import BarMulti from '/@/components/chart/BarMulti.vue';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-
-##### chartData 示例
-
-```json
-[
-  {
-    "name": "1月",
-    "value": 320,
-    "type": "2021"
-  },
-  {
-    "name": "2月",
-    "value": 457,
-    "type": "2021"
-  },
-  {
-    "name": "3月",
-    "value": 182,
-    "type": "2021"
-  },
-  {
-    "name": "1月",
-    "value": 240,
-    "type": "2022"
-  },
-  {
-    "name": "2月",
-    "value": 357,
-    "type": "2022"
-  },
-  {
-    "name": "3月",
-    "value": 456,
-    "type": "2022"
-  }
-]
-```
-
-## 迷你柱状图
-
-同柱形图,修改配置即可
-
-## 面积图
-
-##### 引用方式
-
-```js
-import Line from '/@/components/chart/Line.vue';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-| option    | object |      | 配置项     |
-
-##### chartData 示例
-
-```json
-[
-  {
-    "name": "1月",
-    "value": 320
-  },
-  {
-    "name": "2月",
-    "value": 457
-  },
-  {
-    "name": "3月",
-    "value": 182
-  }
-]
-```
-
-## 多行折线图
-
-##### 引用方式
-
-```js
-import LineMulti from '/@/components/chart/LineMulti.vue';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-| option    | object |      | 配置项     |
-
-##### chartData 示例
-
-同柱形图
-
-## 饼状图
-
-##### 引用方式
-
-```js
-import Pie from '/@/components/chart/Pie';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-| option    | object |      | 配置项     |
-
-##### chartData 示例
-
-```json
-[
-  { "name": "一月", "value": 40 },
-  { "name": "二月", "value": 21 },
-  { "name": "三月", "value": 17 },
-  { "name": "四月", "value": 13 },
-  { "name": "五月", "value": 9 }
-]
-```
-
-## 雷达图
-
-##### 引用方式
-
-```js
-import Radar from '/@/components/chart/Radar';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-| option    | object |      | 配置项     |
-
-##### chartData 示例
-
-```json
-[
-  { "item": "一月", "score": 40 },
-  { "item": "二月", "score": 20 },
-  { "item": "三月", "score": 67 },
-  { "item": "四月", "score": 43 },
-  { "item": "五月", "score": 90 }
-]
-```
-
-## 仪表盘
-
-##### 引用方式
-
-```js
-import Gauge from '/@/components/chart/Gauge';
-```
-
-##### 参数列表
-
-| 参数名    | 类型   | 必填 | 说明       |
-| --------- | ------ | ---- | ---------- |
-| chartData | array  | ✔️   | 报表数据源 |
-| width     | number |      | 报表宽度   |
-| height    | number |      | 报表高度   |
-| option    | object |      | 配置项     |
-
-## 排名列表
-
-##### 引用方式
-
-```js
-import RankList from '@/components/chart/RankList';
-```
-
-##### 参数列表
-
-| 参数名 | 类型   | 必填 | 说明                     |
-| ------ | ------ | ---- | ------------------------ |
-| title  | string |      | 报表标题                 |
-| list   | array  |      | 排名列表数据             |
-| height | number |      | 报表高度,默认自适应高度 |
-
-##### list 示例
-
-```json
-[
-  { "name": "北京朝阳 1 号店", "total": 1981 },
-  { "name": "北京朝阳 2 号店", "total": 1359 },
-  { "name": "北京朝阳 3 号店", "total": 1354 },
-  { "name": "北京朝阳 4 号店", "total": 263 },
-  { "name": "北京朝阳 5 号店", "total": 446 },
-  { "name": "北京朝阳 6 号店", "total": 796 }
-]
-```

+ 0 - 89
src/components/chart/Radar.vue

@@ -1,89 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'Radar',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-    },
-    setup(props) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        title: {
-          text: '基础雷达图',
-        },
-        legend: {
-          data: ['文综'],
-        },
-        radar: {
-          indicator: [{ name: '历史' }, { name: '地理' }, { name: '生物' }, { name: '化学' }, { name: '物理' }, { name: '政治' }],
-        },
-        series: [
-          {
-            type: 'radar' as 'custom',
-            data: [
-              {
-                value: [82, 70, 60, 55, 90, 66],
-                name: '文综',
-              },
-            ],
-          },
-        ],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        //图例类型
-        let typeArr = Array.from(new Set(props.chartData.map((item) => item.type)));
-        //雷达数据
-        let indicator = Array.from(
-          new Set(
-            props.chartData.map((item) => {
-              let { name, max } = item;
-              return { name, max };
-            })
-          )
-        );
-
-        let data = [];
-        typeArr.forEach((type) => {
-          let obj = { name: type };
-          let chartArr = props.chartData.filter((item) => type === item.type);
-          obj['value'] = chartArr.map((item) => item.value);
-          //data数据
-          data.push(obj);
-        });
-        option.radar.axisName = indicator;
-        option.series[0]['data'] = data;
-        setOptions(option);
-      }
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 79
src/components/chart/RankList.vue

@@ -1,79 +0,0 @@
-<template>
-  <div class="rank">
-    <h4 class="title">{{ title }}</h4>
-    <ul class="list" :style="{ height: height ? `${height}px` : 'auto', overflow: 'auto' }">
-      <li :key="index" v-for="(item, index) in list">
-        <span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
-        <span>{{ item.name }}</span>
-        <span>{{ item.total }}</span>
-      </li>
-    </ul>
-  </div>
-</template>
-
-<script lang="ts">
-  import { defineComponent } from 'vue';
-  export default defineComponent({
-    name: 'RankList',
-    props: {
-      title: {
-        type: String,
-        default: '',
-      },
-      list: {
-        type: Array,
-        default: null,
-      },
-      height: {
-        type: Number,
-        default: null,
-      },
-    },
-  });
-</script>
-
-<style lang="less" scoped>
-  .rank {
-    padding: 0 32px 32px 72px;
-
-    .list {
-      margin: 25px 0 0;
-      padding: 0;
-      list-style: none;
-
-      li {
-        margin-top: 16px;
-
-        span {
-          font-size: 14px;
-          line-height: 22px;
-
-          &:first-child {
-            background-color: #f5f5f5;
-            color: rgba(0, 0, 0, 0.65);
-            border-radius: 20px;
-            display: inline-block;
-            font-size: 12px;
-            font-weight: 600;
-            margin-right: 24px;
-            height: 20px;
-            line-height: 20px;
-            width: 20px;
-            text-align: center;
-          }
-          &.active {
-            background-color: #314659;
-            color: #fff;
-          }
-          &:last-child {
-            float: right;
-          }
-        }
-      }
-    }
-  }
-
-  .mobile .rank {
-    padding: 0 32px 32px 32px;
-  }
-</style>

+ 0 - 91
src/components/chart/SingleLine.vue

@@ -1,91 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'single-line',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-      // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-      seriesColor: {
-        type: String,
-        default: '#1890ff',
-      },
-      // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-    },
-    setup(props) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, echarts } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow',
-            label: {
-              show: true,
-              backgroundColor: '#333',
-            },
-          },
-        },
-        xAxis: {
-          type: 'category',
-          data: [],
-        },
-        yAxis: {
-          type: 'value',
-        },
-        series: [
-          {
-            type: 'line',
-            showSymbol: false,
-            smooth: true,
-            areaStyle: {},
-            data: [],
-            color: props.seriesColor,
-          },
-        ],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-      
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        let seriesData = props.chartData.map((item) => {
-          return item.value;
-        });
-        let xAxisData = props.chartData.map((item) => {
-          return item.name;
-        });
-        option.series[0].data = seriesData;
-        // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-        option.series[0].color = props.seriesColor;
-        // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
-        option.xAxis.data = xAxisData;
-        setOptions(option);
-      }
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 107
src/components/chart/StackBar.vue

@@ -1,107 +0,0 @@
-<template>
-  <div ref="chartRef" :style="{ height, width }"></div>
-</template>
-<script lang="ts">
-  import { defineComponent, PropType, ref, Ref, reactive, watchEffect, watch } from 'vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-  import { cloneDeep } from 'lodash-es';
-  export default defineComponent({
-    name: 'StackBar',
-    props: {
-      chartData: {
-        type: Array,
-        default: () => [],
-        required: true,
-      },
-      size: {
-        type: Object,
-        default: () => {},
-      },
-      option: {
-        type: Object,
-        default: () => ({}),
-      },
-      type: {
-        type: String as PropType<string>,
-        default: 'bar',
-      },
-      width: {
-        type: String as PropType<string>,
-        default: '100%',
-      },
-      height: {
-        type: String as PropType<string>,
-        default: 'calc(100vh - 78px)',
-      },
-    },
-    setup(props) {
-      const chartRef = ref<HTMLDivElement | null>(null);
-      const { setOptions, echarts, resize } = useECharts(chartRef as Ref<HTMLDivElement>);
-      const option = reactive({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow',
-            label: {
-              show: true,
-              backgroundColor: '#333',
-            },
-          },
-        },
-        legend: {
-          top: 30,
-        },
-        grid: {
-          top: 60,
-        },
-        xAxis: {
-          type: 'value',
-        },
-        yAxis: {
-          type: 'category',
-          data: [],
-        },
-        series: [],
-      });
-
-      watchEffect(() => {
-        props.chartData && initCharts();
-      });
-      /**
-       * 监听拖拽大小变化
-       */
-      watch(
-        () => props.size,
-        () => {
-          console.log('props.size', props.size);
-          resize();
-        },
-        {
-          immediate: true,
-        }
-      );
-      function initCharts() {
-        if (props.option) {
-          Object.assign(option, cloneDeep(props.option));
-        }
-        //图例类型
-        let typeArr = Array.from(new Set(props.chartData.map((item) => item.type)));
-        //轴数据
-        let yAxisData = Array.from(new Set(props.chartData.map((item) => item.name)));
-        let seriesData = [];
-        typeArr.forEach((type) => {
-          let obj = { name: type, type: props.type, stack: 'total' };
-          let chartArr = props.chartData.filter((item) => type === item.type);
-          //data数据
-          obj['data'] = chartArr.map((item) => item.value);
-          seriesData.push(obj);
-        });
-        option.series = seriesData;
-        option.yAxis.data = yAxisData;
-        setOptions(option);
-      }
-
-      return { chartRef };
-    },
-  });
-</script>

+ 0 - 90
src/components/chart/Trend.vue

@@ -1,90 +0,0 @@
-<template>
-  <div class="chart-trend">
-    {{ term }}
-    <span>{{ rate }}%</span>
-    <span :class="['trend-icon', trend]"><Icon :icon="'ant-design:caret-' + trend + '-outlined'" /></span>
-  </div>
-</template>
-
-<script lang="ts">
-  import { defineComponent, computed } from 'vue';
-
-  export default defineComponent({
-    name: 'Trend',
-    props: {
-      // 同title
-      term: {
-        type: String,
-        default: '',
-        required: true,
-      },
-      // 百分比
-      percentage: {
-        type: Number,
-        default: null,
-      },
-      type: {
-        type: Boolean,
-        default: null,
-      },
-      target: {
-        type: Number,
-        default: 0,
-      },
-      value: {
-        type: Number,
-        default: 0,
-      },
-      fixed: {
-        type: Number,
-        default: 2,
-      },
-    },
-    setup(props) {
-      const trend = computed(() => {
-        let type = props.type === null ? props.value >= props.target : props.type;
-        return type ? 'up' : 'down';
-      });
-      const rate = computed(() =>
-        (props.percentage === null ? (Math.abs(props.value - props.target) * 100) / props.target : props.percentage).toFixed(props.fixed)
-      );
-      return {
-        trend,
-        rate,
-      };
-    },
-  });
-</script>
-
-<style lang="less" scoped>
-  .chart-trend {
-    display: inline-block;
-    font-size: 14px;
-    line-height: 22px;
-
-    .trend-icon {
-      font-size: 12px;
-
-      &.up,
-      &.down {
-        margin-left: 4px;
-        position: relative;
-        top: 1px;
-
-        i {
-          font-size: 12px;
-          transform: scale(0.83);
-        }
-      }
-
-      &.up {
-        color: #f5222d;
-      }
-
-      &.down {
-        color: #52c41a;
-        top: -1px;
-      }
-    }
-  }
-</style>

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

@@ -104,7 +104,7 @@ export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods:
           args.columns = container;
           handlerCol(args);
         }
-      }
+      };
 
       props.columns.forEach((column: JVxeColumn) => handleColumn(column, columns));
 

+ 19 - 17
src/components/jeecg/JVxeTable/src/hooks/useMethods.ts

@@ -210,7 +210,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    * @param force 是否强制判断
    */
   function isDisabledRow(row, rowIndex: number | boolean = -1, force = true) {
-    if(typeof rowIndex === 'boolean'){
+    if (typeof rowIndex === 'boolean') {
       force = rowIndex;
       rowIndex = -1;
     }
@@ -371,7 +371,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
             insertIndex: index,
             $table: xTable,
             target: instanceRef.value,
-            isModalData: options?.isModalData
+            isModalData: options?.isModalData,
           });
         }
       }
@@ -386,9 +386,9 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     // 是否激活编辑状态
     setActive?: boolean;
     //是否需要触发change事件
-    emitChange?:boolean
+    emitChange?: boolean;
     // 是否是modal弹窗添加的数据
-    isModalData?:boolean
+    isModalData?: boolean;
   }
 
   /**
@@ -401,8 +401,8 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
   async function addRows(rows: Recordable | Recordable[] = {}, options?: IAddRowsOptions) {
     //update-begin-author:taoyan date:2022-8-12 for: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改
     let result = await addOrInsert(rows, -1, 'added', options);
-    if(options && options!.emitChange==true){
-      trigger('valueChange', {column: 'all', row: result.row})
+    if (options && options!.emitChange == true) {
+      trigger('valueChange', { column: 'all', row: result.row });
     }
     // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-279】行编辑添加新字段滚动对应位置
     let xTable = getXTable();
@@ -465,7 +465,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     rowIds?: string[];
     // 是否保留新行的id
     keepNewId?: boolean;
-  }
+  };
 
   /** 获取表格数据 */
   function getTableData(options: getTableDataOptions = {}) {
@@ -530,10 +530,12 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
     return null;
   }
 
-  type filterNewRowsOptions = {
-    keepNewId?: boolean;
-    removeNewLine?: boolean;
-  } | boolean
+  type filterNewRowsOptions =
+    | {
+        keepNewId?: boolean;
+        removeNewLine?: boolean;
+      }
+    | boolean;
 
   /**
    * 过滤添加的行
@@ -541,7 +543,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    * @param optOrRm 如果传 boolean 则是 removeNewLine 参数(true = 删除新增,false=只删除id),如果传对象则是配置参数
    * @param handler function
    */
-  function filterNewRows(rows, optOrRm:filterNewRowsOptions = true, handler?: Fn) {
+  function filterNewRows(rows, optOrRm: filterNewRowsOptions = true, handler?: Fn) {
     let insertRecords = getXTable().getInsertRecords();
     let records: Recordable[] = [];
     optOrRm = typeof optOrRm === 'boolean' ? { removeNewLine: optOrRm } : optOrRm;
@@ -622,7 +624,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
               col: column.params,
               column: column,
               isSetValues: true,
-              row: {...row}
+              row: { ...row },
             });
             count++;
           }
@@ -764,7 +766,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
       // 4.1.0
       //await xTable.updateCache();
       // 4.1.1
-      await xTable.cacheRowMap(true)
+      await xTable.cacheRowMap(true);
       // update-end--author:liaozhiyang---date:20231011---for:【QQYUN-5133】JVxeTable 行编辑升级
       return await xTable.updateData();
     }
@@ -859,15 +861,15 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
    */
   function getSelectedData(isFull?: boolean) {
     const xTable = getXTable();
-    let rows:any[] = []
+    let rows: any[] = [];
     if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
       let row = xTable.getRadioRecord(isFull);
       if (isNull(row)) {
         return [];
       }
-      rows = [row]
+      rows = [row];
     } else {
-      rows = xTable.getCheckboxRecords(isFull)
+      rows = xTable.getCheckboxRecords(isFull);
     }
     let records: Recordable[] = [];
     for (let row of rows) {

+ 0 - 65
src/electron/index.ts

@@ -1,65 +0,0 @@
-import type {App} from "vue";
-import {router} from "@/router";
-import {useGlobSetting} from "@/hooks/setting";
-
-const glob = useGlobSetting();
-
-const _PRELOAD_UTILS = '_ELECTRON_PRELOAD_UTILS_';
-
-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();
-}
-
-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)
-  }
-}

+ 8 - 10
src/layouts/default/header/components/notify/index.vue

@@ -28,7 +28,7 @@
   import { getToken } from '/@/utils/auth';
   import md5 from 'crypto-js/md5';
 
-  import SysMessageModal from '/@/views/system/message/components/SysMessageModal.vue'
+  import SysMessageModal from '/@/views/system/message/components/SysMessageModal.vue';
 
   export default defineComponent({
     components: {
@@ -59,17 +59,17 @@
       });
 
       const [registerMessageModal, { openModal: openMessageModal }] = useModal();
-      function clickBadge(){
+      function clickBadge() {
         //消息列表弹窗前去除角标
         for (let i = 0; i < listData.value.length; i++) {
           listData.value[i].count = 0;
         }
-        openMessageModal(true, {})
+        openMessageModal(true, {});
       }
 
       const popoverVisible = ref<boolean>(false);
       onMounted(() => {
-       initWebSocket();
+        // initWebSocket();
       });
 
       function mapAnnouncement(item) {
@@ -123,7 +123,7 @@
         let token = getToken();
         //将登录token生成一个短的标识
         let wsClientId = md5(token);
-        let userId = unref(userStore.getUserInfo).id + "_" + wsClientId;
+        let userId = unref(userStore.getUserInfo).id + '_' + wsClientId;
         // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
         let url = glob.domainUrl?.replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId;
         connectWebSocket(url);
@@ -134,9 +134,9 @@
         if (data.cmd === 'topic' || data.cmd === 'user') {
           //update-begin-author:taoyan date:2022-7-13 for: VUEN-1674【严重bug】系统通知,为什么必须刷新右上角才提示
           //后台保存数据太慢 前端延迟刷新消息
-          setTimeout(()=>{
+          setTimeout(() => {
             loadData();
-          }, 1000)
+          }, 1000);
           //update-end-author:taoyan date:2022-7-13 for: VUEN-1674【严重bug】系统通知,为什么必须刷新右上角才提示
         }
       }
@@ -146,7 +146,7 @@
         popoverVisible.value = false;
         readAllMsg({}, loadData);
       }
-      async function reloadCount(id){
+      async function reloadCount(id) {
         try {
           await editCementSend(id);
           await loadData();
@@ -193,7 +193,6 @@
       .ant-list-item {
         padding: 12px 24px;
         transition: background-color 300ms;
-
       }
 
       .bottom-buttons {
@@ -264,5 +263,4 @@
       }
     }
   }
-
 </style>

+ 4 - 4
src/layouts/default/header/components/notify/index_old.vue

@@ -75,7 +75,7 @@
       listData.value[1].count = 0;
 
       onMounted(() => {
-        initWebSocket();
+        // initWebSocket();
       });
 
       const count = computed(() => {
@@ -143,13 +143,13 @@
       }
 
       function onWebSocketMessage(data) {
-        console.log('---onWebSocketMessage---', data)
+        console.log('---onWebSocketMessage---', data);
         if (data.cmd === 'topic' || data.cmd === 'user') {
           //update-begin-author:taoyan date:2022-7-13 for: VUEN-1674【严重bug】系统通知,为什么必须刷新右上角才提示
           //后台保存数据太慢 前端延迟刷新消息
-          setTimeout(()=>{
+          setTimeout(() => {
             loadData();
-          }, 1000)
+          }, 1000);
           //update-end-author:taoyan date:2022-7-13 for: VUEN-1674【严重bug】系统通知,为什么必须刷新右上角才提示
         }
       }

+ 12 - 10
src/layouts/default/header/index.vue

@@ -11,7 +11,12 @@
       />
       <LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" />
       <!-- 欢迎语 -->
-      <span v-if="getShowContent && getShowBreadTitle && !getIsMobile" :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`,'headerIntroductionClass']"> {{t('layout.header.welcomeIn')}} {{ title }} </span>
+      <span
+        v-if="getShowContent && getShowBreadTitle && !getIsMobile"
+        :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`, 'headerIntroductionClass']"
+      >
+        {{ t('layout.header.welcomeIn') }} {{ title }}
+      </span>
     </div>
     <!-- left end -->
 
@@ -38,8 +43,6 @@
       <UserDropDown :theme="getHeaderTheme" />
 
       <SettingDrawer v-if="getShowSetting" :class="`${prefixCls}-action__item`" />
-      <!-- ai助手 -->
-      <Aide v-if="getAiIconShow"></Aide>
     </div>
   </Header>
   <LoginSelect ref="loginSelectRef" @success="loginSelectOk"></LoginSelect>
@@ -74,7 +77,6 @@
   import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
   import { useUserStore } from '/@/store/modules/user';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import Aide from "@/views/dashboard/ai/components/aide/index.vue"
   const { t } = useI18n();
 
   export default defineComponent({
@@ -96,7 +98,6 @@
       SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
         loading: true,
       }),
-      Aide
     },
     props: {
       fixed: propTypes.bool,
@@ -216,7 +217,7 @@
         loginSelectRef,
         title,
         t,
-        getAiIconShow
+        getAiIconShow,
       };
     },
   });
@@ -226,7 +227,7 @@
   //update-begin---author:scott ---date:2022-09-30  for:默认隐藏顶部菜单面包屑-----------
   //顶部欢迎语展示样式
   @prefix-cls: ~'@{namespace}-layout-header';
-  
+
   .ant-layout .@{prefix-cls} {
     display: flex;
     padding: 0 8px;
@@ -234,14 +235,14 @@
     height: @header-height;
     // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶栏高度
     align-items: center;
-    
+
     .headerIntroductionClass {
       margin-right: 4px;
       margin-bottom: 2px;
       border-bottom: 0px;
       border-left: 0px;
     }
-    
+
     &--light {
       .headerIntroductionClass {
         color: #000;
@@ -252,7 +253,8 @@
       .headerIntroductionClass {
         color: rgba(255, 255, 255, 1);
       }
-      .anticon, .truncate {
+      .anticon,
+      .truncate {
         color: rgba(255, 255, 255, 1);
       }
     }

+ 39 - 28
src/layouts/default/tabs/index.vue

@@ -25,13 +25,26 @@
           <!-- 列表页全屏 
           <FoldButton v-if="getShowFold" />-->
           <!-- <FullscreenOutlined /> -->
-          <router-link to="/ai" class="ai-icon">
+          <!-- <router-link to="/ai" class="ai-icon">
             <a-tooltip title="AI助手" placement="left">
-              <svg t="1706259688149" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2056" width="17" height="17">
-                <path d="M826.368 325.632c0-7.168 2.048-10.24 10.24-10.24h123.904c7.168 0 10.24 2.048 10.24 10.24v621.568c0 7.168-2.048 10.24-10.24 10.24h-122.88c-8.192 0-10.24-4.096-10.24-10.24l-1.024-621.568z m-8.192-178.176c0-50.176 35.84-79.872 79.872-79.872 48.128 0 79.872 32.768 79.872 79.872 0 52.224-33.792 79.872-81.92 79.872-46.08 1.024-77.824-27.648-77.824-79.872zM462.848 584.704C441.344 497.664 389.12 307.2 368.64 215.04h-2.048c-16.384 92.16-58.368 247.808-92.16 369.664h188.416zM243.712 712.704l-62.464 236.544c-2.048 7.168-4.096 8.192-12.288 8.192H54.272c-8.192 0-10.24-2.048-8.192-12.288l224.256-783.36c4.096-13.312 7.168-26.624 8.192-65.536 0-6.144 2.048-8.192 7.168-8.192H450.56c6.144 0 8.192 2.048 10.24 8.192l250.88 849.92c2.048 7.168 0 10.24-7.168 10.24H573.44c-7.168 0-10.24-2.048-12.288-7.168l-65.536-236.544c1.024 1.024-251.904 0-251.904 0z" fill="#333333" p-id="19816"></path>
+              <svg
+                t="1706259688149"
+                class="icon"
+                viewBox="0 0 1024 1024"
+                version="1.1"
+                xmlns="http://www.w3.org/2000/svg"
+                p-id="2056"
+                width="17"
+                height="17"
+              >
+                <path
+                  d="M826.368 325.632c0-7.168 2.048-10.24 10.24-10.24h123.904c7.168 0 10.24 2.048 10.24 10.24v621.568c0 7.168-2.048 10.24-10.24 10.24h-122.88c-8.192 0-10.24-4.096-10.24-10.24l-1.024-621.568z m-8.192-178.176c0-50.176 35.84-79.872 79.872-79.872 48.128 0 79.872 32.768 79.872 79.872 0 52.224-33.792 79.872-81.92 79.872-46.08 1.024-77.824-27.648-77.824-79.872zM462.848 584.704C441.344 497.664 389.12 307.2 368.64 215.04h-2.048c-16.384 92.16-58.368 247.808-92.16 369.664h188.416zM243.712 712.704l-62.464 236.544c-2.048 7.168-4.096 8.192-12.288 8.192H54.272c-8.192 0-10.24-2.048-8.192-12.288l224.256-783.36c4.096-13.312 7.168-26.624 8.192-65.536 0-6.144 2.048-8.192 7.168-8.192H450.56c6.144 0 8.192 2.048 10.24 8.192l250.88 849.92c2.048 7.168 0 10.24-7.168 10.24H573.44c-7.168 0-10.24-2.048-12.288-7.168l-65.536-236.544c1.024 1.024-251.904 0-251.904 0z"
+                  fill="#333333"
+                  p-id="19816"
+                ></path>
               </svg>
             </a-tooltip>
-          </router-link>
+          </router-link> -->
         </div>
       </template>
     </Tabs>
@@ -60,7 +73,6 @@
   import { listenerRouteChange } from '/@/logics/mitt/routeChange';
 
   import { useRouter } from 'vue-router';
-  import Aide from "/@/views/dashboard/ai/components/aide/index.vue"
 
   export default defineComponent({
     name: 'MultipleTabs',
@@ -70,7 +82,6 @@
       Tabs,
       TabPane: Tabs.TabPane,
       TabContent,
-      Aide,
     },
     setup() {
       const affixTextList = initAffixTabs();
@@ -159,30 +170,30 @@
   @import './tabs.theme.smooth.less';
 </style>
 <style lang="less" scoped>
-@prefix-cls: ~'@{namespace}-multiple-tabs';
-.@{prefix-cls} {
-  :deep(.anticon) {
-    display: inline-block;
-  }
-  // update-begin--author:liaozhiyang---date:20241016---for:【issues/7345】标签样式切换到极简模式样式错乱
-  .rightExtra {
-    display: flex;
-    :deep(svg) {
-      &:not(.icon) {
-        vertical-align: -0.3em;
-      }
+  @prefix-cls: ~'@{namespace}-multiple-tabs';
+  .@{prefix-cls} {
+    :deep(.anticon) {
+      display: inline-block;
     }
-    .ai-icon {
+    // update-begin--author:liaozhiyang---date:20241016---for:【issues/7345】标签样式切换到极简模式样式错乱
+    .rightExtra {
       display: flex;
-      align-items: center;
-      justify-content: center;
-      cursor: pointer;
-      width: 36px;
-      color: @text-color;
-      text-align: center;
-      border-left: 1px solid @border-color-base;
+      :deep(svg) {
+        &:not(.icon) {
+          vertical-align: -0.3em;
+        }
+      }
+      .ai-icon {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+        width: 36px;
+        color: @text-color;
+        text-align: center;
+        border-left: 1px solid @border-color-base;
+      }
     }
+    // update-end--author:liaozhiyang---date:20241016---for:【issues/7345】标签样式切换到极简模式样式错乱
   }
-  // update-end--author:liaozhiyang---date:20241016---for:【issues/7345】标签样式切换到极简模式样式错乱
-}
 </style>

+ 18 - 24
src/main.ts

@@ -1,4 +1,4 @@
-import type { MainAppProps } from "#/main";
+import type { MainAppProps } from '#/main';
 import 'uno.css';
 import '/@/design/index.less';
 import 'ant-design-vue/dist/reset.css';
@@ -14,30 +14,24 @@ import { setupRouterGuard } from '/@/router/guard';
 import { setupStore } from '/@/store';
 import { setupGlobDirectives } from '/@/directives';
 import { setupI18n } from '/@/locales/setupI18n';
-import { setupElectron } from "@/electron";
+// import { setupElectron } from '@/electron';
 import { registerGlobComp } from '/@/components/registerGlobComp';
 import { registerThirdComp } from '/@/settings/registerThirdComp';
-import { registerSuper } from '/@/views/super/registerSuper';
+// import { registerSuper } from '/@/views/super/registerSuper';
 import { useSso } from '/@/hooks/web/useSso';
-import { checkIsQiankunMicro } from "/@/qiankun/micro";
-import { autoUseQiankunMicro } from "/@/qiankun/micro/qiankunMicro";
-import { useAppStoreWithOut } from "@/store/modules/app";
+// import { checkIsQiankunMicro } from '/@/qiankun/micro';
+// import { autoUseQiankunMicro } from '/@/qiankun/micro/qiankunMicro';
+import { useAppStoreWithOut } from '@/store/modules/app';
 
 // 注册online模块lib
 import { registerPackages } from '/@/utils/monorepo/registerPackages';
 
 // 程序入口
 async function main() {
-  if (checkIsQiankunMicro()) {
-    // 【JEECG作为乾坤子应用】以乾坤子应用模式启动
-    // await autoUseQiankunMicro(bootstrap)
-    await autoUseQiankunMicro(bootstrap)
-  } else {
-    // 获取参数
-    const props = getMainAppProps();
-    // 普通启动
-    await bootstrap(props)
-  }
+  // 获取参数
+  const props = getMainAppProps();
+  // 普通启动
+  await bootstrap(props);
 }
 
 main();
@@ -73,8 +67,8 @@ async function bootstrap(props?: MainAppProps) {
   await useSso().ssoLogin();
 
   // 注册super应用路由
-  await registerSuper(app);
-  
+  // await registerSuper(app);
+
   // 配置路由
   setupRouter(app);
 
@@ -91,7 +85,7 @@ async function bootstrap(props?: MainAppProps) {
   await registerThirdComp(app);
 
   // 配置electron
-  setupElectron(app)
+  // setupElectron(app)
 
   // 当路由准备好时再执行挂载( https://next.router.vuejs.org/api/#isready)
   await router.isReady();
@@ -99,9 +93,9 @@ async function bootstrap(props?: MainAppProps) {
   // 挂载应用
   app.mount(getMountContainer(props), true);
 
-  console.log(" vue3 app 加载完成!")
+  console.log(' vue3 app 加载完成!');
 
-  return app
+  return app;
 }
 
 // 获取应用挂载容器
@@ -127,14 +121,14 @@ function getMainAppProps(): MainAppProps {
   return {
     hideSider,
     hideHeader,
-    hideMultiTabs
-  }
+    hideMultiTabs,
+  };
 }
 
 // 配置主应用参数
 function setupProps(props?: MainAppProps) {
   if (!props) {
-    return
+    return;
   }
   const appStore = useAppStoreWithOut();
   appStore.setMainAppProps(props);

+ 0 - 22
src/qiankun/apps.ts

@@ -1,22 +0,0 @@
-// /**
-//  *微应用apps
-//  * @name: 微应用名称 - 具有唯一性
-//  * @entry: 微应用入口.必选 - 通过该地址加载微应用,
-//  * @container: 微应用挂载节点 - 微应用加载完成后将挂载在该节点上
-//  * @activeRule: 微应用触发的路由规则 - 触发路由规则后将加载该微应用
-//  */
-// //子应用列表
-// const _apps: object[] = [];
-// for (const key in import.meta.env) {
-//   if (key.includes('VITE_APP_SUB_')) {
-//     const name = key.split('VITE_APP_SUB_')[1];
-//     const obj = {
-//       name,
-//       entry: import.meta.env[key],
-//       container: '#content',
-//       activeRule: name,
-//     };
-//     _apps.push(obj);
-//   }
-// }
-// export const apps = _apps;

+ 0 - 73
src/qiankun/index.ts

@@ -1,73 +0,0 @@
-// /**
-//  * qiankun配置
-//  */
-// import { registerMicroApps, setDefaultMountApp, start, runAfterFirstMounted, addGlobalUncaughtErrorHandler } from 'qiankun';
-// import { apps } from './apps';
-// import { getProps, initGlState } from './state';
-//
-// /**
-//  * 重构apps
-//  */
-// function filterApps() {
-//   apps.forEach((item) => {
-//     //主应用需要传递给微应用的数据。
-//     item.props = getProps();
-//     //微应用触发的路由规则
-//     // @ts-ignore
-//     item.activeRule = genActiveRule('/' + item.activeRule);
-//   });
-//   return apps;
-// }
-//
-// /**
-//  * 路由监听
-//  * @param {*} routerPrefix 前缀
-//  */
-// function genActiveRule(routerPrefix) {
-//   return (location) => location.pathname.startsWith(routerPrefix);
-// }
-//
-// /**
-//  * 微应用注册
-//  */
-// function registerApps() {
-//   const _apps = filterApps();
-//   registerMicroApps(_apps, {
-//     beforeLoad: [
-//       // @ts-ignore
-//       (loadApp) => {
-//         console.log('before load', loadApp);
-//       },
-//     ],
-//     beforeMount: [
-//       // @ts-ignore
-//       (mountApp) => {
-//         console.log('before mount', mountApp);
-//       },
-//     ],
-//     afterMount: [
-//       // @ts-ignore
-//       (mountApp) => {
-//         console.log('before mount', mountApp);
-//       },
-//     ],
-//     afterUnmount: [
-//       // @ts-ignore
-//       (unloadApp) => {
-//         console.log('after unload', unloadApp);
-//       },
-//     ],
-//   });
-//   // 设置默认子应用,与 genActiveRule中的参数保持一致
-//   // setDefaultMountApp();
-//   // 第一个微应用 mount 后需要调用的方法,比如开启一些监控或者埋点脚本。
-//   runAfterFirstMounted(() => console.log('开启监控'));
-//   // 添加全局的未捕获异常处理器。
-//   addGlobalUncaughtErrorHandler((event) => console.log(event));
-//   // 定义全局状态
-//   initGlState();
-//   //启动qiankun
-//   start({});
-// }
-//
-// export default registerApps;

+ 0 - 12
src/qiankun/micro/index.ts

@@ -1,12 +0,0 @@
-import {qiankunWindow} from 'vite-plugin-qiankun/dist/helper'
-
-/**
- * 【JEECG作为乾坤子应用】【判断当前是否是以乾坤子应用的模式运行】
- */
-export function checkIsQiankunMicro(): boolean {
-  return !!qiankunWindow.__POWERED_BY_QIANKUN__;
-}
-
-export function getGlobal() {
-  return (checkIsQiankunMicro() ? qiankunWindow : window) as Window
-}

+ 0 - 57
src/qiankun/micro/qiankunMicro.ts

@@ -1,57 +0,0 @@
-/*
-* 【JEECG作为乾坤子应用】
-*/
-import type {App} from 'vue';
-import type {MainAppProps} from "#/main";
-
-import {destroyStore} from "@/store";
-import {destroyRouter} from "@/router";
-import {clearComponent} from "@/components/jeecg/JVxeTable/src/componentMap";
-
-import {renderWithQiankun} from 'vite-plugin-qiankun/dist/helper';
-
-/**
- * 以乾坤子应用模式运行
- * @param render
- */
-export async function useQiankunMicroApp(render: (props?: MainAppProps) => Promise<App>) {
-  let instance: Nullable<App> = null;
-
-  // 注册乾坤子应用生命周期函数
-  renderWithQiankun({
-    async mount(props) {
-      console.debug('[qiankun-micro] mount - props :', props)
-      instance = await render({
-        container: props.container!,
-        hideSider: props.hideSider,
-        hideHeader: props.hideHeader,
-        hideMultiTabs: props.hideMultiTabs,
-      });
-    },
-    bootstrap() {
-      console.debug('[qiankun-micro] bootstrap');
-    },
-    update(props) {
-      console.debug('[qiankun-micro] update: ', props);
-    },
-    unmount(props) {
-      console.debug('[qiankun-micro] unmount: ', props);
-
-      destroyStore();
-      destroyRouter();
-
-      if (instance) {
-        clearComponent();
-        instance.unmount();
-        instance._container.innerHTML = '';
-        instance = null;
-      }
-    },
-  });
-
-  return instance!
-}
-
-export async function autoUseQiankunMicro(fn: Fn) {
-  return useQiankunMicroApp(fn)
-}

+ 0 - 38
src/qiankun/state.ts

@@ -1,38 +0,0 @@
-// /**
-//  *公共数据
-//  */
-// import { initGlobalState } from 'qiankun';
-// import { store } from '/@/store';
-// import { router } from '/@/router';
-// import { getToken } from '/@/utils/auth';
-// //定义传入子应用的数据
-// export function getProps() {
-//   return {
-//     data: {
-//       publicPath: '/',
-//       token: getToken(),
-//       store,
-//       router,
-//     },
-//   };
-// }
-//
-// /**
-//  * 定义全局状态,并返回通信方法,在主应用使用,微应用通过 props 获取通信方法。
-//  * @param state 主应用穿的公共数据
-//  */
-// export function initGlState(info = { userName: 'admin' }) {
-//   // 初始化state
-//   const actions = initGlobalState(info);
-//   // 设置新的值
-//   actions.setGlobalState(info);
-//   // 注册 观察者 函数 - 响应 globalState 变化,在 globalState 发生改变时触发该 观察者 函数。
-//   actions.onGlobalStateChange((newState, prev) => {
-//     // state: 变更后的状态; prev 变更前的状态
-//     console.info('newState', newState);
-//     console.info('prev', prev);
-//     for (const key in newState) {
-//       console.info('onGlobalStateChange', key);
-//     }
-//   });
-// }

+ 5 - 5
src/router/helper/menuHelper.ts

@@ -13,8 +13,8 @@ export function getAllParentPath<T = Recordable>(treeData: T[], path: string) {
   // 先匹配不包含隐藏菜单的路径
   let menuList = findMenuPath(treeData, path, false);
   // 如果没有匹配到,再匹配包含隐藏菜单的路径
-  if(!(menuList?.length)) {
-    menuList = findMenuPath(treeData, path, true)
+  if (!menuList?.length) {
+    menuList = findMenuPath(treeData, path, true);
   }
   // update-end--author:sunjianlei---date:220230426---for:【issues/478】修复菜单展开合并BUG
   return (menuList || []).map((item) => item.path);
@@ -30,10 +30,10 @@ export function getAllParentPath<T = Recordable>(treeData: T[], path: string) {
 function findMenuPath<T = Recordable>(treeData: T[], path: string, matchHide: boolean) {
   return findPath(treeData, (n) => {
     // 隐藏菜单不参与匹配
-    if(!matchHide && n.hideMenu) {
+    if (!matchHide && n.hideMenu) {
       return false;
     }
-    return n.path === path
+    return n.path === path;
   }) as Menu[];
 }
 
@@ -96,7 +96,7 @@ export function transformRouteToMenu(routeModList: AppRouteModule[], routerMappi
         meta: node.meta,
         name: title,
         hideMenu,
-        alwaysShow:node.alwaysShow||false,
+        alwaysShow: node.alwaysShow || false,
         path: node.path,
         ...(node.redirect ? { redirect: node.redirect } : {}),
       };

+ 6 - 13
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[] = [];
@@ -19,13 +18,10 @@ 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(),
-  )
+    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 };

+ 6 - 6
src/router/router.ts

@@ -1,13 +1,13 @@
 /*
  * 路由实例存储文件,请勿轻易添加其他代码,防止出现 HMR 或其他问题
  */
-import type {Router, RouterHistory} from 'vue-router';
-import {createRouter as createVueRouter, createWebHistory, createWebHashHistory, RouterOptions} from 'vue-router';
+import type { Router, RouterHistory } from 'vue-router';
+import { createRouter as createVueRouter, createWebHistory, createWebHashHistory, RouterOptions } from 'vue-router';
 
 export let router: Router = null as unknown as Router;
 
 export function setRouter(r: Router) {
-  router = r
+  router = r;
 }
 
 let webHistory: Nullable<RouterHistory> = null;
@@ -27,9 +27,9 @@ export function createRouter(options: Partial<RouterOptions>, useHashHistory = f
     ...options,
   });
 
-  setRouter(router)
+  setRouter(router);
 
-  return router
+  return router;
 }
 
 // 销毁路由
@@ -38,5 +38,5 @@ export function destroyRouter() {
   if (webHistory) {
     webHistory.destroy();
   }
-  webHistory = null
+  webHistory = null;
 }

+ 0 - 23
src/router/routes/staticRouter.ts

@@ -1,23 +0,0 @@
-import type { AppRouteRecordRaw } from '/@/router/types';
-import { LAYOUT } from '/@/router/constant';
-
-export const AI_ROUTE: AppRouteRecordRaw = {
-  path: '',
-  name: 'ai-parent',
-  component: LAYOUT,
-  meta: {
-    title: 'ai',
-  },
-  children: [
-    {
-      path: '/ai',
-      name: 'ai',
-      component: () => import('/@/views/dashboard/ai/index.vue'),
-      meta: {
-        title: 'AI助手',
-      },
-    },
-  ],
-};
-
-export const staticRoutesList = [AI_ROUTE];

+ 1 - 2
src/router/types.ts

@@ -45,9 +45,8 @@ export interface Menu {
   tag?: MenuTag;
 
   hideMenu?: boolean;
-  
+
   alwaysShow?: boolean;
-  
 }
 
 export interface MenuModule {

+ 5 - 6
src/store/modules/permission.ts

@@ -15,13 +15,12 @@ import { PermissionModeEnum } from '/@/enums/appEnum';
 
 import { asyncRoutes } from '/@/router/routes';
 import { ERROR_LOG_ROUTE, PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
-import { staticRoutesList } from '../../router/routes/staticRouter';
 
 import { filter } from '/@/utils/helper/treeHelper';
 
 import { getBackMenuAndPerms } from '/@/api/sys/menu';
 
-import { useMessage } from '/@/hooks/web/useMessage';
+// import { useMessage } from '/@/hooks/web/useMessage';
 import { PageEnum } from '/@/enums/pageEnum';
 
 // 系统权限
@@ -128,7 +127,7 @@ export const usePermissionStore = defineStore({
       const codeList = systemPermission.codeList;
       this.setPermCodeList(codeList);
       this.setAuthData(systemPermission);
-      
+
       //菜单路由
       const routeList = systemPermission.menu;
       return routeList;
@@ -210,8 +209,8 @@ export const usePermissionStore = defineStore({
 
         // 后台菜单构建
         case PermissionModeEnum.BACK:
-          const { createMessage, createWarningModal } = useMessage();
-          console.log(" --- 构建后台路由菜单 --- ")
+          // const { createMessage, createWarningModal } = useMessage();
+          console.log(' --- 构建后台路由菜单 --- ');
           // 菜单加载提示
           // createMessage.loading({
           //   content: t('sys.app.menuLoading'),
@@ -279,7 +278,7 @@ export const usePermissionStore = defineStore({
 
           routeList = flatMultiLevelRoutes(routeList);
           // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-522】ai助手路由写死在前端
-          routes = [PAGE_NOT_FOUND_ROUTE, ...routeList, ...staticRoutesList];
+          routes = [PAGE_NOT_FOUND_ROUTE, ...routeList];
           // update-end--author:liaozhiyang---date:20240529---for:【TV360X-522】ai助手路由写死在前端
           break;
       }

+ 86 - 0
src/utils/common/common.ts

@@ -0,0 +1,86 @@
+export function cloneDeep<T>(
+  source: T,
+  map: WeakMap<object, unknown> = new WeakMap()
+): T {
+  // 处理原始类型和函数
+  if (source === null || typeof source !== "object") {
+    return source;
+  }
+
+  // 处理循环引用 (source 此时是 object 类型)
+  if (map.has(source)) {
+    return map.get(source) as T;
+  }
+
+  // 处理日期
+  if (source instanceof Date) {
+    const copy = new Date(source);
+    map.set(source, copy);
+    return copy as T;
+  }
+
+  // 处理正则表达式
+  if (source instanceof RegExp) {
+    const copy = new RegExp(source.source, source.flags);
+    map.set(source, copy);
+    return copy as T;
+  }
+
+  // 处理数组
+  if (Array.isArray(source)) {
+    const copy: unknown[] = [];
+    map.set(source, copy);
+    source.forEach((item, index) => {
+      copy[index] = cloneDeep(item, map);
+    });
+    return copy as T;
+  }
+
+  // 处理 Map
+  if (source instanceof Map) {
+    const copy = new Map<unknown, unknown>();
+    map.set(source, copy);
+    source.forEach((value, key) => {
+      copy.set(cloneDeep(key, map), cloneDeep(value, map));
+    });
+    return copy as T;
+  }
+
+  // 处理 Set
+  if (source instanceof Set) {
+    const copy = new Set<unknown>();
+    map.set(source, copy);
+    source.forEach(value => {
+      copy.add(cloneDeep(value, map));
+    });
+    return copy as T;
+  }
+
+  // 处理 ArrayBuffer
+  if (source instanceof ArrayBuffer) {
+    const copy = new ArrayBuffer(source.byteLength);
+    new Uint8Array(copy).set(new Uint8Array(source));
+    map.set(source, copy);
+    return copy as T;
+  }
+
+  // 处理普通对象 (source 此时是 object 类型)
+  const copy = Object.create(
+    Object.getPrototypeOf(source)
+  ) as Record<PropertyKey, unknown>;
+  map.set(source, copy);
+
+  // 复制所有属性(包括 Symbol 属性)
+  const allKeys: Array<PropertyKey> = [
+    ...Object.getOwnPropertyNames(source),
+    ...Object.getOwnPropertySymbols(source),
+  ];
+
+  allKeys.forEach(key => {
+    // 使用类型断言确保安全访问
+    const value = (source as Record<PropertyKey, unknown>)[key];
+    copy[key] = cloneDeep(value, map);
+  });
+
+  return copy as T;
+}

+ 5 - 15
src/utils/env.ts

@@ -1,10 +1,7 @@
 import type { GlobEnvConfig } from '/#/config';
 
-import { warn } from '/@/utils/log';
+// import { warn } from '/@/utils/log';
 import pkg from '../../package.json';
-import { getConfigFileName } from '../../build/getConfigFileName';
-import { getGlobal } from "@/qiankun/micro";
-
 export function getCommonStoragePrefix() {
   const { VITE_GLOB_APP_SHORT_NAME } = getAppEnvConfig();
   return `${VITE_GLOB_APP_SHORT_NAME}__${getEnv()}`.toUpperCase();
@@ -16,14 +13,7 @@ export function getStorageShortName() {
 }
 
 export function getAppEnvConfig() {
-  const ENV_NAME = getConfigFileName(import.meta.env);
-
-  const global = getGlobal();
-
-  const ENV = (import.meta.env.DEV
-    ? // Get the global configuration (the configuration will be extracted independently when packaging)
-      (import.meta.env as unknown as GlobEnvConfig)
-    : global[ENV_NAME as any]) as unknown as GlobEnvConfig;
+  const ENV = import.meta.env as unknown as GlobEnvConfig;
 
   const {
     VITE_GLOB_APP_TITLE,
@@ -44,7 +34,7 @@ export function getAppEnvConfig() {
     // 【JEECG作为乾坤子应用】
     VITE_GLOB_QIANKUN_MICRO_APP_NAME,
     VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
-    
+
     //在线文档编辑版本。可选属性:wps, onlyoffice
     VITE_GLOB_ONLINE_DOCUMENT_VERSION,
   } = ENV;
@@ -74,7 +64,7 @@ export function getAppEnvConfig() {
     VITE_GLOB_QIANKUN_MICRO_APP_ENTRY,
 
     //在线文档编辑版本。可选属性:wps, onlyoffice
-    VITE_GLOB_ONLINE_DOCUMENT_VERSION
+    VITE_GLOB_ONLINE_DOCUMENT_VERSION,
   };
 }
 
@@ -116,7 +106,7 @@ export function isProdMode(): boolean {
 }
 
 export function getHideLayoutTypes(): string[] {
-  const {VITE_GLOB_HIDE_LAYOUT_TYPES} = getAppEnvConfig();
+  const { VITE_GLOB_HIDE_LAYOUT_TYPES } = getAppEnvConfig();
   if (typeof VITE_GLOB_HIDE_LAYOUT_TYPES !== 'string') {
     return [];
   }

+ 10 - 12
src/utils/http/axios/Axios.ts

@@ -247,7 +247,6 @@ export class VAxios {
     });
   }
 
-
   /**
    * 【用于评论功能】自定义文件上传-请求
    * @param url
@@ -255,16 +254,15 @@ export class VAxios {
    */
   uploadMyFile<T = any>(url, formData) {
     const glob = useGlobSetting();
-    return this.axiosInstance
-      .request<T>({
-        url: url,
-        baseURL: glob.uploadUrl,
-        method: 'POST',
-        data: formData,
-        headers: {
-          'Content-type': ContentTypeEnum.FORM_DATA,
-          ignoreCancelToken: true,
-        },
-      });
+    return this.axiosInstance.request<T>({
+      url: url,
+      baseURL: glob.uploadUrl,
+      method: 'POST',
+      data: formData,
+      headers: {
+        'Content-type': ContentTypeEnum.FORM_DATA,
+        ignoreCancelToken: true,
+      },
+    });
   }
 }

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

@@ -18,7 +18,7 @@ import { useErrorLogStoreWithOut } from '/@/store/modules/errorLog';
 import { useI18n } from '/@/hooks/web/useI18n';
 import { joinTimestamp, formatRequestDate } from './helper';
 import { useUserStoreWithOut } from '/@/store/modules/user';
-import { cloneDeep } from "lodash-es";
+import { cloneDeep } from 'lodash-es';
 const globSetting = useGlobSetting();
 const urlPrefix = globSetting.urlPrefix;
 const { createMessage, createErrorModal } = useMessage();
@@ -96,7 +96,7 @@ const transform: AxiosTransform = {
     // http开头的请求url,不加前缀
     let isStartWithHttp = false;
     const requestUrl = config.url;
-    if(requestUrl!=null && (requestUrl.startsWith("http:") || requestUrl.startsWith("https:"))){
+    if (requestUrl != null && (requestUrl.startsWith('http:') || requestUrl.startsWith('https:'))) {
       isStartWithHttp = true;
     }
     // update-begin--author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用
@@ -113,7 +113,7 @@ const transform: AxiosTransform = {
       config.url = `${apiUrl}${config.url}`;
     }
     //update-end---author:scott ---date::2024-02-20  for:以http开头的请求url,不拼加前缀--
-    
+
     const params = config.params || {};
     const data = config.data || false;
     formatDate && data && !isString(data) && formatRequestDate(data);
@@ -150,7 +150,7 @@ const transform: AxiosTransform = {
     // update-begin--author:sunjianlei---date:220241019---for:【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径
     if (globSetting.isQiankunMicro) {
       if (config.url && config.url.startsWith('/')) {
-        config.url = globSetting.qiankunMicroAppEntry + config.url
+        config.url = globSetting.qiankunMicroAppEntry + config.url;
       }
     }
     // update-end--author:sunjianlei---date:220241019---for:【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径
@@ -165,7 +165,7 @@ const transform: AxiosTransform = {
     // 请求之前处理config
     const token = getToken();
     let tenantId: string | number = getTenantId();
-    
+
     //update-begin---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签。解决没有token无法加签---
     // 将签名和时间戳,添加在请求接口 Header
     config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp();
@@ -182,7 +182,7 @@ const transform: AxiosTransform = {
       // jwt token
       config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token;
       config.headers[ConfigEnum.TOKEN] = token;
-      
+
       // 将签名和时间戳,添加在请求接口 Header
       //config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp();
       //config.headers[ConfigEnum.Sign] = signMd5Utils.getSign(config.url, config.params);
@@ -215,7 +215,6 @@ const transform: AxiosTransform = {
       }
       // update-end--author:sunjianlei---date:20220624--for: 添加低代码应用ID
       // ========================================================================================
-
     }
     return config;
   },

+ 2 - 2
src/utils/monorepo/registerPackages.ts

@@ -3,11 +3,11 @@ import { warn } from '/@/utils/log';
 import { registerDynamicRouter } from '/@/utils/monorepo/dynamicRouter';
 // 引入模块
 import PACKAGE_JEECG_ONLINE from '@jeecg/online';
-import PACKAGE_JEECG_AIFLOW from '@jeecg/aiflow';
+// import PACKAGE_JEECG_AIFLOW from '@jeecg/aiflow';
 
 export function registerPackages(app: App) {
   use(app, PACKAGE_JEECG_ONLINE);
-  use(app, PACKAGE_JEECG_AIFLOW);
+  // use(app, PACKAGE_JEECG_AIFLOW);
 }
 
 // noinspection JSUnusedGlobalSymbols

+ 30 - 48
src/views/dashboard/Analysis/components/BdcTabCard.vue

@@ -15,9 +15,6 @@
         </template>
         <a-tab-pane loading="true" tab="受理监管" key="1">
           <a-row>
-            <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
-              <Bar :chartData="barData" :option="{ title: { text: '', textStyle: { fontWeight: 'lighter' } } }" height="40vh" :seriesColor="seriesColor" />
-            </a-col>
             <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
               <QuickNav :loading="loading" class="enter-y" :bordered="false" :body-style="{ padding: 0 }" />
             </a-col>
@@ -25,14 +22,6 @@
         </a-tab-pane>
         <a-tab-pane tab="交互监管" key="2">
           <a-row>
-            <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
-              <BarMulti
-                :seriesColor="interactiveColor"
-                :chartData="barMultiData"
-                :option="{ title: { text: '', textStyle: { fontWeight: 'lighter' } } }"
-                height="40vh"
-              />
-            </a-col>
             <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
               <QuickNav :loading="loading" class="enter-y" :bordered="false" :body-style="{ padding: 0 }" />
             </a-col>
@@ -40,10 +29,6 @@
         </a-tab-pane>
         <a-tab-pane tab="存储监管" key="3">
           <a-row>
-            <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24" style="display: flex">
-              <Gauge :seriesColor="seriesColor" :chartData="{ name: 'C盘', value: 70 }" height="30vh"></Gauge>
-              <Gauge :seriesColor="seriesColor" :chartData="{ name: 'D盘', value: 50 }" height="30vh"></Gauge>
-            </a-col>
             <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
               <QuickNav :loading="loading" class="enter-y" :bordered="false" :body-style="{ padding: 0 }" />
             </a-col>
@@ -55,9 +40,6 @@
 </template>
 <script lang="ts" setup>
   import { ref, computed } from 'vue';
-  import Bar from '/@/components/chart/Bar.vue';
-  import BarMulti from '/@/components/chart/BarMulti.vue';
-  import Gauge from '/@/components/chart/Gauge.vue';
   import QuickNav from './QuickNav.vue';
   import { useRootSetting } from '/@/hooks/setting/useRootSetting';
 
@@ -69,38 +51,38 @@
   const { getThemeColor } = useRootSetting();
   const interactiveColor = ref();
   const rankList = [];
-  for (let i = 0; i < 7; i++) {
-    rankList.push({
-      name: '白鹭岛 ' + (i + 1) + ' 号店',
-      total: 1234.56 - i * 100,
-    });
-  }
+  // for (let i = 0; i < 7; i++) {
+  //   rankList.push({
+  //     name: '白鹭岛 ' + (i + 1) + ' 号店',
+  //     total: 1234.56 - i * 100,
+  //   });
+  // }
 
-  const barData = [];
-  for (let i = 0; i < 12; i += 1) {
-    barData.push({
-      name: `${i + 1}月`,
-      value: Math.floor(Math.random() * 1000) + 200,
-    });
-  }
-  const barMultiData = [];
-  for (let j = 0; j < 2; j++) {
-    for (let i = 0; i < 12; i += 1) {
-      barMultiData.push({
-        type: j == 0 ? 'jeecg' : 'jeebt',
-        name: `${i + 1}月`,
-        value: Math.floor(Math.random() * 1000) + 200,
-      });
-    }
-  }
+  // const barData = [];
+  // for (let i = 0; i < 12; i += 1) {
+  //   barData.push({
+  //     name: `${i + 1}月`,
+  //     value: Math.floor(Math.random() * 1000) + 200,
+  //   });
+  // }
+  // const barMultiData = [];
+  // for (let j = 0; j < 2; j++) {
+  //   for (let i = 0; i < 12; i += 1) {
+  //     barMultiData.push({
+  //       type: j == 0 ? 'jeecg' : 'jeebt',
+  //       name: `${i + 1}月`,
+  //       value: Math.floor(Math.random() * 1000) + 200,
+  //     });
+  //   }
+  // }
 
-  const seriesColor = computed(() => {
-    interactiveColor.value = [
-      { type: 'jeecg', color: getThemeColor.value },
-      { type: 'jeebt', color: getRandomColor() },
-    ];
-    return getThemeColor.value;
-  });
+  // const seriesColor = computed(() => {
+  //   interactiveColor.value = [
+  //     { type: 'jeecg', color: getThemeColor.value },
+  //     { type: 'jeebt', color: getRandomColor() },
+  //   ];
+  //   return getThemeColor.value;
+  // });
   function getRandomColor() {
     var letters = '0123456789ABCDEF';
     var color = '#';

+ 0 - 109
src/views/dashboard/Analysis/components/ChartGroupCard.vue

@@ -1,109 +0,0 @@
-<template>
-  <div class="md:flex">
-    <template v-for="(item, index) in dataList" :key="item.title">
-      <ChartCard
-        :loading="loading"
-        :title="item.title"
-        :total="getTotal(item.total, index)"
-        class="md:w-1/4 w-full !md:mt-0 !mt-4"
-        :class="[index + 1 < 4 && '!md:mr-4']"
-      >
-        <template #action>
-          <a-tooltip title="指标说明">
-            <Icon :icon="item.icon" :size="20" />
-          </a-tooltip>
-        </template>
-        <div v-if="type === 'chart'">
-          <Trend term="周同比" :percentage="12" v-if="index === 0" />
-          <Trend term="日同比" :percentage="11" v-if="index === 0" :type="false" />
-
-          <SingleLine v-if="index === 1" :option="option" :chartData="chartData" :seriesColor="seriesColor" height="50px"></SingleLine>
-
-          <Bar v-if="index === 2" :option="option" :chartData="chartData" :seriesColor="seriesColor" height="50px"></Bar>
-
-          <Progress v-if="index === 3" :percent="78" :show-info="false"></Progress>
-        </div>
-        <div v-else>
-          <SingleLine :seriesColor="seriesColor" v-if="index === 0" :option="option" :chartData="chartData" height="50px"></SingleLine>
-
-          <SingleLine :seriesColor="seriesColor" v-if="index === 1" :option="option" :chartData="chartData" height="50px"></SingleLine>
-
-          <Bar :seriesColor="seriesColor" v-if="index === 2" :option="option" :chartData="chartData" height="50px"></Bar>
-
-          <Progress v-if="index === 3" :percent="78" :show-info="false"></Progress>
-
-        </div>
-        <template #footer v-if="type === 'chart'">
-          <span v-if="index !== 3"
-            >{{ item.footer }}<span>{{ item.value }}</span></span
-          >
-          <Trend term="周同比" :percentage="12" v-if="index === 3" />
-          <Trend term="日同比" :percentage="11" v-if="index === 3" :type="false" />
-        </template>
-        <template #footer v-else>
-          <span
-            >{{ item.footer }}<span>{{ item.value }}</span></span
-          >
-        </template>
-      </ChartCard>
-    </template>
-  </div>
-</template>
-<script lang="ts" setup>
-  import { ref, computed } from 'vue';
-  import { Icon } from '/@/components/Icon';
-  import { Progress } from 'ant-design-vue';
-  import ChartCard from '/@/components/chart/ChartCard.vue';
-  import Trend from '/@/components/chart/Trend.vue';
-  import Bar from '/@/components/chart/Bar.vue';
-  import SingleLine from '/@/components/chart/SingleLine.vue';
-  import { chartCardList, bdcCardList } from '../data';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-
-  const { getThemeColor } = useRootSetting();
-  const props = defineProps({
-    loading: {
-      type: Boolean,
-    },
-    type: {
-      type: String,
-      default: 'chart',
-    },
-  });
-  const option = ref({ xAxis: { show: false, boundaryGap: false }, yAxis: { show: false, boundaryGap: false, max: 220 } });
-
-  const chartData = ref([
-    {
-      name: '1月',
-      value: 50,
-    },
-    {
-      name: '2月',
-      value: 100,
-    },
-    {
-      name: '3月',
-      value: 150,
-    },
-    {
-      name: '4月',
-      value: 40,
-    },
-    {
-      name: '5月',
-      value: 110,
-    },
-    {
-      name: '6月',
-      value: 120,
-    },
-  ]);
-  const seriesColor = computed(() => {
-    return getThemeColor.value;
-  })
-  const dataList = computed(() => (props.type === 'dbc' ? bdcCardList : chartCardList));
-
-  function getTotal(total, index) {
-    return index === 0 ? `¥${total}` : index === 3 ? `${total}%` : total;
-  }
-</script>

+ 0 - 87
src/views/dashboard/Analysis/components/SaleTabCard.vue

@@ -1,87 +0,0 @@
-<template>
-  <a-card :loading="loading" :bordered="false" :body-style="{ padding: '0' }">
-    <div class="salesCard">
-      <a-tabs default-active-key="1" size="large" :tab-bar-style="{ marginBottom: '24px', paddingLeft: '16px' }">
-        <template #rightExtra>
-          <div class="extra-wrapper">
-            <div class="extra-item">
-              <a>今日</a>
-              <a>本周</a>
-              <a>本月</a>
-              <a>本年</a>
-            </div>
-            <a-range-picker :style="{ width: '256px' }" />
-          </div>
-        </template>
-        <a-tab-pane loading="true" tab="销售额" key="1">
-          <a-row>
-            <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
-              <Bar :chartData="barData" :option="{ title: { text: '', textStyle: { fontWeight: 'lighter' } } }" height="40vh" :seriesColor="seriesColor"  />
-            </a-col>
-            <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
-              <RankList title="门店销售排行榜" :list="rankList" />
-            </a-col>
-          </a-row>
-        </a-tab-pane>
-        <a-tab-pane tab="销售趋势" key="2">
-          <a-row>
-            <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
-              <Bar :chartData="barData.reverse()" :option="{ title: { text: '', textStyle: { fontWeight: 'lighter' } } }" height="40vh" :seriesColor="seriesColor" />
-            </a-col>
-            <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
-              <RankList title="门店销售排行榜" :list="rankList" />
-            </a-col>
-          </a-row>
-        </a-tab-pane>
-      </a-tabs>
-    </div>
-  </a-card>
-</template>
-<script lang="ts" setup>
-  import { ref, computed } from 'vue';
-  import Bar from '/@/components/chart/Bar.vue';
-  import RankList from '/@/components/chart/RankList.vue';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-    
-
-  defineProps({
-    loading: {
-      type: Boolean,
-    },
-  });
-  const { getThemeColor } = useRootSetting();
-  const rankList = [];
-  for (let i = 0; i < 7; i++) {
-    rankList.push({
-      name: '白鹭岛 ' + (i + 1) + ' 号店',
-      total: 1234.56 - i * 100,
-    });
-  }
-
-  const barData = [];
-  for (let i = 0; i < 12; i += 1) {
-    barData.push({
-      name: `${i + 1}月`,
-      value: Math.floor(Math.random() * 1000) + 200,
-    });
-  }
-  const seriesColor = computed(() => {
-    return getThemeColor.value
-  })
-</script>
-
-<style lang="less" scoped>
-  .extra-wrapper {
-    line-height: 55px;
-    padding-right: 24px;
-
-    .extra-item {
-      display: inline-block;
-      margin-right: 24px;
-
-      a {
-        margin-left: 24px;
-      }
-    }
-  }
-</style>

+ 5 - 6
src/views/dashboard/Analysis/homePage/IndexBdc.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="p-4">
-    <ChartGroupCard class="enter-y" :loading="loading" type="bdc" />
     <BdcTabCard class="!my-4 enter-y" :loading="loading" />
     <a-row>
       <a-col :span="24">
@@ -63,10 +62,9 @@
 <script lang="ts" setup>
   import { ref, unref } from 'vue';
   import { Progress } from 'ant-design-vue';
-  import ChartGroupCard from '../components/ChartGroupCard.vue';
   import BdcTabCard from '../components/BdcTabCard.vue';
-  import LineMulti from '/@/components/chart/LineMulti.vue';
-  import HeadInfo from '/@/components/chart/HeadInfo.vue';
+  // import LineMulti from '/@/components/chart/LineMulti.vue';
+  // import HeadInfo from '/@/components/chart/HeadInfo.vue';
   import { table, table1 } from '../data';
 
   const loading = ref(true);
@@ -150,8 +148,9 @@
 
 <style lang="less" scoped>
   .ant-table-wrapper {
-    :deep(.ant-table){
-      td,th {
+    :deep(.ant-table) {
+      td,
+      th {
         padding: 10px;
       }
     }

+ 0 - 149
src/views/dashboard/Analysis/homePage/IndexChart.vue

@@ -1,149 +0,0 @@
-<template>
-  <div class="p-4">
-    <ChartGroupCard class="enter-y" :loading="loading" type="chart" />
-    <SaleTabCard class="!my-4 enter-y" :loading="loading" />
-    <a-row>
-      <a-col :span="24">
-        <a-card :loading="loading" :bordered="false" title="最近一周访问量统计">
-          <div class="infoArea">
-            <HeadInfo title="今日IP" :iconColor="ipColor" :content="loginfo.todayIp" icon="environment"></HeadInfo>
-            <HeadInfo title="今日访问" :iconColor="visitColor" :content="loginfo.todayVisitCount" icon="team"></HeadInfo>
-            <HeadInfo title="总访问量" :iconColor="seriesColor" :content="loginfo.totalVisitCount" icon="rise"></HeadInfo>
-          </div>
-          <LineMulti :chartData="lineMultiData" height="33vh" type="line" :option="{ legend: { top: 'bottom' } }"></LineMulti>
-        </a-card>
-      </a-col>
-    </a-row>
-  </div>
-</template>
-<script lang="ts" setup>
-  import { ref, watch } from 'vue';
-  import ChartGroupCard from '../components/ChartGroupCard.vue';
-  import SaleTabCard from '../components/SaleTabCard.vue';
-  import LineMulti from '/@/components/chart/LineMulti.vue';
-  import HeadInfo from '/@/components/chart/HeadInfo.vue';
-  import { getLoginfo, getVisitInfo } from '../api.ts';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-
-  const loading = ref(true);
-  const { getThemeColor } = useRootSetting();
-
-  setTimeout(() => {
-    loading.value = false;
-  }, 500);
-
-  const loginfo = ref({});
-  const lineMultiData = ref([]);
-
-  function initLogInfo() {
-    getLoginfo(null).then((res) => {
-      if (res.success) {
-        Object.keys(res.result).forEach((key) => {
-          res.result[key] = res.result[key] + '';
-        });
-        loginfo.value = res.result;
-      }
-    });
-    getVisitInfo(null).then((res) => {
-      if (res.success) {
-        lineMultiData.value = [];
-        res.result.forEach((item) => {
-          lineMultiData.value.push({ name: item.type, type: 'ip', value: item.ip, color: ipColor.value });
-          lineMultiData.value.push({ name: item.type, type: 'visit', value: item.visit, color: visitColor.value });
-        });
-      }
-    });
-  }
-
-  const ipColor = ref();
-  const visitColor = ref();
-  const seriesColor = ref();
-  watch(
-    () => getThemeColor.value,
-    () => {
-      seriesColor.value = getThemeColor.value;
-      visitColor.value = '#67B962';
-      ipColor.value = getThemeColor.value;
-      initLogInfo();
-    },
-    { immediate: true }
-  );
-
-  function getRandomColor() {
-    var letters = '0123456789ABCDEF';
-    var color = '#';
-    for (var i = 0; i < 6; i++) {
-      color += letters[Math.floor(Math.random() * 16)];
-    }
-    return color;
-  }
-</script>
-
-<style lang="less" scoped>
-   .infoArea {
-    display: flex;
-    justify-content: space-between;
-    padding: 0 10%;
-    .head-info.center {
-      padding: 0;
-    }
-    .head-info {
-      min-width: 0;
-    }
-  }
-  .circle-cust {
-    position: relative;
-    top: 28px;
-    left: -100%;
-  }
-
-  .extra-wrapper {
-    line-height: 55px;
-    padding-right: 24px;
-
-    .extra-item {
-      display: inline-block;
-      margin-right: 24px;
-
-      a {
-        margin-left: 24px;
-      }
-    }
-  }
-
-  /* 首页访问量统计 */
-  .head-info {
-    position: relative;
-    text-align: left;
-    padding: 0 32px 0 0;
-    min-width: 125px;
-
-    &.center {
-      text-align: center;
-      padding: 0 32px;
-    }
-
-    span {
-      color: rgba(0, 0, 0, 0.45);
-      display: inline-block;
-      font-size: 0.95rem;
-      line-height: 42px;
-      margin-bottom: 4px;
-    }
-
-    p {
-      line-height: 42px;
-      margin: 0;
-
-      a {
-        font-weight: 600;
-        font-size: 1rem;
-      }
-    }
-  }
-  .ant-card {
-    ::v-deep(.ant-card-head-title) {
-      font-weight: normal;
-    }
-  }
-</style>

+ 0 - 2
src/views/dashboard/Analysis/index.vue

@@ -1,5 +1,4 @@
 <template>
-  <IndexChart v-if="indexStyle === 0"></IndexChart>
   <IndexDef v-if="indexStyle === 1"></IndexDef>
   <IndexBdc v-if="indexStyle == 2"></IndexBdc>
   <IndexTask v-if="indexStyle == 3"></IndexTask>
@@ -16,7 +15,6 @@
 <script lang="ts" setup>
   import { ref } from 'vue';
   import IndexDef from './homePage/IndexDef.vue';
-  import IndexChart from './homePage/IndexChart.vue';
   import IndexBdc from './homePage/IndexBdc.vue';
   import IndexTask from './homePage/IndexTask.vue';
 

BIN
src/views/dashboard/ai/components/aide/images/ai.png


+ 0 - 77
src/views/dashboard/ai/components/aide/index.vue

@@ -1,77 +0,0 @@
-<template>
-  <div v-if="visible" ref="aideWrapRef" class="aide-wrap" @click="handleGo">
-    <a-popconfirm
-      :open="popconfirmVisible"
-      placement="topRight"
-      title="确定AI助手退出吗?"
-      ok-text="确定"
-      cancel-text="取消"
-      @cancel="handleCancel"
-      @confirm="handleConfirm"
-    >
-      <img :src="aiImage" alt="ai助手" />
-    </a-popconfirm>
-  </div>
-</template>
-
-<script setup>
-  import { onMounted, ref } from 'vue';
-  import { router } from '/@/router';
-  import { AIDE_FLAG } from '/@/enums/cacheEnum';
-  import { getToken } from '/@/utils/auth';
-  import { getAuthCache, setAuthCache, removeAuthCache } from '/@/utils/auth';
-  import aiImage from './images/ai.png';
-  const visible = ref(1);
-  const aideWrapRef = ref(null);
-  const popconfirmVisible = ref(false);
-
-  onMounted(() => {
-    const aideFlag = getAuthCache(AIDE_FLAG);
-    if (aideFlag && aideFlag == getToken()) {
-      visible.value = false;
-    } else {
-      visible.value = true;
-    }
-    if (visible.value) {
-      aideWrapRef.value.addEventListener('contextmenu', (e) => {
-        popconfirmVisible.value = true;
-        e.preventDefault();
-      });
-    }
-  });
-  const handleCancel = () => {
-    popconfirmVisible.value = false;
-  };
-  const handleConfirm = () => {
-    popconfirmVisible.value = false;
-    visible.value = false;
-    setAuthCache(AIDE_FLAG, getToken());
-  };
-  const handleGo = (params) => {
-    router.push({ path: '/ai' });
-  };
-</script>
-
-<style lang="less" scoped>
-  .aide-wrap {
-    position: fixed;
-    top: 50%;
-    right: 5px;
-    transform: translate(0, -50%);
-    height: 33px;
-    width: 33px;
-    border-radius: 50%;
-    text-align: center;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    line-height: 1;
-    color: #fff;
-    cursor: pointer;
-    .text {
-      font-size: 12px;
-      transform: scale(0.88);
-    }
-  }
-</style>

+ 0 - 24
src/views/dashboard/ai/index.vue

@@ -1,24 +0,0 @@
-<template>
-  <div class="wrap">
-    <div class="content">
-      <AiChat></AiChat>
-    </div>
-  </div>
-</template>
-
-<script setup>
-  import AiChat from '/@/views/super/airag/aiapp/chat/AiChat.vue';
-  
-</script>
-
-<style lang="less" scoped>
-  .wrap {
-    height: 100%;
-    width: 100%;
-    .content {
-      background: #fff;
-      width: 100%;
-      height: 100%;
-    }
-  }
-</style>

+ 25 - 25
src/views/openapi/SwaggerUI.vue

@@ -1,36 +1,36 @@
 <template>
-  <div ref="swaggerUiRef" style="height: 100%;"></div>
+  <div ref="swaggerUiRef" style="height: 100%"></div>
 </template>
 
 <script lang="ts" setup>
-import { ref, onMounted } from 'vue';
-// 尝试直接导入 SwaggerUI 而不是使用 * as
-import SwaggerUI from 'swagger-ui-dist/swagger-ui-bundle'; // 确保使用 ESM 版本
-import 'swagger-ui-dist/swagger-ui.css';
+  import { ref, onMounted } from 'vue';
+  // 尝试直接导入 SwaggerUI 而不是使用 * as
+  import SwaggerUI from 'swagger-ui-dist/swagger-ui-bundle'; // 确保使用 ESM 版本
+  import 'swagger-ui-dist/swagger-ui.css';
 
-import { getOpenApiJson } from './OpenApi.api';
+  import { getOpenApiJson } from './OpenApi.api';
 
-const swaggerUiRef = ref<HTMLElement | null>(null);
-const API_DOMAIN = import.meta.env.VITE_GLOB_DOMAIN_URL
-onMounted(async () => {
-  try {
-    const response = await getOpenApiJson();
-    const openApiJson = response;
-    if (swaggerUiRef.value) {
-      SwaggerUI({
-        domNode: swaggerUiRef.value,
-        spec: openApiJson,
-      });
+  const swaggerUiRef = ref<HTMLElement | null>(null);
+  const API_DOMAIN = import.meta.env.VITE_GLOB_DOMAIN_URL;
+  onMounted(async () => {
+    try {
+      const response = await getOpenApiJson();
+      const openApiJson = response;
+      if (swaggerUiRef.value) {
+        SwaggerUI({
+          domNode: swaggerUiRef.value,
+          spec: openApiJson,
+        });
+      }
+    } catch (error) {
+      console.error('Failed to fetch OpenAPI JSON:', error);
     }
-  } catch (error) {
-    console.error('Failed to fetch OpenAPI JSON:', error);
-  }
-});
+  });
 </script>
 
 <style scoped>
-/* 确保容器有高度 */
-.swagger-ui-container {
-  height: 100%;
-}
+  /* 确保容器有高度 */
+  .swagger-ui-container {
+    height: 100%;
+  }
 </style>

+ 0 - 52
src/views/report/chartdemo/chartdemo.data.ts

@@ -1,52 +0,0 @@
-const colors = ['#4db6ac', '#ffb74d', '#64b5f6', '#e57373', '#9575cd', '#a1887f', '#90a4ae', '#4dd0e1', '#81c784', '#ff8a65'];
-export const getData = (() => {
-  let dottedBase = +new Date();
-  const barDataSource: any[] = [];
-  const barMultiData: any[] = [];
-  const barLineData: any[] = [];
-  const barLineColors: any[] = [];
-
-  for (let i = 0; i < 20; i++) {
-    let 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;
-    barDataSource.push(obj);
-  }
-
-  for (let j = 0; j < 2; j++) {
-    for (let i = 0; i < 20; i++) {
-      let 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;
-      barMultiData.push(obj);
-    }
-  }
-  const pieData = [
-    { value: 335, name: '客服电话' },
-    { value: 310, name: '奥迪官网' },
-    { value: 234, name: '媒体曝光' },
-    { value: 135, name: '质检总局' },
-    { value: 105, name: '其他' },
-  ];
-  const radarData = [
-    { value: 75, name: '政治', type: '文综', max: 100 },
-    { value: 65, name: '历史', type: '文综', max: 100 },
-    { value: 55, name: '地理', type: '文综', max: 100 },
-    { value: 74, name: '化学', type: '文综', max: 100 },
-    { value: 38, name: '物理', type: '文综', max: 100 },
-    { value: 88, name: '生物', type: '文综', max: 100 },
-  ];
-  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 date = new Date(dottedBase + 1000 * 3600 * 24 * i);
-      obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-');
-      obj.value = Math.random() * 200;
-      barLineData.push(obj);
-    }
-    barLineColors.push(colors[j]);
-  }
-  return { barDataSource, barMultiData, pieData, barLineData, barLineColors,radarData };
-})();

+ 0 - 93
src/views/report/chartdemo/index.vue

@@ -1,93 +0,0 @@
-<template>
-  <div class="p-4">
-    <a-card :bordered="false" style="height: 100%">
-      <a-tabs v-model:activeKey="activeKey" animated @change="tabChange">
-        <a-tab-pane key="1" tab="柱状图">
-          <a-row>
-            <a-col :span="24">
-              <Bar :chartData="barDataSource" height="50vh" :option="{ title: { text: '销售额排行', left: 'center' } }"></Bar>
-            </a-col>
-            <!-- <a-col :span="7" style="margin-left:50px" >
-                            配置项:
-                            <textarea rows="18" style="width: 500px">{{ barDataSource }}</textarea>
-                        </a-col>-->
-          </a-row>
-        </a-tab-pane>
-        <a-tab-pane key="2" tab="多列柱状图" force-render>
-          <BarMulti :chartData="barMultiData" :option="multiBarOption" height="50vh"></BarMulti>
-        </a-tab-pane>
-        <a-tab-pane key="3" tab="迷你柱状图" style="display: flex; justify-content: center">
-          <Bar :chartData="barDataSource" width="30%" height="50vh"></Bar>
-        </a-tab-pane>
-        <a-tab-pane key="4" tab="面积图">
-          <SingleLine :chartData="barDataSource" height="50vh" :option="{ title: { text: '销售额排行', left: 'center' } }"></SingleLine>
-        </a-tab-pane>
-        <a-tab-pane key="5" tab="迷你面积图" style="display: flex; justify-content: center">
-          <SingleLine :chartData="barDataSource" width="30%" height="50vh"></SingleLine>
-        </a-tab-pane>
-        <a-tab-pane key="6" tab="多行折线图">
-          <LineMulti :chartData="barMultiData" height="50vh" :option="multiBarOption" type="line"></LineMulti>
-        </a-tab-pane>
-        <a-tab-pane key="7" tab="饼图">
-          <pie :chartData="pieData" height="40vh" :option="{ title: { text: '基础饼状图', left: 'center' } }" />
-        </a-tab-pane>
-        <a-tab-pane key="8" tab="雷达图">
-          <Radar :chartData="radarData" height="50vh"></Radar>
-        </a-tab-pane>
-        <a-tab-pane key="9" tab="仪表盘">
-          <Gauge :chartData="{ name: '出勤率', value: 70 }" height="50vh"></Gauge>
-        </a-tab-pane>
-        <a-tab-pane key="10" tab="折柱图">
-          <BarAndLine :chartData="barLineData" :customColor="barLineColors" height="50vh"></BarAndLine>
-        </a-tab-pane>
-        <a-tab-pane key="11" tab="排名列表">
-          <RankList title="门店销售排行榜" :list="rankList" style="width: 600px; margin: 0 auto"></RankList>
-        </a-tab-pane>
-        <a-tab-pane key="13" tab="趋势">
-          <trend title="Trend" term="Trend:" :percentage="30" />
-        </a-tab-pane>
-        <!--暂无-->
-        <!-- <a-tab-pane key="14" tab="进度条">
-                    <Bar :option="{xAxis:{show:false},yAxis:{show:false}}" :chartData="chartData" width="100px" height="50px"></Bar>
-                </a-tab-pane>-->
-        <!--<a-tab-pane key="15" tab="水波图"></a-tab-pane>-->
-      </a-tabs>
-    </a-card>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import { getData } from './chartdemo.data.ts';
-  import Bar from '/@/components/chart/Bar.vue';
-  import BarMulti from '/@/components/chart/BarMulti.vue';
-  import SingleLine from '/@/components/chart/SingleLine.vue';
-  import LineMulti from '/@/components/chart/LineMulti.vue';
-  import Pie from '/@/components/chart/Pie.vue';
-  import Radar from '/@/components/chart/Radar.vue';
-  import Gauge from '/@/components/chart/Gauge.vue';
-  import RankList from '/@/components/chart/RankList.vue';
-  import Trend from '/@/components/chart/Trend.vue';
-  import BarAndLine from '/@/components/chart/BarAndLine.vue';
-
-  const activeKey = ref('1');
-  const { barDataSource, barMultiData, pieData, barLineData, radarData,barLineColors } = getData;
-  const multiBarOption = {
-    title: { text: '多列柱状图', left: 'center' },
-  };
-  const rankList = loadData('name', 'total', 2000, 100, '北京朝阳 ', ' 号店');
-  //tab切换
-  function tabChange(key) {
-    console.log('切换的key:', key);
-  }
-  function loadData(x, y, max, min, before = '', after = '月') {
-    let data = [];
-    for (let i = 0; i < 12; i += 1) {
-      data.push({
-        [x]: `${before}${i + 1}${after}`,
-        [y]: Math.floor(Math.random() * max) + min,
-      });
-    }
-    return data;
-  }
-</script>

+ 0 - 135
src/views/report/statisticst/index.vue

@@ -1,135 +0,0 @@
-<template>
-  <div class="p-4">
-    <a-card :bordered="false" style="height: 100%">
-      <a-tabs v-model:activeKey="activeKey" animated @change="tabChange">
-        <a-tab-pane key="bar" tab="柱状图">
-          <a-row>
-            <a-col :span="10">
-              <a-radio-group v-model:value="barType" @change="statisticst">
-                <a-radio-button value="year">按年统计</a-radio-button>
-                <a-radio-button value="month">按月统计</a-radio-button>
-                <a-radio-button value="category">按类别统计</a-radio-button>
-                <a-radio-button value="cabinet">按柜号统计</a-radio-button>
-              </a-radio-group>
-            </a-col>
-          </a-row>
-          <Bar :chartData="dataSource" height="50vh"></Bar>
-        </a-tab-pane>
-        <a-tab-pane key="pie" tab="饼状图" force-render>
-          <a-row :gutter="24">
-            <a-col :span="10">
-              <a-radio-group v-model:value="pieType" @change="statisticst">
-                <a-radio-button value="year">按年统计</a-radio-button>
-                <a-radio-button value="month">按月统计</a-radio-button>
-                <a-radio-button value="category">按类别统计</a-radio-button>
-                <a-radio-button value="cabinet">按柜号统计</a-radio-button>
-              </a-radio-group>
-            </a-col>
-            <Pie :chartData="dataSource" height="40vh"></Pie>
-          </a-row>
-        </a-tab-pane>
-      </a-tabs>
-    </a-card>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import { defHttp } from '/@/utils/http/axios';
-  import { ref, unref, reactive } from 'vue';
-  import Bar from '/@/components/chart/Bar.vue';
-  import Pie from '/@/components/chart/Pie.vue';
-
-  const activeKey = ref('bar');
-  const barType = ref('year');
-  const pieType = ref('year');
-  const dataSource = ref([]);
-  const url = reactive({
-    getYearCountInfo: '/mock/api/report/getYearCountInfo',
-    getMonthCountInfo: '/mock/api/report/getMonthCountInfo',
-    getCntrNoCountInfo: '/mock/api/report/getCntrNoCountInfo',
-    getCabinetCountInfo: '/mock/api/report/getCabinetCountInfo',
-  });
-
-  async function loadDate(url, type, params) {
-    const res = await defHttp.get({ url, params }, { isTransformResponse: false, errorMessageMode: 'none' });
-    if (res.success) {
-      dataSource.value = [];
-      switch (type) {
-        case 'year':
-          getYearCountSource(res.result);
-          break;
-        case 'month':
-          getMonthCountSource(res.result);
-          break;
-        case 'category':
-          getCategoryCountSource(res.result);
-          break;
-        case 'cabinet':
-          getCabinetCountSource(res.result);
-          break;
-        default:
-          break;
-      }
-    }
-  }
-  function getYearCountSource(data) {
-    for (let i = 0; i < data.length; i++) {
-      dataSource.value.push({
-        name: `${data[i].year}年`,
-        value: data[i].yearcount,
-      });
-    }
-  }
-  function getMonthCountSource(data) {
-    for (let i = 0; i < data.length; i++) {
-      dataSource.value.push({
-        name: `${data[i].month}`,
-        value: data[i].monthcount,
-      });
-    }
-  }
-  function getCategoryCountSource(data) {
-    for (let i = 0; i < data.length; i++) {
-      dataSource.value.push({
-        name: `${data[i].classifyname}`,
-        value: data[i].cntrnocount,
-      });
-    }
-  }
-  function getCabinetCountSource(data) {
-    for (let i = 0; i < data.length; i++) {
-      dataSource.value.push({
-        name: `${data[i].cabinetname}`,
-        value: data[i].cabinetcocunt,
-      });
-    }
-  }
-  // 选择统计类别
-  function statisticst(e) {
-    if (unref(activeKey) === 'pie') {
-      loadDate(getUrl(unref(pieType)), unref(pieType), {});
-    } else {
-      loadDate(getUrl(unref(barType)), unref(barType), {});
-    }
-  }
-
-  function getUrl(type) {
-    if (type === 'year') {
-      return url.getYearCountInfo;
-    }
-    if (type === 'month') {
-      return url.getMonthCountInfo;
-    }
-    if (type === 'category') {
-      return url.getCntrNoCountInfo;
-    }
-    if (type === 'cabinet') {
-      return url.getCabinetCountInfo;
-    }
-  }
-  //tab切换
-  function tabChange(key) {
-    console.log('切换的key:', key);
-  }
-  loadDate(url.getYearCountInfo, 'year', {});
-</script>

+ 0 - 103
src/views/super/airag/aiapp/AiApp.api.ts

@@ -1,103 +0,0 @@
-import { defHttp } from '/@/utils/http/axios';
-import { Modal } from 'ant-design-vue';
-
-export enum Api {
-  //知识库管理
-  list = '/airag/app/list',
-  save = '/airag/app/edit',
-  release = '/airag/app/release',
-  delete = '/airag/app/delete',
-  queryById = '/airag/app/queryById',
-  queryBathById = '/airag/knowledge/query/batch/byId',
-  queryFlowById = '/airag/flow/queryById',
-  promptGenerate = '/airag/app/prompt/generate',
-}
-
-/**
- * 查询应用
- * @param params
- */
-export const appList = (params) => {
-  return defHttp.get({ url: Api.list, params }, { isTransformResponse: false });
-};
-
-/**
- * 查询知识库
- * @param params
- */
-export const queryKnowledgeBathById = (params) => {
-  return defHttp.get({ url: Api.queryBathById, params }, { isTransformResponse: false });
-};
-
-/**
- * 根据应用id查询应用
- * @param params
- */
-export const queryById = (params) => {
-  return defHttp.get({ url: Api.queryById, params }, { isTransformResponse: false });
-};
-
-/**
- * 新增应用
- * @param params
- */
-export const saveApp = (params) => {
-  return defHttp.put({ url: Api.save, params });
-};
-
-// 发布应用
-export function releaseApp(appId: string, release = false) {
-  return defHttp.post({
-    url: Api.release,
-    params: {
-      id: appId,
-      release: release,
-    }
-  }, {joinParamsToUrl: true});
-}
-
-/**
- * 删除应用
- * @param params
- * @param handleSuccess
- */
-export const deleteApp = (params, handleSuccess) => {
-  Modal.confirm({
-    title: '确认删除',
-    content: '是否删除名称为'+params.name+'的应用吗?',
-    okText: '确认',
-    cancelText: '取消',
-    onOk: () => {
-      return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => {
-        handleSuccess();
-      });
-    },
-  });
-};
-
-
-/**
- * 根据应用id查询流程
- * @param params
- */
-export const queryFlowById = (params) => {
-  return defHttp.get({ url: Api.queryFlowById, params }, { isTransformResponse: false });
-};
-
-/**
- * 应用编排
- * @param params
- */
-export const promptGenerate = (params) => {
-  return defHttp.post(
-    {
-      url: Api.promptGenerate+'?prompt='+ params.prompt,
-      adapter: 'fetch',
-      responseType: 'stream',
-      timeout: 5 * 60 * 1000,
-    },
-    {
-      isTransformResponse: false,
-    }
-  );
-};

+ 0 - 88
src/views/super/airag/aiapp/AiApp.data.ts

@@ -1,88 +0,0 @@
-import { FormSchema } from '@/components/Form';
-
-/**
- * 表单
- */
-export const formSchema: FormSchema[] = [
-  {
-    label: 'id',
-    field: 'id',
-    component: 'Input',
-    show: false,
-  },
-  {
-    label: '应用名称',
-    field: 'name',
-    required: true,
-    componentProps: {
-      //是否展示字数
-      showCount: true,
-      maxlength: 64,
-    },
-    component: 'Input',
-  },
-  {
-    label: '应用描述',
-    field: 'descr',
-    component: 'InputTextArea',
-    componentProps: {
-      placeholder: '描述该应用的应用场景及用途',
-      rows: 4,
-      //是否展示字数
-      showCount: true,
-      maxlength: 256,
-    },
-  },
-  {
-    label: '应用图标',
-    field: 'icon',
-    component: 'JImageUpload',
-  },
-  {
-    label: '选择应用类型',
-    field: 'type',
-    component: 'Input',
-    show:({ values })=>{
-      return !values.id;
-    },
-    slot: 'typeSlot',
-  },
-];
-
-/**
- * 快捷指令表单
- */
-export const quickCommandFormSchema: FormSchema[] = [
-  {
-    label: 'key',
-    field: 'key',
-    component: 'Input',
-    show: false,
-  },
-  {
-    label: '按钮名称',
-    field: 'name',
-    required: true,
-    component: 'Input',
-    componentProps: {
-      showCount: true,
-      maxLength: 10,
-    },
-  },
-  {
-    label: '按钮图标',
-    field: 'icon',
-    component: 'IconPicker',
-  },
-  {
-    label: '指令内容',
-    field: 'descr',
-    required: true,
-    component: 'InputTextArea',
-    componentProps: {
-      autosize: { minRows: 4, maxRows: 4 },
-      showCount: true,
-      maxLength: 100,
-    }
-  },
-];

+ 0 - 597
src/views/super/airag/aiapp/AiAppList.vue

@@ -1,597 +0,0 @@
-<!--知识库文档列表-->
-<template>
-  <div class="knowledge">
-    <!--查询区域-->
-    <div class="jeecg-basic-table-form-container">
-      <a-form
-        ref="formRef"
-        @keyup.enter.native="searchQuery"
-        :model="queryParam"
-        :label-col="labelCol"
-        :wrapper-col="wrapperCol"
-        style="background-color: #f7f8fc"
-      >
-        <a-row :gutter="24">
-          <a-col :xl="7" :lg="7" :md="8" :sm="24">
-            <a-form-item name="name" label="应用名称">
-              <JInput v-model:value="queryParam.name" placeholder="请输入应用名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :xl="7" :lg="7" :md="8" :sm="24">
-            <a-form-item name="type" label="应用类型">
-              <j-dict-select-tag v-model:value="queryParam.type" dict-code="ai_app_type" placeholder="请选择应用类型" />
-            </a-form-item>
-          </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
-              <a-col :lg="6">
-                <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
-                <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
-              </a-col>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <a-row :span="24" class="knowledge-row">
-      <a-col :xxl="4" :xl="6" :lg="6" :md="6" :sm="12" :xs="24">
-        <a-card class="add-knowledge-card" @click="handleCreateApp">
-          <div class="flex">
-            <Icon icon="ant-design:plus-outlined" class="add-knowledge-card-icon" size="20"></Icon>
-            <span class="add-knowledge-card-title">创建应用</span>
-          </div>
-        </a-card>
-      </a-col>
-      <a-col :xxl="4" :xl="6" :lg="6" :md="6" :sm="12" :xs="24" v-for="item in knowledgeAppDataList">
-        <a-card class="knowledge-card pointer" @click="handleEditClick(item)">
-          <div class="flex">
-            <img class="header-img" :src="getImage(item.icon)" />
-            <div class="header-text">
-              <span class="header-text-top header-name ellipsis"> {{ item.name }} </span>
-              <span class="header-text-top header-create ellipsis">
-                <a-tag v-if="item.status === 'release'" color="green">已发布</a-tag>
-                <a-tag v-if="item.status === 'disable'">已禁用</a-tag>
-                <span>创建者:{{ item.createBy_dictText || item.createBy }}</span>
-              </span>
-            </div>
-          </div>
-          <div class="header-tag">
-            <a-tag color="#EBF1FF" style="margin-right: 0" v-if="item.type === 'chatSimple'">
-              <span style="color: #3370ff">简单配置</span>
-            </a-tag>
-            <a-tag color="#FDF6EC" style="margin-right: 0" v-if="item.type === 'chatFLow'">
-              <span style="color: #e6a343">高级编排</span>
-            </a-tag>
-          </div>
-          <div class="card-description">
-            <span>{{ item.descr || '暂无描述' }}</span>
-          </div>
-          <div class="card-footer">
-            <a-tooltip title="演示">
-              <div class="card-footer-icon" @click.prevent.stop="handleViewClick(item.id)">
-                <Icon class="operation" icon="ant-design:youtube-outlined" size="20" color="#1F2329"></Icon>
-              </div>
-            </a-tooltip>
-            <template v-if="item.status !== 'release'">
-              <a-divider type="vertical" style="float: left" />
-              <a-tooltip title="删除">
-                <div class="card-footer-icon" @click.prevent.stop="handleDeleteClick(item)">
-                  <Icon icon="ant-design:delete-outlined" class="operation" size="18" color="#1F2329"></Icon>
-                </div>
-              </a-tooltip>
-            </template>
-            <a-divider type="vertical" style="float: left" />
-            <a-tooltip title="发布">
-              <a-dropdown class="card-footer-icon" placement="bottomRight" :trigger="['click']">
-                <div @click.prevent.stop>
-                  <Icon style="position: relative;top: 1px" icon="ant-design:send-outlined" size="16" color="#1F2329"></Icon>
-                </div>
-                <template #overlay>
-                  <a-menu>
-                    <template v-if="item.status === 'enable'">
-                      <a-menu-item key="release" @click.prevent.stop="handleSendClick(item,'release')">
-                        <Icon icon="lineicons:rocket-5" size="16"></Icon>
-                        发布
-                      </a-menu-item>
-                      <a-menu-divider/>
-                    </template>
-                    <template v-else-if="item.status === 'release'">
-                      <a-menu-item key="un-release" @click.prevent.stop="handleSendClick(item,'un-release')">
-                        <Icon icon="tabler:rocket-off" size="16"></Icon>
-                        取消发布
-                      </a-menu-item>
-                      <a-menu-divider/>
-                    </template>
-                    <a-menu-item key="web" @click.prevent.stop="handleSendClick(item,'web')">
-                      <Icon icon="ant-design:dribbble-outlined" size="16"></Icon>
-                      嵌入网站
-                    </a-menu-item>
-                    <a-menu-item v-if="isShowMenu" key="menu" @click.prevent.stop="handleSendClick(item,'menu')">
-                      <Icon icon="ant-design:menu-outlined" size="16"></Icon> 配置菜单
-                    </a-menu-item>
-                  </a-menu>
-                </template>
-              </a-dropdown>
-            </a-tooltip>
-          </div>
-        </a-card>
-      </a-col>
-    </a-row>
-    <Pagination
-      v-if="knowledgeAppDataList.length > 0"
-      :current="pageNo"
-      :page-size="pageSize"
-      :page-size-options="pageSizeOptions"
-      :total="total"
-      :showQuickJumper="true"
-      :showSizeChanger="true"
-      @change="handlePageChange"
-      class="list-footer"
-      size="small"
-      :show-total="() => `共${total}条` "
-    />
-    <!-- Ai新增弹窗  -->
-    <AiAppModal @register="registerModal" @success="handleSuccess"></AiAppModal>
-    <!-- Ai设置弹窗 -->
-    <AiAppSettingModal @register="registerSettingModal" @success="reload"></AiAppSettingModal>
-    <!-- 发布弹窗 -->
-    <AiAppSendModal @register="registerAiAppSendModal"/>
-  </div>
-</template>
-
-<script lang="ts">
-  import { ref, reactive, onMounted } from 'vue';
-  import BasicModal from '@/components/Modal/src/BasicModal.vue';
-  import { useModal, useModalInner } from '@/components/Modal';
-  import { LoadingOutlined } from '@ant-design/icons-vue';
-  import { Avatar, Modal, Pagination } from 'ant-design-vue';
-  import { getFileAccessHttpUrl } from '@/utils/common/compUtils';
-  import defaultImg from './img/ailogo.png';
-  import AiAppModal from './components/AiAppModal.vue';
-  import AiAppSettingModal from './components/AiAppSettingModal.vue';
-  import AiAppSendModal from './components/AiAppSendModal.vue';
-  import Icon from '@/components/Icon';
-  import { $electron } from "@/electron";
-  import { appList, deleteApp, releaseApp } from './AiApp.api';
-  import { useMessage } from '@/hooks/web/useMessage';
-  import JInput from '@/components/Form/src/jeecg/components/JInput.vue';
-  import JDictSelectTag from '@/components/Form/src/jeecg/components/JDictSelectTag.vue';
-  import { useRouter } from "vue-router";
-
-  export default {
-    name: 'AiAppList',
-    components: {
-      JDictSelectTag,
-      JInput,
-      AiAppSendModal,
-      Icon,
-      Pagination,
-      Avatar,
-      LoadingOutlined,
-      BasicModal,
-      AiAppModal,
-      AiAppSettingModal,
-    },
-    emits: ['success', 'register'],
-    setup(props, { emit }) {
-      /**
-       * 创建应用的集合
-       */
-      const knowledgeAppDataList = ref<any>([]);
-      //当前页数
-      const pageNo = ref<number>(1);
-      //每页条数
-      const pageSize = ref<number>(10);
-      //总条数
-      const total = ref<number>(0);
-      //可选择的页数
-      const pageSizeOptions = ref<any>(['10', '20', '30']);
-      //注册modal
-      const [registerModal, { openModal }] = useModal();
-      const [registerSettingModal, { openModal: openAppModal }] = useModal();
-      const [registerAiAppSendModal, { openModal: openAiAppSendModal }] = useModal();
-      const { createMessage, createConfirmSync } = useMessage();
-      //查询参数
-      const queryParam = reactive<any>({});
-      //查询区域label宽度
-      const labelCol = reactive({
-        xs: 24,
-        sm: 4,
-        xl: 6,
-        xxl: 6,
-      });
-      //查询区域组件宽度
-      const wrapperCol = reactive({
-        xs: 24,
-        sm: 20,
-      });
-      //表单的ref
-      const formRef = ref();
-
-      reload();
-
-      /**
-       * 加载数据
-       */
-      function reload() {
-        let params = {
-          pageNo: pageNo.value,
-          pageSize: pageSize.value,
-          column: 'createTime',
-          order: 'desc',
-        };
-        Object.assign(params, queryParam);
-        appList(params).then((res) => {
-          if (res.success) {
-            knowledgeAppDataList.value = res.result.records;
-            total.value = res.result.total;
-          } else {
-            knowledgeAppDataList.value = [];
-            total.value = 0;
-          }
-        });
-      }
-
-      /**
-       * 创建应用
-       */
-      function handleCreateApp() {
-        openModal(true, {});
-      }
-
-      /**
-       * 分页改变事件
-       * @param page
-       * @param current
-       */
-      function handlePageChange(page, current) {
-        pageNo.value = page;
-        pageSize.value = current;
-        reload();
-      }
-
-      /**
-       * 成功
-       */
-      function handleSuccess(id) {
-        reload();
-        //打开编辑弹窗
-        openAppModal(true, {
-          isUpdate: false,
-          id: id,
-        });
-      }
-
-      /**
-       * 获取图片
-       * @param url
-       */
-      function getImage(url) {
-        return url ? getFileAccessHttpUrl(url) : defaultImg;
-      }
-
-      /**
-       * 编辑
-       * @param item
-       */
-      function handleEditClick(item) {
-        console.log('item:::', item);
-        openAppModal(true, {
-          isUpdate: true,
-          ...item,
-        });
-      }
-
-      /**
-       * 演示
-       */
-      function handleViewClick(id: string) {
-        let url = '/ai/app/chat/' + id;
-
-        // update-begin--author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用
-        if ($electron.isElectron()) {
-          url = $electron.resolveRoutePath(url);
-          window.open(url, '_blank', 'width=1200,height=800');
-          return
-        }
-        // update-end----author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用
-
-        window.open(url, '_blank');
-      }
-
-      /**
-       * 删除
-       */
-      function handleDeleteClick(item) {
-        if(knowledgeAppDataList.value.length == 1 && pageNo.value > 1) {
-          pageNo.value = pageNo.value - 1;
-        }
-        deleteApp({ id: item.id, name: item.name }, reload);
-      }
-
-      /**
-       * 发布点击事件
-       * @param item 数据
-       * @param type 类别
-       */
-      function handleSendClick(item,type) {
-        if (type === 'release' || type === 'un-release') {
-          return onRelease(item);
-        }
-
-        openAiAppSendModal(true,{
-          type: type,
-          data: item
-        })
-      }
-
-      async function onRelease(item) {
-        const toRelease = item.status === 'enable';
-        let flag = await createConfirmSync({
-          title: toRelease ? '发布应用' : '取消发布应用',
-          content: toRelease ? '确定要发布应用吗?发布后将不允许修改应用。' : '确定要取消发布应用吗?',
-          okText: '确定',
-          cancelText: '取消',
-        });
-        if (!flag) {
-          return
-        }
-        doRelease(item, item.status === 'enable');
-      }
-
-      /**
-       * 发布
-       */
-      async function doRelease(item, release: boolean) {
-        let success: boolean = await releaseApp(item.id, release);
-        if (success) {
-          // 发布成功
-          if (release) {
-            item.status = 'release'
-          } else {
-            item.status = 'enable'
-          }
-        }
-      }
-
-      /**
-       * 重置
-       */
-      function searchReset() {
-        pageNo.value = 1;
-        formRef.value.resetFields();
-        queryParam.name = '';
-        //刷新数据
-        reload();
-      }
-
-      /**
-       * 查询
-       */
-      function searchQuery(){
-        pageNo.value = 1; 
-        //刷新数据
-        reload();
-      }
-
-      const router = useRouter();
-      //是否显示菜单配置选项
-      const isShowMenu = ref<boolean>(false);
-      onMounted((()=>{
-        let fullPath = router.currentRoute.value.fullPath;
-        console.log(fullPath)
-        if(fullPath === '/myapps/ai/app'){
-          isShowMenu.value = false;
-        } else {
-          isShowMenu.value = true;
-        }
-      }))
-
-      return {
-        handleCreateApp,
-        knowledgeAppDataList,
-        pageNo,
-        pageSize,
-        total,
-        pageSizeOptions,
-        handlePageChange,
-        cardBodyStyle: { textAlign: 'left', width: '100%' },
-        registerModal,
-        handleSuccess,
-        getImage,
-        handleEditClick,
-        handleViewClick,
-        handleDeleteClick,
-        registerSettingModal,
-        reload,
-        queryParam,
-        labelCol,
-        wrapperCol,
-        handleSendClick,
-        registerAiAppSendModal,
-        searchReset,
-        formRef,
-        isShowMenu,
-        searchQuery,
-      };
-    },
-  };
-</script>
-
-<style scoped lang="less">
-  .knowledge {
-    height: calc(100vh - 115px);
-    background: #f7f8fc;
-    padding: 24px;
-    overflow-y: auto;
-  }
-
-  .add-knowledge-card {
-    margin-bottom: 20px;
-    background: #fcfcfd;
-    border: 1px solid #f0f0f0;
-    box-shadow: 0 2px 4px #e6e6e6;
-    transition: all 0.3s ease;
-    border-radius: 10px;
-    display: inline-flex;
-    justify-content: center;
-    align-items: center;
-    font-size: 16px;
-    cursor: pointer;
-    height: 152px;
-    width: calc(100% - 20px);
-    .add-knowledge-card-icon {
-      padding: 8px;
-      color: #1f2329;
-      background-color: #f5f6f7;
-      margin-right: 12px;
-    }
-    .add-knowledge-card-title {
-      font-size: 16px;
-      color:#1f2329;
-      font-weight: 400;
-      align-self: center;
-    }
-  }
-
-  .knowledge-card {
-    border-radius: 10px;
-    margin-right: 20px;
-    margin-bottom: 20px;
-    height: 152px;
-    background: #fcfcfd;
-    border: 1px solid #f0f0f0;
-    box-shadow: 0 2px 4px #e6e6e6;
-    transition: all 0.3s ease;
-    .header-img {
-      width: 40px;
-      height: 40px;
-      border-radius: 0.5rem;
-    }
-    .header-text {
-      margin-left: 5px;
-      position: relative;
-      font-size: 14px;
-      display: grid;
-      width: calc(100% - 100px);
-      .header-name {
-        font-weight: bold;
-        color: #354052;
-      }
-      .header-create {
-        font-size: 12px;
-        color: #646a73;
-      }
-    }
-    .header-tag {
-      position: absolute;
-      right: 4px;
-      top: 6px;
-    }
-  }
-
-  .add-knowledge-card,
-  .knowledge-card {
-    transition: box-shadow 0.3s ease;
-  }
-
-  .add-knowledge-card:hover,
-  .knowledge-card:hover {
-    box-shadow: 0 6px 12px #d0d3d8;
-  }
-
-  .knowledge-row {
-    max-height: calc(100% - 100px);
-    margin-top: 20px;
-    overflow-y: auto;
-  }
-
-  .add-knowledge-doc {
-    margin-top: 6px;
-    color: #6f6f83;
-    font-size: 13px;
-    width: 100%;
-    cursor: pointer;
-    display: flex;
-    span {
-      margin-left: 4px;
-      line-height: 28px;
-    }
-  }
-  .add-knowledge-doc:hover {
-    background: #c8ceda33;
-  }
-  .card-description {
-    display: -webkit-box;
-    -webkit-box-orient: vertical;
-    -webkit-line-clamp: 3;
-    height: 4.5em;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    line-height: 1.5;
-    margin-top: 10px;
-    text-align: left;
-    font-size: 12px;
-    color: #676f83;
-  }
-  .card-footer {
-    position: absolute;
-    bottom: 8px;
-    left: 0;
-    min-height: 30px;
-    padding: 0 16px;
-    width: 100%;
-    align-items: center;
-    display: flex;
-  }
-
-  .card-footer-icon {
-    font-size: 14px;
-    height: 24px;
-    padding: 0 7px;
-    border-radius: 4px;
-    text-align: center;
-    align-content: center;
-    float: left;
-    width: 36px;
-  }
-
-  .card-footer-icon:hover {
-    color: #000000;
-    background-color: #e9ecf2;
-    border: none;
-  }
-
-  .operation {
-    position: relative;
-    top: 2px;
-  }
-  .list-footer {
-    text-align: right;
-    margin-top: 5px;
-  }
-  :deep(.ant-card .ant-card-body) {
-    padding: 16px;
-  }
-  .ellipsis{
-    overflow: hidden;
-    text-wrap: nowrap;
-    text-overflow: ellipsis;
-  }
-  .jeecg-basic-table-form-container {
-    padding: 0;
-    :deep(.ant-form) {
-      background-color: transparent;
-    }
-    .table-page-search-submitButtons {
-      display: block;
-      margin-bottom: 24px;
-      white-space: nowrap;
-    }
-  }
-</style>
-<style lang="less">
-  .airag-knowledge-doc .scroll-container {
-    padding: 0 !important;
-  }
-</style>

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