eoss-ui 0.4.62 → 0.4.64

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 (78) hide show
  1. package/README.md +0 -2
  2. package/lib/button-group.js +11 -11
  3. package/lib/button.js +11 -11
  4. package/lib/checkbox-group.js +27 -37
  5. package/lib/data-table-form.js +11 -11
  6. package/lib/data-table.js +72 -57
  7. package/lib/date-picker.js +11 -11
  8. package/lib/dialog.js +10 -10
  9. package/lib/eoss-ui.common.js +1806 -749
  10. package/lib/flow-group.js +89 -29
  11. package/lib/flow-list.js +1122 -427
  12. package/lib/flow.js +19 -20
  13. package/lib/form.js +222 -40
  14. package/lib/handle-user.js +12 -12
  15. package/lib/handler.js +15 -15
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +11 -11
  18. package/lib/input.js +36 -36
  19. package/lib/login.js +41 -41
  20. package/lib/main.js +211 -104
  21. package/lib/menu.js +5 -3
  22. package/lib/nav.js +13 -15
  23. package/lib/notify.js +2 -2
  24. package/lib/page.js +11 -11
  25. package/lib/player.js +18 -18
  26. package/lib/qr-code.js +11 -11
  27. package/lib/radio-group.js +15 -15
  28. package/lib/retrial-auth.js +12 -12
  29. package/lib/select-ganged.js +11 -11
  30. package/lib/select.js +13 -13
  31. package/lib/selector-panel.js +12 -12
  32. package/lib/selector.js +29 -18
  33. package/lib/sizer.js +12 -12
  34. package/lib/steps.js +11 -11
  35. package/lib/switch.js +11 -11
  36. package/lib/table-form.js +36 -36
  37. package/lib/tabs.js +11 -11
  38. package/lib/theme-chalk/data-table.css +1 -1
  39. package/lib/theme-chalk/flow-list.css +1 -1
  40. package/lib/theme-chalk/index.css +1 -1
  41. package/lib/theme-chalk/menu.css +1 -1
  42. package/lib/tips.js +12 -12
  43. package/lib/toolbar.js +1 -3
  44. package/lib/tree-group.js +11 -11
  45. package/lib/tree.js +12 -12
  46. package/lib/upload.js +18 -18
  47. package/lib/utils/util.js +2 -2
  48. package/lib/wujie.js +11 -11
  49. package/lib/wxlogin.js +11 -11
  50. package/package.json +2 -2
  51. package/packages/checkbox-group/src/main.vue +16 -25
  52. package/packages/data-table/src/column.vue +15 -1
  53. package/packages/data-table/src/main.vue +58 -47
  54. package/packages/flow/src/component/taskUnionExamine.vue +0 -1
  55. package/packages/flow-group/src/main.vue +31 -14
  56. package/packages/flow-list/src/flow-table.vue +5 -1
  57. package/packages/flow-list/src/main.vue +780 -43
  58. package/packages/form/src/main.vue +63 -1
  59. package/packages/handler/src/main.vue +1 -1
  60. package/packages/login/src/main.vue +11 -2
  61. package/packages/main/src/main.vue +177 -58
  62. package/packages/main/src/userinfo.vue +10 -4
  63. package/packages/menu/src/main.vue +5 -3
  64. package/packages/nav/src/main.vue +0 -2
  65. package/packages/radio-group/src/main.vue +9 -5
  66. package/packages/select/src/main.vue +1 -1
  67. package/packages/selector/src/main.vue +12 -4
  68. package/packages/theme-chalk/lib/data-table.css +1 -1
  69. package/packages/theme-chalk/lib/flow-list.css +1 -1
  70. package/packages/theme-chalk/lib/index.css +1 -1
  71. package/packages/theme-chalk/lib/menu.css +1 -1
  72. package/packages/theme-chalk/src/data-table.scss +10 -17
  73. package/packages/theme-chalk/src/flow-list.scss +29 -34
  74. package/packages/theme-chalk/src/menu.scss +3 -0
  75. package/packages/toolbar/src/main.vue +1 -3
  76. package/packages/upload/src/main.vue +1 -1
  77. package/src/index.js +1 -1
  78. package/src/utils/util.js +2 -2
package/lib/main.js CHANGED
@@ -90,14 +90,14 @@ module.exports =
90
90
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
91
91
 
92
92
  "use strict";
93
- /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
93
+ /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
94
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
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__(1);
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
 
@@ -265,7 +265,7 @@ var ajax = function ajax(_ref) {
265
265
  var loginPage = getStorage('login') || getStorage('loginPage');
266
266
  if (loginPage) {
267
267
  var src = void 0;
268
- if (!startWith(loginPage, ['http', '/'])) {
268
+ if (!startWith(loginPage, ['http', '/'], true)) {
269
269
  var pathname = win.top.location.pathname;
270
270
  if (pathname !== '/') {
271
271
  pathname = pathname.split('/');
@@ -2083,7 +2083,7 @@ var setStorage = function setStorage(_ref14) {
2083
2083
  * @param {boolean} [or] - 或者(等同于||)
2084
2084
  **/
2085
2085
  var startWith = function startWith(value, reg) {
2086
- var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2086
+ var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2087
2087
 
2088
2088
  if (Array.isArray(reg)) {
2089
2089
  var flag = true;
@@ -2390,12 +2390,6 @@ var watermark = function watermark(option) {
2390
2390
 
2391
2391
  /***/ }),
2392
2392
  /* 1 */
2393
- /***/ (function(module, exports) {
2394
-
2395
- module.exports = require("eoss-element");
2396
-
2397
- /***/ }),
2398
- /* 2 */
2399
2393
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2400
2394
 
2401
2395
  "use strict";
@@ -2733,6 +2727,12 @@ var sendBatch = '/notify2/sendRecord/reSendNotifyMessageBatch';
2733
2727
  // 表单结构
2734
2728
  var formContents = '/config/admin/online/onlineForm/render';
2735
2729
 
2730
+ /***/ }),
2731
+ /* 2 */
2732
+ /***/ (function(module, exports) {
2733
+
2734
+ module.exports = require("eoss-element");
2735
+
2736
2736
  /***/ }),
2737
2737
  /* 3 */
2738
2738
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -2936,7 +2936,7 @@ module.exports = require("stompjs");
2936
2936
  // ESM COMPAT FLAG
2937
2937
  __webpack_require__.r(__webpack_exports__);
2938
2938
 
2939
- // 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=dc0b0e22&
2939
+ // 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=1686d4f2&
2940
2940
  var render = function () {
2941
2941
  var _vm = this
2942
2942
  var _h = _vm.$createElement
@@ -2994,6 +2994,7 @@ var render = function () {
2994
2994
  popperClass: "el-menu--popup-" + _vm.layout,
2995
2995
  data: _vm.navs,
2996
2996
  deep: _vm.layout === "topnav",
2997
+ height: _vm.layout === "topnav" ? "370px" : undefined,
2997
2998
  "default-active": _vm.topActive,
2998
2999
  },
2999
3000
  on: {
@@ -3302,9 +3303,6 @@ var render = function () {
3302
3303
  "update:visible": function ($event) {
3303
3304
  _vm.showSet = $event
3304
3305
  },
3305
- "update:layout": function ($event) {
3306
- _vm.layout = $event
3307
- },
3308
3306
  change: _vm.handleChange,
3309
3307
  layout: _vm.handleLayout,
3310
3308
  },
@@ -3364,10 +3362,10 @@ var staticRenderFns = []
3364
3362
  render._withStripped = true
3365
3363
 
3366
3364
 
3367
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=dc0b0e22&
3365
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=1686d4f2&
3368
3366
 
3369
- // 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=2f7a984a&
3370
- var userinfovue_type_template_id_2f7a984a_render = function () {
3367
+ // 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=c2c69d4a&
3368
+ var userinfovue_type_template_id_c2c69d4a_render = function () {
3371
3369
  var _vm = this
3372
3370
  var _h = _vm.$createElement
3373
3371
  var _c = _vm._self._c || _h
@@ -3383,14 +3381,14 @@ var userinfovue_type_template_id_2f7a984a_render = function () {
3383
3381
  2
3384
3382
  )
3385
3383
  }
3386
- var userinfovue_type_template_id_2f7a984a_staticRenderFns = []
3387
- userinfovue_type_template_id_2f7a984a_render._withStripped = true
3384
+ var userinfovue_type_template_id_c2c69d4a_staticRenderFns = []
3385
+ userinfovue_type_template_id_c2c69d4a_render._withStripped = true
3388
3386
 
3389
3387
 
3390
- // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=template&id=2f7a984a&
3388
+ // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=template&id=c2c69d4a&
3391
3389
 
3392
3390
  // EXTERNAL MODULE: ./src/config/api.js
3393
- var api = __webpack_require__(2);
3391
+ var api = __webpack_require__(1);
3394
3392
 
3395
3393
  // EXTERNAL MODULE: ./src/utils/store.js
3396
3394
  var store = __webpack_require__(8);
@@ -3428,6 +3426,7 @@ var util = __webpack_require__(0);
3428
3426
  data: function data() {
3429
3427
  return {
3430
3428
  results: '',
3429
+ userScanBindImgUrl: '',
3431
3430
  qrcode: '',
3432
3431
  notify: store["a" /* default */].get('userStyle') ? store["a" /* default */].get('userStyle').notify : '',
3433
3432
  checkPassword: '',
@@ -3607,7 +3606,7 @@ var util = __webpack_require__(0);
3607
3606
 
3608
3607
  methods: {
3609
3608
  getQrcode: function getQrcode() {
3610
- this.getData();
3609
+ this.qrcode = util["a" /* default */].getStorage('host') + this.userScanBindImgUrl + '&_tt=' + Math.random().toString().split('.')[1];
3611
3610
  },
3612
3611
  getData: function getData() {
3613
3612
  var _this2 = this;
@@ -3631,6 +3630,7 @@ var util = __webpack_require__(0);
3631
3630
  _this2.values.email = results.simpleUserInfo.email;
3632
3631
  _this2.values.officetel = results.simpleUserInfo.officetel;
3633
3632
  if (results.userScanBindImgUrl) {
3633
+ _this2.userScanBindImgUrl = results.userScanBindImgUrl;
3634
3634
  _this2.qrcode = util["a" /* default */].getStorage('host') + results.userScanBindImgUrl;
3635
3635
  } else {
3636
3636
  _this2.qrcode = '';
@@ -3705,11 +3705,11 @@ var util = __webpack_require__(0);
3705
3705
  email: this.values.email,
3706
3706
  officeTel: this.values.officetel,
3707
3707
  phone: this.values.phone,
3708
- oldPassword: initLogin && initLogin.secret ? util["a" /* default */].esmEncrypt({
3708
+ oldPassword: initLogin && initLogin.secret && this.values.oldpassword ? util["a" /* default */].esmEncrypt({
3709
3709
  data: this.values.oldpassword,
3710
3710
  key: initLogin.secret
3711
3711
  }) : this.values.oldpassword,
3712
- password: initLogin && initLogin.secret ? util["a" /* default */].esmEncrypt({
3712
+ password: initLogin && initLogin.secret && this.values.password ? util["a" /* default */].esmEncrypt({
3713
3713
  data: this.values.password,
3714
3714
  key: initLogin.secret
3715
3715
  }) : this.values.password
@@ -3726,7 +3726,7 @@ var util = __webpack_require__(0);
3726
3726
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
3727
3727
  if (loginPage) {
3728
3728
  var src = void 0;
3729
- if (!util["a" /* default */].startWith(loginPage, ['http', '/'])) {
3729
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
3730
3730
  var pathname = util["a" /* default */].win.top.location.pathname;
3731
3731
  if (pathname !== '/') {
3732
3732
  pathname = pathname.split('/');
@@ -3808,8 +3808,8 @@ var componentNormalizer = __webpack_require__(3);
3808
3808
 
3809
3809
  var component = Object(componentNormalizer["a" /* default */])(
3810
3810
  src_userinfovue_type_script_lang_js_,
3811
- userinfovue_type_template_id_2f7a984a_render,
3812
- userinfovue_type_template_id_2f7a984a_staticRenderFns,
3811
+ userinfovue_type_template_id_c2c69d4a_render,
3812
+ userinfovue_type_template_id_c2c69d4a_staticRenderFns,
3813
3813
  false,
3814
3814
  null,
3815
3815
  null,
@@ -5418,6 +5418,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
5418
5418
  //
5419
5419
  //
5420
5420
  //
5421
+ //
5421
5422
 
5422
5423
 
5423
5424
 
@@ -5555,6 +5556,10 @@ var log = util["a" /* default */].getParams('console');
5555
5556
  userHeight: {
5556
5557
  type: String,
5557
5558
  default: '740px'
5559
+ },
5560
+ history: {
5561
+ type: Boolean,
5562
+ default: true
5558
5563
  }
5559
5564
  },
5560
5565
  computed: {
@@ -5577,7 +5582,6 @@ var log = util["a" /* default */].getParams('console');
5577
5582
  return true;
5578
5583
  },
5579
5584
  navWidth: function navWidth() {
5580
- console.log(this.layout === 'topside' ? '230px' : undefined, 9000);
5581
5585
  return this.layout === 'topside' ? '230px' : undefined;
5582
5586
  },
5583
5587
  showNavTitle: function showNavTitle() {
@@ -5763,7 +5767,8 @@ var log = util["a" /* default */].getParams('console');
5763
5767
  isHeader: '',
5764
5768
  isSide: null,
5765
5769
  navIds: null,
5766
- timer: null
5770
+ timer: null,
5771
+ pid: null
5767
5772
  };
5768
5773
  },
5769
5774
  created: function created() {
@@ -5863,6 +5868,15 @@ var log = util["a" /* default */].getParams('console');
5863
5868
  thalk.innerText = globalThalk;
5864
5869
  }
5865
5870
  },
5871
+ setTitle: function setTitle(id) {
5872
+ for (var i = 0; i < this.menus.length; i++) {
5873
+ var item = this.menus[i];
5874
+ if (item.id == id) {
5875
+ this.title = item.text;
5876
+ return item;
5877
+ }
5878
+ }
5879
+ },
5866
5880
  renderMenu: function renderMenu() {
5867
5881
  if (this.data !== undefined && this.data.length) {
5868
5882
  this.menus = JSON.parse(JSON.stringify(this.data));
@@ -5871,6 +5885,8 @@ var log = util["a" /* default */].getParams('console');
5871
5885
  var ids = this.getId(this.menus, applicationid);
5872
5886
  if (ids) {
5873
5887
  this.defaultActive = ids;
5888
+ this.navIds = ids;
5889
+ this.setTitle(ids[0]);
5874
5890
  }
5875
5891
  } else if (util["a" /* default */].win.location.hash) {
5876
5892
  var hash = util["a" /* default */].win.location.hash;
@@ -5881,17 +5897,23 @@ var log = util["a" /* default */].getParams('console');
5881
5897
  var _ids = this.getId(this.menus, util["a" /* default */].win.location.hash, true);
5882
5898
  if (_ids) {
5883
5899
  this.defaultActive = _ids;
5900
+ this.navIds = _ids;
5901
+ this.setTitle(_ids[0]);
5884
5902
  }
5885
- } else if (sessionStorage.getItem('jump')) {
5903
+ } else if (sessionStorage.getItem('jump') && this.history) {
5886
5904
  var _ids2 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
5887
5905
  if (_ids2) {
5888
5906
  this.defaultActive = _ids2;
5907
+ this.navIds = _ids2;
5908
+ this.setTitle(_ids2[0]);
5889
5909
  }
5890
5910
  }
5891
- } else if (sessionStorage.getItem('jump')) {
5911
+ } else if (sessionStorage.getItem('jump') && this.history) {
5892
5912
  var _ids3 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
5893
5913
  if (_ids3) {
5894
5914
  this.defaultActive = _ids3;
5915
+ this.navIds = _ids3;
5916
+ this.setTitle(_ids3[0]);
5895
5917
  }
5896
5918
  }
5897
5919
  this.setMenu(this.menus);
@@ -5945,7 +5967,7 @@ var log = util["a" /* default */].getParams('console');
5945
5967
  key: {
5946
5968
  userId: results.userModel.userId,
5947
5969
  userName: results.userModel.username,
5948
- useCaseCodes: results.resourceCodes
5970
+ useCaseCodes: results.resourceCodes || results.userModel.resourceCodes
5949
5971
  }
5950
5972
  });
5951
5973
  }
@@ -5963,10 +5985,10 @@ var log = util["a" /* default */].getParams('console');
5963
5985
  this.homePage = results[i];
5964
5986
  if (this.isHomePage) {
5965
5987
  if (this.menus) {
5966
- var ids = null;
5967
- this.homePage && (ids = this.getId(this.menus, this.homePage));
5968
- if (ids) {
5969
- this.defaultActive = ids;
5988
+ var _ids4 = null;
5989
+ this.homePage && (_ids4 = this.getId(this.menus, this.homePage));
5990
+ if (_ids4) {
5991
+ this.defaultActive = _ids4;
5970
5992
  } else if (this.homePage) {
5971
5993
  this.handleJump(this.homePage);
5972
5994
  }
@@ -5981,9 +6003,6 @@ var log = util["a" /* default */].getParams('console');
5981
6003
  if (i === 'subsystemName') {
5982
6004
  document.title = results[i];
5983
6005
  }
5984
- if (i === 'resourceCodes') {
5985
- sessionStorage.setItem('useCaseCodes', results[i]);
5986
- }
5987
6006
  if (i === 'sysLogoIco' && results[i]) {
5988
6007
  sessionStorage.setItem('sysLogoIco', results[i]);
5989
6008
  util["a" /* default */].setFavicon(results[i]);
@@ -6118,9 +6137,9 @@ var log = util["a" /* default */].getParams('console');
6118
6137
  _this5.menus = JSON.parse(JSON.stringify(res.results));
6119
6138
  var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
6120
6139
  if (applicationid) {
6121
- var ids = _this5.getId(_this5.menus, applicationid);
6122
- if (ids) {
6123
- _this5.defaultActive = ids;
6140
+ var _ids5 = _this5.getId(_this5.menus, applicationid);
6141
+ if (_ids5) {
6142
+ _this5.defaultActive = _ids5;
6124
6143
  }
6125
6144
  } else if (util["a" /* default */].win.location.hash) {
6126
6145
  var hash = util["a" /* default */].win.location.hash;
@@ -6128,20 +6147,26 @@ var log = util["a" /* default */].getParams('console');
6128
6147
  hash = hash.split('?')[0];
6129
6148
  }
6130
6149
  if (hash !== '#/' && hash !== '#/main') {
6131
- var _ids4 = _this5.getId(_this5.menus, util["a" /* default */].win.location.hash, true);
6132
- if (_ids4) {
6133
- _this5.defaultActive = _ids4;
6150
+ var _ids6 = _this5.getId(_this5.menus, util["a" /* default */].win.location.hash, true);
6151
+ if (_ids6) {
6152
+ _this5.defaultActive = _ids6;
6153
+ _this5.navIds = _ids6;
6154
+ _this5.setTitle(_ids6[0]);
6134
6155
  }
6135
- } else if (sessionStorage.getItem('jump')) {
6136
- var _ids5 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6137
- if (_ids5) {
6138
- _this5.defaultActive = _ids5;
6156
+ } else if (sessionStorage.getItem('jump') && _this5.history) {
6157
+ var _ids7 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6158
+ if (_ids7) {
6159
+ _this5.defaultActive = _ids7;
6160
+ _this5.navIds = _ids7;
6161
+ _this5.setTitle(_ids7[0]);
6139
6162
  }
6140
6163
  }
6141
- } else if (sessionStorage.getItem('jump')) {
6142
- var _ids6 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6143
- if (_ids6) {
6144
- _this5.defaultActive = _ids6;
6164
+ } else if (sessionStorage.getItem('jump') && _this5.history) {
6165
+ var _ids8 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6166
+ if (_ids8) {
6167
+ _this5.defaultActive = _ids8;
6168
+ _this5.navIds = _ids8;
6169
+ _this5.setTitle(_ids8[0]);
6145
6170
  }
6146
6171
  }
6147
6172
  _this5.setTips(_this5.menus);
@@ -6160,7 +6185,6 @@ var log = util["a" /* default */].getParams('console');
6160
6185
 
6161
6186
  //设置默认左侧导航
6162
6187
  setMenu: function setMenu(res) {
6163
- console.log(9000);
6164
6188
  if (this.defaultActive && this.defaultActive.length) {
6165
6189
  this.isDefault = false;
6166
6190
  this.setDefault(res, this.defaultActive);
@@ -6168,9 +6192,9 @@ var log = util["a" /* default */].getParams('console');
6168
6192
  if (this.homePage || !util["a" /* default */].getStorage('mainConfig')) {
6169
6193
  this.isDefault = true;
6170
6194
  if (this.homePage && (!this.defaultActive || !this.defaultActive.length)) {
6171
- var ids = this.getId(this.menus, this.homePage);
6172
- if (ids) {
6173
- this.defaultActive = ids;
6195
+ var _ids9 = this.getId(this.menus, this.homePage);
6196
+ if (_ids9) {
6197
+ this.defaultActive = _ids9;
6174
6198
  this.isDefault = false;
6175
6199
  this.setDefault(res, this.defaultActive);
6176
6200
  return false;
@@ -6244,11 +6268,15 @@ var log = util["a" /* default */].getParams('console');
6244
6268
  if (!obj) {
6245
6269
  return '';
6246
6270
  }
6271
+ var openIdex = 0;
6272
+ if (obj.extendData && (obj.extendData.subDefOpenIndex || obj.extendData.subDefOpen)) {
6273
+ openIdex = parseInt(obj.extendData.subDefOpenIndex || obj.extendData.subDefOpen, 10);
6274
+ }
6247
6275
  if (obj.children && obj.children.length) {
6248
- return this.getFirst(obj.children[0]);
6276
+ return this.getFirst(obj.children[openIdex]);
6249
6277
  } else if (obj.fourthTabs && obj.fourthTabs.length) {
6250
6278
  if (this.layout === 'topnav') {
6251
- return this.getFirst(obj.fourthTabs[0]);
6279
+ return this.getFirst(obj.fourthTabs[openIdex]);
6252
6280
  } else {
6253
6281
  this.tabs = obj.fourthTabs;
6254
6282
  if (obj.url) {
@@ -6410,15 +6438,17 @@ var log = util["a" /* default */].getParams('console');
6410
6438
  var _url = params._baseUrl ? params._baseUrl : './primary.html';
6411
6439
  return util["a" /* default */].urlJoinParams({ url: _url, param: obj });
6412
6440
  },
6413
- handleOpenNav: function handleOpenNav(res) {
6414
- console.log(res, 777);
6415
- },
6416
6441
 
6417
6442
  //应用导航交互
6418
6443
  handleSelect: function handleSelect(res, type, open) {
6419
- console.log(type);
6420
- var node = res.node;
6444
+ console.log(type, 11);
6445
+ var node = res.node,
6446
+ fourthTabs = res.fourthTabs;
6421
6447
 
6448
+ var openIdex = 0;
6449
+ if (node.extendData && (node.extendData.subDefOpenIndex || node.extendData.subDefOpen)) {
6450
+ openIdex = parseInt(node.extendData.subDefOpenIndex || node.extendData.subDefOpen, 10);
6451
+ }
6422
6452
  if (!open) {
6423
6453
  if (node.extendData && node.extendData.businessStatus == 0 && node.extendData.businessWarnMsg) {
6424
6454
  this.$alert(node.extendData.businessWarnMsg, '提示', {
@@ -6437,28 +6467,17 @@ var log = util["a" /* default */].getParams('console');
6437
6467
  this.navIds = [node.id];
6438
6468
  this.menu = node.children;
6439
6469
  this.title = node.text;
6440
- var subNode = this.getFirst(node.children[0]);
6441
- if (subNode) {
6442
- this.active = subNode.id;
6443
- this.navIds = [node.id].concat(this.getId(subNode.url));
6470
+ if (this.setFirstAsDefault) {
6471
+ var subNode = this.getFirst(node.children[openIdex]);
6472
+ if (subNode) {
6473
+ this.active = subNode.id;
6474
+ this.navIds = [node.id].concat(this.getId(node.children, subNode.url, true));
6475
+ }
6444
6476
  }
6445
6477
  } else {
6446
6478
  this.navIds = this.getId(this.menus, node.url, true);
6447
- if (node.url) {
6448
- var tab = node.fourthTabs.filter(function (item) {
6449
- return item.url === node.url;
6450
- })[0];
6451
- if (tab) {
6452
- this.tabs = node.fourthTabs;
6453
- this.tabsId = tab.id;
6454
- }
6455
- } else {
6456
- if (node.fourthTabs.length) {
6457
- this.tabs = node.fourthTabs;
6458
- this.tabsId = this.tabs[0].id;
6459
- this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
6460
- }
6461
- }
6479
+ this.setTitle(ids[0]);
6480
+ this.tabsId = fourthTabs ? node.id : '';
6462
6481
  }
6463
6482
  break;
6464
6483
  case 'sys':
@@ -6467,7 +6486,9 @@ var log = util["a" /* default */].getParams('console');
6467
6486
  this.tabs = [];
6468
6487
  this.menu = node.children;
6469
6488
  this.title = node.text;
6470
- this.active = this.getFirst(node.children[0]).id;
6489
+ if (this.setFirstAsDefault) {
6490
+ this.active = this.getFirst(node.children[openIdex]).id;
6491
+ }
6471
6492
  this.isSide = true;
6472
6493
  }
6473
6494
  break;
@@ -6478,10 +6499,9 @@ var log = util["a" /* default */].getParams('console');
6478
6499
  }
6479
6500
  if (this.setFirstAsDefault) {
6480
6501
  var _subNode = this.getFirst(node);
6481
- this.$set(this.active, 0, node.id);
6502
+ this.active = [node.id];
6482
6503
  if (_subNode && node.id !== _subNode.id) {
6483
- console.log(_subNode, _subNode.url);
6484
- console.log(this.getId(this.menus, _subNode.url, true));
6504
+ this.navIds = this.getId(this.menus, _subNode.url, true);
6485
6505
  this.$set(this.active, 1, _subNode.id);
6486
6506
  }
6487
6507
  }
@@ -6499,33 +6519,39 @@ var log = util["a" /* default */].getParams('console');
6499
6519
  }
6500
6520
  if (node.url) {
6501
6521
  if (node.children && node.children.length) {
6502
- var _tab = node.children.filter(function (item) {
6522
+ var tab = node.children.filter(function (item) {
6503
6523
  return item.url === node.url;
6504
6524
  })[0];
6505
- if (_tab) {
6525
+ if (tab) {
6506
6526
  if (this.biserial) {
6507
- this.$set(this.active, 1, _tab.id);
6527
+ this.$set(this.active, 1, tab.id);
6508
6528
  } else {
6509
- this.active = _tab.id;
6529
+ this.active = tab.id;
6510
6530
  }
6531
+ this.navIds = this.getId(this.menus, tab.url, true);
6511
6532
  }
6512
6533
  } else {
6513
- var _tab2 = (node.fourthTabs || []).filter(function (item) {
6534
+ var _tab = (node.fourthTabs || []).filter(function (item) {
6514
6535
  return item.url === node.url;
6515
6536
  })[0];
6516
- if (_tab2) {
6537
+ if (_tab) {
6517
6538
  this.tabs = node.fourthTabs;
6518
- this.tabsId = _tab2.id;
6539
+ this.tabsId = _tab.id;
6540
+ this.navIds = this.getId(this.menus, _tab.url, true);
6541
+ } else {
6542
+ this.navIds = this.getId(this.menus, node.url, true);
6519
6543
  }
6520
6544
  }
6521
6545
  } else if (node.fourthTabs.length) {
6522
6546
  this.tabs = node.fourthTabs;
6523
6547
  this.tabsId = this.tabs[0].id;
6524
6548
  this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
6549
+ this.navIds = this.getId(this.menus, this.tabs[0].url, true);
6525
6550
  }
6526
6551
  break;
6527
6552
  case 'tabs':
6528
6553
  this.tabsId = node.id;
6554
+ this.navIds = this.getId(this.menus, node.url, true);
6529
6555
  break;
6530
6556
  }
6531
6557
  if (node.url) {
@@ -6632,6 +6658,13 @@ var log = util["a" /* default */].getParams('console');
6632
6658
 
6633
6659
  console.log(page);
6634
6660
  sessionStorage.setItem('jump', page);
6661
+ if (res) {
6662
+ if (res.fourthTabs && res.fourthTabs.length) {
6663
+ this.pid = res.id;
6664
+ } else {
6665
+ this.pid = res.pid;
6666
+ }
6667
+ }
6635
6668
  if (util["a" /* default */].win.location.hash === page) {
6636
6669
  this.refresh = true;
6637
6670
  return;
@@ -6723,24 +6756,98 @@ var log = util["a" /* default */].getParams('console');
6723
6756
  break;
6724
6757
  }
6725
6758
  },
6759
+ getFourthTabs: function getFourthTabs(menus, id) {
6760
+ if (Array.isArray(menus)) {
6761
+ for (var i = 0; i < menus.length; i++) {
6762
+ var fourth = this.getFourthTabs(menus[i], id);
6763
+ if (fourth) {
6764
+ return fourth;
6765
+ }
6766
+ }
6767
+ } else {
6768
+ if (menus.fourthTabs && menus.fourthTabs.length) {
6769
+ for (var _i = 0; _i < menus.fourthTabs.length; _i++) {
6770
+ var item = menus.fourthTabs[_i];
6771
+ if (item.id === id) {
6772
+ return item;
6773
+ }
6774
+ }
6775
+ }
6776
+ if (menus.children && menus.children.length) {
6777
+ for (var _i2 = 0; _i2 < menus.children.length; _i2++) {
6778
+ var _fourth = this.getFourthTabs(menus.children[_i2], id);
6779
+ if (_fourth) {
6780
+ return _fourth;
6781
+ }
6782
+ }
6783
+ }
6784
+ }
6785
+ return false;
6786
+ },
6726
6787
  handleLayout: function handleLayout(res, old) {
6788
+ this.layout = res;
6727
6789
  switch (res) {
6728
6790
  case 'topnav':
6729
6791
  this.navs = this.menus;
6730
6792
  this.tabs = [];
6731
6793
  this.subsystem = [];
6732
- switch (old) {
6733
- case 'subsystem':
6734
- break;
6735
- default:
6736
- this.topActive = this.active.length ? this.active[this.active.length - 1] : '';
6737
- console.log(this.active, this.topActive, 666);
6794
+ this.topActive = this.navIds && this.navIds.length ? this.navIds[this.navIds.length - 1] : '';
6795
+ break;
6796
+ case 'subsystem':
6797
+ this.subsystem = this.menus;
6798
+ this.navs = [];
6799
+ this.tabs = [];
6800
+ if (this.navIds && this.navIds.length) {
6801
+ var node = this.setTitle(this.navIds[0]);
6802
+ this.active = JSON.parse(JSON.stringify(this.navIds)).slice(1);
6803
+ var tabs = this.getFourthTabs(this.menus, this.pid);
6804
+ if (tabs) {
6805
+ this.active.pop();
6806
+ this.tabs = tabs.fourthTabs;
6807
+ this.tabsId = this.navIds[this.navIds.length - 1];
6808
+ }
6809
+ this.menu = node.children;
6810
+ this.title = node.text;
6811
+ } else {
6812
+ //this.navIds = [this.menus[0].id]
6813
+ this.menu = this.menus[0].children;
6814
+ this.title = this.menus[0].text;
6738
6815
  }
6739
6816
  break;
6817
+ case 'topside':
6818
+ this.navs = this.menus;
6819
+ this.subsystem = [];
6820
+ this.tabs = [];
6821
+ if (this.navIds && this.navIds.length) {
6822
+ var _node = this.setTitle(this.navIds[0]);
6823
+ this.active = JSON.parse(JSON.stringify(this.navIds)).slice(1);
6824
+ var _tabs = this.getFourthTabs(this.menus, this.pid);
6825
+ if (_tabs) {
6826
+ this.active.pop();
6827
+ this.tabs = _tabs.fourthTabs;
6828
+ this.tabsId = this.navIds[this.navIds.length - 1];
6829
+ }
6830
+ this.topActive = this.navIds[0];
6831
+ this.menu = _node.children;
6832
+ } else {
6833
+ this.menu = this.menus[0].children;
6834
+ this.topActive = this.menus[0].id;
6835
+ }
6836
+ break;
6837
+ default:
6838
+ this.navs = [];
6839
+ this.subsystem = [];
6840
+ this.menu = this.menus;
6841
+ if (this.navIds && this.navIds.length) {
6842
+ this.active = JSON.parse(JSON.stringify(this.navIds));
6843
+ var _tabs2 = this.getFourthTabs(this.menus, this.pid);
6844
+ if (_tabs2) {
6845
+ this.active.pop();
6846
+ this.tabs = _tabs2.fourthTabs;
6847
+ this.tabsId = this.navIds[this.navIds.length - 1];
6848
+ }
6849
+ }
6740
6850
  }
6741
- console.log(this.sysId, this.topActive, this.active, this.tabsId);
6742
- //this.setMenu(this.menus);
6743
- console.log(this.layout, old, this.hide);
6744
6851
  },
6745
6852
 
6746
6853
  //监听改变菜单
@@ -6873,7 +6980,7 @@ var log = util["a" /* default */].getParams('console');
6873
6980
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
6874
6981
  if (loginPage) {
6875
6982
  var src = void 0;
6876
- if (!util["a" /* default */].startWith(loginPage, ['http', '/'])) {
6983
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
6877
6984
  var pathname = util["a" /* default */].win.top.location.pathname;
6878
6985
  if (pathname !== '/') {
6879
6986
  pathname = pathname.split('/');
package/lib/menu.js CHANGED
@@ -328,6 +328,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
328
328
  key: key,
329
329
  path: keyPath,
330
330
  node: item.$attrs.data,
331
+ fourthTabs: item.$attrs.fourthTabs,
331
332
  item: item,
332
333
  mode: this.mode
333
334
  });
@@ -352,7 +353,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
352
353
  mode: this.mode
353
354
  });
354
355
  },
355
- getSub: function getSub(item, h, popper) {
356
+ getSub: function getSub(item, h, popper, fourthTabs) {
356
357
  var _this3 = this;
357
358
 
358
359
  if (popper) {
@@ -403,7 +404,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
403
404
  if (!ele) {
404
405
  console.error('\u5BF9\u8C61\u5B50\u6570\u636E\u4E2D\u7B2C[' + index + ']\u6761\u6570\u636E\u9519\u8BEF', item);
405
406
  } else {
406
- return _this3.getSub(ele, h, popper);
407
+ return _this3.getSub(ele, h, popper, true);
407
408
  }
408
409
  }));
409
410
  return [h('el-submenu', {
@@ -426,7 +427,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
426
427
  attrs: {
427
428
  data: item,
428
429
  index: item.id,
429
- key: item.id
430
+ key: item.id,
431
+ fourthTabs: fourthTabs
430
432
  }
431
433
  }, this.titleIcons ? title : [title[1]])];
432
434
  }