cloud-web-corejs 1.0.54-dev.751 → 1.0.54-dev.754
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/package.json +3 -1
- package/src/App.vue +1 -1
- package/src/components/baseInputNumber/index.vue +9 -9
- package/src/components/errorMsg/index.js +47 -3
- package/src/components/errorMsg/mixins.js +101 -4
- package/src/components/jsonImport/mixins.js +9 -7
- package/src/components/langImport/mixins.js +9 -7
- package/src/components/mobile/file/index.vue +10 -0
- package/src/components/wf/wf.js +20 -2
- package/src/components/xform/form-designer/designer.js +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +9 -7
- package/src/components/xform/form-designer/indexMixin.js +8 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +33 -2
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +11 -1
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +8 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +8 -1
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +1 -0
- package/src/components/xform/form-render/container-item/detail-item.vue +1 -0
- package/src/components/xform/form-render/indexMixin.js +23 -14
- package/src/components/xform/utils/util.js +11 -5
- package/src/directive/LimitNumber/index.js +130 -124
- package/src/index.js +4 -0
- package/src/layout/components/AppMain.vue +9 -7
- package/src/layout/defaultLayout.vue +8 -2
- package/src/microRouter/index.js +37 -20
- package/src/router/modules/customer.js +9 -0
- package/src/utils/aes.js +21 -2
- package/src/utils/global.js +370 -8
- package/src/utils/keepAlive.js +2 -2
- package/src/utils/validate.js +104 -1
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -0
- package/src/views/user/home/default2.vue +9 -2
- package/src/views/user/login/indexMixin.js +45 -11
|
@@ -92,6 +92,9 @@ export default {
|
|
|
92
92
|
beforeDestroy() {
|
|
93
93
|
this.clearQrLoginTimer();
|
|
94
94
|
this.clearSmsTimer();
|
|
95
|
+
// 兜底:登录组件随路由切换销毁时关闭跳转期 loading($baseLoading 挂在 body 上,
|
|
96
|
+
// 不随组件销毁自动关闭)
|
|
97
|
+
this.closeRedirectLoading();
|
|
95
98
|
},
|
|
96
99
|
created() {
|
|
97
100
|
this.init();
|
|
@@ -243,17 +246,14 @@ export default {
|
|
|
243
246
|
this.$store
|
|
244
247
|
.dispatch("user/login2", reqData)
|
|
245
248
|
.then((res) => {
|
|
246
|
-
setTimeout(function () {
|
|
247
|
-
loadingObj.close();
|
|
248
|
-
}, 200);
|
|
249
249
|
if (res.type == "success") {
|
|
250
250
|
localStorage.removeItem("currentMenuId");
|
|
251
251
|
this.rememberPassword();
|
|
252
|
-
/*this.$router.push({
|
|
253
|
-
path: '/'
|
|
254
|
-
});*/
|
|
255
|
-
this.loading = false;
|
|
256
252
|
window.removeEventListener("keydown", this.keyDown, false);
|
|
253
|
+
// 登录成功后的跳转链路(getWebPrefix → 路由守卫拉用户信息/生成动态路由 → 首页渲染)
|
|
254
|
+
// 耗时较长,loading 保持打开防止期间登录页被再次操作;
|
|
255
|
+
// 由 closeRedirectLoading 在跳转完成/中止/请求失败/组件销毁时统一收口
|
|
256
|
+
this.redirectLoadingObj = loadingObj;
|
|
257
257
|
this.handleRedirectUrl();
|
|
258
258
|
} else {
|
|
259
259
|
setTimeout(function () {
|
|
@@ -464,15 +464,29 @@ export default {
|
|
|
464
464
|
let ssotoken = this.searchParam.gatewayToken;
|
|
465
465
|
let xtoken = this.searchParam.xtoken;
|
|
466
466
|
if (prefix && prefix !== window.WEB_PREFIX) {
|
|
467
|
+
// 整页跳转,loading 随页面卸载消失
|
|
467
468
|
location.href = prefix + "/index.html" + path;
|
|
468
469
|
} else if (!!ssotoken || !!xtoken) {
|
|
469
470
|
prefix = prefix || window.WEB_PREFIX;
|
|
470
471
|
location.href = prefix + "/index.html" + path;
|
|
471
472
|
} else {
|
|
472
|
-
this.$router.push(
|
|
473
|
-
|
|
474
|
-
|
|
473
|
+
this.$router.push(
|
|
474
|
+
{
|
|
475
|
+
path: path,
|
|
476
|
+
},
|
|
477
|
+
() => {
|
|
478
|
+
// 跳转完成(守卫链+首页组件解析结束)
|
|
479
|
+
this.closeRedirectLoading();
|
|
480
|
+
},
|
|
481
|
+
() => {
|
|
482
|
+
// 跳转被中止(如守卫拉取用户信息失败后重定向回登录页),恢复登录页可操作
|
|
483
|
+
this.closeRedirectLoading(true);
|
|
484
|
+
}
|
|
485
|
+
);
|
|
475
486
|
}
|
|
487
|
+
}, () => {
|
|
488
|
+
// getWebPrefix 请求失败:恢复登录页可操作,避免 loading 永久卡死
|
|
489
|
+
this.closeRedirectLoading(true);
|
|
476
490
|
});
|
|
477
491
|
/*if (redirect && redirect.startsWith("/outLinkView")) {
|
|
478
492
|
let path = this.addParamToUrl(redirect, "hasToken", "true");
|
|
@@ -495,7 +509,7 @@ export default {
|
|
|
495
509
|
}
|
|
496
510
|
return url;
|
|
497
511
|
},
|
|
498
|
-
getWebPrefix(callback) {
|
|
512
|
+
getWebPrefix(callback, errorCallback) {
|
|
499
513
|
this.$http({
|
|
500
514
|
url: USER_PREFIX + "/auth/getWebPrefix",
|
|
501
515
|
method: `post`,
|
|
@@ -505,8 +519,28 @@ export default {
|
|
|
505
519
|
let webPrefix = res.objx;
|
|
506
520
|
callback && callback(webPrefix);
|
|
507
521
|
},
|
|
522
|
+
fail: () => {
|
|
523
|
+
errorCallback && errorCallback();
|
|
524
|
+
},
|
|
525
|
+
error: () => {
|
|
526
|
+
errorCallback && errorCallback();
|
|
527
|
+
},
|
|
508
528
|
});
|
|
509
529
|
},
|
|
530
|
+
/**
|
|
531
|
+
* 登录跳转期 loading 统一收口:跳转完成/中止、getWebPrefix 失败、组件销毁时调用。
|
|
532
|
+
* reenable=true 时恢复登录页可操作(跳转失败仍停留在登录页的场景)
|
|
533
|
+
*/
|
|
534
|
+
closeRedirectLoading(reenable) {
|
|
535
|
+
if (this.redirectLoadingObj) {
|
|
536
|
+
this.redirectLoadingObj.close();
|
|
537
|
+
this.redirectLoadingObj = null;
|
|
538
|
+
}
|
|
539
|
+
if (reenable) {
|
|
540
|
+
this.loading = false;
|
|
541
|
+
window.addEventListener("keydown", this.keyDown, false);
|
|
542
|
+
}
|
|
543
|
+
},
|
|
510
544
|
handleGatewayTokenLogin() {
|
|
511
545
|
let ssotoken = this.searchParam.gatewayToken;
|
|
512
546
|
let companycode = this.searchParam.entCode;
|