@airpower/web 0.4.3 → 1.2.0
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,9 +9000,9 @@ function requireCryptoJs() {
|
|
|
8998
9000
|
}
|
|
8999
9001
|
var cryptoJsExports = requireCryptoJs();
|
|
9000
9002
|
const CryptoJS = /* @__PURE__ */ getDefaultExportFromCjs(cryptoJsExports);
|
|
9001
|
-
var __defProp$
|
|
9002
|
-
var __defNormalProp
|
|
9003
|
-
var __publicField
|
|
9003
|
+
var __defProp$4 = Object.defineProperty;
|
|
9004
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9005
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9004
9006
|
class Enum {
|
|
9005
9007
|
/**
|
|
9006
9008
|
* ### 实例化创建一个枚举项目
|
|
@@ -9008,8 +9010,8 @@ class Enum {
|
|
|
9008
9010
|
* @param label 枚举描述
|
|
9009
9011
|
*/
|
|
9010
9012
|
constructor(key, label) {
|
|
9011
|
-
__publicField
|
|
9012
|
-
__publicField
|
|
9013
|
+
__publicField(this, "key");
|
|
9014
|
+
__publicField(this, "label");
|
|
9013
9015
|
this.key = key;
|
|
9014
9016
|
if (label) {
|
|
9015
9017
|
this.label = label;
|
|
@@ -9046,10 +9048,11 @@ class Enum {
|
|
|
9046
9048
|
return this.key === key;
|
|
9047
9049
|
}
|
|
9048
9050
|
}
|
|
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
9051
|
class CryptoUtil {
|
|
9052
|
+
/**
|
|
9053
|
+
* ### AES加解密使用默认向量
|
|
9054
|
+
*/
|
|
9055
|
+
static aesCbcIvString = "0000000000000000";
|
|
9053
9056
|
/**
|
|
9054
9057
|
* ### `AES` 加密方法
|
|
9055
9058
|
* @param data 加密数据
|
|
@@ -9109,8 +9112,55 @@ class CryptoUtil {
|
|
|
9109
9112
|
return CryptoJS.enc.Base64.parse(data).toString(CryptoJS.enc.Utf8);
|
|
9110
9113
|
}
|
|
9111
9114
|
}
|
|
9112
|
-
|
|
9113
|
-
|
|
9115
|
+
class DateTimeUtil {
|
|
9116
|
+
/**
|
|
9117
|
+
* ### 时间进制
|
|
9118
|
+
*/
|
|
9119
|
+
static SECOND_PER_MINUTE = 60;
|
|
9120
|
+
/**
|
|
9121
|
+
* ### 每小时的秒数
|
|
9122
|
+
*/
|
|
9123
|
+
static SECOND_PER_HOUR = this.SECOND_PER_MINUTE ** 2;
|
|
9124
|
+
/**
|
|
9125
|
+
* ### 每秒的毫秒数
|
|
9126
|
+
*/
|
|
9127
|
+
static MILLISECONDS_PER_SECOND = 1e3;
|
|
9128
|
+
/**
|
|
9129
|
+
* ### 每天小时
|
|
9130
|
+
*/
|
|
9131
|
+
static HOUR_PER_DAY = 24;
|
|
9132
|
+
/**
|
|
9133
|
+
* ### 每月天数
|
|
9134
|
+
*/
|
|
9135
|
+
static DAY_PER_MONTH = 30;
|
|
9136
|
+
/**
|
|
9137
|
+
* ### 每年月份
|
|
9138
|
+
*/
|
|
9139
|
+
static MONTH_PER_YEAR = 12;
|
|
9140
|
+
/**
|
|
9141
|
+
* ### 每年天数
|
|
9142
|
+
*/
|
|
9143
|
+
static DAY_PER_YEAR = 365;
|
|
9144
|
+
/**
|
|
9145
|
+
* ### 每天秒数
|
|
9146
|
+
*/
|
|
9147
|
+
static SECOND_PER_DAY = this.SECOND_PER_HOUR * this.HOUR_PER_DAY;
|
|
9148
|
+
/**
|
|
9149
|
+
* ### 每周天数
|
|
9150
|
+
*/
|
|
9151
|
+
static DAY_PER_WEEK = 7;
|
|
9152
|
+
/**
|
|
9153
|
+
* ### 每年平均周
|
|
9154
|
+
*/
|
|
9155
|
+
static WEEK_PER_YEAR = 52;
|
|
9156
|
+
/**
|
|
9157
|
+
* ### 每月平均周
|
|
9158
|
+
*/
|
|
9159
|
+
static WEEK_PER_MONTH = 4;
|
|
9160
|
+
/**
|
|
9161
|
+
* ### 每天秒数
|
|
9162
|
+
*/
|
|
9163
|
+
static SECONDS_PER_DAY = this.HOUR_PER_DAY * this.SECOND_PER_HOUR;
|
|
9114
9164
|
/**
|
|
9115
9165
|
* ### 睡会再起来干活
|
|
9116
9166
|
* 不要忘了`await`,否则没睡醒就起来干活了 :)
|
|
@@ -9244,21 +9294,53 @@ const _DateTimeUtil = class _DateTimeUtil2 {
|
|
|
9244
9294
|
}
|
|
9245
9295
|
return "Unknown";
|
|
9246
9296
|
}
|
|
9247
|
-
}
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9297
|
+
}
|
|
9298
|
+
class DateTimeFormatter extends Enum {
|
|
9299
|
+
/**
|
|
9300
|
+
* ### e.g. `2022-02-02 22:22:22`
|
|
9301
|
+
*/
|
|
9302
|
+
static FULL_DATE_TIME = new DateTimeFormatter("YYYY-MM-DD HH:mm:ss");
|
|
9303
|
+
/**
|
|
9304
|
+
* ### e.g. `15061231312312`
|
|
9305
|
+
* 毫秒时间戳
|
|
9306
|
+
*/
|
|
9307
|
+
static TIMESTAMP = new DateTimeFormatter("x");
|
|
9308
|
+
/**
|
|
9309
|
+
* ### e.g. `02-02 22:22`
|
|
9310
|
+
*/
|
|
9311
|
+
static SHORT_DATE_TIME = new DateTimeFormatter("MM-DD HH:mm");
|
|
9312
|
+
/**
|
|
9313
|
+
* ### e.g. `2022-02-02`
|
|
9314
|
+
*/
|
|
9315
|
+
static FULL_DATE = new DateTimeFormatter("YYYY-MM-DD");
|
|
9316
|
+
/**
|
|
9317
|
+
* ### e.g. `22:22:22`
|
|
9318
|
+
*/
|
|
9319
|
+
static FULL_TIME = new DateTimeFormatter("HH:mm:ss");
|
|
9320
|
+
/**
|
|
9321
|
+
* ### e.g. `2022`
|
|
9322
|
+
*/
|
|
9323
|
+
static YEAR = new DateTimeFormatter("YYYY");
|
|
9324
|
+
/**
|
|
9325
|
+
* ### e.g. `02`
|
|
9326
|
+
*/
|
|
9327
|
+
static MONTH = new DateTimeFormatter("MM");
|
|
9328
|
+
/**
|
|
9329
|
+
* ### e.g. `02`
|
|
9330
|
+
*/
|
|
9331
|
+
static DAY = new DateTimeFormatter("DD");
|
|
9332
|
+
/**
|
|
9333
|
+
* ### e.g. `22`
|
|
9334
|
+
*/
|
|
9335
|
+
static HOUR = new DateTimeFormatter("HH");
|
|
9336
|
+
/**
|
|
9337
|
+
* ### e.g. `22`
|
|
9338
|
+
*/
|
|
9339
|
+
static MINUTE = new DateTimeFormatter("mm");
|
|
9340
|
+
/**
|
|
9341
|
+
* ### e.g. `59`
|
|
9342
|
+
*/
|
|
9343
|
+
static SECOND = new DateTimeFormatter("ss");
|
|
9262
9344
|
/**
|
|
9263
9345
|
* ### 使用这个模板格式化毫秒时间戳
|
|
9264
9346
|
* @param milliSecond 毫秒时间戳
|
|
@@ -9290,20 +9372,20 @@ const _DateTimeFormatter = class _DateTimeFormatter2 extends Enum {
|
|
|
9290
9372
|
format() {
|
|
9291
9373
|
return this.formatDate(/* @__PURE__ */ new Date());
|
|
9292
9374
|
}
|
|
9293
|
-
}
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9375
|
+
}
|
|
9376
|
+
class DesensitizeUtil {
|
|
9377
|
+
/**
|
|
9378
|
+
* ### 默认的脱敏符号
|
|
9379
|
+
*/
|
|
9380
|
+
static DEFAULT_MASK = "*";
|
|
9381
|
+
/**
|
|
9382
|
+
* ### IP地址分隔符
|
|
9383
|
+
*/
|
|
9384
|
+
static IP_V4_SEPARATOR = ".";
|
|
9385
|
+
/**
|
|
9386
|
+
* ### `IPv4` 的块长度
|
|
9387
|
+
*/
|
|
9388
|
+
static IP_V4_PART_COUNT = 4;
|
|
9307
9389
|
/**
|
|
9308
9390
|
* ### 字符串替换
|
|
9309
9391
|
*
|
|
@@ -9336,7 +9418,7 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9336
9418
|
*/
|
|
9337
9419
|
static desensitizeIpv4Address(ipv4, symbol = this.DEFAULT_MASK) {
|
|
9338
9420
|
const strings = ipv4.split(this.IP_V4_SEPARATOR);
|
|
9339
|
-
if (strings.length !==
|
|
9421
|
+
if (strings.length !== DesensitizeUtil.IP_V4_PART_COUNT) {
|
|
9340
9422
|
return ipv4;
|
|
9341
9423
|
}
|
|
9342
9424
|
const temp = symbol + symbol + symbol;
|
|
@@ -9362,7 +9444,7 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9362
9444
|
tail = tail <= 0 ? type.tail : tail;
|
|
9363
9445
|
switch (type.key) {
|
|
9364
9446
|
case DesensitizeType.IP_V4.key:
|
|
9365
|
-
return
|
|
9447
|
+
return DesensitizeUtil.desensitizeIpv4Address(source, symbol);
|
|
9366
9448
|
case DesensitizeType.CHINESE_NAME.key:
|
|
9367
9449
|
if (source.length <= head + tail) {
|
|
9368
9450
|
tail = 0;
|
|
@@ -9376,12 +9458,56 @@ const _DesensitizeUtil = class _DesensitizeUtil2 {
|
|
|
9376
9458
|
}
|
|
9377
9459
|
return this.replace(source, head, tail, symbol);
|
|
9378
9460
|
}
|
|
9379
|
-
}
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9461
|
+
}
|
|
9462
|
+
class DesensitizeType extends Enum {
|
|
9463
|
+
/**
|
|
9464
|
+
* ### 座机号码
|
|
9465
|
+
*/
|
|
9466
|
+
static TELEPHONE = new DesensitizeType("座机号码", 3, 4);
|
|
9467
|
+
/**
|
|
9468
|
+
* ### 手机号码
|
|
9469
|
+
*/
|
|
9470
|
+
static MOBILE = new DesensitizeType("手机号码", 3, 4);
|
|
9471
|
+
/**
|
|
9472
|
+
* ### 身份证号
|
|
9473
|
+
*/
|
|
9474
|
+
static ID_CARD = new DesensitizeType("身份证号", 6, 4);
|
|
9475
|
+
/**
|
|
9476
|
+
* ### 银行卡号
|
|
9477
|
+
*/
|
|
9478
|
+
static BANK_CARD = new DesensitizeType("银行卡号", 4, 4);
|
|
9479
|
+
/**
|
|
9480
|
+
* ### 车牌号
|
|
9481
|
+
*/
|
|
9482
|
+
static CAR_NUMBER = new DesensitizeType("车牌号", 2, 1);
|
|
9483
|
+
/**
|
|
9484
|
+
* ### 邮箱
|
|
9485
|
+
*/
|
|
9486
|
+
static EMAIL = new DesensitizeType("邮箱", 2, 2);
|
|
9487
|
+
/**
|
|
9488
|
+
* ### 中文姓名
|
|
9489
|
+
*/
|
|
9490
|
+
static CHINESE_NAME = new DesensitizeType("中文名", 1, 1);
|
|
9491
|
+
/**
|
|
9492
|
+
* ### 地址
|
|
9493
|
+
*/
|
|
9494
|
+
static ADDRESS = new DesensitizeType("地址", 3, 0);
|
|
9495
|
+
/**
|
|
9496
|
+
* ### IPv4地址
|
|
9497
|
+
*/
|
|
9498
|
+
static IP_V4 = new DesensitizeType("IPv4地址", 0, 0);
|
|
9499
|
+
/**
|
|
9500
|
+
* ### 自定义
|
|
9501
|
+
*/
|
|
9502
|
+
static CUSTOM = new DesensitizeType("自定义", 0, 0);
|
|
9503
|
+
/**
|
|
9504
|
+
* ### 脱敏头部保留
|
|
9505
|
+
*/
|
|
9506
|
+
head;
|
|
9507
|
+
/**
|
|
9508
|
+
* ### 脱敏尾部保留
|
|
9509
|
+
*/
|
|
9510
|
+
tail;
|
|
9385
9511
|
/**
|
|
9386
9512
|
* ### 创建一个脱敏类型
|
|
9387
9513
|
* @param label 脱敏类型
|
|
@@ -9390,8 +9516,6 @@ const _DesensitizeType = class _DesensitizeType2 extends Enum {
|
|
|
9390
9516
|
*/
|
|
9391
9517
|
constructor(label, head, tail) {
|
|
9392
9518
|
super(label, label);
|
|
9393
|
-
__publicField2(this, "head");
|
|
9394
|
-
__publicField2(this, "tail");
|
|
9395
9519
|
this.head = head;
|
|
9396
9520
|
this.tail = tail;
|
|
9397
9521
|
}
|
|
@@ -9404,19 +9528,16 @@ const _DesensitizeType = class _DesensitizeType2 extends Enum {
|
|
|
9404
9528
|
desensitize(str, symbol) {
|
|
9405
9529
|
return DesensitizeUtil.desensitize(str, this, this.head, this.tail, symbol);
|
|
9406
9530
|
}
|
|
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;
|
|
9531
|
+
}
|
|
9419
9532
|
class FileUtil {
|
|
9533
|
+
/**
|
|
9534
|
+
* ### 文件大小进制
|
|
9535
|
+
*/
|
|
9536
|
+
static RADIX_FILE_SIZE = 1024;
|
|
9537
|
+
/**
|
|
9538
|
+
* ### 文件单位列表
|
|
9539
|
+
*/
|
|
9540
|
+
static FILE_UNIT_LIST = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
9420
9541
|
/**
|
|
9421
9542
|
* ### 字节数转可读文件大小
|
|
9422
9543
|
* @param size 字节数
|
|
@@ -9434,9 +9555,27 @@ class FileUtil {
|
|
|
9434
9555
|
return "INFINITY";
|
|
9435
9556
|
}
|
|
9436
9557
|
}
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9558
|
+
class RandomUtil {
|
|
9559
|
+
/**
|
|
9560
|
+
* ### 数字集合
|
|
9561
|
+
*/
|
|
9562
|
+
static STRING_OF_NUMBER = "0123456789";
|
|
9563
|
+
/**
|
|
9564
|
+
* ### 小写字母集合
|
|
9565
|
+
*/
|
|
9566
|
+
static STRING_OF_LOWER_CHAR = "abcdefghijklmnopqrstuvwxyz";
|
|
9567
|
+
/**
|
|
9568
|
+
* ### 大写字母集合
|
|
9569
|
+
*/
|
|
9570
|
+
static STRING_OF_UPPER_CHAR = this.STRING_OF_LOWER_CHAR.toUpperCase();
|
|
9571
|
+
/**
|
|
9572
|
+
* ### 默认长度
|
|
9573
|
+
*/
|
|
9574
|
+
static DEFAULT_LENGTH = 32;
|
|
9575
|
+
/**
|
|
9576
|
+
* ### 十进制
|
|
9577
|
+
*/
|
|
9578
|
+
static DECIMALISM = 10;
|
|
9440
9579
|
/**
|
|
9441
9580
|
* ### 指定范围内获取随机整数
|
|
9442
9581
|
* @param min 最小
|
|
@@ -9512,14 +9651,12 @@ const _RandomUtil = class _RandomUtil2 {
|
|
|
9512
9651
|
static getRandColor() {
|
|
9513
9652
|
return `#${Math.random().toString(16).padEnd(6, "0").slice(2, 8)}`;
|
|
9514
9653
|
}
|
|
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;
|
|
9654
|
+
}
|
|
9522
9655
|
class StringUtil {
|
|
9656
|
+
/**
|
|
9657
|
+
* ### 单码元长度
|
|
9658
|
+
*/
|
|
9659
|
+
static SINGLE_POINT_LENGTH = 65535;
|
|
9523
9660
|
/**
|
|
9524
9661
|
* ### 获取字符串可视化长度
|
|
9525
9662
|
*/
|
|
@@ -9579,8 +9716,11 @@ class StringUtil {
|
|
|
9579
9716
|
return s;
|
|
9580
9717
|
}
|
|
9581
9718
|
}
|
|
9582
|
-
__publicField2(StringUtil, "SINGLE_POINT_LENGTH", 65535);
|
|
9583
9719
|
class ValidateUtil {
|
|
9720
|
+
/**
|
|
9721
|
+
* ### 十进制
|
|
9722
|
+
*/
|
|
9723
|
+
static DECIMALISM = 10;
|
|
9584
9724
|
/**
|
|
9585
9725
|
* ### 验证是否手机号或座机号
|
|
9586
9726
|
* @param phoneNumber 号码
|
|
@@ -9698,8 +9838,15 @@ class ValidateUtil {
|
|
|
9698
9838
|
return validArray[1][sum % 11].toString() === str[17].toString();
|
|
9699
9839
|
}
|
|
9700
9840
|
}
|
|
9701
|
-
__publicField2(ValidateUtil, "DECIMALISM", 10);
|
|
9702
9841
|
class VersionUtil {
|
|
9842
|
+
/**
|
|
9843
|
+
* ### 版本号长度
|
|
9844
|
+
*/
|
|
9845
|
+
static VERSION_LENGTH = 2;
|
|
9846
|
+
/**
|
|
9847
|
+
* ### 版本号分隔符
|
|
9848
|
+
*/
|
|
9849
|
+
static VERSION_SEPARATOR = ".";
|
|
9703
9850
|
/**
|
|
9704
9851
|
* ### 获取版本号数字
|
|
9705
9852
|
* @param version 版本号字符串
|
|
@@ -9726,8 +9873,6 @@ class VersionUtil {
|
|
|
9726
9873
|
return [major, minor].join(separator);
|
|
9727
9874
|
}
|
|
9728
9875
|
}
|
|
9729
|
-
__publicField2(VersionUtil, "VERSION_LENGTH", 2);
|
|
9730
|
-
__publicField2(VersionUtil, "VERSION_SEPARATOR", ".");
|
|
9731
9876
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
9732
9877
|
__name: "DateTime",
|
|
9733
9878
|
props: {
|
|
@@ -10055,8 +10200,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10055
10200
|
let trueHeight = 0;
|
|
10056
10201
|
const isFullScreen = ref(!props.hideFullscreen && props.fullScreen);
|
|
10057
10202
|
onMounted(() => {
|
|
10058
|
-
|
|
10059
|
-
(_a = document.getElementById(`hidden-button-${domId.value}`)) == null ? void 0 : _a.focus();
|
|
10203
|
+
document.getElementById(`hidden-button-${domId.value}`)?.focus();
|
|
10060
10204
|
});
|
|
10061
10205
|
watch(isFullScreen, () => {
|
|
10062
10206
|
emits("fullscreenChange", isFullScreen.value);
|
|
@@ -10290,12 +10434,10 @@ function getFieldConfig(Class, field) {
|
|
|
10290
10434
|
return DecoratorUtil.getFieldConfig(Class, field.toString(), KEY$3, true) || {};
|
|
10291
10435
|
}
|
|
10292
10436
|
function getDictionary(Class, field) {
|
|
10293
|
-
|
|
10294
|
-
return (_a = getFieldConfig(Class, field)) == null ? void 0 : _a.dictionary;
|
|
10437
|
+
return getFieldConfig(Class, field)?.dictionary;
|
|
10295
10438
|
}
|
|
10296
10439
|
function getFieldLabel(Class, field) {
|
|
10297
|
-
|
|
10298
|
-
return ((_a = getFieldConfig(Class, field)) == null ? void 0 : _a.label) || field.toString();
|
|
10440
|
+
return getFieldConfig(Class, field)?.label || field.toString();
|
|
10299
10441
|
}
|
|
10300
10442
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
10301
10443
|
__name: "FormField",
|
|
@@ -10564,8 +10706,8 @@ function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
|
|
|
10564
10706
|
}
|
|
10565
10707
|
}
|
|
10566
10708
|
/*!
|
|
10567
|
-
* vue-router v4.5.
|
|
10568
|
-
* (c)
|
|
10709
|
+
* vue-router v4.5.1
|
|
10710
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
10569
10711
|
* @license MIT
|
|
10570
10712
|
*/
|
|
10571
10713
|
const isBrowser = typeof document !== "undefined";
|
|
@@ -12007,7 +12149,8 @@ const RouterLinkImpl = /* @__PURE__ */ defineComponent({
|
|
|
12007
12149
|
ariaCurrentValue: {
|
|
12008
12150
|
type: String,
|
|
12009
12151
|
default: "page"
|
|
12010
|
-
}
|
|
12152
|
+
},
|
|
12153
|
+
viewTransition: Boolean
|
|
12011
12154
|
},
|
|
12012
12155
|
useLink,
|
|
12013
12156
|
setup(props, { slots }) {
|
|
@@ -13461,15 +13604,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
13461
13604
|
}
|
|
13462
13605
|
});
|
|
13463
13606
|
class WebConstant {
|
|
13607
|
+
/**
|
|
13608
|
+
* ### HTTP 请求前缀
|
|
13609
|
+
*/
|
|
13610
|
+
static PREFIX_HTTP = "http://";
|
|
13611
|
+
/**
|
|
13612
|
+
* ### HTTPS 请求前缀
|
|
13613
|
+
*/
|
|
13614
|
+
static PREFIX_HTTPS = "https://";
|
|
13464
13615
|
}
|
|
13465
|
-
/**
|
|
13466
|
-
* ### HTTP 请求前缀
|
|
13467
|
-
*/
|
|
13468
|
-
__publicField(WebConstant, "PREFIX_HTTP", "http://");
|
|
13469
|
-
/**
|
|
13470
|
-
* ### HTTPS 请求前缀
|
|
13471
|
-
*/
|
|
13472
|
-
__publicField(WebConstant, "PREFIX_HTTPS", "https://");
|
|
13473
13616
|
class WebFileUtil {
|
|
13474
13617
|
/**
|
|
13475
13618
|
* ### 获取静态文件的绝对地址
|
|
@@ -13906,9 +14049,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13906
14049
|
}
|
|
13907
14050
|
}
|
|
13908
14051
|
const getShowFormatter = computed(() => {
|
|
13909
|
-
var _a;
|
|
13910
14052
|
if (formConfig.value) {
|
|
13911
|
-
switch (
|
|
14053
|
+
switch (formConfig.value?.dateType) {
|
|
13912
14054
|
case DateTimeType.DATE:
|
|
13913
14055
|
return DateTimeFormatter.FULL_DATE.key;
|
|
13914
14056
|
case DateTimeType.WEEK:
|
|
@@ -13924,22 +14066,19 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13924
14066
|
return DateTimeFormatter.FULL_DATE_TIME;
|
|
13925
14067
|
});
|
|
13926
14068
|
function getSwitchColor(status) {
|
|
13927
|
-
|
|
13928
|
-
return ((_b = (_a = dictionary.value) == null ? void 0 : _a.find((item) => !!item.key === status)) == null ? void 0 : _b.color) || "";
|
|
14069
|
+
return dictionary.value?.find((item) => !!item.key === status)?.color || "";
|
|
13929
14070
|
}
|
|
13930
14071
|
function getSwitchLabel(status) {
|
|
13931
|
-
|
|
13932
|
-
return ((_b = (_a = dictionary.value) == null ? void 0 : _a.find((item) => !!item.key === status)) == null ? void 0 : _b.label) || "";
|
|
14072
|
+
return dictionary.value?.find((item) => !!item.key === status)?.label || "";
|
|
13933
14073
|
}
|
|
13934
14074
|
const getInputType = computed(() => {
|
|
13935
|
-
|
|
13936
|
-
if ((_a = formConfig.value) == null ? void 0 : _a.textarea) {
|
|
14075
|
+
if (formConfig.value?.textarea) {
|
|
13937
14076
|
return "textarea";
|
|
13938
14077
|
}
|
|
13939
|
-
if (
|
|
14078
|
+
if (formConfig.value?.password) {
|
|
13940
14079
|
return "password";
|
|
13941
14080
|
}
|
|
13942
|
-
if (
|
|
14081
|
+
if (formConfig.value?.number) {
|
|
13943
14082
|
return "number";
|
|
13944
14083
|
}
|
|
13945
14084
|
return "text";
|
|
@@ -13949,8 +14088,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13949
14088
|
onPropsValueUpdated(newProps);
|
|
13950
14089
|
});
|
|
13951
14090
|
function checkNumberValue() {
|
|
13952
|
-
|
|
13953
|
-
if ((_a = formConfig.value) == null ? void 0 : _a.number) {
|
|
14091
|
+
if (formConfig.value?.number) {
|
|
13954
14092
|
let tempValue = value.value;
|
|
13955
14093
|
const max = Math.min(formConfig.value.max ?? WebConfig.maxNumber, Number.MAX_SAFE_INTEGER);
|
|
13956
14094
|
const min = Math.max(formConfig.value.min ?? WebConfig.minNumber, Number.MIN_SAFE_INTEGER);
|
|
@@ -13960,9 +14098,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13960
14098
|
tempValue = Math.min(tempValue, max);
|
|
13961
14099
|
tempValue = Number.parseFloat(tempValue.toFixed(formConfig.value.precision ?? WebConfig.numberPrecision));
|
|
13962
14100
|
value.value = tempValue;
|
|
13963
|
-
value.value = Number.parseFloat(
|
|
14101
|
+
value.value = Number.parseFloat(value.value?.toString() || "0");
|
|
13964
14102
|
}
|
|
13965
|
-
value.value = Number.parseFloat(
|
|
14103
|
+
value.value = Number.parseFloat(value.value?.toString() || "0");
|
|
13966
14104
|
}
|
|
13967
14105
|
}
|
|
13968
14106
|
function onClear() {
|
|
@@ -13987,15 +14125,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13987
14125
|
emitChange();
|
|
13988
14126
|
}
|
|
13989
14127
|
function onKeyDown(event) {
|
|
13990
|
-
var _a, _b;
|
|
13991
14128
|
switch (event.code) {
|
|
13992
14129
|
case "KeyE":
|
|
13993
|
-
if (
|
|
14130
|
+
if (formConfig.value?.number) {
|
|
13994
14131
|
event.preventDefault();
|
|
13995
14132
|
}
|
|
13996
14133
|
break;
|
|
13997
14134
|
case "Escape":
|
|
13998
|
-
if (
|
|
14135
|
+
if (formConfig.value?.clearable !== false) {
|
|
13999
14136
|
value.value = void 0;
|
|
14000
14137
|
emitValue();
|
|
14001
14138
|
}
|
|
@@ -14020,7 +14157,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14020
14157
|
}
|
|
14021
14158
|
}
|
|
14022
14159
|
function init() {
|
|
14023
|
-
var _a, _b;
|
|
14024
14160
|
initFieldName();
|
|
14025
14161
|
if (props.entity && fieldName.value) {
|
|
14026
14162
|
formConfig.value = getFormConfig(props.entity, fieldName.value);
|
|
@@ -14038,8 +14174,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14038
14174
|
}
|
|
14039
14175
|
}
|
|
14040
14176
|
}
|
|
14041
|
-
dictionary.value = props.list ? props.list : formConfig.value &&
|
|
14042
|
-
if (props.modelValue === void 0 &&
|
|
14177
|
+
dictionary.value = props.list ? props.list : formConfig.value && fieldConfig.value?.dictionary ? fieldConfig.value.dictionary.toArray() : void 0;
|
|
14178
|
+
if (props.modelValue === void 0 && formConfig.value?.defaultValue !== void 0) {
|
|
14043
14179
|
value.value = formConfig.value.defaultValue;
|
|
14044
14180
|
emitValue();
|
|
14045
14181
|
}
|
|
@@ -14048,7 +14184,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14048
14184
|
const slots = useSlots();
|
|
14049
14185
|
init();
|
|
14050
14186
|
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
14187
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
14053
14188
|
const _component_el_time_picker = resolveComponent("el-time-picker");
|
|
14054
14189
|
const _component_el_switch = resolveComponent("el-switch");
|
|
@@ -14066,13 +14201,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14066
14201
|
key: 0,
|
|
14067
14202
|
modelValue: value.value,
|
|
14068
14203
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
14069
|
-
clearable:
|
|
14204
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14070
14205
|
disabled: __props.disabled,
|
|
14071
|
-
format:
|
|
14206
|
+
format: formConfig.value.dateShowFormatter?.key || getShowFormatter.value,
|
|
14072
14207
|
placeholder: placeholderRef.value,
|
|
14073
|
-
"prefix-icon":
|
|
14208
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14074
14209
|
readonly: __props.readonly,
|
|
14075
|
-
"suffix-icon":
|
|
14210
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14076
14211
|
type: formConfig.value.dateType,
|
|
14077
14212
|
"value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
|
|
14078
14213
|
style: { "width": "100%" },
|
|
@@ -14083,13 +14218,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14083
14218
|
key: 1,
|
|
14084
14219
|
modelValue: value.value,
|
|
14085
14220
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
|
|
14086
|
-
clearable:
|
|
14221
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14087
14222
|
disabled: __props.disabled,
|
|
14088
|
-
format:
|
|
14223
|
+
format: formConfig.value.dateShowFormatter?.key || unref(DateTimeFormatter).FULL_TIME.key,
|
|
14089
14224
|
placeholder: placeholderRef.value,
|
|
14090
|
-
"prefix-icon":
|
|
14225
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14091
14226
|
readonly: __props.readonly,
|
|
14092
|
-
"suffix-icon":
|
|
14227
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14093
14228
|
"value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
|
|
14094
14229
|
style: { "width": "100%" },
|
|
14095
14230
|
onClear,
|
|
@@ -14097,7 +14232,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14097
14232
|
onKeydown: onKeyDown
|
|
14098
14233
|
}, null, 8, ["modelValue", "clearable", "disabled", "format", "placeholder", "prefix-icon", "readonly", "suffix-icon", "value-format"]))
|
|
14099
14234
|
], 64)) : __props.list || dictionary.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14100
|
-
|
|
14235
|
+
formConfig.value?.switch ? (openBlock(), createBlock(_component_el_switch, {
|
|
14101
14236
|
key: 0,
|
|
14102
14237
|
modelValue: value.value,
|
|
14103
14238
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
|
|
@@ -14108,7 +14243,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14108
14243
|
"--el-switch-on-color": getSwitchColor(true),
|
|
14109
14244
|
"--el-switch-off-color": getSwitchColor(false)
|
|
14110
14245
|
})
|
|
14111
|
-
}, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) :
|
|
14246
|
+
}, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) : formConfig.value?.radioButton ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
14112
14247
|
key: 1,
|
|
14113
14248
|
modelValue: value.value,
|
|
14114
14249
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => value.value = $event),
|
|
@@ -14128,7 +14263,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14128
14263
|
}), 128))
|
|
14129
14264
|
]),
|
|
14130
14265
|
_: 1
|
|
14131
|
-
}, 8, ["modelValue", "readonly"])) :
|
|
14266
|
+
}, 8, ["modelValue", "readonly"])) : formConfig.value?.radio ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
14132
14267
|
key: 2,
|
|
14133
14268
|
modelValue: value.value,
|
|
14134
14269
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => value.value = $event),
|
|
@@ -14152,18 +14287,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14152
14287
|
key: 3,
|
|
14153
14288
|
modelValue: value.value,
|
|
14154
14289
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => value.value = $event),
|
|
14155
|
-
clearable:
|
|
14156
|
-
"collapse-tags":
|
|
14290
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14291
|
+
"collapse-tags": formConfig.value?.collapseTags,
|
|
14157
14292
|
disabled: __props.disabled,
|
|
14158
|
-
filterable:
|
|
14159
|
-
multiple:
|
|
14160
|
-
"multiple-limit":
|
|
14293
|
+
filterable: formConfig.value?.filterable,
|
|
14294
|
+
multiple: formConfig.value?.multiple,
|
|
14295
|
+
"multiple-limit": formConfig.value?.multipleLimit,
|
|
14161
14296
|
placeholder: placeholderRef.value,
|
|
14162
|
-
"prefix-icon":
|
|
14297
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14163
14298
|
readonly: __props.readonly,
|
|
14164
14299
|
remote: !!__props.onSearch,
|
|
14165
14300
|
"remote-method": __props.onSearch,
|
|
14166
|
-
"suffix-icon":
|
|
14301
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14167
14302
|
"collapse-tags-tooltip": "",
|
|
14168
14303
|
"fit-input-width": "",
|
|
14169
14304
|
onClear,
|
|
@@ -14178,18 +14313,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14178
14313
|
label: item.label,
|
|
14179
14314
|
value: item.key
|
|
14180
14315
|
}, {
|
|
14181
|
-
default: withCtx(() =>
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
(
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
-
])) : createCommentVNode("", true)
|
|
14191
|
-
];
|
|
14192
|
-
}),
|
|
14316
|
+
default: withCtx(() => [
|
|
14317
|
+
formConfig.value?.color ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
14318
|
+
createElementVNode("span", _hoisted_3$7, toDisplayString(item.label), 1),
|
|
14319
|
+
createElementVNode("span", {
|
|
14320
|
+
style: normalizeStyle({ backgroundColor: item.color || unref(WebColor).NORMAL }),
|
|
14321
|
+
class: "light"
|
|
14322
|
+
}, null, 4)
|
|
14323
|
+
])) : createCommentVNode("", true)
|
|
14324
|
+
]),
|
|
14193
14325
|
_: 2
|
|
14194
14326
|
}, 1032, ["disabled", "label", "value"]);
|
|
14195
14327
|
}), 128))
|
|
@@ -14200,20 +14332,20 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14200
14332
|
key: 2,
|
|
14201
14333
|
modelValue: value.value,
|
|
14202
14334
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event),
|
|
14203
|
-
clearable:
|
|
14204
|
-
"collapse-tags":
|
|
14335
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14336
|
+
"collapse-tags": formConfig.value?.collapseTags,
|
|
14205
14337
|
disabled: __props.disabled,
|
|
14206
14338
|
options: __props.tree,
|
|
14207
14339
|
placeholder: placeholderRef.value,
|
|
14208
14340
|
props: {
|
|
14209
14341
|
value: "id",
|
|
14210
14342
|
label: "name",
|
|
14211
|
-
multiple:
|
|
14212
|
-
emitPath:
|
|
14213
|
-
checkStrictly:
|
|
14343
|
+
multiple: formConfig.value?.multiple,
|
|
14344
|
+
emitPath: formConfig.value?.emitPath,
|
|
14345
|
+
checkStrictly: formConfig.value?.checkStrictly
|
|
14214
14346
|
},
|
|
14215
14347
|
readonly: __props.readonly,
|
|
14216
|
-
"show-all-levels":
|
|
14348
|
+
"show-all-levels": formConfig.value?.showAllLevels,
|
|
14217
14349
|
class: "a-input-cascader",
|
|
14218
14350
|
"collapse-tags-tooltip": "",
|
|
14219
14351
|
"popper-class": "a-input-cascader-popper",
|
|
@@ -14224,18 +14356,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14224
14356
|
key: 3,
|
|
14225
14357
|
modelValue: value.value,
|
|
14226
14358
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => value.value = $event),
|
|
14227
|
-
autosize:
|
|
14228
|
-
clearable:
|
|
14359
|
+
autosize: formConfig.value?.autoSize ? { minRows: formConfig.value.minRows, maxRows: formConfig.value.maxRows } : false,
|
|
14360
|
+
clearable: formConfig.value?.clearable !== false,
|
|
14229
14361
|
disabled: __props.disabled,
|
|
14230
|
-
max:
|
|
14231
|
-
maxlength:
|
|
14232
|
-
min:
|
|
14362
|
+
max: formConfig.value?.max,
|
|
14363
|
+
maxlength: formConfig.value?.maxLength || (formConfig.value?.textarea ? unref(WebConfig).maxTextAreaLength : unref(WebConfig).maxTextLength),
|
|
14364
|
+
min: formConfig.value?.min ?? 0,
|
|
14233
14365
|
placeholder: placeholderRef.value,
|
|
14234
|
-
"prefix-icon":
|
|
14366
|
+
"prefix-icon": formConfig.value?.prefixIcon,
|
|
14235
14367
|
readonly: __props.readonly,
|
|
14236
|
-
rows:
|
|
14237
|
-
"show-word-limit":
|
|
14238
|
-
"suffix-icon":
|
|
14368
|
+
rows: formConfig.value?.textarea ? unref(WebConfig).textareaMinRows : 0,
|
|
14369
|
+
"show-word-limit": formConfig.value?.showLimit !== false,
|
|
14370
|
+
"suffix-icon": formConfig.value?.suffixIcon,
|
|
14239
14371
|
type: getInputType.value,
|
|
14240
14372
|
onBlur,
|
|
14241
14373
|
onChange: checkNumberValue,
|
|
@@ -14247,29 +14379,26 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14247
14379
|
return {
|
|
14248
14380
|
name,
|
|
14249
14381
|
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
|
-
})
|
|
14382
|
+
renderSlot(_ctx.$slots, name, {}, () => [
|
|
14383
|
+
name === "append" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
14384
|
+
createTextVNode(toDisplayString(formConfig.value?.suffixText), 1)
|
|
14385
|
+
], 64)) : createCommentVNode("", true),
|
|
14386
|
+
name === "suffix" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14387
|
+
isClearButtonShow.value ? (openBlock(), createBlock(_component_el_icon, {
|
|
14388
|
+
key: 0,
|
|
14389
|
+
onClick: _cache[7] || (_cache[7] = ($event) => onClear())
|
|
14390
|
+
}, {
|
|
14391
|
+
default: withCtx(() => [
|
|
14392
|
+
createVNode(unref(circle_close_default))
|
|
14393
|
+
]),
|
|
14394
|
+
_: 1
|
|
14395
|
+
})) : createCommentVNode("", true)
|
|
14396
|
+
], 64)) : createCommentVNode("", true)
|
|
14397
|
+
])
|
|
14269
14398
|
])
|
|
14270
14399
|
};
|
|
14271
14400
|
}),
|
|
14272
|
-
!_ctx.$slots.append &&
|
|
14401
|
+
!_ctx.$slots.append && formConfig.value?.suffixText ? {
|
|
14273
14402
|
name: "append",
|
|
14274
14403
|
fn: withCtx(() => [
|
|
14275
14404
|
createTextVNode(toDisplayString(formConfig.value.suffixText), 1)
|
|
@@ -14347,30 +14476,24 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
14347
14476
|
});
|
|
14348
14477
|
const AMoney = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-f91c14e3"]]);
|
|
14349
14478
|
class QueryPage extends Transformer {
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
|
|
14353
|
-
|
|
14354
|
-
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
|
|
14358
|
-
*/
|
|
14359
|
-
__publicField(this, "pageSize", 20);
|
|
14360
|
-
}
|
|
14479
|
+
/**
|
|
14480
|
+
* ### 分页页数
|
|
14481
|
+
*/
|
|
14482
|
+
pageNum = 1;
|
|
14483
|
+
/**
|
|
14484
|
+
* ### 每页数量
|
|
14485
|
+
*/
|
|
14486
|
+
pageSize = 20;
|
|
14361
14487
|
}
|
|
14362
14488
|
class QuerySort extends Transformer {
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
*/
|
|
14372
|
-
__publicField(this, "direction", "desc");
|
|
14373
|
-
}
|
|
14489
|
+
/**
|
|
14490
|
+
* ### 排序字段 默认 `id`
|
|
14491
|
+
*/
|
|
14492
|
+
field = "id";
|
|
14493
|
+
/**
|
|
14494
|
+
* ### 排序方式 默认 `desc`
|
|
14495
|
+
*/
|
|
14496
|
+
direction = "desc";
|
|
14374
14497
|
/**
|
|
14375
14498
|
* ### 设置排序字段名
|
|
14376
14499
|
* @param field 字段名
|
|
@@ -14398,23 +14521,20 @@ var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
|
14398
14521
|
return result;
|
|
14399
14522
|
};
|
|
14400
14523
|
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
|
-
}
|
|
14524
|
+
/**
|
|
14525
|
+
* ### 返回的当前页数据列表
|
|
14526
|
+
*/
|
|
14527
|
+
list = [];
|
|
14528
|
+
page = new QueryPage();
|
|
14529
|
+
sort = new QuerySort();
|
|
14530
|
+
/**
|
|
14531
|
+
* ### 返回总条数
|
|
14532
|
+
*/
|
|
14533
|
+
total = 0;
|
|
14534
|
+
/**
|
|
14535
|
+
* ### 返回总页数
|
|
14536
|
+
*/
|
|
14537
|
+
pageCount = 0;
|
|
14418
14538
|
}
|
|
14419
14539
|
__decorateClass$3([
|
|
14420
14540
|
Type(QueryPage)
|
|
@@ -14682,10 +14802,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14682
14802
|
setup(__props) {
|
|
14683
14803
|
const props = __props;
|
|
14684
14804
|
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
|
-
});
|
|
14805
|
+
const realTitle = computed(() => props.title || useRouter().currentRoute.value.meta?.name || "");
|
|
14689
14806
|
return (_ctx, _cache) => {
|
|
14690
14807
|
return openBlock(), createElementBlock("div", {
|
|
14691
14808
|
class: normalizeClass([isFullScreen.value ? "fullscreen" : "", "web-panel"])
|
|
@@ -14835,56 +14952,52 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
|
14835
14952
|
return HttpMethod2;
|
|
14836
14953
|
})(HttpMethod || {});
|
|
14837
14954
|
class HttpResponse {
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
__publicField(this, "message");
|
|
14851
|
-
}
|
|
14955
|
+
/**
|
|
14956
|
+
* ### 业务状态码
|
|
14957
|
+
*/
|
|
14958
|
+
code;
|
|
14959
|
+
/**
|
|
14960
|
+
* ### 返回的数据
|
|
14961
|
+
*/
|
|
14962
|
+
data;
|
|
14963
|
+
/**
|
|
14964
|
+
* ### 错误信息
|
|
14965
|
+
*/
|
|
14966
|
+
message;
|
|
14852
14967
|
}
|
|
14853
14968
|
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
|
-
}
|
|
14969
|
+
/**
|
|
14970
|
+
* ### 请求方法
|
|
14971
|
+
*/
|
|
14972
|
+
method = HttpMethod.POST;
|
|
14973
|
+
/**
|
|
14974
|
+
* ### URL
|
|
14975
|
+
*/
|
|
14976
|
+
url = "";
|
|
14977
|
+
/**
|
|
14978
|
+
* ### 请求超时时间
|
|
14979
|
+
*/
|
|
14980
|
+
timeout = WebConfig.timeout;
|
|
14981
|
+
/**
|
|
14982
|
+
* ### 是否携带 `Cookies`
|
|
14983
|
+
*/
|
|
14984
|
+
widthCookie = false;
|
|
14985
|
+
/**
|
|
14986
|
+
* ### 请求头
|
|
14987
|
+
*/
|
|
14988
|
+
headers = {};
|
|
14989
|
+
/**
|
|
14990
|
+
* ### 错误回调
|
|
14991
|
+
*/
|
|
14992
|
+
errorHandler;
|
|
14993
|
+
/**
|
|
14994
|
+
* ### 加载回调
|
|
14995
|
+
*/
|
|
14996
|
+
loadingHandler;
|
|
14997
|
+
/**
|
|
14998
|
+
* ### 是否直接抛出错误
|
|
14999
|
+
*/
|
|
15000
|
+
isThrowError = false;
|
|
14888
15001
|
/**
|
|
14889
15002
|
* ### 创建一个客户端
|
|
14890
15003
|
* @param url 请求的 `URL`
|
|
@@ -15067,25 +15180,22 @@ class Http {
|
|
|
15067
15180
|
}
|
|
15068
15181
|
}
|
|
15069
15182
|
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
|
-
}
|
|
15183
|
+
/**
|
|
15184
|
+
* ### 创建导出任务的API地址
|
|
15185
|
+
*/
|
|
15186
|
+
createExportTaskUrl;
|
|
15187
|
+
/**
|
|
15188
|
+
* ### 查询导出结果的 `API` 地址
|
|
15189
|
+
*/
|
|
15190
|
+
queryExportUrl;
|
|
15191
|
+
/**
|
|
15192
|
+
* ### 请求的参数
|
|
15193
|
+
*/
|
|
15194
|
+
param;
|
|
15195
|
+
/**
|
|
15196
|
+
* ### 下载导出文件的临时令牌
|
|
15197
|
+
*/
|
|
15198
|
+
fileCode;
|
|
15089
15199
|
}
|
|
15090
15200
|
const _hoisted_1$8 = { class: "tips" };
|
|
15091
15201
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
@@ -15531,9 +15641,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
15531
15641
|
}
|
|
15532
15642
|
}
|
|
15533
15643
|
const payloadLabel = computed(() => {
|
|
15534
|
-
var _a;
|
|
15535
15644
|
try {
|
|
15536
|
-
return
|
|
15645
|
+
return props.payload?.getPayloadLabel() || "-";
|
|
15537
15646
|
} catch (e) {
|
|
15538
15647
|
console.error("[IPayload] 请实现 IPayload 接口", props.payload);
|
|
15539
15648
|
}
|
|
@@ -16781,10 +16890,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
16781
16890
|
const props = __props;
|
|
16782
16891
|
const emits = __emit;
|
|
16783
16892
|
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
|
-
});
|
|
16893
|
+
const label = computed(() => result.value?.getPayloadLabel() || props.default);
|
|
16788
16894
|
async function onSelect() {
|
|
16789
16895
|
result.value = await DialogUtil.show(props.selector, props.param);
|
|
16790
16896
|
emits("changed", result.value);
|
|
@@ -16872,17 +16978,17 @@ var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
|
16872
16978
|
return result;
|
|
16873
16979
|
};
|
|
16874
16980
|
class QueryRequest extends Transformer {
|
|
16981
|
+
/**
|
|
16982
|
+
* ### 查询信息
|
|
16983
|
+
*/
|
|
16984
|
+
filter;
|
|
16985
|
+
sort;
|
|
16875
16986
|
/**
|
|
16876
16987
|
* ### 初始化一个请求类
|
|
16877
16988
|
* @param FilterClass 如传入 `filter` 的类 将自动初始化一个空 `filter`
|
|
16878
16989
|
*/
|
|
16879
16990
|
constructor(FilterClass) {
|
|
16880
16991
|
super();
|
|
16881
|
-
/**
|
|
16882
|
-
* ### 查询信息
|
|
16883
|
-
*/
|
|
16884
|
-
__publicField(this, "filter");
|
|
16885
|
-
__publicField(this, "sort");
|
|
16886
16992
|
try {
|
|
16887
16993
|
this.filter = new FilterClass();
|
|
16888
16994
|
} catch (e) {
|
|
@@ -16910,10 +17016,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
16910
17016
|
return result;
|
|
16911
17017
|
};
|
|
16912
17018
|
class QueryRequestPage extends QueryRequest {
|
|
16913
|
-
|
|
16914
|
-
super(...arguments);
|
|
16915
|
-
__publicField(this, "page", new QueryPage());
|
|
16916
|
-
}
|
|
17019
|
+
page = new QueryPage();
|
|
16917
17020
|
}
|
|
16918
17021
|
__decorateClass$1([
|
|
16919
17022
|
Type(QueryPage)
|
|
@@ -17157,7 +17260,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
17157
17260
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
17158
17261
|
createTextVNode(" 选择 ")
|
|
17159
17262
|
])),
|
|
17160
|
-
_: 2
|
|
17263
|
+
_: 2,
|
|
17264
|
+
__: [2]
|
|
17161
17265
|
}, 1032, ["disabled", "onClick"])
|
|
17162
17266
|
]),
|
|
17163
17267
|
key: "0"
|
|
@@ -17323,12 +17427,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
17323
17427
|
const key = props.column.key;
|
|
17324
17428
|
const value = computed(() => props.data[key]);
|
|
17325
17429
|
return (_ctx, _cache) => {
|
|
17326
|
-
var _a;
|
|
17327
17430
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
17328
17431
|
_ctx.column.color ? (openBlock(), createElementBlock("span", {
|
|
17329
17432
|
key: 0,
|
|
17330
17433
|
style: normalizeStyle({
|
|
17331
|
-
backgroundColor:
|
|
17434
|
+
backgroundColor: _ctx.dictionary.get(value.value)?.color || unref(WebColor).NORMAL
|
|
17332
17435
|
}),
|
|
17333
17436
|
class: "light"
|
|
17334
17437
|
}, null, 4)) : createCommentVNode("", true),
|
|
@@ -17924,7 +18027,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17924
18027
|
const airTableRef = ref();
|
|
17925
18028
|
const tableId = `table_${Math.random()}`;
|
|
17926
18029
|
const hook = props.useHook;
|
|
17927
|
-
const ServiceClass = props.service ||
|
|
18030
|
+
const ServiceClass = props.service || hook?.serviceClass;
|
|
17928
18031
|
let EntityClass;
|
|
17929
18032
|
if (ServiceClass) {
|
|
17930
18033
|
EntityClass = Transformer.newInstance(ServiceClass).entityClass;
|
|
@@ -17966,12 +18069,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17966
18069
|
modelConfig
|
|
17967
18070
|
});
|
|
17968
18071
|
function selectRow(list) {
|
|
17969
|
-
var _a, _b;
|
|
17970
18072
|
for (const row of list) {
|
|
17971
|
-
|
|
18073
|
+
airTableRef.value?.toggleRowSelection(row, false);
|
|
17972
18074
|
for (const selectedRow of selectListRef.value) {
|
|
17973
18075
|
if (selectedRow.id === row.id) {
|
|
17974
|
-
|
|
18076
|
+
airTableRef.value?.toggleRowSelection(row, true);
|
|
17975
18077
|
}
|
|
17976
18078
|
}
|
|
17977
18079
|
if (row.children && row.children.length > 0) {
|
|
@@ -18126,7 +18228,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18126
18228
|
nextTick(() => {
|
|
18127
18229
|
toggleSelection();
|
|
18128
18230
|
const table = document.getElementById(tableId);
|
|
18129
|
-
const bodyWrap = table
|
|
18231
|
+
const bodyWrap = table?.querySelector(".el-scrollbar__wrap");
|
|
18130
18232
|
bodyWrap.scrollTop = 0;
|
|
18131
18233
|
});
|
|
18132
18234
|
}
|
|
@@ -18159,7 +18261,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18159
18261
|
if (props.onAddRow) {
|
|
18160
18262
|
props.onAddRow(row);
|
|
18161
18263
|
} else if (props.isTree) {
|
|
18162
|
-
hook
|
|
18264
|
+
hook?.onAddRow(row);
|
|
18163
18265
|
}
|
|
18164
18266
|
}
|
|
18165
18267
|
function handleEdit(row) {
|
|
@@ -18335,20 +18437,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18335
18437
|
onChange: _cache[2] || (_cache[2] = ($event) => onSearch()),
|
|
18336
18438
|
onClear: ($event) => searchFilter.value[item.key] = void 0
|
|
18337
18439
|
}, {
|
|
18338
|
-
default: withCtx(() =>
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
}), 256))
|
|
18350
|
-
];
|
|
18351
|
-
}),
|
|
18440
|
+
default: withCtx(() => [
|
|
18441
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDictionary)(unref(EntityClass), item.key)?.toArray(), (enumItem) => {
|
|
18442
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
18443
|
+
!enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
|
|
18444
|
+
key: enumItem.key.toString(),
|
|
18445
|
+
label: enumItem.label,
|
|
18446
|
+
value: enumItem.key
|
|
18447
|
+
}, null, 8, ["label", "value"])) : createCommentVNode("", true)
|
|
18448
|
+
], 64);
|
|
18449
|
+
}), 256))
|
|
18450
|
+
]),
|
|
18352
18451
|
_: 2
|
|
18353
18452
|
}, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
|
|
18354
18453
|
key: 1,
|
|
@@ -18715,10 +18814,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
18715
18814
|
emits("changed", currentData.value);
|
|
18716
18815
|
}
|
|
18717
18816
|
function filterNode(value, node) {
|
|
18718
|
-
var _a;
|
|
18719
18817
|
if (!value)
|
|
18720
18818
|
return true;
|
|
18721
|
-
return
|
|
18819
|
+
return node.name?.indexOf(value) !== -1;
|
|
18722
18820
|
}
|
|
18723
18821
|
return (_ctx, _cache) => {
|
|
18724
18822
|
const _component_el_input = resolveComponent("el-input");
|
|
@@ -18897,11 +18995,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18897
18995
|
});
|
|
18898
18996
|
const User = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-245c0051"]]);
|
|
18899
18997
|
class WebEnum extends Enum {
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
__publicField(this, "color");
|
|
18903
|
-
__publicField(this, "disabled");
|
|
18904
|
-
}
|
|
18998
|
+
color;
|
|
18999
|
+
disabled;
|
|
18905
19000
|
/**
|
|
18906
19001
|
* ### 设置颜色
|
|
18907
19002
|
*/
|
|
@@ -18917,17 +19012,16 @@ class WebEnum extends Enum {
|
|
|
18917
19012
|
return this;
|
|
18918
19013
|
}
|
|
18919
19014
|
}
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
|
|
18928
|
-
|
|
18929
|
-
|
|
18930
|
-
let DisableEnum = _DisableEnum;
|
|
19015
|
+
class DisableEnum extends WebEnum {
|
|
19016
|
+
/**
|
|
19017
|
+
* ### 禁用
|
|
19018
|
+
*/
|
|
19019
|
+
static DISABLED = new DisableEnum(true, "禁用").setColor(WebColor.DANGER);
|
|
19020
|
+
/**
|
|
19021
|
+
* ### 启用
|
|
19022
|
+
*/
|
|
19023
|
+
static ENABLE = new DisableEnum(false, "启用").setColor(WebColor.SUCCESS);
|
|
19024
|
+
}
|
|
18931
19025
|
function useDetail(props, ServiceClass, option = {}) {
|
|
18932
19026
|
const isLoading = ref(false);
|
|
18933
19027
|
const service = Transformer.newInstance(ServiceClass);
|
|
@@ -18957,33 +19051,31 @@ function useDetail(props, ServiceClass, option = {}) {
|
|
|
18957
19051
|
};
|
|
18958
19052
|
}
|
|
18959
19053
|
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
|
-
}
|
|
19054
|
+
/**
|
|
19055
|
+
* ### 错误提醒
|
|
19056
|
+
* 请通过 `.show()` 传入
|
|
19057
|
+
*/
|
|
19058
|
+
message;
|
|
19059
|
+
/**
|
|
19060
|
+
* ### 触发方式
|
|
19061
|
+
* 不建议直接设置哦~ (默认blur)
|
|
19062
|
+
*/
|
|
19063
|
+
trigger = "change";
|
|
19064
|
+
/**
|
|
19065
|
+
* ### 类型
|
|
19066
|
+
* 可通过 `toString` `toNumber` `toArray` 设置 (默认`string`)
|
|
19067
|
+
*/
|
|
19068
|
+
type;
|
|
19069
|
+
/**
|
|
19070
|
+
* ### 是否必填
|
|
19071
|
+
* 可以调用 `.ifEmpty()`
|
|
19072
|
+
*/
|
|
19073
|
+
required = false;
|
|
19074
|
+
/**
|
|
19075
|
+
* ### 自定义验证器
|
|
19076
|
+
* 请调用 `.setCustomValidator()`
|
|
19077
|
+
*/
|
|
19078
|
+
validator;
|
|
18987
19079
|
/**
|
|
18988
19080
|
* ### 通过指定错误信息来创建一个验证器
|
|
18989
19081
|
* @param message `可选` 验证失败的提示
|
|
@@ -19511,8 +19603,7 @@ function useEditor(props, ServiceClass, option = {}) {
|
|
|
19511
19603
|
watch(
|
|
19512
19604
|
result.formData,
|
|
19513
19605
|
() => {
|
|
19514
|
-
|
|
19515
|
-
(_a = formRef.value) == null ? void 0 : _a.validate();
|
|
19606
|
+
formRef.value?.validate();
|
|
19516
19607
|
},
|
|
19517
19608
|
{
|
|
19518
19609
|
deep: true,
|
|
@@ -19590,24 +19681,24 @@ function useTableTree(serviceClass, option = {}) {
|
|
|
19590
19681
|
}
|
|
19591
19682
|
class RootModel extends Transformer {
|
|
19592
19683
|
}
|
|
19593
|
-
var
|
|
19684
|
+
var __defProp = Object.defineProperty;
|
|
19594
19685
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
19595
19686
|
var result = void 0;
|
|
19596
19687
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19597
19688
|
if (decorator = decorators[i])
|
|
19598
19689
|
result = decorator(target, key, result) || result;
|
|
19599
|
-
if (result)
|
|
19690
|
+
if (result) __defProp(target, key, result);
|
|
19600
19691
|
return result;
|
|
19601
19692
|
};
|
|
19602
19693
|
class RootEntity extends RootModel {
|
|
19694
|
+
id;
|
|
19695
|
+
isDisabled;
|
|
19603
19696
|
/**
|
|
19604
19697
|
* ### 实例化一个实体
|
|
19605
19698
|
* @param id `可选` 主键 `ID`
|
|
19606
19699
|
*/
|
|
19607
19700
|
constructor(id) {
|
|
19608
19701
|
super();
|
|
19609
|
-
__publicField(this, "id");
|
|
19610
|
-
__publicField(this, "isDisabled");
|
|
19611
19702
|
if (id) {
|
|
19612
19703
|
this.id = id;
|
|
19613
19704
|
}
|
|
@@ -19639,6 +19730,18 @@ __decorateClass([
|
|
|
19639
19730
|
})
|
|
19640
19731
|
], RootEntity.prototype, "isDisabled");
|
|
19641
19732
|
class RouterUtil {
|
|
19733
|
+
/**
|
|
19734
|
+
* ### 当前路由
|
|
19735
|
+
*/
|
|
19736
|
+
static router;
|
|
19737
|
+
/**
|
|
19738
|
+
* ### 私有构造器
|
|
19739
|
+
*/
|
|
19740
|
+
static components = {};
|
|
19741
|
+
/**
|
|
19742
|
+
* ### 组件目录
|
|
19743
|
+
*/
|
|
19744
|
+
static componentsDirectory = "";
|
|
19642
19745
|
/**
|
|
19643
19746
|
* ### 将 `IMenu` 菜单列表初始化到 `Vue` 路由中
|
|
19644
19747
|
* @param menuList 菜单列表
|
|
@@ -19741,27 +19844,12 @@ class RouterUtil {
|
|
|
19741
19844
|
}
|
|
19742
19845
|
}
|
|
19743
19846
|
}
|
|
19744
|
-
/**
|
|
19745
|
-
* ### 当前路由
|
|
19746
|
-
*/
|
|
19747
|
-
__publicField(RouterUtil, "router");
|
|
19748
|
-
/**
|
|
19749
|
-
* ### 私有构造器
|
|
19750
|
-
*/
|
|
19751
|
-
__publicField(RouterUtil, "components", {});
|
|
19752
|
-
/**
|
|
19753
|
-
* ### 组件目录
|
|
19754
|
-
*/
|
|
19755
|
-
__publicField(RouterUtil, "componentsDirectory", "");
|
|
19756
19847
|
class AbstractService extends Transformer {
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
*/
|
|
19763
|
-
__publicField(this, "loading");
|
|
19764
|
-
}
|
|
19848
|
+
/**
|
|
19849
|
+
* ### `Loading`
|
|
19850
|
+
* 你可以将这个传入的对象绑定到你需要 `Loading` 的 `DOM` 上
|
|
19851
|
+
*/
|
|
19852
|
+
loading;
|
|
19765
19853
|
/**
|
|
19766
19854
|
* ### 静态创建一个 `API` 服务实例
|
|
19767
19855
|
* @param loading `可选` Loading
|
|
@@ -19796,45 +19884,42 @@ class AbstractService extends Transformer {
|
|
|
19796
19884
|
}
|
|
19797
19885
|
}
|
|
19798
19886
|
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
|
-
}
|
|
19887
|
+
/**
|
|
19888
|
+
* ### 分页查询默认 `URL`
|
|
19889
|
+
*/
|
|
19890
|
+
urlGetPage = "getPage";
|
|
19891
|
+
/**
|
|
19892
|
+
* ### 不分页查询默认 `URL`
|
|
19893
|
+
*/
|
|
19894
|
+
urlGetList = "getList";
|
|
19895
|
+
/**
|
|
19896
|
+
* ### 不分页树查询默认 `URL`
|
|
19897
|
+
*/
|
|
19898
|
+
urlGetTreeList = "getTreeList";
|
|
19899
|
+
/**
|
|
19900
|
+
* ### 查询详情默认 `URL`
|
|
19901
|
+
*/
|
|
19902
|
+
urlGetDetail = "getDetail";
|
|
19903
|
+
/**
|
|
19904
|
+
* ### 添加默认 `URL`
|
|
19905
|
+
*/
|
|
19906
|
+
urlAdd = "add";
|
|
19907
|
+
/**
|
|
19908
|
+
* ### 启用默认 `URL`
|
|
19909
|
+
*/
|
|
19910
|
+
urlEnable = "enable";
|
|
19911
|
+
/**
|
|
19912
|
+
* ### 禁用默认 `URL`
|
|
19913
|
+
*/
|
|
19914
|
+
urlDisable = "disable";
|
|
19915
|
+
/**
|
|
19916
|
+
* ### 修改默认 `URL`
|
|
19917
|
+
*/
|
|
19918
|
+
urlUpdate = "update";
|
|
19919
|
+
/**
|
|
19920
|
+
* ### 删除默认 `URL`
|
|
19921
|
+
*/
|
|
19922
|
+
urlDelete = "delete";
|
|
19838
19923
|
/**
|
|
19839
19924
|
* ### 创建验证器
|
|
19840
19925
|
* @param moreRule `可选` 更多的验证规则
|