eoss-ui 0.4.91 → 0.4.93

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.
Files changed (58) hide show
  1. package/lib/button-group.js +56 -37
  2. package/lib/button.js +56 -37
  3. package/lib/card.js +2 -2
  4. package/lib/cascader.js +2 -2
  5. package/lib/checkbox-group.js +56 -37
  6. package/lib/clients.js +2 -2
  7. package/lib/data-table-form.js +55 -36
  8. package/lib/data-table.js +56 -37
  9. package/lib/date-picker.js +56 -37
  10. package/lib/dialog.js +55 -36
  11. package/lib/enterprise.js +2 -2
  12. package/lib/eoss-ui.common.js +321 -131
  13. package/lib/error-page.js +2 -2
  14. package/lib/flow-group.js +56 -37
  15. package/lib/flow-list.js +57 -38
  16. package/lib/flow.js +56 -37
  17. package/lib/form.js +56 -37
  18. package/lib/handle-user.js +56 -37
  19. package/lib/handler.js +56 -37
  20. package/lib/icons.js +2 -2
  21. package/lib/index.js +1 -1
  22. package/lib/input-number.js +56 -37
  23. package/lib/input.js +56 -37
  24. package/lib/label.js +2 -2
  25. package/lib/layout.js +2 -2
  26. package/lib/login.js +55 -36
  27. package/lib/main.js +327 -137
  28. package/lib/menu.js +2 -2
  29. package/lib/nav.js +56 -37
  30. package/lib/notify.js +2 -2
  31. package/lib/page.js +56 -37
  32. package/lib/pagination.js +2 -2
  33. package/lib/player.js +70 -51
  34. package/lib/qr-code.js +63 -44
  35. package/lib/radio-group.js +56 -37
  36. package/lib/retrial-auth.js +56 -37
  37. package/lib/select-ganged.js +56 -37
  38. package/lib/select.js +63 -44
  39. package/lib/selector-panel.js +63 -44
  40. package/lib/selector.js +63 -44
  41. package/lib/sizer.js +56 -37
  42. package/lib/steps.js +56 -37
  43. package/lib/switch.js +56 -37
  44. package/lib/table-form.js +56 -37
  45. package/lib/tabs-panel.js +2 -2
  46. package/lib/tabs.js +56 -37
  47. package/lib/tips.js +56 -37
  48. package/lib/toolbar.js +2 -2
  49. package/lib/tree-group.js +56 -37
  50. package/lib/tree.js +56 -37
  51. package/lib/upload.js +56 -37
  52. package/lib/utils/util.js +43 -24
  53. package/lib/wujie.js +56 -37
  54. package/lib/wxlogin.js +57 -38
  55. package/package.json +2 -2
  56. package/packages/main/src/main.vue +180 -26
  57. package/src/index.js +1 -1
  58. package/src/utils/util.js +50 -28
package/lib/main.js CHANGED
@@ -91,13 +91,13 @@ module.exports =
91
91
 
92
92
  "use strict";
93
93
  /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
94
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
94
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
95
95
  /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
96
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
96
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
97
97
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);
98
98
  /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
99
99
  /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
100
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
100
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
101
101
  /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_4__);
102
102
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
103
103
 
@@ -448,11 +448,11 @@ var ajax = function ajax(_ref) {
448
448
  }
449
449
  if (method === 'post' && format) {
450
450
  data = qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data);
451
- if (!header['content-type']) {
451
+ if (!header['content-type'] && !header['Content-Type']) {
452
452
  header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
453
453
  }
454
454
  } else {
455
- if (!header['content-type']) {
455
+ if (!header['content-type'] && !header['Content-Type']) {
456
456
  header['content-type'] = 'application/json;charset=UTF-8';
457
457
  }
458
458
  }
@@ -1908,8 +1908,6 @@ var isFunction = function isFunction(obj) {
1908
1908
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1909
1909
  **/
1910
1910
  var isLogined = function isLogined(_ref8) {
1911
- var _this = this;
1912
-
1913
1911
  var to = _ref8.to,
1914
1912
  from = _ref8.from,
1915
1913
  next = _ref8.next,
@@ -1928,6 +1926,17 @@ var isLogined = function isLogined(_ref8) {
1928
1926
  if (logined || cookie == true || cookie == 1) {
1929
1927
  if (loginPage) {
1930
1928
  sessionStorage.setItem('loginPage', loginPage);
1929
+ if (!startWith(loginPage, ['http', '/'], true)) {
1930
+ var pathname = win.top.location.pathname;
1931
+ if (pathname !== '/') {
1932
+ pathname = pathname.split('/');
1933
+ pathname.splice(pathname.length - 1);
1934
+ pathname = pathname.join('/');
1935
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1936
+ } else {
1937
+ loginPage = pathname + loginPage.replace('./', '');
1938
+ }
1939
+ }
1931
1940
  }
1932
1941
  next();
1933
1942
  } else {
@@ -1940,7 +1949,7 @@ var isLogined = function isLogined(_ref8) {
1940
1949
  url = win.location.href;
1941
1950
  break;
1942
1951
  case 'blank':
1943
- url = win.location.href;
1952
+ url = win.open(url);
1944
1953
  break;
1945
1954
  case 'parent':
1946
1955
  url = win.parent.location.href;
@@ -1999,31 +2008,41 @@ var isLogined = function isLogined(_ref8) {
1999
2008
  }
2000
2009
  break;
2001
2010
  case 4:
2002
- _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2011
+ eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2003
2012
  confirmButtonText: '确定',
2004
- type: 'error'
2005
- }).then(function () {
2006
- sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2007
- window.location.href = delUrlParam({ key: 'code' });
2008
- if (loginPage) {
2009
- win.top.location.replace(loginPage);
2010
- } else if (document.referrer) {
2011
- win.top.location.replace(document.referrer);
2012
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2013
- win.top.location.href = './login.html';
2014
- } else {
2015
- next('/login');
2013
+ type: 'error',
2014
+ callback: function callback() {
2015
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2016
+ if (loginPage) {
2017
+ win.top.location.replace(loginPage);
2018
+ } else if (document.referrer) {
2019
+ win.top.location.replace(document.referrer);
2020
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2021
+ win.top.location.href = './login.html';
2022
+ } else {
2023
+ next('/login');
2024
+ }
2016
2025
  }
2017
- }).catch(function (e) {});
2026
+ });
2018
2027
  break;
2019
2028
  default:
2020
2029
  }
2021
2030
  } else {
2022
- if (token) {
2023
- next();
2024
- } else {
2025
- alert(res.msg);
2026
- }
2031
+ eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].alert(res.msg, '提示', {
2032
+ confirmButtonText: '确定',
2033
+ type: 'error',
2034
+ callback: function callback() {
2035
+ if (loginPage) {
2036
+ win.top.location.replace(loginPage);
2037
+ } else if (document.referrer) {
2038
+ win.top.location.replace(document.referrer);
2039
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2040
+ win.top.location.href = './login.html';
2041
+ } else {
2042
+ next('/login');
2043
+ }
2044
+ }
2045
+ });
2027
2046
  }
2028
2047
  }).catch(function (e) {});
2029
2048
  } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
@@ -3277,6 +3296,12 @@ var formContents = '/config/admin/online/onlineForm/render';
3277
3296
 
3278
3297
  /***/ }),
3279
3298
  /* 2 */
3299
+ /***/ (function(module, exports) {
3300
+
3301
+ module.exports = require("eoss-element");
3302
+
3303
+ /***/ }),
3304
+ /* 3 */
3280
3305
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3281
3306
 
3282
3307
  "use strict";
@@ -3379,23 +3404,17 @@ function normalizeComponent(
3379
3404
  }
3380
3405
 
3381
3406
 
3382
- /***/ }),
3383
- /* 3 */
3384
- /***/ (function(module, exports) {
3385
-
3386
- module.exports = require("qs");
3387
-
3388
3407
  /***/ }),
3389
3408
  /* 4 */
3390
3409
  /***/ (function(module, exports) {
3391
3410
 
3392
- module.exports = require("axios");
3411
+ module.exports = require("qs");
3393
3412
 
3394
3413
  /***/ }),
3395
3414
  /* 5 */
3396
3415
  /***/ (function(module, exports) {
3397
3416
 
3398
- module.exports = require("eoss-element");
3417
+ module.exports = require("axios");
3399
3418
 
3400
3419
  /***/ }),
3401
3420
  /* 6 */
@@ -3484,7 +3503,7 @@ module.exports = require("stompjs");
3484
3503
  // ESM COMPAT FLAG
3485
3504
  __webpack_require__.r(__webpack_exports__);
3486
3505
 
3487
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=6641fcac&
3506
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=b2aea55c&
3488
3507
  var render = function () {
3489
3508
  var _vm = this
3490
3509
  var _h = _vm.$createElement
@@ -3914,7 +3933,11 @@ var staticRenderFns = []
3914
3933
  render._withStripped = true
3915
3934
 
3916
3935
 
3917
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=6641fcac&
3936
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=b2aea55c&
3937
+
3938
+ // EXTERNAL MODULE: external "babel-runtime/regenerator"
3939
+ var regenerator_ = __webpack_require__(9);
3940
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
3918
3941
 
3919
3942
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=799780ee&
3920
3943
  var userinfovue_type_template_id_799780ee_render = function () {
@@ -4352,7 +4375,7 @@ var util = __webpack_require__(0);
4352
4375
  // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=script&lang=js&
4353
4376
  /* harmony default export */ var src_userinfovue_type_script_lang_js_ = (userinfovue_type_script_lang_js_);
4354
4377
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
4355
- var componentNormalizer = __webpack_require__(2);
4378
+ var componentNormalizer = __webpack_require__(3);
4356
4379
 
4357
4380
  // CONCATENATED MODULE: ./packages/main/src/userinfo.vue
4358
4381
 
@@ -5559,10 +5582,6 @@ async_componentvue_type_template_id_51f0233c_scoped_true_render._withStripped =
5559
5582
 
5560
5583
  // CONCATENATED MODULE: ./packages/main/src/async-component/index.vue?vue&type=template&id=51f0233c&scoped=true&
5561
5584
 
5562
- // EXTERNAL MODULE: external "babel-runtime/regenerator"
5563
- var regenerator_ = __webpack_require__(9);
5564
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
5565
-
5566
5585
  // EXTERNAL MODULE: external "runtime-import"
5567
5586
  var external_runtime_import_ = __webpack_require__(18);
5568
5587
 
@@ -5724,8 +5743,12 @@ var external_stompjs_ = __webpack_require__(20);
5724
5743
  var external_stompjs_default = /*#__PURE__*/__webpack_require__.n(external_stompjs_);
5725
5744
 
5726
5745
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=script&lang=js&
5746
+
5747
+
5727
5748
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
5728
5749
 
5750
+ function mainvue_type_script_lang_js_asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
5751
+
5729
5752
  //
5730
5753
  //
5731
5754
  //
@@ -6337,12 +6360,9 @@ var log = util["a" /* default */].getParams('console');
6337
6360
  created: function created() {
6338
6361
  this.homePage = typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
6339
6362
  this.isHeader = util["a" /* default */].getParams('header');
6340
- this.getConfig();
6341
- if (this.socket) {
6342
- this.initWebSocket();
6343
- }
6344
6363
  var sysLogoIco = sessionStorage.getItem('sysLogoIco');
6345
6364
  sysLogoIco && util["a" /* default */].setFavicon(sysLogoIco);
6365
+ this.isLogin();
6346
6366
  },
6347
6367
  mounted: function mounted() {
6348
6368
  util["a" /* default */].win.reLogin = this.handleReLogin;
@@ -6358,6 +6378,176 @@ var log = util["a" /* default */].getParams('console');
6358
6378
  },
6359
6379
 
6360
6380
  methods: {
6381
+ isLogin: function isLogin() {
6382
+ var _this = this;
6383
+
6384
+ return mainvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
6385
+ var query, token, loginPage, pathname, url;
6386
+ return regenerator_default.a.wrap(function _callee$(_context) {
6387
+ while (1) {
6388
+ switch (_context.prev = _context.next) {
6389
+ case 0:
6390
+ query = _this.$route.query;
6391
+ token = util["a" /* default */].getStorage('token') || util["a" /* default */].getStorage('Authorization');
6392
+ loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
6393
+
6394
+ if (loginPage) {
6395
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
6396
+ pathname = util["a" /* default */].win.top.location.pathname;
6397
+
6398
+ if (pathname !== '/') {
6399
+ pathname = pathname.split('/');
6400
+ pathname.splice(pathname.length - 1);
6401
+ pathname = pathname.join('/');
6402
+ loginPage = pathname + '/' + loginPage.replace('./', '');
6403
+ } else {
6404
+ loginPage = pathname + loginPage.replace('./', '');
6405
+ }
6406
+ }
6407
+ }
6408
+
6409
+ if (!(!token && Object.prototype.hasOwnProperty.call(query, 'serverId') && Object.prototype.hasOwnProperty.call(query, 'authType'))) {
6410
+ _context.next = 20;
6411
+ break;
6412
+ }
6413
+
6414
+ url = util["a" /* default */].win.top.location.href;
6415
+
6416
+ if (!query.openType) {
6417
+ _context.next = 16;
6418
+ break;
6419
+ }
6420
+
6421
+ _context.t0 = query.openType;
6422
+ _context.next = _context.t0 === 'self' ? 10 : _context.t0 === 'blank' ? 12 : _context.t0 === 'parent' ? 14 : 16;
6423
+ break;
6424
+
6425
+ case 10:
6426
+ url = util["a" /* default */].win.location.href;
6427
+ return _context.abrupt('break', 16);
6428
+
6429
+ case 12:
6430
+ url = util["a" /* default */].win.open(url);
6431
+ return _context.abrupt('break', 16);
6432
+
6433
+ case 14:
6434
+ url = util["a" /* default */].win.parent.location.href;
6435
+ return _context.abrupt('break', 16);
6436
+
6437
+ case 16:
6438
+ _context.next = 18;
6439
+ return util["a" /* default */].ajax({
6440
+ method: 'post',
6441
+ url: api["b" /* authCenter */],
6442
+ data: query
6443
+ }).then(function (res) {
6444
+ if (res.rCode === 0) {
6445
+ _this.getConfig();
6446
+ if (_this.socket) {
6447
+ _this.initWebSocket();
6448
+ }
6449
+ var results = res.results;
6450
+
6451
+ switch (results.statusCode) {
6452
+ case 0:
6453
+ var storage = getStorage('storage');
6454
+ setStorage({
6455
+ type: storage,
6456
+ key: {
6457
+ ssId: results.ssId,
6458
+ token: results.token,
6459
+ Authorization: results.token,
6460
+ deviceUnique: results.deviceUnique
6461
+ }
6462
+ });
6463
+ break;
6464
+ case 1:
6465
+ break;
6466
+ case 2:
6467
+ break;
6468
+ case 3:
6469
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
6470
+ if (query.openType) {
6471
+ switch (query.openType) {
6472
+ case 'self':
6473
+ util["a" /* default */].win.location.href = href;
6474
+ break;
6475
+ case 'blank':
6476
+ util["a" /* default */].win.open(href);
6477
+ break;
6478
+ case 'top':
6479
+ util["a" /* default */].win.top.location.href = href;
6480
+ break;
6481
+ case 'parent':
6482
+ util["a" /* default */].win.parent.location.href = href;
6483
+ break;
6484
+ }
6485
+ } else {
6486
+ if (open) {
6487
+ util["a" /* default */].win.open(href);
6488
+ } else {
6489
+ util["a" /* default */].win.top.location.href = href;
6490
+ }
6491
+ }
6492
+ break;
6493
+ case 4:
6494
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
6495
+ confirmButtonText: '确定',
6496
+ type: 'error',
6497
+ callback: function callback() {
6498
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
6499
+ //window.location.href = delUrlParam({ key: 'code' });
6500
+ if (loginPage) {
6501
+ util["a" /* default */].win.top.location.replace(loginPage);
6502
+ } else if (document.referrer) {
6503
+ util["a" /* default */].win.top.location.replace(document.referrer);
6504
+ } else if (util["a" /* default */].win.top.location.href.indexOf('main.html') > -1) {
6505
+ util["a" /* default */].win.top.location.href = './login.html';
6506
+ } else {
6507
+ _this.$router.replace('/login');
6508
+ }
6509
+ }
6510
+ });
6511
+ break;
6512
+ default:
6513
+ }
6514
+ } else {
6515
+ _this.$alert(res.msg, '提示', {
6516
+ confirmButtonText: '确定',
6517
+ type: 'error',
6518
+ callback: function callback() {
6519
+ if (loginPage) {
6520
+ util["a" /* default */].win.top.location.replace(loginPage);
6521
+ } else if (document.referrer) {
6522
+ util["a" /* default */].win.top.location.replace(document.referrer);
6523
+ } else if (util["a" /* default */].win.top.location.href.indexOf('main.html') > -1) {
6524
+ util["a" /* default */].win.top.location.href = './login.html';
6525
+ } else {
6526
+ _this.$router.replace('/login');
6527
+ }
6528
+ }
6529
+ });
6530
+ }
6531
+ }).catch(function (e) {});
6532
+
6533
+ case 18:
6534
+ _context.next = 22;
6535
+ break;
6536
+
6537
+ case 20:
6538
+ _this.getConfig();
6539
+ if (_this.socket) {
6540
+ _this.initWebSocket();
6541
+ }
6542
+
6543
+ case 22:
6544
+ case 'end':
6545
+ return _context.stop();
6546
+ }
6547
+ }
6548
+ }, _callee, _this);
6549
+ }))();
6550
+ },
6361
6551
  menuSuccess: function menuSuccess(res) {
6362
6552
  // this.menus
6363
6553
  this.menuType = 'custom';
@@ -6369,14 +6559,14 @@ var log = util["a" /* default */].getParams('console');
6369
6559
 
6370
6560
  //获取主题模板JSON
6371
6561
  getMainDetail: function getMainDetail(id) {
6372
- var _this = this;
6562
+ var _this2 = this;
6373
6563
 
6374
6564
  var params = {
6375
6565
  url: api["cb" /* mainDetail */],
6376
6566
  params: { id: id }
6377
6567
  };
6378
6568
  util["a" /* default */].ajax(params).then(function (res) {
6379
- var _that = _this;
6569
+ var _that = _this2;
6380
6570
  if (!res.results) {
6381
6571
  _that.showDefault = true;
6382
6572
  }
@@ -6412,7 +6602,7 @@ var log = util["a" /* default */].getParams('console');
6412
6602
  }
6413
6603
  }).catch(function (err) {
6414
6604
  if (err.message && err.message !== 'canceled') {
6415
- _this.$message.error(err.message);
6605
+ _this2.$message.error(err.message);
6416
6606
  }
6417
6607
  });
6418
6608
  },
@@ -6454,32 +6644,32 @@ var log = util["a" /* default */].getParams('console');
6454
6644
  this.navIds = ids;
6455
6645
  this.setTitle(ids[0]);
6456
6646
  }
6647
+ } else if (sessionStorage.getItem('jump') && this.history) {
6648
+ var _ids = this.getId(this.menus, sessionStorage.getItem('jump'), true);
6649
+ if (_ids) {
6650
+ this.defaultActive = _ids;
6651
+ this.navIds = _ids;
6652
+ this.setTitle(_ids[0]);
6653
+ }
6457
6654
  } else if (util["a" /* default */].win.location.hash) {
6458
6655
  var hash = util["a" /* default */].win.location.hash;
6459
6656
  if (hash) {
6460
6657
  hash = hash.split('?')[0];
6461
6658
  }
6462
6659
  if (hash !== '#/' && hash !== '#/main') {
6463
- var _ids = this.getId(this.menus, util["a" /* default */].win.location.hash, true);
6464
- if (_ids) {
6465
- this.defaultActive = _ids;
6466
- this.navIds = _ids;
6467
- this.setTitle(_ids[0]);
6468
- }
6469
- } else if (sessionStorage.getItem('jump') && this.history) {
6470
- var _ids2 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
6660
+ var _ids2 = this.getId(this.menus, util["a" /* default */].win.location.hash, true);
6471
6661
  if (_ids2) {
6472
6662
  this.defaultActive = _ids2;
6473
6663
  this.navIds = _ids2;
6474
6664
  this.setTitle(_ids2[0]);
6475
6665
  }
6476
- }
6477
- } else if (sessionStorage.getItem('jump') && this.history) {
6478
- var _ids3 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
6479
- if (_ids3) {
6480
- this.defaultActive = _ids3;
6481
- this.navIds = _ids3;
6482
- this.setTitle(_ids3[0]);
6666
+ } else if (sessionStorage.getItem('jump') && this.history) {
6667
+ var _ids3 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
6668
+ if (_ids3) {
6669
+ this.defaultActive = _ids3;
6670
+ this.navIds = _ids3;
6671
+ this.setTitle(_ids3[0]);
6672
+ }
6483
6673
  }
6484
6674
  }
6485
6675
  this.setMenu(this.menus);
@@ -6488,7 +6678,7 @@ var log = util["a" /* default */].getParams('console');
6488
6678
 
6489
6679
  //设置主题颜色
6490
6680
  setTheme: function setTheme(color) {
6491
- var _this2 = this;
6681
+ var _this3 = this;
6492
6682
 
6493
6683
  if (!color) {
6494
6684
  return;
@@ -6499,24 +6689,24 @@ var log = util["a" /* default */].getParams('console');
6499
6689
  data: { color: escape(color.toLowerCase()) }
6500
6690
  }).then(function (res) {
6501
6691
  if (res.rCode === 0) {
6502
- _this2.color = color;
6692
+ _this3.color = color;
6503
6693
  localStorage.setItem('theme', color);
6504
6694
  var _mainConfig = JSON.parse(util["a" /* default */].getStorage('mainConfig'));
6505
- _mainConfig.userStyle.color = _this2.color;
6695
+ _mainConfig.userStyle.color = _this3.color;
6506
6696
  sessionStorage.setItem('mainConfig', JSON.stringify(_mainConfig));
6507
- _this2.$emit('setting', 'theme', _this2.color);
6508
- _this2.$message({
6697
+ _this3.$emit('setting', 'theme', _this3.color);
6698
+ _this3.$message({
6509
6699
  message: res.msg,
6510
6700
  type: 'success',
6511
6701
  duration: 2000
6512
6702
  });
6513
6703
  } else {
6514
6704
  var msg = res.msg || '系统错误,请联系管理员!';
6515
- _this2.$message.error(msg);
6705
+ _this3.$message.error(msg);
6516
6706
  }
6517
6707
  }).catch(function (err) {
6518
6708
  if (err.message && err.message !== 'canceled') {
6519
- _this2.$message.error(err.message);
6709
+ _this3.$message.error(err.message);
6520
6710
  }
6521
6711
  });
6522
6712
  },
@@ -6594,7 +6784,7 @@ var log = util["a" /* default */].getParams('console');
6594
6784
 
6595
6785
  //获取用户配置及信息
6596
6786
  getConfig: function getConfig() {
6597
- var _this3 = this;
6787
+ var _this4 = this;
6598
6788
 
6599
6789
  if (util["a" /* default */].getStorage('mainConfig')) {
6600
6790
  var results = JSON.parse(util["a" /* default */].getStorage('mainConfig'));
@@ -6608,36 +6798,36 @@ var log = util["a" /* default */].getParams('console');
6608
6798
  }
6609
6799
  util["a" /* default */].ajax({ url: this.mainConfig }).then(function (res) {
6610
6800
  if (res && res.rCode === 0) {
6611
- _this3.setConfig(res.results, 1);
6612
- if (_this3.remote) {
6613
- _this3.getMenu();
6801
+ _this4.setConfig(res.results, 1);
6802
+ if (_this4.remote) {
6803
+ _this4.getMenu();
6614
6804
  } else {
6615
- _this3.renderMenu();
6805
+ _this4.renderMenu();
6616
6806
  }
6617
6807
  } else {
6618
6808
  var msg = res.msg || '系统错误,请联系管理员!';
6619
- _this3.$message.error(msg);
6809
+ _this4.$message.error(msg);
6620
6810
  }
6621
6811
  }).catch(function (err) {
6622
6812
  if (err.message && err.message !== 'canceled') {
6623
- _this3.$message.error(err.message);
6813
+ _this4.$message.error(err.message);
6624
6814
  }
6625
6815
  });
6626
6816
  },
6627
6817
  reGetConfig: function reGetConfig() {
6628
- var _this4 = this;
6818
+ var _this5 = this;
6629
6819
 
6630
6820
  util["a" /* default */].ajax({ url: this.mainConfig }).then(function (res) {
6631
6821
  if (res && res.rCode === 0) {
6632
6822
  var results = JSON.parse(JSON.stringify(res.results));
6633
- _this4.setConfig(results, 1);
6823
+ _this5.setConfig(results, 1);
6634
6824
  } else {
6635
6825
  var msg = res.msg || '系统错误,请联系管理员!';
6636
- _this4.$message.error(msg);
6826
+ _this5.$message.error(msg);
6637
6827
  }
6638
6828
  }).catch(function (err) {
6639
6829
  if (err.message && err.message !== 'canceled') {
6640
- _this4.$message.error(err.message);
6830
+ _this5.$message.error(err.message);
6641
6831
  }
6642
6832
  });
6643
6833
  },
@@ -6706,17 +6896,24 @@ var log = util["a" /* default */].getParams('console');
6706
6896
 
6707
6897
  //获取应用导航菜单
6708
6898
  getMenu: function getMenu() {
6709
- var _this5 = this;
6899
+ var _this6 = this;
6710
6900
 
6711
6901
  util["a" /* default */].ajax({ url: this.action, params: this.param ? this.param : {} }).then(function (res) {
6712
6902
  if (res.rCode === 0) {
6713
6903
  if (res.results && res.results.length) {
6714
- _this5.menus = JSON.parse(JSON.stringify(res.results));
6904
+ _this6.menus = JSON.parse(JSON.stringify(res.results));
6715
6905
  var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
6716
6906
  if (applicationid) {
6717
- var ids = _this5.getId(_this5.menus, applicationid);
6907
+ var ids = _this6.getId(_this6.menus, applicationid);
6718
6908
  if (ids) {
6719
- _this5.defaultActive = ids;
6909
+ _this6.defaultActive = ids;
6910
+ }
6911
+ } else if (sessionStorage.getItem('jump') && _this6.history) {
6912
+ var _ids4 = _this6.getId(_this6.menus, sessionStorage.getItem('jump'), true);
6913
+ if (_ids4) {
6914
+ _this6.defaultActive = _ids4;
6915
+ _this6.navIds = _ids4;
6916
+ _this6.setTitle(_ids4[0]);
6720
6917
  }
6721
6918
  } else if (util["a" /* default */].win.location.hash) {
6722
6919
  var hash = util["a" /* default */].win.location.hash;
@@ -6724,41 +6921,34 @@ var log = util["a" /* default */].getParams('console');
6724
6921
  hash = hash.split('?')[0];
6725
6922
  }
6726
6923
  if (hash !== '#/' && hash !== '#/main') {
6727
- var _ids4 = _this5.getId(_this5.menus, util["a" /* default */].win.location.hash, true);
6728
- if (_ids4) {
6729
- _this5.defaultActive = _ids4;
6730
- _this5.navIds = _ids4;
6731
- _this5.setTitle(_ids4[0]);
6732
- }
6733
- } else if (sessionStorage.getItem('jump') && _this5.history) {
6734
- var _ids5 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6924
+ var _ids5 = _this6.getId(_this6.menus, util["a" /* default */].win.location.hash, true);
6735
6925
  if (_ids5) {
6736
- _this5.defaultActive = _ids5;
6737
- _this5.navIds = _ids5;
6738
- _this5.setTitle(_ids5[0]);
6926
+ _this6.defaultActive = _ids5;
6927
+ _this6.navIds = _ids5;
6928
+ _this6.setTitle(_ids5[0]);
6929
+ }
6930
+ } else if (sessionStorage.getItem('jump') && _this6.history) {
6931
+ var _ids6 = _this6.getId(_this6.menus, sessionStorage.getItem('jump'), true);
6932
+ if (_ids6) {
6933
+ _this6.defaultActive = _ids6;
6934
+ _this6.navIds = _ids6;
6935
+ _this6.setTitle(_ids6[0]);
6739
6936
  }
6740
- }
6741
- } else if (sessionStorage.getItem('jump') && _this5.history) {
6742
- var _ids6 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6743
- if (_ids6) {
6744
- _this5.defaultActive = _ids6;
6745
- _this5.navIds = _ids6;
6746
- _this5.setTitle(_ids6[0]);
6747
6937
  }
6748
6938
  }
6749
- _this5.setTips(_this5.menus);
6750
- store["a" /* default */].set('nav', _this5.menus);
6751
- _this5.setMenu(_this5.menus);
6939
+ _this6.setTips(_this6.menus);
6940
+ store["a" /* default */].set('nav', _this6.menus);
6941
+ _this6.setMenu(_this6.menus);
6752
6942
  } else {
6753
- _this5.$message.error('未分配菜单权限,请联系管理员!');
6943
+ _this6.$message.error('未分配菜单权限,请联系管理员!');
6754
6944
  }
6755
6945
  } else {
6756
6946
  var msg = res.msg || '系统错误,请联系管理员!';
6757
- _this5.$message.error(msg);
6947
+ _this6.$message.error(msg);
6758
6948
  }
6759
6949
  }).catch(function (err) {
6760
6950
  if (err.message && err.message !== 'canceled') {
6761
- _this5.$message.error(err.message);
6951
+ _this6.$message.error(err.message);
6762
6952
  }
6763
6953
  });
6764
6954
  },
@@ -6880,11 +7070,11 @@ var log = util["a" /* default */].getParams('console');
6880
7070
 
6881
7071
  //遍历设置菜单气泡提醒
6882
7072
  setTips: function setTips(obj) {
6883
- var _this6 = this;
7073
+ var _this7 = this;
6884
7074
 
6885
7075
  if (Array.isArray(obj)) {
6886
7076
  obj.forEach(function (item) {
6887
- _this6.setTips(item);
7077
+ _this7.setTips(item);
6888
7078
  });
6889
7079
  } else {
6890
7080
  if (Object.prototype.hasOwnProperty.call(obj, 'tips') && obj.tips) {
@@ -6894,7 +7084,7 @@ var log = util["a" /* default */].getParams('console');
6894
7084
  var flag = false;
6895
7085
  if (obj.children && obj.children.length) {
6896
7086
  obj.children.forEach(function (item) {
6897
- if (_this6.setTips(item)) {
7087
+ if (_this7.setTips(item)) {
6898
7088
  flag = true;
6899
7089
  }
6900
7090
  });
@@ -6904,7 +7094,7 @@ var log = util["a" /* default */].getParams('console');
6904
7094
  }
6905
7095
  } else if (obj.fourthTabs && obj.fourthTabs.length) {
6906
7096
  obj.fourthTabs.forEach(function (item) {
6907
- if (_this6.setTips(item)) {
7097
+ if (_this7.setTips(item)) {
6908
7098
  flag = true;
6909
7099
  }
6910
7100
  });
@@ -7198,7 +7388,7 @@ var log = util["a" /* default */].getParams('console');
7198
7388
 
7199
7389
  //头部工具交互事件
7200
7390
  handleClick: function handleClick(res) {
7201
- var _this7 = this;
7391
+ var _this8 = this;
7202
7392
 
7203
7393
  var type = res.type;
7204
7394
 
@@ -7219,7 +7409,7 @@ var log = util["a" /* default */].getParams('console');
7219
7409
  this.setMenu(this.menus);
7220
7410
  }
7221
7411
  this.$nextTick(function () {
7222
- _this7.reset = true;
7412
+ _this8.reset = true;
7223
7413
  });
7224
7414
  break;
7225
7415
  case 'user':
@@ -7247,21 +7437,21 @@ var log = util["a" /* default */].getParams('console');
7247
7437
 
7248
7438
  //刷新子页面、子路由
7249
7439
  handleRefresh: function handleRefresh() {
7250
- var _this8 = this;
7440
+ var _this9 = this;
7251
7441
 
7252
7442
  if (this.method === 'iframe') {
7253
7443
  this.page = util["a" /* default */].handlerUrl(this.page);
7254
7444
  } else {
7255
7445
  this.refresh = false;
7256
7446
  this.$nextTick(function () {
7257
- _this8.refresh = true;
7447
+ _this9.refresh = true;
7258
7448
  });
7259
7449
  }
7260
7450
  },
7261
7451
 
7262
7452
  //跳转页面
7263
7453
  handleJump: function handleJump(page, type, res) {
7264
- var _this9 = this;
7454
+ var _this10 = this;
7265
7455
 
7266
7456
  var prevPage = sessionStorage.getItem('jump');
7267
7457
  console.log(page);
@@ -7292,7 +7482,7 @@ var log = util["a" /* default */].getParams('console');
7292
7482
  this.wjName = 'singlespa';
7293
7483
  this.page = this.host + page;
7294
7484
  this.$nextTick(function () {
7295
- _this9.refresh = true;
7485
+ _this10.refresh = true;
7296
7486
  });
7297
7487
  } else if (urls[0].indexOf('.dhtml') > 0 || urls[0].indexOf('.html') > 0 && urls[0].indexOf('.html#') === -1) {
7298
7488
  this.method = 'iframe';
@@ -7321,7 +7511,7 @@ var log = util["a" /* default */].getParams('console');
7321
7511
  query: params
7322
7512
  });
7323
7513
  this.$nextTick(function () {
7324
- _this9.refresh = true;
7514
+ _this10.refresh = true;
7325
7515
  });
7326
7516
  } else {
7327
7517
  var urlopenmode = util["a" /* default */].getParams({
@@ -7337,7 +7527,7 @@ var log = util["a" /* default */].getParams('console');
7337
7527
  this.wjName = res && res.appCode ? res.appCode : 'application';
7338
7528
  this.page = this.host + page;
7339
7529
  this.$nextTick(function () {
7340
- _this9.refresh = true;
7530
+ _this10.refresh = true;
7341
7531
  });
7342
7532
  }
7343
7533
  }
@@ -7349,7 +7539,7 @@ var log = util["a" /* default */].getParams('console');
7349
7539
  }
7350
7540
  }
7351
7541
  this.$nextTick(function () {
7352
- _this9.showPage = true;
7542
+ _this10.showPage = true;
7353
7543
  });
7354
7544
  },
7355
7545
 
@@ -7461,7 +7651,7 @@ var log = util["a" /* default */].getParams('console');
7461
7651
 
7462
7652
  //监听改变菜单
7463
7653
  handleListener: function handleListener() {
7464
- var _this10 = this;
7654
+ var _this11 = this;
7465
7655
 
7466
7656
  util["a" /* default */].win.addEventListener('message', function (e) {
7467
7657
  var msg = e.data;
@@ -7470,7 +7660,7 @@ var log = util["a" /* default */].getParams('console');
7470
7660
  if (typeof res === 'string') {
7471
7661
  res = res.split(',');
7472
7662
  }
7473
- _this10.setDefault(_this10.menus, res);
7663
+ _this11.setDefault(_this11.menus, res);
7474
7664
  }
7475
7665
  }, false);
7476
7666
  },
@@ -7489,7 +7679,7 @@ var log = util["a" /* default */].getParams('console');
7489
7679
  this.handleConnect(this.client);
7490
7680
  },
7491
7681
  handleConnect: function handleConnect(client) {
7492
- var _this11 = this;
7682
+ var _this12 = this;
7493
7683
 
7494
7684
  client.connect({}, function () {
7495
7685
  //localStorage.setItem("socket",true);
@@ -7500,22 +7690,22 @@ var log = util["a" /* default */].getParams('console');
7500
7690
  for (var i in data) {
7501
7691
  if (data[i] !== null && data[i] !== undefined) {
7502
7692
  if (i === 'onlineUserNums' && data[i] > 0) {
7503
- _this11.online = data[i];
7693
+ _this12.online = data[i];
7504
7694
  }
7505
7695
  if (i === 'sysMsgNums') {
7506
- _this11.notice = data[i];
7507
- if (_this11.showMsg) {
7508
- _this11.$refs.message.getMsg(true);
7696
+ _this12.notice = data[i];
7697
+ if (_this12.showMsg) {
7698
+ _this12.$refs.message.getMsg(true);
7509
7699
  }
7510
7700
  }
7511
7701
  if (i === 'menuTipsMap') {
7512
- _this11.menuTips = data[i];
7702
+ _this12.menuTips = data[i];
7513
7703
  }
7514
7704
  if (i === 'sysMsgList') {
7515
- _this11.sysMsg = data[i];
7705
+ _this12.sysMsg = data[i];
7516
7706
  }
7517
7707
  if (i === 'extraData') {
7518
- _this11.extraData = data[i];
7708
+ _this12.extraData = data[i];
7519
7709
  }
7520
7710
  }
7521
7711
  }
@@ -7526,13 +7716,13 @@ var log = util["a" /* default */].getParams('console');
7526
7716
  });
7527
7717
  },
7528
7718
  handleOpened: function handleOpened(res) {
7529
- var _this12 = this;
7719
+ var _this13 = this;
7530
7720
 
7531
7721
  if (res === undefined) {
7532
7722
  this.sysMsg = [];
7533
7723
  } else if (res == false && this.sysMsg.length) {
7534
7724
  this.sysMsgOut = setTimeout(function () {
7535
- _this12.sysMsg = [];
7725
+ _this13.sysMsg = [];
7536
7726
  }, 3000);
7537
7727
  } else if (this.sysMsgOut) {
7538
7728
  clearTimeout(this.sysMsgOut);
@@ -7553,7 +7743,7 @@ var log = util["a" /* default */].getParams('console');
7553
7743
  }
7554
7744
  },
7555
7745
  handleReLogin: function handleReLogin(res) {
7556
- var _this13 = this;
7746
+ var _this14 = this;
7557
7747
 
7558
7748
  if (res && typeof res == 'string') {
7559
7749
  res = JSON.parse(res);
@@ -7584,7 +7774,7 @@ var log = util["a" /* default */].getParams('console');
7584
7774
  this.timer = setTimeout(function () {
7585
7775
  console.log('handleReLogin');
7586
7776
  sessionStorage.setItem('remind', 1);
7587
- _this13.$confirm(msg, btn).then(function () {
7777
+ _this14.$confirm(msg, btn).then(function () {
7588
7778
  util["a" /* default */].removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'auth', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
7589
7779
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
7590
7780
  if (loginPage) {