Browse Source

fix: 仓库迁移

wanggaokun 1 year ago
parent
commit
0c68fca9a9
100 changed files with 1342 additions and 1675 deletions
  1. 1 1
      .env
  2. 1 4
      .env.development
  3. 3 2
      .env.production
  4. 1 1
      .prettierrc.cjs
  5. 1 1
      package.json
  6. 2 2
      src/api/config/servicePort.ts
  7. 7 4
      src/api/index.ts
  8. 131 0
      src/api/interface/db/connection.ts
  9. 13 2
      src/api/interface/index.ts
  10. 2 2
      src/api/interface/menu.ts
  11. 29 0
      src/api/modules/dataScreen/index.ts
  12. 101 0
      src/api/modules/db/connection.ts
  13. 35 0
      src/api/modules/db/metadata.ts
  14. 1 22
      src/api/modules/login.ts
  15. 3 3
      src/api/modules/manage/afterAnalysisResult.ts
  16. 12 3
      src/api/modules/manage/aircraft.ts
  17. 3 3
      src/api/modules/manage/analyzeCourseLog.ts
  18. 3 3
      src/api/modules/manage/analyzeDownLog.ts
  19. 3 3
      src/api/modules/manage/analyzeResult.ts
  20. 9 44
      src/api/modules/manage/backupRestoreLog.ts
  21. 12 3
      src/api/modules/manage/dataDown.ts
  22. 3 3
      src/api/modules/manage/deepIsolationModel.ts
  23. 3 3
      src/api/modules/manage/deriveParameter.ts
  24. 3 3
      src/api/modules/manage/diagnoseResult.ts
  25. 3 3
      src/api/modules/manage/falseAlarmRestrainModel.ts
  26. 5 5
      src/api/modules/manage/faultCase.ts
  27. 3 3
      src/api/modules/manage/feedbackRawData.ts
  28. 3 3
      src/api/modules/manage/fleet.ts
  29. 3 3
      src/api/modules/manage/forecastModel.ts
  30. 3 3
      src/api/modules/manage/forecastResult.ts
  31. 3 3
      src/api/modules/manage/groundDiagnosisModel.ts
  32. 3 3
      src/api/modules/manage/instructionInfo.ts
  33. 3 3
      src/api/modules/manage/lifePartConfig.ts
  34. 3 3
      src/api/modules/manage/maintenance.ts
  35. 3 3
      src/api/modules/manage/maintenanceTestControl.ts
  36. 3 3
      src/api/modules/manage/modelInfo.ts
  37. 3 3
      src/api/modules/manage/monitorParameterConfig.ts
  38. 3 3
      src/api/modules/manage/orderConfig.ts
  39. 3 3
      src/api/modules/manage/orderInfo.ts
  40. 3 3
      src/api/modules/manage/performanceMonitorModel.ts
  41. 3 3
      src/api/modules/manage/preHandleResult.ts
  42. 3 3
      src/api/modules/manage/product.ts
  43. 3 3
      src/api/modules/manage/softwareConfig.ts
  44. 3 3
      src/api/modules/manage/sortie.ts
  45. 27 3
      src/api/modules/manage/sortieParameter.ts
  46. 2 2
      src/api/modules/monitor/logininfor.ts
  47. 2 2
      src/api/modules/monitor/operlog.ts
  48. 2 2
      src/api/modules/system/dept.ts
  49. 3 3
      src/api/modules/system/dict.ts
  50. 2 2
      src/api/modules/system/dictData.ts
  51. 3 3
      src/api/modules/system/menu.ts
  52. 2 2
      src/api/modules/system/post.ts
  53. 84 3
      src/api/modules/system/role.ts
  54. 12 2
      src/api/modules/system/user.ts
  55. 95 0
      src/api/modules/task/assignment.ts
  56. 1 1
      src/api/modules/tool/gen.ts
  57. 0 71
      src/api/modules/user copy.ts
  58. 0 8
      src/assets/json/authButtonList.json
  59. 0 1045
      src/assets/json/authMenuList.json
  60. BIN
      src/assets/mock/Easy-Mock-API.zip
  61. 18 17
      src/components/CustomDialog/index.vue
  62. 6 1
      src/components/DialogOld/form.vue
  63. 1 6
      src/components/DictTag/index.vue
  64. 1 6
      src/components/ECharts/config/index.ts
  65. 3 7
      src/components/ECharts/index.vue
  66. 1 1
      src/components/FormDialog/index.vue
  67. 1 3
      src/components/Grid/components/GridItem.vue
  68. 1 3
      src/components/Highlight/index.vue
  69. 1 2
      src/components/HighlightDialog/index.vue
  70. 2 14
      src/components/ImportExcel copy/index.vue
  71. 8 20
      src/components/ImportExcel/index.vue
  72. 4 14
      src/components/ProForm/components/Item.vue
  73. 32 8
      src/components/ProForm/index.vue
  74. 1 5
      src/components/ProTable/components/TableColumn.vue
  75. 13 37
      src/components/ProTable/index.vue
  76. 1 2
      src/components/ProTable/interface/index.ts
  77. 1 3
      src/components/SelectFilter/index.vue
  78. 132 0
      src/components/TableDialog/index.vue
  79. 100 85
      src/components/Upload/File.vue
  80. 1 1
      src/config/index.ts
  81. 1 1
      src/hooks/useTable.ts
  82. 1 4
      src/hooks/useTheme.ts
  83. 3 7
      src/hooks/useTime.ts
  84. 1 7
      src/layouts/LayoutClassic/index.vue
  85. 1 7
      src/layouts/LayoutColumns/index.vue
  86. 1 7
      src/layouts/LayoutVertical/index.vue
  87. 2 2
      src/layouts/components/Header/ToolBarRight.vue
  88. 1 6
      src/layouts/components/Header/components/AssemblySize.vue
  89. 7 7
      src/layouts/components/Header/components/Avatar.vue
  90. 1 6
      src/layouts/components/Header/components/Language.vue
  91. 3 26
      src/layouts/components/ThemeDrawer/index.vue
  92. 79 18
      src/routers/modules/dynamicRouter.json
  93. 0 1
      src/routers/modules/dynamicRouter.ts
  94. 9 0
      src/routers/modules/staticRouter.ts
  95. 2 8
      src/stores/modules/auth.ts
  96. 4 4
      src/stores/modules/global.ts
  97. 4 4
      src/styles/element.scss
  98. 16 0
      src/typings/ProForm.d.ts
  99. 198 0
      src/utils/dataScreen.ts
  100. 1 2
      src/utils/jsEncrypt.ts

+ 1 - 1
.env

@@ -2,7 +2,7 @@
 VITE_GLOB_APP_TITLE = 地面健康管理系统
 
 # 本地运行端口号
-VITE_PORT = 8848
+VITE_PORT = 8849
 
 # 启动时自动打开浏览器
 VITE_OPEN = true

+ 1 - 4
.env.development

@@ -18,7 +18,4 @@ VITE_PWA = false
 VITE_API_URL = /api-dev
 
 # 开发环境跨域代理,支持配置多个
-VITE_PROXY = [["/api-dev","http://localhost:8080"]]
-# VITE_PROXY = [["/api","https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e"]]
-# VITE_PROXY = [["/api","https://www.fastmock.site/mock/f81e8333c1a9276214bcdbc170d9e0a0"]]
-# VITE_PROXY = [["/api-easymock","https://mock.mengxuegu.com"],["/api-fastmock","https://www.fastmock.site"]]
+VITE_PROXY = [["/api-dev/db-api/dbswitch","http://localhost:9088/dbswitch"],["/api-dev","http://localhost:8089"]]

+ 3 - 2
.env.production

@@ -22,7 +22,8 @@ VITE_DROP_CONSOLE = true
 VITE_PWA = true
 
 # 线上环境接口地址
-VITE_API_URL = /api-pro
+VITE_API_URL = /pro-api
 
 # 开发环境跨域代理,支持配置多个
-VITE_PROXY = [["/api-pro","http://localhost:8080"]]
+VITE_PROXY = [["/pro-api/db-api/dbswitch","http://localhost:9088/dbswitch"],["/pro-api","http://localhost:8089"]]
+

+ 1 - 1
.prettierrc.cjs

@@ -2,7 +2,7 @@
 
 module.exports = {
   // 指定最大换行长度
-  printWidth: 130,
+  printWidth: 150,
   // 缩进制表符宽度 | 空格数
   tabWidth: 2,
   // 使用制表符而不是空格缩进行 (true:制表符,false:空格)

+ 1 - 1
package.json

@@ -15,7 +15,7 @@
     "url": ""
   },
   "scripts": {
-    "dev": "vite",
+    "dev": "vite --mode development",
     "serve": "vite",
     "build:dev": "vue-tsc && vite build --mode development",
     "build:test": "vue-tsc && vite build --mode test",

+ 2 - 2
src/api/config/servicePort.ts

@@ -1,3 +1,3 @@
-// 后端微服务模块前缀
+// 后端服务模块前缀
+export const DB = '/db-api'
 export const PORT1 = '/dev-api'
-export const PORT2 = '/hooks'

+ 7 - 4
src/api/index.ts

@@ -163,16 +163,19 @@ class RequestHttp {
   get<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
     return this.service.get(url, { params, ..._object })
   }
-  post<T>(url: string, params?: object | string, _object = {}): Promise<ResultData<T>> {
-    return this.service.post(url, params, _object)
-  }
   put<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
     return this.service.put(url, params, _object)
   }
+  post<T>(url: string, params?: object | string, _object = {}): Promise<ResultData<T>> {
+    return this.service.post(url, params, _object)
+  }
   delete<T>(url: string, params?: any, _object = {}): Promise<ResultData<T>> {
     return this.service.delete(url, { params, ..._object })
   }
-  download(url: string, params?: object, _object = {}): Promise<BlobPart> {
+  downloadGet(url: string, params?: object, _object = {}): Promise<BlobPart> {
+    return this.service.get(url, { params, ..._object, responseType: 'blob' })
+  }
+  downloadPost(url: string, params?: object, _object = {}): Promise<BlobPart> {
     return this.service.post(url, params, { ..._object, responseType: 'blob' })
   }
 }

+ 131 - 0
src/api/interface/db/connection.ts

@@ -0,0 +1,131 @@
+import { PageQuery, BaseEntity } from '@/api/interface/index'
+export interface ConnectionVO extends BaseEntity {
+  /**
+   * 唯一主键
+   */
+  id: string | number
+
+  /**
+   * 链接名称
+   */
+  name: string
+
+  /**
+   * 数据库类型
+   */
+  type: string
+
+  /**
+   * 驱动版本
+   */
+  driverVersion: string
+
+  /**
+   * 驱动类名
+   */
+  driver: string
+
+  /**
+   * jdbc-url连接串
+   */
+  url: string
+
+  /**
+   * 数据库账号
+   */
+  userName: string
+
+  /**
+   * 账号密码
+   */
+  password: string
+}
+
+export interface ConnectionForm {
+  /**
+   * 唯一主键
+   */
+  id?: string | number
+
+  /**
+   * 链接名称
+   */
+  name?: string
+
+  /**
+   * 数据库类型
+   */
+  type?: string
+
+  /**
+   * 驱动版本
+   */
+  driverVersion?: string
+
+  /**
+   * 驱动类名
+   */
+  driver?: string
+
+  /**
+   * jdbc-url连接串
+   */
+  url?: string
+
+  /**
+   * 数据库账号
+   */
+  userName?: string
+
+  /**
+   * 账号密码
+   */
+  password?: string
+
+  /**
+   * 乐观锁
+   */
+  version?: number
+}
+
+export interface ConnectionQuery extends PageQuery {
+  /**
+   * 链接名称
+   */
+  name?: string
+
+  /**
+   * 数据库类型
+   */
+  type?: string
+
+  /**
+   * 驱动版本
+   */
+  driverVersion?: string
+
+  /**
+   * 驱动类名
+   */
+  driver?: string
+
+  /**
+   * jdbc-url连接串
+   */
+  url?: string
+
+  /**
+   * 数据库账号
+   */
+  userName?: string
+
+  /**
+   * 账号密码
+   */
+  password?: string
+
+  /**
+   * 日期范围参数
+   */
+  params?: any
+}

+ 13 - 2
src/api/interface/index.ts

@@ -18,11 +18,22 @@ export interface ResPage<T> {
 }
 
 // 分页请求参数
-export interface ReqPage {
+export interface PageQuery {
   pageNum: number
   pageSize: number
 }
 
+// 分页请求参数
+export interface BaseEntity {
+  /** 乐观锁 */
+  version?: number
+  createBy?: any
+  createDept?: any
+  createTime?: string
+  updateBy?: any
+  updateTime?: any
+}
+
 // 文件上传模块
 export namespace Upload {
   export interface ResFileUrl {
@@ -49,7 +60,7 @@ export namespace Login {
 
 // 用户管理模块
 export namespace User {
-  export interface ReqUserParams extends ReqPage {
+  export interface ReqUserParams extends PageQuery {
     username: string
     gender: number
     idCard: string

+ 2 - 2
src/api/interface/menu.ts

@@ -1,7 +1,7 @@
-import { ReqPage } from '@/api/interface/index'
+import { PageQuery } from '@/api/interface/index'
 // 用户管理模块
 export namespace Menu {
-  export interface ReqMenuParams extends ReqPage {
+  export interface ReqMenuParams extends PageQuery {
     username: string
     gender: number
     idCard: string

+ 29 - 0
src/api/modules/dataScreen/index.ts

@@ -0,0 +1,29 @@
+// import lists from '@/assets/mock/algoModel.json'
+// import faultList from '@/assets/mock/yearFault.json'
+// import SortieInfor from '@/assets/mock/sortieInfor.json'
+import http from '@/api'
+
+/**
+ * @name 算法模型
+ */
+
+export const algoModelApi = (params: any) => {
+  // return lists
+  return http.get<any>('/manage/modelInfo/count', params, { loading: false })
+}
+/**
+ * @name 年度故障统计
+ */
+
+export const getFaultApi = (params: any) => {
+  // return faultList
+  return http.get<any>('/manage/faultCase/list/count', params, { loading: true })
+}
+/**
+ * @name 架次信息统计
+ */
+
+export const getSortieInfoApi = (params: any) => {
+  // return SortieInfor
+  return http.get<any>('/manage/sortie/list/count', params, { loading: false })
+}

+ 101 - 0
src/api/modules/db/connection.ts

@@ -0,0 +1,101 @@
+import http from '@/api'
+import { ConnectionVO, ConnectionForm, ConnectionQuery } from '@/api/interface/db/connection'
+import { DB } from '@/api/config/servicePort'
+/**
+ * @name 查询数据库链接列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const listConnectionApi = (query: ConnectionQuery) => {
+  return http.post<ConnectionVO[]>(`${DB}/dbswitch/admin/api/v1/connection/list`, query, { loading: true })
+}
+
+/**
+ * @name 查询数据库链接详细
+ * @param id id
+ * @returns returns
+ */
+export const getConnectionApi = (id: string | number) => {
+  return http.get<ConnectionVO>(`/db/connection/${id}`)
+}
+
+/**
+ * @name 测试数据库连接
+ * @param id id
+ * @returns returns
+ */
+export const testApi = (id: string | number) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/test/${id}`)
+}
+/**
+ * @name 获取连接名称
+ * @returns returns
+ */
+export const getNameListApi = () => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/list/name`)
+}
+/**
+ * @name 获取
+ * @returns returns
+ */
+export const getSchemasApi = (val: any) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/schemas/get/${val}`)
+}
+/**
+ * @name 获取
+ * @returns returns
+ */
+export const getViewsApi = (data: { id: any; schema: any }) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/views/get/${data.id}?schema=${data.schema}`)
+}
+/**
+ * @name 获取
+ * @returns returns
+ */
+export const getTablesApi = (data: { id: any; schema: any }) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/tables/get/${data.id}?schema=${data.schema}`)
+}
+
+/**
+ * @name 查询数据库产品类型
+ * @returns returns
+ */
+export const getTypesApi = () => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/types`)
+}
+
+/**
+ * @name 查询数据库链驱动
+ * @param type type
+ * @returns returns
+ */
+export const getDriversApi = (type: string | number) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/${type}/drivers`)
+}
+
+/**
+ * @name 新增数据库链接
+ * @param data data
+ * @returns returns
+ */
+export const addConnectionApi = (data: ConnectionForm) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/connection/create`, data, { loading: false })
+}
+
+/**
+ * @name 修改数据库链接
+ * @param data data
+ * @returns returns
+ */
+export const updateConnectionApi = (data: ConnectionForm) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/connection/update`, data, { loading: false })
+}
+
+/**
+ * @name 删除数据库链接
+ * @param id id
+ * @returns returns
+ */
+export const delConnectionApi = (id: string | number | Array<string | number>) => {
+  return http.delete<any>(`${DB}/dbswitch/admin/api/v1/connection/delete/${id}`)
+}

+ 35 - 0
src/api/modules/db/metadata.ts

@@ -0,0 +1,35 @@
+import http from '@/api'
+import { DB } from '@/api/config/servicePort'
+/**
+ * @name 查询数据库allSchemas
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const getSchemasApi = (id: string | number) => {
+  return http.get<any[]>(`${DB}/dbswitch/admin/api/v1/metadata/schemas/${id}/1/0`, { loading: false })
+}
+
+/**
+ * @name 查询数据库allTables
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const getTablesApi = (id: string | number, param: any) => {
+  return http.get<any[]>(`${DB}/dbswitch/admin/api/v1/metadata/tables/${id}/1/0`, param, { loading: false })
+}
+/**
+ * @name 查询数据库allTables
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const getTablesMetaApi = (id: string | number, param: any) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/metadata/meta/table/${id}`, param, { loading: false })
+}
+/**
+ * @name 查询数据库tableMeta
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const getTablesDataApi = (id: string | number, param: any) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/metadata/data/table/${id}`, param, { loading: false })
+}

+ 1 - 22
src/api/modules/login.ts

@@ -1,7 +1,4 @@
 import { Login } from '@/api/interface/index'
-import { PORT1 } from '@/api/config/servicePort'
-import authMenuList from '@/assets/json/authMenuList.json'
-import authButtonList from '@/assets/json/authButtonList.json'
 import http from '@/api'
 
 /**
@@ -9,25 +6,7 @@ import http from '@/api'
  */
 // 用户登录
 export const loginApi = (params: Login.ReqLoginForm) => {
-  return http.post<Login.ResLogin>('/login', params, { loading: true }) // 正常 post json 请求  ==>  application/json
-  // return http.post<Login.ResLogin>(PORT1 + `/login`, params, { loading: false }); // 控制当前请求不显示 loading
-  // return http.post<Login.ResLogin>(PORT1 + `/login`, {}, { params }); // post 请求携带 query 参数  ==>  ?username=admin&password=123456
-  // return http.post<Login.ResLogin>(PORT1 + `/login`, qs.stringify(params)); // post 请求携带表单参数  ==>  application/x-www-form-urlencoded
-  // return http.get<Login.ResLogin>(PORT1 + `/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // get 请求可以携带数组等复杂参数
-}
-
-// 获取菜单列表
-export const getRoutersApi = () => {
-  // return http.get<Menu.MenuOptions[]>(PORT1 + `/menu/list`, {}, { loading: false })
-  // 如果想让菜单变为本地数据,注释上一行代码,并引入本地 authMenuList.json 数据
-  return authMenuList
-}
-
-// 获取按钮权限
-export const getAuthButtonListApi = () => {
-  return http.get<Login.ResAuthButtons>(PORT1 + `/auth/buttons`, {}, { loading: false })
-  // 如果想让按钮权限变为本地数据,注释上一行代码,并引入本地 authButtonList.json 数据
-  return authButtonList
+  return http.post<Login.ResLogin>('/login', params, { loading: true })
 }
 
 // 用户退出登录

+ 3 - 3
src/api/modules/manage/afterAnalysisResult.ts

@@ -41,7 +41,7 @@ export const updateAfterAnalysisResultApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delAfterAnalysisResultApi = ({ id }: { id: any }) => {
+export const delAfterAnalysisResultApi = (id: any) => {
   return http.delete<any>(`/manage/afterAnalysisResult/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delAfterAnalysisResultApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/afterAnalysisResult/importTemplate', {})
+  return http.downloadPost('/manage/afterAnalysisResult/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/afterAnalysisResult/export', data)
+  return http.downloadPost('/manage/afterAnalysisResult/export', data)
 }

+ 12 - 3
src/api/modules/manage/aircraft.ts

@@ -41,7 +41,7 @@ export const updateAircraftApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delAircraftApi = ({ id }: { id: any }) => {
+export const delAircraftApi = (id: any) => {
   return http.delete<any>(`/manage/aircraft/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delAircraftApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/aircraft/importTemplate', {})
+  return http.downloadPost('/manage/aircraft/importTemplate', {})
 }
 
 /**
@@ -66,7 +66,7 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/aircraft/export', data)
+  return http.downloadPost('/manage/aircraft/export', data)
 }
 
 /**
@@ -84,3 +84,12 @@ export const fleetListSelectApi = () => {
 export const productListSelectApi = () => {
   return http.get<any>(`/manage/aircraft/productList`)
 }
+
+/**
+ * @name 查询单机列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const listAircraftAllApi = (query: any) => {
+  return http.get<any>('/manage/aircraft/list/all', query, { loading: false })
+}

+ 3 - 3
src/api/modules/manage/analyzeCourseLog.ts

@@ -41,7 +41,7 @@ export const updateAnalyzeCourseLogApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delAnalyzeCourseLogApi = ({ id }: { id: any }) => {
+export const delAnalyzeCourseLogApi = (id: any) => {
   return http.delete<any>(`/manage/analyzeCourseLog/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delAnalyzeCourseLogApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/analyzeCourseLog/importTemplate', {})
+  return http.downloadPost('/manage/analyzeCourseLog/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/analyzeCourseLog/export', data)
+  return http.downloadPost('/manage/analyzeCourseLog/export', data)
 }

+ 3 - 3
src/api/modules/manage/analyzeDownLog.ts

@@ -41,7 +41,7 @@ export const updateAnalyzeDownLogApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delAnalyzeDownLogApi = ({ id }: { id: any }) => {
+export const delAnalyzeDownLogApi = (id: any) => {
   return http.delete<any>(`/manage/analyzeDownLog/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delAnalyzeDownLogApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/analyzeDownLog/importTemplate', {})
+  return http.downloadPost('/manage/analyzeDownLog/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/analyzeDownLog/export', data)
+  return http.downloadPost('/manage/analyzeDownLog/export', data)
 }

+ 3 - 3
src/api/modules/manage/analyzeResult.ts

@@ -41,7 +41,7 @@ export const updateAnalyzeResultApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delAnalyzeResultApi = ({ id }: { id: any }) => {
+export const delAnalyzeResultApi = (id: any) => {
   return http.delete<any>(`/manage/analyzeResult/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delAnalyzeResultApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/analyzeResult/importTemplate', {})
+  return http.downloadPost('/manage/analyzeResult/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/analyzeResult/export', data)
+  return http.downloadPost('/manage/analyzeResult/export', data)
 }

+ 9 - 44
src/api/modules/manage/backupRestoreLog.ts

@@ -6,65 +6,30 @@ import http from '@/api'
  * @returns 返回列表
  */
 export const listBackupRestoreLogApi = (query: any) => {
-  return http.get<any>('/manage/backupRestoreLog/list', query, { loading: true })
+  return http.get<any>('/manage/backupRestore/list', query, { loading: true })
 }
-
-/**
- * @name 查询备份恢复日志详细
- * @param id id
- * @returns returns
- */
-export const getBackupRestoreLogApi = (id: any) => {
-  return http.get<any>(`/manage/backupRestoreLog/${id}`)
-}
-
 /**
- * @name 新增备份恢复日志
+ * @name 备份
  * @param data data
  * @returns returns
  */
-export const addBackupRestoreLogApi = (data: any) => {
-  return http.post<any>('/manage/backupRestoreLog', data, { loading: false })
+export const backupApi = (data?: any) => {
+  return http.post<any>('/manage/backupRestore/file/backup', data, { loading: false })
 }
 
 /**
- * @name 修改备份恢复日志
+ * @name 恢复
  * @param data data
  * @returns returns
  */
-export const updateBackupRestoreLogApi = (data: any) => {
-  return http.put<any>('/manage/backupRestoreLog', data, { loading: false })
-}
-
-/**
- * @name 删除备份恢复日志
- * @param id id
- * @returns returns
- */
-export const delBackupRestoreLogApi = ({ id }: { id: any }) => {
-  return http.delete<any>(`/manage/backupRestoreLog/${id}`)
-}
-
-/**
- * @name 下载模板
- * @returns returns
- */
-export const importTemplateApi = () => {
-  return http.download('/manage/backupRestoreLog/importTemplate', {})
-}
-
-/**
- * @name 导入数据
- * @returns returns
- */
-export const importDataApi = (data: any) => {
-  return http.post('/manage/backupRestoreLog/importData', data)
+export const restoreApi = (data?: any) => {
+  return http.post<any>('/manage/backupRestore/file/restore', data, { loading: false })
 }
 
 /**
  * @name 导出数据
  * @returns returns
  */
-export const exportApi = (data: any) => {
-  return http.download('/manage/backupRestoreLog/export', data)
+export const exportBackupRestoreLogApi = (data: any) => {
+  return http.downloadPost('/manage/backupRestore/export', data)
 }

+ 12 - 3
src/api/modules/manage/dataDown.ts

@@ -41,7 +41,7 @@ export const updateDataDownApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delDataDownApi = ({ id }: { id: any }) => {
+export const delDataDownApi = (id: any) => {
   return http.delete<any>(`/manage/dataDown/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delDataDownApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/dataDown/importTemplate', {})
+  return http.downloadPost('/manage/dataDown/importTemplate', {})
 }
 
 /**
@@ -66,7 +66,7 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/dataDown/export', data)
+  return http.downloadPost('/manage/dataDown/export', data)
 }
 
 /**
@@ -77,3 +77,12 @@ export const exportApi = (data: any) => {
 export const dataDownApi = (data: any) => {
   return http.get<any>(`/data/down`, data, { loading: true })
 }
+
+/**
+ * @name 离线数据上传
+ * @param data data
+ * @returns returns
+ */
+export const dataUploadApi = (data: any) => {
+  return http.post<any>(`/data/upload`, data, { loading: true })
+}

+ 3 - 3
src/api/modules/manage/deepIsolationModel.ts

@@ -41,7 +41,7 @@ export const updateDeepIsolationModelApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delDeepIsolationModelApi = ({ id }: { id: any }) => {
+export const delDeepIsolationModelApi = (id: any) => {
   return http.delete<any>(`/manage/deepIsolationModel/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delDeepIsolationModelApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/deepIsolationModel/importTemplate', {})
+  return http.downloadPost('/manage/deepIsolationModel/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/deepIsolationModel/export', data)
+  return http.downloadPost('/manage/deepIsolationModel/export', data)
 }

+ 3 - 3
src/api/modules/manage/deriveParameter.ts

@@ -41,7 +41,7 @@ export const updateDeriveParameterApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delDeriveParameterApi = ({ id }: { id: any }) => {
+export const delDeriveParameterApi = (id: any) => {
   return http.delete<any>(`/manage/deriveParameter/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delDeriveParameterApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/deriveParameter/importTemplate', {})
+  return http.downloadPost('/manage/deriveParameter/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/deriveParameter/export', data)
+  return http.downloadPost('/manage/deriveParameter/export', data)
 }

+ 3 - 3
src/api/modules/manage/diagnoseResult.ts

@@ -41,7 +41,7 @@ export const updateDiagnoseResultApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delDiagnoseResultApi = ({ id }: { id: any }) => {
+export const delDiagnoseResultApi = (id: any) => {
   return http.delete<any>(`/manage/diagnoseResult/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delDiagnoseResultApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/diagnoseResult/importTemplate', {})
+  return http.downloadPost('/manage/diagnoseResult/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/diagnoseResult/export', data)
+  return http.downloadPost('/manage/diagnoseResult/export', data)
 }

+ 3 - 3
src/api/modules/manage/falseAlarmRestrainModel.ts

@@ -41,7 +41,7 @@ export const updateFalseAlarmRestrainModelApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delFalseAlarmRestrainModelApi = ({ id }: { id: any }) => {
+export const delFalseAlarmRestrainModelApi = (id: any) => {
   return http.delete<any>(`/manage/falseAlarmRestrainModel/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delFalseAlarmRestrainModelApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/falseAlarmRestrainModel/importTemplate', {})
+  return http.downloadPost('/manage/falseAlarmRestrainModel/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/falseAlarmRestrainModel/export', data)
+  return http.downloadPost('/manage/falseAlarmRestrainModel/export', data)
 }

+ 5 - 5
src/api/modules/manage/faultCase.ts

@@ -41,7 +41,7 @@ export const updateFaultCaseApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delFaultCaseApi = ({ id }: { id: any }) => {
+export const delFaultCaseApi = (id: any) => {
   return http.delete<any>(`/manage/faultCase/${id}`)
 }
 
@@ -50,14 +50,14 @@ export const delFaultCaseApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/faultCase/importTemplate', {})
+  return http.downloadPost('/manage/faultCase/importTemplate', {})
 }
 
 /**
  * @name 导入数据
  * @returns returns
  */
-export const importDataApi = (data: any) => {
+export const importFaultCaseDataApi = (data: any) => {
   return http.post('/manage/faultCase/importData', data)
 }
 
@@ -65,6 +65,6 @@ export const importDataApi = (data: any) => {
  * @name 导出数据
  * @returns returns
  */
-export const exportApi = (data: any) => {
-  return http.download('/manage/faultCase/export', data)
+export const exportFaultCaseApi = (data: any) => {
+  return http.downloadPost('/manage/faultCase/export', data)
 }

+ 3 - 3
src/api/modules/manage/feedbackRawData.ts

@@ -41,7 +41,7 @@ export const updateFeedbackRawDataApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delFeedbackRawDataApi = ({ id }: { id: any }) => {
+export const delFeedbackRawDataApi = (id: any) => {
   return http.delete<any>(`/manage/feedbackRawData/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delFeedbackRawDataApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/feedbackRawData/importTemplate', {})
+  return http.downloadPost('/manage/feedbackRawData/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/feedbackRawData/export', data)
+  return http.downloadPost('/manage/feedbackRawData/export', data)
 }

+ 3 - 3
src/api/modules/manage/fleet.ts

@@ -41,7 +41,7 @@ export const updateFleetApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delFleetApi = ({ id }: { id: any }) => {
+export const delFleetApi = (id: any) => {
   return http.delete<any>(`/manage/fleet/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delFleetApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/fleet/importTemplate', {})
+  return http.downloadPost('/manage/fleet/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/fleet/export', data)
+  return http.downloadPost('/manage/fleet/export', data)
 }

+ 3 - 3
src/api/modules/manage/forecastModel.ts

@@ -41,7 +41,7 @@ export const updateForecastModelApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delForecastModelApi = ({ id }: { id: any }) => {
+export const delForecastModelApi = (id: any) => {
   return http.delete<any>(`/manage/forecastModel/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delForecastModelApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/forecastModel/importTemplate', {})
+  return http.downloadPost('/manage/forecastModel/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/forecastModel/export', data)
+  return http.downloadPost('/manage/forecastModel/export', data)
 }

+ 3 - 3
src/api/modules/manage/forecastResult.ts

@@ -41,7 +41,7 @@ export const updateForecastResultApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delForecastResultApi = ({ id }: { id: any }) => {
+export const delForecastResultApi = (id: any) => {
   return http.delete<any>(`/manage/forecastResult/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delForecastResultApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/forecastResult/importTemplate', {})
+  return http.downloadPost('/manage/forecastResult/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/forecastResult/export', data)
+  return http.downloadPost('/manage/forecastResult/export', data)
 }

+ 3 - 3
src/api/modules/manage/groundDiagnosisModel.ts

@@ -41,7 +41,7 @@ export const updateGroundDiagnosisModelApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delGroundDiagnosisModelApi = ({ id }: { id: any }) => {
+export const delGroundDiagnosisModelApi = (id: any) => {
   return http.delete<any>(`/manage/groundDiagnosisModel/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delGroundDiagnosisModelApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/groundDiagnosisModel/importTemplate', {})
+  return http.downloadPost('/manage/groundDiagnosisModel/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/groundDiagnosisModel/export', data)
+  return http.downloadPost('/manage/groundDiagnosisModel/export', data)
 }

+ 3 - 3
src/api/modules/manage/instructionInfo.ts

@@ -41,7 +41,7 @@ export const updateInstructionInfoApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delInstructionInfoApi = ({ id }: { id: any }) => {
+export const delInstructionInfoApi = (id: any) => {
   return http.delete<any>(`/manage/instructionInfo/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delInstructionInfoApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/instructionInfo/importTemplate', {})
+  return http.downloadPost('/manage/instructionInfo/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/instructionInfo/export', data)
+  return http.downloadPost('/manage/instructionInfo/export', data)
 }

+ 3 - 3
src/api/modules/manage/lifePartConfig.ts

@@ -41,7 +41,7 @@ export const updateLifePartConfigApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delLifePartConfigApi = ({ id }: { id: any }) => {
+export const delLifePartConfigApi = (id: any) => {
   return http.delete<any>(`/manage/lifePartConfig/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delLifePartConfigApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/lifePartConfig/importTemplate', {})
+  return http.downloadPost('/manage/lifePartConfig/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/lifePartConfig/export', data)
+  return http.downloadPost('/manage/lifePartConfig/export', data)
 }

+ 3 - 3
src/api/modules/manage/maintenance.ts

@@ -41,7 +41,7 @@ export const updateMaintenanceApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delMaintenanceApi = ({ id }: { id: any }) => {
+export const delMaintenanceApi = (id: any) => {
   return http.delete<any>(`/manage/maintenance/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delMaintenanceApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/maintenance/importTemplate', {})
+  return http.downloadPost('/manage/maintenance/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/maintenance/export', data)
+  return http.downloadPost('/manage/maintenance/export', data)
 }

+ 3 - 3
src/api/modules/manage/maintenanceTestControl.ts

@@ -41,7 +41,7 @@ export const updateMaintenanceTestControlApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delMaintenanceTestControlApi = ({ id }: { id: any }) => {
+export const delMaintenanceTestControlApi = (id: any) => {
   return http.delete<any>(`/manage/maintenanceTestControl/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delMaintenanceTestControlApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/maintenanceTestControl/importTemplate', {})
+  return http.downloadPost('/manage/maintenanceTestControl/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/maintenanceTestControl/export', data)
+  return http.downloadPost('/manage/maintenanceTestControl/export', data)
 }

+ 3 - 3
src/api/modules/manage/modelInfo.ts

@@ -41,7 +41,7 @@ export const updateModelInfoApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delModelInfoApi = ({ id }: { id: any }) => {
+export const delModelInfoApi = (id: any) => {
   return http.delete<any>(`/manage/modelInfo/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delModelInfoApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/modelInfo/importTemplate', {})
+  return http.downloadPost('/manage/modelInfo/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/modelInfo/export', data)
+  return http.downloadPost('/manage/modelInfo/export', data)
 }

+ 3 - 3
src/api/modules/manage/monitorParameterConfig.ts

@@ -41,7 +41,7 @@ export const updateMonitorParameterConfigApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delMonitorParameterConfigApi = ({ id }: { id: any }) => {
+export const delMonitorParameterConfigApi = (id: any) => {
   return http.delete<any>(`/manage/monitorParameterConfig/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delMonitorParameterConfigApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/monitorParameterConfig/importTemplate', {})
+  return http.downloadPost('/manage/monitorParameterConfig/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/monitorParameterConfig/export', data)
+  return http.downloadPost('/manage/monitorParameterConfig/export', data)
 }

+ 3 - 3
src/api/modules/manage/orderConfig.ts

@@ -49,7 +49,7 @@ export const updateOrderConfigApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delOrderConfigApi = ({ id }: { id: any }) => {
+export const delOrderConfigApi = (id: any) => {
   return http.delete<any>(`/manage/orderConfig/${id}`)
 }
 
@@ -58,7 +58,7 @@ export const delOrderConfigApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/orderConfig/importTemplate', {})
+  return http.downloadPost('/manage/orderConfig/importTemplate', {})
 }
 
 /**
@@ -74,7 +74,7 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/orderConfig/export', data)
+  return http.downloadPost('/manage/orderConfig/export', data)
 }
 
 /**

+ 3 - 3
src/api/modules/manage/orderInfo.ts

@@ -41,7 +41,7 @@ export const updateOrderInfoApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delOrderInfoApi = ({ id }: { id: any }) => {
+export const delOrderInfoApi = (id: any) => {
   return http.delete<any>(`/manage/orderInfo/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delOrderInfoApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/orderInfo/importTemplate', {})
+  return http.downloadPost('/manage/orderInfo/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/orderInfo/export', data)
+  return http.downloadPost('/manage/orderInfo/export', data)
 }

+ 3 - 3
src/api/modules/manage/performanceMonitorModel.ts

@@ -41,7 +41,7 @@ export const updatePerformanceMonitorModelApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delPerformanceMonitorModelApi = ({ id }: { id: any }) => {
+export const delPerformanceMonitorModelApi = (id: any) => {
   return http.delete<any>(`/manage/performanceMonitorModel/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delPerformanceMonitorModelApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/performanceMonitorModel/importTemplate', {})
+  return http.downloadPost('/manage/performanceMonitorModel/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/performanceMonitorModel/export', data)
+  return http.downloadPost('/manage/performanceMonitorModel/export', data)
 }

+ 3 - 3
src/api/modules/manage/preHandleResult.ts

@@ -41,7 +41,7 @@ export const updatePreHandleResultApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delPreHandleResultApi = ({ id }: { id: any }) => {
+export const delPreHandleResultApi = (id: any) => {
   return http.delete<any>(`/manage/preHandleResult/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delPreHandleResultApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/preHandleResult/importTemplate', {})
+  return http.downloadPost('/manage/preHandleResult/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/preHandleResult/export', data)
+  return http.downloadPost('/manage/preHandleResult/export', data)
 }

+ 3 - 3
src/api/modules/manage/product.ts

@@ -41,7 +41,7 @@ export const updateProductApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delProductApi = ({ id }: { id: any }) => {
+export const delProductApi = (id: any) => {
   return http.delete<any>(`/manage/product/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delProductApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/product/importTemplate', {})
+  return http.downloadPost('/manage/product/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/product/export', data)
+  return http.downloadPost('/manage/product/export', data)
 }

+ 3 - 3
src/api/modules/manage/softwareConfig.ts

@@ -41,7 +41,7 @@ export const updateSoftwareConfigApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delSoftwareConfigApi = ({ id }: { id: any }) => {
+export const delSoftwareConfigApi = (id: any) => {
   return http.delete<any>(`/manage/softwareConfig/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delSoftwareConfigApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/softwareConfig/importTemplate', {})
+  return http.downloadPost('/manage/softwareConfig/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/softwareConfig/export', data)
+  return http.downloadPost('/manage/softwareConfig/export', data)
 }

+ 3 - 3
src/api/modules/manage/sortie.ts

@@ -49,7 +49,7 @@ export const updateSortieApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delSortieApi = ({ id }: { id: any }) => {
+export const delSortieApi = (id: any) => {
   return http.delete<any>(`/manage/sortie/${id}`)
 }
 
@@ -58,7 +58,7 @@ export const delSortieApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/sortie/importTemplate', {})
+  return http.downloadPost('/manage/sortie/importTemplate', {})
 }
 
 /**
@@ -74,7 +74,7 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/sortie/export', data)
+  return http.downloadPost('/manage/sortie/export', data)
 }
 
 /**

+ 27 - 3
src/api/modules/manage/sortieParameter.ts

@@ -86,7 +86,7 @@ export const updateSortieParameterApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delSortieParameterApi = ({ id }: { id: any }) => {
+export const delSortieParameterApi = (id: any) => {
   return http.delete<any>(`/manage/sortieParameter/${id}`)
 }
 
@@ -95,7 +95,7 @@ export const delSortieParameterApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/manage/sortieParameter/importTemplate', {})
+  return http.downloadPost('/manage/sortieParameter/importTemplate', {})
 }
 
 /**
@@ -111,7 +111,7 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/manage/sortieParameter/export', data)
+  return http.downloadPost('/manage/sortieParameter/export', data)
 }
 
 /**
@@ -140,6 +140,30 @@ export const getSortieParamsApi = (id: any) => {
 export const exeModelApi = (data: any) => {
   return http.post<any>('/model_api/execute', data, { loading: false })
 }
+/**
+ * @name 执行模型
+ * @param data data
+ * @returns returns
+ */
+export const exeModelOrderApi = (data: any) => {
+  return http.post<any>('/model_api/execute/order', data, { loading: false })
+}
+/**
+ * @name 执行模型
+ * @param data data
+ * @returns returns
+ */
+export const exeModelTestabilityApi = (data: any) => {
+  return http.post<any>('/model_api/execute/testability', data, { loading: false })
+}
+/**
+ * @name 执行模型
+ * @param data data
+ * @returns returns
+ */
+export const exeModelDiagnoseApi = (data: any) => {
+  return http.post<any>('/model_api/execute/diagnose', data, { loading: false })
+}
 
 /**
  * @name 查询警告清单,根据架次号

+ 2 - 2
src/api/modules/monitor/logininfor.ts

@@ -50,7 +50,7 @@ export const delLogininforApi = ({ infoId }: { infoId: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/monitor/logininfor/importTemplate', {})
+  return http.downloadPost('/monitor/logininfor/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/monitor/logininfor/export', data)
+  return http.downloadPost('/monitor/logininfor/export', data)
 }

+ 2 - 2
src/api/modules/monitor/operlog.ts

@@ -50,7 +50,7 @@ export const delOperlogApi = ({ operId }: { operId: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/monitor/operlog/importTemplate', {})
+  return http.downloadPost('/monitor/operlog/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/monitor/operlog/export', data)
+  return http.downloadPost('/monitor/operlog/export', data)
 }

+ 2 - 2
src/api/modules/system/dept.ts

@@ -50,7 +50,7 @@ export const delDeptApi = (deptId: any) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/system/dept/importTemplate', {})
+  return http.downloadPost('/system/dept/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/dept/export', data)
+  return http.downloadPost('/system/dept/export', data)
 }

+ 3 - 3
src/api/modules/system/dict.ts

@@ -41,7 +41,7 @@ export const updateDictApi = (data: any) => {
  * @param dictId dictId
  * @returns returns
  */
-export const delDictApi = ({ id }: { id: any }) => {
+export const delDictApi = (id: any) => {
   return http.delete<any>(`/system/dict/type/${id}`)
 }
 
@@ -50,7 +50,7 @@ export const delDictApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/system/dict/type/importTemplate', {})
+  return http.downloadPost('/system/dict/type/importTemplate', {})
 }
 
 /**
@@ -66,7 +66,7 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/dict/type/export', data)
+  return http.downloadPost('/system/dict/type/export', data)
 }
 
 /**

+ 2 - 2
src/api/modules/system/dictData.ts

@@ -50,7 +50,7 @@ export const updateDataApi = (data: any) => {
  * @param dictCode dictCode
  * @returns returns
  */
-export const delDataApi = ({ id }: { id: any }) => {
+export const delDataApi = (id: any) => {
   return http.delete<any>(`/system/dict/data/${id}`)
 }
 
@@ -59,5 +59,5 @@ export const delDataApi = ({ id }: { id: any }) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/dict/data/export', data)
+  return http.downloadPost('/system/dict/data/export', data)
 }

+ 3 - 3
src/api/modules/system/menu.ts

@@ -55,7 +55,7 @@ export const delMenuApi = (menuId: any) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/system/menu/importTemplate', {})
+  return http.downloadPost('/system/menu/importTemplate', {})
 }
 
 /**
@@ -71,14 +71,14 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/menu/export', data)
+  return http.downloadPost('/system/menu/export', data)
 }
 
 /**
  * @name 查询菜单下拉树结构
  * @returns returns
  */
-export const treeselectApi = () => {
+export const treeSelectApi = () => {
   return http.get<any>(`/system/menu/treeselect`)
 }
 

+ 2 - 2
src/api/modules/system/post.ts

@@ -50,7 +50,7 @@ export const delPostApi = ({ postId }: { postId: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/system/post/importTemplate', {})
+  return http.downloadPost('/system/post/importTemplate', {})
 }
 
 /**
@@ -66,5 +66,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/post/export', data)
+  return http.downloadPost('/system/post/export', data)
 }

+ 84 - 3
src/api/modules/system/role.ts

@@ -9,6 +9,24 @@ export const listRoleApi = (query: any) => {
   return http.get<any>('/system/role/list', query, { loading: true })
 }
 
+/**
+ * @name 根据角色ID查询部门树结构
+ * @param roleId 角色Id
+ * @returns 返回列表
+ */
+export const deptTreeSelectApi = (roleId: any) => {
+  return http.get<any>(`/system/role/deptTree/${roleId}`)
+}
+
+/**
+ * @name 根据角色ID查询菜单下拉树结构
+ * @param roleId 角色Id
+ * @returns 返回列表
+ */
+export const roleMenuTreeSelectApi = (roleId: any) => {
+  return http.get<any>(`/system/menu/roleMenuTreeselect/${roleId}`)
+}
+
 /**
  * @name 查询角色信息详细
  * @param roleId roleId
@@ -36,12 +54,30 @@ export const updateRoleApi = (data: any) => {
   return http.put<any>('/system/role', data, { loading: false })
 }
 
+/**
+ * @name 角色数据权限
+ * @param data data
+ * @returns returns
+ */
+export const dataScopeApi = (data: any) => {
+  return http.put<any>('/system/role/dataScope', data, { loading: false })
+}
+
+/**
+ * @name 修改角色状态
+ * @param data data
+ * @returns returns
+ */
+export const changeStatusApi = (data: any) => {
+  return http.put<any>('/system/role/changeStatus', data, { loading: false })
+}
+
 /**
  * @name 删除角色信息
  * @param roleId roleId
  * @returns returns
  */
-export const delRoleApi = ({ roleId }: { roleId: any }) => {
+export const delRoleApi = (roleId: any) => {
   return http.delete<any>(`/system/role/${roleId}`)
 }
 
@@ -50,7 +86,7 @@ export const delRoleApi = ({ roleId }: { roleId: any }) => {
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/system/role/importTemplate', {})
+  return http.downloadPost('/system/role/importTemplate', {})
 }
 
 /**
@@ -66,5 +102,50 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/role/export', data)
+  return http.downloadPost('/system/role/export', data)
+}
+
+/**
+ * @name 查询角色已授权用户列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const allocatedUserListApi = (query: any) => {
+  return http.get<any>(`/system/role/authUser/allocatedList`, query, { loading: true })
+}
+
+/**
+ * @name 查询角色未授权用户列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const unallocatedUserListApi = (query: any) => {
+  return http.get<any>(`/system/role/authUser/unallocatedList`, query, { loading: true })
+}
+
+/**
+ * @name 取消用户授权角色
+ * @param data data
+ * @returns returns
+ */
+export const authUserCancelApi = (data: any) => {
+  return http.put<any>('/system/role/authUser/cancel', data, { loading: false })
+}
+
+/**
+ * @name 批量取消用户授权角色
+ * @param data data
+ * @returns returns
+ */
+export const authUserCancelAllApi = (data: any) => {
+  return http.put<any>('/system/role/authUser/cancelAll', data, { loading: false })
+}
+
+/**
+ * @name 授权用户选择
+ * @param data data
+ * @returns returns
+ */
+export const authUserSelectAllApi = (data: any) => {
+  return http.put<any>('/system/role/authUser/selectAll', data, { loading: false })
 }

+ 12 - 2
src/api/modules/system/user.ts

@@ -61,12 +61,22 @@ export const changeUserStatus = (data: any) => {
   return http.put<any>('/system/user/changeStatus', data, { loading: false })
 }
 
+/**
+ * @name 用户密码重置
+ * @param userId userId
+ * @param status status
+ * @returns returns
+ */
+export const resetUserPwdApi = (data: any) => {
+  return http.put<any>('/system/user/resetPwd', data, { loading: false })
+}
+
 /**
  * @name 下载模板
  * @returns returns
  */
 export const importTemplateApi = () => {
-  return http.download('/system/user/importTemplate', {})
+  return http.downloadPost('/system/user/importTemplate', {})
 }
 
 /**
@@ -82,5 +92,5 @@ export const importDataApi = (data: any) => {
  * @returns returns
  */
 export const exportApi = (data: any) => {
-  return http.download('/system/user/export', data)
+  return http.downloadPost('/system/user/export', data)
 }

+ 95 - 0
src/api/modules/task/assignment.ts

@@ -0,0 +1,95 @@
+import http from '@/api'
+import { DB } from '@/api/config/servicePort'
+/**
+ * @name 查询数据库链接列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const listAssignmentApi = (query: any) => {
+  return http.post<any[]>(`${DB}/dbswitch/admin/api/v1/assignment/list`, query, { loading: true })
+}
+
+/**
+ * @name 查询详细
+ * @param id id
+ * @returns returns
+ */
+export const getAssignmentApi = (id: any) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/assignment/detail/id/${id}`)
+}
+
+/**
+ * @name 测试数据库连接
+ * @param id id
+ * @returns returns
+ */
+export const testApi = (id: string | number) => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/test/${id}`)
+}
+
+/**
+ * @name 获取连接名称
+ * @returns returns
+ */
+export const getNameListApi = () => {
+  return http.get<any>(`${DB}/dbswitch/admin/api/v1/connection/list/name`)
+}
+
+/**
+ * @name 新增
+ * @param data data
+ * @returns returns
+ */
+export const addConnectionApi = (data: any) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/assignment/create`, data)
+}
+
+/**
+ * @name 发布
+ * @param id id
+ * @returns returns
+ */
+export const publishApi = (id: string | number) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/assignment/deploy?ids=${id}`)
+}
+/**
+ * @name 下线
+ * @param id id
+ * @returns returns
+ */
+export const retireApi = (id: string | number) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/assignment/retire?ids=${id}`)
+}
+/**
+ * @name 执行
+ * @param data data
+ * @returns returns
+ */
+export const runApi = (id: string | number) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/assignment/run?ids=${id}`)
+}
+/**
+ * @name 预览
+ * @param data data
+ * @returns returns
+ */
+export const previewApi = (data: any) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/mapper/preview/table`, data)
+}
+/**
+ * @name 预览
+ * @param data data
+ * @returns returns
+ */
+export const previewColumnApi = (data: any) => {
+  return http.post<any>(`${DB}/dbswitch/admin/api/v1/mapper/preview/column`, data)
+}
+
+/**
+ * @name 删除
+ * @param id id
+ * @returns returns
+ */
+export const delAssignmentApi = (id: string | number | Array<string | number>) => {
+  return http.delete<any>(`${DB}/dbswitch/admin/api/v1/assignment/delete/${id}`)
+}

+ 1 - 1
src/api/modules/tool/gen.ts

@@ -87,5 +87,5 @@ export const synchDbApi = (tableName: any) => {
  * @returns returns
  */
 export const batchGenCodeApi = (tableId: any) => {
-  return http.get<any>(`/tool/gen/batchGenCode?tables=${tableId}`)
+  return http.downloadGet(`/tool/gen/batchGenCode?tables=${tableId}`)
 }

+ 0 - 71
src/api/modules/user copy.ts

@@ -1,71 +0,0 @@
-import { ResPage, User } from '@/api/interface/index'
-import { PORT1 } from '@/api/config/servicePort'
-import http from '@/api'
-
-/**
- * @name 用户管理模块
- */
-// 获取用户列表
-export const getUserList = (params: User.ReqUserParams) => {
-  return http.post<ResPage<User.ResUserList>>(PORT1 + `/user/list`, params)
-}
-
-// 获取树形用户列表
-export const getUserTreeList = (params: User.ReqUserParams) => {
-  return http.post<ResPage<User.ResUserList>>(PORT1 + `/user/tree/list`, params)
-}
-
-// 新增用户
-export const addUser = (params: { id: string }) => {
-  return http.post(PORT1 + `/user/add`, params)
-}
-
-// 批量添加用户
-export const BatchAddUser = (params: FormData) => {
-  return http.post(PORT1 + `/user/import`, params)
-}
-
-// 编辑用户
-export const editUser = (params: { id: string }) => {
-  return http.post(PORT1 + `/user/edit`, params)
-}
-
-// 删除用户
-export const deleteUser = (params: { id: string[] }) => {
-  return http.post(PORT1 + `/user/delete`, params)
-}
-
-// 切换用户状态
-export const changeUserStatus = (params: { id: string; status: number }) => {
-  return http.post(PORT1 + `/user/change`, params)
-}
-
-// 重置用户密码
-export const resetUserPassWord = (params: { id: string }) => {
-  return http.post(PORT1 + `/user/rest_password`, params)
-}
-
-// 导出用户数据
-export const exportUserInfo = (params: User.ReqUserParams) => {
-  return http.download(PORT1 + `/user/export`, params)
-}
-
-// 获取用户状态字典
-export const getUserStatus = () => {
-  return http.get<User.ResStatus[]>(PORT1 + `/user/status`)
-}
-
-// 获取用户性别字典
-export const getUserGender = () => {
-  return http.get<User.ResGender[]>(PORT1 + `/user/gender`)
-}
-
-// 获取用户部门列表
-export const getUserDepartment = () => {
-  return http.get<User.ResDepartment[]>(PORT1 + `/user/department`, {}, { cancel: false })
-}
-
-// 获取用户角色字典
-export const getUserRole = () => {
-  return http.get<User.ResRole[]>(PORT1 + `/user/role`)
-}

+ 0 - 8
src/assets/json/authButtonList.json

@@ -1,8 +0,0 @@
-{
-  "code": 200,
-  "data": {
-    "useProTable": ["add", "batchAdd", "export", "batchDelete", "status"],
-    "authButton": ["add", "edit", "delete", "import", "export"]
-  },
-  "msg": "成功"
-}

+ 0 - 1045
src/assets/json/authMenuList.json

@@ -1,1045 +0,0 @@
-{
-  "code": 200,
-  "data": [
-    {
-      "path": "/index",
-      "name": "home",
-      "component": "/index",
-      "hidden": false,
-      "meta": {
-        "icon": "HomeFilled",
-        "title": "首页",
-        "link": "",
-        "full": false,
-        "affix": true,
-        "noCache": true
-      }
-    },
-    {
-      "path": "/dataScreen",
-      "name": "dataScreen",
-      "component": "/dataScreen/index",
-      "hidden": false,
-      "meta": {
-        "icon": "Histogram",
-        "title": "数据大屏",
-        "link": "",
-        "full": true,
-        "affix": false,
-        "noCache": true
-      }
-    },
-    {
-      "path": "/demo",
-      "name": "demo",
-      "component": "/manage/demo/index",
-      "hidden": false,
-      "meta": {
-        "icon": "MessageBox",
-        "title": "测试",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      }
-    },
-    {
-      "path": "/proTable",
-      "name": "proTable",
-      "redirect": "/proTable/useProTable",
-      "hidden": false,
-      "meta": {
-        "icon": "MessageBox",
-        "title": "超级表格",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/proTable/useProTable",
-          "name": "useProTable",
-          "component": "/proTable/useProTable/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "使用 ProTable",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          },
-          "children": [
-            {
-              "path": "/proTable/useProTable/detail/:id",
-              "name": "useProTableDetail",
-              "component": "/proTable/useProTable/detail",
-              "hidden": true,
-              "meta": {
-                "icon": "Menu",
-                "title": "ProTable 详情",
-                "activeMenu": "/proTable/useProTable",
-                "link": "",
-                "full": false,
-                "affix": false,
-                "noCache": true
-              }
-            }
-          ]
-        },
-        {
-          "path": "/proTable/useTreeFilter",
-          "name": "useTreeFilter",
-          "component": "/proTable/useTreeFilter/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "使用 TreeFilter",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/proTable/useTreeFilter/detail/:id",
-          "name": "useTreeFilterDetail",
-          "component": "/proTable/useTreeFilter/detail",
-          "hidden": true,
-          "meta": {
-            "icon": "Menu",
-            "title": "TreeFilter 详情",
-            "activeMenu": "/proTable/useTreeFilter",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/proTable/useSelectFilter",
-          "name": "useSelectFilter",
-          "component": "/proTable/useSelectFilter/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "使用 SelectFilter",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/proTable/treeProTable",
-          "name": "treeProTable",
-          "component": "/proTable/treeProTable/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "树形 ProTable",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/proTable/complexProTable",
-          "name": "complexProTable",
-          "component": "/proTable/complexProTable/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "复杂 ProTable",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/proTable/document",
-          "name": "proTableDocument",
-          "component": "/proTable/document/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "ProTable 文档",
-            "link": "https://juejin.cn/post/7166068828202336263/#heading-14",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/auth",
-      "name": "auth",
-      "redirect": "/auth/menu",
-      "hidden": false,
-      "meta": {
-        "icon": "Lock",
-        "title": "权限管理",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/auth/menu",
-          "name": "authMenu",
-          "component": "/auth/menu/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "菜单权限",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/auth/button",
-          "name": "authButton",
-          "component": "/auth/button/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "按钮权限",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/assembly",
-      "name": "assembly",
-      "redirect": "/assembly/guide",
-      "hidden": false,
-      "meta": {
-        "icon": "Briefcase",
-        "title": "常用组件",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/assembly/guide",
-          "name": "guide",
-          "component": "/assembly/guide/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "引导页",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/tabs",
-          "name": "tabs",
-          "component": "/assembly/tabs/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "标签页操作",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          },
-          "children": [
-            {
-              "path": "/assembly/tabs/detail/:id",
-              "name": "tabsDetail",
-              "component": "/assembly/tabs/detail",
-              "hidden": true,
-              "meta": {
-                "icon": "Menu",
-                "title": "Tab 详情",
-                "activeMenu": "/assembly/tabs",
-                "link": "",
-                "full": false,
-                "affix": false,
-                "noCache": true
-              }
-            }
-          ]
-        },
-        {
-          "path": "/assembly/selectIcon",
-          "name": "selectIcon",
-          "component": "/assembly/selectIcon/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "图标选择器",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/selectFilter",
-          "name": "selectFilter",
-          "component": "/assembly/selectFilter/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "分类筛选器",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/treeFilter",
-          "name": "treeFilter",
-          "component": "/assembly/treeFilter/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "树形筛选器",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/svgIcon",
-          "name": "svgIcon",
-          "component": "/assembly/svgIcon/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "SVG 图标",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/uploadFile",
-          "name": "uploadFile",
-          "component": "/assembly/uploadFile/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "文件上传",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/batchImport",
-          "name": "batchImport",
-          "component": "/assembly/batchImport/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "批量添加数据",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/wangEditor",
-          "name": "wangEditor",
-          "component": "/assembly/wangEditor/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "富文本编辑器",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/assembly/draggable",
-          "name": "draggable",
-          "component": "/assembly/draggable/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "拖拽组件",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/dashboard",
-      "name": "dashboard",
-      "redirect": "/dashboard/dataVisualize",
-      "hidden": false,
-      "meta": {
-        "icon": "Odometer",
-        "title": "Dashboard",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/dashboard/dataVisualize",
-          "name": "dataVisualize",
-          "component": "/dashboard/dataVisualize/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "数据可视化",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/form",
-      "name": "form",
-      "redirect": "/form/proForm",
-      "hidden": false,
-      "meta": {
-        "icon": "Tickets",
-        "title": "表单 Form",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/form/proForm",
-          "name": "proForm",
-          "component": "/form/proForm/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "超级 Form",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/form/basicForm",
-          "name": "basicForm",
-          "component": "/form/basicForm/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "基础 Form",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/form/validateForm",
-          "name": "validateForm",
-          "component": "/form/validateForm/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "校验 Form",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/form/dynamicForm",
-          "name": "dynamicForm",
-          "component": "/form/dynamicForm/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "动态 Form",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/echarts",
-      "name": "echarts",
-      "redirect": "/echarts/waterChart",
-      "hidden": false,
-      "meta": {
-        "icon": "TrendCharts",
-        "title": "ECharts",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/echarts/waterChart",
-          "name": "waterChart",
-          "component": "/echarts/waterChart/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "水型图",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/echarts/columnChart",
-          "name": "columnChart",
-          "component": "/echarts/columnChart/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "柱状图",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/echarts/lineChart",
-          "name": "lineChart",
-          "component": "/echarts/lineChart/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "折线图",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/echarts/pieChart",
-          "name": "pieChart",
-          "component": "/echarts/pieChart/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "饼图",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/echarts/radarChart",
-          "name": "radarChart",
-          "component": "/echarts/radarChart/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "雷达图",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/echarts/nestedChart",
-          "name": "nestedChart",
-          "component": "/echarts/nestedChart/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "嵌套环形图",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/directives",
-      "name": "directives",
-      "redirect": "/directives/copyDirect",
-      "hidden": false,
-      "meta": {
-        "icon": "Stamp",
-        "title": "自定义指令",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/directives/copyDirect",
-          "name": "copyDirect",
-          "component": "/directives/copyDirect/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "复制指令",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/directives/watermarkDirect",
-          "name": "watermarkDirect",
-          "component": "/directives/watermarkDirect/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "水印指令",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/directives/dragDirect",
-          "name": "dragDirect",
-          "component": "/directives/dragDirect/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "拖拽指令",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/directives/debounceDirect",
-          "name": "debounceDirect",
-          "component": "/directives/debounceDirect/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "防抖指令",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/directives/throttleDirect",
-          "name": "throttleDirect",
-          "component": "/directives/throttleDirect/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "节流指令",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/directives/longpressDirect",
-          "name": "longpressDirect",
-          "component": "/directives/longpressDirect/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "长按指令",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/menu",
-      "name": "menu",
-      "redirect": "/menu/menu1",
-      "hidden": false,
-      "meta": {
-        "icon": "List",
-        "title": "菜单嵌套",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/menu/menu1",
-          "name": "menu1",
-          "component": "/menu/menu1/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "菜单1",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/menu/menu2",
-          "name": "menu2",
-          "redirect": "/menu/menu2/menu21",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "菜单2",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          },
-          "children": [
-            {
-              "path": "/menu/menu2/menu21",
-              "name": "menu21",
-              "component": "/menu/menu2/menu21/index",
-              "hidden": false,
-              "meta": {
-                "icon": "Menu",
-                "title": "菜单2-1",
-                "link": "",
-                "full": false,
-                "affix": false,
-                "noCache": true
-              }
-            },
-            {
-              "path": "/menu/menu2/menu22",
-              "name": "menu22",
-              "redirect": "/menu/menu2/menu22/menu221",
-              "hidden": false,
-              "meta": {
-                "icon": "Menu",
-                "title": "菜单2-2",
-                "link": "",
-                "full": false,
-                "affix": false,
-                "noCache": true
-              },
-              "children": [
-                {
-                  "path": "/menu/menu2/menu22/menu221",
-                  "name": "menu221",
-                  "component": "/menu/menu2/menu22/menu221/index",
-                  "hidden": false,
-                  "meta": {
-                    "icon": "Menu",
-                    "title": "菜单2-2-1",
-                    "link": "",
-                    "full": false,
-                    "affix": false,
-                    "noCache": true
-                  }
-                },
-                {
-                  "path": "/menu/menu2/menu22/menu222",
-                  "name": "menu222",
-                  "component": "/menu/menu2/menu22/menu222/index",
-                  "hidden": false,
-                  "meta": {
-                    "icon": "Menu",
-                    "title": "菜单2-2-2",
-                    "link": "",
-                    "full": false,
-                    "affix": false,
-                    "noCache": true
-                  }
-                }
-              ]
-            },
-            {
-              "path": "/menu/menu2/menu23",
-              "name": "menu23",
-              "component": "/menu/menu2/menu23/index",
-              "hidden": false,
-              "meta": {
-                "icon": "Menu",
-                "title": "菜单2-3",
-                "link": "",
-                "full": false,
-                "affix": false,
-                "noCache": true
-              }
-            }
-          ]
-        },
-        {
-          "path": "/menu/menu3",
-          "name": "menu3",
-          "component": "/menu/menu3/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "菜单3",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/system",
-      "name": "system",
-      "redirect": "/system/accountManage",
-      "hidden": false,
-      "meta": {
-        "icon": "Tools",
-        "title": "系统管理",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/system/accountManage",
-          "name": "accountManage",
-          "component": "/system/accountManage/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "账号管理",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/system/roleManage",
-          "name": "roleManage",
-          "component": "/system/roleManage/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "角色管理",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/system/menuMange",
-          "name": "menuMange",
-          "component": "/system/menuMange/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "菜单管理",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/system/departmentManage",
-          "name": "departmentManage",
-          "component": "/system/departmentManage/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "部门管理",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/system/dictManage",
-          "name": "dictManage",
-          "component": "/system/dictManage/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "字典管理",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/system/timingTask",
-          "name": "timingTask",
-          "component": "/system/timingTask/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "定时任务",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/system/systemLog",
-          "name": "systemLog",
-          "component": "/system/systemLog/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "系统日志",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/link",
-      "name": "link",
-      "redirect": "/link/bing",
-      "hidden": false,
-      "meta": {
-        "icon": "Paperclip",
-        "title": "外部链接",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      },
-      "children": [
-        {
-          "path": "/link/bing",
-          "name": "bing",
-          "component": "/link/bing/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "Bing 内嵌",
-            "link": "",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/link/gitee",
-          "name": "gitee",
-          "component": "/link/gitee/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "Gitee 仓库",
-            "link": "https://gitee.com/HalseySpicy/Geeker-Admin",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/link/github",
-          "name": "github",
-          "component": "/link/github/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "GitHub 仓库",
-            "link": "https://github.com/HalseySpicy/Geeker-Admin",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/link/docs",
-          "name": "docs",
-          "component": "/link/docs/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "项目文档",
-            "link": "https://docs.spicyboy.cn",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        },
-        {
-          "path": "/link/juejin",
-          "name": "juejin",
-          "component": "/link/juejin/index",
-          "hidden": false,
-          "meta": {
-            "icon": "Menu",
-            "title": "掘金主页",
-            "link": "https://juejin.cn/user/3263814531551816/posts",
-            "full": false,
-            "affix": false,
-            "noCache": true
-          }
-        }
-      ]
-    },
-    {
-      "path": "/about/index",
-      "name": "about",
-      "component": "/about/index",
-      "hidden": false,
-      "meta": {
-        "icon": "InfoFilled",
-        "title": "关于项目",
-        "link": "",
-        "full": false,
-        "affix": false,
-        "noCache": true
-      }
-    }
-  ],
-  "msg": "成功"
-}

BIN
src/assets/mock/Easy-Mock-API.zip


+ 18 - 17
src/components/CustomDialog/index.vue

@@ -8,11 +8,12 @@
     :top="parameter.top"
     draggable
   >
-    <slot name="default" :model="parameter.model"></slot>
+    <slot name="default" :parameter="parameter"></slot>
     <template #footer>
       <span class="dialog-footer">
-        <el-button type="primary" v-if="parameter.isEdit" :loading="butLoading" @click="handleSubmit">确认</el-button>
-        <el-button @click="handleCancel">取消</el-button>
+        <slot name="footer" :parameter="parameter"></slot>
+        <!-- <el-button type="primary" v-if="parameter.isEdit" :loading="butLoading" @click="handleSubmit">确认</el-button>
+        <el-button @click="handleCancel">取消</el-button> -->
       </span>
     </template>
   </el-dialog>
@@ -20,7 +21,6 @@
 
 <script setup lang="ts" name="FormDialog">
 import { ref } from 'vue'
-import { ElMessage } from 'element-plus'
 
 export interface FormParameterProps {
   title: string // 标题
@@ -43,18 +43,18 @@ const parameter = ref<FormParameterProps>({
   api: undefined
 })
 // 提交
-const handleSubmit = () => {
-  butLoading.value = true
-  parameter.value.api!(parameter.value.model).then(res => {
-    if (res.code == 200) {
-      ElMessage.success('操作成功')
-      dialogVisible.value = false
-    } else {
-      console.log('message', res.message)
-    }
-  })
-  butLoading.value = false
-}
+// const handleSubmit = () => {
+//   butLoading.value = true
+//   parameter.value.api!(parameter.value.model).then(res => {
+//     if (res.code == 200) {
+//       ElMessage.success('操作成功')
+//       dialogVisible.value = false
+//     } else {
+//       console.log('message', res.message)
+//     }
+//   })
+//   butLoading.value = false
+// }
 
 // 取消按钮,重置表单,关闭弹框
 const handleCancel = () => {
@@ -70,6 +70,7 @@ const openDialog = (params: FormParameterProps) => {
 }
 
 defineExpose({
-  openDialog
+  openDialog,
+  handleCancel
 })
 </script>

+ 6 - 1
src/components/DialogOld/form.vue

@@ -55,7 +55,10 @@ const proFormRef = ref<InstanceType<typeof ProFrom> | null>(null)
 const handleSubmit = () => {
   const formEl = proFormRef.value?.formRef
   butLoading.value = true
-  if (!formEl) return
+  if (!formEl) {
+    butLoading.value = false
+    return
+  }
   formEl.validate(valid => {
     if (valid) {
       parameter.value.api!(parameter.value.model).then(res => {
@@ -69,6 +72,8 @@ const handleSubmit = () => {
         }
       })
       butLoading.value = false
+    } else {
+      butLoading.value = false
     }
   })
 }

+ 1 - 6
src/components/DictTag/index.vue

@@ -2,12 +2,7 @@
   <div>
     <template v-for="(item, index) in options">
       <template v-if="values.includes(item.value)">
-        <span
-          v-if="item.elTagType == 'default' || item.elTagType == ''"
-          :key="item.value"
-          :index="index"
-          :class="item.elTagClass"
-        >
+        <span v-if="item.elTagType == 'default' || item.elTagType == ''" :key="item.value" :index="index" :class="item.elTagClass">
           {{ item.label }}
         </span>
         <el-tag

+ 1 - 6
src/components/ECharts/config/index.ts

@@ -23,12 +23,7 @@ import type {
   RadarSeriesOption,
   GaugeSeriesOption
 } from 'echarts/charts'
-import type {
-  TitleComponentOption,
-  TooltipComponentOption,
-  GridComponentOption,
-  DatasetComponentOption
-} from 'echarts/components'
+import type { TitleComponentOption, TooltipComponentOption, GridComponentOption, DatasetComponentOption } from 'echarts/components'
 import type { ComposeOption } from 'echarts/core'
 import 'echarts-liquidfill'
 

+ 3 - 7
src/components/ECharts/index.vue

@@ -25,15 +25,11 @@ const props = withDefaults(defineProps<Props>(), {
   resize: true
 })
 
-const echartsStyle = computed(() => {
-  return props.width || props.height
-    ? { height: props.height + 'px', width: props.width + 'px' }
-    : { height: '100%', width: '100%' }
-})
-
 const chartRef = ref<HTMLDivElement | HTMLCanvasElement>()
 const chartInstance = ref<EChartsType>()
-
+const echartsStyle = computed(() => {
+  return props.width || props.height ? { height: props.height + 'px', width: props.width + 'px' } : { height: '100%', width: '100%' }
+})
 const draw = () => {
   if (chartInstance.value) {
     chartInstance.value.setOption(props.option, { notMerge: true })

+ 1 - 1
src/components/FormDialog/index.vue

@@ -42,7 +42,7 @@ const parameter = ref<FormParameterProps>({
   width: 500,
   itemsOptions: [],
   formOptions: {},
-  isEdit: true
+  isEdit: false
 })
 const _options: ComputedRef<ProForm.FormOptions> = computed(() => {
   const form = {

+ 1 - 3
src/components/Grid/components/GridItem.vue

@@ -58,9 +58,7 @@ const style = computed(() => {
     }
   } else {
     return {
-      gridColumn: `span ${span + offset > cols.value ? cols.value : span + offset}/span ${
-        span + offset > cols.value ? cols.value : span + offset
-      }`,
+      gridColumn: `span ${span + offset > cols.value ? cols.value : span + offset}/span ${span + offset > cols.value ? cols.value : span + offset}`,
       marginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : 'unset'
     }
   }

+ 1 - 3
src/components/Highlight/index.vue

@@ -1,7 +1,5 @@
 <template>
-  <pre
-    :class="'hx-scroll ' + lineNumbers"
-  ><code :class="'language-'+ type" v-html="Prism.highlight(code, Prism.languages[type], type)"></code></pre>
+  <pre :class="'hx-scroll ' + lineNumbers"><code :class="'language-'+ type" v-html="Prism.highlight(code, Prism.languages[type], type)"></code></pre>
 </template>
 <script setup lang="ts">
 import { onMounted, computed } from 'vue'

+ 1 - 2
src/components/HighlightDialog/index.vue

@@ -7,8 +7,7 @@
     :width="parameter.width"
     draggable
   >
-    <preview-code v-if="flag" :code="parameter.code" :type="parameter.type" :is-show-line-numbers="parameter.isShowLineNumbers">
-    </preview-code>
+    <preview-code v-if="flag" :code="parameter.code" :type="parameter.type" :is-show-line-numbers="parameter.isShowLineNumbers"> </preview-code>
     <template #footer>
       <span class="dialog-footer">
         <el-button type="primary" v-if="parameter.isEdit" :loading="butLoading">导出</el-button>

+ 2 - 14
src/components/ImportExcel copy/index.vue

@@ -1,12 +1,5 @@
 <template>
-  <el-dialog
-    v-model="dialogVisible"
-    :width="parameter.width"
-    :top="parameter.top"
-    :title="`${parameter.title}`"
-    :destroy-on-close="true"
-    draggable
-  >
+  <el-dialog v-model="dialogVisible" :width="parameter.width" :top="parameter.top" :title="`${parameter.title}`" :destroy-on-close="true" draggable>
     <el-form class="drawer-multiColumn-form" label-width="100px">
       <el-form-item label="文件上传">
         <el-upload
@@ -38,12 +31,7 @@
               </div>
               <div class="el-upload__tip text-center">
                 请上传 .xls , .xlsx 标准格式文件,文件最大为 {{ parameter.fileSize }}M。
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  style="font-size: 12px; vertical-align: baseline"
-                  @click="downloadTemp"
-                >
+                <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="downloadTemp">
                   模板下载
                 </el-link>
               </div>

+ 8 - 20
src/components/ImportExcel/index.vue

@@ -1,12 +1,5 @@
 <template>
-  <el-dialog
-    v-model="dialogVisible"
-    :width="parameter.width"
-    :top="parameter.top"
-    :title="`${parameter.title}`"
-    :destroy-on-close="true"
-    draggable
-  >
+  <el-dialog v-model="dialogVisible" :width="parameter.width" :top="parameter.top" :title="`${parameter.title}`" :destroy-on-close="true" draggable>
     <el-form class="drawer-multiColumn-form" label-width="100px">
       <el-form-item label="文件上传">
         <el-upload
@@ -38,12 +31,7 @@
               </div>
               <div class="el-upload__tip text-center">
                 请上传 .xls , .xlsx 标准格式文件,文件最大为 {{ parameter.fileSize }}M。
-                <el-link
-                  type="primary"
-                  :underline="false"
-                  style="font-size: 12px; vertical-align: baseline"
-                  @click="downloadTemp"
-                >
+                <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="downloadTemp">
                   模板下载
                 </el-link>
               </div>
@@ -90,7 +78,7 @@ const parameter = ref<ExcelParameterProps>({
   width: 500,
   top: '20vh',
   multiple: false,
-  fileSize: 5,
+  fileSize: 500,
   fileType: ['application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
 })
 
@@ -164,11 +152,11 @@ const excelUploadError = () => {
 
 // 上传成功提示
 const excelUploadSuccess = () => {
-  ElNotification({
-    title: '温馨提示',
-    message: `批量添加${parameter.value.title}成功!`,
-    type: 'success'
-  })
+  // ElNotification({
+  //   title: '温馨提示',
+  //   message: `批量添加${parameter.value.title}成功!`,
+  //   type: 'success'
+  // })
 }
 
 defineExpose({

+ 4 - 14
src/components/ProForm/components/Item.vue

@@ -15,26 +15,16 @@
         v-for="(col, index) in itemEnum"
         :key="index"
         :label="col[item.compOptions.labelKey || 'label']"
-        :value="col[item.compOptions.valueKey || 'value']"
+        :value="item.compOptions.valueKey === 'col' ? col : col[item.compOptions.valueKey || 'value']"
       ></component>
     </template>
     <template v-if="item.compOptions.elTagName === 'radio-group'">
-      <component
-        :is="`el-radio`"
-        v-for="(col, index) in itemEnum"
-        :key="index"
-        :label="col[item.compOptions.valueKey || 'value']"
-      >
+      <component :is="`el-radio`" v-for="(col, index) in itemEnum" :key="index" :label="col[item.compOptions.valueKey || 'value']">
         {{ col[item.compOptions.labelKey || 'label'] }}
       </component>
     </template>
     <template v-if="item.compOptions.elTagName === 'radio-button'">
-      <component
-        :is="`el-radio-button`"
-        v-for="(col, index) in itemEnum"
-        :key="index"
-        :label="col[item.compOptions.valueKey || 'value']"
-      >
+      <component :is="`el-radio-button`" v-for="(col, index) in itemEnum" :key="index" :label="col[item.compOptions.valueKey || 'value']">
         {{ col[item.compOptions.labelKey || 'label'] }}
       </component>
     </template>
@@ -63,7 +53,7 @@ const _formModel = computed(() => props.formModel)
 const elTagNameValue = computed(() => {
   const val = props.item.compOptions.elTagName
   if ('radio-button' == val) return `el-radio-group`
-  return `el-${val}` || 'input'
+  return `el-${val || 'input'}`
 })
 // 接收 enumMap (el 为 select-v2 需单独处理 enumData)
 const enumMap = inject('enumMap', ref(new Map()))

+ 32 - 8
src/components/ProForm/index.vue

@@ -2,8 +2,8 @@
   <component :is="'el-form'" v-bind="_formOptions" ref="proFormRef" :model="formModel">
     <el-row :gutter="5">
       <template v-for="item in itemsOptions" :key="item.prop">
-        <el-col :span="item.span || 24" g>
-          <component :is="'el-form-item'" v-bind="item" v-if="show(item.show)">
+        <el-col :span="item.span || 24" g v-if="show(item.show)">
+          <component :is="'el-form-item'" v-bind="item">
             <template #label>
               <el-space :size="4">
                 <span class="label-span">{{ `${item.label}` }}</span>
@@ -14,14 +14,19 @@
                   <i :class="'iconfont icon-yiwen'"></i>
                 </el-tooltip>
               </el-space>
-              <span>{{ `${_formOptions.labelSuffix}` }}</span>
-            </template>
-            <template v-if="item.compOptions.elTagName === 'slot'">
-              <slot :name="item.prop" :form-model="formModel"></slot>
+              <span v-if="item.hideLabelSuffix">{{ `${item.hideLabelSuffix ? '' : ':'}` }}</span>
+              <span v-else>{{ `${_formOptions.labelSuffix}` }}</span>
             </template>
+            <!-- <template v-if="item.compOptions.elTagName === 'slot'"> -->
+            <slot :name="item.prop" :form-model="formModel"></slot>
+            <slot name="default" :form-model="formModel"></slot>
+            <!-- </template> -->
             <template v-if="item.compOptions.elTagName === 'icon'">
               <SelectIcon v-model:icon-value="formModel[item.prop]" />
             </template>
+            <template v-else-if="item.compOptions.elTagName === 'file-upload'">
+              <FileUpload v-model:model-value="formModel[item.prop]" />
+            </template>
             <Item v-else :item="item" :form-model="formModel" />
           </component>
         </el-col>
@@ -43,15 +48,17 @@
 
 <script setup lang="ts" name="ProForm">
 import { ref, computed, ComputedRef, watch, unref, provide } from 'vue'
-import type { FormInstance } from 'element-plus'
+import { ElMessage, type FormInstance } from 'element-plus'
 import Item from '@/components/ProForm/components/Item.vue'
 import SelectIcon from '@/components/SelectIcon/index.vue'
+import FileUpload from '@/components/Upload/File.vue'
 // import { handleProp } from '@/utils'
 // 表单整体配置项
 export interface ProFormProps {
   formOptions?: ProForm.FormOptions
   itemsOptions: ProForm.ItemsOptions[]
   model?: Record<ProForm.FormItem['prop'], ProForm.FormItem['value']>
+  api?: (params: any) => Promise<any> // 表单提交api
 }
 
 // 表单的数据
@@ -122,6 +129,13 @@ props.itemsOptions.forEach(async item => {
   await setEnumMap(item)
 })
 const emits = defineEmits<EmitEvent>()
+// 监听itemsOptions变化
+watch(props, () => {
+  // 处理表单项需要的参数
+  props.itemsOptions.forEach(async item => {
+    await setEnumMap(item)
+  })
+})
 // 根据items初始化model, 如果items有传值就用传递的model数据模型,否则就给上面声明的formModel设置相应的(key,value) [item.prop], item.value是表单的默认值(选填)
 watch(
   () => props.model,
@@ -141,8 +155,17 @@ const onSubmit = (formEl: FormInstance | undefined) => {
   if (!formEl) return
   formEl.validate(valid => {
     if (valid) {
-      emits('submit', formModel.value)
+      if (props.api) emits('submit', formModel.value)
+      props.api!({ ...formModel }).then(res => {
+        if (res.code == 200) {
+          resetForm(formEl)
+          ElMessage.success('操作成功')
+        } else {
+          console.log('message', res.message)
+        }
+      })
     } else {
+      console.log('校验失败')
     }
   })
 }
@@ -162,6 +185,7 @@ const resetForm = (formEl: FormInstance | undefined) => {
 // 暴露方法给父组件使用
 defineExpose({
   proFormRef,
+  formModel,
   resetForm,
   onSubmit
 })

+ 1 - 5
src/components/ProTable/components/TableColumn.vue

@@ -29,11 +29,7 @@ const RenderTableColumn = (item: ColumnProps) => {
   return (
     <>
       {item.isShow && (
-        <el-table-column
-          {...item}
-          align={item.align ?? 'center'}
-          showOverflowTooltip={item.showOverflowTooltip ?? item.prop !== 'operation'}
-        >
+        <el-table-column {...item} align={item.align ?? 'center'} showOverflowTooltip={item.showOverflowTooltip ?? item.prop !== 'operation'}>
           {{
             default: (scope: RenderScope<any>) => {
               if (item._children) return item._children.map(child => RenderTableColumn(child))

+ 13 - 37
src/components/ProTable/index.vue

@@ -1,13 +1,6 @@
 <template>
   <!-- 查询表单 -->
-  <SearchForm
-    v-show="isShowSearch"
-    :search="_search"
-    :reset="_reset"
-    :columns="searchColumns"
-    :search-param="searchParam"
-    :search-col="searchCol"
-  />
+  <SearchForm v-show="isShowSearch" :search="_search" :reset="_reset" :columns="searchColumns" :search-param="searchParam" :search-col="searchCol" />
 
   <!-- 表格主体 -->
   <div class="card table-main">
@@ -20,24 +13,12 @@
         <slot name="toolButton">
           <el-button v-if="showToolButton('refresh')" :icon="Refresh" circle @click="getTableList" />
           <el-button v-if="showToolButton('setting') && columns.length" :icon="Operation" circle @click="openColSetting" />
-          <el-button
-            v-if="showToolButton('search') && searchColumns?.length"
-            :icon="Search"
-            circle
-            @click="isShowSearch = !isShowSearch"
-          />
+          <el-button v-if="showToolButton('search') && searchColumns?.length" :icon="Search" circle @click="isShowSearch = !isShowSearch" />
         </slot>
       </div>
     </div>
     <!-- 表格主体 -->
-    <el-table
-      ref="tableRef"
-      v-bind="$attrs"
-      :data="processTableData"
-      :border="border"
-      :row-key="rowKey"
-      @selection-change="selectionChange"
-    >
+    <el-table ref="tableRef" v-bind="$attrs" :data="processTableData" :border="border" :row-key="rowKey" @selection-change="selectionChange">
       <!-- 默认插槽 -->
       <slot />
       <template v-for="item in tableColumns" :key="item">
@@ -87,12 +68,7 @@
     </el-table>
     <!-- 分页组件 -->
     <slot name="pagination">
-      <Pagination
-        v-if="pagination"
-        :pageable="pageable"
-        :handle-size-change="handleSizeChange"
-        :handle-current-change="handleCurrentChange"
-      />
+      <Pagination v-if="pagination" :pageable="pageable" :handle-size-change="handleSizeChange" :handle-current-change="handleCurrentChange" />
     </slot>
   </div>
   <!-- 列设置 -->
@@ -165,8 +141,13 @@ const radio = ref('')
 const { selectionChange, selectedList, selectedListIds, isSelected } = useSelection(props.rowKey)
 
 // 表格操作 Hooks
-const { tableData, pageable, searchParam, searchInitParam, getTableList, search, reset, handleSizeChange, handleCurrentChange } =
-  useTable(props.requestApi, props.initParam, props.pagination, props.dataCallback, props.requestError)
+const { tableData, pageable, searchParam, searchInitParam, getTableList, search, reset, handleSizeChange, handleCurrentChange } = useTable(
+  props.requestApi,
+  props.initParam,
+  props.pagination,
+  props.dataCallback,
+  props.requestError
+)
 
 // 清空选中数据列表
 const clearSelection = () => tableRef.value!.clearSelection()
@@ -182,10 +163,7 @@ onMounted(() => {
 const processTableData = computed(() => {
   if (!props.data) return tableData.value
   if (!props.pagination) return props.data
-  return props.data.slice(
-    (pageable.value.pageNum - 1) * pageable.value.pageSize,
-    pageable.value.pageSize * pageable.value.pageNum
-  )
+  return props.data.slice((pageable.value.pageNum - 1) * pageable.value.pageSize, pageable.value.pageSize * pageable.value.pageNum)
 })
 
 // 监听页面 initParam 改化,重新获取表格数据
@@ -237,9 +215,7 @@ const flatColumnsFunc = (columns: ColumnProps[], flatArr: ColumnProps[] = []) =>
 
 // 过滤需要搜索的配置项 && 排序
 const searchColumns = computed(() => {
-  return flatColumns.value
-    ?.filter(item => item.search?.el || item.search?.render)
-    .sort((a, b) => a.search!.order! - b.search!.order!)
+  return flatColumns.value?.filter(item => item.search?.el || item.search?.render).sort((a, b) => a.search!.order! - b.search!.order!)
 })
 
 // 设置 搜索表单默认排序 && 搜索表单项的默认值

+ 1 - 2
src/components/ProTable/interface/index.ts

@@ -68,8 +68,7 @@ export type HeaderRenderScope<T> = {
   [key: string]: any
 }
 
-export interface ColumnProps<T = any>
-  extends Partial<Omit<TableColumnCtx<T>, 'type' | 'children' | 'renderCell' | 'renderHeader'>> {
+export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, 'type' | 'children' | 'renderCell' | 'renderHeader'>> {
   type?: TypeProps // 列类型
   tag?: boolean | Ref<boolean> // 是否是标签展示
   isShow?: boolean | Ref<boolean> // 是否显示在表格当中

+ 1 - 3
src/components/SelectFilter/index.vue

@@ -11,9 +11,7 @@
             v-for="option in item.options"
             :key="option.value"
             :class="{
-              active:
-                option.value === selected[item.key] ||
-                (Array.isArray(selected[item.key]) && selected[item.key].includes(option.value))
+              active: option.value === selected[item.key] || (Array.isArray(selected[item.key]) && selected[item.key].includes(option.value))
             }"
             @click="select(item, option)"
           >

+ 132 - 0
src/components/TableDialog/index.vue

@@ -0,0 +1,132 @@
+<template>
+  <el-dialog
+    v-model="dialogVisible"
+    :close-on-click-modal="false"
+    :title="parameter.title"
+    :destroy-on-close="true"
+    :append-to-body="true"
+    :width="parameter.width"
+    :top="parameter.top"
+    draggable
+  >
+    <ProTable
+      ref="proTable"
+      height="50vh"
+      :tool-button="parameter.toolButton"
+      :columns="parameter.columns"
+      :row-key="parameter.rowKey"
+      :request-api="parameter.getTableList"
+      :init-param="parameter.initParam"
+      :data-callback="dataCallback"
+    />
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button type="primary" :loading="butLoading" @click="handleSubmit">确认</el-button>
+        <el-button @click="handleCancel">取消</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup lang="ts" name="FormDialog">
+import { ref } from 'vue'
+import ProTable from '@/components/ProTable/index.vue'
+import { ElMessage } from 'element-plus'
+import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
+
+export interface TableParameterProps {
+  title?: string // 标题
+  width?: number // 弹框宽度
+  top?: string // 离顶部距离
+  toolButton?: boolean
+  initParam?: any // 初始化参数
+  apiParam?: (params?: any) => any
+  rowKey?: string
+  api?: (params: any) => Promise<any> // 表单提交api
+  columns?: ColumnProps[] // 动态表单字段
+  getTableList?: (params: any) => Promise<any> // 获取表格数据的Api
+  backTableList?: (params: any) => Promise<any> // 返回主表表格数据的Api
+}
+// dialog状态
+const dialogVisible = ref(false)
+const butLoading = ref(false)
+// 接受父组件参数,配置默认值
+// const parameter = ref<TableParameterProps>({
+//   title: '',
+//   width: 600,
+//   top: '5vh',
+//   toolButton: false,
+//   columns: [] as ColumnProps[]
+// })
+let parameter = withDefaults(defineProps<TableParameterProps>(), {
+  title: '',
+  width: 600,
+  top: '10vh',
+  rowKey: 'id',
+  toolButton: false,
+  initParam: {},
+  columns: () => []
+})
+// ProTable 实例
+const proTable = ref<ProTableInstance>()
+
+const dataCallback = (data: any) => {
+  const page = proTable.value!.pageable
+  return {
+    list: data.data,
+    total: data.total,
+    pageNum: page.pageNum,
+    pageSize: page.pageSize
+  }
+}
+// 定义 emit 事件
+const emit = defineEmits<{
+  submitForm: []
+}>()
+// 表单提交校验
+const handleSubmit = () => {
+  butLoading.value = true
+  if (!proTable.value?.selectedList.length) {
+    ElMessage.warning('请选择数据')
+    butLoading.value = false
+    return
+  }
+  let paramObj: any = undefined
+  let params: any[] | undefined = []
+  if (parameter.apiParam) {
+    paramObj = parameter.apiParam(proTable.value?.selectedList)
+  } else {
+    params = proTable.value?.selectedList.map(item => item[parameter.rowKey])
+  }
+  parameter.api!(paramObj || params).then(res => {
+    if (res.code == 200) {
+      ElMessage.success('操作成功')
+      dialogVisible.value = false
+      emit('submitForm')
+    } else {
+      console.log('message', res.message)
+    }
+  })
+  butLoading.value = false
+}
+
+// 取消按钮,重置表单,关闭弹框
+const handleCancel = () => {
+  butLoading.value = false
+  dialogVisible.value = false
+}
+
+// 接收父组件参数
+const openDialog = (params: TableParameterProps) => {
+  parameter = { ...parameter, ...params }
+  butLoading.value = false
+  dialogVisible.value = true
+}
+
+defineExpose({
+  openDialog,
+  proTable,
+  handleCancel
+})
+</script>
+<style scoped lang="scss"></style>

+ 100 - 85
src/components/Upload/File.vue

@@ -1,19 +1,20 @@
 <template>
   <div class="upload-file">
     <el-upload
+      ref="uploadRef"
+      :action="uploadFileUrl"
       v-model:file-list="_fileList"
-      action="#"
       class="upload-file-uploader"
+      :show-file-list="false"
       :multiple="true"
       :disabled="self_disabled"
-      :auto-upload="false"
       :limit="limit"
-      :http-request="handleHttpUpload"
       :before-upload="beforeUpload"
       :on-exceed="handleExceed"
       :on-success="uploadSuccess"
       :on-error="uploadError"
       :accept="fileType.join(',')"
+      :headers="headers"
     >
       <el-button :icon="icon" type="primary">{{ text }}</el-button>
     </el-upload>
@@ -29,51 +30,57 @@
       的文件
     </div>
     <!-- 文件列表 -->
-    <!-- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
-    <li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList"> -->
-    <!-- <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
+    <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
+      <li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in _fileList">
+        <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
           <span class="document">
             {{ getFileName(file.name) }}
           </span>
-        </el-link> -->
-    <!-- <div class="ele-upload-list__item-content-action">
-        <el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
-      </div>
-    </li> -->
-    <!-- </transition-group> -->
+        </el-link>
+        <div class="ele-upload-list__item-content-action">
+          <el-link :underline="false" @click="handleRemove(index)" type="danger">删除</el-link>
+        </div>
+      </li>
+    </transition-group>
   </div>
 </template>
 
 <script setup lang="ts" name="UploadImgs">
 import { ref, computed, inject, watch } from 'vue'
-// import { Plus } from '@element-plus/icons-vue'
-import { uploadImg } from '@/api/modules/upload'
-import type { UploadProps, UploadFile, UploadUserFile, UploadRequestOptions } from 'element-plus'
-import { ElNotification, formContextKey, formItemContextKey } from 'element-plus'
-
+import type { UploadProps, UploadFile, UploadUserFile } from 'element-plus'
+import { ElNotification, ElMessage, formContextKey, formItemContextKey, UploadInstance } from 'element-plus'
+import { getToken } from '@/utils/token'
 interface UploadFileProps {
-  fileList?: UploadUserFile[]
-  api?: (params: any) => Promise<any> // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传
-  drag?: boolean // 是否支持拖拽上传 ==> 非必传(默认为 true)
+  modelValue?: any
   disabled?: boolean // 是否禁用上传组件 ==> 非必传(默认为 false)
+  drag?: boolean // 是否支持拖拽上传 ==> 非必传(默认为 true)
   limit?: number // 最大图片上传数 ==> 非必传(默认为 5张)
   fileSize?: number // 图片大小限制 ==> 非必传(默认为 5M)
-  fileType?: File.ImageMimeType[] // 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
   height?: string // 组件高度 ==> 非必传(默认为 150px)
   width?: string // 组件宽度 ==> 非必传(默认为 150px)
   borderRadius?: string // 组件边框圆角 ==> 非必传(默认为 8px)
   isShowTip?: boolean // 是否显示提示信息 ==> 非必传(默认为 true)
   text?: string // 按钮文字
   icon?: string
+  fileList?: UploadUserFile[]
+  fileType?: Array<any>
 }
+// const emit = defineEmits(['update:modelValue'])
+const emit = defineEmits<{
+  'update:modelValue': [value: any]
+}>()
+const baseUrl = import.meta.env.VITE_API_URL
+const uploadFileUrl = ref(import.meta.env.VITE_API_URL + '/common/upload') // 上传文件服务器地址
+const headers = ref({ Authorization: 'Bearer ' + getToken() })
+const uploadRef = ref<UploadInstance>()
 const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize))
 const props = withDefaults(defineProps<UploadFileProps>(), {
   fileList: () => [],
   drag: true,
   disabled: false,
-  limit: 5,
-  fileSize: 5,
-  fileType: () => ['image/jpeg', 'image/png', 'image/gif'],
+  limit: 1,
+  fileSize: 500,
+  fileType: () => ['doc', 'xls', 'xlsx', 'ppt', 'txt', 'pdf'],
   height: '150px',
   width: '150px',
   borderRadius: '8px',
@@ -93,21 +100,13 @@ const self_disabled = computed(() => {
 const _fileList = ref<UploadUserFile[]>(props.fileList)
 
 // 获取文件名称
-// const getFileName = name => {
-//   if (name.lastIndexOf('/') > -1) {
-//     return name.slice(name.lastIndexOf('/') + 1)
-//   } else {
-//     return ''
-//   }
-// }
-
-// 删除文件
-// const handleDelete = index => {
-//   console.log(index)
-
-// fileList.value.splice(index, 1)
-// emit('update:modelValue', listToString(fileList.value))
-// }
+const getFileName = name => {
+  if (name.lastIndexOf('/') > -1) {
+    return name.slice(name.lastIndexOf('/') + 1)
+  } else {
+    return ''
+  }
+}
 
 // 监听 props.fileList 列表默认值改变
 watch(
@@ -122,78 +121,77 @@ watch(
  * @param rawFile 选择的文件
  * */
 const beforeUpload: UploadProps['beforeUpload'] = rawFile => {
-  const imgSize = rawFile.size / 1024 / 1024 < props.fileSize
-  const imgType = props.fileType.includes(rawFile.type as File.ImageMimeType)
-  if (!imgType)
+  // 校验文件格式
+  const fileName = rawFile.name.split('.')
+  const fileExt = fileName[fileName.length - 1]
+  const isTypeOk = props.fileType.indexOf(fileExt) >= 0
+  // 校检文件大小
+  const isLt = rawFile.size / 1024 / 1024 < props.fileSize
+
+  if (!isTypeOk)
     ElNotification({
       title: '温馨提示',
-      message: '上传图片不符合所需的格式!',
+      message: '上传文件不符合所需的格式!',
       type: 'warning'
     })
-  if (!imgSize)
+  if (!isLt)
     setTimeout(() => {
       ElNotification({
         title: '温馨提示',
-        message: `上传图片大小不能超过 ${props.fileSize}M!`,
+        message: `上传文件大小不能超过 ${props.fileSize}M!`,
         type: 'warning'
       })
     }, 0)
-  return imgType && imgSize
-}
-
-/**
- * @description 图片上传
- * @param options upload 所有配置项
- * */
-const handleHttpUpload = async (options: UploadRequestOptions) => {
-  let formData = new FormData()
-  formData.append('file', options.file)
-  try {
-    const api = props.api ?? uploadImg
-    const { data } = await api(formData)
-    options.onSuccess(data)
-  } catch (error) {
-    options.onError(error as any)
-  }
+  return isTypeOk && isLt
 }
 
 /**
- * @description 图片上传成功
+ * @description 文件上传成功
  * @param response 上传响应结果
  * @param uploadFile 上传的文件
  * */
-const emit = defineEmits<{
-  'update:fileList': [value: UploadUserFile[]]
-}>()
-const uploadSuccess = (response: { fileUrl: string } | undefined, uploadFile: UploadFile) => {
-  if (!response) return
-  uploadFile.url = response.fileUrl
-  emit('update:fileList', _fileList.value)
-  // 调用 el-form 内部的校验方法(可自动校验)
-  formItemContext?.prop && formContext?.validateField([formItemContext.prop as string])
-  ElNotification({
-    title: '温馨提示',
-    message: '图片上传成功!',
-    type: 'success'
-  })
+const uploadSuccess = (response: any | undefined, uploadFile: UploadFile) => {
+  if (response.code === 200) {
+    uploadFile.url = response.url
+    uploadFile.name = response.fileName
+    emit('update:modelValue', _fileList.value)
+    // 调用 el-form 内部的校验方法(可自动校验)
+    formItemContext?.prop && formContext?.validateField([formItemContext.prop as string])
+    ElNotification({
+      title: '温馨提示',
+      message: '文件上传成功!',
+      type: 'success'
+    })
+  } else {
+    ElMessage.error(response.msg)
+    uploadRef.value?.handleRemove(uploadFile)
+  }
+  //   code: 200
+  // fileName: "/profile/upload/2024/04/19/demo_20240419154324A003.txt"
+  // msg: "操作成功"
+  // newFileName: "demo_20240419154324A003.txt"
+  // originalFilename: "demo.txt"
+  // url: "http://localhost:8080/profile/upload/2024/04/19/demo_20240419154324A003.txt"
+  // uploadList.push({ name: res.fileName, url: res.fileName });
 }
 
 /**
  * @description 删除图片
  * @param file 删除的文件
  * */
-// const handleRemove = (file: UploadFile) => {
-//   _fileList.value = _fileList.value.filter(item => item.url !== file.url || item.name !== file.name)
-//   emit('update:fileList', _fileList.value)
-// }
+const handleRemove = (index: number) => {
+  // _fileList.value = _fileList.value.filter(item => item.url !== file.url || item.name !== file.name)
+  _fileList.value.splice(index, 1)
+  emit('update:modelValue', _fileList.value)
+}
 
 /**
- * @description 图片上传错误
+ * @description 文件上传错误
  * */
 const uploadError = () => {
   ElNotification({
     title: '温馨提示',
-    message: '图片上传失败,请您重新上传!',
+    message: '文件上传失败,请您重新上传!',
     type: 'error'
   })
 }
@@ -204,7 +202,7 @@ const uploadError = () => {
 const handleExceed = () => {
   ElNotification({
     title: '温馨提示',
-    message: `当前最多只能上传 ${props.limit} 张图片,请移除后上传!`,
+    message: `当前最多只能上传 ${props.limit} 个文件 ,请移除后上传!`,
     type: 'warning'
   })
 }
@@ -240,7 +238,6 @@ const handleExceed = () => {
 // .ele-upload-list__item-content-action .el-link {
 //   margin-right: 10px;
 // }
-
 // .is-error {
 //   .upload {
 //     :deep(.el-upload--picture-card),
@@ -355,4 +352,22 @@ const handleExceed = () => {
 //     text-align: center;
 //   }
 // }
+.upload-file-uploader {
+  margin-bottom: 5px;
+}
+.upload-file-list .el-upload-list__item {
+  position: relative;
+  margin-bottom: 10px;
+  line-height: 2;
+  border: 1px solid #e4e7ed;
+}
+.upload-file-list .ele-upload-list__item-content {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  color: inherit;
+}
+.ele-upload-list__item-content-action .el-link {
+  margin-right: 10px;
+}
 </style>

+ 1 - 1
src/config/index.ts

@@ -10,7 +10,7 @@ export const LOGIN_URL: string = '/login'
 export const DEFAULT_PRIMARY: string = '#009688'
 
 // 路由白名单地址(本地存在的路由 staticRouter.ts 中)
-export const ROUTER_WHITE_LIST: string[] = ['/500', '/login', '/register']
+export const ROUTER_WHITE_LIST: string[] = ['/500', '/login', '/register', '/dataScreen']
 
 // 高德地图 key
 export const AMAP_MAP_KEY: string = ''

+ 1 - 1
src/hooks/useTable.ts

@@ -61,7 +61,7 @@ export const useTable = (
       Object.assign(state.totalParam, initParam, isPageable ? pageParam.value : {})
       let { data } = await api({ ...state.searchInitParam, ...state.totalParam })
       dataCallBack && (data = dataCallBack(data))
-      state.tableData = isPageable ? data.list : data
+      state.tableData = isPageable ? data.list || data : data
       // 解构后台返回的分页数据 (如果有分页更新分页信息)
       if (isPageable) {
         const { pageNum, pageSize, total } = data

+ 1 - 4
src/hooks/useTheme.ts

@@ -43,10 +43,7 @@ export const useTheme = () => {
     }
     // 计算主题颜色变化
     document.documentElement.style.setProperty('--el-color-primary', val)
-    document.documentElement.style.setProperty(
-      '--el-color-primary-dark-2',
-      isDark.value ? `${getLightColor(val, 0.2)}` : `${getDarkColor(val, 0.3)}`
-    )
+    document.documentElement.style.setProperty('--el-color-primary-dark-2', isDark.value ? `${getLightColor(val, 0.2)}` : `${getDarkColor(val, 0.3)}`)
     for (let i = 1; i <= 9; i++) {
       const primaryColor = isDark.value ? `${getDarkColor(val, i / 10)}` : `${getLightColor(val, i / 10)}`
       document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, primaryColor)

+ 3 - 7
src/hooks/useTime.ts

@@ -20,15 +20,11 @@ export const useTime = () => {
     month.value = date.getMonth() + 1
     week.value = '日一二三四五六'.charAt(date.getDay())
     day.value = date.getDate()
-    hour.value =
-      (date.getHours() + '')?.padStart(2, '0') ||
-      new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getHours())
+    hour.value = (date.getHours() + '')?.padStart(2, '0') || new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getHours())
     minute.value =
-      (date.getMinutes() + '')?.padStart(2, '0') ||
-      new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getMinutes())
+      (date.getMinutes() + '')?.padStart(2, '0') || new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getMinutes())
     second.value =
-      (date.getSeconds() + '')?.padStart(2, '0') ||
-      new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getSeconds())
+      (date.getSeconds() + '')?.padStart(2, '0') || new Intl.NumberFormat(undefined, { minimumIntegerDigits: 2 }).format(date.getSeconds())
     nowTime.value = `${year.value}年${month.value}月${day.value} ${hour.value}:${minute.value}:${second.value}`
   }
 

+ 1 - 7
src/layouts/LayoutClassic/index.vue

@@ -17,13 +17,7 @@
       <el-aside>
         <div class="aside-box" :style="{ width: isCollapse ? '65px' : '210px' }">
           <el-scrollbar>
-            <el-menu
-              :router="false"
-              :default-active="activeMenu"
-              :collapse="isCollapse"
-              :unique-opened="accordion"
-              :collapse-transition="false"
-            >
+            <el-menu :router="false" :default-active="activeMenu" :collapse="isCollapse" :unique-opened="accordion" :collapse-transition="false">
               <SubMenu :menu-list="menuList" />
             </el-menu>
           </el-scrollbar>

+ 1 - 7
src/layouts/LayoutColumns/index.vue

@@ -27,13 +27,7 @@
         <span v-show="subMenuList.length" class="logo-text">{{ isCollapse ? 'G' : title }}</span>
       </div>
       <el-scrollbar>
-        <el-menu
-          :router="false"
-          :default-active="activeMenu"
-          :collapse="isCollapse"
-          :unique-opened="accordion"
-          :collapse-transition="false"
-        >
+        <el-menu :router="false" :default-active="activeMenu" :collapse="isCollapse" :unique-opened="accordion" :collapse-transition="false">
           <SubMenu :menu-list="subMenuList" />
         </el-menu>
       </el-scrollbar>

+ 1 - 7
src/layouts/LayoutVertical/index.vue

@@ -8,13 +8,7 @@
           <span v-show="!isCollapse" class="logo-text">{{ title }}</span>
         </div>
         <el-scrollbar>
-          <el-menu
-            :router="false"
-            :default-active="activeMenu"
-            :collapse="isCollapse"
-            :unique-opened="accordion"
-            :collapse-transition="false"
-          >
+          <el-menu :router="false" :default-active="activeMenu" :collapse="isCollapse" :unique-opened="accordion" :collapse-transition="false">
             <SubMenu :menu-list="menuList" />
           </el-menu>
         </el-scrollbar>

+ 2 - 2
src/layouts/components/Header/ToolBarRight.vue

@@ -7,7 +7,7 @@
       <SearchMenu id="searchMenu" />
       <ThemeSetting id="themeSetting" />
       <!-- <Message id="message" /> -->
-      <Fullscreen id="fullscreen" />
+      <!-- <Fullscreen id="fullscreen" /> -->
     </div>
     <!-- <span class="username">{{ username }}</span> -->
     <Avatar />
@@ -22,7 +22,7 @@ import AssemblySize from './components/AssemblySize.vue'
 import SearchMenu from './components/SearchMenu.vue'
 import ThemeSetting from './components/ThemeSetting.vue'
 // import Message from './components/Message.vue'
-import Fullscreen from './components/Fullscreen.vue'
+// import Fullscreen from './components/Fullscreen.vue'
 import Avatar from './components/Avatar.vue'
 import SwitchDark from '@/components/SwitchDark/index.vue'
 

+ 1 - 6
src/layouts/components/Header/components/AssemblySize.vue

@@ -3,12 +3,7 @@
     <i :class="'iconfont icon-contentright'" class="toolBar-icon"></i>
     <template #dropdown>
       <el-dropdown-menu>
-        <el-dropdown-item
-          v-for="item in assemblySizeList"
-          :key="item.value"
-          :command="item.value"
-          :disabled="assemblySize === item.value"
-        >
+        <el-dropdown-item v-for="item in assemblySizeList" :key="item.value" :command="item.value" :disabled="assemblySize === item.value">
           {{ item.label }}
         </el-dropdown-item>
       </el-dropdown-menu>

+ 7 - 7
src/layouts/components/Header/components/Avatar.vue

@@ -5,12 +5,12 @@
     </div>
     <template #dropdown>
       <el-dropdown-menu>
-        <el-dropdown-item @click="openDialog('infoRef')">
+        <!-- <el-dropdown-item @click="openDialog('infoRef')">
           <el-icon><User /></el-icon>{{ $t('header.personalData') }}
         </el-dropdown-item>
         <el-dropdown-item @click="openDialog('passwordRef')">
           <el-icon><Edit /></el-icon>{{ $t('header.changePassword') }}
-        </el-dropdown-item>
+        </el-dropdown-item> -->
         <el-dropdown-item divided @click="logout">
           <el-icon><SwitchButton /></el-icon>{{ $t('header.logout') }}
         </el-dropdown-item>
@@ -55,10 +55,10 @@ const logout = () => {
 // 打开修改密码和个人信息弹窗
 const infoRef = ref<InstanceType<typeof InfoDialog> | null>(null)
 const passwordRef = ref<InstanceType<typeof PasswordDialog> | null>(null)
-const openDialog = (ref: string) => {
-  if (ref == 'infoRef') infoRef.value?.openDialog()
-  if (ref == 'passwordRef') passwordRef.value?.openDialog()
-}
+// const openDialog = (ref: string) => {
+//   if (ref == 'infoRef') infoRef.value?.openDialog()
+//   if (ref == 'passwordRef') passwordRef.value?.openDialog()
+// }
 </script>
 
 <style scoped lang="scss">
@@ -71,7 +71,7 @@ const openDialog = (ref: string) => {
   img {
     width: 100%;
     height: 100%;
-    filter: drop-shadow(var(--el-menu-active-color) 100px 0);
+    filter: drop-shadow(var(--el-color-primary) 100px 0);
     transform: translateX(-100px);
   }
 }

+ 1 - 6
src/layouts/components/Header/components/Language.vue

@@ -3,12 +3,7 @@
     <i :class="'iconfont icon-zhongyingwen'" class="toolBar-icon"></i>
     <template #dropdown>
       <el-dropdown-menu>
-        <el-dropdown-item
-          v-for="item in languageList"
-          :key="item.value"
-          :command="item.value"
-          :disabled="language === item.value"
-        >
+        <el-dropdown-item v-for="item in languageList" :key="item.value" :command="item.value" :disabled="language === item.value">
           {{ item.label }}
         </el-dropdown-item>
       </el-dropdown-menu>

+ 3 - 26
src/layouts/components/ThemeDrawer/index.vue

@@ -140,34 +140,11 @@ import SwitchDark from '@/components/SwitchDark/index.vue'
 const { changePrimary, changeGreyOrWeak, setAsideTheme, setHeaderTheme } = useTheme()
 
 const globalStore = useGlobalStore()
-const {
-  layout,
-  primary,
-  isGrey,
-  isWeak,
-  asideInverted,
-  headerInverted,
-  isCollapse,
-  accordion,
-  breadcrumb,
-  tabs,
-  tabsIcon,
-  footer
-} = storeToRefs(globalStore)
+const { layout, primary, isGrey, isWeak, asideInverted, headerInverted, isCollapse, accordion, breadcrumb, tabs, tabsIcon, footer } =
+  storeToRefs(globalStore)
 
 // 预定义主题颜色
-const colorList = [
-  DEFAULT_PRIMARY,
-  '#daa96e',
-  '#0c819f',
-  '#409eff',
-  '#27ae60',
-  '#ff5c93',
-  '#e74c3c',
-  '#fd726d',
-  '#f39c12',
-  '#9b59b6'
-]
+const colorList = [DEFAULT_PRIMARY, '#daa96e', '#0c819f', '#409eff', '#27ae60', '#ff5c93', '#e74c3c', '#fd726d', '#f39c12', '#9b59b6']
 
 // 设置布局方式
 const setLayout = (val: LayoutType) => {

+ 79 - 18
src/assets/json/list.json → src/routers/modules/dynamicRouter.json

@@ -15,20 +15,6 @@
         "noCache": true
       }
     },
-    {
-      "path": "/dataScreen",
-      "name": "DataScreen",
-      "component": "dataScreen/index",
-      "hidden": false,
-      "meta": {
-        "icon": "Histogram",
-        "title": "数据大屏",
-        "link": "",
-        "full": true,
-        "affix": true,
-        "noCache": true
-      }
-    },
     {
       "path": "/system/dict-data/index/:dictId",
       "name": "dictData",
@@ -44,6 +30,66 @@
         "noCache": true
       }
     },
+    {
+      "path": "/system/role-auth/user/:roleId",
+      "name": "AuthUser",
+      "component": "system/role/authUser",
+      "hidden": true,
+      "meta": {
+        "icon": "",
+        "title": "分配用户",
+        "activeMenu": "/system/role",
+        "link": "",
+        "full": false,
+        "affix": false,
+        "noCache": true
+      }
+    },
+    {
+      "path": "/task/create",
+      "name": "CreateTask",
+      "component": "task/create",
+      "hidden": true,
+      "meta": {
+        "icon": "",
+        "title": "创建任务",
+        "activeMenu": "/task/assignment",
+        "link": "",
+        "full": false,
+        "affix": false,
+        "noCache": true
+      }
+    },
+    {
+      "path": "/order/task/:sortieNo",
+      "name": "orderTask",
+      "component": "manage/orderInfo/task/index",
+      "hidden": true,
+      "meta": {
+        "icon": "",
+        "title": "执行指令任务",
+        "activeMenu": "/index",
+        "link": "",
+        "full": false,
+        "affix": false,
+        "noCache": true
+      }
+    },
+    {
+      "path": "/task/detail",
+      "name": "Detail",
+      "component": "task/detail",
+      "hidden": true,
+      "meta": {
+        "icon": "",
+        "title": "任务详情",
+        "activeMenu": "/task/assignment",
+        "link": "",
+        "full": false,
+        "affix": false,
+        "noCache": true
+      }
+    },
     {
       "path": "/manage/execution/index/:sortieNo",
       "name": "ExecutionModel",
@@ -90,14 +136,14 @@
       }
     },
     {
-      "path": "/manage/sortie/playback/:id",
+      "path": "/manage/data/playback/:id",
       "name": "Playback",
-      "component": "manage/sortie/components/playback",
+      "component": "manage/dataPlayback/components/playback",
       "hidden": true,
       "meta": {
         "icon": "",
-        "title": "架次数据回放",
-        "activeMenu": "/manage/sortie",
+        "title": "回放",
+        "activeMenu": "/manage/dataPlayback",
         "link": "",
         "full": false,
         "affix": false,
@@ -118,6 +164,21 @@
         "affix": false,
         "noCache": true
       }
+    },
+    {
+      "path": "/tool/tool-edit/index/:tableId",
+      "name": "editTable",
+      "component": "tool/gen/editGenTable",
+      "hidden": true,
+      "meta": {
+        "icon": "data",
+        "title": "编辑生成配置",
+        "activeMenu": "/tool/gen",
+        "link": "",
+        "full": false,
+        "affix": false,
+        "noCache": true
+      }
     }
   ],
   "msg": "成功"

+ 0 - 1
src/routers/modules/dynamicRouter.ts

@@ -20,7 +20,6 @@ export const initDynamicRouter = async () => {
   try {
     // 1.获取菜单列表 && 按钮权限列表
     await authStore.getAuthMenuList()
-    // await authStore.getAuthButtonList()
 
     // 2.判断当前用户有没有菜单权限
     if (!authStore.authMenuListGet.length) {

+ 9 - 0
src/routers/modules/staticRouter.ts

@@ -33,6 +33,15 @@ export const staticRouter: RouteRecordRaw[] = [
       title: '登录'
     }
   },
+  {
+    path: '/dataScreen',
+    name: 'dataScreen',
+    component: () => import('@/views/dataScreen/index.vue'),
+    meta: {
+      title: '数据大屏',
+      full: true
+    }
+  },
   {
     path: '/layout',
     name: 'layout',

+ 2 - 8
src/stores/modules/auth.ts

@@ -1,9 +1,8 @@
 import { defineStore } from 'pinia'
 import { AuthState } from '@/stores/interface'
-import { getAuthButtonListApi } from '@/api/modules/login'
 import { getRoutersApi } from '@/api/modules/system/menu'
 import { getFlatMenuList, getShowMenuList, getAllBreadcrumbList } from '@/utils'
-import lists from '@/assets/json/list.json'
+import dynamicRouter from '@/routers/modules/dynamicRouter.json'
 
 export const useAuthStore = defineStore('admin-auth', {
   state: (): AuthState => ({
@@ -27,15 +26,10 @@ export const useAuthStore = defineStore('admin-auth', {
     breadcrumbListGet: state => getAllBreadcrumbList(state.authMenuList)
   },
   actions: {
-    // Get AuthButtonList
-    async getAuthButtonList() {
-      const { data } = await getAuthButtonListApi()
-      this.authButtonList = data
-    },
     // Get AuthMenuList
     async getAuthMenuList() {
       const { data } = await getRoutersApi()
-      this.authMenuList = [...lists.data, ...data]
+      this.authMenuList = [...dynamicRouter.data, ...data]
     },
     // Set RouteName
     async setRouteName(name: string) {

+ 4 - 4
src/stores/modules/global.ts

@@ -17,7 +17,7 @@ export const useGlobalStore = defineStore('admin-global', {
     // 主题颜色
     primary: DEFAULT_PRIMARY,
     // 深色模式
-    isDark: true,
+    isDark: false,
     // 深蓝模式
     isDarkBlue: false,
     // 灰色模式
@@ -25,9 +25,9 @@ export const useGlobalStore = defineStore('admin-global', {
     // 色弱模式
     isWeak: false,
     // 侧边栏反转
-    asideInverted: false,
+    asideInverted: true,
     // 头部反转
-    headerInverted: false,
+    headerInverted: true,
     // 折叠菜单
     isCollapse: false,
     // 菜单手风琴
@@ -37,7 +37,7 @@ export const useGlobalStore = defineStore('admin-global', {
     // 面包屑导航图标
     breadcrumbIcon: false,
     // 标签页
-    tabs: false,
+    tabs: true,
     // 标签页图标
     tabsIcon: false,
     // 页脚

+ 4 - 4
src/styles/element.scss

@@ -123,14 +123,14 @@ label {
     height: 35px;
     padding-left: 24px;
     font-weight: 700;
-    color: var(--el-menu-active-color);
-    background-color: var(--el-menu-active-bg-color);
+    color: var(--el-color-white);
+    background-color: var(--el-color-primary);
     border-top-left-radius: 6px;
     border-top-right-radius: 6px;
     &:hover {
       color: #ffffff;
-      background: var(--el-color-primary);
-      border-color: var(--el-color-primary);
+      background: var(--el-color-primary-light-5);
+      border-color: var(--el-color-primary-light-5);
       transition: 0.1s;
     }
     &.active {

+ 16 - 0
src/typings/ProForm.d.ts

@@ -24,6 +24,7 @@ declare namespace ProForm {
     | 'cascader'
     | 'radio-group'
     | 'radio-button'
+    | 'file-upload'
     | 'slot'
     | 'rate'
     | 'slider'
@@ -55,6 +56,7 @@ declare namespace ProForm {
     value?: any // 默认值
     tooltip?: string // 问号,tooltip提示
     required?: boolean
+    hideLabelSuffix?: boolean // label后缀是否隐藏
     rules?: FormItemRule[]
     span?: number // 表单col宽度
     show?: (params?: any) => Promise<any> | boolean | string // 是否显示 默认显示
@@ -83,6 +85,7 @@ declare namespace ProForm {
     clearable?: boolean // 是否可清空
     showPassword?: boolean // 是否显示切换密码图标
     enum?: EnumProps[] | Ref<EnumProps[]> | ((params?: any) => Promise<any>) // 枚举字典
+    onChange?: (value: any) => void
     enumKey?: string
     labelKey?: string
     valueKey?: string
@@ -90,6 +93,7 @@ declare namespace ProForm {
     placeholder?: string
     data?: Record<string, any>[]
     multiple?: boolean
+    disabled?: boolean
     elTagName?: ElTagName
     type?: string
     rangeSeparator?: string // 时间范围分隔符
@@ -108,6 +112,18 @@ declare namespace ProForm {
     appendToBody?: boolean // 树下拉
     checkStrictly?: boolean // 可选
     renderAfterExpand?: boolean // 可选
+    validateEvent?: boolean // 可选如果您不想根据输入事件触发验证器, 在相应的输入类型组件上设置 validate-event 属性为 false
     controlsPosition?: 'left' | 'right' // 可选
+    onChange?: (value: any) => void
+    onSelect?: (value: any) => void
+    onRemove?: (value: any) => void
+    onClear?: () => void
+    onFocus?: () => void
+    onBlur?: () => void
+    onInput?: (value: any) => void
+    onSearch?: (value: any) => void
+    onVisibleChange?: (value: any) => void
+    onExpand?: (value: any) => void
+    onCheck?: (value: any) => void
   }
 }

+ 198 - 0
src/utils/dataScreen.ts

@@ -0,0 +1,198 @@
+// 中间虚线
+export function dashed() {
+  let canvas = <HTMLCanvasElement>document.getElementById('dashed')
+  let ctx = canvas?.getContext('2d')
+  if (!ctx) return
+  let w = (canvas.width = canvas.parentElement!.clientWidth)
+  let h = (canvas.height = (canvas.parentElement!.clientHeight / 3) * 2)
+  ctx.lineWidth = 3
+  ctx.setLineDash([3, 3])
+  ctx.fillStyle = '#93f8fb'
+  ctx.shadowOffsetX = 0
+  // 阴影的y偏移
+  ctx.shadowOffsetY = 0
+  // 阴影颜色
+  ctx.shadowColor = '#93f8fb'
+  // 阴影的模糊半径
+  ctx.shadowBlur = 15
+  ctx.save() //缓存初始状态
+  // 绘制第一条曲线
+  ctx.beginPath()
+  let grd1 = ctx.createLinearGradient((w / 11) * 2, h / 3, (w / 5) * 2, h)
+  grd1.addColorStop(0, '#54e2e6')
+  grd1.addColorStop(1, '#065261')
+  ctx.strokeStyle = grd1
+  ctx.moveTo((w / 5) * 2, h)
+  ctx.quadraticCurveTo(w / 5, (h / 6) * 5, (w / 11) * 2, h / 3)
+  ctx.stroke()
+  // 绘制第一条曲线上的圆光效果
+  ctx.beginPath()
+  ctx.moveTo((w / 11) * 2, h / 3)
+  ctx.arc((w / 11) * 2, h / 3, 5, 0, Math.PI * 2)
+  ctx.fill()
+  ctx.restore()
+  ctx.save()
+  // 绘制第二条线
+  ctx.beginPath()
+  let grd2 = ctx.createLinearGradient((w / 11) * 3.3, h / 2, (w / 3) * 1.1, (h / 6) * 5)
+  grd2.addColorStop(0, '#e08d03')
+  grd2.addColorStop(1, '#2e6a5c')
+  ctx.strokeStyle = grd2
+  ctx.moveTo((w / 3) * 1.1, (h / 6) * 5)
+  ctx.quadraticCurveTo((w / 5) * 1.5, (h / 6) * 4.2, (w / 11) * 3.3, h / 2)
+  ctx.stroke()
+  // 绘制第二条曲线上的圆光效果
+  ctx.beginPath()
+  ctx.moveTo((w / 11) * 3.3, h / 2)
+  ctx.arc((w / 11) * 3.3, h / 2, 5, 0, Math.PI * 2)
+  ctx.fill()
+  ctx.restore()
+  ctx.save()
+  // 绘制第三条线
+  ctx.beginPath()
+  let grd3 = ctx.createLinearGradient((w / 3) * 1.4, h / 5, (w / 5) * 2, h / 2)
+  grd3.addColorStop(0, '#e08d03')
+  grd3.addColorStop(1, '#2e6a5c')
+  ctx.strokeStyle = grd3
+  ctx.moveTo((w / 5) * 2, h / 2)
+  ctx.quadraticCurveTo((w / 3) * 1.2, (h / 4) * 1.4, (w / 3) * 1.4, h / 5)
+  ctx.stroke()
+  // 绘制第三条曲线上的圆光效果
+  ctx.beginPath()
+  ctx.moveTo((w / 3) * 1.4, h / 5)
+  ctx.arc((w / 3) * 1.4, h / 5, 5, 0, Math.PI * 2)
+  ctx.fill()
+  ctx.restore()
+  ctx.save()
+  // 绘制第四条线
+  ctx.beginPath()
+  let grd4 = ctx.createLinearGradient((w / 5) * 3.1, (h / 3) * 1.2, (w / 5) * 3.2, (h / 2) * 1.5)
+  grd4.addColorStop(0, '#e08d03')
+  grd4.addColorStop(1, '#2e6a5c')
+  ctx.strokeStyle = grd4
+  ctx.moveTo((w / 5) * 3.2, (h / 2) * 1.5)
+  ctx.quadraticCurveTo((w / 5) * 3.35, (h / 2) * 1.2, (w / 5) * 3.1, (h / 3) * 1.2)
+  ctx.stroke()
+  // 绘制第四条曲线上的圆光效果
+  ctx.beginPath()
+  ctx.moveTo((w / 5) * 3.1, (h / 3) * 1.2)
+  ctx.arc((w / 5) * 3.1, (h / 3) * 1.2, 5, 0, Math.PI * 2)
+  ctx.fill()
+  ctx.restore()
+  ctx.save()
+  // 绘制第五条线
+  ctx.beginPath()
+  let grd5 = ctx.createLinearGradient((w / 5) * 3.3, h / 4, (w / 5) * 3.2, (h / 2) * 1.9)
+  grd5.addColorStop(0, '#e08d03')
+  grd5.addColorStop(1, '#2e6a5c')
+  ctx.strokeStyle = grd5
+  ctx.moveTo((w / 5) * 3.03, (h / 2) * 1.9)
+  ctx.quadraticCurveTo((w / 5) * 3.8, (h / 2) * 1.2, (w / 5) * 3.3, h / 4)
+  ctx.stroke()
+  // 绘制第五条曲线上的圆光效果
+  ctx.beginPath()
+  ctx.moveTo((w / 5) * 3.3, h / 4)
+  ctx.arc((w / 5) * 3.3, h / 4, 5, 0, Math.PI * 2)
+  ctx.fill()
+  ctx.restore()
+  ctx.save()
+  // 绘制第六条线
+  ctx.beginPath()
+  let grd6 = ctx.createLinearGradient((w / 5) * 3.8, (h / 2) * 1.2, (w / 5) * 2.9, h)
+  grd6.addColorStop(0, '#e08d03')
+  grd6.addColorStop(1, '#2e6a5c')
+  ctx.strokeStyle = grd6
+  ctx.moveTo((w / 5) * 2.9, h)
+  ctx.quadraticCurveTo((w / 5) * 3.7, (h / 2) * 1.6, (w / 5) * 3.8, (h / 2) * 1.2)
+  ctx.stroke()
+  // 绘制第六条曲线上的圆光效果
+  ctx.beginPath()
+  ctx.moveTo((w / 5) * 3.8, (h / 2) * 1.2)
+  ctx.arc((w / 5) * 3.8, (h / 2) * 1.2, 5, 0, Math.PI * 2)
+  ctx.fill()
+}
+// 中间背景雨
+export function rainBg() {
+  const rainCanvas = <HTMLCanvasElement>document.getElementById('rain')
+  const ctx = rainCanvas.getContext('2d')
+  if (!ctx) return
+
+  let w = (rainCanvas.width = rainCanvas.parentElement!.clientWidth)
+  let h = (rainCanvas.height = rainCanvas.parentElement!.clientHeight)
+
+  function random(min: number, max: number): number {
+    return Math.random() * (max - min) + min
+  }
+
+  class RainDrop {
+    x: number
+    y: number
+    vy: number
+    hit: number
+    size: number
+    color: string
+
+    constructor() {
+      this.x = 0
+      this.y = 0
+      this.vy = 0
+      this.hit = 0
+      this.size = 0
+      this.color = ''
+      this.init()
+    }
+
+    init() {
+      this.x = random(0, w)
+      this.y = h
+      this.color = 'hsl(180, 100%, 50%)'
+      this.vy = random(4, 5)
+      this.hit = 0
+      this.size = 2
+    }
+
+    draw() {
+      if (this.y > this.hit) {
+        if (!ctx) return
+        const linearGradient = ctx.createLinearGradient(this.x, this.y, this.x, this.y + this.size * 30)
+        linearGradient.addColorStop(0, '#14789c')
+        linearGradient.addColorStop(1, '#090723')
+        ctx.fillStyle = linearGradient
+        ctx.fillRect(this.x, this.y, this.size, this.size * 50)
+      }
+      this.update()
+    }
+
+    update() {
+      if (this.y > this.hit) {
+        this.y -= this.vy
+      } else {
+        this.init()
+      }
+    }
+  }
+
+  function resize() {
+    w = rainCanvas.width = rainCanvas.parentElement!.clientWidth
+    h = rainCanvas.height = rainCanvas.parentElement!.clientHeight
+  }
+
+  const rs: RainDrop[] = []
+  for (let i = 0; i < 10; i++) {
+    setTimeout(() => {
+      const r = new RainDrop()
+      rs.push(r)
+    }, i * 300)
+  }
+
+  function anim() {
+    ctx?.clearRect(0, 0, w, h)
+    for (let i = 0; i < rs.length; i++) {
+      rs[i].draw()
+    }
+    requestAnimationFrame(anim)
+  }
+
+  window.addEventListener('resize', resize)
+  anim()
+}

+ 1 - 2
src/utils/jsEncrypt.ts

@@ -3,8 +3,7 @@ import { JSEncrypt } from 'JSEncrypt'
 // 密钥对生成 http://web.chacuo.net/netrsakeypair
 
 const publicKey =
-  'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' +
-  'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
+  'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' + 'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
 
 const privateKey =
   'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' +

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