eoss-ui 0.5.72 → 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.
- package/lib/button-group.js +16 -6
- package/lib/button.js +16 -6
- package/lib/checkbox-group.js +16 -6
- package/lib/clients.js +16 -7
- package/lib/data-table-form.js +16 -6
- package/lib/data-table.js +31 -13
- package/lib/date-picker.js +16 -6
- package/lib/dialog.js +16 -6
- package/lib/eoss-ui.common.js +252 -115
- package/lib/flow-group.js +16 -6
- package/lib/flow-list.js +16 -6
- package/lib/flow.js +16 -6
- package/lib/form.js +16 -6
- package/lib/handle-user.js +16 -6
- package/lib/handler.js +16 -6
- package/lib/index.js +1 -1
- package/lib/input-number.js +16 -6
- package/lib/input.js +16 -6
- package/lib/login.js +24 -14
- package/lib/main.js +128 -40
- package/lib/menu.js +3 -0
- package/lib/nav.js +73 -25
- package/lib/page.js +16 -6
- package/lib/player.js +16 -6
- package/lib/qr-code.js +16 -6
- package/lib/radio-group.js +16 -6
- package/lib/retrial-auth.js +16 -6
- package/lib/select-ganged.js +16 -6
- package/lib/select.js +17 -6
- package/lib/selector-panel.js +16 -6
- package/lib/selector.js +19 -9
- package/lib/sizer.js +16 -6
- package/lib/steps.js +16 -6
- package/lib/switch.js +16 -6
- package/lib/table-form.js +16 -6
- package/lib/tabs.js +16 -6
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/nav.css +1 -1
- package/lib/tips.js +16 -6
- package/lib/tree-group.js +16 -6
- package/lib/tree.js +19 -9
- package/lib/upload.js +16 -6
- package/lib/utils/webSocket.js +16 -6
- package/lib/wujie.js +16 -6
- package/lib/wxlogin.js +16 -6
- package/package.json +2 -2
- package/packages/clients/src/main.vue +3 -1
- package/packages/data-table/src/main.vue +9 -7
- package/packages/login/src/resetPassword.vue +1 -1
- package/packages/main/src/main.vue +53 -14
- package/packages/menu/src/main.vue +3 -0
- package/packages/nav/src/main.vue +37 -8
- package/packages/select/src/main.vue +1 -0
- package/packages/selector/src/main.vue +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/nav.css +1 -1
- package/packages/theme-chalk/src/main.scss +3 -1
- package/packages/theme-chalk/src/nav.scss +4 -1
- package/packages/tree/src/main.vue +1 -1
- package/src/index.js +1 -1
- package/src/utils/webSocket.js +14 -7
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
|
-
|
|
3657
|
-
|
|
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
|
};
|
package/lib/utils/webSocket.js
CHANGED
|
@@ -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
|
-
|
|
43
|
-
|
|
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
|
-
|
|
3907
|
-
|
|
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
|
-
|
|
3672
|
-
|
|
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.
|
|
3
|
+
"version": "0.5.74",
|
|
4
4
|
"description": "eoss内部业务组件",
|
|
5
5
|
"main": "lib/eoss-ui.common.js",
|
|
6
6
|
"files": [
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"cp-cli": "^1.0.2",
|
|
98
98
|
"cross-env": "^3.1.3",
|
|
99
99
|
"css-loader": "^2.1.0",
|
|
100
|
-
"eoss-element": "^0.2.
|
|
100
|
+
"eoss-element": "^0.2.99",
|
|
101
101
|
"es6-promise": "^4.0.5",
|
|
102
102
|
"eslint": "4.18.2",
|
|
103
103
|
"eslint-config-elemefe": "0.1.1",
|
|
@@ -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
|
-
|
|
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">
|
|
@@ -541,13 +541,8 @@ export default {
|
|
|
541
541
|
if (this.list && this.list.length) {
|
|
542
542
|
return this.list;
|
|
543
543
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
this.data &&
|
|
547
|
-
this.data.length &&
|
|
548
|
-
this.config.totalCount < this.data.length + 2
|
|
549
|
-
) {
|
|
550
|
-
this.config.totalCount = this.data.length - this.lose;
|
|
544
|
+
this.config.totalCount = this.data.length - this.lose;
|
|
545
|
+
if (this.page && this.data.length > this.config.pageSize) {
|
|
551
546
|
return this.data.filter((item, index) => {
|
|
552
547
|
return (
|
|
553
548
|
index > (this.config.pageNum - 1) * this.config.pageSize - 1 &&
|
|
@@ -622,6 +617,13 @@ export default {
|
|
|
622
617
|
this.resetHeight();
|
|
623
618
|
this.doLayout();
|
|
624
619
|
},
|
|
620
|
+
// data: {
|
|
621
|
+
// immediate: true,
|
|
622
|
+
// deep: true,
|
|
623
|
+
// handler(val) {
|
|
624
|
+
// this.config.totalCount = val.length - this.lose;
|
|
625
|
+
// }
|
|
626
|
+
// },
|
|
625
627
|
page() {
|
|
626
628
|
this.resetHeight();
|
|
627
629
|
this.doLayout();
|
|
@@ -80,9 +80,10 @@
|
|
|
80
80
|
<div class="es-main-left" v-if="layout !== 'topnav' && showSide">
|
|
81
81
|
<div
|
|
82
82
|
class="es-main-side"
|
|
83
|
+
:class="{ 'es-main-topside': layout === 'topside' }"
|
|
83
84
|
v-if="layout === 'topside' || layout === 'side'"
|
|
84
85
|
>
|
|
85
|
-
<div class="es-main-side-logo">
|
|
86
|
+
<div class="es-main-side-logo" v-if="layout === 'topside'">
|
|
86
87
|
<img class="es-main-logo" :src="logoUrl" v-if="logoUrl" />
|
|
87
88
|
</div>
|
|
88
89
|
<es-handle-user
|
|
@@ -118,6 +119,7 @@
|
|
|
118
119
|
/>
|
|
119
120
|
<es-nav
|
|
120
121
|
v-if="showMenu && showDefault"
|
|
122
|
+
:hide-sub-menu="hideSubMenu"
|
|
121
123
|
:is-top="layout == 'topside'"
|
|
122
124
|
:overlap="layout == 'side'"
|
|
123
125
|
:data="menu"
|
|
@@ -129,7 +131,7 @@
|
|
|
129
131
|
:sub-icon="subIcon"
|
|
130
132
|
:biserial="biserial"
|
|
131
133
|
:title="showNavTitle ? title : false"
|
|
132
|
-
:showCollapse="showNavTitle"
|
|
134
|
+
:showCollapse="showNavTitle ? showCollapse : false"
|
|
133
135
|
:menu-tips="menuTips"
|
|
134
136
|
:is-default="isDefault"
|
|
135
137
|
:paddingLeft="navPaddingLeft"
|
|
@@ -251,6 +253,15 @@
|
|
|
251
253
|
</slot>
|
|
252
254
|
</es-dialog>
|
|
253
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>
|
|
254
265
|
</div>
|
|
255
266
|
</template>
|
|
256
267
|
<script>
|
|
@@ -432,7 +443,15 @@ export default {
|
|
|
432
443
|
type: String,
|
|
433
444
|
default: '230px'
|
|
434
445
|
},
|
|
435
|
-
navWidth: String
|
|
446
|
+
navWidth: String,
|
|
447
|
+
showCollapse: {
|
|
448
|
+
type: Boolean,
|
|
449
|
+
default: true
|
|
450
|
+
},
|
|
451
|
+
onlineView: {
|
|
452
|
+
type: [String, Boolean],
|
|
453
|
+
default: true
|
|
454
|
+
}
|
|
436
455
|
},
|
|
437
456
|
computed: {
|
|
438
457
|
showHeader() {
|
|
@@ -474,7 +493,7 @@ export default {
|
|
|
474
493
|
: this.navWidth;
|
|
475
494
|
},
|
|
476
495
|
showNavTitle() {
|
|
477
|
-
return this.layout !== 'topside'
|
|
496
|
+
return this.layout !== 'topside';
|
|
478
497
|
},
|
|
479
498
|
//tabs菜单
|
|
480
499
|
fourthTabs() {
|
|
@@ -575,6 +594,14 @@ export default {
|
|
|
575
594
|
},
|
|
576
595
|
menuCode() {
|
|
577
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;
|
|
578
605
|
}
|
|
579
606
|
},
|
|
580
607
|
watch: {
|
|
@@ -692,7 +719,9 @@ export default {
|
|
|
692
719
|
timer: null,
|
|
693
720
|
pid: null,
|
|
694
721
|
showPage: false,
|
|
695
|
-
webSocket: null
|
|
722
|
+
webSocket: null,
|
|
723
|
+
dialog: {},
|
|
724
|
+
hideSubMenu: false
|
|
696
725
|
};
|
|
697
726
|
},
|
|
698
727
|
created() {
|
|
@@ -1057,8 +1086,14 @@ export default {
|
|
|
1057
1086
|
* @param {Boolean} [isUrl] - res是否是url地址
|
|
1058
1087
|
* @param {Object} [param] - 拼接地址后的参数
|
|
1059
1088
|
*/
|
|
1060
|
-
jumpMenu(res, isUrl,
|
|
1061
|
-
|
|
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 };
|
|
1062
1097
|
if (util.isObject(res)) {
|
|
1063
1098
|
if (res.urlopenmode == 1) {
|
|
1064
1099
|
util.win.open(res.url);
|
|
@@ -1606,6 +1641,7 @@ export default {
|
|
|
1606
1641
|
}
|
|
1607
1642
|
break;
|
|
1608
1643
|
case 'sub':
|
|
1644
|
+
this.hideSubMenu = false;
|
|
1609
1645
|
this.navIds = [node.id];
|
|
1610
1646
|
if (node.url) {
|
|
1611
1647
|
this.tabs = [];
|
|
@@ -1729,6 +1765,7 @@ export default {
|
|
|
1729
1765
|
handleTrigger(res) {},
|
|
1730
1766
|
//头部工具交互事件
|
|
1731
1767
|
handleClick(res) {
|
|
1768
|
+
console.log(res);
|
|
1732
1769
|
const { type } = res;
|
|
1733
1770
|
switch (type) {
|
|
1734
1771
|
//刷新
|
|
@@ -1753,13 +1790,15 @@ export default {
|
|
|
1753
1790
|
case 'user':
|
|
1754
1791
|
this.showUserInfo = true;
|
|
1755
1792
|
break;
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1793
|
+
case 'online':
|
|
1794
|
+
if (this.onlineUrl) {
|
|
1795
|
+
this.dialog = {
|
|
1796
|
+
title: '查看在线人员',
|
|
1797
|
+
show: true,
|
|
1798
|
+
src: this.onlineUrl
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
break;
|
|
1763
1802
|
case 'notice':
|
|
1764
1803
|
this.showMsg = !this.showMsg;
|
|
1765
1804
|
break;
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
:biserial="biserial"
|
|
40
40
|
:style="{
|
|
41
41
|
width: biserial ? width : boxWidth,
|
|
42
|
-
left: show ? '15px' : navWidth
|
|
42
|
+
left: biserial ? (show ? '15px' : navWidth) : ''
|
|
43
43
|
}"
|
|
44
|
-
v-show="
|
|
44
|
+
v-show="showMenu"
|
|
45
45
|
>
|
|
46
|
-
<div class="es-nav-title" v-if="showTitle">
|
|
46
|
+
<div class="es-nav-title" v-if="showTitle" ref="navTitle">
|
|
47
47
|
<span v-show="!isCollapse">{{ headline }}</span>
|
|
48
48
|
<template v-if="showCollapse">
|
|
49
49
|
<i
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
:collapse="isCollapse"
|
|
66
66
|
:default-active="menuActive"
|
|
67
67
|
:width="isTop ? boxWidth : menuWidth"
|
|
68
|
+
:height="menuHeight"
|
|
68
69
|
:style="{ height: menuHeight }"
|
|
69
70
|
:is-default="isDefault"
|
|
70
71
|
:biserial="biserial"
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
</template>
|
|
91
92
|
<script>
|
|
92
93
|
import util from 'eoss-ui/src/utils/util';
|
|
94
|
+
import { debounce } from 'throttle-debounce';
|
|
93
95
|
export default {
|
|
94
96
|
name: 'EsNav',
|
|
95
97
|
inheritAttrs: false,
|
|
@@ -130,12 +132,17 @@ export default {
|
|
|
130
132
|
type: Boolean,
|
|
131
133
|
default: true
|
|
132
134
|
},
|
|
133
|
-
overlap: Boolean
|
|
135
|
+
overlap: Boolean,
|
|
136
|
+
//隐藏菜单
|
|
137
|
+
hideSubMenu: Boolean
|
|
134
138
|
},
|
|
135
139
|
computed: {
|
|
136
140
|
show() {
|
|
137
141
|
return this.overlap && this.subMenu.length;
|
|
138
142
|
},
|
|
143
|
+
showMenu() {
|
|
144
|
+
return this.biserial ? this.subMenu.length : this.menu.length;
|
|
145
|
+
},
|
|
139
146
|
menu() {
|
|
140
147
|
return this.data;
|
|
141
148
|
},
|
|
@@ -174,7 +181,11 @@ export default {
|
|
|
174
181
|
return this.navWidth;
|
|
175
182
|
}
|
|
176
183
|
}
|
|
177
|
-
return this.subMenu &&
|
|
184
|
+
return this.subMenu &&
|
|
185
|
+
this.subMenu.length &&
|
|
186
|
+
this.isShow &&
|
|
187
|
+
!this.overlap &&
|
|
188
|
+
!this.hideSubMenu
|
|
178
189
|
? parseInt(this.width, 10) + parseInt(this.navWidth, 10) + 'px'
|
|
179
190
|
: this.navWidth;
|
|
180
191
|
},
|
|
@@ -193,10 +204,13 @@ export default {
|
|
|
193
204
|
this.headline = val;
|
|
194
205
|
}
|
|
195
206
|
},
|
|
207
|
+
boxWidth() {
|
|
208
|
+
this.getHeight();
|
|
209
|
+
},
|
|
196
210
|
biserial: {
|
|
197
211
|
handler(val) {
|
|
198
212
|
this.isShow = !val;
|
|
199
|
-
this.
|
|
213
|
+
this.getHeight();
|
|
200
214
|
}
|
|
201
215
|
},
|
|
202
216
|
defaultActive: {
|
|
@@ -246,6 +260,11 @@ export default {
|
|
|
246
260
|
} else {
|
|
247
261
|
this.subMenu = [];
|
|
248
262
|
}
|
|
263
|
+
},
|
|
264
|
+
showMenu(val) {
|
|
265
|
+
if (val) {
|
|
266
|
+
this.getHeight();
|
|
267
|
+
}
|
|
249
268
|
}
|
|
250
269
|
},
|
|
251
270
|
data() {
|
|
@@ -260,8 +279,13 @@ export default {
|
|
|
260
279
|
subMenu: []
|
|
261
280
|
};
|
|
262
281
|
},
|
|
282
|
+
beforeCreate() {
|
|
283
|
+
this.getHeight = debounce(500, () => {
|
|
284
|
+
this.resetHeight();
|
|
285
|
+
});
|
|
286
|
+
},
|
|
263
287
|
mounted() {
|
|
264
|
-
this.
|
|
288
|
+
this.getHeight();
|
|
265
289
|
this.move();
|
|
266
290
|
},
|
|
267
291
|
methods: {
|
|
@@ -365,7 +389,12 @@ export default {
|
|
|
365
389
|
height -= 15;
|
|
366
390
|
}
|
|
367
391
|
this.height = height + 'px';
|
|
368
|
-
|
|
392
|
+
if (this.showTitle) {
|
|
393
|
+
let theight = this.$refs.navTitle.offsetHeight;
|
|
394
|
+
this.menuHeight = height - theight + 'px';
|
|
395
|
+
} else {
|
|
396
|
+
this.menuHeight = height + 'px';
|
|
397
|
+
}
|
|
369
398
|
});
|
|
370
399
|
}
|
|
371
400
|
}
|