eoss-ui 0.6.84 → 0.6.85
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/lib/button-group.js +105 -93
- package/lib/button.js +105 -93
- package/lib/calogin.js +105 -93
- package/lib/checkbox-group.js +105 -93
- package/lib/data-table-form.js +105 -93
- package/lib/data-table.js +105 -93
- package/lib/date-picker.js +105 -93
- package/lib/dialog.js +105 -93
- package/lib/eoss-ui.common.js +416 -446
- package/lib/flow-group.js +112 -95
- package/lib/flow-list.js +105 -93
- package/lib/flow.js +185 -137
- package/lib/form.js +216 -264
- package/lib/handle-user.js +105 -93
- package/lib/handler.js +105 -93
- package/lib/icon.js +105 -93
- package/lib/icons.js +1 -1
- package/lib/index.js +1 -1
- package/lib/input-number.js +105 -93
- package/lib/input.js +105 -93
- package/lib/login.js +112 -97
- package/lib/main.js +105 -93
- package/lib/nav.js +105 -93
- package/lib/page.js +105 -93
- package/lib/pagination.js +105 -93
- package/lib/player.js +105 -93
- package/lib/qr-code.js +105 -93
- package/lib/radio-group.js +105 -93
- package/lib/retrial-auth.js +105 -93
- package/lib/select-ganged.js +105 -93
- package/lib/select.js +105 -93
- package/lib/selector-panel.js +105 -93
- package/lib/selector.js +123 -99
- package/lib/sizer.js +105 -93
- package/lib/steps.js +105 -93
- package/lib/switch.js +105 -93
- package/lib/table-form.js +164 -190
- package/lib/tabs.js +105 -93
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +105 -93
- package/lib/tree-group.js +105 -93
- package/lib/tree.js +105 -93
- package/lib/upload.js +105 -93
- package/lib/utils/util.js +105 -93
- package/lib/wujie.js +105 -93
- package/lib/wxlogin.js +105 -93
- package/package.json +1 -1
- package/packages/flow/src/component/taskUnionExamine.vue +17 -5
- package/packages/flow/src/main.vue +7 -3
- package/packages/flow/src/selectUser.vue +22 -8
- package/packages/flow/src/supervise.vue +1 -0
- package/packages/flow-group/src/main.vue +4 -0
- package/packages/form/src/main.vue +84 -72
- package/packages/form/src/table.vue +42 -36
- package/packages/icons/src/icon.json +1 -1
- package/packages/login/src/main.vue +5 -8
- package/packages/selector/src/main.vue +20 -4
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/icon.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/icon.scss +4 -0
- package/src/index.js +1 -1
- package/src/utils/util.js +141 -129
package/lib/selector.js
CHANGED
|
@@ -258,99 +258,7 @@ var ajax = function ajax(_ref) {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
if (response.status === 200) {
|
|
261
|
-
|
|
262
|
-
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
|
|
263
|
-
var href = '';
|
|
264
|
-
try {
|
|
265
|
-
href = win.top.location.href;
|
|
266
|
-
} catch (error) {
|
|
267
|
-
href = win.location.href;
|
|
268
|
-
}
|
|
269
|
-
if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
|
|
270
|
-
var remind = sessionStorage.getItem('remind');
|
|
271
|
-
if (!remind) {
|
|
272
|
-
clearTimeout(loginMsg);
|
|
273
|
-
loginMsg = setTimeout(function () {
|
|
274
|
-
sessionStorage.setItem('remind', 1);
|
|
275
|
-
eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
276
|
-
confirmButtonText: '确定',
|
|
277
|
-
closeOnClickModal: false,
|
|
278
|
-
type: 'warning'
|
|
279
|
-
} : {
|
|
280
|
-
confirmButtonText: '确定',
|
|
281
|
-
cancelButtonText: '取消',
|
|
282
|
-
closeOnClickModal: false,
|
|
283
|
-
type: 'warning'
|
|
284
|
-
}).then(function () {
|
|
285
|
-
try {
|
|
286
|
-
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
287
|
-
if (loginPage) {
|
|
288
|
-
var src = void 0;
|
|
289
|
-
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
290
|
-
var pathname = win.top.location.pathname;
|
|
291
|
-
if (pathname !== '/') {
|
|
292
|
-
pathname = pathname.split('/');
|
|
293
|
-
pathname.splice(pathname.length - 1);
|
|
294
|
-
pathname = pathname.join('/');
|
|
295
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
296
|
-
} else {
|
|
297
|
-
src = pathname + loginPage.replace('./', '');
|
|
298
|
-
}
|
|
299
|
-
} else {
|
|
300
|
-
src = loginPage;
|
|
301
|
-
}
|
|
302
|
-
win.top.location.href = src;
|
|
303
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
304
|
-
win.top.location.href = './login.html';
|
|
305
|
-
} else {
|
|
306
|
-
var hash = win.top.location.hash;
|
|
307
|
-
if (hash) {
|
|
308
|
-
var len = win.top.location.href.indexOf(hash);
|
|
309
|
-
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
310
|
-
} else {
|
|
311
|
-
win.top.location.href = '/login.html';
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
} catch (error) {
|
|
315
|
-
win.postMessage({ type: 1 }, '*');
|
|
316
|
-
}
|
|
317
|
-
}).catch(function (e) {
|
|
318
|
-
sessionStorage.removeItem('remind');
|
|
319
|
-
});
|
|
320
|
-
}, 2000);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
} else if (response.data.rCode === 61) {
|
|
324
|
-
clearTimeout(initAuth);
|
|
325
|
-
initAuth = setTimeout(function () {
|
|
326
|
-
Object(eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"])({
|
|
327
|
-
title: '请进行二次鉴权',
|
|
328
|
-
closeOnClickModal: false,
|
|
329
|
-
closeOnPressEscape: false,
|
|
330
|
-
showConfirmButton: false,
|
|
331
|
-
dangerouslyUseHTMLString: true,
|
|
332
|
-
scroll: false,
|
|
333
|
-
customClass: 'es-retrial-auth-msg',
|
|
334
|
-
render: function render(h, msgBox) {
|
|
335
|
-
return h('es-retrial-auth', {
|
|
336
|
-
ref: 'auth',
|
|
337
|
-
props: {
|
|
338
|
-
reload: response.data.results.reload || response.data.results.refresh,
|
|
339
|
-
group: response.data.results.retrialAuthGroupIds,
|
|
340
|
-
type: response.data.results.retrialAuthType,
|
|
341
|
-
msgBox: msgBox
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
},
|
|
345
|
-
callback: function callback(res, obj) {
|
|
346
|
-
obj.$children.forEach(function (item) {
|
|
347
|
-
item.clearTimeouts && item.clearTimeouts();
|
|
348
|
-
return;
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
}, 1000);
|
|
353
|
-
}
|
|
261
|
+
responses(response.data);
|
|
354
262
|
// eslint-disable-next-line no-undef
|
|
355
263
|
return Promise.resolve(JSON.parse(JSON.stringify(response.data)));
|
|
356
264
|
}
|
|
@@ -2871,6 +2779,109 @@ var replenish = function replenish(_ref15) {
|
|
|
2871
2779
|
return data;
|
|
2872
2780
|
};
|
|
2873
2781
|
|
|
2782
|
+
/**
|
|
2783
|
+
* responses
|
|
2784
|
+
* @desc:状态码响应
|
|
2785
|
+
* @author huangbo
|
|
2786
|
+
* @date 2022年5月7日
|
|
2787
|
+
* @param {object} [data] - 数字或字符串型数字
|
|
2788
|
+
**/
|
|
2789
|
+
var responses = function responses(data) {
|
|
2790
|
+
if (data.rCode === 64 || data.rCode === 65 || data.rCode === 67 || data.rCode === 69) {
|
|
2791
|
+
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
|
|
2792
|
+
var href = '';
|
|
2793
|
+
try {
|
|
2794
|
+
href = win.top.location.href;
|
|
2795
|
+
} catch (error) {
|
|
2796
|
+
href = win.location.href;
|
|
2797
|
+
}
|
|
2798
|
+
if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
|
|
2799
|
+
var remind = sessionStorage.getItem('remind');
|
|
2800
|
+
if (!remind) {
|
|
2801
|
+
clearTimeout(loginMsg);
|
|
2802
|
+
loginMsg = setTimeout(function () {
|
|
2803
|
+
sessionStorage.setItem('remind', 1);
|
|
2804
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"].confirm(data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', data.rCode === 69 ? {
|
|
2805
|
+
confirmButtonText: '确定',
|
|
2806
|
+
closeOnClickModal: false,
|
|
2807
|
+
type: 'warning'
|
|
2808
|
+
} : {
|
|
2809
|
+
confirmButtonText: '确定',
|
|
2810
|
+
cancelButtonText: '取消',
|
|
2811
|
+
closeOnClickModal: false,
|
|
2812
|
+
type: 'warning'
|
|
2813
|
+
}).then(function () {
|
|
2814
|
+
try {
|
|
2815
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
2816
|
+
if (loginPage) {
|
|
2817
|
+
var src = void 0;
|
|
2818
|
+
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
2819
|
+
var pathname = win.top.location.pathname;
|
|
2820
|
+
if (pathname !== '/') {
|
|
2821
|
+
pathname = pathname.split('/');
|
|
2822
|
+
pathname.splice(pathname.length - 1);
|
|
2823
|
+
pathname = pathname.join('/');
|
|
2824
|
+
src = pathname + '/' + loginPage.replace('./', '');
|
|
2825
|
+
} else {
|
|
2826
|
+
src = pathname + loginPage.replace('./', '');
|
|
2827
|
+
}
|
|
2828
|
+
} else {
|
|
2829
|
+
src = loginPage;
|
|
2830
|
+
}
|
|
2831
|
+
win.top.location.href = src;
|
|
2832
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2833
|
+
win.top.location.href = './login.html';
|
|
2834
|
+
} else {
|
|
2835
|
+
var hash = win.top.location.hash;
|
|
2836
|
+
if (hash) {
|
|
2837
|
+
var len = win.top.location.href.indexOf(hash);
|
|
2838
|
+
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
2839
|
+
} else {
|
|
2840
|
+
win.top.location.href = '/login.html';
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
} catch (error) {
|
|
2844
|
+
win.postMessage({ type: 1 }, '*');
|
|
2845
|
+
}
|
|
2846
|
+
}).catch(function (e) {
|
|
2847
|
+
sessionStorage.removeItem('remind');
|
|
2848
|
+
});
|
|
2849
|
+
}, 2000);
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
} else if (data.rCode === 61) {
|
|
2853
|
+
clearTimeout(initAuth);
|
|
2854
|
+
initAuth = setTimeout(function () {
|
|
2855
|
+
Object(eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"])({
|
|
2856
|
+
title: '请进行二次鉴权',
|
|
2857
|
+
closeOnClickModal: false,
|
|
2858
|
+
closeOnPressEscape: false,
|
|
2859
|
+
showConfirmButton: false,
|
|
2860
|
+
dangerouslyUseHTMLString: true,
|
|
2861
|
+
scroll: false,
|
|
2862
|
+
customClass: 'es-retrial-auth-msg',
|
|
2863
|
+
render: function render(h, msgBox) {
|
|
2864
|
+
return h('es-retrial-auth', {
|
|
2865
|
+
ref: 'auth',
|
|
2866
|
+
props: {
|
|
2867
|
+
reload: data.results.reload || data.results.refresh,
|
|
2868
|
+
group: data.results.retrialAuthGroupIds,
|
|
2869
|
+
type: data.results.retrialAuthType,
|
|
2870
|
+
msgBox: msgBox
|
|
2871
|
+
}
|
|
2872
|
+
});
|
|
2873
|
+
},
|
|
2874
|
+
callback: function callback(res, obj) {
|
|
2875
|
+
obj.$children.forEach(function (item) {
|
|
2876
|
+
item.clearTimeouts && item.clearTimeouts();
|
|
2877
|
+
return;
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2880
|
+
});
|
|
2881
|
+
}, 1000);
|
|
2882
|
+
}
|
|
2883
|
+
};
|
|
2884
|
+
|
|
2874
2885
|
/**
|
|
2875
2886
|
* rgbToHsv
|
|
2876
2887
|
* @desc:rgb转化成hsv
|
|
@@ -3527,6 +3538,7 @@ var watermark = function watermark(option) {
|
|
|
3527
3538
|
receiveMessage: receiveMessage,
|
|
3528
3539
|
removeStorage: removeStorage,
|
|
3529
3540
|
replenish: replenish,
|
|
3541
|
+
responses: responses,
|
|
3530
3542
|
rgbToHsv: rgbToHsv,
|
|
3531
3543
|
rmbToCapital: rmbToCapital,
|
|
3532
3544
|
sendMessage: sendMessage,
|
|
@@ -4143,7 +4155,7 @@ module.exports = require("axios");
|
|
|
4143
4155
|
// ESM COMPAT FLAG
|
|
4144
4156
|
__webpack_require__.r(__webpack_exports__);
|
|
4145
4157
|
|
|
4146
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/main.vue?vue&type=template&id=
|
|
4158
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/main.vue?vue&type=template&id=3cb8fed2&
|
|
4147
4159
|
var render = function () {
|
|
4148
4160
|
var _vm = this
|
|
4149
4161
|
var _h = _vm.$createElement
|
|
@@ -4315,7 +4327,8 @@ var render = function () {
|
|
|
4315
4327
|
attrs: {
|
|
4316
4328
|
closable:
|
|
4317
4329
|
!_vm.selectorDisabled &&
|
|
4318
|
-
!_vm.readonly
|
|
4330
|
+
!_vm.readonly &&
|
|
4331
|
+
_vm.selected.length > _vm.min,
|
|
4319
4332
|
type: "info",
|
|
4320
4333
|
"disable-transitions": "",
|
|
4321
4334
|
},
|
|
@@ -4722,7 +4735,7 @@ var staticRenderFns = []
|
|
|
4722
4735
|
render._withStripped = true
|
|
4723
4736
|
|
|
4724
4737
|
|
|
4725
|
-
// CONCATENATED MODULE: ./packages/selector/src/main.vue?vue&type=template&id=
|
|
4738
|
+
// CONCATENATED MODULE: ./packages/selector/src/main.vue?vue&type=template&id=3cb8fed2&
|
|
4726
4739
|
|
|
4727
4740
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
4728
4741
|
var util = __webpack_require__(0);
|
|
@@ -4960,6 +4973,8 @@ var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
|
4960
4973
|
//
|
|
4961
4974
|
//
|
|
4962
4975
|
//
|
|
4976
|
+
//
|
|
4977
|
+
//
|
|
4963
4978
|
|
|
4964
4979
|
|
|
4965
4980
|
|
|
@@ -5092,6 +5107,14 @@ var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
|
5092
5107
|
inputHeight: {
|
|
5093
5108
|
type: Number,
|
|
5094
5109
|
default: 40
|
|
5110
|
+
},
|
|
5111
|
+
min: {
|
|
5112
|
+
type: Number,
|
|
5113
|
+
default: 0
|
|
5114
|
+
},
|
|
5115
|
+
select: {
|
|
5116
|
+
type: Boolean,
|
|
5117
|
+
default: true
|
|
5095
5118
|
}
|
|
5096
5119
|
},
|
|
5097
5120
|
data: function data() {
|
|
@@ -5257,12 +5280,13 @@ var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
|
5257
5280
|
return util["a" /* default */].isObject(obj) ? obj[this.valueKey] : obj;
|
|
5258
5281
|
},
|
|
5259
5282
|
toggleMenu: function toggleMenu() {
|
|
5260
|
-
if (!this.selectorDisabled && !this.readonly && !this.filterable) {
|
|
5283
|
+
if (!this.selectorDisabled && !this.readonly && !this.filterable && this.select) {
|
|
5261
5284
|
this.visible = true;
|
|
5262
5285
|
}
|
|
5263
5286
|
},
|
|
5264
5287
|
openDialog: function openDialog() {
|
|
5265
|
-
|
|
5288
|
+
|
|
5289
|
+
if (!this.selectorDisabled && !this.readonly && this.select) {
|
|
5266
5290
|
this.visible = true;
|
|
5267
5291
|
}
|
|
5268
5292
|
},
|
|
@@ -5390,7 +5414,7 @@ var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
|
5390
5414
|
event;
|
|
5391
5415
|
item;
|
|
5392
5416
|
index = index === undefined ? 0 : index;
|
|
5393
|
-
this.selected.splice(index, 1);
|
|
5417
|
+
this.selected.length > this.min && this.selected.splice(index, 1);
|
|
5394
5418
|
},
|
|
5395
5419
|
resetInputHeight: function resetInputHeight() {
|
|
5396
5420
|
var _this4 = this;
|
package/lib/sizer.js
CHANGED
|
@@ -258,99 +258,7 @@ var ajax = function ajax(_ref) {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
if (response.status === 200) {
|
|
261
|
-
|
|
262
|
-
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
|
|
263
|
-
var href = '';
|
|
264
|
-
try {
|
|
265
|
-
href = win.top.location.href;
|
|
266
|
-
} catch (error) {
|
|
267
|
-
href = win.location.href;
|
|
268
|
-
}
|
|
269
|
-
if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
|
|
270
|
-
var remind = sessionStorage.getItem('remind');
|
|
271
|
-
if (!remind) {
|
|
272
|
-
clearTimeout(loginMsg);
|
|
273
|
-
loginMsg = setTimeout(function () {
|
|
274
|
-
sessionStorage.setItem('remind', 1);
|
|
275
|
-
eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
276
|
-
confirmButtonText: '确定',
|
|
277
|
-
closeOnClickModal: false,
|
|
278
|
-
type: 'warning'
|
|
279
|
-
} : {
|
|
280
|
-
confirmButtonText: '确定',
|
|
281
|
-
cancelButtonText: '取消',
|
|
282
|
-
closeOnClickModal: false,
|
|
283
|
-
type: 'warning'
|
|
284
|
-
}).then(function () {
|
|
285
|
-
try {
|
|
286
|
-
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
287
|
-
if (loginPage) {
|
|
288
|
-
var src = void 0;
|
|
289
|
-
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
290
|
-
var pathname = win.top.location.pathname;
|
|
291
|
-
if (pathname !== '/') {
|
|
292
|
-
pathname = pathname.split('/');
|
|
293
|
-
pathname.splice(pathname.length - 1);
|
|
294
|
-
pathname = pathname.join('/');
|
|
295
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
296
|
-
} else {
|
|
297
|
-
src = pathname + loginPage.replace('./', '');
|
|
298
|
-
}
|
|
299
|
-
} else {
|
|
300
|
-
src = loginPage;
|
|
301
|
-
}
|
|
302
|
-
win.top.location.href = src;
|
|
303
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
304
|
-
win.top.location.href = './login.html';
|
|
305
|
-
} else {
|
|
306
|
-
var hash = win.top.location.hash;
|
|
307
|
-
if (hash) {
|
|
308
|
-
var len = win.top.location.href.indexOf(hash);
|
|
309
|
-
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
310
|
-
} else {
|
|
311
|
-
win.top.location.href = '/login.html';
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
} catch (error) {
|
|
315
|
-
win.postMessage({ type: 1 }, '*');
|
|
316
|
-
}
|
|
317
|
-
}).catch(function (e) {
|
|
318
|
-
sessionStorage.removeItem('remind');
|
|
319
|
-
});
|
|
320
|
-
}, 2000);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
} else if (response.data.rCode === 61) {
|
|
324
|
-
clearTimeout(initAuth);
|
|
325
|
-
initAuth = setTimeout(function () {
|
|
326
|
-
Object(eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"])({
|
|
327
|
-
title: '请进行二次鉴权',
|
|
328
|
-
closeOnClickModal: false,
|
|
329
|
-
closeOnPressEscape: false,
|
|
330
|
-
showConfirmButton: false,
|
|
331
|
-
dangerouslyUseHTMLString: true,
|
|
332
|
-
scroll: false,
|
|
333
|
-
customClass: 'es-retrial-auth-msg',
|
|
334
|
-
render: function render(h, msgBox) {
|
|
335
|
-
return h('es-retrial-auth', {
|
|
336
|
-
ref: 'auth',
|
|
337
|
-
props: {
|
|
338
|
-
reload: response.data.results.reload || response.data.results.refresh,
|
|
339
|
-
group: response.data.results.retrialAuthGroupIds,
|
|
340
|
-
type: response.data.results.retrialAuthType,
|
|
341
|
-
msgBox: msgBox
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
},
|
|
345
|
-
callback: function callback(res, obj) {
|
|
346
|
-
obj.$children.forEach(function (item) {
|
|
347
|
-
item.clearTimeouts && item.clearTimeouts();
|
|
348
|
-
return;
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
}, 1000);
|
|
353
|
-
}
|
|
261
|
+
responses(response.data);
|
|
354
262
|
// eslint-disable-next-line no-undef
|
|
355
263
|
return Promise.resolve(JSON.parse(JSON.stringify(response.data)));
|
|
356
264
|
}
|
|
@@ -2871,6 +2779,109 @@ var replenish = function replenish(_ref15) {
|
|
|
2871
2779
|
return data;
|
|
2872
2780
|
};
|
|
2873
2781
|
|
|
2782
|
+
/**
|
|
2783
|
+
* responses
|
|
2784
|
+
* @desc:状态码响应
|
|
2785
|
+
* @author huangbo
|
|
2786
|
+
* @date 2022年5月7日
|
|
2787
|
+
* @param {object} [data] - 数字或字符串型数字
|
|
2788
|
+
**/
|
|
2789
|
+
var responses = function responses(data) {
|
|
2790
|
+
if (data.rCode === 64 || data.rCode === 65 || data.rCode === 67 || data.rCode === 69) {
|
|
2791
|
+
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
|
|
2792
|
+
var href = '';
|
|
2793
|
+
try {
|
|
2794
|
+
href = win.top.location.href;
|
|
2795
|
+
} catch (error) {
|
|
2796
|
+
href = win.location.href;
|
|
2797
|
+
}
|
|
2798
|
+
if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
|
|
2799
|
+
var remind = sessionStorage.getItem('remind');
|
|
2800
|
+
if (!remind) {
|
|
2801
|
+
clearTimeout(loginMsg);
|
|
2802
|
+
loginMsg = setTimeout(function () {
|
|
2803
|
+
sessionStorage.setItem('remind', 1);
|
|
2804
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"].confirm(data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', data.rCode === 69 ? {
|
|
2805
|
+
confirmButtonText: '确定',
|
|
2806
|
+
closeOnClickModal: false,
|
|
2807
|
+
type: 'warning'
|
|
2808
|
+
} : {
|
|
2809
|
+
confirmButtonText: '确定',
|
|
2810
|
+
cancelButtonText: '取消',
|
|
2811
|
+
closeOnClickModal: false,
|
|
2812
|
+
type: 'warning'
|
|
2813
|
+
}).then(function () {
|
|
2814
|
+
try {
|
|
2815
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
2816
|
+
if (loginPage) {
|
|
2817
|
+
var src = void 0;
|
|
2818
|
+
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
2819
|
+
var pathname = win.top.location.pathname;
|
|
2820
|
+
if (pathname !== '/') {
|
|
2821
|
+
pathname = pathname.split('/');
|
|
2822
|
+
pathname.splice(pathname.length - 1);
|
|
2823
|
+
pathname = pathname.join('/');
|
|
2824
|
+
src = pathname + '/' + loginPage.replace('./', '');
|
|
2825
|
+
} else {
|
|
2826
|
+
src = pathname + loginPage.replace('./', '');
|
|
2827
|
+
}
|
|
2828
|
+
} else {
|
|
2829
|
+
src = loginPage;
|
|
2830
|
+
}
|
|
2831
|
+
win.top.location.href = src;
|
|
2832
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2833
|
+
win.top.location.href = './login.html';
|
|
2834
|
+
} else {
|
|
2835
|
+
var hash = win.top.location.hash;
|
|
2836
|
+
if (hash) {
|
|
2837
|
+
var len = win.top.location.href.indexOf(hash);
|
|
2838
|
+
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
2839
|
+
} else {
|
|
2840
|
+
win.top.location.href = '/login.html';
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
} catch (error) {
|
|
2844
|
+
win.postMessage({ type: 1 }, '*');
|
|
2845
|
+
}
|
|
2846
|
+
}).catch(function (e) {
|
|
2847
|
+
sessionStorage.removeItem('remind');
|
|
2848
|
+
});
|
|
2849
|
+
}, 2000);
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
} else if (data.rCode === 61) {
|
|
2853
|
+
clearTimeout(initAuth);
|
|
2854
|
+
initAuth = setTimeout(function () {
|
|
2855
|
+
Object(eoss_element__WEBPACK_IMPORTED_MODULE_7__["MessageBox"])({
|
|
2856
|
+
title: '请进行二次鉴权',
|
|
2857
|
+
closeOnClickModal: false,
|
|
2858
|
+
closeOnPressEscape: false,
|
|
2859
|
+
showConfirmButton: false,
|
|
2860
|
+
dangerouslyUseHTMLString: true,
|
|
2861
|
+
scroll: false,
|
|
2862
|
+
customClass: 'es-retrial-auth-msg',
|
|
2863
|
+
render: function render(h, msgBox) {
|
|
2864
|
+
return h('es-retrial-auth', {
|
|
2865
|
+
ref: 'auth',
|
|
2866
|
+
props: {
|
|
2867
|
+
reload: data.results.reload || data.results.refresh,
|
|
2868
|
+
group: data.results.retrialAuthGroupIds,
|
|
2869
|
+
type: data.results.retrialAuthType,
|
|
2870
|
+
msgBox: msgBox
|
|
2871
|
+
}
|
|
2872
|
+
});
|
|
2873
|
+
},
|
|
2874
|
+
callback: function callback(res, obj) {
|
|
2875
|
+
obj.$children.forEach(function (item) {
|
|
2876
|
+
item.clearTimeouts && item.clearTimeouts();
|
|
2877
|
+
return;
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2880
|
+
});
|
|
2881
|
+
}, 1000);
|
|
2882
|
+
}
|
|
2883
|
+
};
|
|
2884
|
+
|
|
2874
2885
|
/**
|
|
2875
2886
|
* rgbToHsv
|
|
2876
2887
|
* @desc:rgb转化成hsv
|
|
@@ -3527,6 +3538,7 @@ var watermark = function watermark(option) {
|
|
|
3527
3538
|
receiveMessage: receiveMessage,
|
|
3528
3539
|
removeStorage: removeStorage,
|
|
3529
3540
|
replenish: replenish,
|
|
3541
|
+
responses: responses,
|
|
3530
3542
|
rgbToHsv: rgbToHsv,
|
|
3531
3543
|
rmbToCapital: rmbToCapital,
|
|
3532
3544
|
sendMessage: sendMessage,
|