@fmdeui/fmui 1.0.56 → 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/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/index.js +44 -1
- package/index.min.js +5 -5
- package/index.min.mjs +5 -5
- package/index.mjs +43 -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 +26 -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 → index.css} +0 -0
- /package/lib/{defaults.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
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 };
|
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
|
};
|
|
@@ -19836,6 +19862,21 @@
|
|
|
19836
19862
|
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
19837
19863
|
}
|
|
19838
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
|
+
|
|
19839
19880
|
const useVxeTable = (opt, extras) => {
|
|
19840
19881
|
const vxeSize = useThemeConfig().themeConfig.globalComponentSize == "small" ? "mini" : useThemeConfig().themeConfig.globalComponentSize == "default" ? "small" : "medium";
|
|
19841
19882
|
const userStore = useUserInfo();
|
|
@@ -29755,6 +29796,7 @@
|
|
|
29755
29796
|
exports.getJWTDate = getJWTDate;
|
|
29756
29797
|
exports.getToken = getToken;
|
|
29757
29798
|
exports.getWeek = getWeek;
|
|
29799
|
+
exports.getpower = getpower;
|
|
29758
29800
|
exports.hAuth = hAuth;
|
|
29759
29801
|
exports.hAuthAll = hAuthAll;
|
|
29760
29802
|
exports.hAuths = hAuths;
|
|
@@ -29785,6 +29827,7 @@
|
|
|
29785
29827
|
exports.pinia = pinia;
|
|
29786
29828
|
exports.posId = posId;
|
|
29787
29829
|
exports.posName = posName;
|
|
29830
|
+
exports.powerAuthDel = powerAuthDel;
|
|
29788
29831
|
exports.provideFormEvents = provideFormEvents;
|
|
29789
29832
|
exports.reLoadLoginAccessToken = reLoadLoginAccessToken;
|
|
29790
29833
|
exports.refreshAccessTokenKey = refreshAccessTokenKey;
|