cloud-web-corejs 1.0.308 → 1.0.310
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
CHANGED
|
@@ -284,7 +284,7 @@ tmixins = {
|
|
|
284
284
|
method: `post`,
|
|
285
285
|
data: {operateTime: time},
|
|
286
286
|
modal: false,
|
|
287
|
-
...(silent ? {
|
|
287
|
+
...(silent ? { errorMsg: false } : {}),
|
|
288
288
|
success: res => {
|
|
289
289
|
let records = res.objx || [];
|
|
290
290
|
records.forEach(record => {
|
|
@@ -388,7 +388,7 @@ tmixins = {
|
|
|
388
388
|
direction: direction
|
|
389
389
|
},
|
|
390
390
|
modal: false,
|
|
391
|
-
...(silent ? {
|
|
391
|
+
...(silent ? { errorMsg: false } : {}),
|
|
392
392
|
success: res => {
|
|
393
393
|
let rows = res.objx || [];
|
|
394
394
|
if (rows.length) {
|
|
@@ -490,8 +490,7 @@ tmixins = {
|
|
|
490
490
|
method: `post`,
|
|
491
491
|
data: {},
|
|
492
492
|
modal: false,
|
|
493
|
-
|
|
494
|
-
ignore502: true,
|
|
493
|
+
errorMsg: false,
|
|
495
494
|
success: res => {
|
|
496
495
|
this.isExitsRead = res.objx === 1;
|
|
497
496
|
}
|
package/src/utils/request.js
CHANGED
|
@@ -511,7 +511,7 @@ service.interceptors.response.use(
|
|
|
511
511
|
// 所以只有整批请求全军覆没时才暴露出来 —— 正好就是详情页 mounted 一口气发
|
|
512
512
|
// 8+ 个 isLoading + modalStrictly 请求、网络一抖就整页白屏且滚动被锁死的场景。
|
|
513
513
|
// 下面两处一律 removeModel:正常情况下本来也会被别的请求关掉,行为不变。
|
|
514
|
-
if (handleRequestNetworkError()) {
|
|
514
|
+
if (handleRequestNetworkError()) {
|
|
515
515
|
removeModel(config);
|
|
516
516
|
return swallowError ? Promise.resolve() : Promise.reject(error);
|
|
517
517
|
}
|
|
@@ -545,7 +545,7 @@ service.interceptors.response.use(
|
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return swallowError ? Promise.resolve() : Promise.reject(error);
|
|
548
|
+
return swallowError ? Promise.resolve() : Promise.reject(error);
|
|
549
549
|
}
|
|
550
550
|
);
|
|
551
551
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* 因此无需注册表——归属靠访问路径结构 + 本应用 appCode 比较即可;独立运行 /
|
|
19
19
|
* 主应用态(appCode 为空、无 /micro/ 前缀)会自动退化为与历史一致的本地解析。
|
|
20
20
|
*
|
|
21
|
-
* webpack 硬约束:@base/views 与 @/views
|
|
21
|
+
* webpack 硬约束:@base/views 与 @/views 两条 require 必须保留字面前缀,
|
|
22
22
|
* 不可把前缀变量化,否则 webpack 无法收集 context。包被消费时 @base 指向包内
|
|
23
23
|
* views、@/ 指向消费应用 views——这正是 base / localPrivate 的语义来源。
|
|
24
24
|
*/
|
|
@@ -136,28 +136,22 @@ export function resolveViewPath(rawUrl, options = {}) {
|
|
|
136
136
|
return { kind: "localPrivate", base: false, rel: ensureVue(ensureLeadingSlash(path)) };
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
// ———
|
|
139
|
+
// ——— 以下为组件落地层(依赖 webpack context,不进纯函数单测) ———
|
|
140
140
|
|
|
141
141
|
function importBaseView(rel) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return Promise.reject(e);
|
|
147
|
-
}
|
|
142
|
+
try {
|
|
143
|
+
return Promise.resolve(require("@base/views" + rel));
|
|
144
|
+
} catch (e) {
|
|
145
|
+
return Promise.reject(e);
|
|
148
146
|
}
|
|
149
|
-
return import(/* webpackInclude: /\.vue$/ */ `@base/views${rel}`);
|
|
150
147
|
}
|
|
151
148
|
|
|
152
149
|
function importAppView(rel) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return Promise.reject(e);
|
|
158
|
-
}
|
|
150
|
+
try {
|
|
151
|
+
return Promise.resolve(require("@/views" + rel));
|
|
152
|
+
} catch (e) {
|
|
153
|
+
return Promise.reject(e);
|
|
159
154
|
}
|
|
160
|
-
return import(/* webpackInclude: /\.vue$/ */ `@/views${rel}`);
|
|
161
155
|
}
|
|
162
156
|
|
|
163
157
|
const viewModuleCache = new Map();
|
|
@@ -339,8 +339,8 @@ export default {
|
|
|
339
339
|
if (!this.activating) {
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
this.getWfInfoList(isLoading);
|
|
343
|
-
this.getUnreadMessageNum(isLoading);
|
|
342
|
+
this.getWfInfoList(isLoading, true);
|
|
343
|
+
this.getUnreadMessageNum(isLoading, true);
|
|
344
344
|
this.$emit("timerHandle");
|
|
345
345
|
},
|
|
346
346
|
clearTimer() {
|
|
@@ -621,32 +621,33 @@ export default {
|
|
|
621
621
|
},
|
|
622
622
|
});
|
|
623
623
|
},
|
|
624
|
-
getWfInfoList(isLoading) {
|
|
624
|
+
getWfInfoList(isLoading, silent = false) {
|
|
625
625
|
if (!this.activating) {
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
this.$http({
|
|
629
|
-
url: USER_PREFIX + "/wf_info/listPage",
|
|
628
|
+
this.$http({
|
|
629
|
+
url: USER_PREFIX + "/wf_info/listPage",
|
|
630
630
|
data: { type: 0, size: 20, searchCount: false },
|
|
631
631
|
method: "post",
|
|
632
632
|
isLoading: isLoading,
|
|
633
633
|
modal: isLoading || false,
|
|
634
634
|
// loadingTarget: document.body,
|
|
635
|
-
success: (res) => {
|
|
636
|
-
this.unDoWfRows =
|
|
637
|
-
res.objx && res.objx.records ? res.objx.records : [];
|
|
638
|
-
},
|
|
639
|
-
failMsg: false,
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
635
|
+
success: (res) => {
|
|
636
|
+
this.unDoWfRows =
|
|
637
|
+
res.objx && res.objx.records ? res.objx.records : [];
|
|
638
|
+
},
|
|
639
|
+
failMsg: false,
|
|
640
|
+
...(silent
|
|
641
|
+
? { errorMsg: false }
|
|
642
|
+
: { ignoreNetworkError: true, ignore502: true }),
|
|
643
|
+
fail: (res, response) => {
|
|
644
|
+
if (response && response.status == 200) {
|
|
645
|
+
this.$errorMsg(res);
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
});
|
|
648
649
|
},
|
|
649
|
-
getUnreadMessageNum(isLoading) {
|
|
650
|
+
getUnreadMessageNum(isLoading, silent = false) {
|
|
650
651
|
if (!this.activating) {
|
|
651
652
|
return;
|
|
652
653
|
}
|
|
@@ -657,18 +658,19 @@ export default {
|
|
|
657
658
|
isLoading: isLoading,
|
|
658
659
|
modal: isLoading || false,
|
|
659
660
|
// loadingTarget: document.body,
|
|
660
|
-
success: (res) => {
|
|
661
|
-
this.unreadMessageNum = res.objx || 0;
|
|
662
|
-
},
|
|
663
|
-
failMsg: false,
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
661
|
+
success: (res) => {
|
|
662
|
+
this.unreadMessageNum = res.objx || 0;
|
|
663
|
+
},
|
|
664
|
+
failMsg: false,
|
|
665
|
+
...(silent
|
|
666
|
+
? { errorMsg: false }
|
|
667
|
+
: { ignoreNetworkError: true, ignore502: true }),
|
|
668
|
+
fail: (res, response) => {
|
|
669
|
+
if (response && response.status == 200) {
|
|
670
|
+
this.$errorMsg(res);
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
});
|
|
672
674
|
},
|
|
673
675
|
wfhandleCallback(flag) {
|
|
674
676
|
if ([1, 2, 3].includes(flag)) {
|
|
@@ -578,8 +578,8 @@ export default {
|
|
|
578
578
|
if (!this.activating) {
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
|
-
this.getWfInfoList(isLoading);
|
|
582
|
-
this.getUnreadMessageNum(isLoading);
|
|
581
|
+
this.getWfInfoList(isLoading, true);
|
|
582
|
+
this.getUnreadMessageNum(isLoading, true);
|
|
583
583
|
this.$emit("timerHandle");
|
|
584
584
|
},
|
|
585
585
|
clearTimer() {
|
|
@@ -862,7 +862,7 @@ export default {
|
|
|
862
862
|
},
|
|
863
863
|
});
|
|
864
864
|
},
|
|
865
|
-
getWfInfoList(isLoading) {
|
|
865
|
+
getWfInfoList(isLoading, silent = false) {
|
|
866
866
|
if (!this.activating) {
|
|
867
867
|
return;
|
|
868
868
|
}
|
|
@@ -873,21 +873,22 @@ export default {
|
|
|
873
873
|
isLoading: isLoading,
|
|
874
874
|
modal: isLoading || false,
|
|
875
875
|
// loadingTarget: document.body,
|
|
876
|
-
success: (res) => {
|
|
877
|
-
this.unDoWfRows =
|
|
878
|
-
res.objx && res.objx.records ? res.objx.records : [];
|
|
879
|
-
},
|
|
880
|
-
failMsg: false,
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
876
|
+
success: (res) => {
|
|
877
|
+
this.unDoWfRows =
|
|
878
|
+
res.objx && res.objx.records ? res.objx.records : [];
|
|
879
|
+
},
|
|
880
|
+
failMsg: false,
|
|
881
|
+
...(silent
|
|
882
|
+
? { errorMsg: false }
|
|
883
|
+
: { ignoreNetworkError: true, ignore502: true }),
|
|
884
|
+
fail: (res, response) => {
|
|
885
|
+
if (response && response.status === 200) {
|
|
886
|
+
this.$errorMsg(res);
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
});
|
|
889
890
|
},
|
|
890
|
-
getUnreadMessageNum(isLoading) {
|
|
891
|
+
getUnreadMessageNum(isLoading, silent = false) {
|
|
891
892
|
if (!this.activating) {
|
|
892
893
|
return;
|
|
893
894
|
}
|
|
@@ -898,18 +899,19 @@ export default {
|
|
|
898
899
|
isLoading: isLoading,
|
|
899
900
|
modal: isLoading || false,
|
|
900
901
|
// loadingTarget: document.body,
|
|
901
|
-
success: (res) => {
|
|
902
|
-
this.unreadMessageNum = res.objx || 0;
|
|
903
|
-
},
|
|
904
|
-
failMsg: false,
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
902
|
+
success: (res) => {
|
|
903
|
+
this.unreadMessageNum = res.objx || 0;
|
|
904
|
+
},
|
|
905
|
+
failMsg: false,
|
|
906
|
+
...(silent
|
|
907
|
+
? { errorMsg: false }
|
|
908
|
+
: { ignoreNetworkError: true, ignore502: true }),
|
|
909
|
+
fail: (res, response) => {
|
|
910
|
+
if (response && response.status === 200) {
|
|
911
|
+
this.$errorMsg(res);
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
});
|
|
913
915
|
},
|
|
914
916
|
wfhandleCallback(flag) {
|
|
915
917
|
if ([1, 2, 3].includes(flag)) {
|