zhengyiming
6 天以前 9d8ef3a592b3102c8d4133e601b31aacb91866f6
fix: 修改功能模块
1个文件已添加
1个文件已删除
15个文件已修改
604 ■■■■ 已修改文件
.eslintrc-auto-import.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
auto-imports.d.ts 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pnpm-lock.yaml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Form/CheckboxWithCustomize.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/constants/apiEnum.ts 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/auth.ts 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/dictionary.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/menu.ts 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/resource.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/role.ts 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/typings.d.ts 157 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/DictionaryManage/SearchSetting.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/EnterpriseManageList.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/System/ModuleManage.vue 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/System/components/SubModuleEditDrawer.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/System/types/index.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.eslintrc-auto-import.json
@@ -22,6 +22,7 @@
    "EnumMenuType": true,
    "EnumMenuVisitLevel": true,
    "EnumPagedListOrder": true,
    "EnumRoleWebApiDataPower": true,
    "EnumUserType": true,
    "EnumWebApiMethod": true,
    "ExtractDefaultPropTypes": true,
auto-imports.d.ts
@@ -26,6 +26,7 @@
  const EnumMenuType: typeof import('./src/constants/apiEnum')['EnumMenuType']
  const EnumMenuVisitLevel: typeof import('./src/constants/apiEnum')['EnumMenuVisitLevel']
  const EnumPagedListOrder: typeof import('./src/constants/apiEnum')['EnumPagedListOrder']
  const EnumRoleWebApiDataPower: typeof import('./src/constants/apiEnum')['EnumRoleWebApiDataPower']
  const EnumUserType: typeof import('./src/constants/apiEnum')['EnumUserType']
  const EnumWebApiMethod: typeof import('./src/constants/apiEnum')['EnumWebApiMethod']
  const FastButtonMap: typeof import('./src/constants/module')['FastButtonMap']
@@ -156,7 +157,7 @@
  export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
  import('vue')
  // @ts-ignore
  export type { EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumUserType, EnumWebApiMethod } from './src/constants/apiEnum'
  export type { EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumRoleWebApiDataPower, EnumUserType, EnumWebApiMethod, EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumRoleWebApiDataPower, EnumUserType, EnumWebApiMethod } from './src/constants/apiEnum'
  import('./src/constants/apiEnum')
  // @ts-ignore
  export type { FlexWorkerEleSignEnum, FlexTaskWorkerHireEnum, FlexWorkerEleSignEnum, FlexTaskWorkerHireEnum } from './src/constants/cPerson'
@@ -210,6 +211,7 @@
    readonly EnumMenuType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumMenuType']>
    readonly EnumMenuVisitLevel: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumMenuVisitLevel']>
    readonly EnumPagedListOrder: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumPagedListOrder']>
    readonly EnumRoleWebApiDataPower: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumRoleWebApiDataPower']>
    readonly EnumUserType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserType']>
    readonly EnumWebApiMethod: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumWebApiMethod']>
    readonly FastButtonMap: UnwrapRef<typeof import('./src/constants/module')['FastButtonMap']>
pnpm-lock.yaml
@@ -21,7 +21,7 @@
    version: 1.0.3(@bole-12333/chat-kit@1.0.1)(@tiptap/core@2.1.13)(@tiptap/extension-document@2.1.13)(@tiptap/extension-image@2.1.13)(@tiptap/extension-mention@2.1.13)(@tiptap/extension-paragraph@2.1.13)(@tiptap/extension-placeholder@2.1.13)(@tiptap/extension-text@2.1.13)(@tiptap/pm@2.1.13)(@tiptap/suggestion@2.1.13)(dayjs@1.11.6)(vue@3.5.11)
  '@bole-core/components':
    specifier: latest
    version: 1.3.2(@bole-core/core@1.0.2)(@bole-core/sass-utils@0.0.1)(@element-plus/icons-vue@2.3.1)(@tanstack/vue-query@4.37.1)(@videojs-player/vue@1.0.0)(@vueuse/core@11.1.0)(@vueuse/shared@11.1.0)(dayjs@1.11.6)(element-plus@2.8.4)(lodash@4.17.21)(mitt@3.0.0)(senin-help@1.0.5)(senin-vue@1.0.4)(video.js@7.20.3)(vue-component-type-helpers@2.1.6)(vue@3.5.11)
    version: link:../boledocs-vue/packages/components
  '@bole-core/core':
    specifier: latest
    version: 1.0.2(@ywwlmm/openapi@0.0.3)(ali-oss@6.21.0)(axios@1.7.7)(dayjs@1.11.6)(element-plus@2.8.4)(file-saver@2.0.5)(jszip@3.10.1)(lodash@4.17.21)(senior-request@1.0.1)(vue-router@4.4.5)(vue@3.5.11)(xlsx-style@0.8.13)(xlsx@0.18.5)
@@ -2162,44 +2162,6 @@
      '@tiptap/suggestion': 2.1.13(@tiptap/core@2.1.13)(@tiptap/pm@2.1.13)
      dayjs: 1.11.6
      vue: 3.5.11(typescript@4.8.4)
    dev: false
  /@bole-core/components@1.3.2(@bole-core/core@1.0.2)(@bole-core/sass-utils@0.0.1)(@element-plus/icons-vue@2.3.1)(@tanstack/vue-query@4.37.1)(@videojs-player/vue@1.0.0)(@vueuse/core@11.1.0)(@vueuse/shared@11.1.0)(dayjs@1.11.6)(element-plus@2.8.4)(lodash@4.17.21)(mitt@3.0.0)(senin-help@1.0.5)(senin-vue@1.0.4)(video.js@7.20.3)(vue-component-type-helpers@2.1.6)(vue@3.5.11):
    resolution: {integrity: sha512-sMCgoaKtJi3nPP3MrMx5cs0IjI0Tbes3YJF1AHN3TItR549aYc+vb+mkU34MjWh7EzqTE40htPxJueAGT6tMWg==}
    peerDependencies:
      '@bole-core/core': '*'
      '@bole-core/sass-utils': '*'
      '@element-plus/icons-vue': '*'
      '@tanstack/vue-query': '*'
      '@videojs-player/vue': '*'
      '@vueuse/core': '*'
      '@vueuse/shared': '*'
      dayjs: ^1.11.7
      element-plus: '*'
      lodash: '*'
      mitt: '*'
      senin-help: '*'
      senin-vue: '*'
      video.js: '*'
      vue: 3.5.11
      vue-component-type-helpers: ^2.1.6
    dependencies:
      '@bole-core/core': 1.0.2(@ywwlmm/openapi@0.0.3)(ali-oss@6.21.0)(axios@1.7.7)(dayjs@1.11.6)(element-plus@2.8.4)(file-saver@2.0.5)(jszip@3.10.1)(lodash@4.17.21)(senior-request@1.0.1)(vue-router@4.4.5)(vue@3.5.11)(xlsx-style@0.8.13)(xlsx@0.18.5)
      '@bole-core/sass-utils': 0.0.1(element-plus@2.8.4)
      '@element-plus/icons-vue': 2.3.1(vue@3.5.11)
      '@tanstack/vue-query': 4.37.1(vue@3.5.11)
      '@videojs-player/vue': 1.0.0(@types/video.js@7.3.49)(video.js@7.20.3)(vue@3.5.11)
      '@vueuse/core': 11.1.0(vue@3.5.11)
      '@vueuse/shared': 11.1.0(vue@3.5.11)
      dayjs: 1.11.6
      element-plus: 2.8.4(vue@3.5.11)
      lodash: 4.17.21
      mitt: 3.0.0
      senin-help: 1.0.5(@tanstack/vue-query@4.37.1)(axios@1.7.7)(dayjs@1.11.6)(element-plus@2.8.4)(file-saver@2.0.5)(lodash@4.17.21)(semver@7.6.3)(vue@3.5.11)(xlsx-style@0.8.13)(xlsx@0.18.5)
      senin-vue: 1.0.4(@tanstack/vue-query@4.37.1)(axios@1.7.7)(dayjs@1.11.6)(element-plus@2.8.4)(file-saver@2.0.5)(lodash@4.17.21)(mitt@3.0.0)(semver@7.6.3)(senin-help@1.0.5)(vue@3.5.11)
      video.js: 7.20.3
      vue: 3.5.11(typescript@4.8.4)
      vue-component-type-helpers: 2.1.6
    dev: false
  /@bole-core/core@1.0.2(@ywwlmm/openapi@0.0.3)(ali-oss@6.21.0)(axios@1.7.7)(dayjs@1.11.6)(element-plus@2.8.4)(file-saver@2.0.5)(jszip@3.10.1)(lodash@4.17.21)(senior-request@1.0.1)(vue-router@4.4.5)(vue@3.5.11)(xlsx-style@0.8.13)(xlsx@0.18.5):
src/components/Form/CheckboxWithCustomize.vue
File was deleted
src/constants/apiEnum.ts
@@ -41,6 +41,32 @@
  Descending = 1,
}
/** 资源控制器 */
export enum EnumResourceController {
  /**数据字典 */
  Dictionary = 0,
  /**用户认证 */
  Auth = 1,
  /**用户菜单 */
  Menu = 2,
  /**用户资源 */
  Resource = 3,
  /**用户角色 */
  Role = 4,
}
/** 资源请求方式 */
export enum EnumResourceMethod {
  /**查询 */
  Get = 10,
  /**提交 */
  Post = 20,
  /**修改 */
  Put = 30,
  /**删除 */
  Delete = 40,
}
/** 角色接口数据权限 */
export enum EnumRoleWebApiDataPower {
  /**自定义 */
@@ -65,16 +91,4 @@
  Enterprise = 20,
  /**运营 */
  Operation = 100,
}
/** 接口请求方式 */
export enum EnumWebApiMethod {
  /**查询 */
  Get = 10,
  /**提交 */
  Post = 20,
  /**修改 */
  Put = 30,
  /**删除 */
  Delete = 40,
}
src/services/api/auth.ts
@@ -2,7 +2,7 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 获取阿里云OSS授权信息 GET /api/user/auth/getAliyunOSSAcs */
/** 此处后端没有提供注释 GET /api/user/auth/getAliyunOSSAcs */
export async function getAliyunOSSAcs(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetAliyunOSSAcsParams,
@@ -12,14 +12,14 @@
    method: 'GET',
    params: {
      ...params,
      query: undefined,
      ...params['query'],
      request: undefined,
      ...params['request'],
    },
    ...(options || {}),
  });
}
/** 密码登录 POST /api/user/auth/passwordLogin */
/** 此处后端没有提供注释 POST /api/user/auth/passwordLogin */
export async function passwordLogin(body: API.PasswordLoginCommand, options?: API.RequestConfig) {
  return request<API.PasswordLoginCommandCallback>('/api/user/auth/passwordLogin', {
    method: 'POST',
src/services/api/dictionary.ts
@@ -2,17 +2,20 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 获取字典数据分页列表 POST /api/main/dictionary/getDictionaryDatas */
/** 此处后端没有提供注释 POST /api/main/dictionary/getDictionaryDatas */
export async function getDictionaryDatas(
  body: API.GetDictionaryDatasQuery,
  options?: API.RequestConfig
) {
  return request<API.GetDictionaryDatasQueryResult>('/api/main/dictionary/getDictionaryDatas', {
  return request<API.PagedListQueryResultGetDictionaryDatasQueryResultItem>(
    '/api/main/dictionary/getDictionaryDatas',
    {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
    }
  );
}
src/services/api/menu.ts
@@ -2,7 +2,7 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 删除菜单 DELETE /api/user/menu/deleteMenu */
/** 此处后端没有提供注释 DELETE /api/user/menu/deleteMenu */
export async function deleteMenu(body: API.DeleteMenuCommand, options?: API.RequestConfig) {
  return request<number>('/api/user/menu/deleteMenu', {
    method: 'DELETE',
@@ -14,7 +14,7 @@
  });
}
/** 查询菜单详情 GET /api/user/menu/getMenu */
/** 此处后端没有提供注释 GET /api/user/menu/getMenu */
export async function getMenu(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetMenuParams,
@@ -29,7 +29,7 @@
  });
}
/** 查询菜单列表 GET /api/user/menu/getMenus */
/** 此处后端没有提供注释 GET /api/user/menu/getMenus */
export async function getMenus(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetMenusParams,
@@ -44,7 +44,7 @@
  });
}
/** 保存菜单 POST /api/user/menu/saveMenu */
/** 此处后端没有提供注释 POST /api/user/menu/saveMenu */
export async function saveMenu(body: API.SaveMenuCommand, options?: API.RequestConfig) {
  return request<string>('/api/user/menu/saveMenu', {
    method: 'POST',
@@ -55,3 +55,39 @@
    ...(options || {}),
  });
}
/** 此处后端没有提供注释 POST /api/user/menu/saveMenuButton */
export async function saveMenuButton(body: API.SaveMenuButtonCommand, options?: API.RequestConfig) {
  return request<string>('/api/user/menu/saveMenuButton', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 此处后端没有提供注释 POST /api/user/menu/saveMenuField */
export async function saveMenuField(body: API.SaveMenuFieldCommand, options?: API.RequestConfig) {
  return request<string>('/api/user/menu/saveMenuField', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 此处后端没有提供注释 PUT /api/user/menu/setMenuSwitch */
export async function setMenuSwitch(body: API.SetMenuSwitchCommand, options?: API.RequestConfig) {
  return request<number>('/api/user/menu/setMenuSwitch', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
src/services/api/resource.ts
@@ -2,7 +2,7 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 获取资源字段 GET /api/user/resource/getResourceFields */
/** 此处后端没有提供注释 GET /api/user/resource/getResourceFields */
export async function getResourceFields(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetResourceFieldsParams,
@@ -17,7 +17,7 @@
  });
}
/** 获取资源列表 GET /api/user/resource/getResources */
/** 此处后端没有提供注释 GET /api/user/resource/getResources */
export async function getResources(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetResourcesParams,
src/services/api/role.ts
@@ -2,7 +2,7 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 删除角色 DELETE /api/user/role/deleteRole */
/** 此处后端没有提供注释 DELETE /api/user/role/deleteRole */
export async function deleteRole(body: API.DeleteRoleCommand, options?: API.RequestConfig) {
  return request<number>('/api/user/role/deleteRole', {
    method: 'DELETE',
@@ -14,7 +14,7 @@
  });
}
/** 查询角色详情 GET /api/user/role/getRole */
/** 此处后端没有提供注释 GET /api/user/role/getRole */
export async function getRole(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetRoleParams,
@@ -29,7 +29,7 @@
  });
}
/** 查询角色列表 POST /api/user/role/getRoles */
/** 此处后端没有提供注释 POST /api/user/role/getRoles */
export async function getRoles(body: API.GetRolesQuery, options?: API.RequestConfig) {
  return request<API.PagedListQueryResultGetRolesQueryResultItem>('/api/user/role/getRoles', {
    method: 'POST',
@@ -41,7 +41,7 @@
  });
}
/** 保存角色 POST /api/user/role/saveRole */
/** 此处后端没有提供注释 POST /api/user/role/saveRole */
export async function saveRole(body: API.SaveRoleCommand, options?: API.RequestConfig) {
  return request<string>('/api/user/role/saveRole', {
    method: 'POST',
src/services/api/typings.d.ts
@@ -4,7 +4,8 @@
  }
  interface APIgetAliyunOSSAcsParams {
    query?: GetAliyunOSSAcsQuery;
    /** 获取阿里云OSS授权信息 */
    request?: GetAliyunOSSAcsQuery;
  }
  interface APIgetMenuParams {
@@ -29,10 +30,8 @@
  }
  interface APIgetResourcesParams {
    /** 微服务 */
    service?: string;
    /** 请求方式 */
    method?: EnumWebApiMethod;
    method?: EnumResourceMethod;
    /** 关键字 */
    keywords?: string;
    /** 角色Id */
@@ -88,6 +87,30 @@
    Descending = 1,
  }
  enum EnumResourceController {
    /**数据字典 */
    Dictionary = 0,
    /**用户认证 */
    Auth = 1,
    /**用户菜单 */
    Menu = 2,
    /**用户资源 */
    Resource = 3,
    /**用户角色 */
    Role = 4,
  }
  enum EnumResourceMethod {
    /**查询 */
    Get = 10,
    /**提交 */
    Post = 20,
    /**修改 */
    Put = 30,
    /**删除 */
    Delete = 40,
  }
  enum EnumRoleWebApiDataPower {
    /**自定义 */
    Custom = 1,
@@ -112,17 +135,6 @@
    Operation = 100,
  }
  enum EnumWebApiMethod {
    /**查询 */
    Get = 10,
    /**提交 */
    Post = 20,
    /**修改 */
    Put = 30,
    /**删除 */
    Delete = 40,
  }
  interface FriendlyResultGetAliyunOSSAcsQueryResult {
    /** 跟踪Id */
    traceId?: string;
@@ -131,24 +143,6 @@
    /** 错误码 */
    errorCode?: string;
    data?: GetAliyunOSSAcsQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultGetDictionaryDatasQueryResult {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    data?: GetDictionaryDatasQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
@@ -290,6 +284,24 @@
    timestamp?: number;
  }
  interface FriendlyResultPagedListQueryResultGetDictionaryDatasQueryResultItem {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    data?: PagedListQueryResultGetDictionaryDatasQueryResultItem;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultPagedListQueryResultGetRolesQueryResultItem {
    /** 跟踪Id */
    traceId?: string;
@@ -338,12 +350,6 @@
  interface GetDictionaryDatasQuery {
    pageModel?: PagedListQueryPageModel;
  }
  interface GetDictionaryDatasQueryResult {
    pageModel?: PagedListQueryResultPageModel;
    /** 数据 */
    data?: GetDictionaryDatasQueryResultItem[];
  }
  type GetDictionaryDatasQueryResultItem = Record<string, any>;
@@ -476,19 +482,24 @@
    id?: string;
    /** 是否选中(用于角色授权) */
    isChecked?: boolean;
    /** 微服务 */
    service?: string;
    controller?: EnumResourceController;
    /** 委托名称 */
    actionName?: string;
    /** 编号 */
    code?: string;
    /** 名称 */
    name?: string;
    method?: EnumWebApiMethod;
    method?: EnumResourceMethod;
    /** 路由 */
    route?: string;
    /** 请求类型名称 */
    requestTypeName?: string;
    /** 请求类型全名 */
    requestTypeFullName?: string;
    /** 响应类型名称 */
    responseTypeName?: string;
    /** 响应类型全名 */
    responseTypeFullName?: string;
  }
  interface GetRoleQueryResult {
@@ -544,6 +555,12 @@
    order?: EnumPagedListOrder;
  }
  interface PagedListQueryResultGetDictionaryDatasQueryResultItem {
    pageModel?: PagedListQueryResultPageModel;
    /** 数据 */
    data?: GetDictionaryDatasQueryResultItem[];
  }
  interface PagedListQueryResultGetRolesQueryResultItem {
    pageModel?: PagedListQueryResultPageModel;
    /** 数据 */
@@ -577,6 +594,29 @@
    accessToken?: string;
    /** 刷新令牌 */
    refreshToken?: string;
  }
  interface SaveMenuButtonCommand {
    /** Id */
    id?: string;
    /** 菜单Id */
    parentId?: string;
    /** 编号 */
    code?: string;
    /** 名称 */
    name?: string;
    /** 分组名称(用于按钮/字段) */
    group?: string;
    /** 位置(用于按钮) */
    location?: string;
    /** 图标 */
    icon?: string;
    /** 宽度(用于按钮/列/元素) */
    width?: string;
    /** 排序 */
    sort?: number;
    /** 备注 */
    remark?: string;
  }
  interface SaveMenuCommand {
@@ -656,6 +696,29 @@
    fields?: SaveMenuCommandField[];
  }
  interface SaveMenuFieldCommand {
    /** Id */
    id?: string;
    /** 菜单Id */
    parentId?: string;
    /** 编号 */
    code?: string;
    /** 名称 */
    name?: string;
    /** 分组名称(用于按钮/字段) */
    group?: string;
    /** 位置(用于按钮) */
    location?: string;
    /** 图标 */
    icon?: string;
    /** 宽度(用于按钮/列/元素) */
    width?: string;
    /** 排序 */
    sort?: number;
    /** 备注 */
    remark?: string;
  }
  interface SaveRoleCommand {
    /** Id */
    id?: string;
@@ -670,4 +733,14 @@
    /** 资源 */
    resources?: GetRoleQueryResultResource[];
  }
  interface SetMenuSwitchCommand {
    /** Id */
    ids?: string[];
    type?: EnumMenuType;
    /** 是否禁用(null时不更新) */
    isDisabled?: boolean;
    /** 是否缓存(null时不更新) */
    isCache?: boolean;
  }
}
src/views/DictionaryManage/SearchSetting.vue
@@ -88,7 +88,6 @@
import AddOrEditSearchSetting from './components/AddOrEditSearchSetting.vue';
import { convertApi2FormUrl } from '@/utils';
import { useQueryClient } from '@tanstack/vue-query';
import { useSearchSettingType } from '@/hooks';
defineOptions({
  name: 'SearchSetting',
@@ -106,9 +105,7 @@
  loading: true,
};
const queryClient = useQueryClient();
const { searchSettingTypeList: typeList } = useSearchSettingType({
  searchType: SearchType.IndustryCategory,
});
const typeList = ref([]);
const state = reactive({ ...BaseState });
onMounted(async () => {
src/views/EnterpriseManage/EnterpriseManageList.vue
@@ -69,7 +69,6 @@
import ConfigureDialog from './components/ConfigureDialog.vue';
import { OrderInputType, Message } from '@bole-core/core';
import { useQueryClient } from '@tanstack/vue-query';
import { useSearchSettingType } from '@/hooks';
defineOptions({
  name: 'EnterpriseManageList',
@@ -102,9 +101,7 @@
  loading: true,
};
const queryClient = useQueryClient();
const { searchSettingTypeList: typeList } = useSearchSettingType({
  searchType: SearchType.IndustryCategory,
});
const typeList = ref([]);
const state = reactive({ ...BaseState });
src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
@@ -196,7 +196,7 @@
} from '@bole-core/components';
import { FormRules, FormInstance } from 'element-plus';
import { SearchType } from '@/constants';
import { useRouteView, useGlobalEventContext, GlobalEvent, useSearchSettingType } from '@/hooks';
import { useRouteView, useGlobalEventContext, GlobalEvent } from '@/hooks';
import _ from 'lodash';
import { validateFormList, filterCN } from '@/utils';
import { Message, BoleRegExp } from '@bole-core/core';
@@ -224,9 +224,7 @@
const { closeViewPush } = useRouteView();
const eventContext = useGlobalEventContext();
const { searchSettingTypeList: typeList } = useSearchSettingType({
  searchType: SearchType.IndustryCategory,
});
const typeList = ref([]);
const form = reactive({
  id: '',
src/views/System/ModuleManage.vue
@@ -111,6 +111,7 @@
import _ from 'lodash';
import { useReset } from '@bole-core/core';
import * as menuServices from '@/services/api/menu';
import { DrawerTableDataItem } from './types';
defineOptions({
  name: 'ModuleManage',
@@ -181,6 +182,7 @@
const BaseState = {
  loading: true,
  searchValue: '',
  group: 'default',
};
const state = reactive({ ...BaseState });
const moduleTreeStore = ref<TreeStore<TreeModuleDtoGroupDto>>();
@@ -210,9 +212,10 @@
//drawer
const drawerVisible = ref(false);
const currentDrawerModule = ref<API.GetMenuQueryResult>({});
const drawerState = reactive<{
  type: SubModuleType;
  tableData: ValueOf<API.AllSubModule>;
  tableData: DrawerTableDataItem[];
}>({
  type: SubModuleType.PageButton,
  tableData: [],
@@ -418,19 +421,36 @@
async function openDrawer(module: TreeModuleDtoGroupDto, type: SubModuleType) {
  try {
    drawerState.type = type;
    currentDrawerModule.value = await getMenu(module.id);
    await nextTick();
    getBaseModuleGetAllSubModule(module, type);
  } catch (error) {}
}
async function getBaseModuleGetAllSubModule(module: TreeModuleDtoGroupDto, type: SubModuleType) {
  try {
    const defaultGroup = currentDrawerModule.value.groups.find((g) => g.group === 'default') ?? {};
    const menu = await getMenu(module.id);
    currentDrawerModule.value = menu;
    const currentGroup = menu.groups.find((g) => g.group === state.group) ?? {};
    if (type === SubModuleType.Column) {
      drawerState.tableData = defaultGroup.fields ?? [];
      drawerState.tableData = (currentGroup.fields ?? []).map((f) => ({
        enCode: f.code,
        name: f.name,
        sortCode: f.sort,
        width: f.width,
        isEdit: false,
        isShow: false,
        id: f.id,
      }));
    } else {
      drawerState.tableData =
        defaultGroup.buttonLocations?.find((b) => b.location === SubModuleKey[type])?.buttons ?? [];
      drawerState.tableData = (
        currentGroup.buttonLocations?.find((b) => b.location === SubModuleKey[type])?.buttons ?? []
      ).map((b) => ({
        enCode: b.code,
        name: b.name,
        sortCode: b.sort,
        width: b.width,
        isEdit: false,
        isShow: false,
        id: b.id,
      }));
    }
    drawerVisible.value = true;
  } catch (error) {}
@@ -441,17 +461,17 @@
    enCode: '',
    name: '',
    sortCode: sortCode,
    width: 0,
    width: 0 as any as string,
    isEdit: true,
    apiName: '',
    realColumn: '',
    // apiName: '',
    // realColumn: '',
    isShow: true,
  };
  drawerState.tableData?.push(baseData);
}
function getDefaultSortCode() {
  return drawerState.tableData.length > 0
    ? drawerState.tableData[drawerState.tableData.length - 1].sort + 1
    ? drawerState.tableData[drawerState.tableData.length - 1].sortCode + 1
    : 0;
}
function handleBatchAddColumn(keys: string[]) {
@@ -460,13 +480,13 @@
    enCode: key,
    name: '',
    sortCode: sortCode + index,
    width: 0,
    width: 0 as any as string,
    isEdit: true,
  }));
  drawerState.tableData?.push(...baseDataList);
}
function handleAddFastBtn(fastBtn: FastBtn) {
  let subModule: API.ModuleButtonDto | API.ModuleColumnDto = {
  let subModule: DrawerTableDataItem = {
    enCode: fastBtn.enCode,
    name: fastBtn.name,
    sortCode: getDefaultSortCode(),
@@ -477,37 +497,38 @@
  }
  handleSaveSubModule(subModule);
}
async function handleSaveSubModule(subModule: API.ModuleButtonDto | API.ModuleColumnDto) {
async function handleSaveSubModule(subModule: DrawerTableDataItem) {
  try {
    let params = {
      moduleId: currentDrawerModule.value.id,
      enCode: subModule.enCode,
    let params: API.SaveMenuFieldCommand = {
      parentId: currentDrawerModule.value.id,
      code: subModule.enCode,
      name: subModule.name,
      sortCode: subModule.sortCode,
      group: state.group,
      // location: 'string',
      width: subModule.width,
      sort: subModule.sortCode,
    };
    if (subModule.id) {
      //@ts-ignore
      params.id = subModule.id;
    }
    if (drawerState.type === SubModuleType.Column) {
      const _subModule = subModule as API.ModuleColumnDto;
      params = {
        ...params,
        //@ts-ignore
        width: _subModule.width,
        apiName: _subModule.apiName,
        realColumn: _subModule.realColumn,
        isShow: _subModule.isShow,
      };
      // const _subModule = subModule;
      // params = {
      //   ...params,
      //   //@ts-ignore
      //   width: _subModule.width,
      //   // apiName: _subModule.apiName,
      //   // realColumn: _subModule.realColumn,
      //   // isShow: _subModule.isShow,
      // };
    } else {
      //@ts-ignore
      params.buttonType = drawerState.type;
      params.location = SubModuleKey[drawerState.type];
    }
    let res = null;
    if (drawerState.type === SubModuleType.Column) {
      res = await baseModuleServices.addOrEditModuleColumn(params);
      res = await menuServices.saveMenuField(params);
    } else {
      res = await baseModuleServices.addOrEditModuleButton(params);
      res = await menuServices.saveMenuButton(params);
    }
    if (res) {
      getBaseModuleGetAllSubModule(currentDrawerModule.value, drawerState.type);
@@ -518,28 +539,25 @@
async function handelBatchSaveColumn() {
  try {
    if (drawerState.type === SubModuleType.Column) {
      let columnModuleList = drawerState.tableData as (API.ModuleColumnDto & { isEdit: boolean })[]; //.filter((d) => d.isEdit);
      let columnModuleList = drawerState.tableData; //.filter((d) => d.isEdit);
      if (columnModuleList.length > 0) {
        let params = columnModuleList.map((columnModule) => {
          let columnItem = {
            moduleId: currentDrawerModule.value.id,
            enCode: columnModule.enCode,
            name: columnModule.name,
            sortCode: columnModule.sortCode,
            apiName: columnModule.apiName,
            realColumn: columnModule.realColumn,
            isShow: columnModule.isShow,
            width: columnModule.width,
          };
          if (columnModule.id) {
            //@ts-ignore
            columnItem.id = columnModule.id;
        const groups = currentDrawerModule.value.groups.map((group) => {
          if (group.group === state.group) {
            group.fields ==
              columnModuleList.map((c) => ({
                code: c.enCode,
                name: c.name,
                width: c.width,
                sort: c.sortCode,
              }));
          }
          return columnItem;
          return group;
        });
        let res = await baseModuleServices.addModuleColumnList(params, {
          getResponse: true,
        });
        let params: API.SaveMenuCommand = {
          ...currentDrawerModule.value,
          groups: groups,
        };
        const res = await menuServices.saveMenu(params);
        if (res) {
          getBaseModuleGetAllSubModule(currentDrawerModule.value, drawerState.type);
          Message.successMessage('保存成功');
@@ -549,15 +567,12 @@
  } catch (error) {}
}
async function handleDeleteSubModule(subModule: API.ModuleButtonDto | API.ModuleColumnDto) {
async function handleDeleteSubModule(subModule: DrawerTableDataItem) {
  try {
    await Message.deleteMessage();
    let res = null;
    if (drawerState.type === SubModuleType.Column) {
      res = await baseModuleServices.deleteModuleColumn({ id: subModule.id });
    } else {
      res = await baseModuleServices.deleteModuleButton({ id: subModule.id });
    }
    let res = await menuServices.deleteMenu({
      ids: [subModule.id],
    });
    if (res) {
      Message.successMessage('删除成功');
      getBaseModuleGetAllSubModule(currentDrawerModule.value, drawerState.type);
src/views/System/components/SubModuleEditDrawer.vue
@@ -93,6 +93,7 @@
import { ProTableOperationBtn } from '@bole-core/components';
import { Message } from '@/utils';
import { ElMessageBox } from 'element-plus';
import { DrawerTableDataItem } from '../types';
defineOptions({
  name: 'SubModuleEditDrawer',
@@ -102,7 +103,7 @@
  modelValue: boolean;
  title: string;
  type: SubModuleType;
  data: ValueOf<API.AllSubModule>;
  data: DrawerTableDataItem[];
};
const props = withDefaults(defineProps<Props>(), {
@@ -126,9 +127,9 @@
  //批量添加
  (e: 'onBatchAddColumn', keys: string[]): void;
  (e: 'onAddFastBtn', fastBtn: FastBtn): void;
  (e: 'onSaveSubModule', subModule: API.ModuleButtonDto | API.ModuleColumnDto): void;
  (e: 'onSaveSubModule', subModule: DrawerTableDataItem): void;
  (e: 'onBatchSaveColumn'): void;
  (e: 'onDeleteSubModule', subModule: API.ModuleButtonDto | API.ModuleColumnDto): void;
  (e: 'onDeleteSubModule', subModule: DrawerTableDataItem): void;
}>();
const innerVisible = computed({
src/views/System/types/index.ts
New file
@@ -0,0 +1,9 @@
export type DrawerTableDataItem = {
  id?: string;
  enCode: string;
  name: string;
  sortCode: number;
  width?: string;
  isEdit?: boolean;
  isShow?: boolean;
};