eoss-ui 0.4.62 → 0.4.63

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 (77) hide show
  1. package/lib/button-group.js +11 -11
  2. package/lib/button.js +11 -11
  3. package/lib/checkbox-group.js +27 -37
  4. package/lib/data-table-form.js +11 -11
  5. package/lib/data-table.js +72 -57
  6. package/lib/date-picker.js +11 -11
  7. package/lib/dialog.js +10 -10
  8. package/lib/eoss-ui.common.js +1801 -745
  9. package/lib/flow-group.js +89 -29
  10. package/lib/flow-list.js +1122 -427
  11. package/lib/flow.js +19 -20
  12. package/lib/form.js +222 -40
  13. package/lib/handle-user.js +12 -12
  14. package/lib/handler.js +15 -15
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +11 -11
  17. package/lib/input.js +36 -36
  18. package/lib/login.js +40 -40
  19. package/lib/main.js +208 -103
  20. package/lib/menu.js +5 -3
  21. package/lib/nav.js +13 -15
  22. package/lib/notify.js +2 -2
  23. package/lib/page.js +11 -11
  24. package/lib/player.js +18 -18
  25. package/lib/qr-code.js +11 -11
  26. package/lib/radio-group.js +15 -15
  27. package/lib/retrial-auth.js +12 -12
  28. package/lib/select-ganged.js +11 -11
  29. package/lib/select.js +13 -13
  30. package/lib/selector-panel.js +12 -12
  31. package/lib/selector.js +29 -18
  32. package/lib/sizer.js +12 -12
  33. package/lib/steps.js +11 -11
  34. package/lib/switch.js +11 -11
  35. package/lib/table-form.js +36 -36
  36. package/lib/tabs.js +11 -11
  37. package/lib/theme-chalk/data-table.css +1 -1
  38. package/lib/theme-chalk/flow-list.css +1 -1
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/menu.css +1 -1
  41. package/lib/tips.js +12 -12
  42. package/lib/toolbar.js +0 -1
  43. package/lib/tree-group.js +11 -11
  44. package/lib/tree.js +12 -12
  45. package/lib/upload.js +18 -18
  46. package/lib/utils/util.js +2 -2
  47. package/lib/wujie.js +11 -11
  48. package/lib/wxlogin.js +11 -11
  49. package/package.json +2 -2
  50. package/packages/checkbox-group/src/main.vue +16 -25
  51. package/packages/data-table/src/column.vue +15 -1
  52. package/packages/data-table/src/main.vue +58 -47
  53. package/packages/flow/src/component/taskUnionExamine.vue +0 -1
  54. package/packages/flow-group/src/main.vue +31 -14
  55. package/packages/flow-list/src/flow-table.vue +5 -1
  56. package/packages/flow-list/src/main.vue +780 -43
  57. package/packages/form/src/main.vue +63 -1
  58. package/packages/handler/src/main.vue +1 -1
  59. package/packages/login/src/main.vue +10 -1
  60. package/packages/main/src/main.vue +177 -58
  61. package/packages/main/src/userinfo.vue +3 -3
  62. package/packages/menu/src/main.vue +5 -3
  63. package/packages/nav/src/main.vue +0 -2
  64. package/packages/radio-group/src/main.vue +9 -5
  65. package/packages/select/src/main.vue +1 -1
  66. package/packages/selector/src/main.vue +12 -4
  67. package/packages/theme-chalk/lib/data-table.css +1 -1
  68. package/packages/theme-chalk/lib/flow-list.css +1 -1
  69. package/packages/theme-chalk/lib/index.css +1 -1
  70. package/packages/theme-chalk/lib/menu.css +1 -1
  71. package/packages/theme-chalk/src/data-table.scss +10 -17
  72. package/packages/theme-chalk/src/flow-list.scss +29 -34
  73. package/packages/theme-chalk/src/menu.scss +3 -0
  74. package/packages/toolbar/src/main.vue +0 -1
  75. package/packages/upload/src/main.vue +1 -1
  76. package/src/index.js +1 -1
  77. 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=2b6e9e21&
3368
+ var userinfovue_type_template_id_2b6e9e21_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_2b6e9e21_staticRenderFns = []
3385
+ userinfovue_type_template_id_2b6e9e21_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=2b6e9e21&
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);
@@ -3705,11 +3703,11 @@ var util = __webpack_require__(0);
3705
3703
  email: this.values.email,
3706
3704
  officeTel: this.values.officetel,
3707
3705
  phone: this.values.phone,
3708
- oldPassword: initLogin && initLogin.secret ? util["a" /* default */].esmEncrypt({
3706
+ oldPassword: initLogin && initLogin.secret && this.values.oldpassword ? util["a" /* default */].esmEncrypt({
3709
3707
  data: this.values.oldpassword,
3710
3708
  key: initLogin.secret
3711
3709
  }) : this.values.oldpassword,
3712
- password: initLogin && initLogin.secret ? util["a" /* default */].esmEncrypt({
3710
+ password: initLogin && initLogin.secret && this.values.password ? util["a" /* default */].esmEncrypt({
3713
3711
  data: this.values.password,
3714
3712
  key: initLogin.secret
3715
3713
  }) : this.values.password
@@ -3726,7 +3724,7 @@ var util = __webpack_require__(0);
3726
3724
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
3727
3725
  if (loginPage) {
3728
3726
  var src = void 0;
3729
- if (!util["a" /* default */].startWith(loginPage, ['http', '/'])) {
3727
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
3730
3728
  var pathname = util["a" /* default */].win.top.location.pathname;
3731
3729
  if (pathname !== '/') {
3732
3730
  pathname = pathname.split('/');
@@ -3808,8 +3806,8 @@ var componentNormalizer = __webpack_require__(3);
3808
3806
 
3809
3807
  var component = Object(componentNormalizer["a" /* default */])(
3810
3808
  src_userinfovue_type_script_lang_js_,
3811
- userinfovue_type_template_id_2f7a984a_render,
3812
- userinfovue_type_template_id_2f7a984a_staticRenderFns,
3809
+ userinfovue_type_template_id_2b6e9e21_render,
3810
+ userinfovue_type_template_id_2b6e9e21_staticRenderFns,
3813
3811
  false,
3814
3812
  null,
3815
3813
  null,
@@ -5418,6 +5416,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
5418
5416
  //
5419
5417
  //
5420
5418
  //
5419
+ //
5421
5420
 
5422
5421
 
5423
5422
 
@@ -5555,6 +5554,10 @@ var log = util["a" /* default */].getParams('console');
5555
5554
  userHeight: {
5556
5555
  type: String,
5557
5556
  default: '740px'
5557
+ },
5558
+ history: {
5559
+ type: Boolean,
5560
+ default: true
5558
5561
  }
5559
5562
  },
5560
5563
  computed: {
@@ -5577,7 +5580,6 @@ var log = util["a" /* default */].getParams('console');
5577
5580
  return true;
5578
5581
  },
5579
5582
  navWidth: function navWidth() {
5580
- console.log(this.layout === 'topside' ? '230px' : undefined, 9000);
5581
5583
  return this.layout === 'topside' ? '230px' : undefined;
5582
5584
  },
5583
5585
  showNavTitle: function showNavTitle() {
@@ -5763,7 +5765,8 @@ var log = util["a" /* default */].getParams('console');
5763
5765
  isHeader: '',
5764
5766
  isSide: null,
5765
5767
  navIds: null,
5766
- timer: null
5768
+ timer: null,
5769
+ pid: null
5767
5770
  };
5768
5771
  },
5769
5772
  created: function created() {
@@ -5863,6 +5866,15 @@ var log = util["a" /* default */].getParams('console');
5863
5866
  thalk.innerText = globalThalk;
5864
5867
  }
5865
5868
  },
5869
+ setTitle: function setTitle(id) {
5870
+ for (var i = 0; i < this.menus.length; i++) {
5871
+ var item = this.menus[i];
5872
+ if (item.id == id) {
5873
+ this.title = item.text;
5874
+ return item;
5875
+ }
5876
+ }
5877
+ },
5866
5878
  renderMenu: function renderMenu() {
5867
5879
  if (this.data !== undefined && this.data.length) {
5868
5880
  this.menus = JSON.parse(JSON.stringify(this.data));
@@ -5871,6 +5883,8 @@ var log = util["a" /* default */].getParams('console');
5871
5883
  var ids = this.getId(this.menus, applicationid);
5872
5884
  if (ids) {
5873
5885
  this.defaultActive = ids;
5886
+ this.navIds = ids;
5887
+ this.setTitle(ids[0]);
5874
5888
  }
5875
5889
  } else if (util["a" /* default */].win.location.hash) {
5876
5890
  var hash = util["a" /* default */].win.location.hash;
@@ -5881,17 +5895,23 @@ var log = util["a" /* default */].getParams('console');
5881
5895
  var _ids = this.getId(this.menus, util["a" /* default */].win.location.hash, true);
5882
5896
  if (_ids) {
5883
5897
  this.defaultActive = _ids;
5898
+ this.navIds = _ids;
5899
+ this.setTitle(_ids[0]);
5884
5900
  }
5885
- } else if (sessionStorage.getItem('jump')) {
5901
+ } else if (sessionStorage.getItem('jump') && this.history) {
5886
5902
  var _ids2 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
5887
5903
  if (_ids2) {
5888
5904
  this.defaultActive = _ids2;
5905
+ this.navIds = _ids2;
5906
+ this.setTitle(_ids2[0]);
5889
5907
  }
5890
5908
  }
5891
- } else if (sessionStorage.getItem('jump')) {
5909
+ } else if (sessionStorage.getItem('jump') && this.history) {
5892
5910
  var _ids3 = this.getId(this.menus, sessionStorage.getItem('jump'), true);
5893
5911
  if (_ids3) {
5894
5912
  this.defaultActive = _ids3;
5913
+ this.navIds = _ids3;
5914
+ this.setTitle(_ids3[0]);
5895
5915
  }
5896
5916
  }
5897
5917
  this.setMenu(this.menus);
@@ -5945,7 +5965,7 @@ var log = util["a" /* default */].getParams('console');
5945
5965
  key: {
5946
5966
  userId: results.userModel.userId,
5947
5967
  userName: results.userModel.username,
5948
- useCaseCodes: results.resourceCodes
5968
+ useCaseCodes: results.resourceCodes || results.userModel.resourceCodes
5949
5969
  }
5950
5970
  });
5951
5971
  }
@@ -5963,10 +5983,10 @@ var log = util["a" /* default */].getParams('console');
5963
5983
  this.homePage = results[i];
5964
5984
  if (this.isHomePage) {
5965
5985
  if (this.menus) {
5966
- var ids = null;
5967
- this.homePage && (ids = this.getId(this.menus, this.homePage));
5968
- if (ids) {
5969
- this.defaultActive = ids;
5986
+ var _ids4 = null;
5987
+ this.homePage && (_ids4 = this.getId(this.menus, this.homePage));
5988
+ if (_ids4) {
5989
+ this.defaultActive = _ids4;
5970
5990
  } else if (this.homePage) {
5971
5991
  this.handleJump(this.homePage);
5972
5992
  }
@@ -5981,9 +6001,6 @@ var log = util["a" /* default */].getParams('console');
5981
6001
  if (i === 'subsystemName') {
5982
6002
  document.title = results[i];
5983
6003
  }
5984
- if (i === 'resourceCodes') {
5985
- sessionStorage.setItem('useCaseCodes', results[i]);
5986
- }
5987
6004
  if (i === 'sysLogoIco' && results[i]) {
5988
6005
  sessionStorage.setItem('sysLogoIco', results[i]);
5989
6006
  util["a" /* default */].setFavicon(results[i]);
@@ -6118,9 +6135,9 @@ var log = util["a" /* default */].getParams('console');
6118
6135
  _this5.menus = JSON.parse(JSON.stringify(res.results));
6119
6136
  var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
6120
6137
  if (applicationid) {
6121
- var ids = _this5.getId(_this5.menus, applicationid);
6122
- if (ids) {
6123
- _this5.defaultActive = ids;
6138
+ var _ids5 = _this5.getId(_this5.menus, applicationid);
6139
+ if (_ids5) {
6140
+ _this5.defaultActive = _ids5;
6124
6141
  }
6125
6142
  } else if (util["a" /* default */].win.location.hash) {
6126
6143
  var hash = util["a" /* default */].win.location.hash;
@@ -6128,20 +6145,26 @@ var log = util["a" /* default */].getParams('console');
6128
6145
  hash = hash.split('?')[0];
6129
6146
  }
6130
6147
  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;
6148
+ var _ids6 = _this5.getId(_this5.menus, util["a" /* default */].win.location.hash, true);
6149
+ if (_ids6) {
6150
+ _this5.defaultActive = _ids6;
6151
+ _this5.navIds = _ids6;
6152
+ _this5.setTitle(_ids6[0]);
6134
6153
  }
6135
- } else if (sessionStorage.getItem('jump')) {
6136
- var _ids5 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6137
- if (_ids5) {
6138
- _this5.defaultActive = _ids5;
6154
+ } else if (sessionStorage.getItem('jump') && _this5.history) {
6155
+ var _ids7 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6156
+ if (_ids7) {
6157
+ _this5.defaultActive = _ids7;
6158
+ _this5.navIds = _ids7;
6159
+ _this5.setTitle(_ids7[0]);
6139
6160
  }
6140
6161
  }
6141
- } else if (sessionStorage.getItem('jump')) {
6142
- var _ids6 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6143
- if (_ids6) {
6144
- _this5.defaultActive = _ids6;
6162
+ } else if (sessionStorage.getItem('jump') && _this5.history) {
6163
+ var _ids8 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6164
+ if (_ids8) {
6165
+ _this5.defaultActive = _ids8;
6166
+ _this5.navIds = _ids8;
6167
+ _this5.setTitle(_ids8[0]);
6145
6168
  }
6146
6169
  }
6147
6170
  _this5.setTips(_this5.menus);
@@ -6160,7 +6183,6 @@ var log = util["a" /* default */].getParams('console');
6160
6183
 
6161
6184
  //设置默认左侧导航
6162
6185
  setMenu: function setMenu(res) {
6163
- console.log(9000);
6164
6186
  if (this.defaultActive && this.defaultActive.length) {
6165
6187
  this.isDefault = false;
6166
6188
  this.setDefault(res, this.defaultActive);
@@ -6168,9 +6190,9 @@ var log = util["a" /* default */].getParams('console');
6168
6190
  if (this.homePage || !util["a" /* default */].getStorage('mainConfig')) {
6169
6191
  this.isDefault = true;
6170
6192
  if (this.homePage && (!this.defaultActive || !this.defaultActive.length)) {
6171
- var ids = this.getId(this.menus, this.homePage);
6172
- if (ids) {
6173
- this.defaultActive = ids;
6193
+ var _ids9 = this.getId(this.menus, this.homePage);
6194
+ if (_ids9) {
6195
+ this.defaultActive = _ids9;
6174
6196
  this.isDefault = false;
6175
6197
  this.setDefault(res, this.defaultActive);
6176
6198
  return false;
@@ -6244,11 +6266,15 @@ var log = util["a" /* default */].getParams('console');
6244
6266
  if (!obj) {
6245
6267
  return '';
6246
6268
  }
6269
+ var openIdex = 0;
6270
+ if (obj.extendData && (obj.extendData.subDefOpenIndex || obj.extendData.subDefOpen)) {
6271
+ openIdex = parseInt(obj.extendData.subDefOpenIndex || obj.extendData.subDefOpen, 10);
6272
+ }
6247
6273
  if (obj.children && obj.children.length) {
6248
- return this.getFirst(obj.children[0]);
6274
+ return this.getFirst(obj.children[openIdex]);
6249
6275
  } else if (obj.fourthTabs && obj.fourthTabs.length) {
6250
6276
  if (this.layout === 'topnav') {
6251
- return this.getFirst(obj.fourthTabs[0]);
6277
+ return this.getFirst(obj.fourthTabs[openIdex]);
6252
6278
  } else {
6253
6279
  this.tabs = obj.fourthTabs;
6254
6280
  if (obj.url) {
@@ -6410,15 +6436,17 @@ var log = util["a" /* default */].getParams('console');
6410
6436
  var _url = params._baseUrl ? params._baseUrl : './primary.html';
6411
6437
  return util["a" /* default */].urlJoinParams({ url: _url, param: obj });
6412
6438
  },
6413
- handleOpenNav: function handleOpenNav(res) {
6414
- console.log(res, 777);
6415
- },
6416
6439
 
6417
6440
  //应用导航交互
6418
6441
  handleSelect: function handleSelect(res, type, open) {
6419
- console.log(type);
6420
- var node = res.node;
6442
+ console.log(type, 11);
6443
+ var node = res.node,
6444
+ fourthTabs = res.fourthTabs;
6421
6445
 
6446
+ var openIdex = 0;
6447
+ if (node.extendData && (node.extendData.subDefOpenIndex || node.extendData.subDefOpen)) {
6448
+ openIdex = parseInt(node.extendData.subDefOpenIndex || node.extendData.subDefOpen, 10);
6449
+ }
6422
6450
  if (!open) {
6423
6451
  if (node.extendData && node.extendData.businessStatus == 0 && node.extendData.businessWarnMsg) {
6424
6452
  this.$alert(node.extendData.businessWarnMsg, '提示', {
@@ -6437,28 +6465,17 @@ var log = util["a" /* default */].getParams('console');
6437
6465
  this.navIds = [node.id];
6438
6466
  this.menu = node.children;
6439
6467
  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));
6468
+ if (this.setFirstAsDefault) {
6469
+ var subNode = this.getFirst(node.children[openIdex]);
6470
+ if (subNode) {
6471
+ this.active = subNode.id;
6472
+ this.navIds = [node.id].concat(this.getId(node.children, subNode.url, true));
6473
+ }
6444
6474
  }
6445
6475
  } else {
6446
6476
  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
- }
6477
+ this.setTitle(ids[0]);
6478
+ this.tabsId = fourthTabs ? node.id : '';
6462
6479
  }
6463
6480
  break;
6464
6481
  case 'sys':
@@ -6467,7 +6484,9 @@ var log = util["a" /* default */].getParams('console');
6467
6484
  this.tabs = [];
6468
6485
  this.menu = node.children;
6469
6486
  this.title = node.text;
6470
- this.active = this.getFirst(node.children[0]).id;
6487
+ if (this.setFirstAsDefault) {
6488
+ this.active = this.getFirst(node.children[openIdex]).id;
6489
+ }
6471
6490
  this.isSide = true;
6472
6491
  }
6473
6492
  break;
@@ -6478,10 +6497,9 @@ var log = util["a" /* default */].getParams('console');
6478
6497
  }
6479
6498
  if (this.setFirstAsDefault) {
6480
6499
  var _subNode = this.getFirst(node);
6481
- this.$set(this.active, 0, node.id);
6500
+ this.active = [node.id];
6482
6501
  if (_subNode && node.id !== _subNode.id) {
6483
- console.log(_subNode, _subNode.url);
6484
- console.log(this.getId(this.menus, _subNode.url, true));
6502
+ this.navIds = this.getId(this.menus, _subNode.url, true);
6485
6503
  this.$set(this.active, 1, _subNode.id);
6486
6504
  }
6487
6505
  }
@@ -6499,33 +6517,39 @@ var log = util["a" /* default */].getParams('console');
6499
6517
  }
6500
6518
  if (node.url) {
6501
6519
  if (node.children && node.children.length) {
6502
- var _tab = node.children.filter(function (item) {
6520
+ var tab = node.children.filter(function (item) {
6503
6521
  return item.url === node.url;
6504
6522
  })[0];
6505
- if (_tab) {
6523
+ if (tab) {
6506
6524
  if (this.biserial) {
6507
- this.$set(this.active, 1, _tab.id);
6525
+ this.$set(this.active, 1, tab.id);
6508
6526
  } else {
6509
- this.active = _tab.id;
6527
+ this.active = tab.id;
6510
6528
  }
6529
+ this.navIds = this.getId(this.menus, tab.url, true);
6511
6530
  }
6512
6531
  } else {
6513
- var _tab2 = (node.fourthTabs || []).filter(function (item) {
6532
+ var _tab = (node.fourthTabs || []).filter(function (item) {
6514
6533
  return item.url === node.url;
6515
6534
  })[0];
6516
- if (_tab2) {
6535
+ if (_tab) {
6517
6536
  this.tabs = node.fourthTabs;
6518
- this.tabsId = _tab2.id;
6537
+ this.tabsId = _tab.id;
6538
+ this.navIds = this.getId(this.menus, _tab.url, true);
6539
+ } else {
6540
+ this.navIds = this.getId(this.menus, node.url, true);
6519
6541
  }
6520
6542
  }
6521
6543
  } else if (node.fourthTabs.length) {
6522
6544
  this.tabs = node.fourthTabs;
6523
6545
  this.tabsId = this.tabs[0].id;
6524
6546
  this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
6547
+ this.navIds = this.getId(this.menus, this.tabs[0].url, true);
6525
6548
  }
6526
6549
  break;
6527
6550
  case 'tabs':
6528
6551
  this.tabsId = node.id;
6552
+ this.navIds = this.getId(this.menus, node.url, true);
6529
6553
  break;
6530
6554
  }
6531
6555
  if (node.url) {
@@ -6632,6 +6656,13 @@ var log = util["a" /* default */].getParams('console');
6632
6656
 
6633
6657
  console.log(page);
6634
6658
  sessionStorage.setItem('jump', page);
6659
+ if (res) {
6660
+ if (res.fourthTabs && res.fourthTabs.length) {
6661
+ this.pid = res.id;
6662
+ } else {
6663
+ this.pid = res.pid;
6664
+ }
6665
+ }
6635
6666
  if (util["a" /* default */].win.location.hash === page) {
6636
6667
  this.refresh = true;
6637
6668
  return;
@@ -6723,24 +6754,98 @@ var log = util["a" /* default */].getParams('console');
6723
6754
  break;
6724
6755
  }
6725
6756
  },
6757
+ getFourthTabs: function getFourthTabs(menus, id) {
6758
+ if (Array.isArray(menus)) {
6759
+ for (var i = 0; i < menus.length; i++) {
6760
+ var fourth = this.getFourthTabs(menus[i], id);
6761
+ if (fourth) {
6762
+ return fourth;
6763
+ }
6764
+ }
6765
+ } else {
6766
+ if (menus.fourthTabs && menus.fourthTabs.length) {
6767
+ for (var _i = 0; _i < menus.fourthTabs.length; _i++) {
6768
+ var item = menus.fourthTabs[_i];
6769
+ if (item.id === id) {
6770
+ return item;
6771
+ }
6772
+ }
6773
+ }
6774
+ if (menus.children && menus.children.length) {
6775
+ for (var _i2 = 0; _i2 < menus.children.length; _i2++) {
6776
+ var _fourth = this.getFourthTabs(menus.children[_i2], id);
6777
+ if (_fourth) {
6778
+ return _fourth;
6779
+ }
6780
+ }
6781
+ }
6782
+ }
6783
+ return false;
6784
+ },
6726
6785
  handleLayout: function handleLayout(res, old) {
6786
+ this.layout = res;
6727
6787
  switch (res) {
6728
6788
  case 'topnav':
6729
6789
  this.navs = this.menus;
6730
6790
  this.tabs = [];
6731
6791
  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);
6792
+ this.topActive = this.navIds && this.navIds.length ? this.navIds[this.navIds.length - 1] : '';
6793
+ break;
6794
+ case 'subsystem':
6795
+ this.subsystem = this.menus;
6796
+ this.navs = [];
6797
+ this.tabs = [];
6798
+ if (this.navIds && this.navIds.length) {
6799
+ var node = this.setTitle(this.navIds[0]);
6800
+ this.active = JSON.parse(JSON.stringify(this.navIds)).slice(1);
6801
+ var tabs = this.getFourthTabs(this.menus, this.pid);
6802
+ if (tabs) {
6803
+ this.active.pop();
6804
+ this.tabs = tabs.fourthTabs;
6805
+ this.tabsId = this.navIds[this.navIds.length - 1];
6806
+ }
6807
+ this.menu = node.children;
6808
+ this.title = node.text;
6809
+ } else {
6810
+ //this.navIds = [this.menus[0].id]
6811
+ this.menu = this.menus[0].children;
6812
+ this.title = this.menus[0].text;
6738
6813
  }
6739
6814
  break;
6815
+ case 'topside':
6816
+ this.navs = this.menus;
6817
+ this.subsystem = [];
6818
+ this.tabs = [];
6819
+ if (this.navIds && this.navIds.length) {
6820
+ var _node = this.setTitle(this.navIds[0]);
6821
+ this.active = JSON.parse(JSON.stringify(this.navIds)).slice(1);
6822
+ var _tabs = this.getFourthTabs(this.menus, this.pid);
6823
+ if (_tabs) {
6824
+ this.active.pop();
6825
+ this.tabs = _tabs.fourthTabs;
6826
+ this.tabsId = this.navIds[this.navIds.length - 1];
6827
+ }
6828
+ this.topActive = this.navIds[0];
6829
+ this.menu = _node.children;
6830
+ } else {
6831
+ this.menu = this.menus[0].children;
6832
+ this.topActive = this.menus[0].id;
6833
+ }
6834
+ break;
6835
+ default:
6836
+ this.navs = [];
6837
+ this.subsystem = [];
6838
+ this.menu = this.menus;
6839
+ if (this.navIds && this.navIds.length) {
6840
+ this.active = JSON.parse(JSON.stringify(this.navIds));
6841
+ var _tabs2 = this.getFourthTabs(this.menus, this.pid);
6842
+ if (_tabs2) {
6843
+ this.active.pop();
6844
+ this.tabs = _tabs2.fourthTabs;
6845
+ this.tabsId = this.navIds[this.navIds.length - 1];
6846
+ }
6847
+ }
6740
6848
  }
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
6849
  },
6745
6850
 
6746
6851
  //监听改变菜单
@@ -6873,7 +6978,7 @@ var log = util["a" /* default */].getParams('console');
6873
6978
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
6874
6979
  if (loginPage) {
6875
6980
  var src = void 0;
6876
- if (!util["a" /* default */].startWith(loginPage, ['http', '/'])) {
6981
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
6877
6982
  var pathname = util["a" /* default */].win.top.location.pathname;
6878
6983
  if (pathname !== '/') {
6879
6984
  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
  }