@fmdeui/fmui 1.0.55 → 1.0.57
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 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/powerFunction.d.ts +12 -0
- package/es/index.mjs +1 -0
- package/es/packages/api/base/index.mjs +26 -0
- package/es/packages/hooks/index.mjs +1 -0
- package/es/packages/hooks/powerFunction.mjs +19 -0
- package/es/packages/stores/userInfo.mjs +4 -0
- package/index.js +48 -1
- package/index.min.js +5 -5
- package/index.min.mjs +5 -5
- package/index.mjs +47 -2
- package/lib/api/base/index.d.ts +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/powerFunction.d.ts +12 -0
- package/lib/index.js +3 -0
- package/lib/packages/api/base/index.js +26 -0
- package/lib/packages/hooks/index.js +3 -0
- package/lib/packages/hooks/powerFunction.js +22 -0
- package/lib/packages/stores/userInfo.js +4 -0
- 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/lib/{index.css → component.css} +0 -0
package/es/api/base/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const useBaseApi: (module: string, options?: CustomAxiosRequestCo
|
|
|
21
21
|
downloadTemplate: (cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
|
|
22
22
|
importData: (file: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
|
|
23
23
|
uploadFile: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
|
|
24
|
+
uploadFiles: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
|
|
24
25
|
};
|
|
25
26
|
export declare const useApi: (url: string, options?: CustomAxiosRequestConfig) => {
|
|
26
27
|
baseUrl: string;
|
package/es/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 单个权限验证
|
|
3
|
+
* @param value 权限值
|
|
4
|
+
* @returns 有权限,返回 有的`{authType:有,power:有,orgIds:有},反之则反 {authType:0,power:1,orgIds:null}
|
|
5
|
+
*/
|
|
6
|
+
export declare function getpower(value: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* 删除权限
|
|
9
|
+
* @param value 权限值
|
|
10
|
+
* @returns 删除成功,返回 `true`,反之则反
|
|
11
|
+
*/
|
|
12
|
+
export declare function powerAuthDel(value: string): boolean;
|
package/es/index.mjs
CHANGED
|
@@ -29,6 +29,7 @@ export { flowLoading } from './packages/utils/flowLoading.mjs';
|
|
|
29
29
|
export { formatAxis, formatDate, formatPast, getWeek } from './packages/utils/formatTime.mjs';
|
|
30
30
|
export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './packages/utils/gpsConvertor.mjs';
|
|
31
31
|
export { getFileUrl, showFileUrl } from './packages/utils/uploadfileurl.mjs';
|
|
32
|
+
export { getpower, powerAuthDel } from './packages/hooks/powerFunction.mjs';
|
|
32
33
|
export { hasPrivilege, hasRoleCode, isAdmin, isMember, isNormalUser, isSupperAdmin, isTenantAdmin, orgId, orgName, posId, posName, roles, tenantId, userAccount, userEmail, userFriendName, userId, userName, userPhone } from './packages/hooks/useInfo.mjs';
|
|
33
34
|
export { judgementIdCard, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl } from './packages/utils/toolsValidate.mjs';
|
|
34
35
|
export { loadSysInfo, updateFavicon } from './packages/hooks/sysInfo.mjs';
|
|
@@ -214,6 +214,32 @@ const useBaseApi = (module, options = {}) => {
|
|
|
214
214
|
},
|
|
215
215
|
cancel
|
|
216
216
|
);
|
|
217
|
+
},
|
|
218
|
+
uploadFiles: function(params, action, cancel = false) {
|
|
219
|
+
const formData = new FormData();
|
|
220
|
+
formData.append("files", params.files);
|
|
221
|
+
if (params.data) {
|
|
222
|
+
Object.keys(params.data).forEach((key) => {
|
|
223
|
+
const value = params.data[key];
|
|
224
|
+
if (Array.isArray(value)) {
|
|
225
|
+
value.forEach((item) => formData.append(`${key}[]`, item));
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
formData.append(key, params.data[key]);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
return request(
|
|
232
|
+
{
|
|
233
|
+
url: baseUrl + action,
|
|
234
|
+
method: "POST",
|
|
235
|
+
data: formData,
|
|
236
|
+
headers: {
|
|
237
|
+
"Content-Type": "multipart/form-data;charset=UTF-8",
|
|
238
|
+
ignoreCancelToken: true
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
cancel
|
|
242
|
+
);
|
|
217
243
|
}
|
|
218
244
|
};
|
|
219
245
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { buildLocaleContext, buildTranslator, translate, useLocale } from './useLocale.mjs';
|
|
2
2
|
export { auth, authAll, auths, hAuth, hAuthAll, hAuths } from './authFunction.mjs';
|
|
3
|
+
export { getpower, powerAuthDel } from './powerFunction.mjs';
|
|
3
4
|
export { useVxeTable } from './useVxeTableOptionsHook.mjs';
|
|
4
5
|
export { loadSysInfo, updateFavicon } from './sysInfo.mjs';
|
|
5
6
|
export { hasPrivilege, hasRoleCode, isAdmin, isMember, isNormalUser, isSupperAdmin, isTenantAdmin, orgId, orgName, posId, posName, roles, tenantId, userAccount, userEmail, userFriendName, userId, userName, userPhone } from './useInfo.mjs';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '../stores/index.mjs';
|
|
2
|
+
import { useUserInfo } from '../stores/userInfo.mjs';
|
|
3
|
+
|
|
4
|
+
function getpower(value) {
|
|
5
|
+
const stores = useUserInfo();
|
|
6
|
+
const matched = stores.userInfos.powers.find((v) => v.key === value);
|
|
7
|
+
if (matched) return matched;
|
|
8
|
+
return { authType: 0, power: 1, orgIds: null };
|
|
9
|
+
}
|
|
10
|
+
function powerAuthDel(value) {
|
|
11
|
+
const stores = useUserInfo();
|
|
12
|
+
const matched = stores.userInfos.powers.find((v) => v.key === value);
|
|
13
|
+
if (matched) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { getpower, powerAuthDel };
|
|
@@ -73,9 +73,13 @@ const useUserInfo = defineStore("userInfo", {
|
|
|
73
73
|
signature: d.signature,
|
|
74
74
|
orgId: d.orgId,
|
|
75
75
|
orgName: d.orgName,
|
|
76
|
+
cmpId: d.cmpId,
|
|
77
|
+
depId: d.depId,
|
|
78
|
+
groupId: d.groupId,
|
|
76
79
|
posName: d.posName,
|
|
77
80
|
posId: d.posId,
|
|
78
81
|
roles: d.roles,
|
|
82
|
+
powers: d.powers,
|
|
79
83
|
authApiList: d.apis,
|
|
80
84
|
lastChangePasswordTime: d.lastChangePasswordTime,
|
|
81
85
|
time: (/* @__PURE__ */ new Date()).getTime()
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.57 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
@@ -3292,6 +3292,32 @@
|
|
|
3292
3292
|
},
|
|
3293
3293
|
cancel
|
|
3294
3294
|
);
|
|
3295
|
+
},
|
|
3296
|
+
uploadFiles: function(params, action, cancel = false) {
|
|
3297
|
+
const formData = new FormData();
|
|
3298
|
+
formData.append("files", params.files);
|
|
3299
|
+
if (params.data) {
|
|
3300
|
+
Object.keys(params.data).forEach((key) => {
|
|
3301
|
+
const value = params.data[key];
|
|
3302
|
+
if (Array.isArray(value)) {
|
|
3303
|
+
value.forEach((item) => formData.append(`${key}[]`, item));
|
|
3304
|
+
return;
|
|
3305
|
+
}
|
|
3306
|
+
formData.append(key, params.data[key]);
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
return request(
|
|
3310
|
+
{
|
|
3311
|
+
url: baseUrl + action,
|
|
3312
|
+
method: "POST",
|
|
3313
|
+
data: formData,
|
|
3314
|
+
headers: {
|
|
3315
|
+
"Content-Type": "multipart/form-data;charset=UTF-8",
|
|
3316
|
+
ignoreCancelToken: true
|
|
3317
|
+
}
|
|
3318
|
+
},
|
|
3319
|
+
cancel
|
|
3320
|
+
);
|
|
3295
3321
|
}
|
|
3296
3322
|
};
|
|
3297
3323
|
};
|
|
@@ -3738,9 +3764,13 @@
|
|
|
3738
3764
|
signature: d.signature,
|
|
3739
3765
|
orgId: d.orgId,
|
|
3740
3766
|
orgName: d.orgName,
|
|
3767
|
+
cmpId: d.cmpId,
|
|
3768
|
+
depId: d.depId,
|
|
3769
|
+
groupId: d.groupId,
|
|
3741
3770
|
posName: d.posName,
|
|
3742
3771
|
posId: d.posId,
|
|
3743
3772
|
roles: d.roles,
|
|
3773
|
+
powers: d.powers,
|
|
3744
3774
|
authApiList: d.apis,
|
|
3745
3775
|
lastChangePasswordTime: d.lastChangePasswordTime,
|
|
3746
3776
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
@@ -19832,6 +19862,21 @@
|
|
|
19832
19862
|
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
19833
19863
|
}
|
|
19834
19864
|
|
|
19865
|
+
function getpower(value) {
|
|
19866
|
+
const stores = useUserInfo();
|
|
19867
|
+
const matched = stores.userInfos.powers.find((v) => v.key === value);
|
|
19868
|
+
if (matched) return matched;
|
|
19869
|
+
return { authType: 0, power: 1, orgIds: null };
|
|
19870
|
+
}
|
|
19871
|
+
function powerAuthDel(value) {
|
|
19872
|
+
const stores = useUserInfo();
|
|
19873
|
+
const matched = stores.userInfos.powers.find((v) => v.key === value);
|
|
19874
|
+
if (matched) {
|
|
19875
|
+
return true;
|
|
19876
|
+
}
|
|
19877
|
+
return false;
|
|
19878
|
+
}
|
|
19879
|
+
|
|
19835
19880
|
const useVxeTable = (opt, extras) => {
|
|
19836
19881
|
const vxeSize = useThemeConfig().themeConfig.globalComponentSize == "small" ? "mini" : useThemeConfig().themeConfig.globalComponentSize == "default" ? "small" : "medium";
|
|
19837
19882
|
const userStore = useUserInfo();
|
|
@@ -29751,6 +29796,7 @@
|
|
|
29751
29796
|
exports.getJWTDate = getJWTDate;
|
|
29752
29797
|
exports.getToken = getToken;
|
|
29753
29798
|
exports.getWeek = getWeek;
|
|
29799
|
+
exports.getpower = getpower;
|
|
29754
29800
|
exports.hAuth = hAuth;
|
|
29755
29801
|
exports.hAuthAll = hAuthAll;
|
|
29756
29802
|
exports.hAuths = hAuths;
|
|
@@ -29781,6 +29827,7 @@
|
|
|
29781
29827
|
exports.pinia = pinia;
|
|
29782
29828
|
exports.posId = posId;
|
|
29783
29829
|
exports.posName = posName;
|
|
29830
|
+
exports.powerAuthDel = powerAuthDel;
|
|
29784
29831
|
exports.provideFormEvents = provideFormEvents;
|
|
29785
29832
|
exports.reLoadLoginAccessToken = reLoadLoginAccessToken;
|
|
29786
29833
|
exports.refreshAccessTokenKey = refreshAccessTokenKey;
|