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
@@ -1 +1 @@
1
- @charset "UTF-8";.es-nav,.es-nav .es-nav-main{display:inline-block;overflow:hidden}.es-nav{transition:all .2s;-webkit-transition:all .2s}.es-nav .el-menu,.es-nav .es-menu{background-color:transparent}.es-nav .es-nav-main{position:relative;height:100%;background-color:#002766}.es-nav .es-nav-main:not(.es-nav-overlap){border-right:1px solid #d9d9d9}.es-nav .es-nav-main .es-nav-title{width:100%;height:45px;font-size:15px;line-height:30px;text-align:center;overflow:hidden;padding:7px 32px 7px 0;background-color:#096dd9;color:#fff;position:relative;z-index:1;-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.2);box-shadow:0 4px 10px 0 rgba(0,0,0,.2)}.es-nav .es-nav-main .es-nav-title .es-collapse-handle{font-size:20px;cursor:pointer;position:absolute;right:12px;top:50%;margin-top:-10px;color:#fff}.es-nav .es-nav-main .es-nav-title .es-collapse-handle.es-icon-zengjiasuojinliang{right:50%;margin-right:-10px}.es-nav .es-nav-main .es-nav-title .el-tooltip{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative;padding:0 4px}.es-nav .es-nav-main .es-nav-title .el-tooltip.es-nav-title-filter{padding-right:10px;cursor:pointer}.es-nav .es-nav-main .es-nav-title .el-tooltip.es-nav-title-filter .el-icon--right{position:absolute;right:6px;top:50%;margin-top:-4px}.es-nav .es-nav-initial{width:70px;-webkit-box-shadow:0 6px 30px 5px rgba(0,0,0,.05),0 16px 24px 2px rgba(0,0,0,.04),0 8px 10px -5px rgba(0,0,0,.08);box-shadow:0 6px 30px 5px rgba(0,0,0,.05),0 16px 24px 2px rgba(0,0,0,.04),0 8px 10px -5px rgba(0,0,0,.08);position:relative;z-index:2;height:100%;background:#003a8c}.es-nav .es-nav-initial .el-menu-item,.es-nav .es-nav-initial .es-menu-vertical{height:auto}.es-nav .es-nav-initial .el-menu-item.is-active,.es-nav .es-nav-initial .es-menu-vertical.is-active{background:#096dd9}.es-nav .es-nav-initial .es-nav-overlap .es-menu{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.es-nav .es-nav-initial .es-nav-overlap .es-menu .es-menu-item{width:90px;height:90px;margin-bottom:20px}.es-nav .es-nav-initial .es-nav-overlap .es-menu .es-menu-item:nth-child(2n){margin-left:20px}.es-nav.es-nav-biserial{position:relative}.es-nav.es-nav-biserial .es-nav-main{position:absolute;top:0;bottom:0}.es-nav.es-nav-biserial .es-menu-title-vertical{margin-right:0}.es-nav .es-sets-button{position:fixed;top:100px;left:0;z-index:2;border-radius:50%;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12)}.es-nav .es-sets-button .el-button{font-size:22px;padding:8px;cursor:move}
1
+ @charset "UTF-8";.es-nav,.es-nav .es-nav-main{display:inline-block;overflow:hidden}.es-nav{transition:all .2s;-webkit-transition:all .2s}.es-nav .el-menu,.es-nav .es-menu{background-color:transparent}.es-nav .es-nav-main{position:relative;height:100%;background-color:#003a8c}.es-nav .es-nav-main[biserial=true]{background-color:#002766}.es-nav .es-nav-main:not(.es-nav-overlap){border-right:1px solid #d9d9d9}.es-nav .es-nav-main .es-nav-title{width:100%;height:45px;font-size:15px;line-height:30px;text-align:center;overflow:hidden;padding:7px 32px 7px 0;background-color:#096dd9;color:#fff;position:relative;z-index:1;-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.2);box-shadow:0 4px 10px 0 rgba(0,0,0,.2)}.es-nav .es-nav-main .es-nav-title .es-collapse-handle{font-size:20px;cursor:pointer;position:absolute;right:12px;top:50%;margin-top:-10px;color:#fff}.es-nav .es-nav-main .es-nav-title .es-collapse-handle.es-icon-zengjiasuojinliang{right:50%;margin-right:-10px}.es-nav .es-nav-main .es-nav-title .el-tooltip{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative;padding:0 4px}.es-nav .es-nav-main .es-nav-title .el-tooltip.es-nav-title-filter{padding-right:10px;cursor:pointer}.es-nav .es-nav-main .es-nav-title .el-tooltip.es-nav-title-filter .el-icon--right{position:absolute;right:6px;top:50%;margin-top:-4px}.es-nav .es-nav-initial{width:70px;-webkit-box-shadow:0 6px 30px 5px rgba(0,0,0,.05),0 16px 24px 2px rgba(0,0,0,.04),0 8px 10px -5px rgba(0,0,0,.08);box-shadow:0 6px 30px 5px rgba(0,0,0,.05),0 16px 24px 2px rgba(0,0,0,.04),0 8px 10px -5px rgba(0,0,0,.08);position:relative;z-index:2;height:100%;background:#003a8c}.es-nav .es-nav-initial .el-menu-item,.es-nav .es-nav-initial .es-menu-vertical{height:auto}.es-nav .es-nav-initial .el-menu-item.is-active,.es-nav .es-nav-initial .es-menu-vertical.is-active{background:#096dd9}.es-nav .es-nav-initial .es-nav-overlap .es-menu{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.es-nav .es-nav-initial .es-nav-overlap .es-menu .es-menu-item{width:90px;height:90px;margin-bottom:20px}.es-nav .es-nav-initial .es-nav-overlap .es-menu .es-menu-item:nth-child(2n){margin-left:20px}.es-nav.es-nav-biserial{position:relative}.es-nav.es-nav-biserial .es-nav-main{position:absolute;top:0;bottom:0}.es-nav.es-nav-biserial .es-menu-title-vertical{margin-right:0}.es-nav .es-sets-button{position:fixed;top:100px;left:0;z-index:2;border-radius:50%;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12)}.es-nav .es-sets-button .el-button{font-size:22px;padding:8px;cursor:move}
package/lib/tips.js CHANGED
@@ -3908,6 +3908,8 @@ var WebSocket = function () {
3908
3908
  this.connects = 1;
3909
3909
  this.recon = false;
3910
3910
  this.sendTimeout = null;
3911
+ this.socket = null;
3912
+ this.subscription = null;
3911
3913
  }
3912
3914
 
3913
3915
  /** socket连接 */
@@ -3918,14 +3920,12 @@ var WebSocket = function () {
3918
3920
 
3919
3921
  if (!this.client) {
3920
3922
  // 连接SockJS
3921
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3922
- // 获取STOMP子协议的客户端对象
3923
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3923
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
3924
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
3924
3925
  }
3925
3926
 
3926
3927
  // 日志不打印
3927
3928
  if (!this.debug) {
3928
- console.log(111);
3929
3929
  this.client.debug = function () {};
3930
3930
  }
3931
3931
 
@@ -3937,9 +3937,10 @@ var WebSocket = function () {
3937
3937
  // 订阅消息
3938
3938
  _this.subscribe();
3939
3939
  }, function (error) {
3940
+ _this.unsubscribe();
3941
+ _this.client = null;
3940
3942
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3941
3943
  if (_this.connects > 5 && diffSecond < _this.interval) {
3942
- _this.client.disconnect();
3943
3944
  _this.error && _this.error(error);
3944
3945
  } else {
3945
3946
  _this.reconTimeout = setTimeout(function () {
@@ -3948,6 +3949,14 @@ var WebSocket = function () {
3948
3949
  }, 5000);
3949
3950
  }
3950
3951
  });
3952
+ }; // 清除订阅
3953
+
3954
+
3955
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
3956
+ if (this.subscription) {
3957
+ this.subscription.unsubscribe();
3958
+ this.subscription = null;
3959
+ }
3951
3960
  };
3952
3961
  /** 订阅服务端 */
3953
3962
 
@@ -3956,7 +3965,7 @@ var WebSocket = function () {
3956
3965
  var _this2 = this;
3957
3966
 
3958
3967
  // 订阅服务端提供的某个topic
3959
- this.client.subscribe(this.take, function (response) {
3968
+ this.subscription = this.client.subscribe(this.take, function (response) {
3960
3969
  if (response && (_this2.callback || _this2.success)) {
3961
3970
  var callback = _this2.callback || _this2.success;
3962
3971
  callback(JSON.parse(response.body));
@@ -3997,6 +4006,7 @@ var WebSocket = function () {
3997
4006
 
3998
4007
  WebSocket.prototype.destroy = function destroy() {
3999
4008
  // 断开连接,清除定时器
4009
+ this.unsubscribe();
4000
4010
  if (this.client) {
4001
4011
  this.client.disconnect();
4002
4012
  };
package/lib/tree-group.js CHANGED
@@ -4603,6 +4603,8 @@ var WebSocket = function () {
4603
4603
  this.connects = 1;
4604
4604
  this.recon = false;
4605
4605
  this.sendTimeout = null;
4606
+ this.socket = null;
4607
+ this.subscription = null;
4606
4608
  }
4607
4609
 
4608
4610
  /** socket连接 */
@@ -4613,14 +4615,12 @@ var WebSocket = function () {
4613
4615
 
4614
4616
  if (!this.client) {
4615
4617
  // 连接SockJS
4616
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
4617
- // 获取STOMP子协议的客户端对象
4618
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
4618
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
4619
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
4619
4620
  }
4620
4621
 
4621
4622
  // 日志不打印
4622
4623
  if (!this.debug) {
4623
- console.log(111);
4624
4624
  this.client.debug = function () {};
4625
4625
  }
4626
4626
 
@@ -4632,9 +4632,10 @@ var WebSocket = function () {
4632
4632
  // 订阅消息
4633
4633
  _this.subscribe();
4634
4634
  }, function (error) {
4635
+ _this.unsubscribe();
4636
+ _this.client = null;
4635
4637
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
4636
4638
  if (_this.connects > 5 && diffSecond < _this.interval) {
4637
- _this.client.disconnect();
4638
4639
  _this.error && _this.error(error);
4639
4640
  } else {
4640
4641
  _this.reconTimeout = setTimeout(function () {
@@ -4643,6 +4644,14 @@ var WebSocket = function () {
4643
4644
  }, 5000);
4644
4645
  }
4645
4646
  });
4647
+ }; // 清除订阅
4648
+
4649
+
4650
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
4651
+ if (this.subscription) {
4652
+ this.subscription.unsubscribe();
4653
+ this.subscription = null;
4654
+ }
4646
4655
  };
4647
4656
  /** 订阅服务端 */
4648
4657
 
@@ -4651,7 +4660,7 @@ var WebSocket = function () {
4651
4660
  var _this2 = this;
4652
4661
 
4653
4662
  // 订阅服务端提供的某个topic
4654
- this.client.subscribe(this.take, function (response) {
4663
+ this.subscription = this.client.subscribe(this.take, function (response) {
4655
4664
  if (response && (_this2.callback || _this2.success)) {
4656
4665
  var callback = _this2.callback || _this2.success;
4657
4666
  callback(JSON.parse(response.body));
@@ -4692,6 +4701,7 @@ var WebSocket = function () {
4692
4701
 
4693
4702
  WebSocket.prototype.destroy = function destroy() {
4694
4703
  // 断开连接,清除定时器
4704
+ this.unsubscribe();
4695
4705
  if (this.client) {
4696
4706
  this.client.disconnect();
4697
4707
  };
package/lib/tree.js CHANGED
@@ -4607,6 +4607,8 @@ var WebSocket = function () {
4607
4607
  this.connects = 1;
4608
4608
  this.recon = false;
4609
4609
  this.sendTimeout = null;
4610
+ this.socket = null;
4611
+ this.subscription = null;
4610
4612
  }
4611
4613
 
4612
4614
  /** socket连接 */
@@ -4617,14 +4619,12 @@ var WebSocket = function () {
4617
4619
 
4618
4620
  if (!this.client) {
4619
4621
  // 连接SockJS
4620
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
4621
- // 获取STOMP子协议的客户端对象
4622
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
4622
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
4623
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
4623
4624
  }
4624
4625
 
4625
4626
  // 日志不打印
4626
4627
  if (!this.debug) {
4627
- console.log(111);
4628
4628
  this.client.debug = function () {};
4629
4629
  }
4630
4630
 
@@ -4636,9 +4636,10 @@ var WebSocket = function () {
4636
4636
  // 订阅消息
4637
4637
  _this.subscribe();
4638
4638
  }, function (error) {
4639
+ _this.unsubscribe();
4640
+ _this.client = null;
4639
4641
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
4640
4642
  if (_this.connects > 5 && diffSecond < _this.interval) {
4641
- _this.client.disconnect();
4642
4643
  _this.error && _this.error(error);
4643
4644
  } else {
4644
4645
  _this.reconTimeout = setTimeout(function () {
@@ -4647,6 +4648,14 @@ var WebSocket = function () {
4647
4648
  }, 5000);
4648
4649
  }
4649
4650
  });
4651
+ }; // 清除订阅
4652
+
4653
+
4654
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
4655
+ if (this.subscription) {
4656
+ this.subscription.unsubscribe();
4657
+ this.subscription = null;
4658
+ }
4650
4659
  };
4651
4660
  /** 订阅服务端 */
4652
4661
 
@@ -4655,7 +4664,7 @@ var WebSocket = function () {
4655
4664
  var _this2 = this;
4656
4665
 
4657
4666
  // 订阅服务端提供的某个topic
4658
- this.client.subscribe(this.take, function (response) {
4667
+ this.subscription = this.client.subscribe(this.take, function (response) {
4659
4668
  if (response && (_this2.callback || _this2.success)) {
4660
4669
  var callback = _this2.callback || _this2.success;
4661
4670
  callback(JSON.parse(response.body));
@@ -4696,6 +4705,7 @@ var WebSocket = function () {
4696
4705
 
4697
4706
  WebSocket.prototype.destroy = function destroy() {
4698
4707
  // 断开连接,清除定时器
4708
+ this.unsubscribe();
4699
4709
  if (this.client) {
4700
4710
  this.client.disconnect();
4701
4711
  };
package/lib/upload.js CHANGED
@@ -3643,6 +3643,8 @@ var WebSocket = function () {
3643
3643
  this.connects = 1;
3644
3644
  this.recon = false;
3645
3645
  this.sendTimeout = null;
3646
+ this.socket = null;
3647
+ this.subscription = null;
3646
3648
  }
3647
3649
 
3648
3650
  /** socket连接 */
@@ -3653,14 +3655,12 @@ var WebSocket = function () {
3653
3655
 
3654
3656
  if (!this.client) {
3655
3657
  // 连接SockJS
3656
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3657
- // 获取STOMP子协议的客户端对象
3658
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3658
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
3659
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
3659
3660
  }
3660
3661
 
3661
3662
  // 日志不打印
3662
3663
  if (!this.debug) {
3663
- console.log(111);
3664
3664
  this.client.debug = function () {};
3665
3665
  }
3666
3666
 
@@ -3672,9 +3672,10 @@ var WebSocket = function () {
3672
3672
  // 订阅消息
3673
3673
  _this.subscribe();
3674
3674
  }, function (error) {
3675
+ _this.unsubscribe();
3676
+ _this.client = null;
3675
3677
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3676
3678
  if (_this.connects > 5 && diffSecond < _this.interval) {
3677
- _this.client.disconnect();
3678
3679
  _this.error && _this.error(error);
3679
3680
  } else {
3680
3681
  _this.reconTimeout = setTimeout(function () {
@@ -3683,6 +3684,14 @@ var WebSocket = function () {
3683
3684
  }, 5000);
3684
3685
  }
3685
3686
  });
3687
+ }; // 清除订阅
3688
+
3689
+
3690
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
3691
+ if (this.subscription) {
3692
+ this.subscription.unsubscribe();
3693
+ this.subscription = null;
3694
+ }
3686
3695
  };
3687
3696
  /** 订阅服务端 */
3688
3697
 
@@ -3691,7 +3700,7 @@ var WebSocket = function () {
3691
3700
  var _this2 = this;
3692
3701
 
3693
3702
  // 订阅服务端提供的某个topic
3694
- this.client.subscribe(this.take, function (response) {
3703
+ this.subscription = this.client.subscribe(this.take, function (response) {
3695
3704
  if (response && (_this2.callback || _this2.success)) {
3696
3705
  var callback = _this2.callback || _this2.success;
3697
3706
  callback(JSON.parse(response.body));
@@ -3732,6 +3741,7 @@ var WebSocket = function () {
3732
3741
 
3733
3742
  WebSocket.prototype.destroy = function destroy() {
3734
3743
  // 断开连接,清除定时器
3744
+ this.unsubscribe();
3735
3745
  if (this.client) {
3736
3746
  this.client.disconnect();
3737
3747
  };
@@ -29,6 +29,8 @@ var WebSocket = function () {
29
29
  this.connects = 1;
30
30
  this.recon = false;
31
31
  this.sendTimeout = null;
32
+ this.socket = null;
33
+ this.subscription = null;
32
34
  }
33
35
 
34
36
  /** socket连接 */
@@ -39,14 +41,12 @@ var WebSocket = function () {
39
41
 
40
42
  if (!this.client) {
41
43
  // 连接SockJS
42
- var socket = new _sockjsClient2.default(this.host + this.url);
43
- // 获取STOMP子协议的客户端对象
44
- this.client = _stompjs2.default.over(socket);
44
+ this.socket = new _sockjsClient2.default(this.host + this.url, { timeout: 60000 });
45
+ this.client = _stompjs2.default.over(this.socket);
45
46
  }
46
47
 
47
48
  // 日志不打印
48
49
  if (!this.debug) {
49
- console.log(111);
50
50
  this.client.debug = function () {};
51
51
  }
52
52
 
@@ -58,9 +58,10 @@ var WebSocket = function () {
58
58
  // 订阅消息
59
59
  _this.subscribe();
60
60
  }, function (error) {
61
+ _this.unsubscribe();
62
+ _this.client = null;
61
63
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
62
64
  if (_this.connects > 5 && diffSecond < _this.interval) {
63
- _this.client.disconnect();
64
65
  _this.error && _this.error(error);
65
66
  } else {
66
67
  _this.reconTimeout = setTimeout(function () {
@@ -69,6 +70,14 @@ var WebSocket = function () {
69
70
  }, 5000);
70
71
  }
71
72
  });
73
+ }; // 清除订阅
74
+
75
+
76
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
77
+ if (this.subscription) {
78
+ this.subscription.unsubscribe();
79
+ this.subscription = null;
80
+ }
72
81
  };
73
82
  /** 订阅服务端 */
74
83
 
@@ -77,7 +86,7 @@ var WebSocket = function () {
77
86
  var _this2 = this;
78
87
 
79
88
  // 订阅服务端提供的某个topic
80
- this.client.subscribe(this.take, function (response) {
89
+ this.subscription = this.client.subscribe(this.take, function (response) {
81
90
  if (response && (_this2.callback || _this2.success)) {
82
91
  var callback = _this2.callback || _this2.success;
83
92
  callback(JSON.parse(response.body));
@@ -118,6 +127,7 @@ var WebSocket = function () {
118
127
 
119
128
  WebSocket.prototype.destroy = function destroy() {
120
129
  // 断开连接,清除定时器
130
+ this.unsubscribe();
121
131
  if (this.client) {
122
132
  this.client.disconnect();
123
133
  };
package/lib/wujie.js CHANGED
@@ -3893,6 +3893,8 @@ var WebSocket = function () {
3893
3893
  this.connects = 1;
3894
3894
  this.recon = false;
3895
3895
  this.sendTimeout = null;
3896
+ this.socket = null;
3897
+ this.subscription = null;
3896
3898
  }
3897
3899
 
3898
3900
  /** socket连接 */
@@ -3903,14 +3905,12 @@ var WebSocket = function () {
3903
3905
 
3904
3906
  if (!this.client) {
3905
3907
  // 连接SockJS
3906
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3907
- // 获取STOMP子协议的客户端对象
3908
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3908
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
3909
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
3909
3910
  }
3910
3911
 
3911
3912
  // 日志不打印
3912
3913
  if (!this.debug) {
3913
- console.log(111);
3914
3914
  this.client.debug = function () {};
3915
3915
  }
3916
3916
 
@@ -3922,9 +3922,10 @@ var WebSocket = function () {
3922
3922
  // 订阅消息
3923
3923
  _this.subscribe();
3924
3924
  }, function (error) {
3925
+ _this.unsubscribe();
3926
+ _this.client = null;
3925
3927
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3926
3928
  if (_this.connects > 5 && diffSecond < _this.interval) {
3927
- _this.client.disconnect();
3928
3929
  _this.error && _this.error(error);
3929
3930
  } else {
3930
3931
  _this.reconTimeout = setTimeout(function () {
@@ -3933,6 +3934,14 @@ var WebSocket = function () {
3933
3934
  }, 5000);
3934
3935
  }
3935
3936
  });
3937
+ }; // 清除订阅
3938
+
3939
+
3940
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
3941
+ if (this.subscription) {
3942
+ this.subscription.unsubscribe();
3943
+ this.subscription = null;
3944
+ }
3936
3945
  };
3937
3946
  /** 订阅服务端 */
3938
3947
 
@@ -3941,7 +3950,7 @@ var WebSocket = function () {
3941
3950
  var _this2 = this;
3942
3951
 
3943
3952
  // 订阅服务端提供的某个topic
3944
- this.client.subscribe(this.take, function (response) {
3953
+ this.subscription = this.client.subscribe(this.take, function (response) {
3945
3954
  if (response && (_this2.callback || _this2.success)) {
3946
3955
  var callback = _this2.callback || _this2.success;
3947
3956
  callback(JSON.parse(response.body));
@@ -3982,6 +3991,7 @@ var WebSocket = function () {
3982
3991
 
3983
3992
  WebSocket.prototype.destroy = function destroy() {
3984
3993
  // 断开连接,清除定时器
3994
+ this.unsubscribe();
3985
3995
  if (this.client) {
3986
3996
  this.client.disconnect();
3987
3997
  };
package/lib/wxlogin.js CHANGED
@@ -3658,6 +3658,8 @@ var WebSocket = function () {
3658
3658
  this.connects = 1;
3659
3659
  this.recon = false;
3660
3660
  this.sendTimeout = null;
3661
+ this.socket = null;
3662
+ this.subscription = null;
3661
3663
  }
3662
3664
 
3663
3665
  /** socket连接 */
@@ -3668,14 +3670,12 @@ var WebSocket = function () {
3668
3670
 
3669
3671
  if (!this.client) {
3670
3672
  // 连接SockJS
3671
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3672
- // 获取STOMP子协议的客户端对象
3673
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3673
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
3674
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
3674
3675
  }
3675
3676
 
3676
3677
  // 日志不打印
3677
3678
  if (!this.debug) {
3678
- console.log(111);
3679
3679
  this.client.debug = function () {};
3680
3680
  }
3681
3681
 
@@ -3687,9 +3687,10 @@ var WebSocket = function () {
3687
3687
  // 订阅消息
3688
3688
  _this.subscribe();
3689
3689
  }, function (error) {
3690
+ _this.unsubscribe();
3691
+ _this.client = null;
3690
3692
  var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3691
3693
  if (_this.connects > 5 && diffSecond < _this.interval) {
3692
- _this.client.disconnect();
3693
3694
  _this.error && _this.error(error);
3694
3695
  } else {
3695
3696
  _this.reconTimeout = setTimeout(function () {
@@ -3698,6 +3699,14 @@ var WebSocket = function () {
3698
3699
  }, 5000);
3699
3700
  }
3700
3701
  });
3702
+ }; // 清除订阅
3703
+
3704
+
3705
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
3706
+ if (this.subscription) {
3707
+ this.subscription.unsubscribe();
3708
+ this.subscription = null;
3709
+ }
3701
3710
  };
3702
3711
  /** 订阅服务端 */
3703
3712
 
@@ -3706,7 +3715,7 @@ var WebSocket = function () {
3706
3715
  var _this2 = this;
3707
3716
 
3708
3717
  // 订阅服务端提供的某个topic
3709
- this.client.subscribe(this.take, function (response) {
3718
+ this.subscription = this.client.subscribe(this.take, function (response) {
3710
3719
  if (response && (_this2.callback || _this2.success)) {
3711
3720
  var callback = _this2.callback || _this2.success;
3712
3721
  callback(JSON.parse(response.body));
@@ -3747,6 +3756,7 @@ var WebSocket = function () {
3747
3756
 
3748
3757
  WebSocket.prototype.destroy = function destroy() {
3749
3758
  // 断开连接,清除定时器
3759
+ this.unsubscribe();
3750
3760
  if (this.client) {
3751
3761
  this.client.disconnect();
3752
3762
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.5.73",
3
+ "version": "0.5.74",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -2,7 +2,9 @@
2
2
  <div class="es-clients">
3
3
  <img v-if="logo" class="es-clients-logo" :src="logo" />
4
4
  <div class="es-clients-title">
5
- 请通过手机浏览器(iOS11版本以上的苹果手机使用照相功能)扫码下载安装
5
+ 请通过手机浏览器
6
+ <template v-if="ios"> (iOS11版本以上的苹果手机使用照相功能) </template>
7
+ 扫码下载安装
6
8
  </div>
7
9
  <ul class="es-clients-list">
8
10
  <li v-if="ios" class="es-clients-item">
@@ -322,7 +322,7 @@ export default {
322
322
  : {},
323
323
  {
324
324
  required: true,
325
- message: '请输入新密码',
325
+ message: '请确认新密码',
326
326
  trigger: 'blur'
327
327
  },
328
328
  { validator: this.reregExpValidate, trigger: 'blur' }
@@ -119,6 +119,7 @@
119
119
  />
120
120
  <es-nav
121
121
  v-if="showMenu && showDefault"
122
+ :hide-sub-menu="hideSubMenu"
122
123
  :is-top="layout == 'topside'"
123
124
  :overlap="layout == 'side'"
124
125
  :data="menu"
@@ -252,6 +253,15 @@
252
253
  </slot>
253
254
  </es-dialog>
254
255
  <notice :data="sysMsg" :winopen="winopen" @opened="handleOpened"></notice>
256
+ <es-dialog :title="dialog.title" :visible.sync="dialog.show" size="md">
257
+ <iframe
258
+ v-if="dialog.show"
259
+ width="100%"
260
+ height="100%"
261
+ frameborder="0"
262
+ :src="dialog.src"
263
+ ></iframe>
264
+ </es-dialog>
255
265
  </div>
256
266
  </template>
257
267
  <script>
@@ -437,6 +447,10 @@ export default {
437
447
  showCollapse: {
438
448
  type: Boolean,
439
449
  default: true
450
+ },
451
+ onlineView: {
452
+ type: [String, Boolean],
453
+ default: true
440
454
  }
441
455
  },
442
456
  computed: {
@@ -580,6 +594,14 @@ export default {
580
594
  },
581
595
  menuCode() {
582
596
  return appCode || this.appCode;
597
+ },
598
+ onlineUrl() {
599
+ if (this.onlineView) {
600
+ return typeof this.onlineView == 'string'
601
+ ? this.onlineView
602
+ : '/main/sysuseronline/list.dhtml';
603
+ }
604
+ return false;
583
605
  }
584
606
  },
585
607
  watch: {
@@ -697,7 +719,9 @@ export default {
697
719
  timer: null,
698
720
  pid: null,
699
721
  showPage: false,
700
- webSocket: null
722
+ webSocket: null,
723
+ dialog: {},
724
+ hideSubMenu: false
701
725
  };
702
726
  },
703
727
  created() {
@@ -1062,8 +1086,14 @@ export default {
1062
1086
  * @param {Boolean} [isUrl] - res是否是url地址
1063
1087
  * @param {Object} [param] - 拼接地址后的参数
1064
1088
  */
1065
- jumpMenu(res, isUrl, path) {
1066
- let option = { url: res, isUrl: isUrl, path: path };
1089
+ jumpMenu(res, isUrl, param, hide) {
1090
+ if (this.showSide === false) {
1091
+ this.isSide = true;
1092
+ }
1093
+ if (hide !== undefined && hide !== null && hide !== '') {
1094
+ this.hideSubMenu = hide;
1095
+ }
1096
+ let option = { url: res, isUrl: isUrl, param: param };
1067
1097
  if (util.isObject(res)) {
1068
1098
  if (res.urlopenmode == 1) {
1069
1099
  util.win.open(res.url);
@@ -1611,6 +1641,7 @@ export default {
1611
1641
  }
1612
1642
  break;
1613
1643
  case 'sub':
1644
+ this.hideSubMenu = false;
1614
1645
  this.navIds = [node.id];
1615
1646
  if (node.url) {
1616
1647
  this.tabs = [];
@@ -1734,6 +1765,7 @@ export default {
1734
1765
  handleTrigger(res) {},
1735
1766
  //头部工具交互事件
1736
1767
  handleClick(res) {
1768
+ console.log(res);
1737
1769
  const { type } = res;
1738
1770
  switch (type) {
1739
1771
  //刷新
@@ -1758,13 +1790,15 @@ export default {
1758
1790
  case 'user':
1759
1791
  this.showUserInfo = true;
1760
1792
  break;
1761
- // case 'online':
1762
- // this.dialog = {
1763
- // title: '查看在线人员',
1764
- // show: true,
1765
- // url: '/main/sysuseronline/list.dhtml'
1766
- // };
1767
- // break;
1793
+ case 'online':
1794
+ if (this.onlineUrl) {
1795
+ this.dialog = {
1796
+ title: '查看在线人员',
1797
+ show: true,
1798
+ src: this.onlineUrl
1799
+ };
1800
+ }
1801
+ break;
1768
1802
  case 'notice':
1769
1803
  this.showMsg = !this.showMsg;
1770
1804
  break;