@fmdeui/fmui 1.0.9 → 1.0.11
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/es/components/svgIcon/index.d.ts +7 -26
- package/es/hooks/index.d.ts +0 -26
- package/es/hooks/other.d.ts +0 -8
- package/es/index.d.ts +30 -0
- package/es/index.mjs +8 -5
- package/es/make-installer.mjs +8 -3
- package/es/packages/components/index.mjs +10 -0
- package/es/packages/components/svgIcon/index.mjs +17 -0
- package/es/packages/components/svgIcon/svgicon.vue.mjs +5 -0
- package/es/packages/components/svgIcon/svgicon.vue2.mjs +94 -0
- package/es/packages/hooks/index.mjs +0 -5
- package/es/packages/hooks/other.mjs +137 -0
- package/es/packages/utils/index.mjs +0 -3
- package/es/utils/index.d.ts +0 -4
- package/index.js +752 -497
- package/index.min.js +4 -4
- package/index.min.mjs +4 -4
- package/index.mjs +732 -499
- package/lib/components/svgIcon/index.d.ts +7 -26
- package/lib/hooks/index.d.ts +0 -26
- package/lib/hooks/other.d.ts +0 -8
- package/lib/index.d.ts +30 -0
- package/lib/index.js +30 -23
- package/lib/make-installer.js +9 -4
- package/lib/packages/components/index.js +25 -0
- package/lib/packages/components/svgIcon/index.js +38 -0
- package/lib/packages/components/svgIcon/svgicon.vue.js +9 -0
- package/lib/packages/components/svgIcon/svgicon.vue2.js +98 -0
- package/lib/packages/hooks/index.js +1 -4
- package/lib/packages/hooks/other.js +149 -0
- package/lib/packages/utils/index.js +0 -5
- package/lib/utils/index.d.ts +0 -4
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/es/components/svgIcon/{index.vue.d.ts → svgicon.vue.d.ts} +0 -0
- /package/{lib → es}/defaults.css +0 -0
- /package/lib/components/svgIcon/{index.vue.d.ts → svgicon.vue.d.ts} +0 -0
- /package/{es/make-installer.css → lib/version.css} +0 -0
package/index.js
CHANGED
|
@@ -1,48 +1,30 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.11 */
|
|
2
2
|
(function (global, factory) {
|
|
3
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('pinia'), require('
|
|
4
|
-
typeof define === 'function' && define.amd ? define(['exports', 'pinia', '
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fmdeuifmui = {}, global.Pinia, global.
|
|
6
|
-
})(this, (function (exports, pinia$1,
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('pinia'), require('crypto-js'), require('xlsx-js-style'), require('element-plus'), require('vue'), require('@element-plus/icons-vue'), require('axios'), require('js-cookie'), require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('vue-i18n'), require('exceljs'), require('lodash-es'), require('@vueuse/core'), require('mitt'), require('vue-router'), require('nprogress')) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports', 'pinia', 'crypto-js', 'xlsx-js-style', 'element-plus', 'vue', '@element-plus/icons-vue', 'axios', 'js-cookie', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'vue-i18n', 'exceljs', 'lodash-es', '@vueuse/core', 'mitt', 'vue-router', 'nprogress'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fmdeuifmui = {}, global.Pinia, global.CryptoJS, global.XLSX, global.ElementPlus, global.Vue, global.ElementPlusIconsVue, global.axios, global.Cookies, global.VxeUITable, global.VxeUIPluginRenderElement, global.VxeUIPluginExportXLSX, global.VxeUIExport, global.vueI18n, global.ExcelJS, global._, global.VueUse, global.mitt, global.vueRouter, global.NProgress));
|
|
6
|
+
})(this, (function (exports, pinia$1, CryptoJS, XLSXS, elementPlus, vue, svg, axios, Cookies, VxeUITable, VxeUIPluginRenderElement, VxeUIPluginExportXLSX, VxeUI, vueI18n, ExcelJS, lodashEs, core, mitt, vueRouter, NProgress) { 'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
9
24
|
|
|
10
|
-
|
|
25
|
+
var svg__namespace = /*#__PURE__*/_interopNamespaceDefault(svg);
|
|
11
26
|
|
|
12
|
-
const
|
|
13
|
-
// 调整为从本地引入,注释下面的 url
|
|
14
|
-
// '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
|
|
15
|
-
// '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
|
|
16
|
-
];
|
|
17
|
-
const jsCdnUrlList = [];
|
|
18
|
-
function setCssCdn() {
|
|
19
|
-
if (cssCdnUrlList.length <= 0) return false;
|
|
20
|
-
cssCdnUrlList.map((v) => {
|
|
21
|
-
let link = document.createElement("link");
|
|
22
|
-
link.rel = "stylesheet";
|
|
23
|
-
link.href = v;
|
|
24
|
-
link.crossOrigin = "anonymous";
|
|
25
|
-
document.getElementsByTagName("head")[0].appendChild(link);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function setJsCdn() {
|
|
29
|
-
if (jsCdnUrlList.length <= 0) return false;
|
|
30
|
-
jsCdnUrlList.map((v) => {
|
|
31
|
-
let link = document.createElement("script");
|
|
32
|
-
link.src = v;
|
|
33
|
-
document.body.appendChild(link);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
const setIntroduction = {
|
|
37
|
-
// 设置css
|
|
38
|
-
cssCdn: () => {
|
|
39
|
-
setCssCdn();
|
|
40
|
-
},
|
|
41
|
-
// 设置js
|
|
42
|
-
jsCdn: () => {
|
|
43
|
-
setJsCdn();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
27
|
+
const pinia = pinia$1.createPinia();
|
|
46
28
|
|
|
47
29
|
function judgementSameArr(newArr, oldArr) {
|
|
48
30
|
const news = removeDuplicate(newArr);
|
|
@@ -18365,25 +18347,7 @@
|
|
|
18365
18347
|
app.use(VxeUITable);
|
|
18366
18348
|
};
|
|
18367
18349
|
|
|
18368
|
-
|
|
18369
|
-
const install = (app) => {
|
|
18370
|
-
components.forEach(
|
|
18371
|
-
(component) => {
|
|
18372
|
-
if (!app._context.components[component.name]) {
|
|
18373
|
-
app.component(component.name, component);
|
|
18374
|
-
}
|
|
18375
|
-
}
|
|
18376
|
-
);
|
|
18377
|
-
app.use(pinia);
|
|
18378
|
-
directive(app);
|
|
18379
|
-
app.use(setupVXETable);
|
|
18380
|
-
};
|
|
18381
|
-
return {
|
|
18382
|
-
install
|
|
18383
|
-
};
|
|
18384
|
-
};
|
|
18385
|
-
|
|
18386
|
-
var _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
18350
|
+
var _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
18387
18351
|
...{
|
|
18388
18352
|
name: "FButton"
|
|
18389
18353
|
},
|
|
@@ -18453,7 +18417,32 @@
|
|
|
18453
18417
|
}
|
|
18454
18418
|
});
|
|
18455
18419
|
|
|
18456
|
-
const FButton = _sfc_main$
|
|
18420
|
+
const FButton = _sfc_main$e;
|
|
18421
|
+
|
|
18422
|
+
const buildTranslator = (locale) => (path, option) => translate(path, option, vue.unref(locale));
|
|
18423
|
+
const translate = (path, option, locale) => lodashEs.get(locale, path, path).replace(
|
|
18424
|
+
/\{(\w+)\}/g,
|
|
18425
|
+
(_, key) => {
|
|
18426
|
+
var _a;
|
|
18427
|
+
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
18428
|
+
}
|
|
18429
|
+
);
|
|
18430
|
+
const buildLocaleContext = (locale) => {
|
|
18431
|
+
const lang = vue.computed(() => vue.unref(locale).name);
|
|
18432
|
+
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale);
|
|
18433
|
+
return {
|
|
18434
|
+
lang,
|
|
18435
|
+
locale: localeRef,
|
|
18436
|
+
t: buildTranslator(locale)
|
|
18437
|
+
};
|
|
18438
|
+
};
|
|
18439
|
+
const useLocale = (localeOverrides) => {
|
|
18440
|
+
const locale = localeOverrides || vue.inject(elementPlus.localeContextKey, vue.ref());
|
|
18441
|
+
return buildLocaleContext(vue.computed(() => {
|
|
18442
|
+
var _a;
|
|
18443
|
+
return ((_a = locale == null ? void 0 : locale.value) == null ? void 0 : _a.plus) ? locale.value : plusZhCn;
|
|
18444
|
+
}));
|
|
18445
|
+
};
|
|
18457
18446
|
|
|
18458
18447
|
const useKeepALiveNames = pinia$1.defineStore("keepALiveNames", {
|
|
18459
18448
|
state: () => ({
|
|
@@ -18532,282 +18521,86 @@
|
|
|
18532
18521
|
}
|
|
18533
18522
|
});
|
|
18534
18523
|
|
|
18535
|
-
|
|
18536
|
-
|
|
18537
|
-
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
|
|
18541
|
-
|
|
18542
|
-
|
|
18543
|
-
|
|
18544
|
-
|
|
18545
|
-
};
|
|
18546
|
-
const dateFormatYMDHMS = (row, column, cellValue) => {
|
|
18547
|
-
if (!cellValue) return "-";
|
|
18548
|
-
return formatDate(new Date(cellValue), "YYYY-mm-dd HH:MM:SS");
|
|
18549
|
-
};
|
|
18550
|
-
const dateFormatHMS = (row, column, cellValue) => {
|
|
18551
|
-
if (!cellValue) return "-";
|
|
18552
|
-
let time = 0;
|
|
18553
|
-
if (typeof row === "number") time = row;
|
|
18554
|
-
if (typeof cellValue === "number") time = cellValue;
|
|
18555
|
-
return formatDate(new Date(time * 1e3), "HH:MM:SS");
|
|
18556
|
-
};
|
|
18557
|
-
const scaleFormat = (value = "0", scale = 4) => {
|
|
18558
|
-
return Number.parseFloat(value).toFixed(scale);
|
|
18559
|
-
};
|
|
18560
|
-
const scale2Format = (value = "0") => {
|
|
18561
|
-
return Number.parseFloat(value).toFixed(2);
|
|
18562
|
-
};
|
|
18563
|
-
const groupSeparator = (value, minimumFractionDigits = 2) => {
|
|
18564
|
-
return value.toLocaleString("en-US", {
|
|
18565
|
-
minimumFractionDigits,
|
|
18566
|
-
maximumFractionDigits: 2
|
|
18524
|
+
function auth(value) {
|
|
18525
|
+
const stores = useUserInfo();
|
|
18526
|
+
return stores.userInfos.authApiList.some((v) => v === value);
|
|
18527
|
+
}
|
|
18528
|
+
function auths(value) {
|
|
18529
|
+
let flag = false;
|
|
18530
|
+
const stores = useUserInfo();
|
|
18531
|
+
stores.userInfos.authApiList.map((val) => {
|
|
18532
|
+
value.map((v) => {
|
|
18533
|
+
if (val === v) flag = true;
|
|
18567
18534
|
});
|
|
18568
|
-
};
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18535
|
+
});
|
|
18536
|
+
return flag;
|
|
18537
|
+
}
|
|
18538
|
+
function authAll(value) {
|
|
18539
|
+
const stores = useUserInfo();
|
|
18540
|
+
return judgementSameArr(value, stores.userInfos.authApiList);
|
|
18541
|
+
}
|
|
18542
|
+
function hAuth(el, value) {
|
|
18543
|
+
return vue.withDirectives(el, [[vue.resolveDirective("auth"), value]]);
|
|
18544
|
+
}
|
|
18545
|
+
function hAuths(el, value) {
|
|
18546
|
+
return vue.withDirectives(el, [[vue.resolveDirective("auths"), value]]);
|
|
18547
|
+
}
|
|
18548
|
+
function hAuthAll(el, value) {
|
|
18549
|
+
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
18550
|
+
}
|
|
18551
|
+
|
|
18552
|
+
const vxeSize = useThemeConfig().themeConfig.globalComponentSize == "small" ? "mini" : useThemeConfig().themeConfig.globalComponentSize == "default" ? "small" : "medium";
|
|
18553
|
+
const useVxeTable = (opt, extras) => {
|
|
18554
|
+
const userStore = useUserInfo();
|
|
18555
|
+
const processColumns = (columns) => {
|
|
18556
|
+
columns.forEach((col) => {
|
|
18557
|
+
var _a;
|
|
18558
|
+
if ((_a = col.dictExportConfig) == null ? void 0 : _a.code) {
|
|
18559
|
+
if (!col.exportMethod) {
|
|
18560
|
+
col.exportMethod = ({ row }) => {
|
|
18561
|
+
var _a2, _b;
|
|
18562
|
+
const val = row[col.field];
|
|
18563
|
+
if (val === null || val === void 0 || val === "") return "";
|
|
18564
|
+
if ((_a2 = col.dictExportConfig) == null ? void 0 : _a2.multiple) {
|
|
18565
|
+
const values = String(val).split(",");
|
|
18566
|
+
return values.map((v) => {
|
|
18567
|
+
var _a3;
|
|
18568
|
+
return ((_a3 = userStore.getDictItemByValue(col.dictExportConfig.code, v.trim())) == null ? void 0 : _a3.label) || v;
|
|
18569
|
+
}).join(", ");
|
|
18570
|
+
}
|
|
18571
|
+
return ((_b = userStore.getDictItemByValue(col.dictExportConfig.code, String(val))) == null ? void 0 : _b.label) || val;
|
|
18572
|
+
};
|
|
18579
18573
|
}
|
|
18580
|
-
}
|
|
18581
|
-
|
|
18582
|
-
|
|
18574
|
+
}
|
|
18575
|
+
if (col.children) {
|
|
18576
|
+
processColumns(col.children);
|
|
18583
18577
|
}
|
|
18584
18578
|
});
|
|
18585
18579
|
};
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
} catch (e) {
|
|
18611
|
-
elementPlus.ElMessage.error("\u83B7\u53D6\u5931\u8D25");
|
|
18612
|
-
}
|
|
18613
|
-
};
|
|
18614
|
-
const handleConditionalClear = (condition, fieldValue, clearValue = void 0) => {
|
|
18615
|
-
if (condition) {
|
|
18616
|
-
return clearValue;
|
|
18617
|
-
}
|
|
18618
|
-
return fieldValue;
|
|
18619
|
-
};
|
|
18620
|
-
const getTimeRangePickerShortcuts = () => {
|
|
18621
|
-
return [
|
|
18622
|
-
{
|
|
18623
|
-
text: "\u8FD1\u4E00\u5468",
|
|
18624
|
-
value: () => {
|
|
18625
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18626
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18627
|
-
const start = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
|
|
18628
|
-
return [start, end];
|
|
18629
|
-
}
|
|
18630
|
-
},
|
|
18631
|
-
{
|
|
18632
|
-
text: "\u8FD1\u4E00\u6708",
|
|
18633
|
-
value: () => {
|
|
18634
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18635
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18636
|
-
const start = new Date(now.getFullYear(), now.getMonth() - 1, now.getDate());
|
|
18637
|
-
return [start, end];
|
|
18638
|
-
}
|
|
18639
|
-
},
|
|
18640
|
-
{
|
|
18641
|
-
text: "\u8FD1\u4E09\u6708",
|
|
18642
|
-
value: () => {
|
|
18643
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18644
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18645
|
-
const start = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate());
|
|
18646
|
-
return [start, end];
|
|
18647
|
-
}
|
|
18648
|
-
},
|
|
18649
|
-
{
|
|
18650
|
-
text: "\u8FD1\u534A\u5E74",
|
|
18651
|
-
value: () => {
|
|
18652
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18653
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18654
|
-
const start = new Date(now.getFullYear(), now.getMonth() - 6, now.getDate());
|
|
18655
|
-
return [start, end];
|
|
18656
|
-
}
|
|
18657
|
-
},
|
|
18658
|
-
{
|
|
18659
|
-
text: "\u672C\u5E74",
|
|
18660
|
-
value: () => {
|
|
18661
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18662
|
-
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
18663
|
-
const start = new Date(now.getFullYear(), 0, 1);
|
|
18664
|
-
return [start, end];
|
|
18665
|
-
}
|
|
18666
|
-
},
|
|
18667
|
-
{
|
|
18668
|
-
text: "\u8FD1\u4E24\u5E74",
|
|
18669
|
-
value: () => {
|
|
18670
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18671
|
-
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
18672
|
-
const start = new Date(now.getFullYear() - 1, 0, 1);
|
|
18673
|
-
return [start, end];
|
|
18674
|
-
}
|
|
18675
|
-
},
|
|
18676
|
-
{
|
|
18677
|
-
text: "\u8FD1\u4E09\u5E74",
|
|
18678
|
-
value: () => {
|
|
18679
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18680
|
-
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
18681
|
-
const start = new Date(now.getFullYear() - 2, 0, 1);
|
|
18682
|
-
return [start, end];
|
|
18683
|
-
}
|
|
18684
|
-
}
|
|
18685
|
-
];
|
|
18686
|
-
};
|
|
18687
|
-
return {
|
|
18688
|
-
percentFormat,
|
|
18689
|
-
dateFormatYMD,
|
|
18690
|
-
dateFormatYMDHMS,
|
|
18691
|
-
dateFormatHMS,
|
|
18692
|
-
scaleFormat,
|
|
18693
|
-
scale2Format,
|
|
18694
|
-
groupSeparator,
|
|
18695
|
-
copyText,
|
|
18696
|
-
removeHtmlSub,
|
|
18697
|
-
removeHtml,
|
|
18698
|
-
getEnumDesc,
|
|
18699
|
-
appendQueryParams,
|
|
18700
|
-
getNameAbbr,
|
|
18701
|
-
handleConditionalClear,
|
|
18702
|
-
getTimeRangePickerShortcuts
|
|
18703
|
-
};
|
|
18704
|
-
}
|
|
18705
|
-
|
|
18706
|
-
const buildTranslator = (locale) => (path, option) => translate(path, option, vue.unref(locale));
|
|
18707
|
-
const translate = (path, option, locale) => lodashEs.get(locale, path, path).replace(
|
|
18708
|
-
/\{(\w+)\}/g,
|
|
18709
|
-
(_, key) => {
|
|
18710
|
-
var _a;
|
|
18711
|
-
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
18712
|
-
}
|
|
18713
|
-
);
|
|
18714
|
-
const buildLocaleContext = (locale) => {
|
|
18715
|
-
const lang = vue.computed(() => vue.unref(locale).name);
|
|
18716
|
-
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale);
|
|
18717
|
-
return {
|
|
18718
|
-
lang,
|
|
18719
|
-
locale: localeRef,
|
|
18720
|
-
t: buildTranslator(locale)
|
|
18721
|
-
};
|
|
18722
|
-
};
|
|
18723
|
-
const useLocale = (localeOverrides) => {
|
|
18724
|
-
const locale = localeOverrides || vue.inject(elementPlus.localeContextKey, vue.ref());
|
|
18725
|
-
return buildLocaleContext(vue.computed(() => {
|
|
18726
|
-
var _a;
|
|
18727
|
-
return ((_a = locale == null ? void 0 : locale.value) == null ? void 0 : _a.plus) ? locale.value : plusZhCn;
|
|
18728
|
-
}));
|
|
18729
|
-
};
|
|
18730
|
-
|
|
18731
|
-
function auth(value) {
|
|
18732
|
-
const stores = useUserInfo();
|
|
18733
|
-
return stores.userInfos.authApiList.some((v) => v === value);
|
|
18734
|
-
}
|
|
18735
|
-
function auths(value) {
|
|
18736
|
-
let flag = false;
|
|
18737
|
-
const stores = useUserInfo();
|
|
18738
|
-
stores.userInfos.authApiList.map((val) => {
|
|
18739
|
-
value.map((v) => {
|
|
18740
|
-
if (val === v) flag = true;
|
|
18741
|
-
});
|
|
18742
|
-
});
|
|
18743
|
-
return flag;
|
|
18744
|
-
}
|
|
18745
|
-
function authAll(value) {
|
|
18746
|
-
const stores = useUserInfo();
|
|
18747
|
-
return judgementSameArr(value, stores.userInfos.authApiList);
|
|
18748
|
-
}
|
|
18749
|
-
function hAuth(el, value) {
|
|
18750
|
-
return vue.withDirectives(el, [[vue.resolveDirective("auth"), value]]);
|
|
18751
|
-
}
|
|
18752
|
-
function hAuths(el, value) {
|
|
18753
|
-
return vue.withDirectives(el, [[vue.resolveDirective("auths"), value]]);
|
|
18754
|
-
}
|
|
18755
|
-
function hAuthAll(el, value) {
|
|
18756
|
-
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
18757
|
-
}
|
|
18758
|
-
|
|
18759
|
-
const vxeSize = useThemeConfig().themeConfig.globalComponentSize == "small" ? "mini" : useThemeConfig().themeConfig.globalComponentSize == "default" ? "small" : "medium";
|
|
18760
|
-
const useVxeTable = (opt, extras) => {
|
|
18761
|
-
const userStore = useUserInfo();
|
|
18762
|
-
const processColumns = (columns) => {
|
|
18763
|
-
columns.forEach((col) => {
|
|
18764
|
-
var _a;
|
|
18765
|
-
if ((_a = col.dictExportConfig) == null ? void 0 : _a.code) {
|
|
18766
|
-
if (!col.exportMethod) {
|
|
18767
|
-
col.exportMethod = ({ row }) => {
|
|
18768
|
-
var _a2, _b;
|
|
18769
|
-
const val = row[col.field];
|
|
18770
|
-
if (val === null || val === void 0 || val === "") return "";
|
|
18771
|
-
if ((_a2 = col.dictExportConfig) == null ? void 0 : _a2.multiple) {
|
|
18772
|
-
const values = String(val).split(",");
|
|
18773
|
-
return values.map((v) => {
|
|
18774
|
-
var _a3;
|
|
18775
|
-
return ((_a3 = userStore.getDictItemByValue(col.dictExportConfig.code, v.trim())) == null ? void 0 : _a3.label) || v;
|
|
18776
|
-
}).join(", ");
|
|
18777
|
-
}
|
|
18778
|
-
return ((_b = userStore.getDictItemByValue(col.dictExportConfig.code, String(val))) == null ? void 0 : _b.label) || val;
|
|
18779
|
-
};
|
|
18780
|
-
}
|
|
18781
|
-
}
|
|
18782
|
-
if (col.children) {
|
|
18783
|
-
processColumns(col.children);
|
|
18784
|
-
}
|
|
18785
|
-
});
|
|
18786
|
-
};
|
|
18787
|
-
if (opt.columns) {
|
|
18788
|
-
processColumns(opt.columns);
|
|
18789
|
-
}
|
|
18790
|
-
opt.id = opt.id ? opt.id : opt.name;
|
|
18791
|
-
const options = vue.reactive({
|
|
18792
|
-
stripe: false,
|
|
18793
|
-
id: opt.id,
|
|
18794
|
-
height: "auto",
|
|
18795
|
-
autoResize: true,
|
|
18796
|
-
size: vxeSize,
|
|
18797
|
-
loading: false,
|
|
18798
|
-
align: "center",
|
|
18799
|
-
// 自动监听父元素的变化去重新计算表格(对于父元素可能存在动态变化、显示隐藏的容器中、列宽异常等场景中的可能会用到)
|
|
18800
|
-
// data: [] as Array<T>,
|
|
18801
|
-
columns: opt.columns,
|
|
18802
|
-
showFooter: opt.showFooter,
|
|
18803
|
-
footerData: opt.footerData,
|
|
18804
|
-
footerMethod: opt.footerMethod,
|
|
18805
|
-
toolbarConfig: {
|
|
18806
|
-
size: vxeSize,
|
|
18807
|
-
slots: { buttons: "toolbar_buttons", tools: "toolbar_tools" },
|
|
18808
|
-
refresh: true,
|
|
18809
|
-
refreshOptions: {
|
|
18810
|
-
code: "query"
|
|
18580
|
+
if (opt.columns) {
|
|
18581
|
+
processColumns(opt.columns);
|
|
18582
|
+
}
|
|
18583
|
+
opt.id = opt.id ? opt.id : opt.name;
|
|
18584
|
+
const options = vue.reactive({
|
|
18585
|
+
stripe: false,
|
|
18586
|
+
id: opt.id,
|
|
18587
|
+
height: "auto",
|
|
18588
|
+
autoResize: true,
|
|
18589
|
+
size: vxeSize,
|
|
18590
|
+
loading: false,
|
|
18591
|
+
align: "center",
|
|
18592
|
+
// 自动监听父元素的变化去重新计算表格(对于父元素可能存在动态变化、显示隐藏的容器中、列宽异常等场景中的可能会用到)
|
|
18593
|
+
// data: [] as Array<T>,
|
|
18594
|
+
columns: opt.columns,
|
|
18595
|
+
showFooter: opt.showFooter,
|
|
18596
|
+
footerData: opt.footerData,
|
|
18597
|
+
footerMethod: opt.footerMethod,
|
|
18598
|
+
toolbarConfig: {
|
|
18599
|
+
size: vxeSize,
|
|
18600
|
+
slots: { buttons: "toolbar_buttons", tools: "toolbar_tools" },
|
|
18601
|
+
refresh: true,
|
|
18602
|
+
refreshOptions: {
|
|
18603
|
+
code: "query"
|
|
18811
18604
|
},
|
|
18812
18605
|
export: true,
|
|
18813
18606
|
print: true,
|
|
@@ -19031,11 +18824,9 @@
|
|
|
19031
18824
|
];
|
|
19032
18825
|
};
|
|
19033
18826
|
|
|
19034
|
-
const
|
|
19035
|
-
|
|
19036
|
-
const _hoisted_1$6 = { key: 0 };
|
|
18827
|
+
const _hoisted_1$7 = { key: 0 };
|
|
19037
18828
|
const _hoisted_2$3 = { key: 0 };
|
|
19038
|
-
var _sfc_main$
|
|
18829
|
+
var _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
19039
18830
|
...{
|
|
19040
18831
|
name: "FInput"
|
|
19041
18832
|
},
|
|
@@ -19239,7 +19030,7 @@
|
|
|
19239
19030
|
fn: vue.withCtx(() => [
|
|
19240
19031
|
__props.inputType === "amount" ? (vue.openBlock(), vue.createElementBlock(
|
|
19241
19032
|
"span",
|
|
19242
|
-
_hoisted_1$
|
|
19033
|
+
_hoisted_1$7,
|
|
19243
19034
|
vue.toDisplayString(appendTitleText.value),
|
|
19244
19035
|
1
|
|
19245
19036
|
/* TEXT */
|
|
@@ -19285,13 +19076,13 @@
|
|
|
19285
19076
|
}
|
|
19286
19077
|
});
|
|
19287
19078
|
|
|
19288
|
-
const FInput = _sfc_main$
|
|
19079
|
+
const FInput = _sfc_main$d;
|
|
19289
19080
|
|
|
19290
|
-
const _hoisted_1$
|
|
19081
|
+
const _hoisted_1$6 = {
|
|
19291
19082
|
key: 0,
|
|
19292
19083
|
class: "back_to_top"
|
|
19293
19084
|
};
|
|
19294
|
-
var _sfc_main$
|
|
19085
|
+
var _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
19295
19086
|
...{
|
|
19296
19087
|
name: "FLayoutPage"
|
|
19297
19088
|
},
|
|
@@ -19353,7 +19144,7 @@
|
|
|
19353
19144
|
},
|
|
19354
19145
|
[
|
|
19355
19146
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
19356
|
-
__props.showGoTopButton ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
19147
|
+
__props.showGoTopButton ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
19357
19148
|
isShowGoTopButton.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
19358
19149
|
key: 0,
|
|
19359
19150
|
onClick: backToTop
|
|
@@ -19381,9 +19172,9 @@
|
|
|
19381
19172
|
}
|
|
19382
19173
|
});
|
|
19383
19174
|
|
|
19384
|
-
const FLayoutPage = _sfc_main$
|
|
19175
|
+
const FLayoutPage = _sfc_main$c;
|
|
19385
19176
|
|
|
19386
|
-
var _sfc_main$
|
|
19177
|
+
var _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
19387
19178
|
...{
|
|
19388
19179
|
name: "FLayoutPageItem"
|
|
19389
19180
|
},
|
|
@@ -19411,42 +19202,185 @@
|
|
|
19411
19202
|
}
|
|
19412
19203
|
});
|
|
19413
19204
|
|
|
19414
|
-
const FLayoutPageItem = _sfc_main$
|
|
19205
|
+
const FLayoutPageItem = _sfc_main$b;
|
|
19415
19206
|
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19207
|
+
function debounce(func, delay = 500, immediate, resultCallback) {
|
|
19208
|
+
let timer = null;
|
|
19209
|
+
let isInvoke = false;
|
|
19210
|
+
const _debounce = function(...args) {
|
|
19211
|
+
return new Promise((resolve, reject) => {
|
|
19212
|
+
if (timer) clearTimeout(timer);
|
|
19213
|
+
if (!isInvoke) {
|
|
19214
|
+
try {
|
|
19215
|
+
const result = func.apply(this, args);
|
|
19216
|
+
if (resultCallback) ;
|
|
19217
|
+
resolve(result);
|
|
19218
|
+
} catch (e) {
|
|
19219
|
+
reject(e);
|
|
19220
|
+
}
|
|
19221
|
+
isInvoke = true;
|
|
19222
|
+
} else {
|
|
19223
|
+
timer = setTimeout(() => {
|
|
19224
|
+
try {
|
|
19225
|
+
const result = func.apply(this, args);
|
|
19226
|
+
if (resultCallback) ;
|
|
19227
|
+
resolve(result);
|
|
19228
|
+
} catch (e) {
|
|
19229
|
+
reject(e);
|
|
19230
|
+
}
|
|
19231
|
+
isInvoke = false;
|
|
19232
|
+
timer = null;
|
|
19233
|
+
}, delay);
|
|
19234
|
+
}
|
|
19235
|
+
});
|
|
19236
|
+
};
|
|
19237
|
+
_debounce.cancel = function() {
|
|
19238
|
+
if (timer) clearTimeout(timer);
|
|
19239
|
+
isInvoke = false;
|
|
19240
|
+
timer = null;
|
|
19241
|
+
};
|
|
19242
|
+
return _debounce;
|
|
19243
|
+
}
|
|
19244
|
+
function toLine(name) {
|
|
19245
|
+
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
19246
|
+
}
|
|
19247
|
+
|
|
19248
|
+
const _hoisted_1$5 = ["id"];
|
|
19249
|
+
var _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
19421
19250
|
...{
|
|
19422
|
-
name: "
|
|
19251
|
+
name: "FChart"
|
|
19423
19252
|
},
|
|
19424
19253
|
__name: "index",
|
|
19425
19254
|
props: {
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
customLabel: { default: "" },
|
|
19432
|
-
optionSource: { default: () => [] },
|
|
19433
|
-
filterable: { type: Boolean, default: true },
|
|
19434
|
-
isShowPagination: { type: Boolean, default: false },
|
|
19435
|
-
paginationOption: { default: () => ({
|
|
19436
|
-
pageSize: 6,
|
|
19437
|
-
currentPage: 1,
|
|
19438
|
-
pagerCount: 5,
|
|
19439
|
-
total: 0
|
|
19440
|
-
}) },
|
|
19441
|
-
useVirtual: { type: Boolean, default: false },
|
|
19442
|
-
returnObject: { type: Boolean, default: false },
|
|
19443
|
-
isCached: { type: Boolean, default: true },
|
|
19444
|
-
isRadioEchoLabel: { type: Boolean, default: true },
|
|
19445
|
-
radioSelectValLabel: { default: "" },
|
|
19446
|
-
selectAllTxt: { default: "" }
|
|
19255
|
+
options: { default: () => ({}) },
|
|
19256
|
+
id: { default: () => Math.random().toString(36).substring(2, 8) },
|
|
19257
|
+
theme: { default: "" },
|
|
19258
|
+
isEmpty: { type: [Boolean, Function], default: false },
|
|
19259
|
+
description: { default: "\u6682\u65E0\u6570\u636E" }
|
|
19447
19260
|
},
|
|
19448
|
-
|
|
19449
|
-
|
|
19261
|
+
setup(__props, { emit: __emit }) {
|
|
19262
|
+
const { proxy } = vue.getCurrentInstance();
|
|
19263
|
+
const props = __props;
|
|
19264
|
+
const echartRef = vue.ref();
|
|
19265
|
+
const chart = vue.ref();
|
|
19266
|
+
const emits = __emit;
|
|
19267
|
+
const events = Object.entries(vue.useAttrs());
|
|
19268
|
+
const renderChart = () => {
|
|
19269
|
+
chart.value = vue.markRaw(proxy.$echarts.init(echartRef.value, props.theme));
|
|
19270
|
+
setOption(props.options);
|
|
19271
|
+
emits("chart", chart.value);
|
|
19272
|
+
events.forEach(([key, value]) => {
|
|
19273
|
+
if (key.startsWith("on") && !key.startsWith("onChart")) {
|
|
19274
|
+
const on = toLine(key).substring(3);
|
|
19275
|
+
chart.value.on(on, (...args) => emits(on, ...args));
|
|
19276
|
+
}
|
|
19277
|
+
});
|
|
19278
|
+
core.useResizeObserver(echartRef.value, resizeChart);
|
|
19279
|
+
};
|
|
19280
|
+
const resizeChart = debounce(
|
|
19281
|
+
() => {
|
|
19282
|
+
var _a;
|
|
19283
|
+
(_a = chart.value) == null ? void 0 : _a.resize();
|
|
19284
|
+
},
|
|
19285
|
+
300);
|
|
19286
|
+
const setOption = debounce(
|
|
19287
|
+
async (data) => {
|
|
19288
|
+
if (!chart.value) return;
|
|
19289
|
+
chart.value.setOption(data, true, true);
|
|
19290
|
+
await vue.nextTick();
|
|
19291
|
+
resizeChart();
|
|
19292
|
+
},
|
|
19293
|
+
300);
|
|
19294
|
+
const formatEmpty = vue.computed(() => {
|
|
19295
|
+
if (typeof props.isEmpty === "function") {
|
|
19296
|
+
return props.isEmpty(props.options);
|
|
19297
|
+
}
|
|
19298
|
+
return props.isEmpty;
|
|
19299
|
+
});
|
|
19300
|
+
vue.watch(
|
|
19301
|
+
() => props.options,
|
|
19302
|
+
async (nw) => {
|
|
19303
|
+
await vue.nextTick();
|
|
19304
|
+
setOption(nw);
|
|
19305
|
+
},
|
|
19306
|
+
{ deep: true }
|
|
19307
|
+
);
|
|
19308
|
+
vue.watch(
|
|
19309
|
+
() => props.theme,
|
|
19310
|
+
async () => {
|
|
19311
|
+
chart.value.dispose();
|
|
19312
|
+
renderChart();
|
|
19313
|
+
}
|
|
19314
|
+
);
|
|
19315
|
+
vue.onMounted(() => {
|
|
19316
|
+
renderChart();
|
|
19317
|
+
});
|
|
19318
|
+
vue.onBeforeUnmount(() => {
|
|
19319
|
+
chart.value.dispose();
|
|
19320
|
+
chart.value = null;
|
|
19321
|
+
});
|
|
19322
|
+
return (_ctx, _cache) => {
|
|
19323
|
+
const _component_el_empty = vue.resolveComponent("el-empty");
|
|
19324
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
19325
|
+
"div",
|
|
19326
|
+
vue.mergeProps({ class: "f-chart" }, _ctx.$attrs),
|
|
19327
|
+
[
|
|
19328
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
19329
|
+
class: "f-chart-container",
|
|
19330
|
+
id: __props.id,
|
|
19331
|
+
ref_key: "echartRef",
|
|
19332
|
+
ref: echartRef
|
|
19333
|
+
}, null, 8, _hoisted_1$5), [
|
|
19334
|
+
[vue.vShow, !formatEmpty.value]
|
|
19335
|
+
]),
|
|
19336
|
+
formatEmpty.value ? vue.renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
19337
|
+
vue.createVNode(_component_el_empty, vue.mergeProps(_ctx.$attrs, { description: __props.description }), null, 16, ["description"])
|
|
19338
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
19339
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
19340
|
+
],
|
|
19341
|
+
16
|
|
19342
|
+
/* FULL_PROPS */
|
|
19343
|
+
);
|
|
19344
|
+
};
|
|
19345
|
+
}
|
|
19346
|
+
});
|
|
19347
|
+
|
|
19348
|
+
const FChart = _sfc_main$a;
|
|
19349
|
+
|
|
19350
|
+
const _hoisted_1$4 = {
|
|
19351
|
+
key: 1,
|
|
19352
|
+
class: "f_select__pagination"
|
|
19353
|
+
};
|
|
19354
|
+
var _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
19355
|
+
...{
|
|
19356
|
+
name: "FSelect"
|
|
19357
|
+
},
|
|
19358
|
+
__name: "index",
|
|
19359
|
+
props: {
|
|
19360
|
+
modelValue: { default: void 0 },
|
|
19361
|
+
multiple: { type: Boolean, default: false },
|
|
19362
|
+
width: {},
|
|
19363
|
+
valueCustom: { default: "key" },
|
|
19364
|
+
labelCustom: { default: "label" },
|
|
19365
|
+
customLabel: { default: "" },
|
|
19366
|
+
optionSource: { default: () => [] },
|
|
19367
|
+
filterable: { type: Boolean, default: true },
|
|
19368
|
+
isShowPagination: { type: Boolean, default: false },
|
|
19369
|
+
paginationOption: { default: () => ({
|
|
19370
|
+
pageSize: 6,
|
|
19371
|
+
currentPage: 1,
|
|
19372
|
+
pagerCount: 5,
|
|
19373
|
+
total: 0
|
|
19374
|
+
}) },
|
|
19375
|
+
useVirtual: { type: Boolean, default: false },
|
|
19376
|
+
returnObject: { type: Boolean, default: false },
|
|
19377
|
+
isCached: { type: Boolean, default: true },
|
|
19378
|
+
isRadioEchoLabel: { type: Boolean, default: true },
|
|
19379
|
+
radioSelectValLabel: { default: "" },
|
|
19380
|
+
selectAllTxt: { default: "" }
|
|
19381
|
+
},
|
|
19382
|
+
emits: ["update:modelValue", "change", "input", "select-input"],
|
|
19383
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
19450
19384
|
const { t } = useLocale();
|
|
19451
19385
|
const props = __props;
|
|
19452
19386
|
const fselectRef = vue.ref();
|
|
@@ -22031,148 +21965,129 @@
|
|
|
22031
21965
|
|
|
22032
21966
|
const FForm = _sfc_main$1;
|
|
22033
21967
|
|
|
22034
|
-
|
|
22035
|
-
let timer = null;
|
|
22036
|
-
let isInvoke = false;
|
|
22037
|
-
const _debounce = function(...args) {
|
|
22038
|
-
return new Promise((resolve, reject) => {
|
|
22039
|
-
if (timer) clearTimeout(timer);
|
|
22040
|
-
if (!isInvoke) {
|
|
22041
|
-
try {
|
|
22042
|
-
const result = func.apply(this, args);
|
|
22043
|
-
if (resultCallback) ;
|
|
22044
|
-
resolve(result);
|
|
22045
|
-
} catch (e) {
|
|
22046
|
-
reject(e);
|
|
22047
|
-
}
|
|
22048
|
-
isInvoke = true;
|
|
22049
|
-
} else {
|
|
22050
|
-
timer = setTimeout(() => {
|
|
22051
|
-
try {
|
|
22052
|
-
const result = func.apply(this, args);
|
|
22053
|
-
if (resultCallback) ;
|
|
22054
|
-
resolve(result);
|
|
22055
|
-
} catch (e) {
|
|
22056
|
-
reject(e);
|
|
22057
|
-
}
|
|
22058
|
-
isInvoke = false;
|
|
22059
|
-
timer = null;
|
|
22060
|
-
}, delay);
|
|
22061
|
-
}
|
|
22062
|
-
});
|
|
22063
|
-
};
|
|
22064
|
-
_debounce.cancel = function() {
|
|
22065
|
-
if (timer) clearTimeout(timer);
|
|
22066
|
-
isInvoke = false;
|
|
22067
|
-
timer = null;
|
|
22068
|
-
};
|
|
22069
|
-
return _debounce;
|
|
22070
|
-
}
|
|
22071
|
-
function toLine(name) {
|
|
22072
|
-
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
22073
|
-
}
|
|
22074
|
-
|
|
22075
|
-
const _hoisted_1 = ["id"];
|
|
21968
|
+
const _hoisted_1 = ["src"];
|
|
22076
21969
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
22077
21970
|
...{
|
|
22078
|
-
name: "
|
|
21971
|
+
name: "svgIcon"
|
|
22079
21972
|
},
|
|
22080
|
-
__name: "
|
|
21973
|
+
__name: "svgicon",
|
|
22081
21974
|
props: {
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
|
|
22085
|
-
|
|
22086
|
-
|
|
21975
|
+
// svg 图标组件名字
|
|
21976
|
+
name: {
|
|
21977
|
+
type: String
|
|
21978
|
+
},
|
|
21979
|
+
// svg 大小
|
|
21980
|
+
size: {
|
|
21981
|
+
type: Number,
|
|
21982
|
+
default: () => 14
|
|
21983
|
+
},
|
|
21984
|
+
// svg 颜色
|
|
21985
|
+
color: {
|
|
21986
|
+
type: String
|
|
21987
|
+
}
|
|
22087
21988
|
},
|
|
22088
|
-
setup(__props
|
|
22089
|
-
const { proxy } = vue.getCurrentInstance();
|
|
21989
|
+
setup(__props) {
|
|
22090
21990
|
const props = __props;
|
|
22091
|
-
const
|
|
22092
|
-
const
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
const
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
|
|
22099
|
-
|
|
22100
|
-
|
|
22101
|
-
const on = toLine(key).substring(3);
|
|
22102
|
-
chart.value.on(on, (...args) => emits(on, ...args));
|
|
22103
|
-
}
|
|
22104
|
-
});
|
|
22105
|
-
core.useResizeObserver(echartRef.value, resizeChart);
|
|
22106
|
-
};
|
|
22107
|
-
const resizeChart = debounce(
|
|
22108
|
-
() => {
|
|
21991
|
+
const linesString = ["https", "http", "/src", "/assets", "data:image", window.__env__.VITE_PUBLIC_PATH];
|
|
21992
|
+
const getIconName = vue.computed(() => {
|
|
21993
|
+
return props == null ? void 0 : props.name;
|
|
21994
|
+
});
|
|
21995
|
+
const isShowIconSvg = vue.computed(() => {
|
|
21996
|
+
var _a;
|
|
21997
|
+
return (_a = props == null ? void 0 : props.name) == null ? void 0 : _a.startsWith("ele-");
|
|
21998
|
+
});
|
|
21999
|
+
const isShowIconImg = vue.computed(() => {
|
|
22000
|
+
return linesString.find((str) => {
|
|
22109
22001
|
var _a;
|
|
22110
|
-
(_a =
|
|
22111
|
-
}
|
|
22112
|
-
300);
|
|
22113
|
-
const setOption = debounce(
|
|
22114
|
-
async (data) => {
|
|
22115
|
-
if (!chart.value) return;
|
|
22116
|
-
chart.value.setOption(data, true, true);
|
|
22117
|
-
await vue.nextTick();
|
|
22118
|
-
resizeChart();
|
|
22119
|
-
},
|
|
22120
|
-
300);
|
|
22121
|
-
const formatEmpty = vue.computed(() => {
|
|
22122
|
-
if (typeof props.isEmpty === "function") {
|
|
22123
|
-
return props.isEmpty(props.options);
|
|
22124
|
-
}
|
|
22125
|
-
return props.isEmpty;
|
|
22002
|
+
return (_a = props.name) == null ? void 0 : _a.startsWith(str);
|
|
22003
|
+
});
|
|
22126
22004
|
});
|
|
22127
|
-
vue.
|
|
22128
|
-
|
|
22129
|
-
async (nw) => {
|
|
22130
|
-
await vue.nextTick();
|
|
22131
|
-
setOption(nw);
|
|
22132
|
-
},
|
|
22133
|
-
{ deep: true }
|
|
22134
|
-
);
|
|
22135
|
-
vue.watch(
|
|
22136
|
-
() => props.theme,
|
|
22137
|
-
async () => {
|
|
22138
|
-
chart.value.dispose();
|
|
22139
|
-
renderChart();
|
|
22140
|
-
}
|
|
22141
|
-
);
|
|
22142
|
-
vue.onMounted(() => {
|
|
22143
|
-
renderChart();
|
|
22005
|
+
const setIconSvgStyle = vue.computed(() => {
|
|
22006
|
+
return `font-size: ${props.size}px;color: ${props.color};`;
|
|
22144
22007
|
});
|
|
22145
|
-
vue.
|
|
22146
|
-
|
|
22147
|
-
|
|
22008
|
+
const setIconImgOutStyle = vue.computed(() => {
|
|
22009
|
+
return `width: ${props.size}px;height: ${props.size}px;display: inline-block;overflow: hidden;`;
|
|
22010
|
+
});
|
|
22011
|
+
const setIconSvgInsStyle = vue.computed(() => {
|
|
22012
|
+
const filterStyle = [];
|
|
22013
|
+
const compatibles = ["-webkit", "-ms", "-o", "-moz"];
|
|
22014
|
+
compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${props.color} ${props.size}px 0);`));
|
|
22015
|
+
return `width: ${props.size}px;height: ${props.size}px;position: relative;left: -${props.size}px;${filterStyle.join("")}`;
|
|
22148
22016
|
});
|
|
22149
22017
|
return (_ctx, _cache) => {
|
|
22150
|
-
|
|
22151
|
-
|
|
22018
|
+
return isShowIconSvg.value ? (vue.openBlock(), vue.createElementBlock(
|
|
22019
|
+
"i",
|
|
22020
|
+
{
|
|
22021
|
+
key: 0,
|
|
22022
|
+
class: "el-icon",
|
|
22023
|
+
style: vue.normalizeStyle(setIconSvgStyle.value)
|
|
22024
|
+
},
|
|
22025
|
+
[
|
|
22026
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getIconName.value)))
|
|
22027
|
+
],
|
|
22028
|
+
4
|
|
22029
|
+
/* STYLE */
|
|
22030
|
+
)) : isShowIconImg.value ? (vue.openBlock(), vue.createElementBlock(
|
|
22152
22031
|
"div",
|
|
22153
|
-
|
|
22032
|
+
{
|
|
22033
|
+
key: 1,
|
|
22034
|
+
style: vue.normalizeStyle(setIconImgOutStyle.value)
|
|
22035
|
+
},
|
|
22154
22036
|
[
|
|
22155
|
-
vue.
|
|
22156
|
-
|
|
22157
|
-
|
|
22158
|
-
|
|
22159
|
-
ref: echartRef
|
|
22160
|
-
}, null, 8, _hoisted_1), [
|
|
22161
|
-
[vue.vShow, !formatEmpty.value]
|
|
22162
|
-
]),
|
|
22163
|
-
formatEmpty.value ? vue.renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
22164
|
-
vue.createVNode(_component_el_empty, vue.mergeProps(_ctx.$attrs, { description: __props.description }), null, 16, ["description"])
|
|
22165
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
22166
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
22037
|
+
vue.createElementVNode("img", {
|
|
22038
|
+
src: getIconName.value,
|
|
22039
|
+
style: vue.normalizeStyle(setIconSvgInsStyle.value)
|
|
22040
|
+
}, null, 12, _hoisted_1)
|
|
22167
22041
|
],
|
|
22168
|
-
|
|
22169
|
-
/*
|
|
22170
|
-
)
|
|
22042
|
+
4
|
|
22043
|
+
/* STYLE */
|
|
22044
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
22045
|
+
"i",
|
|
22046
|
+
{
|
|
22047
|
+
key: 2,
|
|
22048
|
+
class: vue.normalizeClass(getIconName.value),
|
|
22049
|
+
style: vue.normalizeStyle(setIconSvgStyle.value)
|
|
22050
|
+
},
|
|
22051
|
+
null,
|
|
22052
|
+
6
|
|
22053
|
+
/* CLASS, STYLE */
|
|
22054
|
+
));
|
|
22171
22055
|
};
|
|
22172
22056
|
}
|
|
22173
22057
|
});
|
|
22174
22058
|
|
|
22175
|
-
|
|
22059
|
+
function elSvg(app) {
|
|
22060
|
+
const icons = svg__namespace;
|
|
22061
|
+
for (const i in icons) {
|
|
22062
|
+
if (!app._context.components[`ele-${icons[i].name}`]) {
|
|
22063
|
+
app.component(`ele-${icons[i].name}`, icons[i]);
|
|
22064
|
+
}
|
|
22065
|
+
}
|
|
22066
|
+
if (!app._context.components[`SvgIcon`]) {
|
|
22067
|
+
app.component("SvgIcon", _sfc_main);
|
|
22068
|
+
}
|
|
22069
|
+
}
|
|
22070
|
+
|
|
22071
|
+
const makeInstaller = (components = []) => {
|
|
22072
|
+
const install = (app) => {
|
|
22073
|
+
components.forEach(
|
|
22074
|
+
(component) => {
|
|
22075
|
+
if (!app._context.components[component.name]) {
|
|
22076
|
+
app.component(component.name, component);
|
|
22077
|
+
}
|
|
22078
|
+
}
|
|
22079
|
+
);
|
|
22080
|
+
if (app) {
|
|
22081
|
+
app.use(pinia);
|
|
22082
|
+
elSvg(app);
|
|
22083
|
+
directive(app);
|
|
22084
|
+
app.use(setupVXETable);
|
|
22085
|
+
}
|
|
22086
|
+
};
|
|
22087
|
+
return {
|
|
22088
|
+
install
|
|
22089
|
+
};
|
|
22090
|
+
};
|
|
22176
22091
|
|
|
22177
22092
|
const plugins = [
|
|
22178
22093
|
FButton,
|
|
@@ -22188,6 +22103,214 @@
|
|
|
22188
22103
|
|
|
22189
22104
|
var installer = makeInstaller([...plugins]);
|
|
22190
22105
|
|
|
22106
|
+
const cssCdnUrlList = [
|
|
22107
|
+
// 调整为从本地引入,注释下面的 url
|
|
22108
|
+
// '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
|
|
22109
|
+
// '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
|
|
22110
|
+
];
|
|
22111
|
+
const jsCdnUrlList = [];
|
|
22112
|
+
function setCssCdn() {
|
|
22113
|
+
if (cssCdnUrlList.length <= 0) return false;
|
|
22114
|
+
cssCdnUrlList.map((v) => {
|
|
22115
|
+
let link = document.createElement("link");
|
|
22116
|
+
link.rel = "stylesheet";
|
|
22117
|
+
link.href = v;
|
|
22118
|
+
link.crossOrigin = "anonymous";
|
|
22119
|
+
document.getElementsByTagName("head")[0].appendChild(link);
|
|
22120
|
+
});
|
|
22121
|
+
}
|
|
22122
|
+
function setJsCdn() {
|
|
22123
|
+
if (jsCdnUrlList.length <= 0) return false;
|
|
22124
|
+
jsCdnUrlList.map((v) => {
|
|
22125
|
+
let link = document.createElement("script");
|
|
22126
|
+
link.src = v;
|
|
22127
|
+
document.body.appendChild(link);
|
|
22128
|
+
});
|
|
22129
|
+
}
|
|
22130
|
+
const setIntroduction = {
|
|
22131
|
+
// 设置css
|
|
22132
|
+
cssCdn: () => {
|
|
22133
|
+
setCssCdn();
|
|
22134
|
+
},
|
|
22135
|
+
// 设置js
|
|
22136
|
+
jsCdn: () => {
|
|
22137
|
+
setJsCdn();
|
|
22138
|
+
}
|
|
22139
|
+
};
|
|
22140
|
+
|
|
22141
|
+
const emitter = mitt();
|
|
22142
|
+
|
|
22143
|
+
const themeStore = useThemeConfig();
|
|
22144
|
+
function commonFunction() {
|
|
22145
|
+
const { t } = vueI18n.useI18n();
|
|
22146
|
+
const { copy, isSupported } = core.useClipboard();
|
|
22147
|
+
const percentFormat = (row, column, cellValue) => {
|
|
22148
|
+
return cellValue ? `${cellValue}%` : "-";
|
|
22149
|
+
};
|
|
22150
|
+
const dateFormatYMD = (row, column, cellValue) => {
|
|
22151
|
+
if (!cellValue) return "-";
|
|
22152
|
+
return formatDate(new Date(cellValue), "YYYY-mm-dd");
|
|
22153
|
+
};
|
|
22154
|
+
const dateFormatYMDHMS = (row, column, cellValue) => {
|
|
22155
|
+
if (!cellValue) return "-";
|
|
22156
|
+
return formatDate(new Date(cellValue), "YYYY-mm-dd HH:MM:SS");
|
|
22157
|
+
};
|
|
22158
|
+
const dateFormatHMS = (row, column, cellValue) => {
|
|
22159
|
+
if (!cellValue) return "-";
|
|
22160
|
+
let time = 0;
|
|
22161
|
+
if (typeof row === "number") time = row;
|
|
22162
|
+
if (typeof cellValue === "number") time = cellValue;
|
|
22163
|
+
return formatDate(new Date(time * 1e3), "HH:MM:SS");
|
|
22164
|
+
};
|
|
22165
|
+
const scaleFormat = (value = "0", scale = 4) => {
|
|
22166
|
+
return Number.parseFloat(value).toFixed(scale);
|
|
22167
|
+
};
|
|
22168
|
+
const scale2Format = (value = "0") => {
|
|
22169
|
+
return Number.parseFloat(value).toFixed(2);
|
|
22170
|
+
};
|
|
22171
|
+
const groupSeparator = (value, minimumFractionDigits = 2) => {
|
|
22172
|
+
return value.toLocaleString("en-US", {
|
|
22173
|
+
minimumFractionDigits,
|
|
22174
|
+
maximumFractionDigits: 2
|
|
22175
|
+
});
|
|
22176
|
+
};
|
|
22177
|
+
const copyText = (text) => {
|
|
22178
|
+
return new Promise((resolve, reject) => {
|
|
22179
|
+
try {
|
|
22180
|
+
if (!isSupported.value) {
|
|
22181
|
+
console.error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
|
|
22182
|
+
reject("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
|
|
22183
|
+
} else {
|
|
22184
|
+
copy(text);
|
|
22185
|
+
elementPlus.ElMessage.success(t("message.layout.copyTextSuccess"));
|
|
22186
|
+
resolve(text);
|
|
22187
|
+
}
|
|
22188
|
+
} catch (e) {
|
|
22189
|
+
elementPlus.ElMessage.error(t("message.layout.copyTextError"));
|
|
22190
|
+
reject(e);
|
|
22191
|
+
}
|
|
22192
|
+
});
|
|
22193
|
+
};
|
|
22194
|
+
const removeHtmlSub = (value) => {
|
|
22195
|
+
var str = value.replace(/<[^>]+>/g, "");
|
|
22196
|
+
if (str.length > 50) return str.substring(0, 50) + "......";
|
|
22197
|
+
else return str;
|
|
22198
|
+
};
|
|
22199
|
+
const removeHtml = (value) => {
|
|
22200
|
+
return value.replace(/<[^>]+>/g, "");
|
|
22201
|
+
};
|
|
22202
|
+
const getEnumDesc = (key, lstEnum) => {
|
|
22203
|
+
var _a;
|
|
22204
|
+
return (_a = lstEnum.find((x) => x.value == key)) == null ? void 0 : _a.describe;
|
|
22205
|
+
};
|
|
22206
|
+
const appendQueryParams = (url, params) => {
|
|
22207
|
+
if (!params || Object.keys(params).length == 0) return url;
|
|
22208
|
+
const queryString = Object.keys(params).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join("&");
|
|
22209
|
+
return `${url}${url.includes("?") ? "&" : "?"}${queryString}`;
|
|
22210
|
+
};
|
|
22211
|
+
const getNameAbbr = (text, callback) => {
|
|
22212
|
+
if (!text) return elementPlus.ElMessage.error("\u83B7\u53D6\u7B80\u79F0\u6587\u672C\u4E0D\u80FD\u4E3A\u7A7A");
|
|
22213
|
+
try {
|
|
22214
|
+
return useBaseApi("sysCommon").post({ text }, "nameAbbr").then((res) => {
|
|
22215
|
+
if (callback) callback(res.data.result);
|
|
22216
|
+
return res.data.result;
|
|
22217
|
+
});
|
|
22218
|
+
} catch (e) {
|
|
22219
|
+
elementPlus.ElMessage.error("\u83B7\u53D6\u5931\u8D25");
|
|
22220
|
+
}
|
|
22221
|
+
};
|
|
22222
|
+
const handleConditionalClear = (condition, fieldValue, clearValue = void 0) => {
|
|
22223
|
+
if (condition) {
|
|
22224
|
+
return clearValue;
|
|
22225
|
+
}
|
|
22226
|
+
return fieldValue;
|
|
22227
|
+
};
|
|
22228
|
+
const getTimeRangePickerShortcuts = () => {
|
|
22229
|
+
return [
|
|
22230
|
+
{
|
|
22231
|
+
text: "\u8FD1\u4E00\u5468",
|
|
22232
|
+
value: () => {
|
|
22233
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22234
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22235
|
+
const start = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
|
|
22236
|
+
return [start, end];
|
|
22237
|
+
}
|
|
22238
|
+
},
|
|
22239
|
+
{
|
|
22240
|
+
text: "\u8FD1\u4E00\u6708",
|
|
22241
|
+
value: () => {
|
|
22242
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22243
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22244
|
+
const start = new Date(now.getFullYear(), now.getMonth() - 1, now.getDate());
|
|
22245
|
+
return [start, end];
|
|
22246
|
+
}
|
|
22247
|
+
},
|
|
22248
|
+
{
|
|
22249
|
+
text: "\u8FD1\u4E09\u6708",
|
|
22250
|
+
value: () => {
|
|
22251
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22252
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22253
|
+
const start = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate());
|
|
22254
|
+
return [start, end];
|
|
22255
|
+
}
|
|
22256
|
+
},
|
|
22257
|
+
{
|
|
22258
|
+
text: "\u8FD1\u534A\u5E74",
|
|
22259
|
+
value: () => {
|
|
22260
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22261
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22262
|
+
const start = new Date(now.getFullYear(), now.getMonth() - 6, now.getDate());
|
|
22263
|
+
return [start, end];
|
|
22264
|
+
}
|
|
22265
|
+
},
|
|
22266
|
+
{
|
|
22267
|
+
text: "\u672C\u5E74",
|
|
22268
|
+
value: () => {
|
|
22269
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22270
|
+
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
22271
|
+
const start = new Date(now.getFullYear(), 0, 1);
|
|
22272
|
+
return [start, end];
|
|
22273
|
+
}
|
|
22274
|
+
},
|
|
22275
|
+
{
|
|
22276
|
+
text: "\u8FD1\u4E24\u5E74",
|
|
22277
|
+
value: () => {
|
|
22278
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22279
|
+
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
22280
|
+
const start = new Date(now.getFullYear() - 1, 0, 1);
|
|
22281
|
+
return [start, end];
|
|
22282
|
+
}
|
|
22283
|
+
},
|
|
22284
|
+
{
|
|
22285
|
+
text: "\u8FD1\u4E09\u5E74",
|
|
22286
|
+
value: () => {
|
|
22287
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22288
|
+
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
22289
|
+
const start = new Date(now.getFullYear() - 2, 0, 1);
|
|
22290
|
+
return [start, end];
|
|
22291
|
+
}
|
|
22292
|
+
}
|
|
22293
|
+
];
|
|
22294
|
+
};
|
|
22295
|
+
return {
|
|
22296
|
+
percentFormat,
|
|
22297
|
+
dateFormatYMD,
|
|
22298
|
+
dateFormatYMDHMS,
|
|
22299
|
+
dateFormatHMS,
|
|
22300
|
+
scaleFormat,
|
|
22301
|
+
scale2Format,
|
|
22302
|
+
groupSeparator,
|
|
22303
|
+
copyText,
|
|
22304
|
+
removeHtmlSub,
|
|
22305
|
+
removeHtml,
|
|
22306
|
+
getEnumDesc,
|
|
22307
|
+
appendQueryParams,
|
|
22308
|
+
getNameAbbr,
|
|
22309
|
+
handleConditionalClear,
|
|
22310
|
+
getTimeRangePickerShortcuts
|
|
22311
|
+
};
|
|
22312
|
+
}
|
|
22313
|
+
|
|
22191
22314
|
let pathPrefix = "/@";
|
|
22192
22315
|
function setPathPrefix(prefix) {
|
|
22193
22316
|
pathPrefix = prefix;
|
|
@@ -22564,8 +22687,136 @@
|
|
|
22564
22687
|
return router;
|
|
22565
22688
|
}
|
|
22566
22689
|
|
|
22690
|
+
function useTitle() {
|
|
22691
|
+
const stores = useThemeConfig(pinia);
|
|
22692
|
+
const { themeConfig } = pinia$1.storeToRefs(stores);
|
|
22693
|
+
vue.nextTick(() => {
|
|
22694
|
+
let webTitle = "";
|
|
22695
|
+
let globalTitle = themeConfig.value.globalTitle;
|
|
22696
|
+
const { path, meta } = router.currentRoute.value;
|
|
22697
|
+
if (path === "/login") {
|
|
22698
|
+
webTitle = meta.title;
|
|
22699
|
+
} else {
|
|
22700
|
+
webTitle = setTagsViewNameI18n(router.currentRoute.value);
|
|
22701
|
+
}
|
|
22702
|
+
document.title = `${webTitle} - ${globalTitle}` || globalTitle;
|
|
22703
|
+
});
|
|
22704
|
+
}
|
|
22705
|
+
function setTagsViewNameI18n(item) {
|
|
22706
|
+
let tagsViewName = "";
|
|
22707
|
+
const { query, params, meta } = item;
|
|
22708
|
+
const pattern = /^\{("(zh-CN|en|zh-TW)":"[^,]+",?){1,3}}$/;
|
|
22709
|
+
if ((query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName)) {
|
|
22710
|
+
if (pattern.test(query == null ? void 0 : query.tagsViewName) || pattern.test(params == null ? void 0 : params.tagsViewName)) {
|
|
22711
|
+
const urlTagsParams = (query == null ? void 0 : query.tagsViewName) && JSON.parse(query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName) && JSON.parse(params == null ? void 0 : params.tagsViewName);
|
|
22712
|
+
tagsViewName = urlTagsParams[i18n.global.locale.value];
|
|
22713
|
+
} else {
|
|
22714
|
+
tagsViewName = (query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName);
|
|
22715
|
+
}
|
|
22716
|
+
} else {
|
|
22717
|
+
tagsViewName = i18n.global.t(`message.menu.${meta.title}`);
|
|
22718
|
+
}
|
|
22719
|
+
return tagsViewName;
|
|
22720
|
+
}
|
|
22721
|
+
const lazyImg = (el, arr) => {
|
|
22722
|
+
const io = new IntersectionObserver((res) => {
|
|
22723
|
+
res.forEach((v) => {
|
|
22724
|
+
if (v.isIntersecting) {
|
|
22725
|
+
const { img, key } = v.target.dataset;
|
|
22726
|
+
v.target.src = img;
|
|
22727
|
+
v.target.onload = () => {
|
|
22728
|
+
io.unobserve(v.target);
|
|
22729
|
+
arr[key]["loading"] = false;
|
|
22730
|
+
};
|
|
22731
|
+
}
|
|
22732
|
+
});
|
|
22733
|
+
});
|
|
22734
|
+
vue.nextTick(() => {
|
|
22735
|
+
document.querySelectorAll(el).forEach((img) => io.observe(img));
|
|
22736
|
+
});
|
|
22737
|
+
};
|
|
22738
|
+
const globalComponentSize = () => {
|
|
22739
|
+
const stores = useThemeConfig(pinia);
|
|
22740
|
+
const { themeConfig } = pinia$1.storeToRefs(stores);
|
|
22741
|
+
return themeConfig.value.globalComponentSize;
|
|
22742
|
+
};
|
|
22743
|
+
function deepClone(obj) {
|
|
22744
|
+
let newObj;
|
|
22745
|
+
try {
|
|
22746
|
+
newObj = obj.push ? [] : {};
|
|
22747
|
+
} catch (error) {
|
|
22748
|
+
newObj = {};
|
|
22749
|
+
}
|
|
22750
|
+
for (let attr in obj) {
|
|
22751
|
+
if (obj[attr] && typeof obj[attr] === "object") {
|
|
22752
|
+
newObj[attr] = deepClone(obj[attr]);
|
|
22753
|
+
} else {
|
|
22754
|
+
newObj[attr] = obj[attr];
|
|
22755
|
+
}
|
|
22756
|
+
}
|
|
22757
|
+
return newObj;
|
|
22758
|
+
}
|
|
22759
|
+
function isMobile() {
|
|
22760
|
+
if (navigator.userAgent.match(/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i)) {
|
|
22761
|
+
return true;
|
|
22762
|
+
} else {
|
|
22763
|
+
return false;
|
|
22764
|
+
}
|
|
22765
|
+
}
|
|
22766
|
+
function handleEmpty(list) {
|
|
22767
|
+
const arr = [];
|
|
22768
|
+
for (const i in list) {
|
|
22769
|
+
const d = [];
|
|
22770
|
+
for (const j in list[i]) {
|
|
22771
|
+
d.push(list[i][j]);
|
|
22772
|
+
}
|
|
22773
|
+
const leng = d.filter((item) => item === "").length;
|
|
22774
|
+
if (leng !== d.length) {
|
|
22775
|
+
arr.push(list[i]);
|
|
22776
|
+
}
|
|
22777
|
+
}
|
|
22778
|
+
return arr;
|
|
22779
|
+
}
|
|
22780
|
+
function handleOpenLink(val) {
|
|
22781
|
+
var _a, _b, _c;
|
|
22782
|
+
const { origin, pathname } = window.location;
|
|
22783
|
+
router.push(val.path);
|
|
22784
|
+
if (verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
|
|
22785
|
+
else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
|
|
22786
|
+
}
|
|
22787
|
+
const other = {
|
|
22788
|
+
// elSvg: (app: App) => {
|
|
22789
|
+
// elSvg(app);
|
|
22790
|
+
// },
|
|
22791
|
+
useTitle: () => {
|
|
22792
|
+
useTitle();
|
|
22793
|
+
},
|
|
22794
|
+
setTagsViewNameI18n(route) {
|
|
22795
|
+
return setTagsViewNameI18n(route);
|
|
22796
|
+
},
|
|
22797
|
+
lazyImg: (el, arr) => {
|
|
22798
|
+
lazyImg(el, arr);
|
|
22799
|
+
},
|
|
22800
|
+
globalComponentSize: () => {
|
|
22801
|
+
return globalComponentSize();
|
|
22802
|
+
},
|
|
22803
|
+
deepClone: (obj) => {
|
|
22804
|
+
return deepClone(obj);
|
|
22805
|
+
},
|
|
22806
|
+
isMobile: () => {
|
|
22807
|
+
return isMobile();
|
|
22808
|
+
},
|
|
22809
|
+
handleEmpty: (list) => {
|
|
22810
|
+
return handleEmpty(list);
|
|
22811
|
+
},
|
|
22812
|
+
handleOpenLink: (val) => {
|
|
22813
|
+
handleOpenLink(val);
|
|
22814
|
+
}
|
|
22815
|
+
};
|
|
22816
|
+
|
|
22567
22817
|
const version = "1.0.0";
|
|
22568
22818
|
|
|
22819
|
+
const commonFun = commonFunction();
|
|
22569
22820
|
const install = installer.install;
|
|
22570
22821
|
|
|
22571
22822
|
exports.AccountTypeEnum = AccountTypeEnum;
|
|
@@ -22575,6 +22826,7 @@
|
|
|
22575
22826
|
exports.NextLoading = NextLoading;
|
|
22576
22827
|
exports.Session = Session;
|
|
22577
22828
|
exports.StringToObj = StringToObj;
|
|
22829
|
+
exports.Watermark = watermark;
|
|
22578
22830
|
exports.accessTokenKey = accessTokenKey;
|
|
22579
22831
|
exports.auth = auth;
|
|
22580
22832
|
exports.authAll = authAll;
|
|
@@ -22641,6 +22893,7 @@
|
|
|
22641
22893
|
exports.openWindow = openWindow;
|
|
22642
22894
|
exports.orgId = orgId;
|
|
22643
22895
|
exports.orgName = orgName;
|
|
22896
|
+
exports.other = other;
|
|
22644
22897
|
exports.posId = posId;
|
|
22645
22898
|
exports.posName = posName;
|
|
22646
22899
|
exports.reLoadLoginAccessToken = reLoadLoginAccessToken;
|
|
@@ -22650,8 +22903,10 @@
|
|
|
22650
22903
|
exports.roles = roles;
|
|
22651
22904
|
exports.saulVModel = saulVModel;
|
|
22652
22905
|
exports.service = service;
|
|
22906
|
+
exports.setCssCdn = setCssCdn;
|
|
22653
22907
|
exports.setDynamicViewsModules = setDynamicViewsModules;
|
|
22654
22908
|
exports.setIntroduction = setIntroduction;
|
|
22909
|
+
exports.setJsCdn = setJsCdn;
|
|
22655
22910
|
exports.setPathPrefix = setPathPrefix;
|
|
22656
22911
|
exports.setupI18n = setupI18n;
|
|
22657
22912
|
exports.signatureByKSort = signatureByKSort;
|