@fmdeui/fmui 1.0.1 → 1.0.3
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/api/base/index.d.ts +1 -1
- package/es/api/index.d.ts +0 -1
- package/es/{version.css → component.css} +0 -9
- package/es/components/button/index.d.ts +3 -3
- package/es/components/button/src/index.vue.d.ts +1 -1
- package/es/components/button/style/css.d.ts +0 -1
- package/es/components/button/style/index.d.ts +0 -1
- package/es/components/chart/style/css.d.ts +0 -1
- package/es/components/chart/style/index.d.ts +0 -1
- package/es/components/form/style/css.d.ts +0 -1
- package/es/components/form/style/index.d.ts +0 -1
- package/es/components/input/style/css.d.ts +0 -1
- package/es/components/input/style/index.d.ts +0 -1
- package/es/components/layout-page/style/css.d.ts +0 -1
- package/es/components/layout-page/style/index.d.ts +0 -1
- package/es/components/layout-page-item/style/css.d.ts +0 -1
- package/es/components/layout-page-item/style/index.d.ts +0 -1
- package/es/components/query-condition/index.d.ts +12 -12
- package/es/components/query-condition/src/index.vue.d.ts +4 -4
- package/es/components/query-condition/style/css.d.ts +0 -1
- package/es/components/query-condition/style/index.d.ts +0 -1
- package/es/components/select/index.d.ts +5 -5
- package/es/components/select/src/index.vue.d.ts +2 -2
- package/es/components/select/style/css.d.ts +0 -1
- package/es/components/select/style/index.d.ts +0 -1
- package/es/components/select-table/index.d.ts +6 -6
- package/es/components/select-table/src/index.vue.d.ts +2 -2
- package/es/components/select-table/style/css.d.ts +0 -1
- package/es/components/select-table/style/index.d.ts +0 -1
- package/es/hooks/other.d.ts +1 -1
- package/es/hooks/useLocale.d.ts +1 -1
- package/es/hooks/useVxeTableOptionsHook.d.ts +2 -2
- package/es/index.d.ts +7 -8
- package/es/index.mjs +0 -10
- package/es/packages/api/index.mjs +0 -1
- package/es/packages/utils/index.mjs +1 -0
- package/es/stores/keepAliveNames.d.ts +1 -1
- package/es/stores/requestOldRoutes.d.ts +1 -1
- package/es/stores/routesList.d.ts +1 -1
- package/es/stores/tagsViewRoutes.d.ts +1 -1
- package/es/stores/themeConfig.d.ts +1 -1
- package/es/stores/userInfo.d.ts +1 -1
- package/index.js +259 -268
- package/index.min.js +4 -4
- package/index.min.mjs +4 -4
- package/index.mjs +257 -257
- package/lib/api/base/index.d.ts +1 -1
- package/lib/api/index.d.ts +0 -1
- package/lib/components/button/index.d.ts +3 -3
- package/lib/components/button/src/index.vue.d.ts +1 -1
- package/lib/components/button/style/css.d.ts +0 -1
- package/lib/components/button/style/index.d.ts +0 -1
- package/lib/components/chart/style/css.d.ts +0 -1
- package/lib/components/chart/style/index.d.ts +0 -1
- package/lib/components/form/style/css.d.ts +0 -1
- package/lib/components/form/style/index.d.ts +0 -1
- package/lib/components/input/style/css.d.ts +0 -1
- package/lib/components/input/style/index.d.ts +0 -1
- package/lib/components/layout-page/style/css.d.ts +0 -1
- package/lib/components/layout-page/style/index.d.ts +0 -1
- package/lib/components/layout-page-item/style/css.d.ts +0 -1
- package/lib/components/layout-page-item/style/index.d.ts +0 -1
- package/lib/components/query-condition/index.d.ts +12 -12
- package/lib/components/query-condition/src/index.vue.d.ts +4 -4
- package/lib/components/query-condition/style/css.d.ts +0 -1
- package/lib/components/query-condition/style/index.d.ts +0 -1
- package/lib/components/select/index.d.ts +5 -5
- package/lib/components/select/src/index.vue.d.ts +2 -2
- package/lib/components/select/style/css.d.ts +0 -1
- package/lib/components/select/style/index.d.ts +0 -1
- package/lib/components/select-table/index.d.ts +6 -6
- package/lib/components/select-table/src/index.vue.d.ts +2 -2
- package/lib/components/select-table/style/css.d.ts +0 -1
- package/lib/components/select-table/style/index.d.ts +0 -1
- package/lib/hooks/other.d.ts +1 -1
- package/lib/hooks/useLocale.d.ts +1 -1
- package/lib/hooks/useVxeTableOptionsHook.d.ts +2 -2
- package/lib/{other.css → index.css} +0 -9
- package/lib/index.d.ts +7 -8
- package/lib/index.js +15 -34
- package/lib/packages/api/index.js +0 -17
- package/lib/packages/utils/index.js +17 -0
- package/lib/stores/keepAliveNames.d.ts +1 -1
- package/lib/stores/requestOldRoutes.d.ts +1 -1
- package/lib/stores/routesList.d.ts +1 -1
- package/lib/stores/tagsViewRoutes.d.ts +1 -1
- package/lib/stores/themeConfig.d.ts +1 -1
- package/lib/stores/userInfo.d.ts +1 -1
- 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/packages/components/button/style/css.mjs +0 -1
- package/es/packages/components/button/style/index.mjs +0 -1
- package/es/packages/components/chart/style/css.mjs +0 -1
- package/es/packages/components/chart/style/index.mjs +0 -1
- package/es/packages/components/form/style/css.mjs +0 -1
- package/es/packages/components/form/style/index.mjs +0 -1
- package/es/packages/components/index.mjs +0 -9
- package/es/packages/components/input/style/css.mjs +0 -1
- package/es/packages/components/input/style/index.mjs +0 -1
- package/es/packages/components/layout-page/style/css.mjs +0 -1
- package/es/packages/components/layout-page/style/index.mjs +0 -1
- package/es/packages/components/layout-page-item/style/css.mjs +0 -1
- package/es/packages/components/layout-page-item/style/index.mjs +0 -1
- package/es/packages/components/query-condition/style/css.mjs +0 -1
- package/es/packages/components/query-condition/style/index.mjs +0 -1
- package/es/packages/components/select/style/css.mjs +0 -1
- package/es/packages/components/select/style/index.mjs +0 -1
- package/es/packages/components/select-table/style/css.mjs +0 -1
- package/es/packages/components/select-table/style/index.mjs +0 -1
- package/es/packages/components/svgIcon/index.vue.mjs +0 -5
- package/es/packages/components/svgIcon/index.vue2.mjs +0 -91
- package/es/packages/components/utils/install.mjs +0 -17
- package/es/packages/hooks/dateTimeShortCust.mjs +0 -23
- package/es/packages/hooks/idleTimeout.mjs +0 -127
- package/es/packages/hooks/other.mjs +0 -146
- package/es/packages/hooks/sysInfo.mjs +0 -59
- package/es/packages/hooks/useInfo.mjs +0 -44
- package/es/packages/theme-chalk/assets/logo.png.mjs +0 -3
- package/es/packages/theme-chalk/src/button.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/chart.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/form.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/input.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/layout-page-item.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/layout-page.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/query-condition.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/select-table.scss.mjs +0 -3
- package/es/packages/theme-chalk/src/select.scss.mjs +0 -3
- package/es/packages/utils/signalR.mjs +0 -47
- package/lib/packages/components/button/style/css.js +0 -4
- package/lib/packages/components/button/style/index.js +0 -4
- package/lib/packages/components/chart/style/css.js +0 -4
- package/lib/packages/components/chart/style/index.js +0 -4
- package/lib/packages/components/form/style/css.js +0 -4
- package/lib/packages/components/form/style/index.js +0 -4
- package/lib/packages/components/index.js +0 -23
- package/lib/packages/components/input/style/css.js +0 -4
- package/lib/packages/components/input/style/index.js +0 -4
- package/lib/packages/components/layout-page/style/css.js +0 -4
- package/lib/packages/components/layout-page/style/index.js +0 -4
- package/lib/packages/components/layout-page-item/style/css.js +0 -4
- package/lib/packages/components/layout-page-item/style/index.js +0 -4
- package/lib/packages/components/query-condition/style/css.js +0 -4
- package/lib/packages/components/query-condition/style/index.js +0 -4
- package/lib/packages/components/select/style/css.js +0 -4
- package/lib/packages/components/select/style/index.js +0 -4
- package/lib/packages/components/select-table/style/css.js +0 -4
- package/lib/packages/components/select-table/style/index.js +0 -4
- package/lib/packages/components/svgIcon/index.vue.js +0 -9
- package/lib/packages/components/svgIcon/index.vue2.js +0 -95
- package/lib/packages/components/utils/install.js +0 -19
- package/lib/packages/hooks/dateTimeShortCust.js +0 -25
- package/lib/packages/hooks/idleTimeout.js +0 -131
- package/lib/packages/hooks/other.js +0 -178
- package/lib/packages/hooks/sysInfo.js +0 -62
- package/lib/packages/hooks/useInfo.js +0 -64
- package/lib/packages/theme-chalk/assets/logo.png.js +0 -7
- package/lib/packages/theme-chalk/src/button.scss.js +0 -7
- package/lib/packages/theme-chalk/src/chart.scss.js +0 -7
- package/lib/packages/theme-chalk/src/form.scss.js +0 -7
- package/lib/packages/theme-chalk/src/input.scss.js +0 -7
- package/lib/packages/theme-chalk/src/layout-page-item.scss.js +0 -7
- package/lib/packages/theme-chalk/src/layout-page.scss.js +0 -7
- package/lib/packages/theme-chalk/src/query-condition.scss.js +0 -7
- package/lib/packages/theme-chalk/src/select-table.scss.js +0 -7
- package/lib/packages/theme-chalk/src/select.scss.js +0 -7
- package/lib/packages/utils/signalR.js +0 -68
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var svg = require('@element-plus/icons-vue');
|
|
7
|
-
require('../router/index.js');
|
|
8
|
-
var inpinia = require('../stores/inpinia.js');
|
|
9
|
-
var pinia = require('pinia');
|
|
10
|
-
var themeConfig = require('../stores/themeConfig.js');
|
|
11
|
-
var index = require('../locale/index.js');
|
|
12
|
-
var toolsValidate = require('../utils/toolsValidate.js');
|
|
13
|
-
var createRouter = require('../router/createRouter.js');
|
|
14
|
-
|
|
15
|
-
function _interopNamespaceDefault(e) {
|
|
16
|
-
var n = Object.create(null);
|
|
17
|
-
if (e) {
|
|
18
|
-
Object.keys(e).forEach(function (k) {
|
|
19
|
-
if (k !== 'default') {
|
|
20
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return e[k]; }
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
n.default = e;
|
|
29
|
-
return Object.freeze(n);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var svg__namespace = /*#__PURE__*/_interopNamespaceDefault(svg);
|
|
33
|
-
|
|
34
|
-
const SvgIcon = vue.defineAsyncComponent(() => Promise.resolve().then(function () { return require('../components/svgIcon/index.vue.js'); }));
|
|
35
|
-
function elSvg(app) {
|
|
36
|
-
const icons = svg__namespace;
|
|
37
|
-
for (const i in icons) {
|
|
38
|
-
app.component(`ele-${icons[i].name}`, icons[i]);
|
|
39
|
-
}
|
|
40
|
-
app.component("SvgIcon", SvgIcon);
|
|
41
|
-
}
|
|
42
|
-
function useTitle() {
|
|
43
|
-
const stores = themeConfig.useThemeConfig(inpinia.default);
|
|
44
|
-
const { themeConfig: themeConfig$1 } = pinia.storeToRefs(stores);
|
|
45
|
-
vue.nextTick(() => {
|
|
46
|
-
let webTitle = "";
|
|
47
|
-
let globalTitle = themeConfig$1.value.globalTitle;
|
|
48
|
-
const { path, meta } = createRouter.router.currentRoute.value;
|
|
49
|
-
if (path === "/login") {
|
|
50
|
-
webTitle = meta.title;
|
|
51
|
-
} else {
|
|
52
|
-
webTitle = setTagsViewNameI18n(createRouter.router.currentRoute.value);
|
|
53
|
-
}
|
|
54
|
-
document.title = `${webTitle} - ${globalTitle}` || globalTitle;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function setTagsViewNameI18n(item) {
|
|
58
|
-
let tagsViewName = "";
|
|
59
|
-
const { query, params, meta } = item;
|
|
60
|
-
const pattern = /^\{("(zh-CN|en|zh-TW)":"[^,]+",?){1,3}}$/;
|
|
61
|
-
if ((query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName)) {
|
|
62
|
-
if (pattern.test(query == null ? void 0 : query.tagsViewName) || pattern.test(params == null ? void 0 : params.tagsViewName)) {
|
|
63
|
-
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);
|
|
64
|
-
tagsViewName = urlTagsParams[index.i18n.global.locale.value];
|
|
65
|
-
} else {
|
|
66
|
-
tagsViewName = (query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName);
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
tagsViewName = index.i18n.global.t(`message.menu.${meta.title}`);
|
|
70
|
-
}
|
|
71
|
-
return tagsViewName;
|
|
72
|
-
}
|
|
73
|
-
const lazyImg = (el, arr) => {
|
|
74
|
-
const io = new IntersectionObserver((res) => {
|
|
75
|
-
res.forEach((v) => {
|
|
76
|
-
if (v.isIntersecting) {
|
|
77
|
-
const { img, key } = v.target.dataset;
|
|
78
|
-
v.target.src = img;
|
|
79
|
-
v.target.onload = () => {
|
|
80
|
-
io.unobserve(v.target);
|
|
81
|
-
arr[key]["loading"] = false;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
vue.nextTick(() => {
|
|
87
|
-
document.querySelectorAll(el).forEach((img) => io.observe(img));
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
const globalComponentSize = () => {
|
|
91
|
-
const stores = themeConfig.useThemeConfig(inpinia.default);
|
|
92
|
-
const { themeConfig: themeConfig$1 } = pinia.storeToRefs(stores);
|
|
93
|
-
return themeConfig$1.value.globalComponentSize;
|
|
94
|
-
};
|
|
95
|
-
function deepClone(obj) {
|
|
96
|
-
let newObj;
|
|
97
|
-
try {
|
|
98
|
-
newObj = obj.push ? [] : {};
|
|
99
|
-
} catch (error) {
|
|
100
|
-
newObj = {};
|
|
101
|
-
}
|
|
102
|
-
for (let attr in obj) {
|
|
103
|
-
if (obj[attr] && typeof obj[attr] === "object") {
|
|
104
|
-
newObj[attr] = deepClone(obj[attr]);
|
|
105
|
-
} else {
|
|
106
|
-
newObj[attr] = obj[attr];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return newObj;
|
|
110
|
-
}
|
|
111
|
-
function isMobile() {
|
|
112
|
-
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)) {
|
|
113
|
-
return true;
|
|
114
|
-
} else {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function handleEmpty(list) {
|
|
119
|
-
const arr = [];
|
|
120
|
-
for (const i in list) {
|
|
121
|
-
const d = [];
|
|
122
|
-
for (const j in list[i]) {
|
|
123
|
-
d.push(list[i][j]);
|
|
124
|
-
}
|
|
125
|
-
const leng = d.filter((item) => item === "").length;
|
|
126
|
-
if (leng !== d.length) {
|
|
127
|
-
arr.push(list[i]);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return arr;
|
|
131
|
-
}
|
|
132
|
-
function handleOpenLink(val) {
|
|
133
|
-
var _a, _b, _c;
|
|
134
|
-
const { origin, pathname } = window.location;
|
|
135
|
-
createRouter.router.push(val.path);
|
|
136
|
-
if (toolsValidate.verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
|
|
137
|
-
else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
|
|
138
|
-
}
|
|
139
|
-
const other = {
|
|
140
|
-
elSvg: (app) => {
|
|
141
|
-
elSvg(app);
|
|
142
|
-
},
|
|
143
|
-
useTitle: () => {
|
|
144
|
-
useTitle();
|
|
145
|
-
},
|
|
146
|
-
setTagsViewNameI18n(route) {
|
|
147
|
-
return setTagsViewNameI18n(route);
|
|
148
|
-
},
|
|
149
|
-
lazyImg: (el, arr) => {
|
|
150
|
-
lazyImg(el, arr);
|
|
151
|
-
},
|
|
152
|
-
globalComponentSize: () => {
|
|
153
|
-
return globalComponentSize();
|
|
154
|
-
},
|
|
155
|
-
deepClone: (obj) => {
|
|
156
|
-
return deepClone(obj);
|
|
157
|
-
},
|
|
158
|
-
isMobile: () => {
|
|
159
|
-
return isMobile();
|
|
160
|
-
},
|
|
161
|
-
handleEmpty: (list) => {
|
|
162
|
-
return handleEmpty(list);
|
|
163
|
-
},
|
|
164
|
-
handleOpenLink: (val) => {
|
|
165
|
-
handleOpenLink(val);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
exports.deepClone = deepClone;
|
|
170
|
-
exports.default = other;
|
|
171
|
-
exports.elSvg = elSvg;
|
|
172
|
-
exports.globalComponentSize = globalComponentSize;
|
|
173
|
-
exports.handleEmpty = handleEmpty;
|
|
174
|
-
exports.handleOpenLink = handleOpenLink;
|
|
175
|
-
exports.isMobile = isMobile;
|
|
176
|
-
exports.lazyImg = lazyImg;
|
|
177
|
-
exports.setTagsViewNameI18n = setTagsViewNameI18n;
|
|
178
|
-
exports.useTitle = useTitle;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var storage = require('../utils/storage.js');
|
|
4
|
-
var pinia = require('pinia');
|
|
5
|
-
var themeConfig$1 = require('../stores/themeConfig.js');
|
|
6
|
-
var logo = require('../theme-chalk/assets/logo.png.js');
|
|
7
|
-
var idleTimeout = require('./idleTimeout.js');
|
|
8
|
-
require('../api/index.js');
|
|
9
|
-
var index = require('../api/sys/index.js');
|
|
10
|
-
var index$1 = require('../api/base/index.js');
|
|
11
|
-
|
|
12
|
-
const storesThemeConfig = themeConfig$1.useThemeConfig();
|
|
13
|
-
const { themeConfig } = pinia.storeToRefs(storesThemeConfig);
|
|
14
|
-
async function loadSysInfo(tenantid) {
|
|
15
|
-
var _a;
|
|
16
|
-
const [err, res] = await index.feature(index$1.useBaseApi("sysTenant").gcomm(null, "sysInfo/" + Number(tenantid)));
|
|
17
|
-
if (err) {
|
|
18
|
-
themeConfig.value.logoUrl = logo.default;
|
|
19
|
-
storage.Local.remove("themeConfig");
|
|
20
|
-
storage.Local.set("themeConfig", storesThemeConfig.themeConfig);
|
|
21
|
-
return;
|
|
22
|
-
} else {
|
|
23
|
-
if (res.data.type != "success" || res.data.result == null) return;
|
|
24
|
-
const data = res.data.result;
|
|
25
|
-
themeConfig.value.logoUrl = data.logo;
|
|
26
|
-
themeConfig.value.globalTitle = data.title;
|
|
27
|
-
themeConfig.value.globalViceTitle = data.viceTitle;
|
|
28
|
-
themeConfig.value.globalViceTitleMsg = data.viceDesc;
|
|
29
|
-
themeConfig.value.icp = data.icp;
|
|
30
|
-
themeConfig.value.icpUrl = data.icpUrl;
|
|
31
|
-
themeConfig.value.isWatermark = data.watermark != null;
|
|
32
|
-
themeConfig.value.watermarkText = data.watermark;
|
|
33
|
-
themeConfig.value.copyright = data.copyright;
|
|
34
|
-
themeConfig.value.version = data.version;
|
|
35
|
-
themeConfig.value.carouselFiles = data.carouselFiles;
|
|
36
|
-
themeConfig.value.primary = data.themeColor;
|
|
37
|
-
themeConfig.value.layout = data.layout;
|
|
38
|
-
themeConfig.value.animation = data.animation;
|
|
39
|
-
themeConfig.value.secondVer = data.secondVer;
|
|
40
|
-
themeConfig.value.captcha = data.captcha;
|
|
41
|
-
themeConfig.value.forceChangePassword = data.forceChangePassword;
|
|
42
|
-
themeConfig.value.passwordExpirationTime = data.passwordExpirationTime;
|
|
43
|
-
themeConfig.value.i18NSwitch = data.i18NSwitch;
|
|
44
|
-
themeConfig.value.idleTimeout = data.idleTimeout;
|
|
45
|
-
themeConfig.value.onlineNotice = data.onlineNotice;
|
|
46
|
-
themeConfig.value.mobileLogin = data.mobileLogin;
|
|
47
|
-
themeConfig.value.scanLogin = data.scanLogin;
|
|
48
|
-
themeConfig.value.signUp = data.signUp;
|
|
49
|
-
window.__env__.VITE_SM_PUBLIC_KEY = data.publicKey;
|
|
50
|
-
updateFavicon(data.logo);
|
|
51
|
-
idleTimeout.updateIdleTimeout((_a = themeConfig.value.idleTimeout) != null ? _a : 0);
|
|
52
|
-
storage.Local.remove("themeConfig");
|
|
53
|
-
storage.Local.set("themeConfig", storesThemeConfig.themeConfig);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const updateFavicon = (url) => {
|
|
57
|
-
const favicon = document.getElementById("favicon");
|
|
58
|
-
favicon.href = url ? url : "data:;base64,=";
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
exports.loadSysInfo = loadSysInfo;
|
|
62
|
-
exports.updateFavicon = updateFavicon;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var userInfo = require('../stores/userInfo.js');
|
|
4
|
-
|
|
5
|
-
const { userInfos } = userInfo.useUserInfo();
|
|
6
|
-
const isSupperAdmin = () => {
|
|
7
|
-
return (userInfos == null ? void 0 : userInfos.accountType) === 999;
|
|
8
|
-
};
|
|
9
|
-
const isTenantAdmin = () => {
|
|
10
|
-
return (userInfos == null ? void 0 : userInfos.accountType) === 888;
|
|
11
|
-
};
|
|
12
|
-
const isAdmin = () => {
|
|
13
|
-
return isSupperAdmin() || isTenantAdmin();
|
|
14
|
-
};
|
|
15
|
-
const isNormalUser = () => {
|
|
16
|
-
return (userInfos == null ? void 0 : userInfos.accountType) === 777;
|
|
17
|
-
};
|
|
18
|
-
const isMember = () => {
|
|
19
|
-
return (userInfos == null ? void 0 : userInfos.accountType) === 666;
|
|
20
|
-
};
|
|
21
|
-
const userEmail = () => {
|
|
22
|
-
return userInfos == null ? void 0 : userInfos.email;
|
|
23
|
-
};
|
|
24
|
-
const userName = () => {
|
|
25
|
-
return userInfos == null ? void 0 : userInfos.userName;
|
|
26
|
-
};
|
|
27
|
-
const userFriendName = () => (userInfos == null ? void 0 : userInfos.realName) ? userInfos == null ? void 0 : userInfos.realName : (userInfos == null ? void 0 : userInfos.account) ? userInfos == null ? void 0 : userInfos.account : userInfos == null ? void 0 : userInfos.email;
|
|
28
|
-
const tenantId = () => {
|
|
29
|
-
return userInfos == null ? void 0 : userInfos.tenantId;
|
|
30
|
-
};
|
|
31
|
-
const userAccount = () => userInfos == null ? void 0 : userInfos.account;
|
|
32
|
-
const userPhone = () => userInfos == null ? void 0 : userInfos.phone;
|
|
33
|
-
const userId = () => userInfos == null ? void 0 : userInfos.id;
|
|
34
|
-
const orgId = () => userInfos == null ? void 0 : userInfos.orgId;
|
|
35
|
-
const orgName = () => userInfos == null ? void 0 : userInfos.orgName;
|
|
36
|
-
const posId = () => userInfos == null ? void 0 : userInfos.posId;
|
|
37
|
-
const posName = () => userInfos == null ? void 0 : userInfos.posName;
|
|
38
|
-
const roles = () => userInfos == null ? void 0 : userInfos.roles;
|
|
39
|
-
const hasRoleCode = (code) => {
|
|
40
|
-
return userInfos.roles.find((u) => u.code === code) ? true : false;
|
|
41
|
-
};
|
|
42
|
-
const hasPrivilege = (privilege) => {
|
|
43
|
-
return userInfos.authApiList.includes(privilege);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.hasPrivilege = hasPrivilege;
|
|
47
|
-
exports.hasRoleCode = hasRoleCode;
|
|
48
|
-
exports.isAdmin = isAdmin;
|
|
49
|
-
exports.isMember = isMember;
|
|
50
|
-
exports.isNormalUser = isNormalUser;
|
|
51
|
-
exports.isSupperAdmin = isSupperAdmin;
|
|
52
|
-
exports.isTenantAdmin = isTenantAdmin;
|
|
53
|
-
exports.orgId = orgId;
|
|
54
|
-
exports.orgName = orgName;
|
|
55
|
-
exports.posId = posId;
|
|
56
|
-
exports.posName = posName;
|
|
57
|
-
exports.roles = roles;
|
|
58
|
-
exports.tenantId = tenantId;
|
|
59
|
-
exports.userAccount = userAccount;
|
|
60
|
-
exports.userEmail = userEmail;
|
|
61
|
-
exports.userFriendName = userFriendName;
|
|
62
|
-
exports.userId = userId;
|
|
63
|
-
exports.userName = userName;
|
|
64
|
-
exports.userPhone = userPhone;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var img = "data:image/png;base64,iVBORw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68 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var SignalR = require('@microsoft/signalr');
|
|
4
|
-
var elementPlus = require('element-plus');
|
|
5
|
-
var request = require('./request.js');
|
|
6
|
-
|
|
7
|
-
function _interopNamespaceDefault(e) {
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var SignalR__namespace = /*#__PURE__*/_interopNamespaceDefault(SignalR);
|
|
25
|
-
|
|
26
|
-
const connection = new SignalR__namespace.HubConnectionBuilder().configureLogging(SignalR__namespace.LogLevel.Warning).withUrl(`${window.__env__.VITE_API_URL}/hubs/onlineUser?token=${request.getToken()}`, { transport: SignalR__namespace.HttpTransportType.WebSockets, skipNegotiation: true }).withAutomaticReconnect({
|
|
27
|
-
nextRetryDelayInMilliseconds: () => {
|
|
28
|
-
return 5e3;
|
|
29
|
-
}
|
|
30
|
-
}).build();
|
|
31
|
-
connection.keepAliveIntervalInMilliseconds = 15 * 1e3;
|
|
32
|
-
connection.serverTimeoutInMilliseconds = 30 * 1e3;
|
|
33
|
-
connection.start().then(() => {
|
|
34
|
-
});
|
|
35
|
-
connection.onclose(async () => {
|
|
36
|
-
});
|
|
37
|
-
connection.onreconnecting(() => {
|
|
38
|
-
elementPlus.ElNotification({
|
|
39
|
-
title: "\u63D0\u793A",
|
|
40
|
-
message: "\u8FDE\u63A5\u5DF2\u65AD\u5F00 >>>>>",
|
|
41
|
-
type: "error",
|
|
42
|
-
position: "bottom-right"
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
connection.onreconnected(() => {
|
|
46
|
-
elementPlus.ElNotification({
|
|
47
|
-
title: "\u63D0\u793A",
|
|
48
|
-
message: "\u8FDE\u63A5\u5DF2\u6062\u590D >>>>>",
|
|
49
|
-
type: "success",
|
|
50
|
-
position: "bottom-right"
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
connection.on("OnlineUserList", () => {
|
|
54
|
-
});
|
|
55
|
-
connection.on("ReceiveMessage", (message) => {
|
|
56
|
-
var tmpMsg = `<div style="white-space: pre-wrap;">${message.message}<div><br/>`;
|
|
57
|
-
tmpMsg += `<p style="color:#808080; font-size:10px;float:right"> ${message.sendUserName} ${message.sendTime}<p>`;
|
|
58
|
-
elementPlus.ElNotification({
|
|
59
|
-
title: `${message.title}`,
|
|
60
|
-
message: tmpMsg,
|
|
61
|
-
type: message.messageType.toString().toLowerCase(),
|
|
62
|
-
position: "top-right",
|
|
63
|
-
dangerouslyUseHTMLString: true,
|
|
64
|
-
duration: 5e3
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
exports.signalR = connection;
|