eoss-ui 0.5.73 → 0.5.74

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 (54) hide show
  1. package/lib/button-group.js +16 -6
  2. package/lib/button.js +16 -6
  3. package/lib/checkbox-group.js +16 -6
  4. package/lib/clients.js +16 -7
  5. package/lib/data-table-form.js +16 -6
  6. package/lib/data-table.js +16 -6
  7. package/lib/date-picker.js +16 -6
  8. package/lib/dialog.js +16 -6
  9. package/lib/eoss-ui.common.js +176 -82
  10. package/lib/flow-group.js +16 -6
  11. package/lib/flow-list.js +16 -6
  12. package/lib/flow.js +16 -6
  13. package/lib/form.js +16 -6
  14. package/lib/handle-user.js +16 -6
  15. package/lib/handler.js +16 -6
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +16 -6
  18. package/lib/input.js +16 -6
  19. package/lib/login.js +24 -14
  20. package/lib/main.js +98 -28
  21. package/lib/nav.js +64 -29
  22. package/lib/page.js +16 -6
  23. package/lib/player.js +16 -6
  24. package/lib/qr-code.js +16 -6
  25. package/lib/radio-group.js +16 -6
  26. package/lib/retrial-auth.js +16 -6
  27. package/lib/select-ganged.js +16 -6
  28. package/lib/select.js +16 -6
  29. package/lib/selector-panel.js +16 -6
  30. package/lib/selector.js +16 -6
  31. package/lib/sizer.js +16 -6
  32. package/lib/steps.js +16 -6
  33. package/lib/switch.js +16 -6
  34. package/lib/table-form.js +16 -6
  35. package/lib/tabs.js +16 -6
  36. package/lib/theme-chalk/index.css +1 -1
  37. package/lib/theme-chalk/nav.css +1 -1
  38. package/lib/tips.js +16 -6
  39. package/lib/tree-group.js +16 -6
  40. package/lib/tree.js +16 -6
  41. package/lib/upload.js +16 -6
  42. package/lib/utils/webSocket.js +16 -6
  43. package/lib/wujie.js +16 -6
  44. package/lib/wxlogin.js +16 -6
  45. package/package.json +1 -1
  46. package/packages/clients/src/main.vue +3 -1
  47. package/packages/login/src/resetPassword.vue +1 -1
  48. package/packages/main/src/main.vue +44 -10
  49. package/packages/nav/src/main.vue +25 -8
  50. package/packages/theme-chalk/lib/index.css +1 -1
  51. package/packages/theme-chalk/lib/nav.css +1 -1
  52. package/packages/theme-chalk/src/nav.scss +4 -1
  53. package/src/index.js +1 -1
  54. package/src/utils/webSocket.js +14 -7
@@ -3563,6 +3563,8 @@ var WebSocket = function () {
3563
3563
  this.connects = 1;
3564
3564
  this.recon = false;
3565
3565
  this.sendTimeout = null;
3566
+ this.socket = null;
3567
+ this.subscription = null;
3566
3568
  }
3567
3569
 
3568
3570
  /** socket连接 */
@@ -3573,14 +3575,12 @@ var WebSocket = function () {
3573
3575
 
3574
3576
  if (!this.client) {
3575
3577
  // 连接SockJS
3576
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3577
- // 获取STOMP子协议的客户端对象
3578
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3578
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
3579
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
3579
3580
  }
3580
3581
 
3581
3582
  // 日志不打印
3582
3583
  if (!this.debug) {
3583
- console.log(111);
3584
3584
  this.client.debug = function () {};
3585
3585
  }
3586
3586
 
@@ -3592,9 +3592,10 @@ var WebSocket = function () {
3592
3592
  // 订阅消息
3593
3593
  _this.subscribe();
3594
3594
  }, function (error) {
3595
+ _this.unsubscribe();
3596
+ _this.client = null;
3595
3597
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3596
3598
  if (_this.connects > 5 && diffSecond < _this.interval) {
3597
- _this.client.disconnect();
3598
3599
  _this.error && _this.error(error);
3599
3600
  } else {
3600
3601
  _this.reconTimeout = setTimeout(function () {
@@ -3603,6 +3604,14 @@ var WebSocket = function () {
3603
3604
  }, 5000);
3604
3605
  }
3605
3606
  });
3607
+ }; // 清除订阅
3608
+
3609
+
3610
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
3611
+ if (this.subscription) {
3612
+ this.subscription.unsubscribe();
3613
+ this.subscription = null;
3614
+ }
3606
3615
  };
3607
3616
  /** 订阅服务端 */
3608
3617
 
@@ -3611,7 +3620,7 @@ var WebSocket = function () {
3611
3620
  var _this2 = this;
3612
3621
 
3613
3622
  // 订阅服务端提供的某个topic
3614
- this.client.subscribe(this.take, function (response) {
3623
+ this.subscription = this.client.subscribe(this.take, function (response) {
3615
3624
  if (response && (_this2.callback || _this2.success)) {
3616
3625
  var callback = _this2.callback || _this2.success;
3617
3626
  callback(JSON.parse(response.body));
@@ -3652,6 +3661,7 @@ var WebSocket = function () {
3652
3661
 
3653
3662
  WebSocket.prototype.destroy = function destroy() {
3654
3663
  // 断开连接,清除定时器
3664
+ this.unsubscribe();
3655
3665
  if (this.client) {
3656
3666
  this.client.disconnect();
3657
3667
  };
@@ -6430,8 +6440,8 @@ checkbox_group_src_main.install = function (Vue) {
6430
6440
  };
6431
6441
 
6432
6442
  /* harmony default export */ var checkbox_group = (checkbox_group_src_main);
6433
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/clients/src/main.vue?vue&type=template&id=2f0c03c7&
6434
- var mainvue_type_template_id_2f0c03c7_render = function () {
6443
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/clients/src/main.vue?vue&type=template&id=12fa73ca&
6444
+ var mainvue_type_template_id_12fa73ca_render = function () {
6435
6445
  var _vm = this
6436
6446
  var _h = _vm.$createElement
6437
6447
  var _c = _vm._self._c || _h
@@ -6439,11 +6449,18 @@ var mainvue_type_template_id_2f0c03c7_render = function () {
6439
6449
  _vm.logo
6440
6450
  ? _c("img", { staticClass: "es-clients-logo", attrs: { src: _vm.logo } })
6441
6451
  : _vm._e(),
6442
- _c("div", { staticClass: "es-clients-title" }, [
6443
- _vm._v(
6444
- "\n 请通过手机浏览器(iOS11版本以上的苹果手机使用照相功能)扫码下载安装\n "
6445
- ),
6446
- ]),
6452
+ _c(
6453
+ "div",
6454
+ { staticClass: "es-clients-title" },
6455
+ [
6456
+ _vm._v("\n 请通过手机浏览器\n "),
6457
+ _vm.ios
6458
+ ? [_vm._v(" (iOS11版本以上的苹果手机使用照相功能) ")]
6459
+ : _vm._e(),
6460
+ _vm._v("\n 扫码下载安装\n "),
6461
+ ],
6462
+ 2
6463
+ ),
6447
6464
  _c("ul", { staticClass: "es-clients-list" }, [
6448
6465
  _vm.ios
6449
6466
  ? _c(
@@ -6524,7 +6541,7 @@ var mainvue_type_template_id_2f0c03c7_render = function () {
6524
6541
  ]),
6525
6542
  ])
6526
6543
  }
6527
- var mainvue_type_template_id_2f0c03c7_staticRenderFns = [
6544
+ var mainvue_type_template_id_12fa73ca_staticRenderFns = [
6528
6545
  function () {
6529
6546
  var _vm = this
6530
6547
  var _h = _vm.$createElement
@@ -6553,10 +6570,10 @@ var mainvue_type_template_id_2f0c03c7_staticRenderFns = [
6553
6570
  ])
6554
6571
  },
6555
6572
  ]
6556
- mainvue_type_template_id_2f0c03c7_render._withStripped = true
6573
+ mainvue_type_template_id_12fa73ca_render._withStripped = true
6557
6574
 
6558
6575
 
6559
- // CONCATENATED MODULE: ./packages/clients/src/main.vue?vue&type=template&id=2f0c03c7&
6576
+ // CONCATENATED MODULE: ./packages/clients/src/main.vue?vue&type=template&id=12fa73ca&
6560
6577
 
6561
6578
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/clients/src/main.vue?vue&type=script&lang=js&
6562
6579
  var _props;
@@ -6604,6 +6621,8 @@ var _props;
6604
6621
  //
6605
6622
  //
6606
6623
  //
6624
+ //
6625
+ //
6607
6626
 
6608
6627
  //import util from 'eoss-ui/src/utils/util';
6609
6628
  /* harmony default export */ var clients_src_mainvue_type_script_lang_js_ = ({
@@ -6670,8 +6689,8 @@ var _props;
6670
6689
 
6671
6690
  var clients_src_main_component = normalizeComponent(
6672
6691
  packages_clients_src_mainvue_type_script_lang_js_,
6673
- mainvue_type_template_id_2f0c03c7_render,
6674
- mainvue_type_template_id_2f0c03c7_staticRenderFns,
6692
+ mainvue_type_template_id_12fa73ca_render,
6693
+ mainvue_type_template_id_12fa73ca_staticRenderFns,
6675
6694
  false,
6676
6695
  null,
6677
6696
  null,
@@ -48397,8 +48416,8 @@ mainvue_type_template_id_249fae96_render._withStripped = true
48397
48416
 
48398
48417
  // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=249fae96&
48399
48418
 
48400
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=28f463b9&
48401
- var resetPasswordvue_type_template_id_28f463b9_render = function () {
48419
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=579bc87d&
48420
+ var resetPasswordvue_type_template_id_579bc87d_render = function () {
48402
48421
  var _vm = this
48403
48422
  var _h = _vm.$createElement
48404
48423
  var _c = _vm._self._c || _h
@@ -48458,11 +48477,11 @@ var resetPasswordvue_type_template_id_28f463b9_render = function () {
48458
48477
  1
48459
48478
  )
48460
48479
  }
48461
- var resetPasswordvue_type_template_id_28f463b9_staticRenderFns = []
48462
- resetPasswordvue_type_template_id_28f463b9_render._withStripped = true
48480
+ var resetPasswordvue_type_template_id_579bc87d_staticRenderFns = []
48481
+ resetPasswordvue_type_template_id_579bc87d_render._withStripped = true
48463
48482
 
48464
48483
 
48465
- // CONCATENATED MODULE: ./packages/login/src/resetPassword.vue?vue&type=template&id=28f463b9&
48484
+ // CONCATENATED MODULE: ./packages/login/src/resetPassword.vue?vue&type=template&id=579bc87d&
48466
48485
 
48467
48486
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=script&lang=js&
48468
48487
  var resetPasswordvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -48706,7 +48725,7 @@ function resetPasswordvue_type_script_lang_js_objectWithoutProperties(obj, keys)
48706
48725
  trigger: 'blur'
48707
48726
  } : {}, {
48708
48727
  required: true,
48709
- message: '请输入新密码',
48728
+ message: '请确认新密码',
48710
48729
  trigger: 'blur'
48711
48730
  }, { validator: this.reregExpValidate, trigger: 'blur' }]
48712
48731
  }, {
@@ -48942,8 +48961,8 @@ function resetPasswordvue_type_script_lang_js_objectWithoutProperties(obj, keys)
48942
48961
 
48943
48962
  var resetPassword_component = normalizeComponent(
48944
48963
  src_resetPasswordvue_type_script_lang_js_,
48945
- resetPasswordvue_type_template_id_28f463b9_render,
48946
- resetPasswordvue_type_template_id_28f463b9_staticRenderFns,
48964
+ resetPasswordvue_type_template_id_579bc87d_render,
48965
+ resetPasswordvue_type_template_id_579bc87d_staticRenderFns,
48947
48966
  false,
48948
48967
  null,
48949
48968
  null,
@@ -50450,8 +50469,8 @@ login_src_main.install = function (Vue) {
50450
50469
  };
50451
50470
 
50452
50471
  /* harmony default export */ var login = (login_src_main);
50453
- // 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=a08554be&
50454
- var mainvue_type_template_id_a08554be_render = function () {
50472
+ // 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=572765ea&
50473
+ var mainvue_type_template_id_572765ea_render = function () {
50455
50474
  var _vm = this
50456
50475
  var _h = _vm.$createElement
50457
50476
  var _c = _vm._self._c || _h
@@ -50656,6 +50675,7 @@ var mainvue_type_template_id_a08554be_render = function () {
50656
50675
  _vm.showMenu && _vm.showDefault
50657
50676
  ? _c("es-nav", {
50658
50677
  attrs: {
50678
+ "hide-sub-menu": _vm.hideSubMenu,
50659
50679
  "is-top": _vm.layout == "topside",
50660
50680
  overlap: _vm.layout == "side",
50661
50681
  data: _vm.menu,
@@ -50898,15 +50918,42 @@ var mainvue_type_template_id_a08554be_render = function () {
50898
50918
  attrs: { data: _vm.sysMsg, winopen: _vm.winopen },
50899
50919
  on: { opened: _vm.handleOpened },
50900
50920
  }),
50921
+ _c(
50922
+ "es-dialog",
50923
+ {
50924
+ attrs: {
50925
+ title: _vm.dialog.title,
50926
+ visible: _vm.dialog.show,
50927
+ size: "md",
50928
+ },
50929
+ on: {
50930
+ "update:visible": function ($event) {
50931
+ _vm.$set(_vm.dialog, "show", $event)
50932
+ },
50933
+ },
50934
+ },
50935
+ [
50936
+ _vm.dialog.show
50937
+ ? _c("iframe", {
50938
+ attrs: {
50939
+ width: "100%",
50940
+ height: "100%",
50941
+ frameborder: "0",
50942
+ src: _vm.dialog.src,
50943
+ },
50944
+ })
50945
+ : _vm._e(),
50946
+ ]
50947
+ ),
50901
50948
  ],
50902
50949
  1
50903
50950
  )
50904
50951
  }
50905
- var mainvue_type_template_id_a08554be_staticRenderFns = []
50906
- mainvue_type_template_id_a08554be_render._withStripped = true
50952
+ var mainvue_type_template_id_572765ea_staticRenderFns = []
50953
+ mainvue_type_template_id_572765ea_render._withStripped = true
50907
50954
 
50908
50955
 
50909
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=a08554be&
50956
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=572765ea&
50910
50957
 
50911
50958
  // 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=75d533de&
50912
50959
  var userinfovue_type_template_id_75d533de_render = function () {
@@ -53036,6 +53083,16 @@ var main_src_mainvue_type_script_lang_js_extends = Object.assign || function (ta
53036
53083
  //
53037
53084
  //
53038
53085
  //
53086
+ //
53087
+ //
53088
+ //
53089
+ //
53090
+ //
53091
+ //
53092
+ //
53093
+ //
53094
+ //
53095
+ //
53039
53096
 
53040
53097
 
53041
53098
 
@@ -53211,6 +53268,10 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
53211
53268
  showCollapse: {
53212
53269
  type: Boolean,
53213
53270
  default: true
53271
+ },
53272
+ onlineView: {
53273
+ type: [String, Boolean],
53274
+ default: true
53214
53275
  }
53215
53276
  },
53216
53277
  computed: {
@@ -53333,6 +53394,12 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
53333
53394
  },
53334
53395
  menuCode: function menuCode() {
53335
53396
  return appCode || this.appCode;
53397
+ },
53398
+ onlineUrl: function onlineUrl() {
53399
+ if (this.onlineView) {
53400
+ return typeof this.onlineView == 'string' ? this.onlineView : '/main/sysuseronline/list.dhtml';
53401
+ }
53402
+ return false;
53336
53403
  }
53337
53404
  },
53338
53405
  watch: {
@@ -53450,7 +53517,9 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
53450
53517
  timer: null,
53451
53518
  pid: null,
53452
53519
  showPage: false,
53453
- webSocket: null
53520
+ webSocket: null,
53521
+ dialog: {},
53522
+ hideSubMenu: false
53454
53523
  };
53455
53524
  },
53456
53525
  created: function created() {
@@ -53798,10 +53867,16 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
53798
53867
  * @param {Boolean} [isUrl] - res是否是url地址
53799
53868
  * @param {Object} [param] - 拼接地址后的参数
53800
53869
  */
53801
- jumpMenu: function jumpMenu(res, isUrl, path) {
53870
+ jumpMenu: function jumpMenu(res, isUrl, param, hide) {
53802
53871
  var _this5 = this;
53803
53872
 
53804
- var option = { url: res, isUrl: isUrl, path: path };
53873
+ if (this.showSide === false) {
53874
+ this.isSide = true;
53875
+ }
53876
+ if (hide !== undefined && hide !== null && hide !== '') {
53877
+ this.hideSubMenu = hide;
53878
+ }
53879
+ var option = { url: res, isUrl: isUrl, param: param };
53805
53880
  if (utils_util["a" /* default */].isObject(res)) {
53806
53881
  if (res.urlopenmode == 1) {
53807
53882
  utils_util["a" /* default */].win.open(res.url);
@@ -53827,11 +53902,11 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
53827
53902
  this.method = 'router';
53828
53903
  var routes = this.$router.options.routes;
53829
53904
  if (routes) {
53830
- var _path = this.hasRouter(routes, option.url);
53831
- if (_path) {
53905
+ var path = this.hasRouter(routes, option.url);
53906
+ if (path) {
53832
53907
  var params = utils_util["a" /* default */].getParams({ url: option.url });
53833
53908
  this.$router.push({
53834
- path: _path,
53909
+ path: path,
53835
53910
  query: params
53836
53911
  });
53837
53912
  } else {
@@ -54297,6 +54372,7 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
54297
54372
  }
54298
54373
  break;
54299
54374
  case 'sub':
54375
+ this.hideSubMenu = false;
54300
54376
  this.navIds = [node.id];
54301
54377
  if (node.url) {
54302
54378
  this.tabs = [];
@@ -54393,19 +54469,19 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
54393
54469
  }
54394
54470
  }
54395
54471
  } else {
54396
- var _path2 = res.path;
54397
- if (_path2 !== '/' && _path2 !== '/404') {
54398
- _path2 = _path2.replace(_path2[1], _path2[1].toLowerCase());
54472
+ var _path = res.path;
54473
+ if (_path !== '/' && _path !== '/404') {
54474
+ _path = _path.replace(_path[1], _path[1].toLowerCase());
54399
54475
  }
54400
54476
  var pathname = url.substring(url.indexOf('#/') + 1);
54401
54477
  pathname = pathname.replace(pathname[1], pathname[1].toLowerCase()).split('?')[0];
54402
- if (res.path !== '/' && pathname == _path2) {
54478
+ if (res.path !== '/' && pathname == _path) {
54403
54479
  return pathname;
54404
54480
  }
54405
54481
  if (res && Object.prototype.hasOwnProperty.call(res, 'children')) {
54406
- var _path3 = this.hasRouter(res.children, url);
54407
- if (_path3) {
54408
- return _path3;
54482
+ var _path2 = this.hasRouter(res.children, url);
54483
+ if (_path2) {
54484
+ return _path2;
54409
54485
  }
54410
54486
  }
54411
54487
  }
@@ -54417,6 +54493,7 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
54417
54493
  handleClick: function handleClick(res) {
54418
54494
  var _this8 = this;
54419
54495
 
54496
+ console.log(res);
54420
54497
  var type = res.type;
54421
54498
 
54422
54499
  switch (type) {
@@ -54442,13 +54519,15 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
54442
54519
  case 'user':
54443
54520
  this.showUserInfo = true;
54444
54521
  break;
54445
- // case 'online':
54446
- // this.dialog = {
54447
- // title: '查看在线人员',
54448
- // show: true,
54449
- // url: '/main/sysuseronline/list.dhtml'
54450
- // };
54451
- // break;
54522
+ case 'online':
54523
+ if (this.onlineUrl) {
54524
+ this.dialog = {
54525
+ title: '查看在线人员',
54526
+ show: true,
54527
+ src: this.onlineUrl
54528
+ };
54529
+ }
54530
+ break;
54452
54531
  case 'notice':
54453
54532
  this.showMsg = !this.showMsg;
54454
54533
  break;
@@ -54891,8 +54970,8 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
54891
54970
 
54892
54971
  var main_src_main_component = normalizeComponent(
54893
54972
  packages_main_src_mainvue_type_script_lang_js_,
54894
- mainvue_type_template_id_a08554be_render,
54895
- mainvue_type_template_id_a08554be_staticRenderFns,
54973
+ mainvue_type_template_id_572765ea_render,
54974
+ mainvue_type_template_id_572765ea_staticRenderFns,
54896
54975
  false,
54897
54976
  null,
54898
54977
  null,
@@ -55330,8 +55409,8 @@ menu_src_main.install = function (Vue) {
55330
55409
  };
55331
55410
 
55332
55411
  /* harmony default export */ var menu = (menu_src_main);
55333
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=7b4319fb&
55334
- var mainvue_type_template_id_7b4319fb_render = function () {
55412
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=ccb38c80&
55413
+ var mainvue_type_template_id_ccb38c80_render = function () {
55335
55414
  var _vm = this
55336
55415
  var _h = _vm.$createElement
55337
55416
  var _c = _vm._self._c || _h
@@ -55394,15 +55473,15 @@ var mainvue_type_template_id_7b4319fb_render = function () {
55394
55473
  {
55395
55474
  name: "show",
55396
55475
  rawName: "v-show",
55397
- value: _vm.biserial ? _vm.subMenu.length : _vm.menu.length,
55398
- expression: "biserial ? subMenu.length : menu.length",
55476
+ value: _vm.showMenu,
55477
+ expression: "showMenu",
55399
55478
  },
55400
55479
  ],
55401
55480
  staticClass: "es-nav-main",
55402
55481
  class: { "es-nav-overlap": _vm.overlap },
55403
55482
  style: {
55404
55483
  width: _vm.biserial ? _vm.width : _vm.boxWidth,
55405
- left: _vm.show ? "15px" : _vm.navWidth,
55484
+ left: _vm.biserial ? (_vm.show ? "15px" : _vm.navWidth) : "",
55406
55485
  },
55407
55486
  attrs: { biserial: _vm.biserial },
55408
55487
  },
@@ -55517,11 +55596,11 @@ var mainvue_type_template_id_7b4319fb_render = function () {
55517
55596
  ]
55518
55597
  )
55519
55598
  }
55520
- var mainvue_type_template_id_7b4319fb_staticRenderFns = []
55521
- mainvue_type_template_id_7b4319fb_render._withStripped = true
55599
+ var mainvue_type_template_id_ccb38c80_staticRenderFns = []
55600
+ mainvue_type_template_id_ccb38c80_render._withStripped = true
55522
55601
 
55523
55602
 
55524
- // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=7b4319fb&
55603
+ // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=ccb38c80&
55525
55604
 
55526
55605
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=script&lang=js&
55527
55606
  //
@@ -55617,6 +55696,7 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55617
55696
  //
55618
55697
 
55619
55698
 
55699
+
55620
55700
  /* harmony default export */ var nav_src_mainvue_type_script_lang_js_ = ({
55621
55701
  name: 'EsNav',
55622
55702
  inheritAttrs: false,
@@ -55657,7 +55737,9 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55657
55737
  type: Boolean,
55658
55738
  default: true
55659
55739
  },
55660
- overlap: Boolean
55740
+ overlap: Boolean,
55741
+ //隐藏菜单
55742
+ hideSubMenu: Boolean
55661
55743
  },
55662
55744
  computed: {
55663
55745
  show: function show() {
@@ -55694,7 +55776,7 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55694
55776
  return this.navWidth;
55695
55777
  }
55696
55778
  }
55697
- return this.subMenu && this.subMenu.length && this.isShow && !this.overlap ? parseInt(this.width, 10) + parseInt(this.navWidth, 10) + 'px' : this.navWidth;
55779
+ return this.subMenu && this.subMenu.length && this.isShow && !this.overlap && !this.hideSubMenu ? parseInt(this.width, 10) + parseInt(this.navWidth, 10) + 'px' : this.navWidth;
55698
55780
  },
55699
55781
  _navWidth: function _navWidth() {
55700
55782
  return this.overlap ? parseInt(this.navWidth, 10) - 30 + 'px' : this.navWidth;
@@ -55709,11 +55791,14 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55709
55791
  this.headline = val;
55710
55792
  }
55711
55793
  },
55794
+ boxWidth: function boxWidth() {
55795
+ this.getHeight();
55796
+ },
55712
55797
 
55713
55798
  biserial: {
55714
55799
  handler: function handler(val) {
55715
55800
  this.isShow = !val;
55716
- this.resetHeight();
55801
+ this.getHeight();
55717
55802
  }
55718
55803
  },
55719
55804
  defaultActive: {
@@ -55764,8 +55849,10 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55764
55849
  this.subMenu = [];
55765
55850
  }
55766
55851
  },
55767
- showMenu: function showMenu() {
55768
- this.resetHeight();
55852
+ showMenu: function showMenu(val) {
55853
+ if (val) {
55854
+ this.getHeight();
55855
+ }
55769
55856
  }
55770
55857
  },
55771
55858
  data: function data() {
@@ -55780,15 +55867,22 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55780
55867
  subMenu: []
55781
55868
  };
55782
55869
  },
55870
+ beforeCreate: function beforeCreate() {
55871
+ var _this3 = this;
55872
+
55873
+ this.getHeight = Object(external_throttle_debounce_["debounce"])(500, function () {
55874
+ _this3.resetHeight();
55875
+ });
55876
+ },
55783
55877
  mounted: function mounted() {
55784
- this.resetHeight();
55878
+ this.getHeight();
55785
55879
  this.move();
55786
55880
  },
55787
55881
 
55788
55882
  methods: {
55789
55883
  //设置按钮拖动
55790
55884
  move: function move() {
55791
- var _this3 = this;
55885
+ var _this4 = this;
55792
55886
 
55793
55887
  var area = this.$refs.area.$el;
55794
55888
  var box = this.$refs.box;
@@ -55840,7 +55934,7 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55840
55934
  var isClick = eTime - sTime < 200;
55841
55935
  if (isClick) {
55842
55936
  var onArea = function onArea() {
55843
- _this3.subMenu = [];
55937
+ _this4.subMenu = [];
55844
55938
  area.removeEventListener('click', onArea);
55845
55939
  };
55846
55940
  area.addEventListener('click', onArea);
@@ -55886,12 +55980,12 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55886
55980
  this.$emit('close', res);
55887
55981
  },
55888
55982
  resetHeight: function resetHeight() {
55889
- var _this4 = this;
55983
+ var _this5 = this;
55890
55984
 
55891
55985
  this.$nextTick(function () {
55892
- var height = _this4.$refs.esNav.parentNode.offsetHeight;
55893
- Array.from(_this4.$refs.esNav.parentNode.children).forEach(function (item) {
55894
- if (item !== _this4.$refs.esNav) {
55986
+ var height = _this5.$refs.esNav.parentNode.offsetHeight;
55987
+ Array.from(_this5.$refs.esNav.parentNode.children).forEach(function (item) {
55988
+ if (item !== _this5.$refs.esNav) {
55895
55989
  var mt = utils_util["a" /* default */].getStyle(item, 'margin-top');
55896
55990
  var mb = utils_util["a" /* default */].getStyle(item, 'margin-bottom');
55897
55991
  mt = mt ? parseInt(mt, 10) : 0;
@@ -55899,15 +55993,15 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55899
55993
  height -= item.offsetHeight + mt + mb;
55900
55994
  }
55901
55995
  });
55902
- if (_this4.overlap) {
55996
+ if (_this5.overlap) {
55903
55997
  height -= 15;
55904
55998
  }
55905
- _this4.height = height + 'px';
55906
- if (_this4.showTitle) {
55907
- var theight = _this4.$refs.navTitle.offsetHeight;
55908
- _this4.menuHeight = height - theight + 'px';
55999
+ _this5.height = height + 'px';
56000
+ if (_this5.showTitle) {
56001
+ var theight = _this5.$refs.navTitle.offsetHeight;
56002
+ _this5.menuHeight = height - theight + 'px';
55909
56003
  } else {
55910
- _this4.menuHeight = height + 'px';
56004
+ _this5.menuHeight = height + 'px';
55911
56005
  }
55912
56006
  });
55913
56007
  }
@@ -55925,8 +56019,8 @@ mainvue_type_template_id_7b4319fb_render._withStripped = true
55925
56019
 
55926
56020
  var nav_src_main_component = normalizeComponent(
55927
56021
  packages_nav_src_mainvue_type_script_lang_js_,
55928
- mainvue_type_template_id_7b4319fb_render,
55929
- mainvue_type_template_id_7b4319fb_staticRenderFns,
56022
+ mainvue_type_template_id_ccb38c80_render,
56023
+ mainvue_type_template_id_ccb38c80_staticRenderFns,
55930
56024
  false,
55931
56025
  null,
55932
56026
  null,
@@ -74979,7 +75073,7 @@ if (typeof window !== 'undefined' && window.Vue) {
74979
75073
  }
74980
75074
 
74981
75075
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
74982
- version: '0.5.73',
75076
+ version: '0.5.74',
74983
75077
  install: install,
74984
75078
  Button: packages_button,
74985
75079
  ButtonGroup: button_group,
package/lib/flow-group.js CHANGED
@@ -5603,6 +5603,8 @@ var WebSocket = function () {
5603
5603
  this.connects = 1;
5604
5604
  this.recon = false;
5605
5605
  this.sendTimeout = null;
5606
+ this.socket = null;
5607
+ this.subscription = null;
5606
5608
  }
5607
5609
 
5608
5610
  /** socket连接 */
@@ -5613,14 +5615,12 @@ var WebSocket = function () {
5613
5615
 
5614
5616
  if (!this.client) {
5615
5617
  // 连接SockJS
5616
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
5617
- // 获取STOMP子协议的客户端对象
5618
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
5618
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
5619
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
5619
5620
  }
5620
5621
 
5621
5622
  // 日志不打印
5622
5623
  if (!this.debug) {
5623
- console.log(111);
5624
5624
  this.client.debug = function () {};
5625
5625
  }
5626
5626
 
@@ -5632,9 +5632,10 @@ var WebSocket = function () {
5632
5632
  // 订阅消息
5633
5633
  _this.subscribe();
5634
5634
  }, function (error) {
5635
+ _this.unsubscribe();
5636
+ _this.client = null;
5635
5637
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
5636
5638
  if (_this.connects > 5 && diffSecond < _this.interval) {
5637
- _this.client.disconnect();
5638
5639
  _this.error && _this.error(error);
5639
5640
  } else {
5640
5641
  _this.reconTimeout = setTimeout(function () {
@@ -5643,6 +5644,14 @@ var WebSocket = function () {
5643
5644
  }, 5000);
5644
5645
  }
5645
5646
  });
5647
+ }; // 清除订阅
5648
+
5649
+
5650
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
5651
+ if (this.subscription) {
5652
+ this.subscription.unsubscribe();
5653
+ this.subscription = null;
5654
+ }
5646
5655
  };
5647
5656
  /** 订阅服务端 */
5648
5657
 
@@ -5651,7 +5660,7 @@ var WebSocket = function () {
5651
5660
  var _this2 = this;
5652
5661
 
5653
5662
  // 订阅服务端提供的某个topic
5654
- this.client.subscribe(this.take, function (response) {
5663
+ this.subscription = this.client.subscribe(this.take, function (response) {
5655
5664
  if (response && (_this2.callback || _this2.success)) {
5656
5665
  var callback = _this2.callback || _this2.success;
5657
5666
  callback(JSON.parse(response.body));
@@ -5692,6 +5701,7 @@ var WebSocket = function () {
5692
5701
 
5693
5702
  WebSocket.prototype.destroy = function destroy() {
5694
5703
  // 断开连接,清除定时器
5704
+ this.unsubscribe();
5695
5705
  if (this.client) {
5696
5706
  this.client.disconnect();
5697
5707
  };