@airpower/web 1.5.12 → 1.5.13
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/components/form/FormField.vue.d.ts +2 -2
- package/dist/components/image/Image.vue.d.ts +4 -4
- package/dist/components/input/Input.vue.d.ts +2 -2
- package/dist/components/select/Select.vue.d.ts +5 -5
- package/dist/components/tree/TreeBox.vue.d.ts +3 -3
- package/dist/config/WebConfig.d.ts +1 -0
- package/dist/main.js +813 -715
- package/dist/web.css +17 -17
- package/package.json +1 -1
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, createBlock, unref, mergeProps, toHandlers, withCtx, renderSlot, resolveComponent, 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, { ElLink, ElButton, ElMessage, ElMessageBox, ElIcon, ElEmpty, ElFormItem, ElSubMenu, ElMenuItem, ElMenu, ElImage, ElUpload, ElPagination, ElPopover, ElRadioGroup, ElRadioButton, ElInput, ElProgress, ElTabPane, ElTabs, ElCheckTag, ElSelect, ElOption, ElTable, ElTableColumn, ElTree } from "element-plus";
|
|
6
3
|
import axios from "axios";
|
|
@@ -561,7 +558,8 @@ var zhCn = {
|
|
|
561
558
|
tour: {
|
|
562
559
|
next: "下一步",
|
|
563
560
|
previous: "上一步",
|
|
564
|
-
finish: "结束导览"
|
|
561
|
+
finish: "结束导览",
|
|
562
|
+
close: "关闭此对话框"
|
|
565
563
|
},
|
|
566
564
|
tree: {
|
|
567
565
|
emptyText: "暂无数据"
|
|
@@ -606,6 +604,137 @@ var HttpStatus = /* @__PURE__ */ ((HttpStatus2) => {
|
|
|
606
604
|
return HttpStatus2;
|
|
607
605
|
})(HttpStatus || {});
|
|
608
606
|
class WebConfig {
|
|
607
|
+
/**
|
|
608
|
+
* ### 应用标识
|
|
609
|
+
*/
|
|
610
|
+
static appKey = "AirPower";
|
|
611
|
+
/**
|
|
612
|
+
* ### 是否自动处理权限前缀
|
|
613
|
+
*/
|
|
614
|
+
static autoPermissionPrefix = true;
|
|
615
|
+
/**
|
|
616
|
+
* ### 最大文本域长度
|
|
617
|
+
*/
|
|
618
|
+
static maxTextAreaLength = 200;
|
|
619
|
+
/**
|
|
620
|
+
* ### 最大文本长度
|
|
621
|
+
*/
|
|
622
|
+
static maxTextLength = 50;
|
|
623
|
+
/**
|
|
624
|
+
* ### 文本域的最小行数
|
|
625
|
+
*/
|
|
626
|
+
static textareaMinRows = 3;
|
|
627
|
+
/**
|
|
628
|
+
* ### 文本域的最大行数
|
|
629
|
+
*/
|
|
630
|
+
static textareaMaxRows = 6;
|
|
631
|
+
/**
|
|
632
|
+
* ### 上传地址
|
|
633
|
+
*/
|
|
634
|
+
static uploadUrl = "/upload";
|
|
635
|
+
/**
|
|
636
|
+
* ### 是否禁用权限
|
|
637
|
+
*
|
|
638
|
+
* - 如此项配置为 `true`, 则所有自动处理权限的功能都将失效。
|
|
639
|
+
*/
|
|
640
|
+
static disablePermission = false;
|
|
641
|
+
/**
|
|
642
|
+
* ### 金额方向 (向上取、向下取、四舍五入)
|
|
643
|
+
*/
|
|
644
|
+
static moneyDirection = "down";
|
|
645
|
+
/**
|
|
646
|
+
* ### 金额精度
|
|
647
|
+
*/
|
|
648
|
+
static moneyPrecision = 2;
|
|
649
|
+
/**
|
|
650
|
+
* ### 每页显示条数可选项
|
|
651
|
+
*/
|
|
652
|
+
static pageSizes = [10, 20, 50, 100];
|
|
653
|
+
/**
|
|
654
|
+
* ### 默认的上传文件名称
|
|
655
|
+
*/
|
|
656
|
+
static uploadFileName = "file";
|
|
657
|
+
/**
|
|
658
|
+
* ### element-plus 语言包
|
|
659
|
+
*/
|
|
660
|
+
static elementPlusLocale = zhCn;
|
|
661
|
+
/**
|
|
662
|
+
* ### 权限缓存 `Key`
|
|
663
|
+
*/
|
|
664
|
+
static permissionCacheKey = "permissions";
|
|
665
|
+
/**
|
|
666
|
+
* ### 接口根地址
|
|
667
|
+
* 以 `/` 结尾
|
|
668
|
+
*/
|
|
669
|
+
static apiUrl = "/api/";
|
|
670
|
+
/**
|
|
671
|
+
* ### 最大数字
|
|
672
|
+
*/
|
|
673
|
+
static maxNumber = 999999999;
|
|
674
|
+
/**
|
|
675
|
+
* ### 最小数字
|
|
676
|
+
*/
|
|
677
|
+
static minNumber = 0;
|
|
678
|
+
/**
|
|
679
|
+
* ### `AccessToken` 对应的 `Key`
|
|
680
|
+
*/
|
|
681
|
+
static authorizationHeaderKey = HttpHeader.AUTHORIZATION;
|
|
682
|
+
/**
|
|
683
|
+
* ### 全局 `http` 请求返回 成功状态码
|
|
684
|
+
*/
|
|
685
|
+
static successCode = HttpStatus.OK;
|
|
686
|
+
/**
|
|
687
|
+
* ### 全局 `http` 请求返回 登录状态码
|
|
688
|
+
*/
|
|
689
|
+
static unAuthorizeCode = HttpStatus.UNAUTHORIZED;
|
|
690
|
+
/**
|
|
691
|
+
* ### 超时时间 毫秒
|
|
692
|
+
* 超时后请求会自动断开并抛出异常
|
|
693
|
+
*/
|
|
694
|
+
static timeout = 5e3;
|
|
695
|
+
/**
|
|
696
|
+
* ### 导出模板地址
|
|
697
|
+
*/
|
|
698
|
+
static importTemplateUrl = "/export/template";
|
|
699
|
+
/**
|
|
700
|
+
* ### 导入API地址
|
|
701
|
+
*/
|
|
702
|
+
static importUrl = "/import";
|
|
703
|
+
/**
|
|
704
|
+
* ### 导出API地址
|
|
705
|
+
*/
|
|
706
|
+
static exportUrl = "/export";
|
|
707
|
+
/**
|
|
708
|
+
* ### 导出查询API地址
|
|
709
|
+
*/
|
|
710
|
+
static exportQueryUrl = "/queryExport";
|
|
711
|
+
/**
|
|
712
|
+
* ### 静态资源地址
|
|
713
|
+
*/
|
|
714
|
+
static staticUrl = "/static";
|
|
715
|
+
/**
|
|
716
|
+
* ### 登录地址
|
|
717
|
+
*/
|
|
718
|
+
static loginUrl = "/login";
|
|
719
|
+
/**
|
|
720
|
+
* ### 小数精度位数
|
|
721
|
+
*/
|
|
722
|
+
static numberPrecision = 2;
|
|
723
|
+
/**
|
|
724
|
+
* ### 是否超时
|
|
725
|
+
*/
|
|
726
|
+
static isTimeout = false;
|
|
727
|
+
/**
|
|
728
|
+
* ### 产品名称
|
|
729
|
+
*/
|
|
730
|
+
static product = "AirPower";
|
|
731
|
+
/**
|
|
732
|
+
* ### 树形控件属性
|
|
733
|
+
*/
|
|
734
|
+
static treeProps = {
|
|
735
|
+
children: "children",
|
|
736
|
+
label: "name"
|
|
737
|
+
};
|
|
609
738
|
/**
|
|
610
739
|
* ### 获取身份令牌
|
|
611
740
|
*/
|
|
@@ -626,137 +755,6 @@ class WebConfig {
|
|
|
626
755
|
localStorage.setItem(this.authorizationHeaderKey, accessToken);
|
|
627
756
|
}
|
|
628
757
|
}
|
|
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
758
|
class Transformer {
|
|
761
759
|
/**
|
|
762
760
|
* ### 从 `JSON` 转换到当前类的对象
|
|
@@ -892,26 +890,28 @@ class Transformer {
|
|
|
892
890
|
* @param fields 属性列表
|
|
893
891
|
*/
|
|
894
892
|
expose(...fields) {
|
|
895
|
-
const
|
|
893
|
+
const copy = this.copy();
|
|
894
|
+
const fieldList = Object.keys(copy);
|
|
896
895
|
for (const field of fieldList) {
|
|
897
896
|
if (!fields.includes(field)) {
|
|
898
|
-
|
|
897
|
+
copy[field] = void 0;
|
|
899
898
|
}
|
|
900
899
|
}
|
|
901
|
-
return
|
|
900
|
+
return copy;
|
|
902
901
|
}
|
|
903
902
|
/**
|
|
904
903
|
* ### 排除部分类的属性
|
|
905
904
|
* @param fields 属性列表
|
|
906
905
|
*/
|
|
907
906
|
exclude(...fields) {
|
|
908
|
-
const
|
|
907
|
+
const copy = this.copy();
|
|
908
|
+
const fieldList = Object.keys(copy);
|
|
909
909
|
for (const field of fieldList) {
|
|
910
910
|
if (fields.includes(field)) {
|
|
911
|
-
|
|
911
|
+
copy[field] = void 0;
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
-
return
|
|
914
|
+
return copy;
|
|
915
915
|
}
|
|
916
916
|
/**
|
|
917
917
|
* ### 用指定的数据对当前实例进行覆盖
|
|
@@ -1130,6 +1130,10 @@ var PermissionAction = /* @__PURE__ */ ((PermissionAction2) => {
|
|
|
1130
1130
|
return PermissionAction2;
|
|
1131
1131
|
})(PermissionAction || {});
|
|
1132
1132
|
class PermissionUtil {
|
|
1133
|
+
/**
|
|
1134
|
+
* ### 权限列表
|
|
1135
|
+
*/
|
|
1136
|
+
static permissionList = [];
|
|
1133
1137
|
/**
|
|
1134
1138
|
* ### 获取权限标识
|
|
1135
1139
|
* - 如 `action` 对应装饰的 `xxxPermission` 是空字符串,则表示无需权限,否则:
|
|
@@ -1152,15 +1156,15 @@ class PermissionUtil {
|
|
|
1152
1156
|
let permission;
|
|
1153
1157
|
const modelConfig = getModelConfig(EntityClass);
|
|
1154
1158
|
const actionRecord = {
|
|
1155
|
-
[PermissionAction.ADD]: modelConfig
|
|
1156
|
-
[PermissionAction.DELETE]: modelConfig
|
|
1157
|
-
[PermissionAction.EDIT]: modelConfig
|
|
1158
|
-
[PermissionAction.DETAIL]: modelConfig
|
|
1159
|
-
[PermissionAction.ADD_CHILD]: modelConfig
|
|
1160
|
-
[PermissionAction.EXPORT]: modelConfig
|
|
1161
|
-
[PermissionAction.IMPORT]: modelConfig
|
|
1162
|
-
[PermissionAction.DISABLE]: modelConfig
|
|
1163
|
-
[PermissionAction.ENABLE]: modelConfig
|
|
1159
|
+
[PermissionAction.ADD]: modelConfig?.addPermission,
|
|
1160
|
+
[PermissionAction.DELETE]: modelConfig?.deletePermission,
|
|
1161
|
+
[PermissionAction.EDIT]: modelConfig?.editPermission,
|
|
1162
|
+
[PermissionAction.DETAIL]: modelConfig?.detailPermission,
|
|
1163
|
+
[PermissionAction.ADD_CHILD]: modelConfig?.addChildPermission,
|
|
1164
|
+
[PermissionAction.EXPORT]: modelConfig?.exportPermission,
|
|
1165
|
+
[PermissionAction.IMPORT]: modelConfig?.importPermission,
|
|
1166
|
+
[PermissionAction.DISABLE]: modelConfig?.disablePermission,
|
|
1167
|
+
[PermissionAction.ENABLE]: modelConfig?.enablePermission
|
|
1164
1168
|
};
|
|
1165
1169
|
const keys = Object.keys(actionRecord);
|
|
1166
1170
|
if (keys.includes(action)) {
|
|
@@ -1174,7 +1178,7 @@ class PermissionUtil {
|
|
|
1174
1178
|
if (permission === void 0) {
|
|
1175
1179
|
permission = action;
|
|
1176
1180
|
}
|
|
1177
|
-
let prefix = modelConfig
|
|
1181
|
+
let prefix = modelConfig?.permissionPrefix;
|
|
1178
1182
|
if (prefix === "") {
|
|
1179
1183
|
return permission;
|
|
1180
1184
|
}
|
|
@@ -1215,10 +1219,6 @@ class PermissionUtil {
|
|
|
1215
1219
|
return this.permissionList.includes(permission);
|
|
1216
1220
|
}
|
|
1217
1221
|
}
|
|
1218
|
-
/**
|
|
1219
|
-
* ### 权限列表
|
|
1220
|
-
*/
|
|
1221
|
-
__publicField(PermissionUtil, "permissionList", []);
|
|
1222
1222
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1223
1223
|
__name: "Button",
|
|
1224
1224
|
props: {
|
|
@@ -1357,7 +1357,12 @@ function getAugmentedNamespace(n) {
|
|
|
1357
1357
|
var f = n.default;
|
|
1358
1358
|
if (typeof f == "function") {
|
|
1359
1359
|
var a = function a2() {
|
|
1360
|
-
|
|
1360
|
+
var isInstance = false;
|
|
1361
|
+
try {
|
|
1362
|
+
isInstance = this instanceof a2;
|
|
1363
|
+
} catch {
|
|
1364
|
+
}
|
|
1365
|
+
if (isInstance) {
|
|
1361
1366
|
return Reflect.construct(f, arguments, this.constructor);
|
|
1362
1367
|
}
|
|
1363
1368
|
return f.apply(this, arguments);
|
|
@@ -2051,9 +2056,6 @@ const useClipboard = (opts) => {
|
|
|
2051
2056
|
}
|
|
2052
2057
|
};
|
|
2053
2058
|
};
|
|
2054
|
-
var __defProp$6 = Object.defineProperty;
|
|
2055
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2056
|
-
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2057
2059
|
var Language = /* @__PURE__ */ ((Language2) => {
|
|
2058
2060
|
Language2["English"] = "English";
|
|
2059
2061
|
Language2["ChineseSimplified"] = "简体中文";
|
|
@@ -2072,31 +2074,40 @@ var Language = /* @__PURE__ */ ((Language2) => {
|
|
|
2072
2074
|
Language2["Italian"] = "Italiano";
|
|
2073
2075
|
return Language2;
|
|
2074
2076
|
})(Language || {});
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2077
|
+
class I18n {
|
|
2078
|
+
/**
|
|
2079
|
+
* ### 当前使用的语言包
|
|
2080
|
+
*/
|
|
2081
|
+
static currentLanguage;
|
|
2082
|
+
/**
|
|
2083
|
+
* ### 语言列表
|
|
2084
|
+
*/
|
|
2085
|
+
static languages = [];
|
|
2086
|
+
/**
|
|
2087
|
+
* ### 语言名称
|
|
2088
|
+
*/
|
|
2089
|
+
language = Language.ChineseSimplified;
|
|
2079
2090
|
/**
|
|
2080
2091
|
* ### 获取当前使用的语言
|
|
2081
2092
|
* @returns 当前使用的语言
|
|
2082
2093
|
*/
|
|
2083
2094
|
static getCurrentLanguage() {
|
|
2084
|
-
return
|
|
2095
|
+
return I18n.currentLanguage.language;
|
|
2085
2096
|
}
|
|
2086
2097
|
/**
|
|
2087
2098
|
* ### 获取支持的语言列表
|
|
2088
2099
|
* @returns 语言列表
|
|
2089
2100
|
*/
|
|
2090
2101
|
static getLanguages() {
|
|
2091
|
-
return
|
|
2102
|
+
return I18n.languages.map((item) => item.language);
|
|
2092
2103
|
}
|
|
2093
2104
|
/**
|
|
2094
2105
|
* ### 获取翻译后的字符串
|
|
2095
2106
|
* @returns 翻译后的字符串
|
|
2096
2107
|
*/
|
|
2097
2108
|
static get() {
|
|
2098
|
-
|
|
2099
|
-
return
|
|
2109
|
+
I18n.update(new this());
|
|
2110
|
+
return I18n.currentLanguage;
|
|
2100
2111
|
}
|
|
2101
2112
|
/**
|
|
2102
2113
|
* ### 添加国际化语言
|
|
@@ -2104,108 +2115,115 @@ const _I18n = class _I18n2 {
|
|
|
2104
2115
|
*/
|
|
2105
2116
|
static addLanguage(...languages) {
|
|
2106
2117
|
if (languages.length === 0) {
|
|
2107
|
-
|
|
2118
|
+
console.error("请传入语言包");
|
|
2119
|
+
return;
|
|
2108
2120
|
}
|
|
2109
|
-
|
|
2121
|
+
I18n.update(new this());
|
|
2110
2122
|
languages.forEach((item) => {
|
|
2111
|
-
|
|
2123
|
+
I18n.languages.push(item);
|
|
2112
2124
|
});
|
|
2113
|
-
_I18n2.package = _I18n2.languages.find((item) => item.language === _I18n2.currentLanguage) || _I18n2.languages[0];
|
|
2114
2125
|
}
|
|
2115
2126
|
/**
|
|
2116
2127
|
* ### 设置当前使用的语言
|
|
2117
2128
|
* @param language 语言
|
|
2118
2129
|
*/
|
|
2119
2130
|
static setCurrentLanguage(language) {
|
|
2120
|
-
|
|
2121
|
-
|
|
2131
|
+
if (I18n.languages.length === 0) {
|
|
2132
|
+
I18n.update(new this());
|
|
2133
|
+
}
|
|
2134
|
+
I18n.currentLanguage = I18n.languages.find((item) => item.language === language) || I18n.languages[0];
|
|
2122
2135
|
}
|
|
2123
2136
|
/**
|
|
2124
|
-
* ###
|
|
2137
|
+
* ### 更新语言
|
|
2138
|
+
* @param language 语言
|
|
2125
2139
|
*/
|
|
2126
|
-
static
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2140
|
+
static update(language) {
|
|
2141
|
+
let isExist = false;
|
|
2142
|
+
for (let i = 0; i < I18n.languages.length; i++) {
|
|
2143
|
+
if (I18n.languages[i].language === language.language) {
|
|
2144
|
+
I18n.languages[i] = language;
|
|
2145
|
+
isExist = true;
|
|
2146
|
+
break;
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
if (!isExist) {
|
|
2150
|
+
I18n.languages.push(language);
|
|
2151
|
+
}
|
|
2152
|
+
if (!I18n.currentLanguage) {
|
|
2153
|
+
I18n.currentLanguage = language;
|
|
2130
2154
|
}
|
|
2131
2155
|
}
|
|
2132
|
-
}
|
|
2133
|
-
__publicField$2(_I18n, "currentLanguage", Language.ChineseSimplified);
|
|
2134
|
-
__publicField$2(_I18n, "package");
|
|
2135
|
-
__publicField$2(_I18n, "languages", []);
|
|
2136
|
-
let I18n = _I18n;
|
|
2156
|
+
}
|
|
2137
2157
|
class WebI18n extends I18n {
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
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
|
-
__publicField(this, "NoPicture", "无图");
|
|
2205
|
-
__publicField(this, "Operation", "操作");
|
|
2206
|
-
}
|
|
2158
|
+
ID = "ID";
|
|
2159
|
+
Detail = "详情";
|
|
2160
|
+
Update = "修改";
|
|
2161
|
+
Disable = "禁用";
|
|
2162
|
+
Enable = "启用";
|
|
2163
|
+
Delete = "删除";
|
|
2164
|
+
Add = "添加";
|
|
2165
|
+
UpdateSuccess = "修改成功";
|
|
2166
|
+
AddSuccess = "添加成功";
|
|
2167
|
+
DeleteSuccess = "删除成功";
|
|
2168
|
+
SelectPlease = "请选择";
|
|
2169
|
+
InputPlease = "请输入";
|
|
2170
|
+
DisableSuccess = "禁用成功";
|
|
2171
|
+
EnableSuccess = "启用成功";
|
|
2172
|
+
Confirm = "确定";
|
|
2173
|
+
Cancel = "取消";
|
|
2174
|
+
ConfirmPlease = "请确认";
|
|
2175
|
+
ConfirmToDisable = "是否确认禁用当前选择的数据?";
|
|
2176
|
+
ConfirmToEnable = "是否确认启用当前选择的数据?";
|
|
2177
|
+
ConfirmToDelete = "是否确认删除当前选择的数据?";
|
|
2178
|
+
CopySuccess = "成功复制到剪切板!";
|
|
2179
|
+
PageSize = "每页";
|
|
2180
|
+
InputPageNumber = "请输入页码";
|
|
2181
|
+
Jump = "跳转";
|
|
2182
|
+
TotalRow = "总条数";
|
|
2183
|
+
UploadError = "上传失败";
|
|
2184
|
+
UploadSuccess = "上传成功";
|
|
2185
|
+
Alert = "温馨提示";
|
|
2186
|
+
FileSizeLimited = "上传的文件过大";
|
|
2187
|
+
FileTypeNotSupported = "上传的文件暂不支持";
|
|
2188
|
+
FileUploadErrorAndRetryPlease = "上传文件失败,请稍后重试";
|
|
2189
|
+
ClickHereToUpload = "点击或拖到此处上传";
|
|
2190
|
+
FileSize = "文件大小: ";
|
|
2191
|
+
FileExtension = "文件类型: ";
|
|
2192
|
+
TestError = "正则表达式校验失败";
|
|
2193
|
+
InvalidEmail = "请输入正确的邮箱地址";
|
|
2194
|
+
InvalidTelPhone = "请输入有效的座机号";
|
|
2195
|
+
InvalidPhone = "请输入正确的手机号";
|
|
2196
|
+
InvalidLetter = "只能输入字母";
|
|
2197
|
+
InvalidNaturalIntegerNumber = "只允许输入非负整数";
|
|
2198
|
+
InvalidNumberAndLetter = "只能输入数字和字母";
|
|
2199
|
+
IfNotChinese = "只允许输入中文汉字";
|
|
2200
|
+
InvalidChineseIdCard = "请输入正确的身份证号码";
|
|
2201
|
+
InvalidNumber = "请输入正确的数字";
|
|
2202
|
+
InvalidIntegerNumber = "请输入正确的整数";
|
|
2203
|
+
InvalidNaturalNumber = "只允许输入非负数字";
|
|
2204
|
+
InvalidMobilePhone = "请输入正确的手机号";
|
|
2205
|
+
ConfirmToComplete = "请确认填写完整";
|
|
2206
|
+
InvalidContain = "不允许输入中包含";
|
|
2207
|
+
Import = "导入";
|
|
2208
|
+
ImportSuccess = "数据导入成功";
|
|
2209
|
+
DownloadTemplate = "下载模板";
|
|
2210
|
+
Export = "导出";
|
|
2211
|
+
DownloadExportFile = "下载导出文件";
|
|
2212
|
+
ExportSuccess = "数据导出成功";
|
|
2213
|
+
ExportLoadingAndWaitPlease = "正在导出数据,请稍后等待...";
|
|
2214
|
+
NoData = "暂无数据";
|
|
2215
|
+
SelectTableColumnsToShow = "选择要显示的列";
|
|
2216
|
+
ConfirmToLogout = "是否确认退出登录?";
|
|
2217
|
+
Logout = "退出登录";
|
|
2218
|
+
Column = "列";
|
|
2219
|
+
ImageSupportExtensions = "支持的图片格式:";
|
|
2220
|
+
FileMaxSizeAllowed = "最大允许上传文件大小:";
|
|
2221
|
+
UploadImage = "上传图片";
|
|
2222
|
+
NoPicture = "无图";
|
|
2223
|
+
Operation = "操作";
|
|
2207
2224
|
}
|
|
2208
2225
|
class FeedbackUtil {
|
|
2226
|
+
static defaultToastDuration = 3e3;
|
|
2209
2227
|
/**
|
|
2210
2228
|
* ### 警告吐司
|
|
2211
2229
|
* @param message 消息
|
|
@@ -2357,7 +2375,6 @@ class FeedbackUtil {
|
|
|
2357
2375
|
return this.showAlert(message, title, "info");
|
|
2358
2376
|
}
|
|
2359
2377
|
}
|
|
2360
|
-
__publicField(FeedbackUtil, "defaultToastDuration", 3e3);
|
|
2361
2378
|
const _hoisted_1$i = { class: "a-copy" };
|
|
2362
2379
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2363
2380
|
__name: "Copy",
|
|
@@ -8987,18 +9004,21 @@ function requireCryptoJs() {
|
|
|
8987
9004
|
}
|
|
8988
9005
|
var cryptoJsExports = requireCryptoJs();
|
|
8989
9006
|
const CryptoJS = /* @__PURE__ */ getDefaultExportFromCjs(cryptoJsExports);
|
|
8990
|
-
var __defProp$5 = Object.defineProperty;
|
|
8991
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8992
|
-
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8993
9007
|
class Enum {
|
|
9008
|
+
/**
|
|
9009
|
+
* ### 枚举的值
|
|
9010
|
+
*/
|
|
9011
|
+
key;
|
|
9012
|
+
/**
|
|
9013
|
+
* ### 枚举的描述
|
|
9014
|
+
*/
|
|
9015
|
+
label;
|
|
8994
9016
|
/**
|
|
8995
9017
|
* ### 实例化创建一个枚举项目
|
|
8996
9018
|
* @param key 枚举值
|
|
8997
9019
|
* @param label 枚举描述
|
|
8998
9020
|
*/
|
|
8999
9021
|
constructor(key, label) {
|
|
9000
|
-
__publicField$1(this, "key");
|
|
9001
|
-
__publicField$1(this, "label");
|
|
9002
9022
|
this.key = key;
|
|
9003
9023
|
if (label) {
|
|
9004
9024
|
this.label = label;
|
|
@@ -9018,7 +9038,7 @@ class Enum {
|
|
|
9018
9038
|
*/
|
|
9019
9039
|
static getLabel(key, defaultLabel = "-") {
|
|
9020
9040
|
const item = this.get(key);
|
|
9021
|
-
return
|
|
9041
|
+
return item?.label || defaultLabel;
|
|
9022
9042
|
}
|
|
9023
9043
|
/**
|
|
9024
9044
|
* ### 将枚举转为数组
|
|
@@ -9035,10 +9055,11 @@ class Enum {
|
|
|
9035
9055
|
return this.key === key;
|
|
9036
9056
|
}
|
|
9037
9057
|
}
|
|
9038
|
-
var __defProp$4 = Object.defineProperty;
|
|
9039
|
-
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9040
|
-
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9041
9058
|
class CryptoUtil {
|
|
9059
|
+
/**
|
|
9060
|
+
* ### AES加解密使用默认向量
|
|
9061
|
+
*/
|
|
9062
|
+
static aesCbcIvString = "0000000000000000";
|
|
9042
9063
|
/**
|
|
9043
9064
|
* ### `AES` 加密方法
|
|
9044
9065
|
* @param data 加密数据
|
|
@@ -9084,22 +9105,69 @@ class CryptoUtil {
|
|
|
9084
9105
|
return CryptoJS.MD5(data).toString();
|
|
9085
9106
|
}
|
|
9086
9107
|
/**
|
|
9087
|
-
*
|
|
9108
|
+
* ### Base64编码
|
|
9088
9109
|
* @param data
|
|
9089
9110
|
*/
|
|
9090
9111
|
static base64Encode(data) {
|
|
9091
9112
|
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data));
|
|
9092
9113
|
}
|
|
9093
9114
|
/**
|
|
9094
|
-
*
|
|
9115
|
+
* ### Base64解码
|
|
9095
9116
|
* @param data
|
|
9096
9117
|
*/
|
|
9097
9118
|
static base64Decode(data) {
|
|
9098
9119
|
return CryptoJS.enc.Base64.parse(data).toString(CryptoJS.enc.Utf8);
|
|
9099
9120
|
}
|
|
9100
9121
|
}
|
|
9101
|
-
|
|
9102
|
-
|
|
9122
|
+
class DateTimeUtil {
|
|
9123
|
+
/**
|
|
9124
|
+
* ### 时间进制
|
|
9125
|
+
*/
|
|
9126
|
+
static SECOND_PER_MINUTE = 60;
|
|
9127
|
+
/**
|
|
9128
|
+
* ### 每小时的秒数
|
|
9129
|
+
*/
|
|
9130
|
+
static SECOND_PER_HOUR = this.SECOND_PER_MINUTE ** 2;
|
|
9131
|
+
/**
|
|
9132
|
+
* ### 每秒的毫秒数
|
|
9133
|
+
*/
|
|
9134
|
+
static MILLISECONDS_PER_SECOND = 1e3;
|
|
9135
|
+
/**
|
|
9136
|
+
* ### 每天小时
|
|
9137
|
+
*/
|
|
9138
|
+
static HOUR_PER_DAY = 24;
|
|
9139
|
+
/**
|
|
9140
|
+
* ### 每月天数
|
|
9141
|
+
*/
|
|
9142
|
+
static DAY_PER_MONTH = 30;
|
|
9143
|
+
/**
|
|
9144
|
+
* ### 每年月份
|
|
9145
|
+
*/
|
|
9146
|
+
static MONTH_PER_YEAR = 12;
|
|
9147
|
+
/**
|
|
9148
|
+
* ### 每年天数
|
|
9149
|
+
*/
|
|
9150
|
+
static DAY_PER_YEAR = 365;
|
|
9151
|
+
/**
|
|
9152
|
+
* ### 每天秒数
|
|
9153
|
+
*/
|
|
9154
|
+
static SECOND_PER_DAY = this.SECOND_PER_HOUR * this.HOUR_PER_DAY;
|
|
9155
|
+
/**
|
|
9156
|
+
* ### 每周天数
|
|
9157
|
+
*/
|
|
9158
|
+
static DAY_PER_WEEK = 7;
|
|
9159
|
+
/**
|
|
9160
|
+
* ### 每年平均周
|
|
9161
|
+
*/
|
|
9162
|
+
static WEEK_PER_YEAR = 52;
|
|
9163
|
+
/**
|
|
9164
|
+
* ### 每月平均周
|
|
9165
|
+
*/
|
|
9166
|
+
static WEEK_PER_MONTH = 4;
|
|
9167
|
+
/**
|
|
9168
|
+
* ### 每天秒数
|
|
9169
|
+
*/
|
|
9170
|
+
static SECONDS_PER_DAY = this.HOUR_PER_DAY * this.SECOND_PER_HOUR;
|
|
9103
9171
|
/**
|
|
9104
9172
|
* ### 睡会再起来干活
|
|
9105
9173
|
* 不要忘了`await`,否则没睡醒就起来干活了 :)
|
|
@@ -9233,21 +9301,53 @@ const _DateTimeUtil = class _DateTimeUtil2 {
|
|
|
9233
9301
|
}
|
|
9234
9302
|
return "Unknown";
|
|
9235
9303
|
}
|
|
9236
|
-
}
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9304
|
+
}
|
|
9305
|
+
class DateTimeFormatter extends Enum {
|
|
9306
|
+
/**
|
|
9307
|
+
* ### e.g. `2022-02-02 22:22:22`
|
|
9308
|
+
*/
|
|
9309
|
+
static FULL_DATE_TIME = new DateTimeFormatter("YYYY-MM-DD HH:mm:ss");
|
|
9310
|
+
/**
|
|
9311
|
+
* ### e.g. `15061231312312`
|
|
9312
|
+
* 毫秒时间戳
|
|
9313
|
+
*/
|
|
9314
|
+
static TIMESTAMP = new DateTimeFormatter("x");
|
|
9315
|
+
/**
|
|
9316
|
+
* ### e.g. `02-02 22:22`
|
|
9317
|
+
*/
|
|
9318
|
+
static SHORT_DATE_TIME = new DateTimeFormatter("MM-DD HH:mm");
|
|
9319
|
+
/**
|
|
9320
|
+
* ### e.g. `2022-02-02`
|
|
9321
|
+
*/
|
|
9322
|
+
static FULL_DATE = new DateTimeFormatter("YYYY-MM-DD");
|
|
9323
|
+
/**
|
|
9324
|
+
* ### e.g. `22:22:22`
|
|
9325
|
+
*/
|
|
9326
|
+
static FULL_TIME = new DateTimeFormatter("HH:mm:ss");
|
|
9327
|
+
/**
|
|
9328
|
+
* ### e.g. `2022`
|
|
9329
|
+
*/
|
|
9330
|
+
static YEAR = new DateTimeFormatter("YYYY");
|
|
9331
|
+
/**
|
|
9332
|
+
* ### e.g. `02`
|
|
9333
|
+
*/
|
|
9334
|
+
static MONTH = new DateTimeFormatter("MM");
|
|
9335
|
+
/**
|
|
9336
|
+
* ### e.g. `02`
|
|
9337
|
+
*/
|
|
9338
|
+
static DAY = new DateTimeFormatter("DD");
|
|
9339
|
+
/**
|
|
9340
|
+
* ### e.g. `22`
|
|
9341
|
+
*/
|
|
9342
|
+
static HOUR = new DateTimeFormatter("HH");
|
|
9343
|
+
/**
|
|
9344
|
+
* ### e.g. `22`
|
|
9345
|
+
*/
|
|
9346
|
+
static MINUTE = new DateTimeFormatter("mm");
|
|
9347
|
+
/**
|
|
9348
|
+
* ### e.g. `59`
|
|
9349
|
+
*/
|
|
9350
|
+
static SECOND = new DateTimeFormatter("ss");
|
|
9251
9351
|
/**
|
|
9252
9352
|
* ### 使用这个模板格式化毫秒时间戳
|
|
9253
9353
|
* @param milliSecond 毫秒时间戳
|
|
@@ -9279,20 +9379,20 @@ const _DateTimeFormatter = class _DateTimeFormatter2 extends Enum {
|
|
|
9279
9379
|
format() {
|
|
9280
9380
|
return this.formatDate(/* @__PURE__ */ new Date());
|
|
9281
9381
|
}
|
|
9282
|
-
}
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9382
|
+
}
|
|
9383
|
+
class DesensitizeUtil {
|
|
9384
|
+
/**
|
|
9385
|
+
* ### 默认的脱敏符号
|
|
9386
|
+
*/
|
|
9387
|
+
static DEFAULT_MASK = "*";
|
|
9388
|
+
/**
|
|
9389
|
+
* ### IP地址分隔符
|
|
9390
|
+
*/
|
|
9391
|
+
static IP_V4_SEPARATOR = ".";
|
|
9392
|
+
/**
|
|
9393
|
+
* ### `IPv4` 的块长度
|
|
9394
|
+
*/
|
|
9395
|
+
static IP_V4_PART_COUNT = 4;
|
|
9296
9396
|
/**
|
|
9297
9397
|
* ### 字符串替换
|
|
9298
9398
|
*
|
|
@@ -9325,7 +9425,7 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9325
9425
|
*/
|
|
9326
9426
|
static desensitizeIpv4Address(ipv4, symbol = this.DEFAULT_MASK) {
|
|
9327
9427
|
const strings = ipv4.split(this.IP_V4_SEPARATOR);
|
|
9328
|
-
if (strings.length !==
|
|
9428
|
+
if (strings.length !== DesensitizeUtil.IP_V4_PART_COUNT) {
|
|
9329
9429
|
return ipv4;
|
|
9330
9430
|
}
|
|
9331
9431
|
const temp = symbol + symbol + symbol;
|
|
@@ -9351,7 +9451,7 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9351
9451
|
tail = tail <= 0 ? type.tail : tail;
|
|
9352
9452
|
switch (type.key) {
|
|
9353
9453
|
case DesensitizeType.IP_V4.key:
|
|
9354
|
-
return
|
|
9454
|
+
return DesensitizeUtil.desensitizeIpv4Address(source, symbol);
|
|
9355
9455
|
case DesensitizeType.CHINESE_NAME.key:
|
|
9356
9456
|
if (source.length <= head + tail) {
|
|
9357
9457
|
tail = 0;
|
|
@@ -9365,12 +9465,56 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9365
9465
|
}
|
|
9366
9466
|
return this.replace(source, head, tail, symbol);
|
|
9367
9467
|
}
|
|
9368
|
-
}
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9468
|
+
}
|
|
9469
|
+
class DesensitizeType extends Enum {
|
|
9470
|
+
/**
|
|
9471
|
+
* ### 座机号码
|
|
9472
|
+
*/
|
|
9473
|
+
static TELEPHONE = new DesensitizeType("座机号码", 3, 4);
|
|
9474
|
+
/**
|
|
9475
|
+
* ### 手机号码
|
|
9476
|
+
*/
|
|
9477
|
+
static MOBILE = new DesensitizeType("手机号码", 3, 4);
|
|
9478
|
+
/**
|
|
9479
|
+
* ### 身份证号
|
|
9480
|
+
*/
|
|
9481
|
+
static ID_CARD = new DesensitizeType("身份证号", 6, 4);
|
|
9482
|
+
/**
|
|
9483
|
+
* ### 银行卡号
|
|
9484
|
+
*/
|
|
9485
|
+
static BANK_CARD = new DesensitizeType("银行卡号", 4, 4);
|
|
9486
|
+
/**
|
|
9487
|
+
* ### 车牌号
|
|
9488
|
+
*/
|
|
9489
|
+
static CAR_NUMBER = new DesensitizeType("车牌号", 2, 1);
|
|
9490
|
+
/**
|
|
9491
|
+
* ### 邮箱
|
|
9492
|
+
*/
|
|
9493
|
+
static EMAIL = new DesensitizeType("邮箱", 2, 2);
|
|
9494
|
+
/**
|
|
9495
|
+
* ### 中文姓名
|
|
9496
|
+
*/
|
|
9497
|
+
static CHINESE_NAME = new DesensitizeType("中文名", 1, 1);
|
|
9498
|
+
/**
|
|
9499
|
+
* ### 地址
|
|
9500
|
+
*/
|
|
9501
|
+
static ADDRESS = new DesensitizeType("地址", 3, 0);
|
|
9502
|
+
/**
|
|
9503
|
+
* ### IPv4地址
|
|
9504
|
+
*/
|
|
9505
|
+
static IP_V4 = new DesensitizeType("IPv4地址", 0, 0);
|
|
9506
|
+
/**
|
|
9507
|
+
* ### 自定义
|
|
9508
|
+
*/
|
|
9509
|
+
static CUSTOM = new DesensitizeType("自定义", 0, 0);
|
|
9510
|
+
/**
|
|
9511
|
+
* ### 脱敏头部保留
|
|
9512
|
+
*/
|
|
9513
|
+
head;
|
|
9514
|
+
/**
|
|
9515
|
+
* ### 脱敏尾部保留
|
|
9516
|
+
*/
|
|
9517
|
+
tail;
|
|
9374
9518
|
/**
|
|
9375
9519
|
* ### 创建一个脱敏类型
|
|
9376
9520
|
* @param label 脱敏类型
|
|
@@ -9379,8 +9523,6 @@ const _DesensitizeType = class _DesensitizeType2 extends Enum {
|
|
|
9379
9523
|
*/
|
|
9380
9524
|
constructor(label, head, tail) {
|
|
9381
9525
|
super(label, label);
|
|
9382
|
-
__publicField2(this, "head");
|
|
9383
|
-
__publicField2(this, "tail");
|
|
9384
9526
|
this.head = head;
|
|
9385
9527
|
this.tail = tail;
|
|
9386
9528
|
}
|
|
@@ -9393,19 +9535,16 @@ const _DesensitizeType = class _DesensitizeType2 extends Enum {
|
|
|
9393
9535
|
desensitize(str, symbol) {
|
|
9394
9536
|
return DesensitizeUtil.desensitize(str, this, this.head, this.tail, symbol);
|
|
9395
9537
|
}
|
|
9396
|
-
}
|
|
9397
|
-
__publicField2(_DesensitizeType, "TELEPHONE", new _DesensitizeType("座机号码", 3, 4));
|
|
9398
|
-
__publicField2(_DesensitizeType, "MOBILE", new _DesensitizeType("手机号码", 3, 4));
|
|
9399
|
-
__publicField2(_DesensitizeType, "ID_CARD", new _DesensitizeType("身份证号", 6, 4));
|
|
9400
|
-
__publicField2(_DesensitizeType, "BANK_CARD", new _DesensitizeType("银行卡号", 4, 4));
|
|
9401
|
-
__publicField2(_DesensitizeType, "CAR_NUMBER", new _DesensitizeType("车牌号", 2, 1));
|
|
9402
|
-
__publicField2(_DesensitizeType, "EMAIL", new _DesensitizeType("邮箱", 2, 2));
|
|
9403
|
-
__publicField2(_DesensitizeType, "CHINESE_NAME", new _DesensitizeType("中文名", 1, 1));
|
|
9404
|
-
__publicField2(_DesensitizeType, "ADDRESS", new _DesensitizeType("地址", 3, 0));
|
|
9405
|
-
__publicField2(_DesensitizeType, "IP_V4", new _DesensitizeType("IPv4地址", 0, 0));
|
|
9406
|
-
__publicField2(_DesensitizeType, "CUSTOM", new _DesensitizeType("自定义", 0, 0));
|
|
9407
|
-
let DesensitizeType = _DesensitizeType;
|
|
9538
|
+
}
|
|
9408
9539
|
class FileUtil {
|
|
9540
|
+
/**
|
|
9541
|
+
* ### 文件大小进制
|
|
9542
|
+
*/
|
|
9543
|
+
static RADIX_FILE_SIZE = 1024;
|
|
9544
|
+
/**
|
|
9545
|
+
* ### 文件单位列表
|
|
9546
|
+
*/
|
|
9547
|
+
static FILE_UNIT_LIST = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
9409
9548
|
/**
|
|
9410
9549
|
* ### 字节数转可读文件大小
|
|
9411
9550
|
* @param size 字节数
|
|
@@ -9423,9 +9562,27 @@ class FileUtil {
|
|
|
9423
9562
|
return "INFINITY";
|
|
9424
9563
|
}
|
|
9425
9564
|
}
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9565
|
+
class RandomUtil {
|
|
9566
|
+
/**
|
|
9567
|
+
* ### 数字集合
|
|
9568
|
+
*/
|
|
9569
|
+
static STRING_OF_NUMBER = "0123456789";
|
|
9570
|
+
/**
|
|
9571
|
+
* ### 小写字母集合
|
|
9572
|
+
*/
|
|
9573
|
+
static STRING_OF_LOWER_CHAR = "abcdefghijklmnopqrstuvwxyz";
|
|
9574
|
+
/**
|
|
9575
|
+
* ### 大写字母集合
|
|
9576
|
+
*/
|
|
9577
|
+
static STRING_OF_UPPER_CHAR = this.STRING_OF_LOWER_CHAR.toUpperCase();
|
|
9578
|
+
/**
|
|
9579
|
+
* ### 默认长度
|
|
9580
|
+
*/
|
|
9581
|
+
static DEFAULT_LENGTH = 32;
|
|
9582
|
+
/**
|
|
9583
|
+
* ### 十进制
|
|
9584
|
+
*/
|
|
9585
|
+
static DECIMALISM = 10;
|
|
9429
9586
|
/**
|
|
9430
9587
|
* ### 指定范围内获取随机整数
|
|
9431
9588
|
* @param min 最小
|
|
@@ -9501,14 +9658,12 @@ const _RandomUtil = class _RandomUtil2 {
|
|
|
9501
9658
|
static getRandColor() {
|
|
9502
9659
|
return `#${Math.random().toString(16).padEnd(6, "0").slice(2, 8)}`;
|
|
9503
9660
|
}
|
|
9504
|
-
}
|
|
9505
|
-
__publicField2(_RandomUtil, "STRING_OF_NUMBER", "0123456789");
|
|
9506
|
-
__publicField2(_RandomUtil, "STRING_OF_LOWER_CHAR", "abcdefghijklmnopqrstuvwxyz");
|
|
9507
|
-
__publicField2(_RandomUtil, "STRING_OF_UPPER_CHAR", _RandomUtil.STRING_OF_LOWER_CHAR.toUpperCase());
|
|
9508
|
-
__publicField2(_RandomUtil, "DEFAULT_LENGTH", 32);
|
|
9509
|
-
__publicField2(_RandomUtil, "DECIMALISM", 10);
|
|
9510
|
-
let RandomUtil = _RandomUtil;
|
|
9661
|
+
}
|
|
9511
9662
|
class StringUtil {
|
|
9663
|
+
/**
|
|
9664
|
+
* ### 单码元长度
|
|
9665
|
+
*/
|
|
9666
|
+
static SINGLE_POINT_LENGTH = 65535;
|
|
9512
9667
|
/**
|
|
9513
9668
|
* ### 获取字符串可视化长度
|
|
9514
9669
|
*/
|
|
@@ -9568,8 +9723,11 @@ class StringUtil {
|
|
|
9568
9723
|
return s;
|
|
9569
9724
|
}
|
|
9570
9725
|
}
|
|
9571
|
-
__publicField2(StringUtil, "SINGLE_POINT_LENGTH", 65535);
|
|
9572
9726
|
class ValidateUtil {
|
|
9727
|
+
/**
|
|
9728
|
+
* ### 十进制
|
|
9729
|
+
*/
|
|
9730
|
+
static DECIMALISM = 10;
|
|
9573
9731
|
/**
|
|
9574
9732
|
* ### 验证是否手机号或座机号
|
|
9575
9733
|
* @param phoneNumber 号码
|
|
@@ -9687,8 +9845,15 @@ class ValidateUtil {
|
|
|
9687
9845
|
return validArray[1][sum % 11].toString() === str[17].toString();
|
|
9688
9846
|
}
|
|
9689
9847
|
}
|
|
9690
|
-
__publicField2(ValidateUtil, "DECIMALISM", 10);
|
|
9691
9848
|
class VersionUtil {
|
|
9849
|
+
/**
|
|
9850
|
+
* ### 版本号长度
|
|
9851
|
+
*/
|
|
9852
|
+
static VERSION_LENGTH = 2;
|
|
9853
|
+
/**
|
|
9854
|
+
* ### 版本号分隔符
|
|
9855
|
+
*/
|
|
9856
|
+
static VERSION_SEPARATOR = ".";
|
|
9692
9857
|
/**
|
|
9693
9858
|
* ### 获取版本号数字
|
|
9694
9859
|
* @param version 版本号字符串
|
|
@@ -9715,8 +9880,6 @@ class VersionUtil {
|
|
|
9715
9880
|
return [major, minor].join(separator);
|
|
9716
9881
|
}
|
|
9717
9882
|
}
|
|
9718
|
-
__publicField2(VersionUtil, "VERSION_LENGTH", 2);
|
|
9719
|
-
__publicField2(VersionUtil, "VERSION_SEPARATOR", ".");
|
|
9720
9883
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
9721
9884
|
__name: "DateTime",
|
|
9722
9885
|
props: {
|
|
@@ -10043,8 +10206,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10043
10206
|
let trueHeight = 0;
|
|
10044
10207
|
const isFullScreen = ref(!props.hideFullscreen && props.fullScreen);
|
|
10045
10208
|
onMounted(() => {
|
|
10046
|
-
|
|
10047
|
-
(_a = document.getElementById(`hidden-button-${domId.value}`)) == null ? void 0 : _a.focus();
|
|
10209
|
+
document.getElementById(`hidden-button-${domId.value}`)?.focus();
|
|
10048
10210
|
});
|
|
10049
10211
|
watch(isFullScreen, () => {
|
|
10050
10212
|
emits("fullscreenChange", isFullScreen.value);
|
|
@@ -10278,12 +10440,10 @@ function getFieldConfig(Class, field) {
|
|
|
10278
10440
|
return DecoratorUtil.getFieldConfig(Class, field.toString(), KEY$3, true) || {};
|
|
10279
10441
|
}
|
|
10280
10442
|
function getDictionary(Class, field) {
|
|
10281
|
-
|
|
10282
|
-
return (_a = getFieldConfig(Class, field)) == null ? void 0 : _a.dictionary;
|
|
10443
|
+
return getFieldConfig(Class, field)?.dictionary;
|
|
10283
10444
|
}
|
|
10284
10445
|
function getFieldLabel(Class, field) {
|
|
10285
|
-
|
|
10286
|
-
return ((_a = getFieldConfig(Class, field)) == null ? void 0 : _a.label) || field.toString();
|
|
10446
|
+
return getFieldConfig(Class, field)?.label || field.toString();
|
|
10287
10447
|
}
|
|
10288
10448
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
10289
10449
|
__name: "FormField",
|
|
@@ -10552,8 +10712,8 @@ function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
|
|
|
10552
10712
|
}
|
|
10553
10713
|
}
|
|
10554
10714
|
/*!
|
|
10555
|
-
* vue-router v4.5.
|
|
10556
|
-
* (c)
|
|
10715
|
+
* vue-router v4.5.1
|
|
10716
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
10557
10717
|
* @license MIT
|
|
10558
10718
|
*/
|
|
10559
10719
|
const isBrowser = typeof document !== "undefined";
|
|
@@ -11995,7 +12155,8 @@ const RouterLinkImpl = /* @__PURE__ */ defineComponent({
|
|
|
11995
12155
|
ariaCurrentValue: {
|
|
11996
12156
|
type: String,
|
|
11997
12157
|
default: "page"
|
|
11998
|
-
}
|
|
12158
|
+
},
|
|
12159
|
+
viewTransition: Boolean
|
|
11999
12160
|
},
|
|
12000
12161
|
useLink,
|
|
12001
12162
|
setup(props, { slots }) {
|
|
@@ -13451,15 +13612,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
13451
13612
|
}
|
|
13452
13613
|
});
|
|
13453
13614
|
class WebConstant {
|
|
13615
|
+
/**
|
|
13616
|
+
* ### HTTP 请求前缀
|
|
13617
|
+
*/
|
|
13618
|
+
static PREFIX_HTTP = "http://";
|
|
13619
|
+
/**
|
|
13620
|
+
* ### HTTPS 请求前缀
|
|
13621
|
+
*/
|
|
13622
|
+
static PREFIX_HTTPS = "https://";
|
|
13454
13623
|
}
|
|
13455
|
-
/**
|
|
13456
|
-
* ### HTTP 请求前缀
|
|
13457
|
-
*/
|
|
13458
|
-
__publicField(WebConstant, "PREFIX_HTTP", "http://");
|
|
13459
|
-
/**
|
|
13460
|
-
* ### HTTPS 请求前缀
|
|
13461
|
-
*/
|
|
13462
|
-
__publicField(WebConstant, "PREFIX_HTTPS", "https://");
|
|
13463
13624
|
class WebFileUtil {
|
|
13464
13625
|
/**
|
|
13465
13626
|
* ### 获取静态文件的绝对地址
|
|
@@ -13891,9 +14052,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13891
14052
|
}
|
|
13892
14053
|
}
|
|
13893
14054
|
const getShowFormatter = computed(() => {
|
|
13894
|
-
var _a;
|
|
13895
14055
|
if (formConfig.value) {
|
|
13896
|
-
switch (
|
|
14056
|
+
switch (formConfig.value?.dateType) {
|
|
13897
14057
|
case DateTimeType.DATE:
|
|
13898
14058
|
return DateTimeFormatter.FULL_DATE.key;
|
|
13899
14059
|
case DateTimeType.WEEK:
|
|
@@ -13908,42 +14068,35 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13908
14068
|
}
|
|
13909
14069
|
return DateTimeFormatter.FULL_DATE_TIME;
|
|
13910
14070
|
});
|
|
13911
|
-
const dictionary = computed(() =>
|
|
13912
|
-
var _a;
|
|
13913
|
-
return props.list ? props.list : formConfig.value && ((_a = fieldConfig.value) == null ? void 0 : _a.dictionary) ? fieldConfig.value.dictionary.toArray() : void 0;
|
|
13914
|
-
});
|
|
14071
|
+
const dictionary = computed(() => props.list ? props.list : formConfig.value && fieldConfig.value?.dictionary ? fieldConfig.value.dictionary.toArray() : void 0);
|
|
13915
14072
|
const placeholderRef = computed(() => {
|
|
13916
|
-
var _a, _b, _c;
|
|
13917
14073
|
if (props.placeholder) {
|
|
13918
14074
|
return props.placeholder;
|
|
13919
14075
|
}
|
|
13920
14076
|
if (formConfig.value && formConfig.value.placeholder) {
|
|
13921
14077
|
return formConfig.value.placeholder;
|
|
13922
14078
|
}
|
|
13923
|
-
const fieldLabel =
|
|
13924
|
-
|
|
13925
|
-
|
|
14079
|
+
const fieldLabel = fieldConfig.value?.label || "";
|
|
14080
|
+
if (dictionary.value || fieldConfig.value?.dictionary || props.list || props.tree || formConfig.value?.dateType !== void 0) {
|
|
14081
|
+
console.warn("field config", fieldConfig.value, fieldLabel);
|
|
13926
14082
|
return `${WebI18n.get().SelectPlease + fieldLabel}...`;
|
|
13927
14083
|
}
|
|
13928
14084
|
return `${WebI18n.get().InputPlease + fieldLabel}...`;
|
|
13929
14085
|
});
|
|
13930
14086
|
function getSwitchColor(status) {
|
|
13931
|
-
|
|
13932
|
-
return ((_b = (_a = dictionary.value) == null ? void 0 : _a.find((item) => !!item.key === status)) == null ? void 0 : _b.color) || "";
|
|
14087
|
+
return dictionary.value?.find((item) => !!item.key === status)?.color || "";
|
|
13933
14088
|
}
|
|
13934
14089
|
function getSwitchLabel(status) {
|
|
13935
|
-
|
|
13936
|
-
return ((_b = (_a = dictionary.value) == null ? void 0 : _a.find((item) => !!item.key === status)) == null ? void 0 : _b.label) || "";
|
|
14090
|
+
return dictionary.value?.find((item) => !!item.key === status)?.label || "";
|
|
13937
14091
|
}
|
|
13938
14092
|
const getInputType = computed(() => {
|
|
13939
|
-
|
|
13940
|
-
if ((_a = formConfig.value) == null ? void 0 : _a.textarea) {
|
|
14093
|
+
if (formConfig.value?.textarea) {
|
|
13941
14094
|
return "textarea";
|
|
13942
14095
|
}
|
|
13943
|
-
if (
|
|
14096
|
+
if (formConfig.value?.password) {
|
|
13944
14097
|
return "password";
|
|
13945
14098
|
}
|
|
13946
|
-
if (
|
|
14099
|
+
if (formConfig.value?.number) {
|
|
13947
14100
|
return "number";
|
|
13948
14101
|
}
|
|
13949
14102
|
return "text";
|
|
@@ -13956,8 +14109,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13956
14109
|
deep: true
|
|
13957
14110
|
});
|
|
13958
14111
|
function checkNumberValue() {
|
|
13959
|
-
|
|
13960
|
-
if ((_a = formConfig.value) == null ? void 0 : _a.number) {
|
|
14112
|
+
if (formConfig.value?.number) {
|
|
13961
14113
|
let tempValue = value.value;
|
|
13962
14114
|
const max = Math.min(formConfig.value.max ?? WebConfig.maxNumber, Number.MAX_SAFE_INTEGER);
|
|
13963
14115
|
const min = Math.max(formConfig.value.min ?? WebConfig.minNumber, Number.MIN_SAFE_INTEGER);
|
|
@@ -13967,9 +14119,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13967
14119
|
tempValue = Math.min(tempValue, max);
|
|
13968
14120
|
tempValue = Number.parseFloat(tempValue.toFixed(formConfig.value.precision ?? WebConfig.numberPrecision));
|
|
13969
14121
|
value.value = tempValue;
|
|
13970
|
-
value.value = Number.parseFloat(
|
|
14122
|
+
value.value = Number.parseFloat(value.value?.toString() || "0");
|
|
13971
14123
|
}
|
|
13972
|
-
value.value = Number.parseFloat(
|
|
14124
|
+
value.value = Number.parseFloat(value.value?.toString() || "0");
|
|
13973
14125
|
}
|
|
13974
14126
|
}
|
|
13975
14127
|
function onClear() {
|
|
@@ -13994,15 +14146,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13994
14146
|
emitChange();
|
|
13995
14147
|
}
|
|
13996
14148
|
function onKeyDown(event) {
|
|
13997
|
-
var _a, _b;
|
|
13998
14149
|
switch (event.code) {
|
|
13999
14150
|
case "KeyE":
|
|
14000
|
-
if (
|
|
14151
|
+
if (formConfig.value?.number) {
|
|
14001
14152
|
event.preventDefault();
|
|
14002
14153
|
}
|
|
14003
14154
|
break;
|
|
14004
14155
|
case "Escape":
|
|
14005
|
-
if (
|
|
14156
|
+
if (formConfig.value?.clearable !== false) {
|
|
14006
14157
|
value.value = void 0;
|
|
14007
14158
|
emitValue();
|
|
14008
14159
|
}
|
|
@@ -14027,13 +14178,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14027
14178
|
}
|
|
14028
14179
|
}
|
|
14029
14180
|
function init() {
|
|
14030
|
-
var _a;
|
|
14031
14181
|
initFieldName();
|
|
14032
14182
|
if (props.entity && fieldName.value) {
|
|
14033
14183
|
formConfig.value = getFormConfig(props.entity, fieldName.value);
|
|
14034
14184
|
fieldConfig.value = getFieldConfig(props.entity, fieldName.value);
|
|
14035
14185
|
}
|
|
14036
|
-
if (props.modelValue === void 0 &&
|
|
14186
|
+
if (props.modelValue === void 0 && formConfig.value?.defaultValue !== void 0) {
|
|
14037
14187
|
value.value = formConfig.value.defaultValue;
|
|
14038
14188
|
emitValue();
|
|
14039
14189
|
}
|
|
@@ -14042,7 +14192,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14042
14192
|
const slots = useSlots();
|
|
14043
14193
|
init();
|
|
14044
14194
|
return (_ctx, _cache) => {
|
|
14045
|
-
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;
|
|
14046
14195
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
14047
14196
|
const _component_el_time_picker = resolveComponent("el-time-picker");
|
|
14048
14197
|
const _component_el_switch = resolveComponent("el-switch");
|
|
@@ -14060,13 +14209,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14060
14209
|
key: 0,
|
|
14061
14210
|
modelValue: value.value,
|
|
14062
14211
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
14063
|
-
clearable:
|
|
14212
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14064
14213
|
disabled: __props.disabled,
|
|
14065
|
-
format:
|
|
14214
|
+
format: formConfig.value.dateShowFormatter?.key || getShowFormatter.value,
|
|
14066
14215
|
placeholder: placeholderRef.value,
|
|
14067
|
-
"prefix-icon":
|
|
14216
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14068
14217
|
readonly: __props.readonly,
|
|
14069
|
-
"suffix-icon":
|
|
14218
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14070
14219
|
type: formConfig.value.dateType,
|
|
14071
14220
|
"value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
|
|
14072
14221
|
style: { "width": "100%" },
|
|
@@ -14077,13 +14226,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14077
14226
|
key: 1,
|
|
14078
14227
|
modelValue: value.value,
|
|
14079
14228
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
|
|
14080
|
-
clearable:
|
|
14229
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14081
14230
|
disabled: __props.disabled,
|
|
14082
|
-
format:
|
|
14231
|
+
format: formConfig.value.dateShowFormatter?.key || unref(DateTimeFormatter).FULL_TIME.key,
|
|
14083
14232
|
placeholder: placeholderRef.value,
|
|
14084
|
-
"prefix-icon":
|
|
14233
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14085
14234
|
readonly: __props.readonly,
|
|
14086
|
-
"suffix-icon":
|
|
14235
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14087
14236
|
"value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
|
|
14088
14237
|
style: { "width": "100%" },
|
|
14089
14238
|
onClear,
|
|
@@ -14091,7 +14240,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14091
14240
|
onKeydown: onKeyDown
|
|
14092
14241
|
}, null, 8, ["modelValue", "clearable", "disabled", "format", "placeholder", "prefix-icon", "readonly", "suffix-icon", "value-format"]))
|
|
14093
14242
|
], 64)) : dictionary.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14094
|
-
|
|
14243
|
+
formConfig.value?.switch ? (openBlock(), createBlock(_component_el_switch, {
|
|
14095
14244
|
key: 0,
|
|
14096
14245
|
modelValue: value.value,
|
|
14097
14246
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
|
|
@@ -14102,7 +14251,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14102
14251
|
"--el-switch-on-color": getSwitchColor(true),
|
|
14103
14252
|
"--el-switch-off-color": getSwitchColor(false)
|
|
14104
14253
|
})
|
|
14105
|
-
}, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) :
|
|
14254
|
+
}, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) : formConfig.value?.radioButton ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
14106
14255
|
key: 1,
|
|
14107
14256
|
modelValue: value.value,
|
|
14108
14257
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => value.value = $event),
|
|
@@ -14122,7 +14271,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14122
14271
|
}), 128))
|
|
14123
14272
|
]),
|
|
14124
14273
|
_: 1
|
|
14125
|
-
}, 8, ["modelValue", "readonly"])) :
|
|
14274
|
+
}, 8, ["modelValue", "readonly"])) : formConfig.value?.radio ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
14126
14275
|
key: 2,
|
|
14127
14276
|
modelValue: value.value,
|
|
14128
14277
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => value.value = $event),
|
|
@@ -14146,18 +14295,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14146
14295
|
key: 3,
|
|
14147
14296
|
modelValue: value.value,
|
|
14148
14297
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => value.value = $event),
|
|
14149
|
-
clearable:
|
|
14150
|
-
"collapse-tags":
|
|
14298
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14299
|
+
"collapse-tags": formConfig.value?.collapseTags,
|
|
14151
14300
|
disabled: __props.disabled,
|
|
14152
|
-
filterable:
|
|
14153
|
-
multiple:
|
|
14154
|
-
"multiple-limit":
|
|
14301
|
+
filterable: formConfig.value?.filterable,
|
|
14302
|
+
multiple: formConfig.value?.multiple,
|
|
14303
|
+
"multiple-limit": formConfig.value?.multipleLimit,
|
|
14155
14304
|
placeholder: placeholderRef.value,
|
|
14156
|
-
"prefix-icon":
|
|
14305
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14157
14306
|
readonly: __props.readonly,
|
|
14158
14307
|
remote: !!__props.onSearch,
|
|
14159
14308
|
"remote-method": __props.onSearch,
|
|
14160
|
-
"suffix-icon":
|
|
14309
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14161
14310
|
"collapse-tags-tooltip": "",
|
|
14162
14311
|
"fit-input-width": "",
|
|
14163
14312
|
onClear,
|
|
@@ -14172,18 +14321,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14172
14321
|
label: item.label,
|
|
14173
14322
|
value: item.key
|
|
14174
14323
|
}, {
|
|
14175
|
-
default: withCtx(() =>
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
(
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
])) : createCommentVNode("", true)
|
|
14185
|
-
];
|
|
14186
|
-
}),
|
|
14324
|
+
default: withCtx(() => [
|
|
14325
|
+
formConfig.value?.color ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
14326
|
+
createElementVNode("span", _hoisted_3$7, toDisplayString(item.label), 1),
|
|
14327
|
+
createElementVNode("span", {
|
|
14328
|
+
style: normalizeStyle({ backgroundColor: item.color || unref(WebColor).NORMAL }),
|
|
14329
|
+
class: "light"
|
|
14330
|
+
}, null, 4)
|
|
14331
|
+
])) : createCommentVNode("", true)
|
|
14332
|
+
]),
|
|
14187
14333
|
_: 2
|
|
14188
14334
|
}, 1032, ["disabled", "label", "value"]);
|
|
14189
14335
|
}), 128))
|
|
@@ -14194,20 +14340,20 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14194
14340
|
key: 2,
|
|
14195
14341
|
modelValue: value.value,
|
|
14196
14342
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event),
|
|
14197
|
-
clearable:
|
|
14198
|
-
"collapse-tags":
|
|
14343
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14344
|
+
"collapse-tags": formConfig.value?.collapseTags,
|
|
14199
14345
|
disabled: __props.disabled,
|
|
14200
14346
|
options: __props.tree,
|
|
14201
14347
|
placeholder: placeholderRef.value,
|
|
14202
14348
|
props: {
|
|
14203
14349
|
value: "id",
|
|
14204
14350
|
label: "name",
|
|
14205
|
-
multiple:
|
|
14206
|
-
emitPath:
|
|
14207
|
-
checkStrictly:
|
|
14351
|
+
multiple: formConfig.value?.multiple,
|
|
14352
|
+
emitPath: formConfig.value?.emitPath,
|
|
14353
|
+
checkStrictly: formConfig.value?.checkStrictly
|
|
14208
14354
|
},
|
|
14209
14355
|
readonly: __props.readonly,
|
|
14210
|
-
"show-all-levels":
|
|
14356
|
+
"show-all-levels": formConfig.value?.showAllLevels,
|
|
14211
14357
|
class: "a-input-cascader",
|
|
14212
14358
|
"collapse-tags-tooltip": "",
|
|
14213
14359
|
"popper-class": "a-input-cascader-popper",
|
|
@@ -14218,18 +14364,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14218
14364
|
key: 3,
|
|
14219
14365
|
modelValue: value.value,
|
|
14220
14366
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => value.value = $event),
|
|
14221
|
-
autosize:
|
|
14222
|
-
clearable:
|
|
14367
|
+
autosize: formConfig.value?.autoSize ? { minRows: formConfig.value.minRows, maxRows: formConfig.value.maxRows } : false,
|
|
14368
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14223
14369
|
disabled: __props.disabled,
|
|
14224
|
-
max:
|
|
14225
|
-
maxlength:
|
|
14226
|
-
min:
|
|
14370
|
+
max: formConfig.value?.max,
|
|
14371
|
+
maxlength: formConfig.value?.maxLength || (formConfig.value?.textarea ? unref(WebConfig).maxTextAreaLength : unref(WebConfig).maxTextLength),
|
|
14372
|
+
min: formConfig.value?.min ?? 0,
|
|
14227
14373
|
placeholder: placeholderRef.value,
|
|
14228
|
-
"prefix-icon":
|
|
14374
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14229
14375
|
readonly: __props.readonly,
|
|
14230
|
-
rows:
|
|
14231
|
-
"show-word-limit":
|
|
14232
|
-
"suffix-icon":
|
|
14376
|
+
rows: formConfig.value?.textarea ? unref(WebConfig).textareaMinRows : 0,
|
|
14377
|
+
"show-word-limit": formConfig.value?.showLimit !== false,
|
|
14378
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14233
14379
|
type: getInputType.value,
|
|
14234
14380
|
onBlur,
|
|
14235
14381
|
onChange: checkNumberValue,
|
|
@@ -14241,29 +14387,26 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14241
14387
|
return {
|
|
14242
14388
|
name,
|
|
14243
14389
|
fn: withCtx(() => [
|
|
14244
|
-
renderSlot(_ctx.$slots, name, {}, () =>
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
|
|
14260
|
-
], 64)) : createCommentVNode("", true)
|
|
14261
|
-
];
|
|
14262
|
-
})
|
|
14390
|
+
renderSlot(_ctx.$slots, name, {}, () => [
|
|
14391
|
+
name === "append" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
14392
|
+
createTextVNode(toDisplayString(formConfig.value?.suffixText), 1)
|
|
14393
|
+
], 64)) : createCommentVNode("", true),
|
|
14394
|
+
name === "suffix" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14395
|
+
isClearButtonShow.value ? (openBlock(), createBlock(_component_el_icon, {
|
|
14396
|
+
key: 0,
|
|
14397
|
+
onClick: _cache[7] || (_cache[7] = ($event) => onClear())
|
|
14398
|
+
}, {
|
|
14399
|
+
default: withCtx(() => [
|
|
14400
|
+
createVNode(unref(circle_close_default))
|
|
14401
|
+
]),
|
|
14402
|
+
_: 1
|
|
14403
|
+
})) : createCommentVNode("", true)
|
|
14404
|
+
], 64)) : createCommentVNode("", true)
|
|
14405
|
+
])
|
|
14263
14406
|
])
|
|
14264
14407
|
};
|
|
14265
14408
|
}),
|
|
14266
|
-
!_ctx.$slots.append &&
|
|
14409
|
+
!_ctx.$slots.append && formConfig.value?.suffixText ? {
|
|
14267
14410
|
name: "append",
|
|
14268
14411
|
fn: withCtx(() => [
|
|
14269
14412
|
createTextVNode(toDisplayString(formConfig.value.suffixText), 1)
|
|
@@ -14341,30 +14484,24 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
14341
14484
|
});
|
|
14342
14485
|
const AMoney = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-f221d0de"]]);
|
|
14343
14486
|
class QueryPage extends Transformer {
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14348
|
-
|
|
14349
|
-
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
*/
|
|
14353
|
-
__publicField(this, "pageSize", 20);
|
|
14354
|
-
}
|
|
14487
|
+
/**
|
|
14488
|
+
* ### 分页页数
|
|
14489
|
+
*/
|
|
14490
|
+
pageNum = 1;
|
|
14491
|
+
/**
|
|
14492
|
+
* ### 每页数量
|
|
14493
|
+
*/
|
|
14494
|
+
pageSize = 20;
|
|
14355
14495
|
}
|
|
14356
14496
|
class QuerySort extends Transformer {
|
|
14357
|
-
|
|
14358
|
-
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
*/
|
|
14366
|
-
__publicField(this, "direction", "desc");
|
|
14367
|
-
}
|
|
14497
|
+
/**
|
|
14498
|
+
* ### 排序字段 默认 `id`
|
|
14499
|
+
*/
|
|
14500
|
+
field = "id";
|
|
14501
|
+
/**
|
|
14502
|
+
* ### 排序方式 默认 `desc`
|
|
14503
|
+
*/
|
|
14504
|
+
direction = "desc";
|
|
14368
14505
|
/**
|
|
14369
14506
|
* ### 设置排序字段名
|
|
14370
14507
|
* @param field 字段名
|
|
@@ -14392,23 +14529,20 @@ var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
|
14392
14529
|
return result;
|
|
14393
14530
|
};
|
|
14394
14531
|
class QueryResponsePage extends Transformer {
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
*/
|
|
14410
|
-
__publicField(this, "pageCount", 0);
|
|
14411
|
-
}
|
|
14532
|
+
/**
|
|
14533
|
+
* ### 返回的当前页数据列表
|
|
14534
|
+
*/
|
|
14535
|
+
list = [];
|
|
14536
|
+
page = new QueryPage();
|
|
14537
|
+
sort = new QuerySort();
|
|
14538
|
+
/**
|
|
14539
|
+
* ### 返回总条数
|
|
14540
|
+
*/
|
|
14541
|
+
total = 0;
|
|
14542
|
+
/**
|
|
14543
|
+
* ### 返回总页数
|
|
14544
|
+
*/
|
|
14545
|
+
pageCount = 0;
|
|
14412
14546
|
}
|
|
14413
14547
|
__decorateClass$3([
|
|
14414
14548
|
Type(QueryPage)
|
|
@@ -14675,10 +14809,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14675
14809
|
setup(__props) {
|
|
14676
14810
|
const props = __props;
|
|
14677
14811
|
const isFullScreen = ref(false);
|
|
14678
|
-
const realTitle = computed(() =>
|
|
14679
|
-
var _a;
|
|
14680
|
-
return props.title || ((_a = useRouter().currentRoute.value.meta) == null ? void 0 : _a.name) || "";
|
|
14681
|
-
});
|
|
14812
|
+
const realTitle = computed(() => props.title || useRouter().currentRoute.value.meta?.name || "");
|
|
14682
14813
|
return (_ctx, _cache) => {
|
|
14683
14814
|
return openBlock(), createElementBlock("div", {
|
|
14684
14815
|
class: normalizeClass([isFullScreen.value ? "fullscreen" : "", "web-panel"])
|
|
@@ -14828,56 +14959,52 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
|
14828
14959
|
return HttpMethod2;
|
|
14829
14960
|
})(HttpMethod || {});
|
|
14830
14961
|
class HttpResponse {
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
__publicField(this, "message");
|
|
14844
|
-
}
|
|
14962
|
+
/**
|
|
14963
|
+
* ### 业务状态码
|
|
14964
|
+
*/
|
|
14965
|
+
code;
|
|
14966
|
+
/**
|
|
14967
|
+
* ### 返回的数据
|
|
14968
|
+
*/
|
|
14969
|
+
data;
|
|
14970
|
+
/**
|
|
14971
|
+
* ### 错误信息
|
|
14972
|
+
*/
|
|
14973
|
+
message;
|
|
14845
14974
|
}
|
|
14846
14975
|
class Http {
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
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
|
-
__publicField(this, "isThrowError", false);
|
|
14880
|
-
}
|
|
14976
|
+
/**
|
|
14977
|
+
* ### 请求方法
|
|
14978
|
+
*/
|
|
14979
|
+
method = HttpMethod.POST;
|
|
14980
|
+
/**
|
|
14981
|
+
* ### URL
|
|
14982
|
+
*/
|
|
14983
|
+
url = "";
|
|
14984
|
+
/**
|
|
14985
|
+
* ### 请求超时时间
|
|
14986
|
+
*/
|
|
14987
|
+
timeout = WebConfig.timeout;
|
|
14988
|
+
/**
|
|
14989
|
+
* ### 是否携带 `Cookies`
|
|
14990
|
+
*/
|
|
14991
|
+
withCookie = false;
|
|
14992
|
+
/**
|
|
14993
|
+
* ### 请求头
|
|
14994
|
+
*/
|
|
14995
|
+
headers = {};
|
|
14996
|
+
/**
|
|
14997
|
+
* ### 错误回调
|
|
14998
|
+
*/
|
|
14999
|
+
errorHandler;
|
|
15000
|
+
/**
|
|
15001
|
+
* ### 加载回调
|
|
15002
|
+
*/
|
|
15003
|
+
loadingHandler;
|
|
15004
|
+
/**
|
|
15005
|
+
* ### 是否直接抛出错误
|
|
15006
|
+
*/
|
|
15007
|
+
isThrowError = false;
|
|
14881
15008
|
/**
|
|
14882
15009
|
* ### 创建一个客户端
|
|
14883
15010
|
* @param url 请求的 `URL`
|
|
@@ -15084,25 +15211,22 @@ class Http {
|
|
|
15084
15211
|
}
|
|
15085
15212
|
}
|
|
15086
15213
|
class ExportModel extends Transformer {
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
*/
|
|
15104
|
-
__publicField(this, "fileCode");
|
|
15105
|
-
}
|
|
15214
|
+
/**
|
|
15215
|
+
* ### 创建导出任务的API地址
|
|
15216
|
+
*/
|
|
15217
|
+
createExportTaskUrl;
|
|
15218
|
+
/**
|
|
15219
|
+
* ### 查询导出结果的 `API` 地址
|
|
15220
|
+
*/
|
|
15221
|
+
queryExportUrl;
|
|
15222
|
+
/**
|
|
15223
|
+
* ### 请求的参数
|
|
15224
|
+
*/
|
|
15225
|
+
param;
|
|
15226
|
+
/**
|
|
15227
|
+
* ### 下载导出文件的临时令牌
|
|
15228
|
+
*/
|
|
15229
|
+
fileCode;
|
|
15106
15230
|
}
|
|
15107
15231
|
const _hoisted_1$8 = { class: "tips" };
|
|
15108
15232
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
@@ -15543,9 +15667,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
15543
15667
|
}
|
|
15544
15668
|
}
|
|
15545
15669
|
const payloadLabel = computed(() => {
|
|
15546
|
-
var _a;
|
|
15547
15670
|
try {
|
|
15548
|
-
return
|
|
15671
|
+
return props.payload?.getPayloadLabel() || "-";
|
|
15549
15672
|
} catch (e) {
|
|
15550
15673
|
console.error("[IPayload] 请实现 IPayload 接口", props.payload);
|
|
15551
15674
|
}
|
|
@@ -16792,10 +16915,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
16792
16915
|
const props = __props;
|
|
16793
16916
|
const emits = __emit;
|
|
16794
16917
|
const result = useModel(__props, "modelValue");
|
|
16795
|
-
const label = computed(() =>
|
|
16796
|
-
var _a;
|
|
16797
|
-
return ((_a = result.value) == null ? void 0 : _a.getPayloadLabel()) || props.default;
|
|
16798
|
-
});
|
|
16918
|
+
const label = computed(() => result.value?.getPayloadLabel() || props.default);
|
|
16799
16919
|
async function onSelect() {
|
|
16800
16920
|
result.value = await DialogUtil.show(props.selector, props.param);
|
|
16801
16921
|
emits("changed", result.value);
|
|
@@ -16882,17 +17002,17 @@ var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
|
16882
17002
|
return result;
|
|
16883
17003
|
};
|
|
16884
17004
|
class QueryRequest extends Transformer {
|
|
17005
|
+
/**
|
|
17006
|
+
* ### 查询信息
|
|
17007
|
+
*/
|
|
17008
|
+
filter;
|
|
17009
|
+
sort;
|
|
16885
17010
|
/**
|
|
16886
17011
|
* ### 初始化一个请求类
|
|
16887
17012
|
* @param FilterClass 如传入 `filter` 的类 将自动初始化一个空 `filter`
|
|
16888
17013
|
*/
|
|
16889
17014
|
constructor(FilterClass) {
|
|
16890
17015
|
super();
|
|
16891
|
-
/**
|
|
16892
|
-
* ### 查询信息
|
|
16893
|
-
*/
|
|
16894
|
-
__publicField(this, "filter");
|
|
16895
|
-
__publicField(this, "sort");
|
|
16896
17016
|
try {
|
|
16897
17017
|
this.filter = new FilterClass();
|
|
16898
17018
|
} catch (e) {
|
|
@@ -16920,10 +17040,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
16920
17040
|
return result;
|
|
16921
17041
|
};
|
|
16922
17042
|
class QueryRequestPage extends QueryRequest {
|
|
16923
|
-
|
|
16924
|
-
super(...arguments);
|
|
16925
|
-
__publicField(this, "page", new QueryPage());
|
|
16926
|
-
}
|
|
17043
|
+
page = new QueryPage();
|
|
16927
17044
|
}
|
|
16928
17045
|
__decorateClass$1([
|
|
16929
17046
|
Type(QueryPage)
|
|
@@ -17165,11 +17282,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
17165
17282
|
underline: "never",
|
|
17166
17283
|
onClick: ($event) => props.props.onConfirm(data)
|
|
17167
17284
|
}, {
|
|
17168
|
-
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
17169
|
-
createTextVNode(" 选择 ")
|
|
17170
|
-
])),
|
|
17171
|
-
_:
|
|
17172
|
-
},
|
|
17285
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
17286
|
+
createTextVNode(" 选择 ", -1)
|
|
17287
|
+
])]),
|
|
17288
|
+
_: 1
|
|
17289
|
+
}, 8, ["disabled", "onClick"])
|
|
17173
17290
|
]),
|
|
17174
17291
|
key: "0"
|
|
17175
17292
|
} : void 0
|
|
@@ -17337,12 +17454,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
17337
17454
|
const key = props.column.key;
|
|
17338
17455
|
const value = computed(() => props.data[key]);
|
|
17339
17456
|
return (_ctx, _cache) => {
|
|
17340
|
-
var _a;
|
|
17341
17457
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
17342
17458
|
_ctx.column.color ? (openBlock(), createElementBlock("span", {
|
|
17343
17459
|
key: 0,
|
|
17344
17460
|
style: normalizeStyle({
|
|
17345
|
-
backgroundColor:
|
|
17461
|
+
backgroundColor: _ctx.dictionary.get(value.value)?.color || unref(WebColor).NORMAL
|
|
17346
17462
|
}),
|
|
17347
17463
|
class: "light"
|
|
17348
17464
|
}, null, 4)) : createCommentVNode("", true),
|
|
@@ -17938,7 +18054,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17938
18054
|
const airTableRef = ref();
|
|
17939
18055
|
const tableId = `table_${Math.random()}`;
|
|
17940
18056
|
const hook = props.useHook;
|
|
17941
|
-
const ServiceClass = props.service ||
|
|
18057
|
+
const ServiceClass = props.service || hook?.serviceClass;
|
|
17942
18058
|
let EntityClass;
|
|
17943
18059
|
if (ServiceClass) {
|
|
17944
18060
|
EntityClass = Transformer.newInstance(ServiceClass).entityClass;
|
|
@@ -17980,12 +18096,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17980
18096
|
modelConfig
|
|
17981
18097
|
});
|
|
17982
18098
|
function selectRow(list) {
|
|
17983
|
-
var _a, _b;
|
|
17984
18099
|
for (const row of list) {
|
|
17985
|
-
|
|
18100
|
+
airTableRef.value?.toggleRowSelection(row, false);
|
|
17986
18101
|
for (const selectedRow of selectListRef.value) {
|
|
17987
18102
|
if (selectedRow.id === row.id) {
|
|
17988
|
-
|
|
18103
|
+
airTableRef.value?.toggleRowSelection(row, true);
|
|
17989
18104
|
}
|
|
17990
18105
|
}
|
|
17991
18106
|
if (row.children && row.children.length > 0) {
|
|
@@ -18136,7 +18251,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18136
18251
|
nextTick(() => {
|
|
18137
18252
|
toggleSelection();
|
|
18138
18253
|
const table = document.getElementById(tableId);
|
|
18139
|
-
const bodyWrap = table
|
|
18254
|
+
const bodyWrap = table?.querySelector(".el-scrollbar__wrap");
|
|
18140
18255
|
bodyWrap.scrollTop = 0;
|
|
18141
18256
|
});
|
|
18142
18257
|
}
|
|
@@ -18169,7 +18284,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18169
18284
|
if (props.onAddRow) {
|
|
18170
18285
|
props.onAddRow(row);
|
|
18171
18286
|
} else if (props.isTree) {
|
|
18172
|
-
hook
|
|
18287
|
+
hook?.onAddRow(row);
|
|
18173
18288
|
}
|
|
18174
18289
|
}
|
|
18175
18290
|
function handleEdit(row) {
|
|
@@ -18349,20 +18464,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18349
18464
|
onChange: _cache[2] || (_cache[2] = ($event) => onSearch()),
|
|
18350
18465
|
onClear: ($event) => searchFilter.value[item.key] = void 0
|
|
18351
18466
|
}, {
|
|
18352
|
-
default: withCtx(() =>
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
}), 256))
|
|
18364
|
-
];
|
|
18365
|
-
}),
|
|
18467
|
+
default: withCtx(() => [
|
|
18468
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDictionary)(unref(EntityClass), item.key)?.toArray(), (enumItem) => {
|
|
18469
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
18470
|
+
!enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
|
|
18471
|
+
key: enumItem.key.toString(),
|
|
18472
|
+
label: enumItem.label,
|
|
18473
|
+
value: enumItem.key
|
|
18474
|
+
}, null, 8, ["label", "value"])) : createCommentVNode("", true)
|
|
18475
|
+
], 64);
|
|
18476
|
+
}), 256))
|
|
18477
|
+
]),
|
|
18366
18478
|
_: 2
|
|
18367
18479
|
}, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
|
|
18368
18480
|
key: 1,
|
|
@@ -18537,8 +18649,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18537
18649
|
default: withCtx(() => [
|
|
18538
18650
|
createTextVNode(toDisplayString(unref(WebI18n).get().Add), 1)
|
|
18539
18651
|
]),
|
|
18540
|
-
_:
|
|
18541
|
-
},
|
|
18652
|
+
_: 1
|
|
18653
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18542
18654
|
!props.hideEdit ? (openBlock(), createBlock(unref(ElLink), {
|
|
18543
18655
|
key: 2,
|
|
18544
18656
|
disabled: unref(isEditDisabled)(getRowEntity(scope)),
|
|
@@ -18548,8 +18660,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18548
18660
|
default: withCtx(() => [
|
|
18549
18661
|
createTextVNode(toDisplayString(unref(WebI18n).get().Update), 1)
|
|
18550
18662
|
]),
|
|
18551
|
-
_:
|
|
18552
|
-
},
|
|
18663
|
+
_: 1
|
|
18664
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18553
18665
|
__props.showDetail ? (openBlock(), createBlock(unref(ElLink), {
|
|
18554
18666
|
key: 3,
|
|
18555
18667
|
disabled: unref(isDetailDisabled)(getRowEntity(scope)),
|
|
@@ -18559,8 +18671,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18559
18671
|
default: withCtx(() => [
|
|
18560
18672
|
createTextVNode(toDisplayString(unref(WebI18n).get().Detail), 1)
|
|
18561
18673
|
]),
|
|
18562
|
-
_:
|
|
18563
|
-
},
|
|
18674
|
+
_: 1
|
|
18675
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18564
18676
|
__props.showEnableAndDisable ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
18565
18677
|
getRowEntity(scope).isDisabled ? (openBlock(), createBlock(unref(ElLink), {
|
|
18566
18678
|
key: 0,
|
|
@@ -18571,8 +18683,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18571
18683
|
default: withCtx(() => [
|
|
18572
18684
|
createTextVNode(toDisplayString(unref(WebI18n).get().Enable), 1)
|
|
18573
18685
|
]),
|
|
18574
|
-
_:
|
|
18575
|
-
},
|
|
18686
|
+
_: 1
|
|
18687
|
+
}, 8, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ElLink), {
|
|
18576
18688
|
key: 1,
|
|
18577
18689
|
disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
|
|
18578
18690
|
type: "warning",
|
|
@@ -18582,8 +18694,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18582
18694
|
default: withCtx(() => [
|
|
18583
18695
|
createTextVNode(toDisplayString(unref(WebI18n).get().Disable), 1)
|
|
18584
18696
|
]),
|
|
18585
|
-
_:
|
|
18586
|
-
},
|
|
18697
|
+
_: 1
|
|
18698
|
+
}, 8, ["disabled", "onClick"]))
|
|
18587
18699
|
], 64)) : createCommentVNode("", true),
|
|
18588
18700
|
!__props.hideDelete ? (openBlock(), createBlock(unref(ElLink), {
|
|
18589
18701
|
key: 5,
|
|
@@ -18595,8 +18707,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18595
18707
|
default: withCtx(() => [
|
|
18596
18708
|
createTextVNode(toDisplayString(unref(WebI18n).get().Delete), 1)
|
|
18597
18709
|
]),
|
|
18598
|
-
_:
|
|
18599
|
-
},
|
|
18710
|
+
_: 1
|
|
18711
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18600
18712
|
scope.$index >= 0 ? renderSlot(_ctx.$slots, "endRow", {
|
|
18601
18713
|
key: 6,
|
|
18602
18714
|
data: getRowEntity(scope),
|
|
@@ -18743,10 +18855,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
18743
18855
|
emits("changed", currentData.value);
|
|
18744
18856
|
}
|
|
18745
18857
|
function filterNode(value, node) {
|
|
18746
|
-
var _a;
|
|
18747
18858
|
if (!value)
|
|
18748
18859
|
return true;
|
|
18749
|
-
return
|
|
18860
|
+
return node.name?.indexOf(value) !== -1;
|
|
18750
18861
|
}
|
|
18751
18862
|
return (_ctx, _cache) => {
|
|
18752
18863
|
const _directive_loading = resolveDirective("loading");
|
|
@@ -18920,11 +19031,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18920
19031
|
});
|
|
18921
19032
|
const User = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5925b035"]]);
|
|
18922
19033
|
class WebEnum extends Enum {
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
__publicField(this, "color");
|
|
18926
|
-
__publicField(this, "disabled");
|
|
18927
|
-
}
|
|
19034
|
+
color;
|
|
19035
|
+
disabled;
|
|
18928
19036
|
/**
|
|
18929
19037
|
* ### 设置颜色
|
|
18930
19038
|
*/
|
|
@@ -18940,17 +19048,16 @@ class WebEnum extends Enum {
|
|
|
18940
19048
|
return this;
|
|
18941
19049
|
}
|
|
18942
19050
|
}
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
let DisableEnum = _DisableEnum;
|
|
19051
|
+
class DisableEnum extends WebEnum {
|
|
19052
|
+
/**
|
|
19053
|
+
* ### 禁用
|
|
19054
|
+
*/
|
|
19055
|
+
static DISABLED = new DisableEnum(true, "禁用").setColor(WebColor.DANGER);
|
|
19056
|
+
/**
|
|
19057
|
+
* ### 启用
|
|
19058
|
+
*/
|
|
19059
|
+
static ENABLE = new DisableEnum(false, "启用").setColor(WebColor.SUCCESS);
|
|
19060
|
+
}
|
|
18954
19061
|
function useDetail(props, ServiceClass, option = {}) {
|
|
18955
19062
|
const isLoading = ref(false);
|
|
18956
19063
|
const service = Transformer.newInstance(ServiceClass);
|
|
@@ -18980,33 +19087,31 @@ function useDetail(props, ServiceClass, option = {}) {
|
|
|
18980
19087
|
};
|
|
18981
19088
|
}
|
|
18982
19089
|
class WebValidator {
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
|
|
18998
|
-
|
|
18999
|
-
|
|
19000
|
-
|
|
19001
|
-
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
|
|
19007
|
-
|
|
19008
|
-
__publicField(this, "validator");
|
|
19009
|
-
}
|
|
19090
|
+
/**
|
|
19091
|
+
* ### 错误提醒
|
|
19092
|
+
* 请通过 `.show()` 传入
|
|
19093
|
+
*/
|
|
19094
|
+
message;
|
|
19095
|
+
/**
|
|
19096
|
+
* ### 触发方式
|
|
19097
|
+
* 不建议直接设置哦~ (默认blur)
|
|
19098
|
+
*/
|
|
19099
|
+
trigger = "change";
|
|
19100
|
+
/**
|
|
19101
|
+
* ### 类型
|
|
19102
|
+
* 可通过 `toString` `toNumber` `toArray` 设置 (默认`string`)
|
|
19103
|
+
*/
|
|
19104
|
+
type;
|
|
19105
|
+
/**
|
|
19106
|
+
* ### 是否必填
|
|
19107
|
+
* 可以调用 `.ifEmpty()`
|
|
19108
|
+
*/
|
|
19109
|
+
required = false;
|
|
19110
|
+
/**
|
|
19111
|
+
* ### 自定义验证器
|
|
19112
|
+
* 请调用 `.setCustomValidator()`
|
|
19113
|
+
*/
|
|
19114
|
+
validator;
|
|
19010
19115
|
/**
|
|
19011
19116
|
* ### 通过指定错误信息来创建一个验证器
|
|
19012
19117
|
* @param message `可选` 验证失败的提示
|
|
@@ -19534,8 +19639,7 @@ function useEditor(props, ServiceClass, option = {}) {
|
|
|
19534
19639
|
watch(
|
|
19535
19640
|
result.formData,
|
|
19536
19641
|
() => {
|
|
19537
|
-
|
|
19538
|
-
(_a = formRef.value) == null ? void 0 : _a.validate();
|
|
19642
|
+
formRef.value?.validate();
|
|
19539
19643
|
},
|
|
19540
19644
|
{
|
|
19541
19645
|
deep: true,
|
|
@@ -19613,24 +19717,24 @@ function useTableTree(serviceClass, option = {}) {
|
|
|
19613
19717
|
}
|
|
19614
19718
|
class RootModel extends Transformer {
|
|
19615
19719
|
}
|
|
19616
|
-
var
|
|
19720
|
+
var __defProp = Object.defineProperty;
|
|
19617
19721
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
19618
19722
|
var result = void 0;
|
|
19619
19723
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19620
19724
|
if (decorator = decorators[i])
|
|
19621
19725
|
result = decorator(target, key, result) || result;
|
|
19622
|
-
if (result)
|
|
19726
|
+
if (result) __defProp(target, key, result);
|
|
19623
19727
|
return result;
|
|
19624
19728
|
};
|
|
19625
19729
|
class RootEntity extends RootModel {
|
|
19730
|
+
id;
|
|
19731
|
+
isDisabled;
|
|
19626
19732
|
/**
|
|
19627
19733
|
* ### 实例化一个实体
|
|
19628
19734
|
* @param id `可选` 主键 `ID`
|
|
19629
19735
|
*/
|
|
19630
19736
|
constructor(id) {
|
|
19631
19737
|
super();
|
|
19632
|
-
__publicField(this, "id");
|
|
19633
|
-
__publicField(this, "isDisabled");
|
|
19634
19738
|
if (id) {
|
|
19635
19739
|
this.id = id;
|
|
19636
19740
|
}
|
|
@@ -19668,6 +19772,18 @@ __decorateClass([
|
|
|
19668
19772
|
})
|
|
19669
19773
|
], RootEntity.prototype, "isDisabled");
|
|
19670
19774
|
class RouterUtil {
|
|
19775
|
+
/**
|
|
19776
|
+
* ### 当前路由
|
|
19777
|
+
*/
|
|
19778
|
+
static router;
|
|
19779
|
+
/**
|
|
19780
|
+
* ### 私有构造器
|
|
19781
|
+
*/
|
|
19782
|
+
static components = {};
|
|
19783
|
+
/**
|
|
19784
|
+
* ### 组件目录
|
|
19785
|
+
*/
|
|
19786
|
+
static componentsDirectory = "";
|
|
19671
19787
|
/**
|
|
19672
19788
|
* ### 将 `IMenu` 菜单列表初始化到 `Vue` 路由中
|
|
19673
19789
|
* @param menuList 菜单列表
|
|
@@ -19770,27 +19886,12 @@ class RouterUtil {
|
|
|
19770
19886
|
}
|
|
19771
19887
|
}
|
|
19772
19888
|
}
|
|
19773
|
-
/**
|
|
19774
|
-
* ### 当前路由
|
|
19775
|
-
*/
|
|
19776
|
-
__publicField(RouterUtil, "router");
|
|
19777
|
-
/**
|
|
19778
|
-
* ### 私有构造器
|
|
19779
|
-
*/
|
|
19780
|
-
__publicField(RouterUtil, "components", {});
|
|
19781
|
-
/**
|
|
19782
|
-
* ### 组件目录
|
|
19783
|
-
*/
|
|
19784
|
-
__publicField(RouterUtil, "componentsDirectory", "");
|
|
19785
19889
|
class AbstractService extends Transformer {
|
|
19786
|
-
|
|
19787
|
-
|
|
19788
|
-
|
|
19789
|
-
|
|
19790
|
-
|
|
19791
|
-
*/
|
|
19792
|
-
__publicField(this, "loading");
|
|
19793
|
-
}
|
|
19890
|
+
/**
|
|
19891
|
+
* ### `Loading`
|
|
19892
|
+
* 你可以将这个传入的对象绑定到你需要 `Loading` 的 `DOM` 上
|
|
19893
|
+
*/
|
|
19894
|
+
loading;
|
|
19794
19895
|
/**
|
|
19795
19896
|
* ### 静态创建一个 `API` 服务实例
|
|
19796
19897
|
* @param loading `可选` Loading
|
|
@@ -19825,45 +19926,42 @@ class AbstractService extends Transformer {
|
|
|
19825
19926
|
}
|
|
19826
19927
|
}
|
|
19827
19928
|
class AbstractCurdService extends AbstractService {
|
|
19828
|
-
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
|
|
19844
|
-
|
|
19845
|
-
|
|
19846
|
-
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
|
|
19853
|
-
|
|
19854
|
-
|
|
19855
|
-
|
|
19856
|
-
|
|
19857
|
-
|
|
19858
|
-
|
|
19859
|
-
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
19864
|
-
*/
|
|
19865
|
-
__publicField(this, "urlDelete", "delete");
|
|
19866
|
-
}
|
|
19929
|
+
/**
|
|
19930
|
+
* ### 分页查询默认 `URL`
|
|
19931
|
+
*/
|
|
19932
|
+
urlGetPage = "getPage";
|
|
19933
|
+
/**
|
|
19934
|
+
* ### 不分页查询默认 `URL`
|
|
19935
|
+
*/
|
|
19936
|
+
urlGetList = "getList";
|
|
19937
|
+
/**
|
|
19938
|
+
* ### 不分页树查询默认 `URL`
|
|
19939
|
+
*/
|
|
19940
|
+
urlGetTreeList = "getTreeList";
|
|
19941
|
+
/**
|
|
19942
|
+
* ### 查询详情默认 `URL`
|
|
19943
|
+
*/
|
|
19944
|
+
urlGetDetail = "getDetail";
|
|
19945
|
+
/**
|
|
19946
|
+
* ### 添加默认 `URL`
|
|
19947
|
+
*/
|
|
19948
|
+
urlAdd = "add";
|
|
19949
|
+
/**
|
|
19950
|
+
* ### 启用默认 `URL`
|
|
19951
|
+
*/
|
|
19952
|
+
urlEnable = "enable";
|
|
19953
|
+
/**
|
|
19954
|
+
* ### 禁用默认 `URL`
|
|
19955
|
+
*/
|
|
19956
|
+
urlDisable = "disable";
|
|
19957
|
+
/**
|
|
19958
|
+
* ### 修改默认 `URL`
|
|
19959
|
+
*/
|
|
19960
|
+
urlUpdate = "update";
|
|
19961
|
+
/**
|
|
19962
|
+
* ### 删除默认 `URL`
|
|
19963
|
+
*/
|
|
19964
|
+
urlDelete = "delete";
|
|
19867
19965
|
/**
|
|
19868
19966
|
* ### 创建验证器
|
|
19869
19967
|
* @param moreRule `可选` 更多的验证规则
|