eoss-ui 0.4.31 → 0.4.33
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/CHANGELOG.md +929 -0
- package/lib/button-group.js +33 -61
- package/lib/button.js +33 -61
- package/lib/checkbox-group.js +33 -61
- package/lib/data-table-form.js +33 -61
- package/lib/data-table.js +47 -67
- package/lib/date-picker.js +33 -61
- package/lib/dialog.js +33 -61
- package/lib/eoss-ui.common.js +197 -174
- package/lib/flow-group.js +43 -67
- package/lib/flow-list.js +33 -61
- package/lib/flow.js +33 -61
- package/lib/form.js +38 -65
- package/lib/handle-user.js +33 -61
- package/lib/handler.js +33 -61
- package/lib/index.js +1 -1
- package/lib/input-number.js +33 -61
- package/lib/input.js +33 -61
- package/lib/login.js +47 -72
- package/lib/main.js +58 -75
- package/lib/mainComp.js +36 -68
- package/lib/nav.js +33 -61
- package/lib/page.js +33 -61
- package/lib/player.js +33 -61
- package/lib/qr-code.js +33 -61
- package/lib/radio-group.js +33 -61
- package/lib/select-ganged.js +33 -61
- package/lib/select.js +33 -61
- package/lib/selector-panel.js +33 -61
- package/lib/selector.js +33 -61
- package/lib/sizer.js +33 -61
- package/lib/steps.js +33 -61
- package/lib/switch.js +33 -61
- package/lib/table-form.js +33 -61
- package/lib/tabs.js +33 -61
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/tips.js +33 -61
- package/lib/tree-group.js +43 -63
- package/lib/tree.js +48 -63
- package/lib/upload.js +61 -82
- package/lib/utils/util.js +33 -61
- package/lib/wujie.js +33 -61
- package/lib/wxlogin.js +33 -61
- package/package.json +2 -2
- package/packages/data-table/src/main.vue +9 -2
- package/packages/flow-group/src/main.vue +5 -4
- package/packages/form/src/main.vue +4 -2
- package/packages/login/src/main.vue +12 -9
- package/packages/main/src/main.vue +13 -3
- package/packages/main/src/userinfo.vue +21 -24
- package/packages/mainComp/src/main.vue +1 -5
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/form.scss +1 -1
- package/packages/tree/src/main.vue +12 -0
- package/packages/tree-group/src/main.vue +6 -0
- package/packages/upload/src/main.vue +25 -25
- package/src/index.js +1 -1
- package/src/utils/util.js +50 -77
package/lib/upload.js
CHANGED
|
@@ -126,6 +126,7 @@ var $brightnessStep2 = 0.15;
|
|
|
126
126
|
var $lightColorCount = 5;
|
|
127
127
|
var $darkColorCount = 4;
|
|
128
128
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
129
|
+
var loginMsg = void 0;
|
|
129
130
|
|
|
130
131
|
var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
|
|
131
132
|
|
|
@@ -147,7 +148,6 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
147
148
|
* @param {Object} [loading] - loading加载对象
|
|
148
149
|
**/
|
|
149
150
|
// 请求
|
|
150
|
-
var _timer = null;
|
|
151
151
|
var pendingRequest = new Map();
|
|
152
152
|
function getRequestKey(config) {
|
|
153
153
|
var method = config.method,
|
|
@@ -246,44 +246,36 @@ var ajax = function ajax(_ref) {
|
|
|
246
246
|
if (response.status === 200) {
|
|
247
247
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
248
248
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
268
|
-
win.top.location.href = './login.html';
|
|
269
|
-
} else {
|
|
270
|
-
var hash = win.top.location.hash;
|
|
271
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
272
|
-
var len = win.top.location.href.indexOf(hash);
|
|
273
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
274
|
-
win.top.location.href = href;
|
|
249
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
250
|
+
clearTimeout(loginMsg);
|
|
251
|
+
loginMsg = setTimeout(function () {
|
|
252
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
253
|
+
confirmButtonText: '确定',
|
|
254
|
+
closeOnClickModal: false,
|
|
255
|
+
type: 'warning'
|
|
256
|
+
} : {
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消',
|
|
259
|
+
closeOnClickModal: false,
|
|
260
|
+
type: 'warning'
|
|
261
|
+
}).then(function () {
|
|
262
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
263
|
+
if (loginPage) {
|
|
264
|
+
win.top.location.href = loginPage;
|
|
265
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
266
|
+
win.top.location.href = './login.html';
|
|
275
267
|
} else {
|
|
276
|
-
win.top.location.
|
|
268
|
+
var hash = win.top.location.hash;
|
|
269
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
270
|
+
var len = win.top.location.href.indexOf(hash);
|
|
271
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
272
|
+
win.top.location.href = href;
|
|
273
|
+
} else {
|
|
274
|
+
win.top.location.href = '/login.html';
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
_timer && clearTimeout(_timer);
|
|
281
|
-
_timer = setTimeout(function () {
|
|
282
|
-
removeStorage('timer');
|
|
283
|
-
clearTimeout(_timer);
|
|
284
|
-
_timer = null;
|
|
285
|
-
}, 1000);
|
|
286
|
-
});
|
|
277
|
+
}).catch(function (e) {});
|
|
278
|
+
}, 1000);
|
|
287
279
|
}
|
|
288
280
|
return Promise.reject(response.data);
|
|
289
281
|
} else {
|
|
@@ -427,31 +419,11 @@ var browser = function browser() {
|
|
|
427
419
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
428
420
|
**/
|
|
429
421
|
|
|
430
|
-
var debounce = function debounce(
|
|
431
|
-
var timeout =
|
|
422
|
+
var debounce = function debounce(callback, delay) {
|
|
423
|
+
var timeout = null;
|
|
432
424
|
return function () {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (timeout) clearTimeout(timeout);
|
|
437
|
-
// 是否在某一批事件中首次执行
|
|
438
|
-
if (immediate) {
|
|
439
|
-
var callNow = !timeout;
|
|
440
|
-
timeout = setTimeout(function () {
|
|
441
|
-
timeout = null;
|
|
442
|
-
fn.apply(self, args);
|
|
443
|
-
immediate = true;
|
|
444
|
-
}, wait);
|
|
445
|
-
if (callNow) {
|
|
446
|
-
fn.apply(self, args);
|
|
447
|
-
}
|
|
448
|
-
immediate = false;
|
|
449
|
-
} else {
|
|
450
|
-
timeout = setTimeout(function () {
|
|
451
|
-
fn.apply(self, args);
|
|
452
|
-
immediate = true;
|
|
453
|
-
}, wait);
|
|
454
|
-
}
|
|
425
|
+
clearTimeout(timeout);
|
|
426
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
455
427
|
};
|
|
456
428
|
};
|
|
457
429
|
/**
|
|
@@ -2685,8 +2657,8 @@ module.exports = require("qs");
|
|
|
2685
2657
|
// ESM COMPAT FLAG
|
|
2686
2658
|
__webpack_require__.r(__webpack_exports__);
|
|
2687
2659
|
|
|
2688
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=
|
|
2689
|
-
var
|
|
2660
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=4c9c8dba&
|
|
2661
|
+
var mainvue_type_template_id_4c9c8dba_render = function () {
|
|
2690
2662
|
var _vm = this
|
|
2691
2663
|
var _h = _vm.$createElement
|
|
2692
2664
|
var _c = _vm._self._c || _h
|
|
@@ -3020,10 +2992,10 @@ var mainvue_type_template_id_0f78a687_render = function () {
|
|
|
3020
2992
|
)
|
|
3021
2993
|
}
|
|
3022
2994
|
var staticRenderFns = []
|
|
3023
|
-
|
|
2995
|
+
mainvue_type_template_id_4c9c8dba_render._withStripped = true
|
|
3024
2996
|
|
|
3025
2997
|
|
|
3026
|
-
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=
|
|
2998
|
+
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=4c9c8dba&
|
|
3027
2999
|
|
|
3028
3000
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
3029
3001
|
var api = __webpack_require__(1);
|
|
@@ -3553,35 +3525,42 @@ var _props;
|
|
|
3553
3525
|
if (typeof this.image === 'string') {
|
|
3554
3526
|
return this.image;
|
|
3555
3527
|
}
|
|
3556
|
-
return this.host +
|
|
3528
|
+
return this.host + this.previewAdjunct + '?adjunctId=' + this.image.adjunctId;
|
|
3557
3529
|
}
|
|
3558
3530
|
if (this.value) {
|
|
3559
3531
|
if (typeof this.value === 'string') {
|
|
3560
|
-
if (this.value.indexOf('data:image/') ===
|
|
3532
|
+
if (this.value.indexOf('data:image/') === 0) {
|
|
3533
|
+
return this.value;
|
|
3534
|
+
} else if (this.value.indexOf(this.previewAdjunct) > -1) {
|
|
3561
3535
|
var val = this.host + util["a" /* default */].jointUrl({
|
|
3562
3536
|
url: this.value,
|
|
3563
3537
|
reg: '/main2'
|
|
3564
3538
|
});
|
|
3565
3539
|
return val;
|
|
3566
|
-
}
|
|
3567
|
-
|
|
3568
|
-
return this.host + api["bb" /* previewAdjunct */] + '?adjunctId=' + this.value;
|
|
3540
|
+
} else if (this.value.indexOf('/') === -1) {
|
|
3541
|
+
return this.host + this.previewAdjunct + '?adjunctId=' + this.value;
|
|
3569
3542
|
}
|
|
3570
3543
|
return this.value;
|
|
3571
3544
|
} else if (Array.isArray(this.value)) {
|
|
3572
3545
|
var adjunctId = this.value[0].response ? this.value[0].response.adjunctId : this.value[0].adjunctId;
|
|
3573
|
-
return this.host +
|
|
3546
|
+
return this.host + this.previewAdjunct + '?adjunctId=' + adjunctId;
|
|
3574
3547
|
} else {
|
|
3575
3548
|
var _adjunctId = this.value.response ? this.value.response.adjunctId : this.value.adjunctId;
|
|
3576
|
-
return this.host +
|
|
3549
|
+
return this.host + this.previewAdjunct + '?adjunctId=' + _adjunctId;
|
|
3577
3550
|
}
|
|
3578
3551
|
}
|
|
3579
|
-
if (this.photo && typeof this.photo === 'string'
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3552
|
+
if (this.photo && typeof this.photo === 'string') {
|
|
3553
|
+
if (this.photo.indexOf('data:image/') === 0) {
|
|
3554
|
+
return this.photo;
|
|
3555
|
+
} else if (this.photo.indexOf(this.previewAdjunct) > -1) {
|
|
3556
|
+
var _val = this.host + util["a" /* default */].jointUrl({
|
|
3557
|
+
url: this.value,
|
|
3558
|
+
reg: '/main2'
|
|
3559
|
+
});
|
|
3560
|
+
return _val;
|
|
3561
|
+
} else if (this.photo.indexOf('/') === -1) {
|
|
3562
|
+
return this.host + this.previewAdjunct + '?adjunctId=' + this.photo;
|
|
3563
|
+
}
|
|
3585
3564
|
}
|
|
3586
3565
|
return this.photo;
|
|
3587
3566
|
}
|
|
@@ -3734,7 +3713,7 @@ var _props;
|
|
|
3734
3713
|
} else if (suffix.includes('pdf')) {
|
|
3735
3714
|
util["a" /* default */].win.open(this.host + (url ? url : api["cb" /* previewAdjunct2 */]) + '/' + file.originalName + '?adjunctId=' + file.adjunctId);
|
|
3736
3715
|
} else if (suffix.includes('jpge') || suffix.includes('jpg') || suffix.includes('gif') || suffix.includes('png')) {
|
|
3737
|
-
this.imgUrl = this.host + (url ? url :
|
|
3716
|
+
this.imgUrl = this.host + (url ? url : this.previewAdjunct) + '?adjunctId=' + file.adjunctId;
|
|
3738
3717
|
this.title = file.originalName;
|
|
3739
3718
|
this.showImg = true;
|
|
3740
3719
|
this.$nextTick(function () {
|
|
@@ -3742,12 +3721,12 @@ var _props;
|
|
|
3742
3721
|
});
|
|
3743
3722
|
} else if (suffix.includes('mp4')) {
|
|
3744
3723
|
this.source = {
|
|
3745
|
-
src: this.host + (url ? url :
|
|
3724
|
+
src: this.host + (url ? url : this.previewAdjunct) + '?adjunctId=' + file.adjunctId
|
|
3746
3725
|
};
|
|
3747
3726
|
this.title = file.originalName;
|
|
3748
3727
|
this.showVideo = true;
|
|
3749
3728
|
} else {
|
|
3750
|
-
util["a" /* default */].win.open(this.host + (url ? url :
|
|
3729
|
+
util["a" /* default */].win.open(this.host + (url ? url : this.previewAdjunct) + '?adjunctId=' + file.adjunctId);
|
|
3751
3730
|
}
|
|
3752
3731
|
} else {
|
|
3753
3732
|
util["a" /* default */].win.open(URL.createObjectURL(file.raw));
|
|
@@ -4014,7 +3993,7 @@ var componentNormalizer = __webpack_require__(2);
|
|
|
4014
3993
|
|
|
4015
3994
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
4016
3995
|
src_mainvue_type_script_lang_js_,
|
|
4017
|
-
|
|
3996
|
+
mainvue_type_template_id_4c9c8dba_render,
|
|
4018
3997
|
staticRenderFns,
|
|
4019
3998
|
false,
|
|
4020
3999
|
null,
|
package/lib/utils/util.js
CHANGED
|
@@ -41,6 +41,7 @@ var $brightnessStep2 = 0.15;
|
|
|
41
41
|
var $lightColorCount = 5;
|
|
42
42
|
var $darkColorCount = 4;
|
|
43
43
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
44
|
+
var loginMsg = void 0;
|
|
44
45
|
|
|
45
46
|
var JSONbigToString = (0, _jsonBigint2.default)({ storeAsString: true });
|
|
46
47
|
|
|
@@ -62,7 +63,6 @@ var JSONbigToString = (0, _jsonBigint2.default)({ storeAsString: true });
|
|
|
62
63
|
* @param {Object} [loading] - loading加载对象
|
|
63
64
|
**/
|
|
64
65
|
// 请求
|
|
65
|
-
var _timer = null;
|
|
66
66
|
var pendingRequest = new Map();
|
|
67
67
|
function getRequestKey(config) {
|
|
68
68
|
var method = config.method,
|
|
@@ -161,44 +161,36 @@ var ajax = function ajax(_ref) {
|
|
|
161
161
|
if (response.status === 200) {
|
|
162
162
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
163
163
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
183
|
-
win.top.location.href = './login.html';
|
|
184
|
-
} else {
|
|
185
|
-
var hash = win.top.location.hash;
|
|
186
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
187
|
-
var len = win.top.location.href.indexOf(hash);
|
|
188
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
189
|
-
win.top.location.href = href;
|
|
164
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
165
|
+
clearTimeout(loginMsg);
|
|
166
|
+
loginMsg = setTimeout(function () {
|
|
167
|
+
_eossElement.MessageBox.confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
168
|
+
confirmButtonText: '确定',
|
|
169
|
+
closeOnClickModal: false,
|
|
170
|
+
type: 'warning'
|
|
171
|
+
} : {
|
|
172
|
+
confirmButtonText: '确定',
|
|
173
|
+
cancelButtonText: '取消',
|
|
174
|
+
closeOnClickModal: false,
|
|
175
|
+
type: 'warning'
|
|
176
|
+
}).then(function () {
|
|
177
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
178
|
+
if (loginPage) {
|
|
179
|
+
win.top.location.href = loginPage;
|
|
180
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
181
|
+
win.top.location.href = './login.html';
|
|
190
182
|
} else {
|
|
191
|
-
win.top.location.
|
|
183
|
+
var hash = win.top.location.hash;
|
|
184
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
185
|
+
var len = win.top.location.href.indexOf(hash);
|
|
186
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
187
|
+
win.top.location.href = href;
|
|
188
|
+
} else {
|
|
189
|
+
win.top.location.href = '/login.html';
|
|
190
|
+
}
|
|
192
191
|
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
_timer && clearTimeout(_timer);
|
|
196
|
-
_timer = setTimeout(function () {
|
|
197
|
-
removeStorage('timer');
|
|
198
|
-
clearTimeout(_timer);
|
|
199
|
-
_timer = null;
|
|
200
|
-
}, 1000);
|
|
201
|
-
});
|
|
192
|
+
}).catch(function (e) {});
|
|
193
|
+
}, 1000);
|
|
202
194
|
}
|
|
203
195
|
return Promise.reject(response.data);
|
|
204
196
|
} else {
|
|
@@ -342,31 +334,11 @@ var browser = function browser() {
|
|
|
342
334
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
343
335
|
**/
|
|
344
336
|
|
|
345
|
-
var debounce = function debounce(
|
|
346
|
-
var timeout =
|
|
337
|
+
var debounce = function debounce(callback, delay) {
|
|
338
|
+
var timeout = null;
|
|
347
339
|
return function () {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
if (timeout) clearTimeout(timeout);
|
|
352
|
-
// 是否在某一批事件中首次执行
|
|
353
|
-
if (immediate) {
|
|
354
|
-
var callNow = !timeout;
|
|
355
|
-
timeout = setTimeout(function () {
|
|
356
|
-
timeout = null;
|
|
357
|
-
fn.apply(self, args);
|
|
358
|
-
immediate = true;
|
|
359
|
-
}, wait);
|
|
360
|
-
if (callNow) {
|
|
361
|
-
fn.apply(self, args);
|
|
362
|
-
}
|
|
363
|
-
immediate = false;
|
|
364
|
-
} else {
|
|
365
|
-
timeout = setTimeout(function () {
|
|
366
|
-
fn.apply(self, args);
|
|
367
|
-
immediate = true;
|
|
368
|
-
}, wait);
|
|
369
|
-
}
|
|
340
|
+
clearTimeout(timeout);
|
|
341
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
370
342
|
};
|
|
371
343
|
};
|
|
372
344
|
/**
|
package/lib/wujie.js
CHANGED
|
@@ -126,6 +126,7 @@ var $brightnessStep2 = 0.15;
|
|
|
126
126
|
var $lightColorCount = 5;
|
|
127
127
|
var $darkColorCount = 4;
|
|
128
128
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
129
|
+
var loginMsg = void 0;
|
|
129
130
|
|
|
130
131
|
var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
|
|
131
132
|
|
|
@@ -147,7 +148,6 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
147
148
|
* @param {Object} [loading] - loading加载对象
|
|
148
149
|
**/
|
|
149
150
|
// 请求
|
|
150
|
-
var _timer = null;
|
|
151
151
|
var pendingRequest = new Map();
|
|
152
152
|
function getRequestKey(config) {
|
|
153
153
|
var method = config.method,
|
|
@@ -246,44 +246,36 @@ var ajax = function ajax(_ref) {
|
|
|
246
246
|
if (response.status === 200) {
|
|
247
247
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
248
248
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
268
|
-
win.top.location.href = './login.html';
|
|
269
|
-
} else {
|
|
270
|
-
var hash = win.top.location.hash;
|
|
271
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
272
|
-
var len = win.top.location.href.indexOf(hash);
|
|
273
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
274
|
-
win.top.location.href = href;
|
|
249
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
250
|
+
clearTimeout(loginMsg);
|
|
251
|
+
loginMsg = setTimeout(function () {
|
|
252
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
253
|
+
confirmButtonText: '确定',
|
|
254
|
+
closeOnClickModal: false,
|
|
255
|
+
type: 'warning'
|
|
256
|
+
} : {
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消',
|
|
259
|
+
closeOnClickModal: false,
|
|
260
|
+
type: 'warning'
|
|
261
|
+
}).then(function () {
|
|
262
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
263
|
+
if (loginPage) {
|
|
264
|
+
win.top.location.href = loginPage;
|
|
265
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
266
|
+
win.top.location.href = './login.html';
|
|
275
267
|
} else {
|
|
276
|
-
win.top.location.
|
|
268
|
+
var hash = win.top.location.hash;
|
|
269
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
270
|
+
var len = win.top.location.href.indexOf(hash);
|
|
271
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
272
|
+
win.top.location.href = href;
|
|
273
|
+
} else {
|
|
274
|
+
win.top.location.href = '/login.html';
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
_timer && clearTimeout(_timer);
|
|
281
|
-
_timer = setTimeout(function () {
|
|
282
|
-
removeStorage('timer');
|
|
283
|
-
clearTimeout(_timer);
|
|
284
|
-
_timer = null;
|
|
285
|
-
}, 1000);
|
|
286
|
-
});
|
|
277
|
+
}).catch(function (e) {});
|
|
278
|
+
}, 1000);
|
|
287
279
|
}
|
|
288
280
|
return Promise.reject(response.data);
|
|
289
281
|
} else {
|
|
@@ -427,31 +419,11 @@ var browser = function browser() {
|
|
|
427
419
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
428
420
|
**/
|
|
429
421
|
|
|
430
|
-
var debounce = function debounce(
|
|
431
|
-
var timeout =
|
|
422
|
+
var debounce = function debounce(callback, delay) {
|
|
423
|
+
var timeout = null;
|
|
432
424
|
return function () {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (timeout) clearTimeout(timeout);
|
|
437
|
-
// 是否在某一批事件中首次执行
|
|
438
|
-
if (immediate) {
|
|
439
|
-
var callNow = !timeout;
|
|
440
|
-
timeout = setTimeout(function () {
|
|
441
|
-
timeout = null;
|
|
442
|
-
fn.apply(self, args);
|
|
443
|
-
immediate = true;
|
|
444
|
-
}, wait);
|
|
445
|
-
if (callNow) {
|
|
446
|
-
fn.apply(self, args);
|
|
447
|
-
}
|
|
448
|
-
immediate = false;
|
|
449
|
-
} else {
|
|
450
|
-
timeout = setTimeout(function () {
|
|
451
|
-
fn.apply(self, args);
|
|
452
|
-
immediate = true;
|
|
453
|
-
}, wait);
|
|
454
|
-
}
|
|
425
|
+
clearTimeout(timeout);
|
|
426
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
455
427
|
};
|
|
456
428
|
};
|
|
457
429
|
/**
|
package/lib/wxlogin.js
CHANGED
|
@@ -126,6 +126,7 @@ var $brightnessStep2 = 0.15;
|
|
|
126
126
|
var $lightColorCount = 5;
|
|
127
127
|
var $darkColorCount = 4;
|
|
128
128
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
129
|
+
var loginMsg = void 0;
|
|
129
130
|
|
|
130
131
|
var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
|
|
131
132
|
|
|
@@ -147,7 +148,6 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
147
148
|
* @param {Object} [loading] - loading加载对象
|
|
148
149
|
**/
|
|
149
150
|
// 请求
|
|
150
|
-
var _timer = null;
|
|
151
151
|
var pendingRequest = new Map();
|
|
152
152
|
function getRequestKey(config) {
|
|
153
153
|
var method = config.method,
|
|
@@ -246,44 +246,36 @@ var ajax = function ajax(_ref) {
|
|
|
246
246
|
if (response.status === 200) {
|
|
247
247
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
248
248
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
268
|
-
win.top.location.href = './login.html';
|
|
269
|
-
} else {
|
|
270
|
-
var hash = win.top.location.hash;
|
|
271
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
272
|
-
var len = win.top.location.href.indexOf(hash);
|
|
273
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
274
|
-
win.top.location.href = href;
|
|
249
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
250
|
+
clearTimeout(loginMsg);
|
|
251
|
+
loginMsg = setTimeout(function () {
|
|
252
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
253
|
+
confirmButtonText: '确定',
|
|
254
|
+
closeOnClickModal: false,
|
|
255
|
+
type: 'warning'
|
|
256
|
+
} : {
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消',
|
|
259
|
+
closeOnClickModal: false,
|
|
260
|
+
type: 'warning'
|
|
261
|
+
}).then(function () {
|
|
262
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
263
|
+
if (loginPage) {
|
|
264
|
+
win.top.location.href = loginPage;
|
|
265
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
266
|
+
win.top.location.href = './login.html';
|
|
275
267
|
} else {
|
|
276
|
-
win.top.location.
|
|
268
|
+
var hash = win.top.location.hash;
|
|
269
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
270
|
+
var len = win.top.location.href.indexOf(hash);
|
|
271
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
272
|
+
win.top.location.href = href;
|
|
273
|
+
} else {
|
|
274
|
+
win.top.location.href = '/login.html';
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
_timer && clearTimeout(_timer);
|
|
281
|
-
_timer = setTimeout(function () {
|
|
282
|
-
removeStorage('timer');
|
|
283
|
-
clearTimeout(_timer);
|
|
284
|
-
_timer = null;
|
|
285
|
-
}, 1000);
|
|
286
|
-
});
|
|
277
|
+
}).catch(function (e) {});
|
|
278
|
+
}, 1000);
|
|
287
279
|
}
|
|
288
280
|
return Promise.reject(response.data);
|
|
289
281
|
} else {
|
|
@@ -427,31 +419,11 @@ var browser = function browser() {
|
|
|
427
419
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
428
420
|
**/
|
|
429
421
|
|
|
430
|
-
var debounce = function debounce(
|
|
431
|
-
var timeout =
|
|
422
|
+
var debounce = function debounce(callback, delay) {
|
|
423
|
+
var timeout = null;
|
|
432
424
|
return function () {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (timeout) clearTimeout(timeout);
|
|
437
|
-
// 是否在某一批事件中首次执行
|
|
438
|
-
if (immediate) {
|
|
439
|
-
var callNow = !timeout;
|
|
440
|
-
timeout = setTimeout(function () {
|
|
441
|
-
timeout = null;
|
|
442
|
-
fn.apply(self, args);
|
|
443
|
-
immediate = true;
|
|
444
|
-
}, wait);
|
|
445
|
-
if (callNow) {
|
|
446
|
-
fn.apply(self, args);
|
|
447
|
-
}
|
|
448
|
-
immediate = false;
|
|
449
|
-
} else {
|
|
450
|
-
timeout = setTimeout(function () {
|
|
451
|
-
fn.apply(self, args);
|
|
452
|
-
immediate = true;
|
|
453
|
-
}, wait);
|
|
454
|
-
}
|
|
425
|
+
clearTimeout(timeout);
|
|
426
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
455
427
|
};
|
|
456
428
|
};
|
|
457
429
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eoss-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.33",
|
|
4
4
|
"description": "eoss内部业务组件",
|
|
5
5
|
"main": "lib/eoss-ui.common.js",
|
|
6
6
|
"files": [
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"cp-cli": "^1.0.2",
|
|
92
92
|
"cross-env": "^3.1.3",
|
|
93
93
|
"css-loader": "^2.1.0",
|
|
94
|
-
"eoss-element": "^0.2.
|
|
94
|
+
"eoss-element": "^0.2.50",
|
|
95
95
|
"es6-promise": "^4.0.5",
|
|
96
96
|
"eslint": "4.18.2",
|
|
97
97
|
"eslint-config-elemefe": "0.1.1",
|