From 9d8ef3a592b3102c8d4133e601b31aacb91866f6 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 05 八月 2025 10:34:54 +0800
Subject: [PATCH] fix: 修改功能模块

---
 src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue |    6 
 src/services/api/resource.ts                                      |    4 
 .eslintrc-auto-import.json                                        |    1 
 src/services/api/typings.d.ts                                     |  157 ++++++++++---
 src/services/api/dictionary.ts                                    |   21 +
 pnpm-lock.yaml                                                    |   40 ---
 src/services/api/menu.ts                                          |   44 +++
 /dev/null                                                         |  128 -----------
 src/services/api/role.ts                                          |    8 
 src/views/System/ModuleManage.vue                                 |  131 ++++++-----
 auto-imports.d.ts                                                 |    4 
 src/views/System/types/index.ts                                   |    9 
 src/constants/apiEnum.ts                                          |   38 ++-
 src/views/DictionaryManage/SearchSetting.vue                      |    5 
 src/views/System/components/SubModuleEditDrawer.vue               |    7 
 src/views/EnterpriseManage/EnterpriseManageList.vue               |    5 
 src/services/api/auth.ts                                          |    8 
 17 files changed, 298 insertions(+), 318 deletions(-)

diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
index 6e37fdd..5a4d108 100644
--- a/.eslintrc-auto-import.json
+++ b/.eslintrc-auto-import.json
@@ -22,6 +22,7 @@
     "EnumMenuType": true,
     "EnumMenuVisitLevel": true,
     "EnumPagedListOrder": true,
+    "EnumRoleWebApiDataPower": true,
     "EnumUserType": true,
     "EnumWebApiMethod": true,
     "ExtractDefaultPropTypes": true,
diff --git a/auto-imports.d.ts b/auto-imports.d.ts
index 60138a0..19d3523 100644
--- a/auto-imports.d.ts
+++ b/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']>
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5987774..050443d 100644
--- a/pnpm-lock.yaml
+++ b/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):
diff --git a/src/components/Form/CheckboxWithCustomize.vue b/src/components/Form/CheckboxWithCustomize.vue
deleted file mode 100644
index 84a71a4..0000000
--- a/src/components/Form/CheckboxWithCustomize.vue
+++ /dev/null
@@ -1,128 +0,0 @@
-<template>
-  <div class="checkbox-with-extra-wrapper">
-    <ProFormCheckbox
-      v-model="innerModelValue"
-      :value-enum="checkList"
-      v-bind="$attrs"
-    ></ProFormCheckbox>
-    <div class="checkbox-with-extra-input">
-      <el-input
-        class="checkbox-with-extra-input-view"
-        v-model.trim="state.customInputValue"
-        :placeholder="`璇疯緭鍏ユ柊${extraText}`"
-        :maxlength="15"
-        :validate-event="false"
-      />
-      <el-button
-        class="checkbox-with-extra-input-button"
-        link
-        type="primary"
-        @click="handleAddExtra"
-      >
-        鏂板{{ extraText }} <el-icon> <circle-plus /> </el-icon
-      ></el-button>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { ProFormCheckbox } from '@bole-core/components';
-import { Message } from '@bole-core/core';
-import _ from 'lodash';
-import { useSearchSettingType } from '@/hooks';
-
-defineOptions({
-  name: 'CheckboxWithCustomize',
-});
-
-type Props = {
-  modelValue: string[];
-  extraText: string;
-  searchType: number;
-  cuntomizeSearchType: number;
-  belongType?: number;
-};
-
-const props = withDefaults(defineProps<Props>(), {});
-const state = reactive({
-  customInputValue: '',
-});
-
-const { searchSettingTypeList: typeList } = useSearchSettingType({
-  searchType: props.searchType,
-  belongType: props.belongType,
-});
-const { searchSettingTypeList: cuntomizeList, refetchSearchSettingType } = useSearchSettingType({
-  searchType: props.cuntomizeSearchType,
-  belongType: props.belongType,
-});
-
-const emit = defineEmits<{
-  (e: 'update:modelValue', val: string[]): void;
-  (e: 'handleChange'): void;
-}>();
-
-const innerModelValue = computed({
-  get() {
-    return props.modelValue;
-  },
-  set(val) {
-    emit('update:modelValue', val);
-  },
-});
-
-const checkList = computed(() => {
-  return typeList.value.concat(cuntomizeList.value);
-});
-
-const handleAddExtra = _.debounce(
-  async () => {
-    if (!state.customInputValue) {
-      Message.warnMessage(`璇疯緭鍏ユ柊${props.extraText}`);
-      return;
-    }
-    await createExtra();
-  },
-  1000,
-  {
-    leading: true,
-    trailing: false,
-  }
-);
-async function createExtra() {
-  try {
-    // let params: API.CreateOrEditSearchInput = {
-    //   searchType: props.cuntomizeSearchType,
-    //   belongType: props.belongType,
-    //   name: state.customInputValue,
-    //   sort: cuntomizeList.value.length + 1,
-    //   status: true,
-    //   src: '',
-    // };
-    // let res = await searchSettingServices.createOrEditSearchSetting(params);
-    // if (res) {
-    //   refetchSearchSettingType();
-    // }
-  } catch (error) {}
-}
-</script>
-
-<style lang="scss" scoped>
-@use '@/style/common.scss' as *;
-
-.checkbox-with-extra-wrapper {
-  display: inline-flex;
-  align-items: flex-start;
-  width: 100%;
-
-  .checkbox-with-extra-input {
-    display: inline-flex;
-    margin-left: 10px;
-    width: 250px;
-
-    .checkbox-with-extra-input-view {
-      width: 150px;
-    }
-  }
-}
-</style>
diff --git a/src/constants/apiEnum.ts b/src/constants/apiEnum.ts
index eeb9c95..a1f0c28 100644
--- a/src/constants/apiEnum.ts
+++ b/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,
 }
diff --git a/src/services/api/auth.ts b/src/services/api/auth.ts
index 5c04818..ddc31b1 100644
--- a/src/services/api/auth.ts
+++ b/src/services/api/auth.ts
@@ -2,7 +2,7 @@
 // @ts-ignore
 import { request } from '@/utils/request';
 
-/** 鑾峰彇闃块噷浜慜SS鎺堟潈淇℃伅 GET /api/user/auth/getAliyunOSSAcs */
+/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 GET /api/user/auth/getAliyunOSSAcs */
 export async function getAliyunOSSAcs(
   // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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',
diff --git a/src/services/api/dictionary.ts b/src/services/api/dictionary.ts
index 8ceca42..2ffaa0f 100644
--- a/src/services/api/dictionary.ts
+++ b/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', {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json-patch+json',
-    },
-    data: body,
-    ...(options || {}),
-  });
+  return request<API.PagedListQueryResultGetDictionaryDatasQueryResultItem>(
+    '/api/main/dictionary/getDictionaryDatas',
+    {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json-patch+json',
+      },
+      data: body,
+      ...(options || {}),
+    }
+  );
 }
diff --git a/src/services/api/menu.ts b/src/services/api/menu.ts
index 04034d5..9823244 100644
--- a/src/services/api/menu.ts
+++ b/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(
   // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
   params: API.APIgetMenuParams,
@@ -29,7 +29,7 @@
   });
 }
 
-/** 鏌ヨ鑿滃崟鍒楄〃 GET /api/user/menu/getMenus */
+/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 GET /api/user/menu/getMenus */
 export async function getMenus(
   // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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 || {}),
+  });
+}
diff --git a/src/services/api/resource.ts b/src/services/api/resource.ts
index dc3ef94..f01100b 100644
--- a/src/services/api/resource.ts
+++ b/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(
   // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
   params: API.APIgetResourceFieldsParams,
@@ -17,7 +17,7 @@
   });
 }
 
-/** 鑾峰彇璧勬簮鍒楄〃 GET /api/user/resource/getResources */
+/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 GET /api/user/resource/getResources */
 export async function getResources(
   // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
   params: API.APIgetResourcesParams,
diff --git a/src/services/api/role.ts b/src/services/api/role.ts
index 13b983d..765dcfe 100644
--- a/src/services/api/role.ts
+++ b/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(
   // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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',
diff --git a/src/services/api/typings.d.ts b/src/services/api/typings.d.ts
index 8510633..d97b45f 100644
--- a/src/services/api/typings.d.ts
+++ b/src/services/api/typings.d.ts
@@ -4,7 +4,8 @@
   }
 
   interface APIgetAliyunOSSAcsParams {
-    query?: GetAliyunOSSAcsQuery;
+    /** 鑾峰彇闃块噷浜慜SS鎺堟潈淇℃伅 */
+    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;
+    /** 鏄惁绂佺敤锛坣ull鏃朵笉鏇存柊锛� */
+    isDisabled?: boolean;
+    /** 鏄惁缂撳瓨锛坣ull鏃朵笉鏇存柊锛� */
+    isCache?: boolean;
+  }
 }
diff --git a/src/views/DictionaryManage/SearchSetting.vue b/src/views/DictionaryManage/SearchSetting.vue
index ebb9317..460cf06 100644
--- a/src/views/DictionaryManage/SearchSetting.vue
+++ b/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 () => {
diff --git a/src/views/EnterpriseManage/EnterpriseManageList.vue b/src/views/EnterpriseManage/EnterpriseManageList.vue
index b0f20e4..0e4796d 100644
--- a/src/views/EnterpriseManage/EnterpriseManageList.vue
+++ b/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 });
 
diff --git a/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue b/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
index 2a0d609..84c2d09 100644
--- a/src/views/EnterpriseManage/components/AddOrEditEnterpriseView.vue
+++ b/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: '',
diff --git a/src/views/System/ModuleManage.vue b/src/views/System/ModuleManage.vue
index 5389d40..d07ec24 100644
--- a/src/views/System/ModuleManage.vue
+++ b/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);
diff --git a/src/views/System/components/SubModuleEditDrawer.vue b/src/views/System/components/SubModuleEditDrawer.vue
index a39c1d7..91615c5 100644
--- a/src/views/System/components/SubModuleEditDrawer.vue
+++ b/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({
diff --git a/src/views/System/types/index.ts b/src/views/System/types/index.ts
new file mode 100644
index 0000000..f1a7fe9
--- /dev/null
+++ b/src/views/System/types/index.ts
@@ -0,0 +1,9 @@
+export type DrawerTableDataItem = {
+  id?: string;
+  enCode: string;
+  name: string;
+  sortCode: number;
+  width?: string;
+  isEdit?: boolean;
+  isShow?: boolean;
+};

--
Gitblit v1.9.1