fanfan il y a 2 ans
Parent
commit
c8bde8ae31

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

@@ -6,7 +6,7 @@ import { downloadByUrl } from '/@/utils/file/download';
 import { UploadFileParams } from '/#/axios';
 
 enum Api {
-  listDictModel = '/sys/dictItem/query/list',
+  listDictModel = '/sys/dictItem/query/list/abbr',
   getConfigValue = '/system/sysConfig/getConfigValue',
   getSystemTime = '/system/sysConfig/getTime',
 }
@@ -26,7 +26,10 @@ export function downloadFile(filepath: string) {
   });
 }
 
-export function uploadApi(params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) {
+export function uploadApi(
+  params: UploadFileParams,
+  onUploadProgress: (progressEvent: ProgressEvent) => void,
+) {
   return defHttp.uploadFile(
     {
       url: globSetting.apiUrl + '/common/upload',

+ 1 - 0
src/api/sys/onlineApi.ts

@@ -1,3 +1,4 @@
+import { setParams } from '/@/utils';
 import { defHttp } from '/@/utils/http/axios';
 enum Api {
   onlineForceLogout = '/online/forceLogout',

+ 1 - 0
src/api/sys/rbacMenuApi.ts

@@ -52,6 +52,7 @@ export const rbacMenuQueryList = (params?: object) => {
  * @method: POST
  */
 export const rbacMenuQueryTreeAbbr = (params?: object) => {
+  console.log('🚀 ~ file: rbacMenuApi.ts:55 ~ rbacMenuQueryTreeAbbr ~ params:', params);
   return defHttp.post({ url: Api.rbacMenuQueryTreeAbbr, params: params });
 };
 /**

+ 3 - 3
src/api/sys/rbacRoleApi.ts

@@ -62,8 +62,8 @@ export const rbacRoleRemove = (params?: object) => {
 };
 /**
  * @description: 查询角色下的权限信息,权限 - rbac:role:query
- * @method: POST
+ * @method: GET
  */
-export const rbacRoleQueryMenuTree = (params?: object) => {
-  return defHttp.post({ url: Api.rbacRoleQueryMenuTree, params: params });
+export const rbacRoleQueryMenuTree = (roleId: string) => {
+  return defHttp.get({ url: Api.rbacRoleQueryMenuTree + '/' + roleId });
 };

+ 3 - 2
src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3806176 */
   src: url('iconfont.woff2?t=1678070090615') format('woff2'),
-       url('iconfont.woff?t=1678070090615') format('woff'),
-       url('iconfont.ttf?t=1678070090615') format('truetype');
+    url('iconfont.woff?t=1678070090615') format('woff'),
+    url('iconfont.ttf?t=1678070090615') format('truetype');
 }
 
 .iconfont {
@@ -11,6 +11,7 @@
   font-style: normal;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
+  margin-right: 4px;
 }
 
 .icon-unlock:before {

+ 0 - 1
src/components/CodeEditor/src/codemirror/CodeMirror.vue

@@ -158,6 +158,5 @@
 
   onUnmounted(() => {
     editor = null;
-    editor.destroy();
   });
 </script>

+ 5 - 788
src/components/Icon/data/icons.data.ts

@@ -1,793 +1,10 @@
 export default {
   prefix: 'ant-design',
   icons: [
-    'account-book-filled',
-    'account-book-outlined',
-    'account-book-twotone',
-    'aim-outlined',
-    'alert-filled',
-    'alert-outlined',
-    'alert-twotone',
-    'alibaba-outlined',
-    'align-center-outlined',
-    'align-left-outlined',
-    'align-right-outlined',
-    'alipay-circle-filled',
-    'alipay-circle-outlined',
-    'alipay-outlined',
-    'alipay-square-filled',
-    'aliwangwang-filled',
-    'aliwangwang-outlined',
-    'aliyun-outlined',
-    'amazon-circle-filled',
-    'amazon-outlined',
-    'amazon-square-filled',
-    'android-filled',
-    'android-outlined',
-    'ant-cloud-outlined',
-    'ant-design-outlined',
-    'apartment-outlined',
-    'api-filled',
-    'api-outlined',
-    'api-twotone',
-    'apple-filled',
-    'apple-outlined',
-    'appstore-add-outlined',
-    'appstore-filled',
-    'appstore-outlined',
-    'appstore-twotone',
-    'area-chart-outlined',
-    'arrow-down-outlined',
-    'arrow-left-outlined',
-    'arrow-right-outlined',
-    'arrow-up-outlined',
-    'arrows-alt-outlined',
-    'audio-filled',
-    'audio-muted-outlined',
-    'audio-outlined',
-    'audio-twotone',
-    'audit-outlined',
-    'backward-filled',
-    'backward-outlined',
-    'bank-filled',
-    'bank-outlined',
-    'bank-twotone',
-    'bar-chart-outlined',
-    'barcode-outlined',
-    'bars-outlined',
-    'behance-circle-filled',
-    'behance-outlined',
-    'behance-square-filled',
-    'behance-square-outlined',
-    'bell-filled',
-    'bell-outlined',
-    'bell-twotone',
-    'bg-colors-outlined',
-    'block-outlined',
-    'bold-outlined',
-    'book-filled',
-    'book-outlined',
-    'book-twotone',
-    'border-bottom-outlined',
-    'border-horizontal-outlined',
-    'border-inner-outlined',
-    'border-left-outlined',
-    'border-outer-outlined',
-    'border-outlined',
-    'border-right-outlined',
-    'border-top-outlined',
-    'border-verticle-outlined',
-    'borderless-table-outlined',
-    'box-plot-filled',
-    'box-plot-outlined',
-    'box-plot-twotone',
-    'branches-outlined',
-    'bug-filled',
-    'bug-outlined',
-    'bug-twotone',
-    'build-filled',
-    'build-outlined',
-    'build-twotone',
-    'bulb-filled',
-    'bulb-outlined',
-    'bulb-twotone',
-    'calculator-filled',
-    'calculator-outlined',
-    'calculator-twotone',
-    'calendar-filled',
-    'calendar-outlined',
-    'calendar-twotone',
-    'camera-filled',
-    'camera-outlined',
-    'camera-twotone',
-    'car-filled',
-    'car-outlined',
-    'car-twotone',
-    'caret-down-filled',
-    'caret-down-outlined',
-    'caret-left-filled',
-    'caret-left-outlined',
-    'caret-right-filled',
-    'caret-right-outlined',
-    'caret-up-filled',
-    'caret-up-outlined',
-    'carry-out-filled',
-    'carry-out-outlined',
-    'carry-out-twotone',
-    'check-circle-filled',
-    'check-circle-outlined',
-    'check-circle-twotone',
-    'check-outlined',
-    'check-square-filled',
-    'check-square-outlined',
-    'check-square-twotone',
-    'chrome-filled',
-    'chrome-outlined',
-    'ci-circle-filled',
-    'ci-circle-outlined',
-    'ci-circle-twotone',
-    'ci-outlined',
-    'ci-twotone',
-    'clear-outlined',
-    'clock-circle-filled',
-    'clock-circle-outlined',
-    'clock-circle-twotone',
-    'close-circle-filled',
-    'close-circle-outlined',
-    'close-circle-twotone',
-    'close-outlined',
-    'close-square-filled',
-    'close-square-outlined',
-    'close-square-twotone',
-    'cloud-download-outlined',
-    'cloud-filled',
-    'cloud-outlined',
-    'cloud-server-outlined',
-    'cloud-sync-outlined',
-    'cloud-twotone',
-    'cloud-upload-outlined',
-    'cluster-outlined',
-    'code-filled',
-    'code-outlined',
-    'code-sandbox-circle-filled',
-    'code-sandbox-outlined',
-    'code-sandbox-square-filled',
-    'code-twotone',
-    'codepen-circle-filled',
-    'codepen-circle-outlined',
-    'codepen-outlined',
-    'codepen-square-filled',
-    'coffee-outlined',
-    'column-height-outlined',
-    'column-width-outlined',
-    'comment-outlined',
-    'compass-filled',
-    'compass-outlined',
-    'compass-twotone',
-    'compress-outlined',
-    'console-sql-outlined',
-    'contacts-filled',
-    'contacts-outlined',
-    'contacts-twotone',
-    'container-filled',
-    'container-outlined',
-    'container-twotone',
-    'control-filled',
-    'control-outlined',
-    'control-twotone',
-    'copy-filled',
-    'copy-outlined',
-    'copy-twotone',
-    'copyright-circle-filled',
-    'copyright-circle-outlined',
-    'copyright-circle-twotone',
-    'copyright-outlined',
-    'copyright-twotone',
-    'credit-card-filled',
-    'credit-card-outlined',
-    'credit-card-twotone',
-    'crown-filled',
-    'crown-outlined',
-    'crown-twotone',
-    'customer-service-filled',
-    'customer-service-outlined',
-    'customer-service-twotone',
-    'dash-outlined',
-    'dashboard-filled',
-    'dashboard-outlined',
-    'dashboard-twotone',
-    'database-filled',
-    'database-outlined',
-    'database-twotone',
-    'delete-column-outlined',
-    'delete-filled',
-    'delete-outlined',
-    'delete-row-outlined',
-    'delete-twotone',
-    'delivered-procedure-outlined',
-    'deployment-unit-outlined',
-    'desktop-outlined',
-    'diff-filled',
-    'diff-outlined',
-    'diff-twotone',
-    'dingding-outlined',
-    'dingtalk-circle-filled',
-    'dingtalk-outlined',
-    'dingtalk-square-filled',
-    'disconnect-outlined',
-    'dislike-filled',
-    'dislike-outlined',
-    'dislike-twotone',
-    'dollar-circle-filled',
-    'dollar-circle-outlined',
-    'dollar-circle-twotone',
-    'dollar-outlined',
-    'dollar-twotone',
-    'dot-chart-outlined',
-    'double-left-outlined',
-    'double-right-outlined',
-    'down-circle-filled',
-    'down-circle-outlined',
-    'down-circle-twotone',
-    'down-outlined',
-    'down-square-filled',
-    'down-square-outlined',
-    'down-square-twotone',
-    'download-outlined',
-    'drag-outlined',
-    'dribbble-circle-filled',
-    'dribbble-outlined',
-    'dribbble-square-filled',
-    'dribbble-square-outlined',
-    'dropbox-circle-filled',
-    'dropbox-outlined',
-    'dropbox-square-filled',
-    'edit-filled',
-    'edit-outlined',
-    'edit-twotone',
-    'ellipsis-outlined',
-    'enter-outlined',
-    'environment-filled',
-    'environment-outlined',
-    'environment-twotone',
-    'euro-circle-filled',
-    'euro-circle-outlined',
-    'euro-circle-twotone',
-    'euro-outlined',
-    'euro-twotone',
-    'exception-outlined',
-    'exclamation-circle-filled',
-    'exclamation-circle-outlined',
-    'exclamation-circle-twotone',
-    'exclamation-outlined',
-    'expand-alt-outlined',
-    'expand-outlined',
-    'experiment-filled',
-    'experiment-outlined',
-    'experiment-twotone',
-    'export-outlined',
-    'eye-filled',
-    'eye-invisible-filled',
-    'eye-invisible-outlined',
-    'eye-invisible-twotone',
-    'eye-outlined',
-    'eye-twotone',
-    'facebook-filled',
-    'facebook-outlined',
-    'fall-outlined',
-    'fast-backward-filled',
-    'fast-backward-outlined',
-    'fast-forward-filled',
-    'fast-forward-outlined',
-    'field-binary-outlined',
-    'field-number-outlined',
-    'field-string-outlined',
-    'field-time-outlined',
-    'file-add-filled',
-    'file-add-outlined',
-    'file-add-twotone',
-    'file-done-outlined',
-    'file-excel-filled',
-    'file-excel-outlined',
-    'file-excel-twotone',
-    'file-exclamation-filled',
-    'file-exclamation-outlined',
-    'file-exclamation-twotone',
-    'file-filled',
-    'file-gif-outlined',
-    'file-image-filled',
-    'file-image-outlined',
-    'file-image-twotone',
-    'file-jpg-outlined',
-    'file-markdown-filled',
-    'file-markdown-outlined',
-    'file-markdown-twotone',
-    'file-outlined',
-    'file-pdf-filled',
-    'file-pdf-outlined',
-    'file-pdf-twotone',
-    'file-ppt-filled',
-    'file-ppt-outlined',
-    'file-ppt-twotone',
-    'file-protect-outlined',
-    'file-search-outlined',
-    'file-sync-outlined',
-    'file-text-filled',
-    'file-text-outlined',
-    'file-text-twotone',
-    'file-twotone',
-    'file-unknown-filled',
-    'file-unknown-outlined',
-    'file-unknown-twotone',
-    'file-word-filled',
-    'file-word-outlined',
-    'file-word-twotone',
-    'file-zip-filled',
-    'file-zip-outlined',
-    'file-zip-twotone',
-    'filter-filled',
-    'filter-outlined',
-    'filter-twotone',
-    'fire-filled',
-    'fire-outlined',
-    'fire-twotone',
-    'flag-filled',
-    'flag-outlined',
-    'flag-twotone',
-    'folder-add-filled',
-    'folder-add-outlined',
-    'folder-add-twotone',
-    'folder-filled',
-    'folder-open-filled',
-    'folder-open-outlined',
-    'folder-open-twotone',
-    'folder-outlined',
-    'folder-twotone',
-    'folder-view-outlined',
-    'font-colors-outlined',
-    'font-size-outlined',
-    'fork-outlined',
-    'form-outlined',
-    'format-painter-filled',
-    'format-painter-outlined',
-    'forward-filled',
-    'forward-outlined',
-    'frown-filled',
-    'frown-outlined',
-    'frown-twotone',
-    'fullscreen-exit-outlined',
-    'fullscreen-outlined',
-    'function-outlined',
-    'fund-filled',
-    'fund-outlined',
-    'fund-projection-screen-outlined',
-    'fund-twotone',
-    'fund-view-outlined',
-    'funnel-plot-filled',
-    'funnel-plot-outlined',
-    'funnel-plot-twotone',
-    'gateway-outlined',
-    'gif-outlined',
-    'gift-filled',
-    'gift-outlined',
-    'gift-twotone',
-    'github-filled',
-    'github-outlined',
-    'gitlab-filled',
-    'gitlab-outlined',
-    'global-outlined',
-    'gold-filled',
-    'gold-outlined',
-    'gold-twotone',
-    'golden-filled',
-    'google-circle-filled',
-    'google-outlined',
-    'google-plus-circle-filled',
-    'google-plus-outlined',
-    'google-plus-square-filled',
-    'google-square-filled',
-    'group-outlined',
-    'hdd-filled',
-    'hdd-outlined',
-    'hdd-twotone',
-    'heart-filled',
-    'heart-outlined',
-    'heart-twotone',
-    'heat-map-outlined',
-    'highlight-filled',
-    'highlight-outlined',
-    'highlight-twotone',
-    'history-outlined',
-    'home-filled',
-    'home-outlined',
-    'home-twotone',
-    'hourglass-filled',
-    'hourglass-outlined',
-    'hourglass-twotone',
-    'html5-filled',
-    'html5-outlined',
-    'html5-twotone',
-    'idcard-filled',
-    'idcard-outlined',
-    'idcard-twotone',
-    'ie-circle-filled',
-    'ie-outlined',
-    'ie-square-filled',
-    'import-outlined',
-    'inbox-outlined',
-    'info-circle-filled',
-    'info-circle-outlined',
-    'info-circle-twotone',
-    'info-outlined',
-    'insert-row-above-outlined',
-    'insert-row-below-outlined',
-    'insert-row-left-outlined',
-    'insert-row-right-outlined',
-    'instagram-filled',
-    'instagram-outlined',
-    'insurance-filled',
-    'insurance-outlined',
-    'insurance-twotone',
-    'interaction-filled',
-    'interaction-outlined',
-    'interaction-twotone',
-    'issues-close-outlined',
-    'italic-outlined',
-    'key-outlined',
-    'laptop-outlined',
-    'layout-filled',
-    'layout-outlined',
-    'layout-twotone',
-    'left-circle-filled',
-    'left-circle-outlined',
-    'left-circle-twotone',
-    'left-outlined',
-    'left-square-filled',
-    'left-square-outlined',
-    'left-square-twotone',
-    'like-filled',
-    'like-outlined',
-    'like-twotone',
-    'line-chart-outlined',
-    'line-height-outlined',
-    'line-outlined',
-    'link-outlined',
-    'linkedin-filled',
-    'linkedin-outlined',
-    'loading-3-quarters-outlined',
-    'loading-outlined',
-    'lock-filled',
-    'lock-outlined',
-    'lock-twotone',
-    'login-outlined',
-    'logout-outlined',
-    'mac-command-filled',
-    'mac-command-outlined',
-    'mail-filled',
-    'mail-outlined',
-    'mail-twotone',
-    'man-outlined',
-    'medicine-box-filled',
-    'medicine-box-outlined',
-    'medicine-box-twotone',
-    'medium-circle-filled',
-    'medium-outlined',
-    'medium-square-filled',
-    'medium-workmark-outlined',
-    'meh-filled',
-    'meh-outlined',
-    'meh-twotone',
-    'menu-fold-outlined',
-    'menu-outlined',
-    'menu-unfold-outlined',
-    'merge-cells-outlined',
-    'message-filled',
-    'message-outlined',
-    'message-twotone',
-    'minus-circle-filled',
-    'minus-circle-outlined',
-    'minus-circle-twotone',
-    'minus-outlined',
-    'minus-square-filled',
-    'minus-square-outlined',
-    'minus-square-twotone',
-    'mobile-filled',
-    'mobile-outlined',
-    'mobile-twotone',
-    'money-collect-filled',
-    'money-collect-outlined',
-    'money-collect-twotone',
-    'monitor-outlined',
-    'more-outlined',
-    'node-collapse-outlined',
-    'node-expand-outlined',
-    'node-index-outlined',
-    'notification-filled',
-    'notification-outlined',
-    'notification-twotone',
-    'number-outlined',
-    'one-to-one-outlined',
-    'ordered-list-outlined',
-    'paper-clip-outlined',
-    'partition-outlined',
-    'pause-circle-filled',
-    'pause-circle-outlined',
-    'pause-circle-twotone',
-    'pause-outlined',
-    'pay-circle-filled',
-    'pay-circle-outlined',
-    'percentage-outlined',
-    'phone-filled',
-    'phone-outlined',
-    'phone-twotone',
-    'pic-center-outlined',
-    'pic-left-outlined',
-    'pic-right-outlined',
-    'picture-filled',
-    'picture-outlined',
-    'picture-twotone',
-    'pie-chart-filled',
-    'pie-chart-outlined',
-    'pie-chart-twotone',
-    'play-circle-filled',
-    'play-circle-outlined',
-    'play-circle-twotone',
-    'play-square-filled',
-    'play-square-outlined',
-    'play-square-twotone',
-    'plus-circle-filled',
-    'plus-circle-outlined',
-    'plus-circle-twotone',
-    'plus-outlined',
-    'plus-square-filled',
-    'plus-square-outlined',
-    'plus-square-twotone',
-    'pound-circle-filled',
-    'pound-circle-outlined',
-    'pound-circle-twotone',
-    'pound-outlined',
-    'poweroff-outlined',
-    'printer-filled',
-    'printer-outlined',
-    'printer-twotone',
-    'profile-filled',
-    'profile-outlined',
-    'profile-twotone',
-    'project-filled',
-    'project-outlined',
-    'project-twotone',
-    'property-safety-filled',
-    'property-safety-outlined',
-    'property-safety-twotone',
-    'pull-request-outlined',
-    'pushpin-filled',
-    'pushpin-outlined',
-    'pushpin-twotone',
-    'qq-circle-filled',
-    'qq-outlined',
-    'qq-square-filled',
-    'qrcode-outlined',
-    'question-circle-filled',
-    'question-circle-outlined',
-    'question-circle-twotone',
-    'question-outlined',
-    'radar-chart-outlined',
-    'radius-bottomleft-outlined',
-    'radius-bottomright-outlined',
-    'radius-setting-outlined',
-    'radius-upleft-outlined',
-    'radius-upright-outlined',
-    'read-filled',
-    'read-outlined',
-    'reconciliation-filled',
-    'reconciliation-outlined',
-    'reconciliation-twotone',
-    'red-envelope-filled',
-    'red-envelope-outlined',
-    'red-envelope-twotone',
-    'reddit-circle-filled',
-    'reddit-outlined',
-    'reddit-square-filled',
-    'redo-outlined',
-    'reload-outlined',
-    'rest-filled',
-    'rest-outlined',
-    'rest-twotone',
-    'retweet-outlined',
-    'right-circle-filled',
-    'right-circle-outlined',
-    'right-circle-twotone',
-    'right-outlined',
-    'right-square-filled',
-    'right-square-outlined',
-    'right-square-twotone',
-    'rise-outlined',
-    'robot-filled',
-    'robot-outlined',
-    'rocket-filled',
-    'rocket-outlined',
-    'rocket-twotone',
-    'rollback-outlined',
-    'rotate-left-outlined',
-    'rotate-right-outlined',
-    'safety-certificate-filled',
-    'safety-certificate-outlined',
-    'safety-certificate-twotone',
-    'safety-outlined',
-    'save-filled',
-    'save-outlined',
-    'save-twotone',
-    'scan-outlined',
-    'schedule-filled',
-    'schedule-outlined',
-    'schedule-twotone',
-    'scissor-outlined',
-    'search-outlined',
-    'security-scan-filled',
-    'security-scan-outlined',
-    'security-scan-twotone',
-    'select-outlined',
-    'send-outlined',
-    'setting-filled',
-    'setting-outlined',
-    'setting-twotone',
-    'shake-outlined',
-    'share-alt-outlined',
-    'shop-filled',
-    'shop-outlined',
-    'shop-twotone',
-    'shopping-cart-outlined',
-    'shopping-filled',
-    'shopping-outlined',
-    'shopping-twotone',
-    'shrink-outlined',
-    'signal-filled',
-    'sisternode-outlined',
-    'sketch-circle-filled',
-    'sketch-outlined',
-    'sketch-square-filled',
-    'skin-filled',
-    'skin-outlined',
-    'skin-twotone',
-    'skype-filled',
-    'skype-outlined',
-    'slack-circle-filled',
-    'slack-outlined',
-    'slack-square-filled',
-    'slack-square-outlined',
-    'sliders-filled',
-    'sliders-outlined',
-    'sliders-twotone',
-    'small-dash-outlined',
-    'smile-filled',
-    'smile-outlined',
-    'smile-twotone',
-    'snippets-filled',
-    'snippets-outlined',
-    'snippets-twotone',
-    'solution-outlined',
-    'sort-ascending-outlined',
-    'sort-descending-outlined',
-    'sound-filled',
-    'sound-outlined',
-    'sound-twotone',
-    'split-cells-outlined',
-    'star-filled',
-    'star-outlined',
-    'star-twotone',
-    'step-backward-filled',
-    'step-backward-outlined',
-    'step-forward-filled',
-    'step-forward-outlined',
-    'stock-outlined',
-    'stop-filled',
-    'stop-outlined',
-    'stop-twotone',
-    'strikethrough-outlined',
-    'subnode-outlined',
-    'swap-left-outlined',
-    'swap-outlined',
-    'swap-right-outlined',
-    'switcher-filled',
-    'switcher-outlined',
-    'switcher-twotone',
-    'sync-outlined',
-    'table-outlined',
-    'tablet-filled',
-    'tablet-outlined',
-    'tablet-twotone',
-    'tag-filled',
-    'tag-outlined',
-    'tag-twotone',
-    'tags-filled',
-    'tags-outlined',
-    'tags-twotone',
-    'taobao-circle-filled',
-    'taobao-circle-outlined',
-    'taobao-outlined',
-    'taobao-square-filled',
-    'team-outlined',
-    'thunderbolt-filled',
-    'thunderbolt-outlined',
-    'thunderbolt-twotone',
-    'to-top-outlined',
-    'tool-filled',
-    'tool-outlined',
-    'tool-twotone',
-    'trademark-circle-filled',
-    'trademark-circle-outlined',
-    'trademark-circle-twotone',
-    'trademark-outlined',
-    'transaction-outlined',
-    'translation-outlined',
-    'trophy-filled',
-    'trophy-outlined',
-    'trophy-twotone',
-    'twitter-circle-filled',
-    'twitter-outlined',
-    'twitter-square-filled',
-    'underline-outlined',
-    'undo-outlined',
-    'ungroup-outlined',
-    'unlock-filled',
-    'unlock-outlined',
-    'unlock-twotone',
-    'unordered-list-outlined',
-    'up-circle-filled',
-    'up-circle-outlined',
-    'up-circle-twotone',
-    'up-outlined',
-    'up-square-filled',
-    'up-square-outlined',
-    'up-square-twotone',
-    'upload-outlined',
-    'usb-filled',
-    'usb-outlined',
-    'usb-twotone',
-    'user-add-outlined',
-    'user-delete-outlined',
-    'user-outlined',
-    'user-switch-outlined',
-    'usergroup-add-outlined',
-    'usergroup-delete-outlined',
-    'verified-outlined',
-    'vertical-align-bottom-outlined',
-    'vertical-align-middle-outlined',
-    'vertical-align-top-outlined',
-    'vertical-left-outlined',
-    'vertical-right-outlined',
-    'video-camera-add-outlined',
-    'video-camera-filled',
-    'video-camera-outlined',
-    'video-camera-twotone',
-    'wallet-filled',
-    'wallet-outlined',
-    'wallet-twotone',
-    'warning-filled',
-    'warning-outlined',
-    'warning-twotone',
-    'wechat-filled',
-    'wechat-outlined',
-    'weibo-circle-filled',
-    'weibo-circle-outlined',
-    'weibo-outlined',
-    'weibo-square-filled',
-    'weibo-square-outlined',
-    'whats-app-outlined',
-    'wifi-outlined',
-    'windows-filled',
-    'windows-outlined',
-    'woman-outlined',
-    'yahoo-filled',
-    'yahoo-outlined',
-    'youtube-filled',
-    'youtube-outlined',
-    'yuque-filled',
-    'yuque-outlined',
-    'zhihu-circle-filled',
-    'zhihu-outlined',
-    'zhihu-square-filled',
-    'zoom-in-outlined',
-    'zoom-out-outlined',
+    'icon-cluster|iconfont',
+    'icon-gateway|iconfont',
+    'icon-unorderedlist|iconfont',
+    'icon-bulb|iconfont',
+    'icon-setting|iconfont',
   ],
 };

+ 23 - 3
src/components/Icon/src/Icon.vue

@@ -1,6 +1,17 @@
 <template>
-  <SvgIcon :size="size" :name="getSvgIcon" v-if="isSvgIcon" :class="[$attrs.class, 'anticon']" :spin="spin" />
-  <i v-else-if="isIconFontIcon" ref="elRef" :class="['iconfont', getIconFontIcon]" :style="getWrapStyle" />
+  <SvgIcon
+    :size="size"
+    :name="getSvgIcon"
+    v-if="isSvgIcon"
+    :class="[$attrs.class, 'anticon']"
+    :spin="spin"
+  />
+  <i
+    v-else-if="isIconFontIcon"
+    ref="elRef"
+    :class="['iconfont', getIconFontIcon]"
+    :style="getWrapStyle"
+  />
   <span
     v-else
     ref="elRef"
@@ -10,7 +21,16 @@
 </template>
 <script lang="ts">
   import type { PropType } from 'vue';
-  import { defineComponent, ref, watch, onMounted, nextTick, unref, computed, CSSProperties } from 'vue';
+  import {
+    defineComponent,
+    ref,
+    watch,
+    onMounted,
+    nextTick,
+    unref,
+    computed,
+    CSSProperties,
+  } from 'vue';
   import SvgIcon from './SvgIcon.vue';
   import { isString } from '/@/utils/is';
   import { propTypes } from '/@/utils/propTypes';

+ 27 - 9
src/components/Icon/src/IconPicker.vue

@@ -7,22 +7,31 @@
     v-model:value="currentSelect"
   >
     <template #addonAfter>
-      <a-popover placement="bottomLeft" trigger="click" v-model="visible" :overlayClassName="`${prefixCls}-popover`">
+      <a-popover
+        placement="bottomLeft"
+        trigger="click"
+        v-model="visible"
+        :overlayClassName="`${prefixCls}-popover`"
+      >
         <template #title>
           <div class="flex justify-between">
-            <a-inputs :placeholder="locales.icon.search" @change="debounceHandleSearchChange" allowClear />
+            <a-input
+              :placeholder="locales.icon.search"
+              @change="debounceHandleSearchChange"
+              allowClear
+            />
           </div>
         </template>
 
         <template #content>
           <div v-if="getPaginationList.length">
-            <ScrollContainer class="border border-solid border-t-0">
+            <ScrollContainer class="">
               <ul class="flex flex-wrap px-2">
                 <li
                   v-for="icon in getPaginationList"
                   :key="icon"
-                  :class="currentSelect === icon ? 'border border-primary' : ''"
-                  class="p-2 w-1/8 cursor-pointer mr-1 mt-1 flex justify-center items-center border border-solid hover:border-primary"
+                  :class="currentSelect === icon ? 'color color-primary' : ''"
+                  class="p-2 w-1/8 cursor-pointer mr-1 mt-1 flex justify-center items-center hover:color-primary"
                   @click="handleClick(icon)"
                   :title="icon"
                 >
@@ -47,10 +56,14 @@
           </template>
         </template>
 
-        <span class="cursor-pointer px-2 py-1 flex items-center" v-if="isSvgMode && currentSelect">
+        <span class="cursor-pointer px-2 pt-1 flex items-center" v-if="isSvgMode && currentSelect">
           <SvgIcon :name="currentSelect" />
         </span>
-        <Icon :icon="currentSelect || 'ion:apps-outline'" class="cursor-pointer px-2 py-1" v-else />
+        <Icon
+          :icon="currentSelect || 'icon-image|iconfont'"
+          class="cursor-pointer px-2 pt-1"
+          v-else
+        />
       </a-popover>
     </template>
   </a-input>
@@ -83,7 +96,8 @@
     const prefix: string = data?.prefix ?? '';
     let result: string[] = [];
     if (prefix) {
-      result = (data?.icons ?? []).map(item => `${prefix}:${item}`);
+      // result = (data?.icons ?? []).map(item => `${prefix}:${item}`);
+      result = (data?.icons ?? []).map(item => `${item}`);
     } else if (Array.isArray(iconsData)) {
       result = iconsData as string[];
     }
@@ -118,7 +132,10 @@
   const { clipboardRef, isSuccessRef } = useCopyToClipboard(props.value);
   const { createMessage } = useMessage();
 
-  const { getPaginationList, getTotal, setCurrentPage } = usePagination(currentList, props.pageSize);
+  const { getPaginationList, getTotal, setCurrentPage } = usePagination(
+    currentList,
+    props.pageSize,
+  );
 
   watchEffect(() => {
     currentSelect.value = props.value;
@@ -137,6 +154,7 @@
   }
 
   function handleClick(icon: string) {
+    console.log('🚀 ~ file: IconPicker.vue:156 ~ handleClick ~ icon:', icon);
     currentSelect.value = icon;
     if (props.copy) {
       clipboardRef.value = icon;

+ 5 - 1
src/components/Icon/src/SvgIcon.vue

@@ -1,5 +1,9 @@
 <template>
-  <svg :class="[prefixCls, $attrs.class, spin && 'svg-icon-spin']" :style="getStyle" aria-hidden="true">
+  <svg
+    :class="[prefixCls, $attrs.class, spin && 'svg-icon-spin']"
+    :style="getStyle"
+    aria-hidden="true"
+  >
     <use :xlink:href="symbolId" />
   </svg>
 </template>

+ 4 - 0
src/design/ant/index.less

@@ -74,3 +74,7 @@ span.anticon:not(.app-iconify) {
   background-color: var(--ant-primary-1);
 }
 
+
+.ant-table-tbody>tr.ant-table-row-selected>td {
+  background: var(--ant-primary-8) !important;
+}

+ 2 - 0
src/utils/cache/persistent.ts

@@ -14,6 +14,7 @@ import {
   APP_SESSION_CACHE_KEY,
   MULTIPLE_TABS_KEY,
   LOGINTYPE_KEY,
+  APP_WEBSOCKET_KEY,
 } from '/@/enums/cacheEnum';
 import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting';
 import { toRaw } from 'vue';
@@ -27,6 +28,7 @@ interface BasicStore {
   [LOCK_INFO_KEY]: LockInfo;
   [PROJ_CFG_KEY]: ProjectConfig;
   [MULTIPLE_TABS_KEY]: RouteLocationNormalized[];
+  [APP_WEBSOCKET_KEY]: string | number | null | undefined;
 }
 
 type LocalStore = BasicStore;

+ 2 - 2
src/utils/index.ts

@@ -159,13 +159,13 @@ export function transformDict(data) {
 export function commonDict(data: number | boolean | string, str?: number | null) {
   const val = data == 1 || data == true || data == 'true';
   const map = [
-    { str: null, val: ['是', '否'] },
+    { str: 0, val: ['是', '否'] },
     { str: 1, val: ['停用', '正常'] },
     { str: 2, val: ['显示', '隐藏'] },
     { str: 3, val: ['可见', '不可见'] },
     { str: 4, val: ['成功', '失败'] },
   ];
-  return map[str == null ? 0 : str].val[val ? 0 : 1];
+  return map[str == null || str == undefined ? 0 : str].val[val ? 0 : 1];
 }
 
 // 设置api传参数

+ 30 - 30
src/utils/websocket.ts

@@ -14,7 +14,7 @@ let websocketData = reactive({}) as any;
 let token = undefined;
 let loginType = undefined;
 let websocketKey = undefined;
-let isAutoReconnect = ref<Boolean | any>({
+const isAutoReconnect = ref<Boolean | any>({
   delay: 5000,
   onFailed: () => {
     setAuthCache(APP_WEBSOCKET_KEY, '');
@@ -26,7 +26,7 @@ function getBase() {
   token = getAuthCache(TOKEN_KEY);
   loginType = getAuthCache(LOGINTYPE_KEY);
   websocketKey = getAuthCache(APP_WEBSOCKET_KEY);
-  if (token == '' || token == undefined ||  loginType == undefined || loginType == '') {
+  if (token == '' || token == undefined || loginType == undefined || loginType == '') {
     return false;
   } else {
     return true;
@@ -34,7 +34,7 @@ function getBase() {
 }
 // 订阅, 默认会订阅所有主题
 export function getWebsocket() {
-  let isWebscoket = getBase();
+  const isWebscoket = getBase();
   if (!isWebscoket) return;
   const params = `?Authorization=${token}&LoginType=${loginType}`;
   // 设置 websocket 连接地址
@@ -44,13 +44,13 @@ export function getWebsocket() {
     // 创建 websocket
     websocketData = useWebSocket(setWebsocketUrl, {
       autoReconnect: isAutoReconnect,
-      onMessage: (_ws) => {
+      onMessage: _ws => {
         getSub();
       },
-      onConnected:(_ws) => {
+      onConnected: _ws => {
         setAuthCache(APP_WEBSOCKET_KEY, '1');
       },
-      onDisconnected:(_ws) => {
+      onDisconnected: _ws => {
         setAuthCache(APP_WEBSOCKET_KEY, '');
       },
       heartbeat: {
@@ -70,17 +70,17 @@ export function closeSub() {
   return { close: websocketData.close };
 }
 let getSubData = reactive({}) as any;
-let getSubTime = ref(0) as any;
+const getSubTime = ref(0) as any;
 // 获取 订阅数据
 export function getSub() {
-  let isWebscoket = getBase();
+  const isWebscoket = getBase();
   if (!isWebscoket || websocketData.data == undefined) {
     setAuthCache(APP_WEBSOCKET_KEY, '');
     getWebsocket();
-    return
-  };
+    return;
+  }
   getSubTime.value = Date.now();
-  getSubData= { 
+  getSubData = {
     data: websocketData.data?.value || '{}',
     time: getSubTime.value,
   };
@@ -88,28 +88,28 @@ export function getSub() {
   return getSubData;
 }
 
+// 用户退出
+async function isLogout(jsonData: any) {
+  const res = JSON.parse(jsonData.d);
+  // 登录过程中被踢下线或者token过期
+  if (res?.extra?.type == 'user_token_expired') {
+    createMessage.error(res?.content);
+    await userStore.logout();
+  }
+  return res;
+}
 // 筛选数据
 export async function filterSub(data: any) {
   console.log('WebSocket 过滤数据', data);
-  let jsonData = JSON.parse(data);
-  if (jsonData.s !== 3 && jsonData.s !== 1 && jsonData.d !== null) {
-    const res = JSON.parse(jsonData.d);
-    // 登录过程中被踢下线或者token过期
-    if (res?.extra?.type == 'user_token_expired') {
-      createMessage.error(res?.content);
-      await userStore.logout();
+  try {
+    const jsonData = JSON.parse(data);
+    if (jsonData.s !== 3 && jsonData.s !== 1 && jsonData.d !== null) {
+      return await isLogout(jsonData);
     }
-    return res;
-  } 
-  if (jsonData.s == 1) {
-    const res = JSON.parse(jsonData.d);
-    // 登录过程中被踢下线或者token过期
-    if (res?.extra?.type == 'user_token_expired') {
-      createMessage.error(res?.content);
-      await userStore.logout();
+    if (jsonData.s == 1) {
+      await isLogout(jsonData);
     }
-  } 
-  return null;
+  } catch (error) {
+    return null;
+  }
 }
-
-

+ 0 - 19
src/views/base/login/Login.vue

@@ -28,24 +28,6 @@
             class="relative w-full px-5 py-8 mx-auto my-auto rounded-md shadow-md xl:ml-16 xl:bg-transparent sm:px-8 xl:p-4 xl:shadow-none sm:w-3/4 lg:w-2/4 xl:w-auto enter-x"
           >
             <LoginForm />
-            <!-- <ForgetPasswordForm /> -->
-            <!-- <RegisterForm /> -->
-            <i class="iconfont icon-jwd-icon-search" />
-            <i class="iconfont icon-shop" />
-            <br />
-            <br />
-            <br />
-            <br />
-            <!-- <IconFont name="icon-tuichu" :size="32" color="blue" style="margin: 10px" /> -->
-            <!-- <IconFont name="icon-facebook" />
-            <IconFont name="icon-twitter" /> -->
-            <Icon icon="icon-facebook|iconfont" color="blue" :size="32" />
-            <Icon icon="icon-twitter|iconfont" color="red" style="margin: 10px" :size="24" />
-            <Icon icon="icon-CI|iconfont" color="red" style="margin: 10px" :size="24" />
-            <Icon icon="icon-shop|iconfont" color="red" style="margin: 10px" :size="24" />
-            <!-- <IconAntd>
-              <HomeOutlined />
-            </IconAntd> -->
           </div>
         </div>
       </div>
@@ -56,7 +38,6 @@
   import { computed } from 'vue';
   import { AppLogo } from '/@/components/Application';
   // import { IconFont, Icon, IconAntd } from '/@/components/Icon';
-  import { Icon } from '/@/components/Icon';
   // import { HomeOutlined } from '@ant-design/icons-vue';
   // import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
   import LoginForm from './LoginForm.vue';

+ 0 - 9
src/views/base/login/LoginForm.vue

@@ -25,10 +25,6 @@
       />
     </FormItem>
 
-    <FormItem name="color" class="enter-x">
-      <Input type="color" placeholder="选择颜色" class="fix-auto-fill" ref="formColor" @change="colorChange" />
-    </FormItem>
-
     <ARow class="enter-x">
       <ACol :span="12">
         <FormItem>
@@ -86,11 +82,6 @@
   const formRef = ref();
   const loading = ref(false);
   const rememberMe = ref(false);
-  const formColor = ref();
-
-  function colorChange(e) {
-    console.log('🚀 ~ file: LoginForm.vue:133 ~ colorChange ~ e', e.target.value);
-  }
 
   const formData = reactive({
     account: 'admin',

+ 61 - 0
src/views/sys/onlineUser/data.ts

@@ -0,0 +1,61 @@
+import { BasicColumn, FormSchema } from '/@/components/Table';
+// import { listDictModel } from '/@/api/common';
+export const columns: BasicColumn[] = [
+  {
+    title: '会话ID',
+    dataIndex: 'token',
+    width: 280,
+  },
+  {
+    title: '用户名',
+    dataIndex: 'username',
+    width: 150,
+  },
+  {
+    title: '登录IP地址',
+    dataIndex: 'ipAddress',
+    width: 120,
+  },
+  {
+    title: '登录地点',
+    dataIndex: 'loginLocation',
+    width: 150,
+  },
+  {
+    title: '浏览器类型',
+    dataIndex: 'browser',
+    width: 150,
+  },
+  {
+    title: '操作系统',
+    dataIndex: 'os',
+  },
+  {
+    title: '登录时间',
+    dataIndex: 'loginTime',
+    width: 160,
+  },
+];
+
+export const searchFormSchema: FormSchema[] = [
+  // {
+  //   field: 'userPlatform',
+  //   label: '用户平台',
+  //   component: 'ApiSelect',
+  //   componentProps: {
+  //     placeholder: '请选择用户平台',
+  //     api: listDictModel,
+  //     params: {
+  //       dictCode: 'sys_user_platform',
+  //     },
+  //   },
+  // },
+  {
+    field: 'username',
+    label: '用户名',
+    component: 'Input',
+    componentProps: {
+      placeholder: '请输入用户名',
+    },
+  },
+];

+ 86 - 0
src/views/sys/onlineUser/index.vue

@@ -0,0 +1,86 @@
+<template>
+  <div>
+    <BasicTable @register="registerTable">
+      <template #bodyCell="{ column, record }">
+        <template v-if="column.key === 'tenantName'">
+          <span>{{ record.sysUser?.tenantName }}</span>
+        </template>
+        <!-- <template #userPlatform="{ record }">
+        <Tag :color="record.userPlatform === 'WEB' ? 'success' : 'processing'">
+          {{ formatDictValue(sysUserPlatformOptions, record.userPlatform) }}
+        </Tag>
+      </template> -->
+        <template v-if="column.key === 'action'">
+          <TableAction
+            :actions="[
+              {
+                tooltip: '强制退出',
+                label: '强制退出',
+                color: 'error',
+                popConfirm: {
+                  title: '是否确认强制退出',
+                  confirm: handleForce.bind(null, record),
+                },
+              },
+            ]"
+          />
+        </template>
+      </template>
+    </BasicTable>
+  </div>
+</template>
+<script lang="ts" setup>
+  import { onBeforeMount, ref } from 'vue';
+  // import { Tag } from 'ant-design-vue';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { columns, searchFormSchema } from './data';
+
+  import { onlineList, onlineForceLogout } from '/@/api/sys/onlineApi';
+  import { listDictModel } from '/@/api/common';
+  // import { formatDictValue } from '/@/utils';
+
+  const sysUserPlatformOptions = ref([]);
+  onBeforeMount(async () => {
+    sysUserPlatformOptions.value = await listDictModel({ dictCode: 'sys_user_platform' });
+  });
+
+  const { createMessage } = useMessage();
+  const [registerTable, { reload }] = useTable({
+    title: '在线用户列表 ',
+    api: onlineList,
+    rowKey: 'token',
+    columns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+      autoSubmitOnEnter: true,
+      baseColProps: { xs: 24, sm: 12, md: 12, lg: 8 },
+      resetButtonOptions: {
+        preIcon: 'ant-design:delete-outlined',
+      },
+      submitButtonOptions: {
+        preIcon: 'ant-design:search-outlined',
+      },
+    },
+    showIndexColumn: true,
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    striped: true,
+    actionColumn: {
+      // auth: ['monitor:onlineUser:forceLogout'],
+      width: 80,
+      title: '操作',
+      dataIndex: 'action',
+    },
+  });
+
+  // 强制退出按钮事件
+  async function handleForce(record: Recordable) {
+    console.log(record);
+    await onlineForceLogout({ token: record.token });
+    createMessage.success('强退成功!');
+    await reload();
+  }
+</script>

+ 15 - 12
src/views/sys/sysDict/index.vue

@@ -5,11 +5,11 @@
   </PageWrapper>
 </template>
 <script lang="ts" setup>
-  import { isRef, ref, watch } from 'vue';
+  import { isRef, ref, watch, isReactive } from 'vue';
   import { PageWrapper } from '/@/components/Page';
   import SysDictTable from './sysDictTable/index.vue';
   import SysDictItemTable from './sysDictItemTable/index.vue';
-  // import { filterSub, getSub } from '/@/utils/websocket';
+  import { filterSub, getSub } from '/@/utils/websocket';
 
   defineOptions({
     name: 'sysDict',
@@ -18,17 +18,20 @@
   const dictId = ref();
   // 字典选中事件
   function handleDictChange(value) {
-    console.log('🚀 ~ file: index.vue:17 ~ handleDictChange ~ value', value);
     if (!value) return;
     dictId.value = value;
   }
-  // isRef(getSub())
-  // // console.log('🚀 ~ file: index.vue ~ line 20 ~ isGetSub', isGetSub);
-  // // 监听数据
-  // watch(()=> getSub(), async (newValue, _oldValue) => {
-  //   // console.log('🚀 ~ file: index.vue ~ line 22 ~ watch ~ _oldValue', _oldValue);
-  //   // console.log('🚀 ~ file: index.vue ~ line 22 ~ watch ~ newValue', newValue);
-  //   filterSub(newValue?.data);
-  //   // console.log('🚀 ~ file: index.vue ~ line 24 ~ watch ~ res', res);
-  // }, { deep: true });
+  const isGetSub = isReactive(getSub());
+  console.log('🚀 ~ file: index.vue ~ line 20 ~ isGetSub', isGetSub);
+  // 监听数据
+  watch(
+    () => getSub(),
+    async (newValue, _oldValue) => {
+      // console.log('🚀 ~ file: index.vue ~ line 22 ~ watch ~ _oldValue', _oldValue);
+      // console.log('🚀 ~ file: index.vue ~ line 22 ~ watch ~ newValue', newValue);
+      filterSub(newValue?.data);
+      // console.log('🚀 ~ file: index.vue ~ line 24 ~ watch ~ res', res);
+    },
+    { deep: true },
+  );
 </script>

+ 35 - 29
src/views/sys/sysDict/sysDictTable/index.vue

@@ -36,7 +36,11 @@
         </template>
       </template>
       <template #toolbar>
-        <a-button v-auth="['system:sysDict:add']" type="primary" @click="handleCreate" preIcon="icon-plus|iconfont"
+        <a-button
+          v-auth="['system:sysDict:add']"
+          type="primary"
+          @click="handleCreate"
+          preIcon="icon-plus|iconfont"
           >新增</a-button
         >
         <!-- <a-button
@@ -83,37 +87,39 @@
 
   const { createMessage, createConfirm } = useMessage();
   const [registerModal, { openModal }] = useModal();
-  const [registerTable, { reload, getDataSource, getSelectRowKeys, setSelectedRowKeys }] = useTable({
-    title: '字典列表',
-    api: SysDictQueryList,
-    rowKey: 'dictId',
-    columns,
-    rowSelection: { type: 'radio' },
-    clickToRowSelect: true,
-    formConfig: {
-      labelWidth: 120,
-      schemas: searchFormSchema,
-      autoSubmitOnEnter: true,
-      baseColProps: { span: 12 },
-      resetButtonOptions: {
-        preIcon: 'ant-design:delete-outlined',
+  const [registerTable, { reload, getDataSource, getSelectRowKeys, setSelectedRowKeys }] = useTable(
+    {
+      title: '字典列表',
+      api: SysDictQueryList,
+      rowKey: 'dictId',
+      columns,
+      rowSelection: { type: 'radio' },
+      clickToRowSelect: true,
+      formConfig: {
+        labelWidth: 120,
+        schemas: searchFormSchema,
+        autoSubmitOnEnter: true,
+        baseColProps: { span: 12 },
+        resetButtonOptions: {
+          preIcon: 'icon-delete|iconfont',
+        },
+        submitButtonOptions: {
+          preIcon: 'icon-search|iconfont',
+        },
       },
-      submitButtonOptions: {
-        preIcon: 'ant-design:search-outlined',
+      showIndexColumn: false,
+      useSearchForm: true,
+      showTableSetting: true,
+      bordered: true,
+      actionColumn: {
+        auth: ['system:sysDict:edit', 'system:sysDict:remove'],
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
       },
+      afterFetch: handleAfterFetch,
     },
-    showIndexColumn: false,
-    useSearchForm: true,
-    showTableSetting: true,
-    bordered: true,
-    actionColumn: {
-      auth: ['system:sysDict:edit', 'system:sysDict:remove'],
-      width: 80,
-      title: '操作',
-      dataIndex: 'action',
-    },
-    afterFetch: handleAfterFetch,
-  });
+  );
 
   // 新增按钮事件
   function handleCreate() {

+ 0 - 8
src/views/sys/sysMenu/sysMenuTable/data.ts

@@ -16,13 +16,11 @@ export const columns: BasicColumn[] = [
     title: '菜单类型',
     dataIndex: 'menuType',
     width: 80,
-    slots: { customRender: 'menuType' },
   },
   {
     title: '租户菜单',
     dataIndex: 'tenantMenu',
     width: 80,
-    slots: { customRender: 'tenantMenu' },
   },
   {
     title: '排序',
@@ -34,25 +32,21 @@ export const columns: BasicColumn[] = [
     title: '状态',
     dataIndex: 'disable',
     width: 80,
-    slots: { customRender: 'disable' },
   },
   {
     title: '图标',
     dataIndex: 'icon',
     width: 50,
-    slots: { customRender: 'icon' },
   },
   {
     title: '是否显示',
     dataIndex: 'visible',
     width: 80,
-    slots: { customRender: 'visible' },
   },
   {
     title: '是否缓存',
     dataIndex: 'keepalive',
     width: 80,
-    slots: { customRender: 'keepalive' },
   },
   {
     title: '路由地址',
@@ -75,13 +69,11 @@ export const columns: BasicColumn[] = [
     title: '是否外链',
     dataIndex: 'linkExternal',
     width: 80,
-    slots: { customRender: 'linkExternal' },
   },
   {
     title: '是否内嵌',
     dataIndex: 'frame',
     width: 80,
-    slots: { customRender: 'frame' },
   },
   {
     title: '外部链接',

+ 69 - 83
src/views/sys/sysMenu/sysMenuTable/index.vue

@@ -1,81 +1,78 @@
 <template>
   <div>
     <BasicTable @register="registerTable">
-      <template #menuType="{ record }">
-        <!-- <Tag color="success" v-if="record.menuType === 'dir'">
-          {{ formatDictValue(sysMenuTypeOptions, record.menuType) }}
-        </Tag>
-        <Tag color="warning" v-if="record.menuType === 'menu'">
-          {{ formatDictValue(sysMenuTypeOptions, record.menuType) }}
-        </Tag>
-        <Tag color="processing" v-if="record.menuType === 'button'">
-          {{ formatDictValue(sysMenuTypeOptions, record.menuType) }}
-        </Tag> -->
-        <Tag :color="formatDictColor(sysMenuTypeOptions, record.menuType)">
-          {{ formatDictValue(sysMenuTypeOptions, record.menuType) }}
-        </Tag>
-      </template>
-      <template #icon="{ record }">
-        <Icon :icon="record.icon" />
-      </template>
-      <template #keepalive="{ record }">
-        <Tag :color="record.keepalive ? 'success' : 'error'">
-          {{ commonDict(record.keepalive) }}
-        </Tag>
-      </template>
-      <template #linkExternal="{ record }">
-        <Tag :color="record.linkExternal ? 'success' : 'error'">
-          {{ commonDict(record.linkExternal) }}
-        </Tag>
-      </template>
-      <template #visible="{ record }">
-        <Tag :color="record.visible ? 'success' : 'error'">
-          {{ commonDict(record.visible, 2) }}
-        </Tag>
-      </template>
-      <template #tenantMenu="{ record }">
-        <Tag :color="record.tenantMenu === '1' || record.tenantMenu === 1 ? 'success' : 'error'">
-          {{ formatDictValue(sysTenantMenuOptions, String(record.tenantMenu)) }}
-        </Tag>
-      </template>
-      <template #frame="{ record }">
-        <Tag :color="record.frame ? 'success' : 'error'">
-          {{ commonDict(record.frame) }}
-        </Tag>
-      </template>
-      <template #disable="{ record }">
-        <Tag :color="record.disable ? 'error' : 'success'">
-          {{ commonDict(record.disable, 1) }}
-        </Tag>
+      <template #bodyCell="{ column, record }">
+        <template v-if="column.key === 'menuType'">
+          <Tag :color="formatDictColor(sysMenuTypeOptions, record.menuType)">
+            {{ formatDictValue(sysMenuTypeOptions, record.menuType) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'icon'">
+          <Icon :icon="record.icon" />
+        </template>
+        <template v-if="column.key === 'keepalive'">
+          <Tag :color="record.keepalive ? 'success' : 'error'">
+            {{ commonDict(record.keepalive) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'linkExternal'">
+          <Tag :color="record.linkExternal ? 'success' : 'error'">
+            {{ commonDict(record.linkExternal) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'visible'">
+          <Tag :color="record.visible ? 'success' : 'error'">
+            {{ commonDict(record.visible, 2) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'tenantMenu'">
+          <Tag :color="record.tenantMenu === '1' || record.tenantMenu === 1 ? 'success' : 'error'">
+            {{ formatDictValue(sysTenantMenuOptions, String(record.tenantMenu)) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'frame'">
+          <Tag :color="record.frame ? 'success' : 'error'">
+            {{ commonDict(record.frame) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'disable'">
+          <Tag :color="record.disable ? 'error' : 'success'">
+            {{ commonDict(record.disable, 1) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'action'">
+          <TableAction
+            :actions="[
+              {
+                auth: ['system:sysMenu:edit'],
+                icon: 'icon-edit|iconfont',
+                tooltip: '编辑',
+                onClick: handleEdit.bind(null, record),
+              },
+              {
+                auth: ['system:sysMenu:remove'],
+                icon: 'icon-delete|iconfont',
+                tooltip: '删除',
+                color: 'error',
+                popConfirm: {
+                  title: '是否确认删除',
+                  placement: 'left',
+                  confirm: handleDelete.bind(null, record),
+                },
+              },
+            ]"
+          />
+        </template>
       </template>
       <template #toolbar>
-        <a-button v-auth="['system:sysMenu:add']" type="primary" @click="handleCreate" preIcon="icon-plus|iconfont"
+        <a-button
+          v-auth="['system:sysMenu:add']"
+          type="primary"
+          @click="handleCreate"
+          preIcon="icon-plus|iconfont"
           >新增</a-button
         >
       </template>
-      <template #action="{ record }">
-        <TableAction
-          :actions="[
-            {
-              auth: ['system:sysMenu:edit'],
-              icon: 'clarity:note-edit-line',
-              tooltip: '编辑',
-              onClick: handleEdit.bind(null, record),
-            },
-            {
-              auth: ['system:sysMenu:remove'],
-              icon: 'ant-design:delete-outlined',
-              tooltip: '删除',
-              color: 'error',
-              popConfirm: {
-                title: '是否确认删除',
-                placement: 'left',
-                confirm: handleDelete.bind(null, record),
-              },
-            },
-          ]"
-        />
-      </template>
     </BasicTable>
     <FormModal @register="registerModal" @success="handleSuccess" />
   </div>
@@ -102,19 +99,9 @@
   });
 
   const sysMenuTypeOptions = ref([]);
-  const sysKeepaliveOptions = ref([]);
-  const sysLinkExternalOptions = ref([]);
-  const sysVisibleOptions = ref([]);
-  const sysFrameOptions = ref([]);
-  const sysStatusOptions = ref([]);
   const sysTenantMenuOptions = ref([]);
   onBeforeMount(async () => {
     sysMenuTypeOptions.value = await listDictModel({ dictCode: 'sys_menu_type' });
-    sysKeepaliveOptions.value = await listDictModel({ dictCode: 'sys_keepalive' });
-    sysLinkExternalOptions.value = await listDictModel({ dictCode: 'sys_link_external' });
-    sysVisibleOptions.value = await listDictModel({ dictCode: 'sys_visible' });
-    sysFrameOptions.value = await listDictModel({ dictCode: 'sys_frame' });
-    sysStatusOptions.value = await listDictModel({ dictCode: 'sys_status' });
     sysTenantMenuOptions.value = await listDictModel({ dictCode: 'sys_tenant_menu' });
   });
 
@@ -131,10 +118,10 @@
       autoSubmitOnEnter: true,
       baseColProps: { span: 8 },
       resetButtonOptions: {
-        preIcon: 'ant-design:delete-outlined',
+        preIcon: 'icon-delete|iconfont',
       },
       submitButtonOptions: {
-        preIcon: 'ant-design:search-outlined',
+        preIcon: 'icon-search|iconfont',
       },
     },
     showIndexColumn: false,
@@ -146,7 +133,6 @@
       width: 80,
       title: '操作',
       dataIndex: 'action',
-      slots: { customRender: 'action' },
     },
     beforeFetch: handleBeforeFetch,
     afterFetch: handleAfterFetch,

+ 5 - 5
src/views/sys/sysRole/FormModalAssignMenu.vue

@@ -38,18 +38,18 @@
   });
 
   const { createMessage, createConfirm } = useMessage();
-  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
+  const [registerModal, { setModalProps, closeModal }] = useModalInner(async data => {
     setModalProps({ confirmLoading: false });
     rowId.value = data.record.roleId;
     // 获取已选中列表
     const roleMenuList = (await rbacRoleQueryMenuTree(rowId.value)) || [];
     // 找出菜单的所有父节点ID
-    parentIds.value = new Set(treeData.value.map((item) => item.id))
+    parentIds.value = new Set(treeData.value.map(item => item.id));
     // 因为antd树插件勾选父节点会导致所有子节点选中,所以过滤所有父节点
     halfCheckedKeys.value = Array.from(parentIds.value);
     checkedKeys.value = roleMenuList
-      .filter((item) => !parentIds.value.has(item.parentId) && item.parentId != 0)
-      .map((item) => item.menuId);
+      .filter(item => !parentIds.value.has(item.parentId) && item.parentId != 0)
+      .map(item => item.menuId);
   });
 
   // 树节点选中事件
@@ -96,6 +96,6 @@
 
   // 查询树数据
   async function getTreeData() {
-    treeData.value = await rbacMenuQueryTreeAbbr();
+    treeData.value = await rbacMenuQueryTreeAbbr({});
   }
 </script>

+ 0 - 1
src/views/sys/sysRole/data.ts

@@ -23,7 +23,6 @@ export const columns: BasicColumn[] = [
   {
     title: '状态',
     dataIndex: 'disable',
-    slots: { customRender: 'disable' },
   },
   {
     title: '备注',

+ 5 - 5
src/views/sys/sysRole/index.vue

@@ -17,21 +17,21 @@
             :actions="[
               {
                 auth: ['system:sysRole:assignMenu'],
-                icon: 'ant-design:setting-outlined',
+                icon: 'icon-setting|iconfont',
                 tooltip: '分配菜单',
                 onClick: handleAssignMenu.bind(null, record),
                 ifShow: record.roleCode != 'admin',
               },
               {
                 auth: ['system:sysRole:edit'],
-                icon: 'clarity:note-edit-line',
+                icon: 'icon-edit|iconfont',
                 tooltip: '编辑',
                 onClick: handleEdit.bind(null, record),
                 ifShow: record.roleCode != 'admin',
               },
               {
                 auth: ['system:sysRole:remove'],
-                icon: 'ant-design:delete-outlined',
+                icon: 'icon-delete|iconfont',
                 tooltip: '删除',
                 color: 'error',
                 popConfirm: {
@@ -104,10 +104,10 @@
       autoSubmitOnEnter: true,
       baseColProps: { xs: 24, sm: 12, md: 12, lg: 8 },
       resetButtonOptions: {
-        preIcon: 'ant-design:delete-outlined',
+        preIcon: 'icon-delete|iconfont',
       },
       submitButtonOptions: {
-        preIcon: 'ant-design:search-outlined',
+        preIcon: 'icon-search|iconfont',
       },
     },
     showIndexColumn: false,

+ 0 - 2
src/views/sys/sysUser/sysUserTable/data.ts

@@ -18,7 +18,6 @@ export const columns: BasicColumn[] = [
     title: '性别',
     dataIndex: 'sex',
     width: 120,
-    slots: { customRender: 'sex' },
   },
   {
     title: '姓名',
@@ -39,7 +38,6 @@ export const columns: BasicColumn[] = [
     title: '状态',
     dataIndex: 'disable',
     width: 100,
-    slots: { customRender: 'disable' },
   },
   {
     title: '备注',

+ 53 - 54
src/views/sys/sysUser/sysUserTable/index.vue

@@ -1,29 +1,58 @@
 <template>
   <div>
     <BasicTable @register="registerTable">
-      <template #sex="{ record }">
-        <Tag color="processing" v-if="record.sex?.value === 1">
-          {{ record.sex?.text }}
-        </Tag>
-        <Tag color="error" v-if="record.sex?.value === 2">
-          {{ record.sex?.text }}
-        </Tag>
-        <Tag color="default" v-if="record.sex?.value === 3">
-          {{ record.sex?.text }}
-        </Tag>
-      </template>
-      <template #lockFlag="{ record }">
-        <Tag :color="record.lockFlag === '0' ? 'success' : 'error'">
-          {{ formatDictValue(sysLockFlagOptions, record.lockFlag) }}
-        </Tag>
-      </template>
-      <template #disable="{ record }">
-        <Tag :color="!record.disable ? 'success' : 'error'">
-          {{ commonDict(record.disable, 1) }}
-        </Tag>
+      <template #bodyCell="{ column, record }">
+        <template v-if="column.key === 'sex'">
+          <Tag :color="formatDictColor(sysSexOptions, record.sex)">
+            {{ formatDictValue(sysSexOptions, record.sex) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'lockFlag'">
+          <Tag :color="record.lockFlag === '0' ? 'success' : 'error'">
+            {{ formatDictValue(sysLockFlagOptions, record.lockFlag) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'disable'">
+          <Tag :color="!record.disable ? 'success' : 'error'">
+            {{ commonDict(record.disable, 1) }}
+          </Tag>
+        </template>
+        <template v-if="column.key === 'action'">
+          <TableAction
+            :actions="[
+              {
+                auth: ['system:sysUser:resetPwd'],
+                icon: 'icon-key|iconfont',
+                tooltip: '重置密码',
+                onClick: handleResetPwd.bind(null, record),
+              },
+              {
+                auth: ['system:sysUser:edit'],
+                icon: 'icon-edit|iconfont',
+                tooltip: '编辑',
+                onClick: handleEdit.bind(null, record),
+              },
+              {
+                auth: ['system:sysUser:remove'],
+                icon: 'icon-delete|iconfont',
+                tooltip: '删除',
+                color: 'error',
+                popConfirm: {
+                  title: '是否确认删除',
+                  placement: 'left',
+                  confirm: handleDelete.bind(null, record),
+                },
+              },
+            ]"
+          />
+        </template>
       </template>
       <template #toolbar>
-        <a-button v-auth="['system:sysUser:add']" type="primary" @click="handleCreate" preIcon="icon-plus|iconfont"
+        <a-button
+          v-auth="['system:sysUser:add']"
+          type="primary"
+          @click="handleCreate"
+          preIcon="icon-plus|iconfont"
           >新增</a-button
         >
         <!-- <a-button
@@ -34,35 +63,6 @@
           >导出</a-button
         > -->
       </template>
-      <template #action="{ record }">
-        <TableAction
-          :actions="[
-            {
-              auth: ['system:sysUser:resetPwd'],
-              icon: 'ant-design:key-outlined',
-              tooltip: '重置密码',
-              onClick: handleResetPwd.bind(null, record),
-            },
-            {
-              auth: ['system:sysUser:edit'],
-              icon: 'clarity:note-edit-line',
-              tooltip: '编辑',
-              onClick: handleEdit.bind(null, record),
-            },
-            {
-              auth: ['system:sysUser:remove'],
-              icon: 'ant-design:delete-outlined',
-              tooltip: '删除',
-              color: 'error',
-              popConfirm: {
-                title: '是否确认删除',
-                placement: 'left',
-                confirm: handleDelete.bind(null, record),
-              },
-            },
-          ]"
-        />
-      </template>
     </BasicTable>
     <FormModal @register="registerModal" @success="handleSuccess" />
     <FormModalResetPwd @register="registerModalResetPwd" @success="handleSuccess" />
@@ -80,7 +80,7 @@
 
   import { sysUserQueryList, sysUserRemove } from '/@/api/sys/sysUserApi';
   import { listDictModel } from '/@/api/common';
-  import { formatDictValue, commonDict } from '/@/utils';
+  import { formatDictValue, formatDictColor, commonDict } from '/@/utils';
 
   const sysStatusOptions = ref([]);
   const sysLockFlagOptions = ref([]);
@@ -106,10 +106,10 @@
       autoSubmitOnEnter: true,
       baseColProps: { xs: 24, sm: 12, md: 12, lg: 12, xl: 8 },
       resetButtonOptions: {
-        preIcon: 'ant-design:delete-outlined',
+        preIcon: 'icon-delete|iconfont',
       },
       submitButtonOptions: {
-        preIcon: 'ant-design:search-outlined',
+        preIcon: 'icon-search|iconfont',
       },
     },
     showIndexColumn: false,
@@ -120,7 +120,6 @@
       width: 120,
       title: '操作',
       dataIndex: 'action',
-      slots: { customRender: 'action' },
     },
   });