eoss-ui 0.6.76 → 0.6.77

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 (64) hide show
  1. package/lib/button-group.js +30 -8
  2. package/lib/button.js +30 -8
  3. package/lib/calogin.js +30 -8
  4. package/lib/checkbox-group.js +30 -8
  5. package/lib/data-table-form.js +30 -8
  6. package/lib/data-table.js +30 -8
  7. package/lib/date-picker.js +30 -8
  8. package/lib/dialog.js +30 -8
  9. package/lib/eoss-ui.common.js +300 -241
  10. package/lib/flow-group.js +30 -8
  11. package/lib/flow-list.js +30 -8
  12. package/lib/flow.js +30 -8
  13. package/lib/form.js +50 -10
  14. package/lib/handle-user.js +30 -8
  15. package/lib/handler.js +30 -8
  16. package/lib/icon.js +30 -8
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +30 -8
  19. package/lib/input.js +30 -8
  20. package/lib/login.js +30 -8
  21. package/lib/main.js +241 -200
  22. package/lib/nav.js +30 -8
  23. package/lib/page.js +30 -8
  24. package/lib/pagination.js +30 -8
  25. package/lib/player.js +30 -8
  26. package/lib/qr-code.js +30 -8
  27. package/lib/radio-group.js +30 -8
  28. package/lib/retrial-auth.js +30 -8
  29. package/lib/select-ganged.js +30 -8
  30. package/lib/select.js +30 -8
  31. package/lib/selector-panel.js +30 -8
  32. package/lib/selector.js +30 -8
  33. package/lib/sizer.js +30 -8
  34. package/lib/steps.js +30 -8
  35. package/lib/switch.js +30 -8
  36. package/lib/table-form.js +30 -8
  37. package/lib/tabs.js +30 -8
  38. package/lib/theme-chalk/form.css +1 -1
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/tips.js +30 -8
  41. package/lib/tree-group.js +30 -8
  42. package/lib/tree.js +30 -8
  43. package/lib/upload.js +30 -8
  44. package/lib/utils/util.js +26 -4
  45. package/lib/wujie.js +30 -8
  46. package/lib/wxlogin.js +30 -8
  47. package/package.json +1 -1
  48. package/packages/.DS_Store +0 -0
  49. package/packages/form/.DS_Store +0 -0
  50. package/packages/form/src/main.vue +1 -0
  51. package/packages/login/.DS_Store +0 -0
  52. package/packages/main/.DS_Store +0 -0
  53. package/packages/main/src/.DS_Store +0 -0
  54. package/packages/main/src/default/index.vue +6 -5
  55. package/packages/main/src/main.vue +107 -84
  56. package/packages/main/src/simplicity/index.vue +5 -2
  57. package/packages/theme-chalk/lib/form.css +1 -1
  58. package/packages/theme-chalk/lib/index.css +1 -1
  59. package/packages/theme-chalk/src/form.scss +3 -0
  60. package/packages/upload/.DS_Store +0 -0
  61. package/src/.DS_Store +0 -0
  62. package/src/index.js +1 -1
  63. package/src/utils/util.js +39 -3
  64. package/packages/login/src/IcpItem.vue +0 -66
package/lib/main.js CHANGED
@@ -122,8 +122,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
122
122
  **/
123
123
 
124
124
  /* eslint-disable indent */
125
- var sm2 = __webpack_require__(13).sm2;
126
- var lodash = __webpack_require__(12);
125
+ var sm2 = __webpack_require__(12).sm2;
126
+ var lodash = __webpack_require__(13);
127
127
 
128
128
 
129
129
 
@@ -2365,7 +2365,7 @@ var isLogined = function () {
2365
2365
  cookie = _ref11.cookie,
2366
2366
  loginPage = _ref11.loginPage,
2367
2367
  redirect = _ref11.redirect;
2368
- var quit, pathname, path, token, loadingInstance;
2368
+ var quit, pathname, path, token, loadingInstance, referrerUrl;
2369
2369
  return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
2370
2370
  while (1) {
2371
2371
  switch (_context.prev = _context.next) {
@@ -2493,7 +2493,14 @@ var isLogined = function () {
2493
2493
  if (loginPage) {
2494
2494
  win.top.location.replace(loginPage);
2495
2495
  } else if (document.referrer) {
2496
- win.top.location.replace(document.referrer);
2496
+ var referrerUrl = new URL(document.referrer);
2497
+ if (referrerUrl.host !== win.top.location.host) {
2498
+ win.top.location.replace(document.referrer);
2499
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2500
+ win.top.location.href = './login.html';
2501
+ } else {
2502
+ next('/login');
2503
+ }
2497
2504
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2498
2505
  win.top.location.href = './login.html';
2499
2506
  } else {
@@ -2516,7 +2523,14 @@ var isLogined = function () {
2516
2523
  if (loginPage) {
2517
2524
  win.top.location.replace(loginPage);
2518
2525
  } else if (document.referrer) {
2519
- win.top.location.replace(document.referrer);
2526
+ var referrerUrl = new URL(document.referrer);
2527
+ if (referrerUrl.host !== win.top.location.host) {
2528
+ win.top.location.replace(document.referrer);
2529
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2530
+ win.top.location.href = './login.html';
2531
+ } else {
2532
+ next('/login');
2533
+ }
2520
2534
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2521
2535
  win.top.location.href = './login.html';
2522
2536
  } else {
@@ -2549,7 +2563,15 @@ var isLogined = function () {
2549
2563
  if (loginPage) {
2550
2564
  win.top.location.replace(loginPage);
2551
2565
  } else if (document.referrer) {
2552
- win.top.location.replace(document.referrer);
2566
+ referrerUrl = new URL(document.referrer);
2567
+
2568
+ if (referrerUrl.host !== win.top.location.host) {
2569
+ win.top.location.replace(document.referrer);
2570
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2571
+ win.top.location.href = './login.html';
2572
+ } else {
2573
+ next('/login');
2574
+ }
2553
2575
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2554
2576
  win.top.location.href = './login.html';
2555
2577
  } else {
@@ -4240,13 +4262,13 @@ module.exports = require("ua-parser-js");
4240
4262
  /* 12 */
4241
4263
  /***/ (function(module, exports) {
4242
4264
 
4243
- module.exports = require("lodash");
4265
+ module.exports = require("sm-crypto");
4244
4266
 
4245
4267
  /***/ }),
4246
4268
  /* 13 */
4247
4269
  /***/ (function(module, exports) {
4248
4270
 
4249
- module.exports = require("sm-crypto");
4271
+ module.exports = require("lodash");
4250
4272
 
4251
4273
  /***/ }),
4252
4274
  /* 14 */
@@ -4316,7 +4338,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
4316
4338
  // ESM COMPAT FLAG
4317
4339
  __webpack_require__.r(__webpack_exports__);
4318
4340
 
4319
- // 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=7d366933&
4341
+ // 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=88d82eac&
4320
4342
  var render = function () {
4321
4343
  var _vm = this
4322
4344
  var _h = _vm.$createElement
@@ -4414,13 +4436,13 @@ var staticRenderFns = []
4414
4436
  render._withStripped = true
4415
4437
 
4416
4438
 
4417
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=7d366933&
4439
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=88d82eac&
4418
4440
 
4419
4441
  // EXTERNAL MODULE: ./src/config/image.js
4420
4442
  var config_image = __webpack_require__(20);
4421
4443
 
4422
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=532a2b35&scoped=true&
4423
- var simplicityvue_type_template_id_532a2b35_scoped_true_render = function () {
4444
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=634782ec&scoped=true&
4445
+ var simplicityvue_type_template_id_634782ec_scoped_true_render = function () {
4424
4446
  var _vm = this
4425
4447
  var _h = _vm.$createElement
4426
4448
  var _c = _vm._self._c || _h
@@ -5086,11 +5108,11 @@ var simplicityvue_type_template_id_532a2b35_scoped_true_render = function () {
5086
5108
  ),
5087
5109
  ])
5088
5110
  }
5089
- var simplicityvue_type_template_id_532a2b35_scoped_true_staticRenderFns = []
5090
- simplicityvue_type_template_id_532a2b35_scoped_true_render._withStripped = true
5111
+ var simplicityvue_type_template_id_634782ec_scoped_true_staticRenderFns = []
5112
+ simplicityvue_type_template_id_634782ec_scoped_true_render._withStripped = true
5091
5113
 
5092
5114
 
5093
- // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=532a2b35&scoped=true&
5115
+ // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=634782ec&scoped=true&
5094
5116
 
5095
5117
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=e722b45c&scoped=true&
5096
5118
  var avatarvue_type_template_id_e722b45c_scoped_true_render = function () {
@@ -11553,6 +11575,7 @@ var events = [function (tabs, index, that) {
11553
11575
  } else {
11554
11576
  this.subMenus = null;
11555
11577
  this.showMenu = false;
11578
+ this.$message.error('未分配菜单权限,请联系管理员!');
11556
11579
  }
11557
11580
  } else {
11558
11581
  var _subMenus = this.getMenu(this.menus, this.appCode, 'appCode');
@@ -11574,6 +11597,7 @@ var events = [function (tabs, index, that) {
11574
11597
  } else {
11575
11598
  this.subMenus = null;
11576
11599
  this.showMenu = false;
11600
+ this.$message.error('未分配菜单权限,请联系管理员!');
11577
11601
  }
11578
11602
  }
11579
11603
  } else if (this.initApps && this.initApps.length && !this.indexUrl) {
@@ -11823,8 +11847,9 @@ var events = [function (tabs, index, that) {
11823
11847
  _this5.$store.commit('websocket', data);
11824
11848
  } catch (error) {}
11825
11849
  }
11826
- if (_this5.$eventBus) {
11827
- _this5.$eventBus.$emit('websocket', data);
11850
+ var bus = _this5.bus || _this5.$eventBus || _this5.$root.Bus;
11851
+ if (bus) {
11852
+ bus.$emit('websocket', data);
11828
11853
  }
11829
11854
  if (util["a" /* default */].win.eventBus) {
11830
11855
  util["a" /* default */].win.eventBus.$emit('websocket', data);
@@ -12508,18 +12533,18 @@ var events = [function (tabs, index, that) {
12508
12533
 
12509
12534
  var simplicity_component = Object(componentNormalizer["a" /* default */])(
12510
12535
  src_simplicityvue_type_script_lang_js_,
12511
- simplicityvue_type_template_id_532a2b35_scoped_true_render,
12512
- simplicityvue_type_template_id_532a2b35_scoped_true_staticRenderFns,
12536
+ simplicityvue_type_template_id_634782ec_scoped_true_render,
12537
+ simplicityvue_type_template_id_634782ec_scoped_true_staticRenderFns,
12513
12538
  false,
12514
12539
  null,
12515
- "532a2b35",
12540
+ "634782ec",
12516
12541
  null
12517
12542
 
12518
12543
  )
12519
12544
 
12520
12545
  /* harmony default export */ var simplicity = (simplicity_component.exports);
12521
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/index.vue?vue&type=template&id=0d60331a&
12522
- var defaultvue_type_template_id_0d60331a_render = function () {
12546
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/index.vue?vue&type=template&id=377c361a&
12547
+ var defaultvue_type_template_id_377c361a_render = function () {
12523
12548
  var _vm = this
12524
12549
  var _h = _vm.$createElement
12525
12550
  var _c = _vm._self._c || _h
@@ -13070,11 +13095,11 @@ var defaultvue_type_template_id_0d60331a_render = function () {
13070
13095
  1
13071
13096
  )
13072
13097
  }
13073
- var defaultvue_type_template_id_0d60331a_staticRenderFns = []
13074
- defaultvue_type_template_id_0d60331a_render._withStripped = true
13098
+ var defaultvue_type_template_id_377c361a_staticRenderFns = []
13099
+ defaultvue_type_template_id_377c361a_render._withStripped = true
13075
13100
 
13076
13101
 
13077
- // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=0d60331a&
13102
+ // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=377c361a&
13078
13103
 
13079
13104
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/userinfo.vue?vue&type=template&id=516cb128&
13080
13105
  var userinfovue_type_template_id_516cb128_render = function () {
@@ -15112,8 +15137,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15112
15137
  },
15113
15138
  setTitle: function setTitle(id) {
15114
15139
  var node = void 0;
15115
- for (var _i = 0; _i < this.menus.length; _i++) {
15116
- var item = this.menus[_i];
15140
+ for (var i = 0; i < this.menus.length; i++) {
15141
+ var item = this.menus[i];
15117
15142
  if (item.id == id) {
15118
15143
  this.title = item.text;
15119
15144
  node = item;
@@ -15223,88 +15248,88 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15223
15248
  useCaseCodes: results.resourceCodes || results.userModel.resourceCodes
15224
15249
  }
15225
15250
  });
15226
- for (var _i2 in results) {
15227
- if (_i2 === 'mainLogoUrl' && results[_i2]) {
15228
- this.mainLogo = results[_i2];
15251
+ for (var i in results) {
15252
+ if (i === 'mainLogoUrl' && results[i]) {
15253
+ this.mainLogo = results[i];
15229
15254
  }
15230
- if (_i2 === 'mainBannerUrl' && results[_i2] && this.headerImage === undefined) {
15231
- this.headerImg = results[_i2];
15255
+ if (i === 'mainBannerUrl' && results[i] && this.headerImage === undefined) {
15256
+ this.headerImg = results[i];
15232
15257
  }
15233
- if (_i2 === 'initApplication' && results[_i2]) {
15234
- this.results[_i2] = results[_i2].split(',');
15258
+ if (i === 'initApplication' && results[i]) {
15259
+ this.results[i] = results[i].split(',');
15235
15260
  }
15236
- if (_i2 === 'indexUrl' && results[_i2]) {
15237
- this.homePage = results[_i2];
15261
+ if (i === 'indexUrl' && results[i]) {
15262
+ this.homePage = results[i];
15238
15263
  }
15239
- if (_i2 === 'doorIndex' && results[_i2]) {
15240
- window.open(results[_i2]);
15241
- this.doorIndex = results[_i2];
15264
+ if (i === 'doorIndex' && results[i]) {
15265
+ window.open(results[i]);
15266
+ this.doorIndex = results[i];
15242
15267
  }
15243
- if (_i2 === 'subsystemName' && results[_i2]) {
15244
- document.title = results[_i2];
15268
+ if (i === 'subsystemName' && results[i]) {
15269
+ document.title = results[i];
15245
15270
  }
15246
- if (_i2 === 'loginPage' && results[_i2]) {
15247
- util["a" /* default */].setStorage('loginPage', results[_i2]);
15271
+ if (i === 'loginPage' && results[i]) {
15272
+ util["a" /* default */].setStorage('loginPage', results[i]);
15248
15273
  }
15249
- if (_i2 === 'sysLogoIco' && results[_i2]) {
15250
- localStorage.setItem('sysLogoIco', results[_i2]);
15251
- util["a" /* default */].setFavicon(results[_i2]);
15274
+ if (i === 'sysLogoIco' && results[i]) {
15275
+ localStorage.setItem('sysLogoIco', results[i]);
15276
+ util["a" /* default */].setFavicon(results[i]);
15252
15277
  }
15253
- if (_i2 === 'userStyle' && results[_i2]) {
15254
- if (results[_i2].color) {
15255
- var color = unescape(results[_i2].color).toLowerCase();
15278
+ if (i === 'userStyle' && results[i]) {
15279
+ if (results[i].color) {
15280
+ var color = unescape(results[i].color).toLowerCase();
15256
15281
  if (util["a" /* default */].startWith(color, '#')) {
15257
15282
  this.color = color;
15258
15283
  }
15259
15284
  }
15260
- if (results[_i2].indexUrl) {
15261
- this.homePage = results[_i2].indexUrl;
15285
+ if (results[i].indexUrl) {
15286
+ this.homePage = results[i].indexUrl;
15262
15287
  }
15263
15288
  }
15264
- if (_i2 === 'subsystemExtend' && results[_i2]) {
15265
- if (results[_i2].singleLogout) {
15266
- this.singleLogout = results[_i2].singleLogout.split(',');
15289
+ if (i === 'subsystemExtend' && results[i]) {
15290
+ if (results[i].singleLogout) {
15291
+ this.singleLogout = results[i].singleLogout.split(',');
15267
15292
  }
15268
- if (results[_i2].themeColor) {
15269
- this.color = unescape(results[_i2].themeColor).toLowerCase();
15293
+ if (results[i].themeColor) {
15294
+ this.color = unescape(results[i].themeColor).toLowerCase();
15270
15295
  }
15271
- if (results[_i2].userInfoContents) {
15272
- this.userInfoContents = results[_i2].userInfoContents;
15296
+ if (results[i].userInfoContents) {
15297
+ this.userInfoContents = results[i].userInfoContents;
15273
15298
  }
15274
- if (results[_i2].webPageWatermark) {
15299
+ if (results[i].webPageWatermark) {
15275
15300
  try {
15276
- util["a" /* default */].win.webPageWatermark = results[_i2].webPageWatermark;
15277
- util["a" /* default */].watermark(results[_i2].webPageWatermark);
15301
+ util["a" /* default */].win.webPageWatermark = results[i].webPageWatermark;
15302
+ util["a" /* default */].watermark(results[i].webPageWatermark);
15278
15303
  } catch (error) {}
15279
15304
  }
15280
- if (results[_i2].loginPage) {
15281
- util["a" /* default */].setStorage('loginPage', results[_i2].loginPage);
15305
+ if (results[i].loginPage) {
15306
+ util["a" /* default */].setStorage('loginPage', results[i].loginPage);
15282
15307
  }
15283
- if (results[_i2].portalPage || results[_i2].portalpage) {
15284
- this.doorIndex = results[_i2].portalPage || results[_i2].portalpage;
15308
+ if (results[i].portalPage || results[i].portalpage) {
15309
+ this.doorIndex = results[i].portalPage || results[i].portalpage;
15285
15310
  }
15286
- if (results[_i2].multipleVersion) {
15311
+ if (results[i].multipleVersion) {
15287
15312
  this.showSet = true;
15288
15313
  }
15289
- if (results[_i2].topRightToolHide) {
15290
- this.topRightToolHide = results[_i2].topRightToolHide;
15314
+ if (results[i].topRightToolHide) {
15315
+ this.topRightToolHide = results[i].topRightToolHide;
15291
15316
  }
15292
- if (results[_i2].contact) {
15293
- var contact = JSON.parse(results[_i2].contact);
15317
+ if (results[i].contact) {
15318
+ var contact = JSON.parse(results[i].contact);
15294
15319
  var content = contact.content.split(',');
15295
15320
  this.contact = defaultvue_type_script_lang_js_extends({}, contact, {
15296
15321
  content: content
15297
15322
  });
15298
15323
  }
15299
- if (results[_i2].aiConfig) {
15300
- if (typeof results[_i2].aiConfig == 'string') {
15324
+ if (results[i].aiConfig) {
15325
+ if (typeof results[i].aiConfig == 'string') {
15301
15326
  try {
15302
- this.aiConfig = JSON.parse(results[_i2].aiConfig);
15327
+ this.aiConfig = JSON.parse(results[i].aiConfig);
15303
15328
  } catch (error) {
15304
- this.aiConfig = { url: results[_i2].aiConfig };
15329
+ this.aiConfig = { url: results[i].aiConfig };
15305
15330
  }
15306
15331
  } else {
15307
- this.aiConfig = results[_i2].aiConfig;
15332
+ this.aiConfig = results[i].aiConfig;
15308
15333
  }
15309
15334
  this.$nextTick(function () {
15310
15335
  // util.draggableMove({
@@ -15314,19 +15339,19 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15314
15339
  // });
15315
15340
  });
15316
15341
  }
15317
- if (results[_i2].imConfig) {
15318
- if (typeof results[_i2].imConfig == 'string') {
15342
+ if (results[i].imConfig) {
15343
+ if (typeof results[i].imConfig == 'string') {
15319
15344
  try {
15320
- this.imConfig = JSON.parse(results[_i2].imConfig);
15345
+ this.imConfig = JSON.parse(results[i].imConfig);
15321
15346
  } catch (error) {
15322
- this.imConfig = { url: results[_i2].imConfig };
15347
+ this.imConfig = { url: results[i].imConfig };
15323
15348
  }
15324
15349
  } else {
15325
- this.imConfig = results[_i2].imConfig;
15350
+ this.imConfig = results[i].imConfig;
15326
15351
  }
15327
15352
  }
15328
15353
  }
15329
- store["a" /* default */].set(_i2, results[_i2]);
15354
+ store["a" /* default */].set(i, results[i]);
15330
15355
  }
15331
15356
  if (this.isLoadHomePage && this.homePage) {
15332
15357
  var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
@@ -15335,7 +15360,7 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15335
15360
  hash = hash.split('?')[0];
15336
15361
  }
15337
15362
  var jump = sessionStorage.getItem('jump');
15338
- if (!applicationid && !this.menuCode && (!jump || !this.isHistory) && (hash === '#/' || hash === '#/main') || jump == results[i]) {
15363
+ if (!applicationid && !this.menuCode && (!jump || !this.isHistory) && (hash === '#/' || hash === '#/main') || jump == this.homePage) {
15339
15364
  if (this.isHomePage) {
15340
15365
  if (this.menus && this.menus.length) {
15341
15366
  var ids = ids = this.getId(this.menus, this.homePage);
@@ -15355,9 +15380,9 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15355
15380
  },
15356
15381
 
15357
15382
  //初始用户配置及信息
15358
- init: function init(results) {
15383
+ init: function init(results, first) {
15359
15384
  this.setConfig(results);
15360
- if (this.remote) {
15385
+ if (this.remote && first) {
15361
15386
  this.getMenu();
15362
15387
  } else {
15363
15388
  this.renderMenu();
@@ -15469,8 +15494,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15469
15494
  if (!url) {
15470
15495
  return false;
15471
15496
  }
15472
- for (var _i3 = 0; _i3 < menus.length; _i3++) {
15473
- var item = menus[_i3];
15497
+ for (var i = 0; i < menus.length; i++) {
15498
+ var item = menus[i];
15474
15499
  if (item.id === url || item.appCode && item.appCode === url) {
15475
15500
  if (item.url) {
15476
15501
  if (Object.prototype.hasOwnProperty.call(item, 'children') && item.children.length) {
@@ -15657,10 +15682,10 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15657
15682
  }
15658
15683
  }
15659
15684
  if (this.application) {
15660
- for (var _i4 = 0; _i4 < res.length; _i4++) {
15661
- if (res[_i4].hasPermission) {
15662
- this.menu = res[_i4].children;
15663
- this.title = res[_i4].text;
15685
+ for (var i = 0; i < res.length; i++) {
15686
+ if (res[i].hasPermission) {
15687
+ this.menu = res[i].children;
15688
+ this.title = res[i].text;
15664
15689
  break;
15665
15690
  }
15666
15691
  }
@@ -15823,10 +15848,10 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15823
15848
  } else {
15824
15849
  this.active = active.slice(1);
15825
15850
  }
15826
- for (var _i5 = 0; _i5 < res.length; _i5++) {
15827
- if (res[_i5].id === active[0]) {
15828
- this.menu = res[_i5].children;
15829
- this.title = res[_i5].text;
15851
+ for (var i = 0; i < res.length; i++) {
15852
+ if (res[i].id === active[0]) {
15853
+ this.menu = res[i].children;
15854
+ this.title = res[i].text;
15830
15855
  break;
15831
15856
  }
15832
15857
  }
@@ -15846,8 +15871,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15846
15871
 
15847
15872
  //获取页面类型及地址
15848
15873
  getUrl: function getUrl(res, active, param) {
15849
- for (var _i6 = 0; _i6 < res.length; _i6++) {
15850
- var item = res[_i6];
15874
+ for (var i = 0; i < res.length; i++) {
15875
+ var item = res[i];
15851
15876
  if (item.id === active) {
15852
15877
  if (item.url) {
15853
15878
  this.handleJump(item.url, item.urlopenmode, item, param);
@@ -15875,9 +15900,9 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15875
15900
  setUrl: function setUrl(url, param) {
15876
15901
  var obj = param ? param : {};
15877
15902
  var params = util["a" /* default */].getParams({ url: url }, true);
15878
- for (var _i7 in params) {
15879
- if (_i7 != 'model' && _i7 != 'view' && _i7 != '_baseUrl') {
15880
- obj[_i7] = params[_i7];
15903
+ for (var i in params) {
15904
+ if (i != 'model' && i != 'view' && i != '_baseUrl') {
15905
+ obj[i] = params[i];
15881
15906
  }
15882
15907
  }
15883
15908
  var _url = params._baseUrl ? params._baseUrl : './primary.html';
@@ -16053,8 +16078,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16053
16078
  return false;
16054
16079
  }
16055
16080
  if (Array.isArray(res)) {
16056
- for (var _i8 in res) {
16057
- var path = this.hasRouter(res[_i8], url);
16081
+ for (var i in res) {
16082
+ var path = this.hasRouter(res[i], url);
16058
16083
  if (path) {
16059
16084
  return path;
16060
16085
  }
@@ -16273,8 +16298,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16273
16298
  },
16274
16299
  getFourthTabs: function getFourthTabs(menus, id) {
16275
16300
  if (Array.isArray(menus)) {
16276
- for (var _i9 = 0; _i9 < menus.length; _i9++) {
16277
- var fourth = this.getFourthTabs(menus[_i9], id);
16301
+ for (var i = 0; i < menus.length; i++) {
16302
+ var fourth = this.getFourthTabs(menus[i], id);
16278
16303
  if (fourth) {
16279
16304
  return fourth;
16280
16305
  }
@@ -16284,8 +16309,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16284
16309
  return menus;
16285
16310
  }
16286
16311
  if (menus.children && menus.children.length) {
16287
- for (var _i10 = 0; _i10 < menus.children.length; _i10++) {
16288
- var _fourth = this.getFourthTabs(menus.children[_i10], id);
16312
+ for (var _i = 0; _i < menus.children.length; _i++) {
16313
+ var _fourth = this.getFourthTabs(menus.children[_i], id);
16289
16314
  if (_fourth) {
16290
16315
  return _fourth;
16291
16316
  }
@@ -16390,26 +16415,26 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16390
16415
  take: api["oc" /* topic */],
16391
16416
  success: function success(res) {
16392
16417
  var data = res.data || {};
16393
- for (var _i11 in data) {
16394
- if (data[_i11] !== null && data[_i11] !== undefined) {
16395
- if (_i11 === 'onlineUserNums' && data[_i11] > 0) {
16396
- _this11.online = data[_i11];
16418
+ for (var i in data) {
16419
+ if (data[i] !== null && data[i] !== undefined) {
16420
+ if (i === 'onlineUserNums' && data[i] > 0) {
16421
+ _this11.online = data[i];
16397
16422
  }
16398
- if (_i11 === 'sysMsgNums' && data[_i11] !== null) {
16399
- _this11.notice = data[_i11];
16423
+ if (i === 'sysMsgNums' && data[i] !== null) {
16424
+ _this11.notice = data[i];
16400
16425
  if (_this11.showMsg) {
16401
16426
  _this11.$refs.message.getMsg(true);
16402
16427
  }
16403
16428
  }
16404
- if (_i11 === 'menuTipsMap' && data[_i11] !== null) {
16405
- _this11.menuTips = data[_i11];
16429
+ if (i === 'menuTipsMap' && data[i] !== null) {
16430
+ _this11.menuTips = data[i];
16406
16431
  }
16407
- if (_i11 === 'sysMsgList' && data[_i11] !== null) {
16408
- _this11.sysMsg = data[_i11];
16409
- data[_i11] && data[_i11].length && _this11.$emit('bus-emit', 'waitdone');
16432
+ if (i === 'sysMsgList' && data[i] !== null) {
16433
+ _this11.sysMsg = data[i];
16434
+ data[i] && data[i].length && _this11.$emit('bus-emit', 'waitdone');
16410
16435
  }
16411
- if (_i11 === 'extraData' && data[_i11] !== null) {
16412
- _this11.extraData = data[_i11];
16436
+ if (i === 'extraData' && data[i] !== null) {
16437
+ _this11.extraData = data[i];
16413
16438
  }
16414
16439
  }
16415
16440
  }
@@ -16418,8 +16443,9 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16418
16443
  _this11.$store.commit('websocket', data);
16419
16444
  } catch (error) {}
16420
16445
  }
16421
- if (_this11.$eventBus) {
16422
- _this11.$eventBus.$emit('websocket', data);
16446
+ var bus = _this11.bus || _this11.$eventBus || _this11.$root.Bus;
16447
+ if (bus) {
16448
+ bus.$emit('websocket', data);
16423
16449
  }
16424
16450
  if (util["a" /* default */].win.eventBus) {
16425
16451
  util["a" /* default */].win.eventBus.$emit('websocket', data);
@@ -16516,8 +16542,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16516
16542
 
16517
16543
  var default_component = Object(componentNormalizer["a" /* default */])(
16518
16544
  src_defaultvue_type_script_lang_js_,
16519
- defaultvue_type_template_id_0d60331a_render,
16520
- defaultvue_type_template_id_0d60331a_staticRenderFns,
16545
+ defaultvue_type_template_id_377c361a_render,
16546
+ defaultvue_type_template_id_377c361a_staticRenderFns,
16521
16547
  false,
16522
16548
  null,
16523
16549
  null,
@@ -16530,9 +16556,6 @@ var default_component = Object(componentNormalizer["a" /* default */])(
16530
16556
  var external_wujie_vue2_ = __webpack_require__(17);
16531
16557
  var external_wujie_vue2_default = /*#__PURE__*/__webpack_require__.n(external_wujie_vue2_);
16532
16558
 
16533
- // EXTERNAL MODULE: external "lodash"
16534
- var external_lodash_ = __webpack_require__(12);
16535
-
16536
16559
  // 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&
16537
16560
  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
16538
16561
 
@@ -16590,7 +16613,6 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
16590
16613
 
16591
16614
 
16592
16615
 
16593
-
16594
16616
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
16595
16617
  name: 'EsMain',
16596
16618
  inheritAttrs: false,
@@ -16657,83 +16679,109 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
16657
16679
  mounted: function mounted() {
16658
16680
  var _this = this;
16659
16681
 
16660
- this.getConfig(this.params);
16682
+ console.log('params', this.$refs, this.$refs.main);
16683
+
16684
+ var token = util["a" /* default */].getStorage('token') || util["a" /* default */].getStorage('Authorization');
16685
+ this.isLogin = token ? true : this.isLogin;
16686
+ if (!token && Object.prototype.hasOwnProperty.call(this.params, 'serverId') && Object.prototype.hasOwnProperty.call(this.params, 'authType')) {
16687
+ return false;
16688
+ }
16661
16689
  if (this.isLogin) {
16662
16690
  if (util["a" /* default */].win.$wujie) {
16663
16691
  util["a" /* default */].win.$wujie.bus.$on('changeTheme', function (res) {
16664
16692
  util["a" /* default */].updateTheme(res);
16665
16693
  });
16666
16694
  }
16667
-
16668
- var bus = this.bus || this.$root.Bus;
16669
- if (bus) {
16670
- bus.$on('reLogin', this.handleReLogin);
16671
- bus.$on('refresh', this.$refs.main.handleRefresh);
16672
- bus.$on('jumpMenu', this.$refs.main.jumpMenu);
16673
- bus.$on('emit', function (method, args) {
16695
+ this.$nextTick(function () {
16696
+ _this.getConfig();
16697
+ var bus = _this.bus || _this.$root.Bus;
16698
+ if (bus) {
16699
+ bus.$on('reLogin', _this.handleReLogin);
16700
+ bus.$on('refresh', _this.$refs.main.handleRefresh);
16701
+ bus.$on('jumpMenu', _this.$refs.main.jumpMenu);
16702
+ bus.$on('emit', function (method, args) {
16703
+ // 主应用发送事件
16704
+ bus.$emit(method, args);
16705
+ });
16706
+ }
16707
+ util["a" /* default */].win.reLogin = _this.handleReLogin;
16708
+ util["a" /* default */].win.windowOpen = _this.openPage;
16709
+ util["a" /* default */].win.refresh = _this.$refs.main.handleRefresh;
16710
+ util["a" /* default */].win.jumpMenu = _this.$refs.main.jumpMenu;
16711
+ external_wujie_vue2_default.a.bus.$on('reLogin', _this.handleReLogin);
16712
+ external_wujie_vue2_default.a.bus.$on('refresh', _this.$refs.main.handleRefresh);
16713
+ external_wujie_vue2_default.a.bus.$on('jumpMenu', _this.$refs.main.jumpMenu);
16714
+ external_wujie_vue2_default.a.bus.$on('emit', function (method, args) {
16674
16715
  // 主应用发送事件
16675
- bus.$emit(method, args);
16716
+ external_wujie_vue2_default.a.bus.$emit(method, args);
16676
16717
  });
16677
- }
16678
- util["a" /* default */].win.reLogin = this.handleReLogin;
16679
- util["a" /* default */].win.windowOpen = this.openPage;
16680
- util["a" /* default */].win.refresh = this.$refs.main.handleRefresh;
16681
- util["a" /* default */].win.jumpMenu = this.$refs.main.jumpMenu;
16682
- external_wujie_vue2_default.a.bus.$on('reLogin', this.handleReLogin);
16683
- external_wujie_vue2_default.a.bus.$on('refresh', this.$refs.main.handleRefresh);
16684
- external_wujie_vue2_default.a.bus.$on('jumpMenu', this.$refs.main.jumpMenu);
16685
- external_wujie_vue2_default.a.bus.$on('emit', function (method, args) {
16686
- // 主应用发送事件
16687
- external_wujie_vue2_default.a.bus.$emit(method, args);
16688
- });
16689
16718
 
16690
- window.addEventListener('message', function (e) {
16691
- var _$refs$main;
16719
+ window.addEventListener('message', function (e) {
16720
+ var _$refs$main;
16692
16721
 
16693
- var _e$data = e.data,
16694
- method = _e$data.method,
16695
- args = _e$data.args;
16722
+ var _e$data = e.data,
16723
+ method = _e$data.method,
16724
+ args = _e$data.args;
16696
16725
 
16697
- switch (method) {
16698
- case 'reLogin':
16699
- _this.handleReLogin(args);
16700
- break;
16701
- case 'refresh':
16702
- _this.$refs.main.handleRefresh(args);
16703
- break;
16704
- case 'jumpMenu':
16705
- Array.isArray(args) ? (_$refs$main = _this.$refs.main).jumpMenu.apply(_$refs$main, args) : _this.$refs.main.jumpMenu(args);
16706
- break;
16707
- case 'emit':
16708
- var origin = args.origin,
16709
- data = _objectWithoutProperties(args, ['origin']);
16726
+ switch (method) {
16727
+ case 'reLogin':
16728
+ _this.handleReLogin(args);
16729
+ break;
16730
+ case 'refresh':
16731
+ _this.$refs.main.handleRefresh(args);
16732
+ break;
16733
+ case 'jumpMenu':
16734
+ Array.isArray(args) ? (_$refs$main = _this.$refs.main).jumpMenu.apply(_$refs$main, args) : _this.$refs.main.jumpMenu(args);
16735
+ break;
16736
+ case 'emit':
16737
+ var origin = args.origin,
16738
+ data = _objectWithoutProperties(args, ['origin']);
16710
16739
 
16711
- var iframes = document.getElementsByTagName('iframe');
16712
- iframes = iframes.filter(function (item) {
16713
- return origin ? item.src.indexOf(origin) > -1 : item.src.indexOf(e.origin) == -1;
16714
- });
16715
- for (var i = 0; i < iframes.length; i++) {
16716
- iframes[i] && iframes[i].contentWindow.postMessage(data, origin ? origin : '*');
16717
- }
16718
- break;
16719
- case 'openDialog':
16720
- _this.dialogs.push(args);
16721
- var index = _this.visibles.length;
16722
- _this.visibles.push(false);
16723
- _this.$nextTick(function () {
16724
- _this.$set(_this.visibles, index, true);
16725
- });
16726
- break;
16727
- case 'closeDialog':
16728
- for (var _i = 0; _i < _this.dialogs.length; _i++) {
16729
- var item = _this.dialogs[_i];
16730
- if (item.url == args.url) {
16731
- _this.$set(_this.visibles, _i, false);
16740
+ var iframes = document.getElementsByTagName('iframe');
16741
+ iframes = iframes.filter(function (item) {
16742
+ return origin ? item.src.indexOf(origin) > -1 : item.src.indexOf(e.origin) == -1;
16743
+ });
16744
+ for (var i = 0; i < iframes.length; i++) {
16745
+ iframes[i] && iframes[i].contentWindow.postMessage(data, origin ? origin : '*');
16732
16746
  }
16733
- }
16734
- break;
16735
- }
16747
+ break;
16748
+ case 'openDialog':
16749
+ _this.dialogs.push(args);
16750
+ var index = _this.visibles.length;
16751
+ _this.visibles.push(false);
16752
+ _this.$nextTick(function () {
16753
+ _this.$set(_this.visibles, index, true);
16754
+ });
16755
+ break;
16756
+ case 'closeDialog':
16757
+ for (var _i = 0; _i < _this.dialogs.length; _i++) {
16758
+ var item = _this.dialogs[_i];
16759
+ if (item.url == args.url) {
16760
+ _this.$set(_this.visibles, _i, false);
16761
+ }
16762
+ }
16763
+ break;
16764
+ }
16765
+ });
16736
16766
  });
16767
+ } else {
16768
+ var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
16769
+ if (loginPage) {
16770
+ window.location.replace(loginPage);
16771
+ } else if (document.referrer) {
16772
+ var referrerUrl = new URL(document.referrer);
16773
+ if (referrerUrl.host !== window.location.host) {
16774
+ window.location.replace(document.referrer);
16775
+ } else if (window.location.href.indexOf('main.html') > -1 || window.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
16776
+ window.location.href = './login.html';
16777
+ } else {
16778
+ next('/login');
16779
+ }
16780
+ } else if (window.location.href.indexOf('main.html') > -1) {
16781
+ window.location.href = './login.html';
16782
+ } else {
16783
+ next('/login');
16784
+ }
16737
16785
  }
16738
16786
  },
16739
16787
 
@@ -16848,22 +16896,15 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
16848
16896
  * @author huangbo
16849
16897
  * @date 2024年9月7日
16850
16898
  **/
16851
- getConfig: function getConfig(query) {
16899
+ getConfig: function getConfig() {
16852
16900
  var _this4 = this;
16853
16901
 
16854
- var token = util["a" /* default */].getStorage('token') || util["a" /* default */].getStorage('Authorization');
16855
- this.isLogin = token ? true : this.isLogin;
16856
- if (!token && Object.prototype.hasOwnProperty.call(query, 'serverId') && Object.prototype.hasOwnProperty.call(query, 'authType')) {
16857
- return false;
16858
- }
16859
16902
  var mainConfig = util["a" /* default */].getStorage('mainConfig');
16860
16903
  if (mainConfig) {
16861
16904
  mainConfig = JSON.parse(mainConfig);
16862
- this.$nextTick(function () {
16863
- _this4.$refs.main.init(mainConfig, true);
16864
- util["a" /* default */].getMainConfig(function (res) {
16865
- _this4.$refs.main.init(res, false);
16866
- });
16905
+ this.$refs.main.init(mainConfig, true);
16906
+ util["a" /* default */].getMainConfig(function (res) {
16907
+ _this4.$refs.main.init(res, false);
16867
16908
  });
16868
16909
  } else {
16869
16910
  util["a" /* default */].getMainConfig(function (res) {