yh-pub 1.0.0 → 1.0.2
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/README.MD +19 -19
- package/layout/admin/adminIndex.vue +104 -104
- package/layout/admin/api/loginApi.js +24 -24
- package/layout/admin/api/routers.js +93 -93
- package/layout/admin/api/tenantApi.js +123 -123
- package/layout/admin/home/homeIndex.vue +25 -25
- package/layout/admin/login/login.vue +161 -161
- package/layout/admin/menu/MenuIndex.vue +648 -648
- package/layout/admin/menu/icon.vue +108 -108
- package/layout/admin/menu/iconList.js +934 -934
- package/layout/admin/saTenant/saTenant.vue +173 -173
- package/layout/admin/saTenant/saTenantForm.js +80 -80
- package/layout/admin/saTenant/saTenantForm.vue +61 -61
- package/layout/admin/saTenant/saTenantRoleManage.js +417 -417
- package/layout/admin/saTenant/saTenantRoleManage.vue +99 -99
- package/layout/admin/user/saUser.less +6 -6
- package/layout/admin/user/saUser.vue +72 -72
- package/layout/main/components/console/console.vue +205 -205
- package/layout/main/components/error-store/error-store.vue +72 -72
- package/layout/main/components/error-store/index.js +2 -2
- package/layout/main/components/fullscreen/fullscreen.vue +57 -57
- package/layout/main/components/fullscreen/index.js +2 -2
- package/layout/main/components/language/language.vue +71 -71
- package/layout/main/components/side-menu/side-menu.less +73 -73
- package/layout/main/components/side-menu/side-menu.vue +75 -75
- package/layout/main/components/tags-nav/tags-nav.less +44 -44
- package/layout/main/components/tags-nav/tags-nav.vue +144 -144
- package/layout/main/components/user/user.less +12 -12
- package/layout/main/components/user/user.vue +185 -185
- package/layout/main/home/home.vue +480 -480
- package/layout/main/home/index.js +2 -2
- package/layout/main/home/toDoList.vue +32 -32
- package/layout/main/login/login.less +93 -93
- package/layout/main/login/login.vue +151 -151
- package/layout/main/main.less +81 -81
- package/layout/main/main.vue +254 -202
- package/layout/main/system/dict.vue +64 -64
- package/layout/main/system/orgManage.vue +473 -473
- package/layout/main/system/roleManage.js +807 -755
- package/layout/main/system/roleManage.vue +424 -399
- package/package.json +11 -11
- package/view/basic/error-logger.vue +74 -74
- package/view/basic/error-page/401.vue +22 -22
- package/view/basic/error-page/404.vue +22 -22
- package/view/basic/error-page/500.vue +22 -22
- package/view/basic/error-page/back-btn-group.vue +48 -48
- package/view/basic/error-page/error-content.vue +28 -28
- package/view/basic/error-page/error.less +46 -46
- package/view/config/component/confFormItem.vue +49 -49
- package/view/config/config.scss +45 -45
- package/view/config/configIndex.vue +150 -150
- package/view/config/subPage/router-config.vue +4 -4
- package/view/config/subPage/sys-config.vue +249 -249
- package/view/window/IframeFReportView.vue +27 -27
- package/view/window/windowIndex.vue +22 -22
|
@@ -1,205 +1,205 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="console"
|
|
4
|
-
ref="tongs_console">
|
|
5
|
-
<el-tabs :model-value="activeIndex">
|
|
6
|
-
<el-tab-pane
|
|
7
|
-
name="1"
|
|
8
|
-
label="AGV日志">
|
|
9
|
-
<div class="console_cell">
|
|
10
|
-
<div
|
|
11
|
-
class="panel"
|
|
12
|
-
ref="agvLogs">
|
|
13
|
-
<div
|
|
14
|
-
v-for="info in agvLogs"
|
|
15
|
-
class="info">
|
|
16
|
-
[{{ info.time }}] - {{ info.msg }}
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</el-tab-pane>
|
|
21
|
-
<el-tab-pane
|
|
22
|
-
name="2"
|
|
23
|
-
label="RGV日志">
|
|
24
|
-
<div class="console_cell">
|
|
25
|
-
<div
|
|
26
|
-
class="panel"
|
|
27
|
-
ref="rgvLogs">
|
|
28
|
-
<div
|
|
29
|
-
v-for="info in rgvLogs"
|
|
30
|
-
class="info">
|
|
31
|
-
[{{ info.time }}] - {{ info.msg }}
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</el-tab-pane>
|
|
36
|
-
<el-tab-pane
|
|
37
|
-
name="3"
|
|
38
|
-
label="堆垛机日志">
|
|
39
|
-
<div class="console_cell">
|
|
40
|
-
<div
|
|
41
|
-
class="panel"
|
|
42
|
-
ref="stackerLogs">
|
|
43
|
-
<div
|
|
44
|
-
v-for="info in stackerLogs"
|
|
45
|
-
class="info">
|
|
46
|
-
[{{ info.time }}] - {{ info.msg }}
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</el-tab-pane>
|
|
51
|
-
<el-tab-pane
|
|
52
|
-
name="4"
|
|
53
|
-
label="控制台日志">
|
|
54
|
-
<div class="console_cell">
|
|
55
|
-
<div
|
|
56
|
-
class="panel"
|
|
57
|
-
ref="consoles">
|
|
58
|
-
<div
|
|
59
|
-
v-for="info in consoles"
|
|
60
|
-
class="info">
|
|
61
|
-
[{{ info.time }}] - {{ info.msg }}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</el-tab-pane>
|
|
66
|
-
</el-tabs>
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
import config from "@/config";
|
|
72
|
-
import { getToken } from "@/libs/util";
|
|
73
|
-
import LogConsole from "./console.vue";
|
|
74
|
-
|
|
75
|
-
const baseUrl = process.env.NODE_ENV === "development" ? config.baseUrl.dev : config.baseUrl.pro;
|
|
76
|
-
|
|
77
|
-
export default {
|
|
78
|
-
name: "console",
|
|
79
|
-
components: {},
|
|
80
|
-
props: {
|
|
81
|
-
code: String,
|
|
82
|
-
desc: String,
|
|
83
|
-
src: String,
|
|
84
|
-
},
|
|
85
|
-
data() {
|
|
86
|
-
return {
|
|
87
|
-
activeIndex: "1",
|
|
88
|
-
websocketPath: baseUrl.replace("http", "ws") + "/consoleSocket",
|
|
89
|
-
websocket: "",
|
|
90
|
-
agvLogs: [],
|
|
91
|
-
rgvLogs: [],
|
|
92
|
-
stackerLogs: [],
|
|
93
|
-
consoles: [],
|
|
94
|
-
pageDestroyed: false,
|
|
95
|
-
};
|
|
96
|
-
},
|
|
97
|
-
methods: {
|
|
98
|
-
initWebsocket() {
|
|
99
|
-
let token = getToken();
|
|
100
|
-
if (typeof WebSocket === "undefined") {
|
|
101
|
-
this.$message.info("您的浏览器不支持WebSocket");
|
|
102
|
-
} else if (token) {
|
|
103
|
-
let self = this;
|
|
104
|
-
if (!window.websocket) {
|
|
105
|
-
window.agvLogs = [];
|
|
106
|
-
let websocketPath = this.websocketPath + "?$_TOKEN=" + token;
|
|
107
|
-
|
|
108
|
-
window.initWebSocket = function () {
|
|
109
|
-
// 实例化websocket
|
|
110
|
-
window.websocket = new WebSocket(websocketPath);
|
|
111
|
-
// 监听websocket的连接
|
|
112
|
-
window.websocket.onopen = () => {
|
|
113
|
-
console.log("(" + this.websocketPath + ") websocket连接成功");
|
|
114
|
-
};
|
|
115
|
-
// 监听websocket的错误信息
|
|
116
|
-
window.websocket.onerror = () => {
|
|
117
|
-
console.log("(" + this.websocketPath + ") websocket连接错误");
|
|
118
|
-
};
|
|
119
|
-
// 监听websocket的消息
|
|
120
|
-
window.websocket.onmessage = (res) => {
|
|
121
|
-
console.info("接收到消息", res);
|
|
122
|
-
let data = {};
|
|
123
|
-
eval("data=" + res.data);
|
|
124
|
-
if (data) {
|
|
125
|
-
data.time = data.time ? data.time.substring(11) : "";
|
|
126
|
-
|
|
127
|
-
if (data.type == "3" || data.type == "4") {
|
|
128
|
-
window.agvLogs.push(data);
|
|
129
|
-
} else if (data.type == "5") {
|
|
130
|
-
window.rgvLogs.push(data);
|
|
131
|
-
} else if (data.type == "7") {
|
|
132
|
-
window.stackerLogs.push(data);
|
|
133
|
-
} else {
|
|
134
|
-
window.consoles.push(data);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
self.scrollTop();
|
|
139
|
-
};
|
|
140
|
-
// 监听websocket关闭
|
|
141
|
-
window.websocket.onclose = () => {
|
|
142
|
-
console.log("websocket关闭,尝试重新连接websocket");
|
|
143
|
-
window.setTimeout(() => {
|
|
144
|
-
window.initWebSocket();
|
|
145
|
-
}, 5000);
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
window.initWebSocket();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
this.agvLogs = window.agvLogs;
|
|
153
|
-
this.rgvLogs = window.rgvLogs;
|
|
154
|
-
this.stackerLogs = window.stackerLogs;
|
|
155
|
-
this.consoles = window.consoles;
|
|
156
|
-
},
|
|
157
|
-
scrollTop() {
|
|
158
|
-
this.$nextTick(() => {
|
|
159
|
-
let div = this.$refs["agvLogs"];
|
|
160
|
-
if (div) div.scrollTop = div.scrollHeight;
|
|
161
|
-
div = this.$refs["rgvLogs"];
|
|
162
|
-
if (div) div.scrollTop = div.scrollHeight;
|
|
163
|
-
div = this.$refs["stackerLogs"];
|
|
164
|
-
if (div) div.scrollTop = div.scrollHeight;
|
|
165
|
-
div = this.$refs["consoles"];
|
|
166
|
-
if (div) div.scrollTop = div.scrollHeight;
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
mounted() {
|
|
171
|
-
this.initWebsocket();
|
|
172
|
-
},
|
|
173
|
-
beforeDestroy() {
|
|
174
|
-
if (window.websocket) {
|
|
175
|
-
console.info("关闭了websocket");
|
|
176
|
-
window.websocket.close();
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
</script>
|
|
181
|
-
<style>
|
|
182
|
-
.console {
|
|
183
|
-
color: #ffffff;
|
|
184
|
-
width: 100%;
|
|
185
|
-
height: 100%;
|
|
186
|
-
min-height: 800px;
|
|
187
|
-
}
|
|
188
|
-
.console .console_cell {
|
|
189
|
-
border-right: 1px #ffffff solid;
|
|
190
|
-
height: calc(100% - 5px);
|
|
191
|
-
background-color: #303030;
|
|
192
|
-
}
|
|
193
|
-
.console .panel {
|
|
194
|
-
min-height: 500px;
|
|
195
|
-
height: calc(100% - 55px);
|
|
196
|
-
padding: 10px;
|
|
197
|
-
overflow: auto;
|
|
198
|
-
}
|
|
199
|
-
.console .info {
|
|
200
|
-
font-size: 13px;
|
|
201
|
-
line-height: 18px;
|
|
202
|
-
color: #ffffff;
|
|
203
|
-
}
|
|
204
|
-
</style>
|
|
205
|
-
@/libs/util
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="console"
|
|
4
|
+
ref="tongs_console">
|
|
5
|
+
<el-tabs :model-value="activeIndex">
|
|
6
|
+
<el-tab-pane
|
|
7
|
+
name="1"
|
|
8
|
+
label="AGV日志">
|
|
9
|
+
<div class="console_cell">
|
|
10
|
+
<div
|
|
11
|
+
class="panel"
|
|
12
|
+
ref="agvLogs">
|
|
13
|
+
<div
|
|
14
|
+
v-for="info in agvLogs"
|
|
15
|
+
class="info">
|
|
16
|
+
[{{ info.time }}] - {{ info.msg }}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</el-tab-pane>
|
|
21
|
+
<el-tab-pane
|
|
22
|
+
name="2"
|
|
23
|
+
label="RGV日志">
|
|
24
|
+
<div class="console_cell">
|
|
25
|
+
<div
|
|
26
|
+
class="panel"
|
|
27
|
+
ref="rgvLogs">
|
|
28
|
+
<div
|
|
29
|
+
v-for="info in rgvLogs"
|
|
30
|
+
class="info">
|
|
31
|
+
[{{ info.time }}] - {{ info.msg }}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</el-tab-pane>
|
|
36
|
+
<el-tab-pane
|
|
37
|
+
name="3"
|
|
38
|
+
label="堆垛机日志">
|
|
39
|
+
<div class="console_cell">
|
|
40
|
+
<div
|
|
41
|
+
class="panel"
|
|
42
|
+
ref="stackerLogs">
|
|
43
|
+
<div
|
|
44
|
+
v-for="info in stackerLogs"
|
|
45
|
+
class="info">
|
|
46
|
+
[{{ info.time }}] - {{ info.msg }}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</el-tab-pane>
|
|
51
|
+
<el-tab-pane
|
|
52
|
+
name="4"
|
|
53
|
+
label="控制台日志">
|
|
54
|
+
<div class="console_cell">
|
|
55
|
+
<div
|
|
56
|
+
class="panel"
|
|
57
|
+
ref="consoles">
|
|
58
|
+
<div
|
|
59
|
+
v-for="info in consoles"
|
|
60
|
+
class="info">
|
|
61
|
+
[{{ info.time }}] - {{ info.msg }}
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</el-tab-pane>
|
|
66
|
+
</el-tabs>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
import config from "@/config";
|
|
72
|
+
import { getToken } from "@/libs/util";
|
|
73
|
+
import LogConsole from "./console.vue";
|
|
74
|
+
|
|
75
|
+
const baseUrl = process.env.NODE_ENV === "development" ? config.baseUrl.dev : config.baseUrl.pro;
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
name: "console",
|
|
79
|
+
components: {},
|
|
80
|
+
props: {
|
|
81
|
+
code: String,
|
|
82
|
+
desc: String,
|
|
83
|
+
src: String,
|
|
84
|
+
},
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
activeIndex: "1",
|
|
88
|
+
websocketPath: baseUrl.replace("http", "ws") + "/consoleSocket",
|
|
89
|
+
websocket: "",
|
|
90
|
+
agvLogs: [],
|
|
91
|
+
rgvLogs: [],
|
|
92
|
+
stackerLogs: [],
|
|
93
|
+
consoles: [],
|
|
94
|
+
pageDestroyed: false,
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
methods: {
|
|
98
|
+
initWebsocket() {
|
|
99
|
+
let token = getToken();
|
|
100
|
+
if (typeof WebSocket === "undefined") {
|
|
101
|
+
this.$message.info("您的浏览器不支持WebSocket");
|
|
102
|
+
} else if (token) {
|
|
103
|
+
let self = this;
|
|
104
|
+
if (!window.websocket) {
|
|
105
|
+
window.agvLogs = [];
|
|
106
|
+
let websocketPath = this.websocketPath + "?$_TOKEN=" + token;
|
|
107
|
+
|
|
108
|
+
window.initWebSocket = function () {
|
|
109
|
+
// 实例化websocket
|
|
110
|
+
window.websocket = new WebSocket(websocketPath);
|
|
111
|
+
// 监听websocket的连接
|
|
112
|
+
window.websocket.onopen = () => {
|
|
113
|
+
console.log("(" + this.websocketPath + ") websocket连接成功");
|
|
114
|
+
};
|
|
115
|
+
// 监听websocket的错误信息
|
|
116
|
+
window.websocket.onerror = () => {
|
|
117
|
+
console.log("(" + this.websocketPath + ") websocket连接错误");
|
|
118
|
+
};
|
|
119
|
+
// 监听websocket的消息
|
|
120
|
+
window.websocket.onmessage = (res) => {
|
|
121
|
+
console.info("接收到消息", res);
|
|
122
|
+
let data = {};
|
|
123
|
+
eval("data=" + res.data);
|
|
124
|
+
if (data) {
|
|
125
|
+
data.time = data.time ? data.time.substring(11) : "";
|
|
126
|
+
|
|
127
|
+
if (data.type == "3" || data.type == "4") {
|
|
128
|
+
window.agvLogs.push(data);
|
|
129
|
+
} else if (data.type == "5") {
|
|
130
|
+
window.rgvLogs.push(data);
|
|
131
|
+
} else if (data.type == "7") {
|
|
132
|
+
window.stackerLogs.push(data);
|
|
133
|
+
} else {
|
|
134
|
+
window.consoles.push(data);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
self.scrollTop();
|
|
139
|
+
};
|
|
140
|
+
// 监听websocket关闭
|
|
141
|
+
window.websocket.onclose = () => {
|
|
142
|
+
console.log("websocket关闭,尝试重新连接websocket");
|
|
143
|
+
window.setTimeout(() => {
|
|
144
|
+
window.initWebSocket();
|
|
145
|
+
}, 5000);
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
window.initWebSocket();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
this.agvLogs = window.agvLogs;
|
|
153
|
+
this.rgvLogs = window.rgvLogs;
|
|
154
|
+
this.stackerLogs = window.stackerLogs;
|
|
155
|
+
this.consoles = window.consoles;
|
|
156
|
+
},
|
|
157
|
+
scrollTop() {
|
|
158
|
+
this.$nextTick(() => {
|
|
159
|
+
let div = this.$refs["agvLogs"];
|
|
160
|
+
if (div) div.scrollTop = div.scrollHeight;
|
|
161
|
+
div = this.$refs["rgvLogs"];
|
|
162
|
+
if (div) div.scrollTop = div.scrollHeight;
|
|
163
|
+
div = this.$refs["stackerLogs"];
|
|
164
|
+
if (div) div.scrollTop = div.scrollHeight;
|
|
165
|
+
div = this.$refs["consoles"];
|
|
166
|
+
if (div) div.scrollTop = div.scrollHeight;
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
mounted() {
|
|
171
|
+
this.initWebsocket();
|
|
172
|
+
},
|
|
173
|
+
beforeDestroy() {
|
|
174
|
+
if (window.websocket) {
|
|
175
|
+
console.info("关闭了websocket");
|
|
176
|
+
window.websocket.close();
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
</script>
|
|
181
|
+
<style>
|
|
182
|
+
.console {
|
|
183
|
+
color: #ffffff;
|
|
184
|
+
width: 100%;
|
|
185
|
+
height: 100%;
|
|
186
|
+
min-height: 800px;
|
|
187
|
+
}
|
|
188
|
+
.console .console_cell {
|
|
189
|
+
border-right: 1px #ffffff solid;
|
|
190
|
+
height: calc(100% - 5px);
|
|
191
|
+
background-color: #303030;
|
|
192
|
+
}
|
|
193
|
+
.console .panel {
|
|
194
|
+
min-height: 500px;
|
|
195
|
+
height: calc(100% - 55px);
|
|
196
|
+
padding: 10px;
|
|
197
|
+
overflow: auto;
|
|
198
|
+
}
|
|
199
|
+
.console .info {
|
|
200
|
+
font-size: 13px;
|
|
201
|
+
line-height: 18px;
|
|
202
|
+
color: #ffffff;
|
|
203
|
+
}
|
|
204
|
+
</style>
|
|
205
|
+
@/libs/util
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-badge
|
|
3
|
-
class="error-store"
|
|
4
|
-
:value="countComputed"
|
|
5
|
-
@click="openErrorLoggerPage">
|
|
6
|
-
<i class="iconfont icon-error"></i>
|
|
7
|
-
</el-badge>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
name: "ErrorStore",
|
|
13
|
-
props: {
|
|
14
|
-
count: {
|
|
15
|
-
type: Number,
|
|
16
|
-
default: 0,
|
|
17
|
-
},
|
|
18
|
-
hasRead: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
startDebug: false,
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
computed: {
|
|
29
|
-
countComputed() {
|
|
30
|
-
return this.hasRead ? 0 : this.count;
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
methods: {
|
|
34
|
-
openErrorLoggerPage() {
|
|
35
|
-
let url = "system/startDebug";
|
|
36
|
-
if (!this.startDebug) {
|
|
37
|
-
this.startDebug = true;
|
|
38
|
-
} else {
|
|
39
|
-
url = "system/stopDebug";
|
|
40
|
-
this.startDebug = false;
|
|
41
|
-
}
|
|
42
|
-
this.axios
|
|
43
|
-
.request({
|
|
44
|
-
url: url,
|
|
45
|
-
params: {},
|
|
46
|
-
method: "post",
|
|
47
|
-
})
|
|
48
|
-
.then((res) => {
|
|
49
|
-
this.$message.info(res.data.msg);
|
|
50
|
-
})
|
|
51
|
-
.catch((res) => {
|
|
52
|
-
// this.$message.error(res.data.msg);
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<style lang="less">
|
|
60
|
-
.error-store {
|
|
61
|
-
margin-right: 12px;
|
|
62
|
-
height: 32px;
|
|
63
|
-
line-height: 32px;
|
|
64
|
-
border: 0;
|
|
65
|
-
.ivu-badge-dot {
|
|
66
|
-
top: 20px;
|
|
67
|
-
}
|
|
68
|
-
.ivu-btn.ivu-btn-text {
|
|
69
|
-
padding: 2px 1px 6px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-badge
|
|
3
|
+
class="error-store"
|
|
4
|
+
:value="countComputed"
|
|
5
|
+
@click="openErrorLoggerPage">
|
|
6
|
+
<i class="iconfont icon-error"></i>
|
|
7
|
+
</el-badge>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: "ErrorStore",
|
|
13
|
+
props: {
|
|
14
|
+
count: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0,
|
|
17
|
+
},
|
|
18
|
+
hasRead: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
startDebug: false,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
countComputed() {
|
|
30
|
+
return this.hasRead ? 0 : this.count;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
openErrorLoggerPage() {
|
|
35
|
+
let url = "system/startDebug";
|
|
36
|
+
if (!this.startDebug) {
|
|
37
|
+
this.startDebug = true;
|
|
38
|
+
} else {
|
|
39
|
+
url = "system/stopDebug";
|
|
40
|
+
this.startDebug = false;
|
|
41
|
+
}
|
|
42
|
+
this.axios
|
|
43
|
+
.request({
|
|
44
|
+
url: url,
|
|
45
|
+
params: {},
|
|
46
|
+
method: "post",
|
|
47
|
+
})
|
|
48
|
+
.then((res) => {
|
|
49
|
+
this.$message.info(res.data.msg);
|
|
50
|
+
})
|
|
51
|
+
.catch((res) => {
|
|
52
|
+
// this.$message.error(res.data.msg);
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style lang="less">
|
|
60
|
+
.error-store {
|
|
61
|
+
margin-right: 12px;
|
|
62
|
+
height: 32px;
|
|
63
|
+
line-height: 32px;
|
|
64
|
+
border: 0;
|
|
65
|
+
.ivu-badge-dot {
|
|
66
|
+
top: 20px;
|
|
67
|
+
}
|
|
68
|
+
.ivu-btn.ivu-btn-text {
|
|
69
|
+
padding: 2px 1px 6px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ErrorStore from './error-store.vue'
|
|
2
|
-
export default ErrorStore
|
|
1
|
+
import ErrorStore from './error-store.vue'
|
|
2
|
+
export default ErrorStore
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="showFullScreenBtn"
|
|
4
|
-
class="full-screen-btn-con"
|
|
5
|
-
@click.native="handleChange"
|
|
6
|
-
>
|
|
7
|
-
<el-tooltip :content="ct('退出全屏')" placement="bottom">
|
|
8
|
-
<i v-show="isFullscreen" class="iconfont icon-fullscreen-exit"></i>
|
|
9
|
-
</el-tooltip>
|
|
10
|
-
<el-tooltip :content="ct('全屏')" placement="bottom">
|
|
11
|
-
<i v-show="!isFullscreen" class="iconfont icon-fullscreen"></i>
|
|
12
|
-
</el-tooltip>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup>
|
|
17
|
-
import { ref, onMounted } from "vue";
|
|
18
|
-
import { ct } from "yh-i18n";
|
|
19
|
-
const showFullScreenBtn = ref(window.navigator.userAgent.indexOf("MSIE") < 0);
|
|
20
|
-
const emits = defineEmits(["change"]);
|
|
21
|
-
|
|
22
|
-
const isFullscreen = ref(false);
|
|
23
|
-
function handleFullscreen() {
|
|
24
|
-
let main = document.body;
|
|
25
|
-
let flag = document.fullscreenElement !== null;
|
|
26
|
-
if (flag) {
|
|
27
|
-
document.exitFullscreen();
|
|
28
|
-
isFullscreen.value = false;
|
|
29
|
-
} else {
|
|
30
|
-
main.requestFullscreen();
|
|
31
|
-
isFullscreen.value = true;
|
|
32
|
-
}
|
|
33
|
-
emits("change", isFullscreen.value);
|
|
34
|
-
}
|
|
35
|
-
function handleChange() {
|
|
36
|
-
handleFullscreen();
|
|
37
|
-
}
|
|
38
|
-
onMounted(() => {
|
|
39
|
-
isFullscreen.value = document.fullscreenElement !== null;
|
|
40
|
-
emits("change", isFullscreen.value);
|
|
41
|
-
});
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<style lang="less">
|
|
45
|
-
.full-screen-btn-con {
|
|
46
|
-
width: var(--header-size);
|
|
47
|
-
height: 32px;
|
|
48
|
-
line-height: 32px;
|
|
49
|
-
border: 0;
|
|
50
|
-
text-align: center;
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
i {
|
|
53
|
-
font-size: 30px;
|
|
54
|
-
color: var(--el-color-white);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="showFullScreenBtn"
|
|
4
|
+
class="full-screen-btn-con"
|
|
5
|
+
@click.native="handleChange"
|
|
6
|
+
>
|
|
7
|
+
<el-tooltip :content="ct('退出全屏')" placement="bottom">
|
|
8
|
+
<i v-show="isFullscreen" class="iconfont icon-fullscreen-exit"></i>
|
|
9
|
+
</el-tooltip>
|
|
10
|
+
<el-tooltip :content="ct('全屏')" placement="bottom">
|
|
11
|
+
<i v-show="!isFullscreen" class="iconfont icon-fullscreen"></i>
|
|
12
|
+
</el-tooltip>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { ref, onMounted } from "vue";
|
|
18
|
+
import { ct } from "yh-i18n";
|
|
19
|
+
const showFullScreenBtn = ref(window.navigator.userAgent.indexOf("MSIE") < 0);
|
|
20
|
+
const emits = defineEmits(["change"]);
|
|
21
|
+
|
|
22
|
+
const isFullscreen = ref(false);
|
|
23
|
+
function handleFullscreen() {
|
|
24
|
+
let main = document.body;
|
|
25
|
+
let flag = document.fullscreenElement !== null;
|
|
26
|
+
if (flag) {
|
|
27
|
+
document.exitFullscreen();
|
|
28
|
+
isFullscreen.value = false;
|
|
29
|
+
} else {
|
|
30
|
+
main.requestFullscreen();
|
|
31
|
+
isFullscreen.value = true;
|
|
32
|
+
}
|
|
33
|
+
emits("change", isFullscreen.value);
|
|
34
|
+
}
|
|
35
|
+
function handleChange() {
|
|
36
|
+
handleFullscreen();
|
|
37
|
+
}
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
isFullscreen.value = document.fullscreenElement !== null;
|
|
40
|
+
emits("change", isFullscreen.value);
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="less">
|
|
45
|
+
.full-screen-btn-con {
|
|
46
|
+
width: var(--header-size);
|
|
47
|
+
height: 32px;
|
|
48
|
+
line-height: 32px;
|
|
49
|
+
border: 0;
|
|
50
|
+
text-align: center;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
i {
|
|
53
|
+
font-size: 30px;
|
|
54
|
+
color: var(--el-color-white);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Fullscreen from './fullscreen.vue'
|
|
2
|
-
export default Fullscreen
|
|
1
|
+
import Fullscreen from './fullscreen.vue'
|
|
2
|
+
export default Fullscreen
|