@fmdeui/fmui 1.0.56 → 1.0.58
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/index.mjs +1 -0
- package/es/packages/api/base/index.mjs +28 -0
- package/es/packages/hooks/index.mjs +1 -0
- package/es/packages/hooks/powerFunction.mjs +19 -0
- package/index.js +46 -1
- package/index.min.js +5 -5
- package/index.min.mjs +5 -5
- package/index.mjs +45 -2
- package/lib/api/base/index.d.ts +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/packages/api/base/index.js +28 -0
- package/lib/packages/hooks/index.js +3 -0
- package/lib/packages/hooks/powerFunction.js +22 -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/es/{defaults.css → component.css} +0 -0
- /package/lib/{defaults.css → index.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
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,34 @@ 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
|
+
params.files.forEach((f) => {
|
|
221
|
+
formData.append("files", f);
|
|
222
|
+
});
|
|
223
|
+
if (params.data) {
|
|
224
|
+
Object.keys(params.data).forEach((key) => {
|
|
225
|
+
const value = params.data[key];
|
|
226
|
+
if (Array.isArray(value)) {
|
|
227
|
+
value.forEach((item) => formData.append(`${key}[]`, item));
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
formData.append(key, params.data[key]);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return request(
|
|
234
|
+
{
|
|
235
|
+
url: baseUrl + action,
|
|
236
|
+
method: "POST",
|
|
237
|
+
data: formData,
|
|
238
|
+
headers: {
|
|
239
|
+
"Content-Type": "multipart/form-data;charset=UTF-8",
|
|
240
|
+
ignoreCancelToken: true
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
cancel
|
|
244
|
+
);
|
|
217
245
|
}
|
|
218
246
|
};
|
|
219
247
|
};
|
|
@@ -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 };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.58 */
|
|
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,34 @@
|
|
|
3292
3292
|
},
|
|
3293
3293
|
cancel
|
|
3294
3294
|
);
|
|
3295
|
+
},
|
|
3296
|
+
uploadFiles: function(params, action, cancel = false) {
|
|
3297
|
+
const formData = new FormData();
|
|
3298
|
+
params.files.forEach((f) => {
|
|
3299
|
+
formData.append("files", f);
|
|
3300
|
+
});
|
|
3301
|
+
if (params.data) {
|
|
3302
|
+
Object.keys(params.data).forEach((key) => {
|
|
3303
|
+
const value = params.data[key];
|
|
3304
|
+
if (Array.isArray(value)) {
|
|
3305
|
+
value.forEach((item) => formData.append(`${key}[]`, item));
|
|
3306
|
+
return;
|
|
3307
|
+
}
|
|
3308
|
+
formData.append(key, params.data[key]);
|
|
3309
|
+
});
|
|
3310
|
+
}
|
|
3311
|
+
return request(
|
|
3312
|
+
{
|
|
3313
|
+
url: baseUrl + action,
|
|
3314
|
+
method: "POST",
|
|
3315
|
+
data: formData,
|
|
3316
|
+
headers: {
|
|
3317
|
+
"Content-Type": "multipart/form-data;charset=UTF-8",
|
|
3318
|
+
ignoreCancelToken: true
|
|
3319
|
+
}
|
|
3320
|
+
},
|
|
3321
|
+
cancel
|
|
3322
|
+
);
|
|
3295
3323
|
}
|
|
3296
3324
|
};
|
|
3297
3325
|
};
|
|
@@ -19836,6 +19864,21 @@
|
|
|
19836
19864
|
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
19837
19865
|
}
|
|
19838
19866
|
|
|
19867
|
+
function getpower(value) {
|
|
19868
|
+
const stores = useUserInfo();
|
|
19869
|
+
const matched = stores.userInfos.powers.find((v) => v.key === value);
|
|
19870
|
+
if (matched) return matched;
|
|
19871
|
+
return { authType: 0, power: 1, orgIds: null };
|
|
19872
|
+
}
|
|
19873
|
+
function powerAuthDel(value) {
|
|
19874
|
+
const stores = useUserInfo();
|
|
19875
|
+
const matched = stores.userInfos.powers.find((v) => v.key === value);
|
|
19876
|
+
if (matched) {
|
|
19877
|
+
return true;
|
|
19878
|
+
}
|
|
19879
|
+
return false;
|
|
19880
|
+
}
|
|
19881
|
+
|
|
19839
19882
|
const useVxeTable = (opt, extras) => {
|
|
19840
19883
|
const vxeSize = useThemeConfig().themeConfig.globalComponentSize == "small" ? "mini" : useThemeConfig().themeConfig.globalComponentSize == "default" ? "small" : "medium";
|
|
19841
19884
|
const userStore = useUserInfo();
|
|
@@ -29755,6 +29798,7 @@
|
|
|
29755
29798
|
exports.getJWTDate = getJWTDate;
|
|
29756
29799
|
exports.getToken = getToken;
|
|
29757
29800
|
exports.getWeek = getWeek;
|
|
29801
|
+
exports.getpower = getpower;
|
|
29758
29802
|
exports.hAuth = hAuth;
|
|
29759
29803
|
exports.hAuthAll = hAuthAll;
|
|
29760
29804
|
exports.hAuths = hAuths;
|
|
@@ -29785,6 +29829,7 @@
|
|
|
29785
29829
|
exports.pinia = pinia;
|
|
29786
29830
|
exports.posId = posId;
|
|
29787
29831
|
exports.posName = posName;
|
|
29832
|
+
exports.powerAuthDel = powerAuthDel;
|
|
29788
29833
|
exports.provideFormEvents = provideFormEvents;
|
|
29789
29834
|
exports.reLoadLoginAccessToken = reLoadLoginAccessToken;
|
|
29790
29835
|
exports.refreshAccessTokenKey = refreshAccessTokenKey;
|