@airpower/web 0.4.3 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
1
|
import { defineComponent, createElementBlock, openBlock, createElementVNode, computed, resolveComponent, createBlock, mergeProps, toHandlers, withCtx, renderSlot, unref, createVNode, createTextVNode, toDisplayString, ref, withModifiers, normalizeClass, onMounted, watch, resolveDirective, Transition, normalizeStyle, withDirectives, createCommentVNode, nextTick, inject, shallowRef, shallowReactive, reactive, h, provide, getCurrentInstance, watchEffect, Fragment, renderList, vShow, useSlots, createSlots, createApp, onUpdated, mergeModels, useModel, withKeys } from "vue";
|
|
5
2
|
import ElementPlus, { ElButton, ElMessage, ElMessageBox, ElIcon, ElEmpty, ElFormItem, ElSubMenu, ElMenuItem, ElPagination, ElPopover, ElRadioGroup, ElRadioButton, ElInput, ElUpload, ElLink, ElTabPane, ElCheckTag, ElSelect, ElOption, ElTable, ElTableColumn } from "element-plus";
|
|
6
3
|
import axios from "axios";
|
|
@@ -606,6 +603,137 @@ var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
|
|
|
606
603
|
return HttpStatus2;
|
|
607
604
|
})(HttpStatus || {});
|
|
608
605
|
class WebConfig {
|
|
606
|
+
/**
|
|
607
|
+
* ### 应用标识
|
|
608
|
+
*/
|
|
609
|
+
static appKey = "AirPower";
|
|
610
|
+
/**
|
|
611
|
+
* ### 是否自动处理权限前缀
|
|
612
|
+
*/
|
|
613
|
+
static autoPermissionPrefix = true;
|
|
614
|
+
/**
|
|
615
|
+
* ### 最大文本域长度
|
|
616
|
+
*/
|
|
617
|
+
static maxTextAreaLength = 200;
|
|
618
|
+
/**
|
|
619
|
+
* ### 最大文本长度
|
|
620
|
+
*/
|
|
621
|
+
static maxTextLength = 50;
|
|
622
|
+
/**
|
|
623
|
+
* ### 文本域的最小行数
|
|
624
|
+
*/
|
|
625
|
+
static textareaMinRows = 3;
|
|
626
|
+
/**
|
|
627
|
+
* ### 文本域的最大行数
|
|
628
|
+
*/
|
|
629
|
+
static textareaMaxRows = 6;
|
|
630
|
+
/**
|
|
631
|
+
* ### 上传地址
|
|
632
|
+
*/
|
|
633
|
+
static uploadUrl = "/upload";
|
|
634
|
+
/**
|
|
635
|
+
* ### 是否禁用权限
|
|
636
|
+
*
|
|
637
|
+
* - 如此项配置为 `true`, 则所有自动处理权限的功能都将失效。
|
|
638
|
+
*/
|
|
639
|
+
static disablePermission = false;
|
|
640
|
+
/**
|
|
641
|
+
* ### 金额方向 (向上取、向下取、四舍五入)
|
|
642
|
+
*/
|
|
643
|
+
static moneyDirection = "down";
|
|
644
|
+
/**
|
|
645
|
+
* ### 金额精度
|
|
646
|
+
*/
|
|
647
|
+
static moneyPrecision = 2;
|
|
648
|
+
/**
|
|
649
|
+
* ### 每页显示条数可选项
|
|
650
|
+
*/
|
|
651
|
+
static pageSizes = [10, 20, 50, 100];
|
|
652
|
+
/**
|
|
653
|
+
* ### 默认的上传文件名称
|
|
654
|
+
*/
|
|
655
|
+
static uploadFileName = "file";
|
|
656
|
+
/**
|
|
657
|
+
* ### element-plus 语言包
|
|
658
|
+
*/
|
|
659
|
+
static elementPlusLocale = zhCn;
|
|
660
|
+
/**
|
|
661
|
+
* ### 权限缓存 `Key`
|
|
662
|
+
*/
|
|
663
|
+
static permissionCacheKey = "permissions";
|
|
664
|
+
/**
|
|
665
|
+
* ### 接口根地址
|
|
666
|
+
* 以 `/` 结尾
|
|
667
|
+
*/
|
|
668
|
+
static apiUrl = "/api/";
|
|
669
|
+
/**
|
|
670
|
+
* ### 最大数字
|
|
671
|
+
*/
|
|
672
|
+
static maxNumber = 999999999;
|
|
673
|
+
/**
|
|
674
|
+
* ### 最小数字
|
|
675
|
+
*/
|
|
676
|
+
static minNumber = 0;
|
|
677
|
+
/**
|
|
678
|
+
* ### `AccessToken` 对应的 `Key`
|
|
679
|
+
*/
|
|
680
|
+
static authorizationHeaderKey = HttpHeader.AUTHORIZATION;
|
|
681
|
+
/**
|
|
682
|
+
* ### 全局 `http` 请求返回 成功状态码
|
|
683
|
+
*/
|
|
684
|
+
static successCode = HttpStatus.OK;
|
|
685
|
+
/**
|
|
686
|
+
* ### 全局 `http` 请求返回 登录状态码
|
|
687
|
+
*/
|
|
688
|
+
static unAuthorizeCode = HttpStatus.UNAUTHORIZED;
|
|
689
|
+
/**
|
|
690
|
+
* ### 超时时间 毫秒
|
|
691
|
+
* 超时后请求会自动断开并抛出异常
|
|
692
|
+
*/
|
|
693
|
+
static timeout = 5e3;
|
|
694
|
+
/**
|
|
695
|
+
* ### 导出模板地址
|
|
696
|
+
*/
|
|
697
|
+
static importTemplateUrl = "/export/template";
|
|
698
|
+
/**
|
|
699
|
+
* ### 导入API地址
|
|
700
|
+
*/
|
|
701
|
+
static importUrl = "/import";
|
|
702
|
+
/**
|
|
703
|
+
* ### 导出API地址
|
|
704
|
+
*/
|
|
705
|
+
static exportUrl = "/export";
|
|
706
|
+
/**
|
|
707
|
+
* ### 导出查询API地址
|
|
708
|
+
*/
|
|
709
|
+
static exportQueryUrl = "/queryExport";
|
|
710
|
+
/**
|
|
711
|
+
* ### 静态资源地址
|
|
712
|
+
*/
|
|
713
|
+
static staticUrl = "/static";
|
|
714
|
+
/**
|
|
715
|
+
* ### 登录地址
|
|
716
|
+
*/
|
|
717
|
+
static loginUrl = "/login";
|
|
718
|
+
/**
|
|
719
|
+
* ### 小数精度位数
|
|
720
|
+
*/
|
|
721
|
+
static numberPrecision = 2;
|
|
722
|
+
/**
|
|
723
|
+
* ### 是否超时
|
|
724
|
+
*/
|
|
725
|
+
static isTimeout = false;
|
|
726
|
+
/**
|
|
727
|
+
* ### 产品名称
|
|
728
|
+
*/
|
|
729
|
+
static product = "AirPower";
|
|
730
|
+
/**
|
|
731
|
+
* ### 树形控件属性
|
|
732
|
+
*/
|
|
733
|
+
static treeProps = {
|
|
734
|
+
children: "children",
|
|
735
|
+
label: "name"
|
|
736
|
+
};
|
|
609
737
|
/**
|
|
610
738
|
* ### 获取身份令牌
|
|
611
739
|
*/
|
|
@@ -626,137 +754,6 @@ class WebConfig {
|
|
|
626
754
|
localStorage.setItem(this.authorizationHeaderKey, accessToken);
|
|
627
755
|
}
|
|
628
756
|
}
|
|
629
|
-
/**
|
|
630
|
-
* ### 应用标识
|
|
631
|
-
*/
|
|
632
|
-
__publicField(WebConfig, "appKey", "AirPower");
|
|
633
|
-
/**
|
|
634
|
-
* ### 是否自动处理权限前缀
|
|
635
|
-
*/
|
|
636
|
-
__publicField(WebConfig, "autoPermissionPrefix", true);
|
|
637
|
-
/**
|
|
638
|
-
* ### 最大文本域长度
|
|
639
|
-
*/
|
|
640
|
-
__publicField(WebConfig, "maxTextAreaLength", 200);
|
|
641
|
-
/**
|
|
642
|
-
* ### 最大文本长度
|
|
643
|
-
*/
|
|
644
|
-
__publicField(WebConfig, "maxTextLength", 50);
|
|
645
|
-
/**
|
|
646
|
-
* ### 文本域的最小行数
|
|
647
|
-
*/
|
|
648
|
-
__publicField(WebConfig, "textareaMinRows", 3);
|
|
649
|
-
/**
|
|
650
|
-
* ### 文本域的最大行数
|
|
651
|
-
*/
|
|
652
|
-
__publicField(WebConfig, "textareaMaxRows", 6);
|
|
653
|
-
/**
|
|
654
|
-
* ### 上传地址
|
|
655
|
-
*/
|
|
656
|
-
__publicField(WebConfig, "uploadUrl", "/upload");
|
|
657
|
-
/**
|
|
658
|
-
* ### 是否禁用权限
|
|
659
|
-
*
|
|
660
|
-
* - 如此项配置为 `true`, 则所有自动处理权限的功能都将失效。
|
|
661
|
-
*/
|
|
662
|
-
__publicField(WebConfig, "disablePermission", false);
|
|
663
|
-
/**
|
|
664
|
-
* ### 金额方向 (向上取、向下取、四舍五入)
|
|
665
|
-
*/
|
|
666
|
-
__publicField(WebConfig, "moneyDirection", "down");
|
|
667
|
-
/**
|
|
668
|
-
* ### 金额精度
|
|
669
|
-
*/
|
|
670
|
-
__publicField(WebConfig, "moneyPrecision", 2);
|
|
671
|
-
/**
|
|
672
|
-
* ### 每页显示条数可选项
|
|
673
|
-
*/
|
|
674
|
-
__publicField(WebConfig, "pageSizes", [10, 20, 50, 100]);
|
|
675
|
-
/**
|
|
676
|
-
* ### 默认的上传文件名称
|
|
677
|
-
*/
|
|
678
|
-
__publicField(WebConfig, "uploadFileName", "file");
|
|
679
|
-
/**
|
|
680
|
-
* ### element-plus 语言包
|
|
681
|
-
*/
|
|
682
|
-
__publicField(WebConfig, "elementPlusLocale", zhCn);
|
|
683
|
-
/**
|
|
684
|
-
* ### 权限缓存 `Key`
|
|
685
|
-
*/
|
|
686
|
-
__publicField(WebConfig, "permissionCacheKey", "permissions");
|
|
687
|
-
/**
|
|
688
|
-
* ### 接口根地址
|
|
689
|
-
* 以 `/` 结尾
|
|
690
|
-
*/
|
|
691
|
-
__publicField(WebConfig, "apiUrl", "/api/");
|
|
692
|
-
/**
|
|
693
|
-
* ### 最大数字
|
|
694
|
-
*/
|
|
695
|
-
__publicField(WebConfig, "maxNumber", 999999999);
|
|
696
|
-
/**
|
|
697
|
-
* ### 最小数字
|
|
698
|
-
*/
|
|
699
|
-
__publicField(WebConfig, "minNumber", 0);
|
|
700
|
-
/**
|
|
701
|
-
* ### `AccessToken` 对应的 `Key`
|
|
702
|
-
*/
|
|
703
|
-
__publicField(WebConfig, "authorizationHeaderKey", HttpHeader.AUTHORIZATION);
|
|
704
|
-
/**
|
|
705
|
-
* ### 全局 `http` 请求返回 成功状态码
|
|
706
|
-
*/
|
|
707
|
-
__publicField(WebConfig, "successCode", HttpStatus.OK);
|
|
708
|
-
/**
|
|
709
|
-
* ### 全局 `http` 请求返回 登录状态码
|
|
710
|
-
*/
|
|
711
|
-
__publicField(WebConfig, "unAuthorizeCode", HttpStatus.UNAUTHORIZED);
|
|
712
|
-
/**
|
|
713
|
-
* ### 超时时间 毫秒
|
|
714
|
-
* 超时后请求会自动断开并抛出异常
|
|
715
|
-
*/
|
|
716
|
-
__publicField(WebConfig, "timeout", 5e3);
|
|
717
|
-
/**
|
|
718
|
-
* ### 导出模板地址
|
|
719
|
-
*/
|
|
720
|
-
__publicField(WebConfig, "importTemplateUrl", "/export/template");
|
|
721
|
-
/**
|
|
722
|
-
* ### 导入API地址
|
|
723
|
-
*/
|
|
724
|
-
__publicField(WebConfig, "importUrl", "/import");
|
|
725
|
-
/**
|
|
726
|
-
* ### 导出API地址
|
|
727
|
-
*/
|
|
728
|
-
__publicField(WebConfig, "exportUrl", "/export");
|
|
729
|
-
/**
|
|
730
|
-
* ### 导出查询API地址
|
|
731
|
-
*/
|
|
732
|
-
__publicField(WebConfig, "exportQueryUrl", "/queryExport");
|
|
733
|
-
/**
|
|
734
|
-
* ### 静态资源地址
|
|
735
|
-
*/
|
|
736
|
-
__publicField(WebConfig, "staticUrl", "/static");
|
|
737
|
-
/**
|
|
738
|
-
* ### 登录地址
|
|
739
|
-
*/
|
|
740
|
-
__publicField(WebConfig, "loginUrl", "/login");
|
|
741
|
-
/**
|
|
742
|
-
* ### 小数精度位数
|
|
743
|
-
*/
|
|
744
|
-
__publicField(WebConfig, "numberPrecision", 2);
|
|
745
|
-
/**
|
|
746
|
-
* ### 是否超时
|
|
747
|
-
*/
|
|
748
|
-
__publicField(WebConfig, "isTimeout", false);
|
|
749
|
-
/**
|
|
750
|
-
* ### 产品名称
|
|
751
|
-
*/
|
|
752
|
-
__publicField(WebConfig, "product", "AirPower");
|
|
753
|
-
/**
|
|
754
|
-
* ### 树形控件属性
|
|
755
|
-
*/
|
|
756
|
-
__publicField(WebConfig, "treeProps", {
|
|
757
|
-
children: "children",
|
|
758
|
-
label: "name"
|
|
759
|
-
});
|
|
760
757
|
class Transformer {
|
|
761
758
|
/**
|
|
762
759
|
* ### 从 `JSON` 转换到当前类的对象
|
|
@@ -1132,6 +1129,10 @@ var PermissionAction = /* @__PURE__ */ ((PermissionAction2) => {
|
|
|
1132
1129
|
return PermissionAction2;
|
|
1133
1130
|
})(PermissionAction || {});
|
|
1134
1131
|
class PermissionUtil {
|
|
1132
|
+
/**
|
|
1133
|
+
* ### 权限列表
|
|
1134
|
+
*/
|
|
1135
|
+
static permissionList = [];
|
|
1135
1136
|
/**
|
|
1136
1137
|
* ### 获取权限标识
|
|
1137
1138
|
* - 如 `action` 对应装饰的 `xxxPermission` 是空字符串,则表示无需权限,否则:
|
|
@@ -1154,15 +1155,15 @@ class PermissionUtil {
|
|
|
1154
1155
|
let permission;
|
|
1155
1156
|
const modelConfig = getModelConfig(EntityClass);
|
|
1156
1157
|
const actionRecord = {
|
|
1157
|
-
[PermissionAction.ADD]: modelConfig
|
|
1158
|
-
[PermissionAction.DELETE]: modelConfig
|
|
1159
|
-
[PermissionAction.EDIT]: modelConfig
|
|
1160
|
-
[PermissionAction.DETAIL]: modelConfig
|
|
1161
|
-
[PermissionAction.ADD_CHILD]: modelConfig
|
|
1162
|
-
[PermissionAction.EXPORT]: modelConfig
|
|
1163
|
-
[PermissionAction.IMPORT]: modelConfig
|
|
1164
|
-
[PermissionAction.DISABLE]: modelConfig
|
|
1165
|
-
[PermissionAction.ENABLE]: modelConfig
|
|
1158
|
+
[PermissionAction.ADD]: modelConfig?.addPermission,
|
|
1159
|
+
[PermissionAction.DELETE]: modelConfig?.deletePermission,
|
|
1160
|
+
[PermissionAction.EDIT]: modelConfig?.editPermission,
|
|
1161
|
+
[PermissionAction.DETAIL]: modelConfig?.detailPermission,
|
|
1162
|
+
[PermissionAction.ADD_CHILD]: modelConfig?.addChildPermission,
|
|
1163
|
+
[PermissionAction.EXPORT]: modelConfig?.exportPermission,
|
|
1164
|
+
[PermissionAction.IMPORT]: modelConfig?.importPermission,
|
|
1165
|
+
[PermissionAction.DISABLE]: modelConfig?.disablePermission,
|
|
1166
|
+
[PermissionAction.ENABLE]: modelConfig?.enablePermission
|
|
1166
1167
|
};
|
|
1167
1168
|
const keys = Object.keys(actionRecord);
|
|
1168
1169
|
if (keys.includes(action)) {
|
|
@@ -1176,7 +1177,7 @@ class PermissionUtil {
|
|
|
1176
1177
|
if (permission === void 0) {
|
|
1177
1178
|
permission = action;
|
|
1178
1179
|
}
|
|
1179
|
-
let prefix = modelConfig
|
|
1180
|
+
let prefix = modelConfig?.permissionPrefix;
|
|
1180
1181
|
if (prefix === "") {
|
|
1181
1182
|
return permission;
|
|
1182
1183
|
}
|
|
@@ -1217,10 +1218,6 @@ class PermissionUtil {
|
|
|
1217
1218
|
return this.permissionList.includes(permission);
|
|
1218
1219
|
}
|
|
1219
1220
|
}
|
|
1220
|
-
/**
|
|
1221
|
-
* ### 权限列表
|
|
1222
|
-
*/
|
|
1223
|
-
__publicField(PermissionUtil, "permissionList", []);
|
|
1224
1221
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1225
1222
|
__name: "Button",
|
|
1226
1223
|
props: {
|
|
@@ -1360,7 +1357,12 @@ function getAugmentedNamespace(n) {
|
|
|
1360
1357
|
var f = n.default;
|
|
1361
1358
|
if (typeof f == "function") {
|
|
1362
1359
|
var a = function a2() {
|
|
1363
|
-
|
|
1360
|
+
var isInstance = false;
|
|
1361
|
+
try {
|
|
1362
|
+
isInstance = this instanceof a2;
|
|
1363
|
+
} catch {
|
|
1364
|
+
}
|
|
1365
|
+
if (isInstance) {
|
|
1364
1366
|
return Reflect.construct(f, arguments, this.constructor);
|
|
1365
1367
|
}
|
|
1366
1368
|
return f.apply(this, arguments);
|
|
@@ -2054,9 +2056,6 @@ const useClipboard = (opts) => {
|
|
|
2054
2056
|
}
|
|
2055
2057
|
};
|
|
2056
2058
|
};
|
|
2057
|
-
var __defProp$6 = Object.defineProperty;
|
|
2058
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2059
|
-
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2060
2059
|
var Language = /* @__PURE__ */ ((Language2) => {
|
|
2061
2060
|
Language2["English"] = "English";
|
|
2062
2061
|
Language2["ChineseSimplified"] = "简体中文";
|
|
@@ -2075,31 +2074,40 @@ var Language = /* @__PURE__ */ ((Language2) => {
|
|
|
2075
2074
|
Language2["Italian"] = "Italiano";
|
|
2076
2075
|
return Language2;
|
|
2077
2076
|
})(Language || {});
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2077
|
+
class I18n {
|
|
2078
|
+
/**
|
|
2079
|
+
* ### 当前使用的语言包
|
|
2080
|
+
*/
|
|
2081
|
+
static currentLanguage;
|
|
2082
|
+
/**
|
|
2083
|
+
* ### 语言列表
|
|
2084
|
+
*/
|
|
2085
|
+
static languages = [];
|
|
2086
|
+
/**
|
|
2087
|
+
* ### 语言名称
|
|
2088
|
+
*/
|
|
2089
|
+
language = Language.ChineseSimplified;
|
|
2082
2090
|
/**
|
|
2083
2091
|
* ### 获取当前使用的语言
|
|
2084
2092
|
* @returns 当前使用的语言
|
|
2085
2093
|
*/
|
|
2086
2094
|
static getCurrentLanguage() {
|
|
2087
|
-
return
|
|
2095
|
+
return I18n.currentLanguage.language;
|
|
2088
2096
|
}
|
|
2089
2097
|
/**
|
|
2090
2098
|
* ### 获取支持的语言列表
|
|
2091
2099
|
* @returns 语言列表
|
|
2092
2100
|
*/
|
|
2093
2101
|
static getLanguages() {
|
|
2094
|
-
return
|
|
2102
|
+
return I18n.languages.map((item) => item.language);
|
|
2095
2103
|
}
|
|
2096
2104
|
/**
|
|
2097
2105
|
* ### 获取翻译后的字符串
|
|
2098
2106
|
* @returns 翻译后的字符串
|
|
2099
2107
|
*/
|
|
2100
2108
|
static get() {
|
|
2101
|
-
|
|
2102
|
-
return
|
|
2109
|
+
I18n.update(new this());
|
|
2110
|
+
return I18n.currentLanguage;
|
|
2103
2111
|
}
|
|
2104
2112
|
/**
|
|
2105
2113
|
* ### 添加国际化语言
|
|
@@ -2109,9 +2117,9 @@ const _I18n = class _I18n2 {
|
|
|
2109
2117
|
if (languages.length === 0) {
|
|
2110
2118
|
throw new Error("请传入语言包");
|
|
2111
2119
|
}
|
|
2112
|
-
|
|
2120
|
+
I18n.update(new this());
|
|
2113
2121
|
languages.forEach((item) => {
|
|
2114
|
-
|
|
2122
|
+
I18n.languages.push(item);
|
|
2115
2123
|
});
|
|
2116
2124
|
}
|
|
2117
2125
|
/**
|
|
@@ -2119,10 +2127,10 @@ const _I18n = class _I18n2 {
|
|
|
2119
2127
|
* @param language 语言
|
|
2120
2128
|
*/
|
|
2121
2129
|
static setCurrentLanguage(language) {
|
|
2122
|
-
if (
|
|
2123
|
-
|
|
2130
|
+
if (I18n.languages.length === 0) {
|
|
2131
|
+
I18n.update(new this());
|
|
2124
2132
|
}
|
|
2125
|
-
|
|
2133
|
+
I18n.currentLanguage = I18n.languages.find((item) => item.language === language) || I18n.languages[0];
|
|
2126
2134
|
}
|
|
2127
2135
|
/**
|
|
2128
2136
|
* ### 更新语言
|
|
@@ -2130,95 +2138,90 @@ const _I18n = class _I18n2 {
|
|
|
2130
2138
|
*/
|
|
2131
2139
|
static update(language) {
|
|
2132
2140
|
let isExist = false;
|
|
2133
|
-
for (let i = 0; i <
|
|
2134
|
-
if (
|
|
2135
|
-
|
|
2141
|
+
for (let i = 0; i < I18n.languages.length; i++) {
|
|
2142
|
+
if (I18n.languages[i].language === language.language) {
|
|
2143
|
+
I18n.languages[i] = language;
|
|
2136
2144
|
isExist = true;
|
|
2137
2145
|
break;
|
|
2138
2146
|
}
|
|
2139
2147
|
}
|
|
2140
2148
|
if (!isExist) {
|
|
2141
|
-
|
|
2149
|
+
I18n.languages.push(language);
|
|
2142
2150
|
}
|
|
2143
|
-
if (!
|
|
2144
|
-
|
|
2151
|
+
if (!I18n.currentLanguage) {
|
|
2152
|
+
I18n.currentLanguage = language;
|
|
2145
2153
|
}
|
|
2146
2154
|
}
|
|
2147
|
-
}
|
|
2148
|
-
__publicField$2(_I18n, "currentLanguage");
|
|
2149
|
-
__publicField$2(_I18n, "languages", []);
|
|
2150
|
-
let I18n = _I18n;
|
|
2155
|
+
}
|
|
2151
2156
|
class WebI18n extends I18n {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
__publicField(this, "NoPicture", "暂无图片");
|
|
2218
|
-
__publicField(this, "Operation", "操作");
|
|
2219
|
-
}
|
|
2157
|
+
ID = "ID";
|
|
2158
|
+
Detail = "详情";
|
|
2159
|
+
Update = "修改";
|
|
2160
|
+
Disable = "禁用";
|
|
2161
|
+
Enable = "启用";
|
|
2162
|
+
Delete = "删除";
|
|
2163
|
+
Add = "添加";
|
|
2164
|
+
UpdateSuccess = "修改成功";
|
|
2165
|
+
AddSuccess = "添加成功";
|
|
2166
|
+
DeleteSuccess = "删除成功";
|
|
2167
|
+
SelectPlease = "请选择";
|
|
2168
|
+
DisableSuccess = "禁用成功";
|
|
2169
|
+
EnableSuccess = "启用成功";
|
|
2170
|
+
Confirm = "确定";
|
|
2171
|
+
Cancel = "取消";
|
|
2172
|
+
ConfirmPlease = "请确认";
|
|
2173
|
+
ConfirmToDisable = "是否确认禁用当前选择的数据?";
|
|
2174
|
+
ConfirmToEnable = "是否确认启用当前选择的数据?";
|
|
2175
|
+
ConfirmToDelete = "是否确认删除当前选择的数据?";
|
|
2176
|
+
CopySuccess = "成功复制到剪切板!";
|
|
2177
|
+
PageSize = "每页";
|
|
2178
|
+
InputPageNumber = "请输入页码";
|
|
2179
|
+
Jump = "跳转";
|
|
2180
|
+
TotalRow = "总条数";
|
|
2181
|
+
UploadError = "上传失败";
|
|
2182
|
+
UploadSuccess = "上传成功";
|
|
2183
|
+
Alert = "温馨提示";
|
|
2184
|
+
FileSizeLimited = "上传的文件过大";
|
|
2185
|
+
FileTypeNotSupported = "上传的文件暂不支持";
|
|
2186
|
+
FileUploadErrorAndRetryPlease = "上传文件失败,请稍后重试";
|
|
2187
|
+
ClickHereToUpload = "点击或拖到此处上传";
|
|
2188
|
+
FileSize = "文件大小: ";
|
|
2189
|
+
FileExtension = "文件类型: ";
|
|
2190
|
+
TestError = "正则表达式校验失败";
|
|
2191
|
+
InvalidEmail = "请输入正确的邮箱地址";
|
|
2192
|
+
InvalidTelPhone = "请输入有效的座机号";
|
|
2193
|
+
InvalidPhone = "请输入正确的手机号";
|
|
2194
|
+
InvalidLetter = "只能输入字母";
|
|
2195
|
+
InvalidNaturalIntegerNumber = "只允许输入非负整数";
|
|
2196
|
+
InvalidNumberAndLetter = "只能输入数字和字母";
|
|
2197
|
+
IfNotChinese = "只允许输入中文汉字";
|
|
2198
|
+
InvalidChineseIdCard = "请输入正确的身份证号码";
|
|
2199
|
+
InvalidNumber = "请输入正确的数字";
|
|
2200
|
+
InvalidIntegerNumber = "请输入正确的整数";
|
|
2201
|
+
InvalidNaturalNumber = "只允许输入非负数字";
|
|
2202
|
+
InvalidMobilePhone = "请输入正确的手机号";
|
|
2203
|
+
ConfirmToComplete = "请确认填写完整";
|
|
2204
|
+
InvalidContain = "不允许输入中包含";
|
|
2205
|
+
Import = "导入";
|
|
2206
|
+
ImportSuccess = "数据导入成功";
|
|
2207
|
+
DownloadTemplate = "下载模板";
|
|
2208
|
+
Export = "导出";
|
|
2209
|
+
DownloadExportFile = "下载导出文件";
|
|
2210
|
+
ExportSuccess = "数据导出成功";
|
|
2211
|
+
ExportLoadingAndWaitPlease = "正在导出数据,请稍后等待...";
|
|
2212
|
+
NoData = "暂无数据";
|
|
2213
|
+
SelectTableColumnsToShow = "选择要显示的列";
|
|
2214
|
+
ConfirmToLogout = "是否确认退出登录?";
|
|
2215
|
+
Logout = "退出登录";
|
|
2216
|
+
Column = "列";
|
|
2217
|
+
ImageSupportExtensions = "支持的图片格式:";
|
|
2218
|
+
FileMaxSizeAllowed = "最大允许上传文件大小:";
|
|
2219
|
+
UploadImage = "上传图片";
|
|
2220
|
+
NoPicture = "暂无图片";
|
|
2221
|
+
Operation = "操作";
|
|
2220
2222
|
}
|
|
2221
2223
|
class FeedbackUtil {
|
|
2224
|
+
static defaultToastDuration = 3e3;
|
|
2222
2225
|
/**
|
|
2223
2226
|
* ### 警告吐司
|
|
2224
2227
|
* @param message 消息
|
|
@@ -2368,7 +2371,6 @@ class FeedbackUtil {
|
|
|
2368
2371
|
return this.showAlert(message, title, "info");
|
|
2369
2372
|
}
|
|
2370
2373
|
}
|
|
2371
|
-
__publicField(FeedbackUtil, "defaultToastDuration", 3e3);
|
|
2372
2374
|
const _hoisted_1$i = { class: "a-copy" };
|
|
2373
2375
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2374
2376
|
__name: "Copy",
|
|
@@ -8998,18 +9000,21 @@ function requireCryptoJs() {
|
|
|
8998
9000
|
}
|
|
8999
9001
|
var cryptoJsExports = requireCryptoJs();
|
|
9000
9002
|
const CryptoJS = /* @__PURE__ */ getDefaultExportFromCjs(cryptoJsExports);
|
|
9001
|
-
var __defProp$5 = Object.defineProperty;
|
|
9002
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9003
|
-
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9004
9003
|
class Enum {
|
|
9004
|
+
/**
|
|
9005
|
+
* ### 枚举的值
|
|
9006
|
+
*/
|
|
9007
|
+
key;
|
|
9008
|
+
/**
|
|
9009
|
+
* ### 枚举的描述
|
|
9010
|
+
*/
|
|
9011
|
+
label;
|
|
9005
9012
|
/**
|
|
9006
9013
|
* ### 实例化创建一个枚举项目
|
|
9007
9014
|
* @param key 枚举值
|
|
9008
9015
|
* @param label 枚举描述
|
|
9009
9016
|
*/
|
|
9010
9017
|
constructor(key, label) {
|
|
9011
|
-
__publicField$1(this, "key");
|
|
9012
|
-
__publicField$1(this, "label");
|
|
9013
9018
|
this.key = key;
|
|
9014
9019
|
if (label) {
|
|
9015
9020
|
this.label = label;
|
|
@@ -9029,7 +9034,7 @@ class Enum {
|
|
|
9029
9034
|
*/
|
|
9030
9035
|
static getLabel(key, defaultLabel = "-") {
|
|
9031
9036
|
const item = this.get(key);
|
|
9032
|
-
return
|
|
9037
|
+
return item?.label || defaultLabel;
|
|
9033
9038
|
}
|
|
9034
9039
|
/**
|
|
9035
9040
|
* ### 将枚举转为数组
|
|
@@ -9046,10 +9051,11 @@ class Enum {
|
|
|
9046
9051
|
return this.key === key;
|
|
9047
9052
|
}
|
|
9048
9053
|
}
|
|
9049
|
-
var __defProp$4 = Object.defineProperty;
|
|
9050
|
-
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9051
|
-
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9052
9054
|
class CryptoUtil {
|
|
9055
|
+
/**
|
|
9056
|
+
* ### AES加解密使用默认向量
|
|
9057
|
+
*/
|
|
9058
|
+
static aesCbcIvString = "0000000000000000";
|
|
9053
9059
|
/**
|
|
9054
9060
|
* ### `AES` 加密方法
|
|
9055
9061
|
* @param data 加密数据
|
|
@@ -9109,8 +9115,55 @@ class CryptoUtil {
|
|
|
9109
9115
|
return CryptoJS.enc.Base64.parse(data).toString(CryptoJS.enc.Utf8);
|
|
9110
9116
|
}
|
|
9111
9117
|
}
|
|
9112
|
-
|
|
9113
|
-
|
|
9118
|
+
class DateTimeUtil {
|
|
9119
|
+
/**
|
|
9120
|
+
* ### 时间进制
|
|
9121
|
+
*/
|
|
9122
|
+
static SECOND_PER_MINUTE = 60;
|
|
9123
|
+
/**
|
|
9124
|
+
* ### 每小时的秒数
|
|
9125
|
+
*/
|
|
9126
|
+
static SECOND_PER_HOUR = this.SECOND_PER_MINUTE ** 2;
|
|
9127
|
+
/**
|
|
9128
|
+
* ### 每秒的毫秒数
|
|
9129
|
+
*/
|
|
9130
|
+
static MILLISECONDS_PER_SECOND = 1e3;
|
|
9131
|
+
/**
|
|
9132
|
+
* ### 每天小时
|
|
9133
|
+
*/
|
|
9134
|
+
static HOUR_PER_DAY = 24;
|
|
9135
|
+
/**
|
|
9136
|
+
* ### 每月天数
|
|
9137
|
+
*/
|
|
9138
|
+
static DAY_PER_MONTH = 30;
|
|
9139
|
+
/**
|
|
9140
|
+
* ### 每年月份
|
|
9141
|
+
*/
|
|
9142
|
+
static MONTH_PER_YEAR = 12;
|
|
9143
|
+
/**
|
|
9144
|
+
* ### 每年天数
|
|
9145
|
+
*/
|
|
9146
|
+
static DAY_PER_YEAR = 365;
|
|
9147
|
+
/**
|
|
9148
|
+
* ### 每天秒数
|
|
9149
|
+
*/
|
|
9150
|
+
static SECOND_PER_DAY = this.SECOND_PER_HOUR * this.HOUR_PER_DAY;
|
|
9151
|
+
/**
|
|
9152
|
+
* ### 每周天数
|
|
9153
|
+
*/
|
|
9154
|
+
static DAY_PER_WEEK = 7;
|
|
9155
|
+
/**
|
|
9156
|
+
* ### 每年平均周
|
|
9157
|
+
*/
|
|
9158
|
+
static WEEK_PER_YEAR = 52;
|
|
9159
|
+
/**
|
|
9160
|
+
* ### 每月平均周
|
|
9161
|
+
*/
|
|
9162
|
+
static WEEK_PER_MONTH = 4;
|
|
9163
|
+
/**
|
|
9164
|
+
* ### 每天秒数
|
|
9165
|
+
*/
|
|
9166
|
+
static SECONDS_PER_DAY = this.HOUR_PER_DAY * this.SECOND_PER_HOUR;
|
|
9114
9167
|
/**
|
|
9115
9168
|
* ### 睡会再起来干活
|
|
9116
9169
|
* 不要忘了`await`,否则没睡醒就起来干活了 :)
|
|
@@ -9244,21 +9297,53 @@ const _DateTimeUtil = class _DateTimeUtil2 {
|
|
|
9244
9297
|
}
|
|
9245
9298
|
return "Unknown";
|
|
9246
9299
|
}
|
|
9247
|
-
}
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9300
|
+
}
|
|
9301
|
+
class DateTimeFormatter extends Enum {
|
|
9302
|
+
/**
|
|
9303
|
+
* ### e.g. `2022-02-02 22:22:22`
|
|
9304
|
+
*/
|
|
9305
|
+
static FULL_DATE_TIME = new DateTimeFormatter("YYYY-MM-DD HH:mm:ss");
|
|
9306
|
+
/**
|
|
9307
|
+
* ### e.g. `15061231312312`
|
|
9308
|
+
* 毫秒时间戳
|
|
9309
|
+
*/
|
|
9310
|
+
static TIMESTAMP = new DateTimeFormatter("x");
|
|
9311
|
+
/**
|
|
9312
|
+
* ### e.g. `02-02 22:22`
|
|
9313
|
+
*/
|
|
9314
|
+
static SHORT_DATE_TIME = new DateTimeFormatter("MM-DD HH:mm");
|
|
9315
|
+
/**
|
|
9316
|
+
* ### e.g. `2022-02-02`
|
|
9317
|
+
*/
|
|
9318
|
+
static FULL_DATE = new DateTimeFormatter("YYYY-MM-DD");
|
|
9319
|
+
/**
|
|
9320
|
+
* ### e.g. `22:22:22`
|
|
9321
|
+
*/
|
|
9322
|
+
static FULL_TIME = new DateTimeFormatter("HH:mm:ss");
|
|
9323
|
+
/**
|
|
9324
|
+
* ### e.g. `2022`
|
|
9325
|
+
*/
|
|
9326
|
+
static YEAR = new DateTimeFormatter("YYYY");
|
|
9327
|
+
/**
|
|
9328
|
+
* ### e.g. `02`
|
|
9329
|
+
*/
|
|
9330
|
+
static MONTH = new DateTimeFormatter("MM");
|
|
9331
|
+
/**
|
|
9332
|
+
* ### e.g. `02`
|
|
9333
|
+
*/
|
|
9334
|
+
static DAY = new DateTimeFormatter("DD");
|
|
9335
|
+
/**
|
|
9336
|
+
* ### e.g. `22`
|
|
9337
|
+
*/
|
|
9338
|
+
static HOUR = new DateTimeFormatter("HH");
|
|
9339
|
+
/**
|
|
9340
|
+
* ### e.g. `22`
|
|
9341
|
+
*/
|
|
9342
|
+
static MINUTE = new DateTimeFormatter("mm");
|
|
9343
|
+
/**
|
|
9344
|
+
* ### e.g. `59`
|
|
9345
|
+
*/
|
|
9346
|
+
static SECOND = new DateTimeFormatter("ss");
|
|
9262
9347
|
/**
|
|
9263
9348
|
* ### 使用这个模板格式化毫秒时间戳
|
|
9264
9349
|
* @param milliSecond 毫秒时间戳
|
|
@@ -9290,20 +9375,20 @@ const _DateTimeFormatter = class _DateTimeFormatter2 extends Enum {
|
|
|
9290
9375
|
format() {
|
|
9291
9376
|
return this.formatDate(/* @__PURE__ */ new Date());
|
|
9292
9377
|
}
|
|
9293
|
-
}
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9378
|
+
}
|
|
9379
|
+
class DesensitizeUtil {
|
|
9380
|
+
/**
|
|
9381
|
+
* ### 默认的脱敏符号
|
|
9382
|
+
*/
|
|
9383
|
+
static DEFAULT_MASK = "*";
|
|
9384
|
+
/**
|
|
9385
|
+
* ### IP地址分隔符
|
|
9386
|
+
*/
|
|
9387
|
+
static IP_V4_SEPARATOR = ".";
|
|
9388
|
+
/**
|
|
9389
|
+
* ### `IPv4` 的块长度
|
|
9390
|
+
*/
|
|
9391
|
+
static IP_V4_PART_COUNT = 4;
|
|
9307
9392
|
/**
|
|
9308
9393
|
* ### 字符串替换
|
|
9309
9394
|
*
|
|
@@ -9336,7 +9421,7 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9336
9421
|
*/
|
|
9337
9422
|
static desensitizeIpv4Address(ipv4, symbol = this.DEFAULT_MASK) {
|
|
9338
9423
|
const strings = ipv4.split(this.IP_V4_SEPARATOR);
|
|
9339
|
-
if (strings.length !==
|
|
9424
|
+
if (strings.length !== DesensitizeUtil.IP_V4_PART_COUNT) {
|
|
9340
9425
|
return ipv4;
|
|
9341
9426
|
}
|
|
9342
9427
|
const temp = symbol + symbol + symbol;
|
|
@@ -9362,7 +9447,7 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9362
9447
|
tail = tail <= 0 ? type.tail : tail;
|
|
9363
9448
|
switch (type.key) {
|
|
9364
9449
|
case DesensitizeType.IP_V4.key:
|
|
9365
|
-
return
|
|
9450
|
+
return DesensitizeUtil.desensitizeIpv4Address(source, symbol);
|
|
9366
9451
|
case DesensitizeType.CHINESE_NAME.key:
|
|
9367
9452
|
if (source.length <= head + tail) {
|
|
9368
9453
|
tail = 0;
|
|
@@ -9376,12 +9461,56 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9376
9461
|
}
|
|
9377
9462
|
return this.replace(source, head, tail, symbol);
|
|
9378
9463
|
}
|
|
9379
|
-
}
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9464
|
+
}
|
|
9465
|
+
class DesensitizeType extends Enum {
|
|
9466
|
+
/**
|
|
9467
|
+
* ### 座机号码
|
|
9468
|
+
*/
|
|
9469
|
+
static TELEPHONE = new DesensitizeType("座机号码", 3, 4);
|
|
9470
|
+
/**
|
|
9471
|
+
* ### 手机号码
|
|
9472
|
+
*/
|
|
9473
|
+
static MOBILE = new DesensitizeType("手机号码", 3, 4);
|
|
9474
|
+
/**
|
|
9475
|
+
* ### 身份证号
|
|
9476
|
+
*/
|
|
9477
|
+
static ID_CARD = new DesensitizeType("身份证号", 6, 4);
|
|
9478
|
+
/**
|
|
9479
|
+
* ### 银行卡号
|
|
9480
|
+
*/
|
|
9481
|
+
static BANK_CARD = new DesensitizeType("银行卡号", 4, 4);
|
|
9482
|
+
/**
|
|
9483
|
+
* ### 车牌号
|
|
9484
|
+
*/
|
|
9485
|
+
static CAR_NUMBER = new DesensitizeType("车牌号", 2, 1);
|
|
9486
|
+
/**
|
|
9487
|
+
* ### 邮箱
|
|
9488
|
+
*/
|
|
9489
|
+
static EMAIL = new DesensitizeType("邮箱", 2, 2);
|
|
9490
|
+
/**
|
|
9491
|
+
* ### 中文姓名
|
|
9492
|
+
*/
|
|
9493
|
+
static CHINESE_NAME = new DesensitizeType("中文名", 1, 1);
|
|
9494
|
+
/**
|
|
9495
|
+
* ### 地址
|
|
9496
|
+
*/
|
|
9497
|
+
static ADDRESS = new DesensitizeType("地址", 3, 0);
|
|
9498
|
+
/**
|
|
9499
|
+
* ### IPv4地址
|
|
9500
|
+
*/
|
|
9501
|
+
static IP_V4 = new DesensitizeType("IPv4地址", 0, 0);
|
|
9502
|
+
/**
|
|
9503
|
+
* ### 自定义
|
|
9504
|
+
*/
|
|
9505
|
+
static CUSTOM = new DesensitizeType("自定义", 0, 0);
|
|
9506
|
+
/**
|
|
9507
|
+
* ### 脱敏头部保留
|
|
9508
|
+
*/
|
|
9509
|
+
head;
|
|
9510
|
+
/**
|
|
9511
|
+
* ### 脱敏尾部保留
|
|
9512
|
+
*/
|
|
9513
|
+
tail;
|
|
9385
9514
|
/**
|
|
9386
9515
|
* ### 创建一个脱敏类型
|
|
9387
9516
|
* @param label 脱敏类型
|
|
@@ -9390,8 +9519,6 @@ const _DesensitizeType = class _DesensitizeType2 extends Enum {
|
|
|
9390
9519
|
*/
|
|
9391
9520
|
constructor(label, head, tail) {
|
|
9392
9521
|
super(label, label);
|
|
9393
|
-
__publicField2(this, "head");
|
|
9394
|
-
__publicField2(this, "tail");
|
|
9395
9522
|
this.head = head;
|
|
9396
9523
|
this.tail = tail;
|
|
9397
9524
|
}
|
|
@@ -9404,19 +9531,16 @@ const _DesensitizeType = class _DesensitizeType2 extends Enum {
|
|
|
9404
9531
|
desensitize(str, symbol) {
|
|
9405
9532
|
return DesensitizeUtil.desensitize(str, this, this.head, this.tail, symbol);
|
|
9406
9533
|
}
|
|
9407
|
-
}
|
|
9408
|
-
__publicField2(_DesensitizeType, "TELEPHONE", new _DesensitizeType("座机号码", 3, 4));
|
|
9409
|
-
__publicField2(_DesensitizeType, "MOBILE", new _DesensitizeType("手机号码", 3, 4));
|
|
9410
|
-
__publicField2(_DesensitizeType, "ID_CARD", new _DesensitizeType("身份证号", 6, 4));
|
|
9411
|
-
__publicField2(_DesensitizeType, "BANK_CARD", new _DesensitizeType("银行卡号", 4, 4));
|
|
9412
|
-
__publicField2(_DesensitizeType, "CAR_NUMBER", new _DesensitizeType("车牌号", 2, 1));
|
|
9413
|
-
__publicField2(_DesensitizeType, "EMAIL", new _DesensitizeType("邮箱", 2, 2));
|
|
9414
|
-
__publicField2(_DesensitizeType, "CHINESE_NAME", new _DesensitizeType("中文名", 1, 1));
|
|
9415
|
-
__publicField2(_DesensitizeType, "ADDRESS", new _DesensitizeType("地址", 3, 0));
|
|
9416
|
-
__publicField2(_DesensitizeType, "IP_V4", new _DesensitizeType("IPv4地址", 0, 0));
|
|
9417
|
-
__publicField2(_DesensitizeType, "CUSTOM", new _DesensitizeType("自定义", 0, 0));
|
|
9418
|
-
let DesensitizeType = _DesensitizeType;
|
|
9534
|
+
}
|
|
9419
9535
|
class FileUtil {
|
|
9536
|
+
/**
|
|
9537
|
+
* ### 文件大小进制
|
|
9538
|
+
*/
|
|
9539
|
+
static RADIX_FILE_SIZE = 1024;
|
|
9540
|
+
/**
|
|
9541
|
+
* ### 文件单位列表
|
|
9542
|
+
*/
|
|
9543
|
+
static FILE_UNIT_LIST = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
9420
9544
|
/**
|
|
9421
9545
|
* ### 字节数转可读文件大小
|
|
9422
9546
|
* @param size 字节数
|
|
@@ -9434,9 +9558,27 @@ class FileUtil {
|
|
|
9434
9558
|
return "INFINITY";
|
|
9435
9559
|
}
|
|
9436
9560
|
}
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9561
|
+
class RandomUtil {
|
|
9562
|
+
/**
|
|
9563
|
+
* ### 数字集合
|
|
9564
|
+
*/
|
|
9565
|
+
static STRING_OF_NUMBER = "0123456789";
|
|
9566
|
+
/**
|
|
9567
|
+
* ### 小写字母集合
|
|
9568
|
+
*/
|
|
9569
|
+
static STRING_OF_LOWER_CHAR = "abcdefghijklmnopqrstuvwxyz";
|
|
9570
|
+
/**
|
|
9571
|
+
* ### 大写字母集合
|
|
9572
|
+
*/
|
|
9573
|
+
static STRING_OF_UPPER_CHAR = this.STRING_OF_LOWER_CHAR.toUpperCase();
|
|
9574
|
+
/**
|
|
9575
|
+
* ### 默认长度
|
|
9576
|
+
*/
|
|
9577
|
+
static DEFAULT_LENGTH = 32;
|
|
9578
|
+
/**
|
|
9579
|
+
* ### 十进制
|
|
9580
|
+
*/
|
|
9581
|
+
static DECIMALISM = 10;
|
|
9440
9582
|
/**
|
|
9441
9583
|
* ### 指定范围内获取随机整数
|
|
9442
9584
|
* @param min 最小
|
|
@@ -9512,14 +9654,12 @@ const _RandomUtil = class _RandomUtil2 {
|
|
|
9512
9654
|
static getRandColor() {
|
|
9513
9655
|
return `#${Math.random().toString(16).padEnd(6, "0").slice(2, 8)}`;
|
|
9514
9656
|
}
|
|
9515
|
-
}
|
|
9516
|
-
__publicField2(_RandomUtil, "STRING_OF_NUMBER", "0123456789");
|
|
9517
|
-
__publicField2(_RandomUtil, "STRING_OF_LOWER_CHAR", "abcdefghijklmnopqrstuvwxyz");
|
|
9518
|
-
__publicField2(_RandomUtil, "STRING_OF_UPPER_CHAR", _RandomUtil.STRING_OF_LOWER_CHAR.toUpperCase());
|
|
9519
|
-
__publicField2(_RandomUtil, "DEFAULT_LENGTH", 32);
|
|
9520
|
-
__publicField2(_RandomUtil, "DECIMALISM", 10);
|
|
9521
|
-
let RandomUtil = _RandomUtil;
|
|
9657
|
+
}
|
|
9522
9658
|
class StringUtil {
|
|
9659
|
+
/**
|
|
9660
|
+
* ### 单码元长度
|
|
9661
|
+
*/
|
|
9662
|
+
static SINGLE_POINT_LENGTH = 65535;
|
|
9523
9663
|
/**
|
|
9524
9664
|
* ### 获取字符串可视化长度
|
|
9525
9665
|
*/
|
|
@@ -9579,8 +9719,11 @@ class StringUtil {
|
|
|
9579
9719
|
return s;
|
|
9580
9720
|
}
|
|
9581
9721
|
}
|
|
9582
|
-
__publicField2(StringUtil, "SINGLE_POINT_LENGTH", 65535);
|
|
9583
9722
|
class ValidateUtil {
|
|
9723
|
+
/**
|
|
9724
|
+
* ### 十进制
|
|
9725
|
+
*/
|
|
9726
|
+
static DECIMALISM = 10;
|
|
9584
9727
|
/**
|
|
9585
9728
|
* ### 验证是否手机号或座机号
|
|
9586
9729
|
* @param phoneNumber 号码
|
|
@@ -9698,8 +9841,15 @@ class ValidateUtil {
|
|
|
9698
9841
|
return validArray[1][sum % 11].toString() === str[17].toString();
|
|
9699
9842
|
}
|
|
9700
9843
|
}
|
|
9701
|
-
__publicField2(ValidateUtil, "DECIMALISM", 10);
|
|
9702
9844
|
class VersionUtil {
|
|
9845
|
+
/**
|
|
9846
|
+
* ### 版本号长度
|
|
9847
|
+
*/
|
|
9848
|
+
static VERSION_LENGTH = 2;
|
|
9849
|
+
/**
|
|
9850
|
+
* ### 版本号分隔符
|
|
9851
|
+
*/
|
|
9852
|
+
static VERSION_SEPARATOR = ".";
|
|
9703
9853
|
/**
|
|
9704
9854
|
* ### 获取版本号数字
|
|
9705
9855
|
* @param version 版本号字符串
|
|
@@ -9726,8 +9876,6 @@ class VersionUtil {
|
|
|
9726
9876
|
return [major, minor].join(separator);
|
|
9727
9877
|
}
|
|
9728
9878
|
}
|
|
9729
|
-
__publicField2(VersionUtil, "VERSION_LENGTH", 2);
|
|
9730
|
-
__publicField2(VersionUtil, "VERSION_SEPARATOR", ".");
|
|
9731
9879
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
9732
9880
|
__name: "DateTime",
|
|
9733
9881
|
props: {
|
|
@@ -10055,8 +10203,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10055
10203
|
let trueHeight = 0;
|
|
10056
10204
|
const isFullScreen = ref(!props.hideFullscreen && props.fullScreen);
|
|
10057
10205
|
onMounted(() => {
|
|
10058
|
-
|
|
10059
|
-
(_a = document.getElementById(`hidden-button-${domId.value}`)) == null ? void 0 : _a.focus();
|
|
10206
|
+
document.getElementById(`hidden-button-${domId.value}`)?.focus();
|
|
10060
10207
|
});
|
|
10061
10208
|
watch(isFullScreen, () => {
|
|
10062
10209
|
emits("fullscreenChange", isFullScreen.value);
|
|
@@ -10290,12 +10437,10 @@ function getFieldConfig(Class, field) {
|
|
|
10290
10437
|
return DecoratorUtil.getFieldConfig(Class, field.toString(), KEY$3, true) || {};
|
|
10291
10438
|
}
|
|
10292
10439
|
function getDictionary(Class, field) {
|
|
10293
|
-
|
|
10294
|
-
return (_a = getFieldConfig(Class, field)) == null ? void 0 : _a.dictionary;
|
|
10440
|
+
return getFieldConfig(Class, field)?.dictionary;
|
|
10295
10441
|
}
|
|
10296
10442
|
function getFieldLabel(Class, field) {
|
|
10297
|
-
|
|
10298
|
-
return ((_a = getFieldConfig(Class, field)) == null ? void 0 : _a.label) || field.toString();
|
|
10443
|
+
return getFieldConfig(Class, field)?.label || field.toString();
|
|
10299
10444
|
}
|
|
10300
10445
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
10301
10446
|
__name: "FormField",
|
|
@@ -10564,8 +10709,8 @@ function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
|
|
|
10564
10709
|
}
|
|
10565
10710
|
}
|
|
10566
10711
|
/*!
|
|
10567
|
-
* vue-router v4.5.
|
|
10568
|
-
* (c)
|
|
10712
|
+
* vue-router v4.5.1
|
|
10713
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
10569
10714
|
* @license MIT
|
|
10570
10715
|
*/
|
|
10571
10716
|
const isBrowser = typeof document !== "undefined";
|
|
@@ -12007,7 +12152,8 @@ const RouterLinkImpl = /* @__PURE__ */ defineComponent({
|
|
|
12007
12152
|
ariaCurrentValue: {
|
|
12008
12153
|
type: String,
|
|
12009
12154
|
default: "page"
|
|
12010
|
-
}
|
|
12155
|
+
},
|
|
12156
|
+
viewTransition: Boolean
|
|
12011
12157
|
},
|
|
12012
12158
|
useLink,
|
|
12013
12159
|
setup(props, { slots }) {
|
|
@@ -13461,15 +13607,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
13461
13607
|
}
|
|
13462
13608
|
});
|
|
13463
13609
|
class WebConstant {
|
|
13610
|
+
/**
|
|
13611
|
+
* ### HTTP 请求前缀
|
|
13612
|
+
*/
|
|
13613
|
+
static PREFIX_HTTP = "http://";
|
|
13614
|
+
/**
|
|
13615
|
+
* ### HTTPS 请求前缀
|
|
13616
|
+
*/
|
|
13617
|
+
static PREFIX_HTTPS = "https://";
|
|
13464
13618
|
}
|
|
13465
|
-
/**
|
|
13466
|
-
* ### HTTP 请求前缀
|
|
13467
|
-
*/
|
|
13468
|
-
__publicField(WebConstant, "PREFIX_HTTP", "http://");
|
|
13469
|
-
/**
|
|
13470
|
-
* ### HTTPS 请求前缀
|
|
13471
|
-
*/
|
|
13472
|
-
__publicField(WebConstant, "PREFIX_HTTPS", "https://");
|
|
13473
13619
|
class WebFileUtil {
|
|
13474
13620
|
/**
|
|
13475
13621
|
* ### 获取静态文件的绝对地址
|
|
@@ -13906,9 +14052,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13906
14052
|
}
|
|
13907
14053
|
}
|
|
13908
14054
|
const getShowFormatter = computed(() => {
|
|
13909
|
-
var _a;
|
|
13910
14055
|
if (formConfig.value) {
|
|
13911
|
-
switch (
|
|
14056
|
+
switch (formConfig.value?.dateType) {
|
|
13912
14057
|
case DateTimeType.DATE:
|
|
13913
14058
|
return DateTimeFormatter.FULL_DATE.key;
|
|
13914
14059
|
case DateTimeType.WEEK:
|
|
@@ -13924,22 +14069,19 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13924
14069
|
return DateTimeFormatter.FULL_DATE_TIME;
|
|
13925
14070
|
});
|
|
13926
14071
|
function getSwitchColor(status) {
|
|
13927
|
-
|
|
13928
|
-
return ((_b = (_a = dictionary.value) == null ? void 0 : _a.find((item) => !!item.key === status)) == null ? void 0 : _b.color) || "";
|
|
14072
|
+
return dictionary.value?.find((item) => !!item.key === status)?.color || "";
|
|
13929
14073
|
}
|
|
13930
14074
|
function getSwitchLabel(status) {
|
|
13931
|
-
|
|
13932
|
-
return ((_b = (_a = dictionary.value) == null ? void 0 : _a.find((item) => !!item.key === status)) == null ? void 0 : _b.label) || "";
|
|
14075
|
+
return dictionary.value?.find((item) => !!item.key === status)?.label || "";
|
|
13933
14076
|
}
|
|
13934
14077
|
const getInputType = computed(() => {
|
|
13935
|
-
|
|
13936
|
-
if ((_a = formConfig.value) == null ? void 0 : _a.textarea) {
|
|
14078
|
+
if (formConfig.value?.textarea) {
|
|
13937
14079
|
return "textarea";
|
|
13938
14080
|
}
|
|
13939
|
-
if (
|
|
14081
|
+
if (formConfig.value?.password) {
|
|
13940
14082
|
return "password";
|
|
13941
14083
|
}
|
|
13942
|
-
if (
|
|
14084
|
+
if (formConfig.value?.number) {
|
|
13943
14085
|
return "number";
|
|
13944
14086
|
}
|
|
13945
14087
|
return "text";
|
|
@@ -13949,8 +14091,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13949
14091
|
onPropsValueUpdated(newProps);
|
|
13950
14092
|
});
|
|
13951
14093
|
function checkNumberValue() {
|
|
13952
|
-
|
|
13953
|
-
if ((_a = formConfig.value) == null ? void 0 : _a.number) {
|
|
14094
|
+
if (formConfig.value?.number) {
|
|
13954
14095
|
let tempValue = value.value;
|
|
13955
14096
|
const max = Math.min(formConfig.value.max ?? WebConfig.maxNumber, Number.MAX_SAFE_INTEGER);
|
|
13956
14097
|
const min = Math.max(formConfig.value.min ?? WebConfig.minNumber, Number.MIN_SAFE_INTEGER);
|
|
@@ -13960,9 +14101,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13960
14101
|
tempValue = Math.min(tempValue, max);
|
|
13961
14102
|
tempValue = Number.parseFloat(tempValue.toFixed(formConfig.value.precision ?? WebConfig.numberPrecision));
|
|
13962
14103
|
value.value = tempValue;
|
|
13963
|
-
value.value = Number.parseFloat(
|
|
14104
|
+
value.value = Number.parseFloat(value.value?.toString() || "0");
|
|
13964
14105
|
}
|
|
13965
|
-
value.value = Number.parseFloat(
|
|
14106
|
+
value.value = Number.parseFloat(value.value?.toString() || "0");
|
|
13966
14107
|
}
|
|
13967
14108
|
}
|
|
13968
14109
|
function onClear() {
|
|
@@ -13987,15 +14128,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13987
14128
|
emitChange();
|
|
13988
14129
|
}
|
|
13989
14130
|
function onKeyDown(event) {
|
|
13990
|
-
var _a, _b;
|
|
13991
14131
|
switch (event.code) {
|
|
13992
14132
|
case "KeyE":
|
|
13993
|
-
if (
|
|
14133
|
+
if (formConfig.value?.number) {
|
|
13994
14134
|
event.preventDefault();
|
|
13995
14135
|
}
|
|
13996
14136
|
break;
|
|
13997
14137
|
case "Escape":
|
|
13998
|
-
if (
|
|
14138
|
+
if (formConfig.value?.clearable !== false) {
|
|
13999
14139
|
value.value = void 0;
|
|
14000
14140
|
emitValue();
|
|
14001
14141
|
}
|
|
@@ -14020,7 +14160,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14020
14160
|
}
|
|
14021
14161
|
}
|
|
14022
14162
|
function init() {
|
|
14023
|
-
var _a, _b;
|
|
14024
14163
|
initFieldName();
|
|
14025
14164
|
if (props.entity && fieldName.value) {
|
|
14026
14165
|
formConfig.value = getFormConfig(props.entity, fieldName.value);
|
|
@@ -14038,8 +14177,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14038
14177
|
}
|
|
14039
14178
|
}
|
|
14040
14179
|
}
|
|
14041
|
-
dictionary.value = props.list ? props.list : formConfig.value &&
|
|
14042
|
-
if (props.modelValue === void 0 &&
|
|
14180
|
+
dictionary.value = props.list ? props.list : formConfig.value && fieldConfig.value?.dictionary ? fieldConfig.value.dictionary.toArray() : void 0;
|
|
14181
|
+
if (props.modelValue === void 0 && formConfig.value?.defaultValue !== void 0) {
|
|
14043
14182
|
value.value = formConfig.value.defaultValue;
|
|
14044
14183
|
emitValue();
|
|
14045
14184
|
}
|
|
@@ -14048,7 +14187,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14048
14187
|
const slots = useSlots();
|
|
14049
14188
|
init();
|
|
14050
14189
|
return (_ctx, _cache) => {
|
|
14051
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I;
|
|
14052
14190
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
14053
14191
|
const _component_el_time_picker = resolveComponent("el-time-picker");
|
|
14054
14192
|
const _component_el_switch = resolveComponent("el-switch");
|
|
@@ -14066,13 +14204,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14066
14204
|
key: 0,
|
|
14067
14205
|
modelValue: value.value,
|
|
14068
14206
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
14069
|
-
clearable:
|
|
14207
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14070
14208
|
disabled: __props.disabled,
|
|
14071
|
-
format:
|
|
14209
|
+
format: formConfig.value.dateShowFormatter?.key || getShowFormatter.value,
|
|
14072
14210
|
placeholder: placeholderRef.value,
|
|
14073
|
-
"prefix-icon":
|
|
14211
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14074
14212
|
readonly: __props.readonly,
|
|
14075
|
-
"suffix-icon":
|
|
14213
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14076
14214
|
type: formConfig.value.dateType,
|
|
14077
14215
|
"value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
|
|
14078
14216
|
style: { "width": "100%" },
|
|
@@ -14083,13 +14221,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14083
14221
|
key: 1,
|
|
14084
14222
|
modelValue: value.value,
|
|
14085
14223
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
|
|
14086
|
-
clearable:
|
|
14224
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14087
14225
|
disabled: __props.disabled,
|
|
14088
|
-
format:
|
|
14226
|
+
format: formConfig.value.dateShowFormatter?.key || unref(DateTimeFormatter).FULL_TIME.key,
|
|
14089
14227
|
placeholder: placeholderRef.value,
|
|
14090
|
-
"prefix-icon":
|
|
14228
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14091
14229
|
readonly: __props.readonly,
|
|
14092
|
-
"suffix-icon":
|
|
14230
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14093
14231
|
"value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
|
|
14094
14232
|
style: { "width": "100%" },
|
|
14095
14233
|
onClear,
|
|
@@ -14097,7 +14235,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14097
14235
|
onKeydown: onKeyDown
|
|
14098
14236
|
}, null, 8, ["modelValue", "clearable", "disabled", "format", "placeholder", "prefix-icon", "readonly", "suffix-icon", "value-format"]))
|
|
14099
14237
|
], 64)) : __props.list || dictionary.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14100
|
-
|
|
14238
|
+
formConfig.value?.switch ? (openBlock(), createBlock(_component_el_switch, {
|
|
14101
14239
|
key: 0,
|
|
14102
14240
|
modelValue: value.value,
|
|
14103
14241
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
|
|
@@ -14108,7 +14246,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14108
14246
|
"--el-switch-on-color": getSwitchColor(true),
|
|
14109
14247
|
"--el-switch-off-color": getSwitchColor(false)
|
|
14110
14248
|
})
|
|
14111
|
-
}, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) :
|
|
14249
|
+
}, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) : formConfig.value?.radioButton ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
14112
14250
|
key: 1,
|
|
14113
14251
|
modelValue: value.value,
|
|
14114
14252
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => value.value = $event),
|
|
@@ -14128,7 +14266,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14128
14266
|
}), 128))
|
|
14129
14267
|
]),
|
|
14130
14268
|
_: 1
|
|
14131
|
-
}, 8, ["modelValue", "readonly"])) :
|
|
14269
|
+
}, 8, ["modelValue", "readonly"])) : formConfig.value?.radio ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
14132
14270
|
key: 2,
|
|
14133
14271
|
modelValue: value.value,
|
|
14134
14272
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => value.value = $event),
|
|
@@ -14152,18 +14290,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14152
14290
|
key: 3,
|
|
14153
14291
|
modelValue: value.value,
|
|
14154
14292
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => value.value = $event),
|
|
14155
|
-
clearable:
|
|
14156
|
-
"collapse-tags":
|
|
14293
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14294
|
+
"collapse-tags": formConfig.value?.collapseTags,
|
|
14157
14295
|
disabled: __props.disabled,
|
|
14158
|
-
filterable:
|
|
14159
|
-
multiple:
|
|
14160
|
-
"multiple-limit":
|
|
14296
|
+
filterable: formConfig.value?.filterable,
|
|
14297
|
+
multiple: formConfig.value?.multiple,
|
|
14298
|
+
"multiple-limit": formConfig.value?.multipleLimit,
|
|
14161
14299
|
placeholder: placeholderRef.value,
|
|
14162
|
-
"prefix-icon":
|
|
14300
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14163
14301
|
readonly: __props.readonly,
|
|
14164
14302
|
remote: !!__props.onSearch,
|
|
14165
14303
|
"remote-method": __props.onSearch,
|
|
14166
|
-
"suffix-icon":
|
|
14304
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14167
14305
|
"collapse-tags-tooltip": "",
|
|
14168
14306
|
"fit-input-width": "",
|
|
14169
14307
|
onClear,
|
|
@@ -14178,18 +14316,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14178
14316
|
label: item.label,
|
|
14179
14317
|
value: item.key
|
|
14180
14318
|
}, {
|
|
14181
|
-
default: withCtx(() =>
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
(
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
-
])) : createCommentVNode("", true)
|
|
14191
|
-
];
|
|
14192
|
-
}),
|
|
14319
|
+
default: withCtx(() => [
|
|
14320
|
+
formConfig.value?.color ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
14321
|
+
createElementVNode("span", _hoisted_3$7, toDisplayString(item.label), 1),
|
|
14322
|
+
createElementVNode("span", {
|
|
14323
|
+
style: normalizeStyle({ backgroundColor: item.color || unref(WebColor).NORMAL }),
|
|
14324
|
+
class: "light"
|
|
14325
|
+
}, null, 4)
|
|
14326
|
+
])) : createCommentVNode("", true)
|
|
14327
|
+
]),
|
|
14193
14328
|
_: 2
|
|
14194
14329
|
}, 1032, ["disabled", "label", "value"]);
|
|
14195
14330
|
}), 128))
|
|
@@ -14200,20 +14335,20 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14200
14335
|
key: 2,
|
|
14201
14336
|
modelValue: value.value,
|
|
14202
14337
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event),
|
|
14203
|
-
clearable:
|
|
14204
|
-
"collapse-tags":
|
|
14338
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14339
|
+
"collapse-tags": formConfig.value?.collapseTags,
|
|
14205
14340
|
disabled: __props.disabled,
|
|
14206
14341
|
options: __props.tree,
|
|
14207
14342
|
placeholder: placeholderRef.value,
|
|
14208
14343
|
props: {
|
|
14209
14344
|
value: "id",
|
|
14210
14345
|
label: "name",
|
|
14211
|
-
multiple:
|
|
14212
|
-
emitPath:
|
|
14213
|
-
checkStrictly:
|
|
14346
|
+
multiple: formConfig.value?.multiple,
|
|
14347
|
+
emitPath: formConfig.value?.emitPath,
|
|
14348
|
+
checkStrictly: formConfig.value?.checkStrictly
|
|
14214
14349
|
},
|
|
14215
14350
|
readonly: __props.readonly,
|
|
14216
|
-
"show-all-levels":
|
|
14351
|
+
"show-all-levels": formConfig.value?.showAllLevels,
|
|
14217
14352
|
class: "a-input-cascader",
|
|
14218
14353
|
"collapse-tags-tooltip": "",
|
|
14219
14354
|
"popper-class": "a-input-cascader-popper",
|
|
@@ -14224,18 +14359,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14224
14359
|
key: 3,
|
|
14225
14360
|
modelValue: value.value,
|
|
14226
14361
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => value.value = $event),
|
|
14227
|
-
autosize:
|
|
14228
|
-
clearable:
|
|
14362
|
+
autosize: formConfig.value?.autoSize ? { minRows: formConfig.value.minRows, maxRows: formConfig.value.maxRows } : false,
|
|
14363
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14229
14364
|
disabled: __props.disabled,
|
|
14230
|
-
max:
|
|
14231
|
-
maxlength:
|
|
14232
|
-
min:
|
|
14365
|
+
max: formConfig.value?.max,
|
|
14366
|
+
maxlength: formConfig.value?.maxLength || (formConfig.value?.textarea ? unref(WebConfig).maxTextAreaLength : unref(WebConfig).maxTextLength),
|
|
14367
|
+
min: formConfig.value?.min ?? 0,
|
|
14233
14368
|
placeholder: placeholderRef.value,
|
|
14234
|
-
"prefix-icon":
|
|
14369
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14235
14370
|
readonly: __props.readonly,
|
|
14236
|
-
rows:
|
|
14237
|
-
"show-word-limit":
|
|
14238
|
-
"suffix-icon":
|
|
14371
|
+
rows: formConfig.value?.textarea ? unref(WebConfig).textareaMinRows : 0,
|
|
14372
|
+
"show-word-limit": formConfig.value?.showLimit !== false,
|
|
14373
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14239
14374
|
type: getInputType.value,
|
|
14240
14375
|
onBlur,
|
|
14241
14376
|
onChange: checkNumberValue,
|
|
@@ -14247,29 +14382,26 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14247
14382
|
return {
|
|
14248
14383
|
name,
|
|
14249
14384
|
fn: withCtx(() => [
|
|
14250
|
-
renderSlot(_ctx.$slots, name, {}, () =>
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14266
|
-
], 64)) : createCommentVNode("", true)
|
|
14267
|
-
];
|
|
14268
|
-
})
|
|
14385
|
+
renderSlot(_ctx.$slots, name, {}, () => [
|
|
14386
|
+
name === "append" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
14387
|
+
createTextVNode(toDisplayString(formConfig.value?.suffixText), 1)
|
|
14388
|
+
], 64)) : createCommentVNode("", true),
|
|
14389
|
+
name === "suffix" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14390
|
+
isClearButtonShow.value ? (openBlock(), createBlock(_component_el_icon, {
|
|
14391
|
+
key: 0,
|
|
14392
|
+
onClick: _cache[7] || (_cache[7] = ($event) => onClear())
|
|
14393
|
+
}, {
|
|
14394
|
+
default: withCtx(() => [
|
|
14395
|
+
createVNode(unref(circle_close_default))
|
|
14396
|
+
]),
|
|
14397
|
+
_: 1
|
|
14398
|
+
})) : createCommentVNode("", true)
|
|
14399
|
+
], 64)) : createCommentVNode("", true)
|
|
14400
|
+
])
|
|
14269
14401
|
])
|
|
14270
14402
|
};
|
|
14271
14403
|
}),
|
|
14272
|
-
!_ctx.$slots.append &&
|
|
14404
|
+
!_ctx.$slots.append && formConfig.value?.suffixText ? {
|
|
14273
14405
|
name: "append",
|
|
14274
14406
|
fn: withCtx(() => [
|
|
14275
14407
|
createTextVNode(toDisplayString(formConfig.value.suffixText), 1)
|
|
@@ -14347,30 +14479,24 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
14347
14479
|
});
|
|
14348
14480
|
const AMoney = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-f91c14e3"]]);
|
|
14349
14481
|
class QueryPage extends Transformer {
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
|
|
14353
|
-
|
|
14354
|
-
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
|
|
14358
|
-
*/
|
|
14359
|
-
__publicField(this, "pageSize", 20);
|
|
14360
|
-
}
|
|
14482
|
+
/**
|
|
14483
|
+
* ### 分页页数
|
|
14484
|
+
*/
|
|
14485
|
+
pageNum = 1;
|
|
14486
|
+
/**
|
|
14487
|
+
* ### 每页数量
|
|
14488
|
+
*/
|
|
14489
|
+
pageSize = 20;
|
|
14361
14490
|
}
|
|
14362
14491
|
class QuerySort extends Transformer {
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
*/
|
|
14372
|
-
__publicField(this, "direction", "desc");
|
|
14373
|
-
}
|
|
14492
|
+
/**
|
|
14493
|
+
* ### 排序字段 默认 `id`
|
|
14494
|
+
*/
|
|
14495
|
+
field = "id";
|
|
14496
|
+
/**
|
|
14497
|
+
* ### 排序方式 默认 `desc`
|
|
14498
|
+
*/
|
|
14499
|
+
direction = "desc";
|
|
14374
14500
|
/**
|
|
14375
14501
|
* ### 设置排序字段名
|
|
14376
14502
|
* @param field 字段名
|
|
@@ -14398,23 +14524,20 @@ var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
|
14398
14524
|
return result;
|
|
14399
14525
|
};
|
|
14400
14526
|
class QueryResponsePage extends Transformer {
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
*/
|
|
14416
|
-
__publicField(this, "pageCount", 0);
|
|
14417
|
-
}
|
|
14527
|
+
/**
|
|
14528
|
+
* ### 返回的当前页数据列表
|
|
14529
|
+
*/
|
|
14530
|
+
list = [];
|
|
14531
|
+
page = new QueryPage();
|
|
14532
|
+
sort = new QuerySort();
|
|
14533
|
+
/**
|
|
14534
|
+
* ### 返回总条数
|
|
14535
|
+
*/
|
|
14536
|
+
total = 0;
|
|
14537
|
+
/**
|
|
14538
|
+
* ### 返回总页数
|
|
14539
|
+
*/
|
|
14540
|
+
pageCount = 0;
|
|
14418
14541
|
}
|
|
14419
14542
|
__decorateClass$3([
|
|
14420
14543
|
Type(QueryPage)
|
|
@@ -14682,10 +14805,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14682
14805
|
setup(__props) {
|
|
14683
14806
|
const props = __props;
|
|
14684
14807
|
const isFullScreen = ref(false);
|
|
14685
|
-
const realTitle = computed(() =>
|
|
14686
|
-
var _a;
|
|
14687
|
-
return props.title || ((_a = useRouter().currentRoute.value.meta) == null ? void 0 : _a.name) || "";
|
|
14688
|
-
});
|
|
14808
|
+
const realTitle = computed(() => props.title || useRouter().currentRoute.value.meta?.name || "");
|
|
14689
14809
|
return (_ctx, _cache) => {
|
|
14690
14810
|
return openBlock(), createElementBlock("div", {
|
|
14691
14811
|
class: normalizeClass([isFullScreen.value ? "fullscreen" : "", "web-panel"])
|
|
@@ -14835,56 +14955,52 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
|
14835
14955
|
return HttpMethod2;
|
|
14836
14956
|
})(HttpMethod || {});
|
|
14837
14957
|
class HttpResponse {
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
__publicField(this, "message");
|
|
14851
|
-
}
|
|
14958
|
+
/**
|
|
14959
|
+
* ### 业务状态码
|
|
14960
|
+
*/
|
|
14961
|
+
code;
|
|
14962
|
+
/**
|
|
14963
|
+
* ### 返回的数据
|
|
14964
|
+
*/
|
|
14965
|
+
data;
|
|
14966
|
+
/**
|
|
14967
|
+
* ### 错误信息
|
|
14968
|
+
*/
|
|
14969
|
+
message;
|
|
14852
14970
|
}
|
|
14853
14971
|
class Http {
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
__publicField(this, "isThrowError", false);
|
|
14887
|
-
}
|
|
14972
|
+
/**
|
|
14973
|
+
* ### 请求方法
|
|
14974
|
+
*/
|
|
14975
|
+
method = HttpMethod.POST;
|
|
14976
|
+
/**
|
|
14977
|
+
* ### URL
|
|
14978
|
+
*/
|
|
14979
|
+
url = "";
|
|
14980
|
+
/**
|
|
14981
|
+
* ### 请求超时时间
|
|
14982
|
+
*/
|
|
14983
|
+
timeout = WebConfig.timeout;
|
|
14984
|
+
/**
|
|
14985
|
+
* ### 是否携带 `Cookies`
|
|
14986
|
+
*/
|
|
14987
|
+
widthCookie = false;
|
|
14988
|
+
/**
|
|
14989
|
+
* ### 请求头
|
|
14990
|
+
*/
|
|
14991
|
+
headers = {};
|
|
14992
|
+
/**
|
|
14993
|
+
* ### 错误回调
|
|
14994
|
+
*/
|
|
14995
|
+
errorHandler;
|
|
14996
|
+
/**
|
|
14997
|
+
* ### 加载回调
|
|
14998
|
+
*/
|
|
14999
|
+
loadingHandler;
|
|
15000
|
+
/**
|
|
15001
|
+
* ### 是否直接抛出错误
|
|
15002
|
+
*/
|
|
15003
|
+
isThrowError = false;
|
|
14888
15004
|
/**
|
|
14889
15005
|
* ### 创建一个客户端
|
|
14890
15006
|
* @param url 请求的 `URL`
|
|
@@ -15067,25 +15183,22 @@ class Http {
|
|
|
15067
15183
|
}
|
|
15068
15184
|
}
|
|
15069
15185
|
class ExportModel extends Transformer {
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
*/
|
|
15087
|
-
__publicField(this, "fileCode");
|
|
15088
|
-
}
|
|
15186
|
+
/**
|
|
15187
|
+
* ### 创建导出任务的API地址
|
|
15188
|
+
*/
|
|
15189
|
+
createExportTaskUrl;
|
|
15190
|
+
/**
|
|
15191
|
+
* ### 查询导出结果的 `API` 地址
|
|
15192
|
+
*/
|
|
15193
|
+
queryExportUrl;
|
|
15194
|
+
/**
|
|
15195
|
+
* ### 请求的参数
|
|
15196
|
+
*/
|
|
15197
|
+
param;
|
|
15198
|
+
/**
|
|
15199
|
+
* ### 下载导出文件的临时令牌
|
|
15200
|
+
*/
|
|
15201
|
+
fileCode;
|
|
15089
15202
|
}
|
|
15090
15203
|
const _hoisted_1$8 = { class: "tips" };
|
|
15091
15204
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
@@ -15531,9 +15644,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
15531
15644
|
}
|
|
15532
15645
|
}
|
|
15533
15646
|
const payloadLabel = computed(() => {
|
|
15534
|
-
var _a;
|
|
15535
15647
|
try {
|
|
15536
|
-
return
|
|
15648
|
+
return props.payload?.getPayloadLabel() || "-";
|
|
15537
15649
|
} catch (e) {
|
|
15538
15650
|
console.error("[IPayload] 请实现 IPayload 接口", props.payload);
|
|
15539
15651
|
}
|
|
@@ -16781,10 +16893,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
16781
16893
|
const props = __props;
|
|
16782
16894
|
const emits = __emit;
|
|
16783
16895
|
const result = useModel(__props, "modelValue");
|
|
16784
|
-
const label = computed(() =>
|
|
16785
|
-
var _a;
|
|
16786
|
-
return ((_a = result.value) == null ? void 0 : _a.getPayloadLabel()) || props.default;
|
|
16787
|
-
});
|
|
16896
|
+
const label = computed(() => result.value?.getPayloadLabel() || props.default);
|
|
16788
16897
|
async function onSelect() {
|
|
16789
16898
|
result.value = await DialogUtil.show(props.selector, props.param);
|
|
16790
16899
|
emits("changed", result.value);
|
|
@@ -16872,17 +16981,17 @@ var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
|
16872
16981
|
return result;
|
|
16873
16982
|
};
|
|
16874
16983
|
class QueryRequest extends Transformer {
|
|
16984
|
+
/**
|
|
16985
|
+
* ### 查询信息
|
|
16986
|
+
*/
|
|
16987
|
+
filter;
|
|
16988
|
+
sort;
|
|
16875
16989
|
/**
|
|
16876
16990
|
* ### 初始化一个请求类
|
|
16877
16991
|
* @param FilterClass 如传入 `filter` 的类 将自动初始化一个空 `filter`
|
|
16878
16992
|
*/
|
|
16879
16993
|
constructor(FilterClass) {
|
|
16880
16994
|
super();
|
|
16881
|
-
/**
|
|
16882
|
-
* ### 查询信息
|
|
16883
|
-
*/
|
|
16884
|
-
__publicField(this, "filter");
|
|
16885
|
-
__publicField(this, "sort");
|
|
16886
16995
|
try {
|
|
16887
16996
|
this.filter = new FilterClass();
|
|
16888
16997
|
} catch (e) {
|
|
@@ -16910,10 +17019,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
16910
17019
|
return result;
|
|
16911
17020
|
};
|
|
16912
17021
|
class QueryRequestPage extends QueryRequest {
|
|
16913
|
-
|
|
16914
|
-
super(...arguments);
|
|
16915
|
-
__publicField(this, "page", new QueryPage());
|
|
16916
|
-
}
|
|
17022
|
+
page = new QueryPage();
|
|
16917
17023
|
}
|
|
16918
17024
|
__decorateClass$1([
|
|
16919
17025
|
Type(QueryPage)
|
|
@@ -17157,7 +17263,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
17157
17263
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
17158
17264
|
createTextVNode(" 选择 ")
|
|
17159
17265
|
])),
|
|
17160
|
-
_: 2
|
|
17266
|
+
_: 2,
|
|
17267
|
+
__: [2]
|
|
17161
17268
|
}, 1032, ["disabled", "onClick"])
|
|
17162
17269
|
]),
|
|
17163
17270
|
key: "0"
|
|
@@ -17323,12 +17430,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
17323
17430
|
const key = props.column.key;
|
|
17324
17431
|
const value = computed(() => props.data[key]);
|
|
17325
17432
|
return (_ctx, _cache) => {
|
|
17326
|
-
var _a;
|
|
17327
17433
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
17328
17434
|
_ctx.column.color ? (openBlock(), createElementBlock("span", {
|
|
17329
17435
|
key: 0,
|
|
17330
17436
|
style: normalizeStyle({
|
|
17331
|
-
backgroundColor:
|
|
17437
|
+
backgroundColor: _ctx.dictionary.get(value.value)?.color || unref(WebColor).NORMAL
|
|
17332
17438
|
}),
|
|
17333
17439
|
class: "light"
|
|
17334
17440
|
}, null, 4)) : createCommentVNode("", true),
|
|
@@ -17924,7 +18030,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17924
18030
|
const airTableRef = ref();
|
|
17925
18031
|
const tableId = `table_${Math.random()}`;
|
|
17926
18032
|
const hook = props.useHook;
|
|
17927
|
-
const ServiceClass = props.service ||
|
|
18033
|
+
const ServiceClass = props.service || hook?.serviceClass;
|
|
17928
18034
|
let EntityClass;
|
|
17929
18035
|
if (ServiceClass) {
|
|
17930
18036
|
EntityClass = Transformer.newInstance(ServiceClass).entityClass;
|
|
@@ -17966,12 +18072,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17966
18072
|
modelConfig
|
|
17967
18073
|
});
|
|
17968
18074
|
function selectRow(list) {
|
|
17969
|
-
var _a, _b;
|
|
17970
18075
|
for (const row of list) {
|
|
17971
|
-
|
|
18076
|
+
airTableRef.value?.toggleRowSelection(row, false);
|
|
17972
18077
|
for (const selectedRow of selectListRef.value) {
|
|
17973
18078
|
if (selectedRow.id === row.id) {
|
|
17974
|
-
|
|
18079
|
+
airTableRef.value?.toggleRowSelection(row, true);
|
|
17975
18080
|
}
|
|
17976
18081
|
}
|
|
17977
18082
|
if (row.children && row.children.length > 0) {
|
|
@@ -18126,7 +18231,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18126
18231
|
nextTick(() => {
|
|
18127
18232
|
toggleSelection();
|
|
18128
18233
|
const table = document.getElementById(tableId);
|
|
18129
|
-
const bodyWrap = table
|
|
18234
|
+
const bodyWrap = table?.querySelector(".el-scrollbar__wrap");
|
|
18130
18235
|
bodyWrap.scrollTop = 0;
|
|
18131
18236
|
});
|
|
18132
18237
|
}
|
|
@@ -18159,7 +18264,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18159
18264
|
if (props.onAddRow) {
|
|
18160
18265
|
props.onAddRow(row);
|
|
18161
18266
|
} else if (props.isTree) {
|
|
18162
|
-
hook
|
|
18267
|
+
hook?.onAddRow(row);
|
|
18163
18268
|
}
|
|
18164
18269
|
}
|
|
18165
18270
|
function handleEdit(row) {
|
|
@@ -18335,20 +18440,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18335
18440
|
onChange: _cache[2] || (_cache[2] = ($event) => onSearch()),
|
|
18336
18441
|
onClear: ($event) => searchFilter.value[item.key] = void 0
|
|
18337
18442
|
}, {
|
|
18338
|
-
default: withCtx(() =>
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
}), 256))
|
|
18350
|
-
];
|
|
18351
|
-
}),
|
|
18443
|
+
default: withCtx(() => [
|
|
18444
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDictionary)(unref(EntityClass), item.key)?.toArray(), (enumItem) => {
|
|
18445
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
18446
|
+
!enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
|
|
18447
|
+
key: enumItem.key.toString(),
|
|
18448
|
+
label: enumItem.label,
|
|
18449
|
+
value: enumItem.key
|
|
18450
|
+
}, null, 8, ["label", "value"])) : createCommentVNode("", true)
|
|
18451
|
+
], 64);
|
|
18452
|
+
}), 256))
|
|
18453
|
+
]),
|
|
18352
18454
|
_: 2
|
|
18353
18455
|
}, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
|
|
18354
18456
|
key: 1,
|
|
@@ -18715,10 +18817,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
18715
18817
|
emits("changed", currentData.value);
|
|
18716
18818
|
}
|
|
18717
18819
|
function filterNode(value, node) {
|
|
18718
|
-
var _a;
|
|
18719
18820
|
if (!value)
|
|
18720
18821
|
return true;
|
|
18721
|
-
return
|
|
18822
|
+
return node.name?.indexOf(value) !== -1;
|
|
18722
18823
|
}
|
|
18723
18824
|
return (_ctx, _cache) => {
|
|
18724
18825
|
const _component_el_input = resolveComponent("el-input");
|
|
@@ -18897,11 +18998,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18897
18998
|
});
|
|
18898
18999
|
const User = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-245c0051"]]);
|
|
18899
19000
|
class WebEnum extends Enum {
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
__publicField(this, "color");
|
|
18903
|
-
__publicField(this, "disabled");
|
|
18904
|
-
}
|
|
19001
|
+
color;
|
|
19002
|
+
disabled;
|
|
18905
19003
|
/**
|
|
18906
19004
|
* ### 设置颜色
|
|
18907
19005
|
*/
|
|
@@ -18917,17 +19015,16 @@ class WebEnum extends Enum {
|
|
|
18917
19015
|
return this;
|
|
18918
19016
|
}
|
|
18919
19017
|
}
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
|
|
18928
|
-
|
|
18929
|
-
|
|
18930
|
-
let DisableEnum = _DisableEnum;
|
|
19018
|
+
class DisableEnum extends WebEnum {
|
|
19019
|
+
/**
|
|
19020
|
+
* ### 禁用
|
|
19021
|
+
*/
|
|
19022
|
+
static DISABLED = new DisableEnum(true, "禁用").setColor(WebColor.DANGER);
|
|
19023
|
+
/**
|
|
19024
|
+
* ### 启用
|
|
19025
|
+
*/
|
|
19026
|
+
static ENABLE = new DisableEnum(false, "启用").setColor(WebColor.SUCCESS);
|
|
19027
|
+
}
|
|
18931
19028
|
function useDetail(props, ServiceClass, option = {}) {
|
|
18932
19029
|
const isLoading = ref(false);
|
|
18933
19030
|
const service = Transformer.newInstance(ServiceClass);
|
|
@@ -18957,33 +19054,31 @@ function useDetail(props, ServiceClass, option = {}) {
|
|
|
18957
19054
|
};
|
|
18958
19055
|
}
|
|
18959
19056
|
class WebValidator {
|
|
18960
|
-
|
|
18961
|
-
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
|
|
18970
|
-
|
|
18971
|
-
|
|
18972
|
-
|
|
18973
|
-
|
|
18974
|
-
|
|
18975
|
-
|
|
18976
|
-
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
__publicField(this, "validator");
|
|
18986
|
-
}
|
|
19057
|
+
/**
|
|
19058
|
+
* ### 错误提醒
|
|
19059
|
+
* 请通过 `.show()` 传入
|
|
19060
|
+
*/
|
|
19061
|
+
message;
|
|
19062
|
+
/**
|
|
19063
|
+
* ### 触发方式
|
|
19064
|
+
* 不建议直接设置哦~ (默认blur)
|
|
19065
|
+
*/
|
|
19066
|
+
trigger = "change";
|
|
19067
|
+
/**
|
|
19068
|
+
* ### 类型
|
|
19069
|
+
* 可通过 `toString` `toNumber` `toArray` 设置 (默认`string`)
|
|
19070
|
+
*/
|
|
19071
|
+
type;
|
|
19072
|
+
/**
|
|
19073
|
+
* ### 是否必填
|
|
19074
|
+
* 可以调用 `.ifEmpty()`
|
|
19075
|
+
*/
|
|
19076
|
+
required = false;
|
|
19077
|
+
/**
|
|
19078
|
+
* ### 自定义验证器
|
|
19079
|
+
* 请调用 `.setCustomValidator()`
|
|
19080
|
+
*/
|
|
19081
|
+
validator;
|
|
18987
19082
|
/**
|
|
18988
19083
|
* ### 通过指定错误信息来创建一个验证器
|
|
18989
19084
|
* @param message `可选` 验证失败的提示
|
|
@@ -19511,8 +19606,7 @@ function useEditor(props, ServiceClass, option = {}) {
|
|
|
19511
19606
|
watch(
|
|
19512
19607
|
result.formData,
|
|
19513
19608
|
() => {
|
|
19514
|
-
|
|
19515
|
-
(_a = formRef.value) == null ? void 0 : _a.validate();
|
|
19609
|
+
formRef.value?.validate();
|
|
19516
19610
|
},
|
|
19517
19611
|
{
|
|
19518
19612
|
deep: true,
|
|
@@ -19590,24 +19684,24 @@ function useTableTree(serviceClass, option = {}) {
|
|
|
19590
19684
|
}
|
|
19591
19685
|
class RootModel extends Transformer {
|
|
19592
19686
|
}
|
|
19593
|
-
var
|
|
19687
|
+
var __defProp = Object.defineProperty;
|
|
19594
19688
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
19595
19689
|
var result = void 0;
|
|
19596
19690
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19597
19691
|
if (decorator = decorators[i])
|
|
19598
19692
|
result = decorator(target, key, result) || result;
|
|
19599
|
-
if (result)
|
|
19693
|
+
if (result) __defProp(target, key, result);
|
|
19600
19694
|
return result;
|
|
19601
19695
|
};
|
|
19602
19696
|
class RootEntity extends RootModel {
|
|
19697
|
+
id;
|
|
19698
|
+
isDisabled;
|
|
19603
19699
|
/**
|
|
19604
19700
|
* ### 实例化一个实体
|
|
19605
19701
|
* @param id `可选` 主键 `ID`
|
|
19606
19702
|
*/
|
|
19607
19703
|
constructor(id) {
|
|
19608
19704
|
super();
|
|
19609
|
-
__publicField(this, "id");
|
|
19610
|
-
__publicField(this, "isDisabled");
|
|
19611
19705
|
if (id) {
|
|
19612
19706
|
this.id = id;
|
|
19613
19707
|
}
|
|
@@ -19639,6 +19733,18 @@ __decorateClass([
|
|
|
19639
19733
|
})
|
|
19640
19734
|
], RootEntity.prototype, "isDisabled");
|
|
19641
19735
|
class RouterUtil {
|
|
19736
|
+
/**
|
|
19737
|
+
* ### 当前路由
|
|
19738
|
+
*/
|
|
19739
|
+
static router;
|
|
19740
|
+
/**
|
|
19741
|
+
* ### 私有构造器
|
|
19742
|
+
*/
|
|
19743
|
+
static components = {};
|
|
19744
|
+
/**
|
|
19745
|
+
* ### 组件目录
|
|
19746
|
+
*/
|
|
19747
|
+
static componentsDirectory = "";
|
|
19642
19748
|
/**
|
|
19643
19749
|
* ### 将 `IMenu` 菜单列表初始化到 `Vue` 路由中
|
|
19644
19750
|
* @param menuList 菜单列表
|
|
@@ -19741,27 +19847,12 @@ class RouterUtil {
|
|
|
19741
19847
|
}
|
|
19742
19848
|
}
|
|
19743
19849
|
}
|
|
19744
|
-
/**
|
|
19745
|
-
* ### 当前路由
|
|
19746
|
-
*/
|
|
19747
|
-
__publicField(RouterUtil, "router");
|
|
19748
|
-
/**
|
|
19749
|
-
* ### 私有构造器
|
|
19750
|
-
*/
|
|
19751
|
-
__publicField(RouterUtil, "components", {});
|
|
19752
|
-
/**
|
|
19753
|
-
* ### 组件目录
|
|
19754
|
-
*/
|
|
19755
|
-
__publicField(RouterUtil, "componentsDirectory", "");
|
|
19756
19850
|
class AbstractService extends Transformer {
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
*/
|
|
19763
|
-
__publicField(this, "loading");
|
|
19764
|
-
}
|
|
19851
|
+
/**
|
|
19852
|
+
* ### `Loading`
|
|
19853
|
+
* 你可以将这个传入的对象绑定到你需要 `Loading` 的 `DOM` 上
|
|
19854
|
+
*/
|
|
19855
|
+
loading;
|
|
19765
19856
|
/**
|
|
19766
19857
|
* ### 静态创建一个 `API` 服务实例
|
|
19767
19858
|
* @param loading `可选` Loading
|
|
@@ -19796,45 +19887,42 @@ class AbstractService extends Transformer {
|
|
|
19796
19887
|
}
|
|
19797
19888
|
}
|
|
19798
19889
|
class AbstractCurdService extends AbstractService {
|
|
19799
|
-
|
|
19800
|
-
|
|
19801
|
-
|
|
19802
|
-
|
|
19803
|
-
|
|
19804
|
-
|
|
19805
|
-
|
|
19806
|
-
|
|
19807
|
-
|
|
19808
|
-
|
|
19809
|
-
|
|
19810
|
-
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
|
|
19815
|
-
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
|
|
19820
|
-
|
|
19821
|
-
|
|
19822
|
-
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
|
|
19827
|
-
|
|
19828
|
-
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
*/
|
|
19836
|
-
__publicField(this, "urlDelete", "delete");
|
|
19837
|
-
}
|
|
19890
|
+
/**
|
|
19891
|
+
* ### 分页查询默认 `URL`
|
|
19892
|
+
*/
|
|
19893
|
+
urlGetPage = "getPage";
|
|
19894
|
+
/**
|
|
19895
|
+
* ### 不分页查询默认 `URL`
|
|
19896
|
+
*/
|
|
19897
|
+
urlGetList = "getList";
|
|
19898
|
+
/**
|
|
19899
|
+
* ### 不分页树查询默认 `URL`
|
|
19900
|
+
*/
|
|
19901
|
+
urlGetTreeList = "getTreeList";
|
|
19902
|
+
/**
|
|
19903
|
+
* ### 查询详情默认 `URL`
|
|
19904
|
+
*/
|
|
19905
|
+
urlGetDetail = "getDetail";
|
|
19906
|
+
/**
|
|
19907
|
+
* ### 添加默认 `URL`
|
|
19908
|
+
*/
|
|
19909
|
+
urlAdd = "add";
|
|
19910
|
+
/**
|
|
19911
|
+
* ### 启用默认 `URL`
|
|
19912
|
+
*/
|
|
19913
|
+
urlEnable = "enable";
|
|
19914
|
+
/**
|
|
19915
|
+
* ### 禁用默认 `URL`
|
|
19916
|
+
*/
|
|
19917
|
+
urlDisable = "disable";
|
|
19918
|
+
/**
|
|
19919
|
+
* ### 修改默认 `URL`
|
|
19920
|
+
*/
|
|
19921
|
+
urlUpdate = "update";
|
|
19922
|
+
/**
|
|
19923
|
+
* ### 删除默认 `URL`
|
|
19924
|
+
*/
|
|
19925
|
+
urlDelete = "delete";
|
|
19838
19926
|
/**
|
|
19839
19927
|
* ### 创建验证器
|
|
19840
19928
|
* @param moreRule `可选` 更多的验证规则
|