system-clients 3.2.4 → 3.2.5-rongcheng
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/.gradle/{3.5.1/file-changes → 4.4/fileChanges}/last-build.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
- package/package.json +1 -1
- package/src/components/Main.vue +621 -621
- package/src/components/server/Login.vue +625 -625
- package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
package/src/components/Main.vue
CHANGED
@@ -1,621 +1,621 @@
|
|
1
|
-
<template>
|
2
|
-
<div @click="hindsetting1()">
|
3
|
-
<!-- <div class="system-main" id="box" v-el:box v-if="!isManger">-->
|
4
|
-
<!-- <div class="system-logo" style="height: auto">-->
|
5
|
-
<!-- <img :src="imgs.logoimg" alt=""/>-->
|
6
|
-
<!-- <label>{{systemname}}</label>-->
|
7
|
-
<!-- <div class="system-logo-chi" >-->
|
8
|
-
<!-- <div v-if="userpane" class="auto system-logo-prompt" style="float: right">-->
|
9
|
-
<!-- <span>{{orgpathnames}}</span>-->
|
10
|
-
<!-- </div>-->
|
11
|
-
<!-- <!–<div class="system-logo-chi-img1" style="float: right" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()"></div>–>-->
|
12
|
-
<!-- <span style="float: right; padding-top: 2px" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()" class="system-logo-chi-span-1">{{$login.f.name}}</span>-->
|
13
|
-
<!-- <span style="border-left: 1px solid;float: right;padding-top: 2px" class="system-logo-chi-span-1"> <img src="../../static/newStyle/login-f.png" height="20" width="20"> </span>-->
|
14
|
-
<!-- <a href="index.html" onclick="return confirm('您确定要退出系统吗?');" style="float: right;padding-top: 2px">-->
|
15
|
-
<!-- <img src="../../static/newStyle/system-off.png" alt="" >-->
|
16
|
-
<!-- <span class="system-logo-chi-span-1">退出系统</span>-->
|
17
|
-
<!-- </a>-->
|
18
|
-
<!-- <div style="float: right" :class="{'dropstyle':setting,'dropstyle-1':!setting}">-->
|
19
|
-
<!-- <dropdown class="auto" >-->
|
20
|
-
<!-- <span data-toggle="dropdown" @click="hindsetting()" >-->
|
21
|
-
<!-- <img :src="srcsetting" alt=""><span>系统设置</span>-->
|
22
|
-
<!-- </span>-->
|
23
|
-
<!-- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up dropstyle-chi" >-->
|
24
|
-
<!-- <!– <li>系统信息及设置</li>–>-->
|
25
|
-
<!-- <li style="color: #ffffff;white-space: nowrap" @click="show=true">修改密码</li>-->
|
26
|
-
<!-- <li style="color: #ffffff;white-space: nowrap" @click="AddChangeMsgShow=true">系统版本</li>-->
|
27
|
-
<!-- </ul>-->
|
28
|
-
<!-- </dropdown>-->
|
29
|
-
<!-- </div>-->
|
30
|
-
|
31
|
-
<!-- </div>-->
|
32
|
-
<!-- </div>-->
|
33
|
-
<!-- <div class="system-left tree-flex" :class="{'system-left-1': !treeOrIcon}" id="top" v-el:top >-->
|
34
|
-
<!-- <div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >-->
|
35
|
-
<!-- <div class="span system-left-tree" >-->
|
36
|
-
<!-- <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" :treeOrIcon="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>-->
|
37
|
-
<!-- <!– <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>–>-->
|
38
|
-
<!-- </div>-->
|
39
|
-
<!-- </div>-->
|
40
|
-
<!-- <div class="system-foot-stretch" >-->
|
41
|
-
<!-- <a @click="changeShow()"><img src="../../static/images/lefticon/菜单伸缩.png" alt=""></a>-->
|
42
|
-
<!-- </div>-->
|
43
|
-
<!-- </div>-->
|
44
|
-
|
45
|
-
|
46
|
-
<!-- <div class="system-right" :class="{'system-right-1': !treeOrIcon}" id="bottom" v-el:bottom>-->
|
47
|
-
<!-- <div class="span">-->
|
48
|
-
<!-- <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>-->
|
49
|
-
<!-- <dynamic :comps='[]' :showup="true" :showhide="false" name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>-->
|
50
|
-
<!-- </div>-->
|
51
|
-
<!-- </div>-->
|
52
|
-
<!-- <div class="system-foot" v-el:bottom>-->
|
53
|
-
|
54
|
-
<!-- <div class="system-foot-box">-->
|
55
|
-
|
56
|
-
<!-- </div>-->
|
57
|
-
<!-- </div>-->
|
58
|
-
<!-- </div>-->
|
59
|
-
<div class='flex-row system-main' id="box" v-el:box v-if="!isManger">
|
60
|
-
<div class="auto " :class="{'login-operator1':$refs.mic.tabs.length === 0,'login-operator':$refs.mic.tabs.length != 0}">
|
61
|
-
<span>
|
62
|
-
<img
|
63
|
-
src="../assets/people.png" height="15" width="15">
|
64
|
-
登录人:</span>
|
65
|
-
<label>{{orgpathnames}}</label>
|
66
|
-
</div>
|
67
|
-
<div class="system-left tree-flex" :class="{'tree-flex-icon': !treeOrIcon}" id="top" v-el:top >
|
68
|
-
<div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >
|
69
|
-
<div class="span system-left-tree " style="height:85%">
|
70
|
-
<h3>{{systemname}}</h3>
|
71
|
-
<!-- <div class="span" style="margin-bottom:10px;padding-bottom:5px;padding-top:5px;flex: 1;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">-->
|
72
|
-
<left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>
|
73
|
-
<!--<!– <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>–>-->
|
74
|
-
</div>
|
75
|
-
|
76
|
-
<div class="tree-flex-footer">
|
77
|
-
<!-- <a @click="changeShow()"><img :src="imgs.open" alt=""><span v-if="treeOrIcon">菜单伸缩</span></a>-->
|
78
|
-
<!-- <a><img src="../../../static/treeset.png" alt="">系统设置</a> -->
|
79
|
-
<dropdown class="auto">
|
80
|
-
<button type="button" data-toggle="dropdown">
|
81
|
-
<img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
|
82
|
-
</button>
|
83
|
-
<ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
|
84
|
-
<li>系统信息及设置</li>
|
85
|
-
<!-- <li>{{name}}</li> -->
|
86
|
-
<li>{{date}}</li>
|
87
|
-
<li @click="show=true">修改密码</li>
|
88
|
-
<li @click="AddChangeMsgShow=true">系统版本:1.0.0</li>
|
89
|
-
</ul>
|
90
|
-
|
91
|
-
</dropdown>
|
92
|
-
<a href="index.html" onclick="return confirm('您确定要退出系统吗?');">
|
93
|
-
<img :src="imgs.out" alt="" ><span v-if="treeOrIcon">退出系统</span>
|
94
|
-
</a>
|
95
|
-
</div>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
<!-- <div class="line" id="line" v-show="treeOrIcon" v-el:line></div> -->
|
99
|
-
|
100
|
-
<div class="flex right-bg system-right" id="bottom" v-el:bottom>
|
101
|
-
<!-- <operator-badge></operator-badge> -->
|
102
|
-
<div class="span">
|
103
|
-
<echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
|
104
|
-
<dynamic :comps='[]' name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
|
105
|
-
</div>
|
106
|
-
</div>
|
107
|
-
</div>
|
108
|
-
<div v-show="isManger">
|
109
|
-
<route v-ref:route></route>
|
110
|
-
</div>
|
111
|
-
|
112
|
-
<!-- 变更录入 模态框 -->
|
113
|
-
<add-changemsg :show="AddChangeMsgShow" v-on:toggle = "AddChangeMsgShow = false"></add-changemsg>
|
114
|
-
<!-- 修改密码组件 -->
|
115
|
-
<modify-pw :show.sync="show" v-if="show"></modify-pw>
|
116
|
-
<!-- 修改密码模态框 -->
|
117
|
-
</div>
|
118
|
-
</template>
|
119
|
-
|
120
|
-
<script>
|
121
|
-
import vue from 'vue'
|
122
|
-
import co from 'co'
|
123
|
-
|
124
|
-
window.onunload = () => {
|
125
|
-
vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
|
126
|
-
}
|
127
|
-
window.onbeforeunload = () => {
|
128
|
-
vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
|
129
|
-
}
|
130
|
-
export default {
|
131
|
-
title: '主界面',
|
132
|
-
props: ['functions', 'userid'],
|
133
|
-
data () {
|
134
|
-
return {
|
135
|
-
// 左侧树下部三个小图标
|
136
|
-
imgs: {
|
137
|
-
open: '/images/lefticon/菜单伸缩.png',
|
138
|
-
set: '/images/lefticon/系统设置.png',
|
139
|
-
out: '/images/lefticon/退出系统.png',
|
140
|
-
img1: '/images/newStyle/login-user.png',
|
141
|
-
logoimg: '/static/newStyle/fife.png'
|
142
|
-
// img2: '/images/lefticon/退出系统.png',
|
143
|
-
},
|
144
|
-
treeOrIcon: false,
|
145
|
-
isManger: false,
|
146
|
-
show: false,
|
147
|
-
orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
|
148
|
-
systemname: '客服系统',
|
149
|
-
date: this.$login.toStandardDateString(),
|
150
|
-
tabs:[], //已初始化页签数组
|
151
|
-
selecttab:'',
|
152
|
-
setting:true,
|
153
|
-
srcsetting:'../../static/newStyle/setting.png',
|
154
|
-
|
155
|
-
// headerHint: true, // 右侧顶部提示信息
|
156
|
-
// value: 25645.26,
|
157
|
-
// AddChangeMsgShow: false,
|
158
|
-
// showsum: false
|
159
|
-
lockReconnect: false, // 避免重复连接
|
160
|
-
timeout:
|
161
|
-
connectNumber:
|
162
|
-
timeoutObj: null,
|
163
|
-
serverTimeoutObj: null
|
164
|
-
}
|
165
|
-
},
|
166
|
-
ready () {
|
167
|
-
let component = this.$login.getUrlCompileParames('component')
|
168
|
-
if (component) {
|
169
|
-
this.isManger = true
|
170
|
-
this.$refs.route.init(component, {data: this.functions.functions})
|
171
|
-
}
|
172
|
-
if(this.$login.f.password == '1'){
|
173
|
-
this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
|
174
|
-
if(res == 'confirm')
|
175
|
-
this.show = true
|
176
|
-
})
|
177
|
-
}
|
178
|
-
console.log("系统名称",this.$appdata.getSingleValue("系统名称"))
|
179
|
-
this.systemname = this.$appdata.getSingleValue("系统名称")? this.$appdata.getSingleValue("系统名称"):'客服系统'
|
180
|
-
// let oBox = this.getElement("box")
|
181
|
-
// let oTop = this.getElement("top")
|
182
|
-
// let oBottom = this.getElement("bottom")
|
183
|
-
// let oLine = this.getElement("line")
|
184
|
-
// let that = this
|
185
|
-
// oLine.onmousedown = function(e) {
|
186
|
-
// let disX = (e || event).clientX
|
187
|
-
// oLine.left = oLine.offsetLeft
|
188
|
-
// document.onmousemove = function(e) {
|
189
|
-
// let iT = oLine.left + ((e || event).clientX - disX)
|
190
|
-
// var e = e || window.event
|
191
|
-
// let tarnameb = e.target || e.srcElement
|
192
|
-
// let maxT = oBox.clientWight - oLine.offsetWidth
|
193
|
-
// oLine.style.margin = 0
|
194
|
-
// iT < 0 && (iT = 0)
|
195
|
-
// iT > maxT && (iT = maxT)
|
196
|
-
// oLine.style.left = oTop.style.width = iT + "px"
|
197
|
-
// oBottom.style.width = oBox.clientWidth - iT + "px"
|
198
|
-
// that.$set('treeWidth', iT)
|
199
|
-
// return false
|
200
|
-
// }
|
201
|
-
// document.onmouseup = function() {
|
202
|
-
// document.onmousemove = null
|
203
|
-
// document.onmouseup = null
|
204
|
-
// oLine.releaseCapture && oLine.releaseCapture()
|
205
|
-
// }
|
206
|
-
// oLine.setCapture && oLine.setCapture()
|
207
|
-
// return false
|
208
|
-
// }
|
209
|
-
this.changeShow()
|
210
|
-
|
211
|
-
vue.prototype.$connectNumber = this.connectNumber
|
212
|
-
this.initWebSocket()
|
213
|
-
},
|
214
|
-
methods: {
|
215
|
-
// 清除
|
216
|
-
reset () {
|
217
|
-
clearTimeout(this.timeoutObj)
|
218
|
-
clearTimeout(this.serverTimeoutObj)
|
219
|
-
},
|
220
|
-
// 发送心跳
|
221
|
-
start () {
|
222
|
-
// 重置
|
223
|
-
vue.prototype.$connectNumber = this.connectNumber
|
224
|
-
this.timeoutObj = setTimeout(() => {
|
225
|
-
this.$socket.send('ping')
|
226
|
-
console.log('ping!')
|
227
|
-
this.serverTimeoutObj = setTimeout(() => {
|
228
|
-
this.$socket.close()
|
229
|
-
}, this.timeout)
|
230
|
-
}, this.timeout)
|
231
|
-
},
|
232
|
-
// 重连
|
233
|
-
reconnect () {
|
234
|
-
if (this.lockReconnect) return
|
235
|
-
if (this.$connectNumber <= 0) {
|
236
|
-
vue.showMessage('连接已断开,将无法接收消息,请重新登录', ['confirm']).then((res) => {
|
237
|
-
if (res === 'confirm') {
|
238
|
-
location.reload()
|
239
|
-
}
|
240
|
-
})
|
241
|
-
return
|
242
|
-
}
|
243
|
-
this.$connectNumber--
|
244
|
-
setTimeout(() => {
|
245
|
-
console.log('连接异常,尝试重新连接。。。。')
|
246
|
-
this.initWebSocket()
|
247
|
-
this.lockReconnect = false
|
248
|
-
}, 1000 * 60)
|
249
|
-
},
|
250
|
-
// 初始化
|
251
|
-
initWebSocket () {
|
252
|
-
let path = `ws://${location.host}/ws?token=${this.$login.f.id}`
|
253
|
-
try {
|
254
|
-
if ('WebSocket' in window) {
|
255
|
-
// 创建对象
|
256
|
-
vue.prototype.$socket = new WebSocket(path)
|
257
|
-
} else {
|
258
|
-
this.$showMessage('您的浏览器不支持websocket的协议,建议使用新版谷歌浏览器,请勿使用IE浏览器,360浏览器请使用极速模式,不要使用兼容模式!"')
|
259
|
-
}
|
260
|
-
} catch (e) {
|
261
|
-
this.reconnect()
|
262
|
-
}
|
263
|
-
|
264
|
-
this.$socket.onopen = this.onOpen // 连接成功
|
265
|
-
this.$socket.onmessage = this.onMessage // 收到消息时回调
|
266
|
-
this.$socket.onclose = this.onClose // 连接关闭时回调
|
267
|
-
this.$socket.onerror = this.onError // 通讯异常
|
268
|
-
},
|
269
|
-
// 通讯异常
|
270
|
-
onError () {
|
271
|
-
this.reconnect()
|
272
|
-
},
|
273
|
-
// 连接成功
|
274
|
-
onOpen () {
|
275
|
-
console.log('webSocket连接成功')
|
276
|
-
this.start()
|
277
|
-
},
|
278
|
-
// 收到消息时回调函数
|
279
|
-
onMessage (event) {
|
280
|
-
if (event.data === 'pong') {
|
281
|
-
this.reset()
|
282
|
-
this.start()
|
283
|
-
return
|
284
|
-
}
|
285
|
-
let data = JSON.parse(event.data)
|
286
|
-
this.$broadcast('onMessage', data)
|
287
|
-
this.$showMessage(data.message)
|
288
|
-
},
|
289
|
-
// 关闭连接时回调函数
|
290
|
-
onClose () {
|
291
|
-
console.log('webSocket连接断开')
|
292
|
-
this.reset()
|
293
|
-
this.reconnect()
|
294
|
-
},
|
295
|
-
hindsetting(){
|
296
|
-
|
297
|
-
this.setting=!this.setting
|
298
|
-
if(this.setting){
|
299
|
-
this.srcsetting='../../static/newStyle/setting.png'
|
300
|
-
}else {
|
301
|
-
this.srcsetting='../../static/newStyle/setting1.png'
|
302
|
-
}
|
303
|
-
|
304
|
-
},
|
305
|
-
hindsetting1(){
|
306
|
-
|
307
|
-
if(!this.setting){
|
308
|
-
this.srcsetting='../../static/newStyle/setting.png'
|
309
|
-
this.setting=true
|
310
|
-
}
|
311
|
-
|
312
|
-
},
|
313
|
-
isnodo(val){
|
314
|
-
console.log(val,'ss')
|
315
|
-
this.selecttab = val
|
316
|
-
},
|
317
|
-
unfurl () {
|
318
|
-
if(this.showsum){
|
319
|
-
this.showsum = false
|
320
|
-
} else {
|
321
|
-
this.showsum = true
|
322
|
-
}
|
323
|
-
},
|
324
|
-
// getElement(id) {
|
325
|
-
// return document.getElementById(id)
|
326
|
-
// },
|
327
|
-
changeShow () {
|
328
|
-
// this.treeOrIcon = !this.treeOrIcon
|
329
|
-
// let oBox = this.getElement("box")
|
330
|
-
// let oTop = this.getElement("top")
|
331
|
-
// let oBottom = this.getElement("bottom")
|
332
|
-
// let oLine = this.getElement("line")
|
333
|
-
// if (this.treeOrIcon) {
|
334
|
-
// // oLine.style.left = oTop.style.width = 300 + "px"
|
335
|
-
// oTop.style.width = 150 + "px"
|
336
|
-
// oBottom.style.width = oBox.clientWidth - 150 + "px"
|
337
|
-
// }else {
|
338
|
-
// oLine.style.left = oTop.style.width = 50 + "px"
|
339
|
-
// oBottom.style.width = oBox.clientWidth - 50 + "px"
|
340
|
-
// }
|
341
|
-
// }
|
342
|
-
this.treeOrIcon = !this.treeOrIcon
|
343
|
-
// if (this.treeOrIcon) {
|
344
|
-
// this.$els.top.style.width = 14 + "%"
|
345
|
-
// this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
|
346
|
-
// }else {
|
347
|
-
// this.$els.top.style.width = 8 + "%"
|
348
|
-
// this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
|
349
|
-
// }
|
350
|
-
},
|
351
|
-
changeMain(userid) {
|
352
|
-
this.$goto('res-main', {userid: this.userid}, 'self')
|
353
|
-
},
|
354
|
-
tabChange (name) {
|
355
|
-
console.log(name,'tabchanage')
|
356
|
-
this.selecttab = name
|
357
|
-
this.$refs.tree.changeSelect(name)
|
358
|
-
},
|
359
|
-
tabcg(val){
|
360
|
-
console.log(val)
|
361
|
-
this.tabs = val
|
362
|
-
}
|
363
|
-
},
|
364
|
-
computed: {
|
365
|
-
nowDate () {
|
366
|
-
return this.$login.getNowDate()
|
367
|
-
}
|
368
|
-
}
|
369
|
-
}
|
370
|
-
</script>
|
371
|
-
<style lang="less">
|
372
|
-
/* 组件内通用样式 */
|
373
|
-
.select-error {
|
374
|
-
button {
|
375
|
-
border-bottom: 1px solid #a94442!important;
|
376
|
-
}
|
377
|
-
}
|
378
|
-
// input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
|
379
|
-
// -webkit-appearance:textfield;
|
380
|
-
// }
|
381
|
-
/* 表单输入框组 */
|
382
|
-
.form-input-group {
|
383
|
-
display: flex;
|
384
|
-
|
385
|
-
label {
|
386
|
-
width: 100px;
|
387
|
-
text-align: right;
|
388
|
-
+ * {
|
389
|
-
flex: 1;
|
390
|
-
}
|
391
|
-
}
|
392
|
-
}
|
393
|
-
// 日期组件在表单中沾满
|
394
|
-
.form-horizontal .datepicker {
|
395
|
-
width: 100%;
|
396
|
-
}
|
397
|
-
// 下拉选择框占据剩余全部空间
|
398
|
-
.select-overspread {
|
399
|
-
.form-group {
|
400
|
-
// margin: 0px 5px 10px 0px;
|
401
|
-
.form-control {
|
402
|
-
margin-right: 0px;
|
403
|
-
}
|
404
|
-
}
|
405
|
-
.btn-group, .btn-group-vertical {
|
406
|
-
width: 100%;
|
407
|
-
// padding-right: 5px;
|
408
|
-
button {
|
409
|
-
width: 100%;
|
410
|
-
display: flex;
|
411
|
-
justify-content: space-between;
|
412
|
-
align-items: center;
|
413
|
-
}
|
414
|
-
}
|
415
|
-
.dropdown-menu {
|
416
|
-
width: 100%
|
417
|
-
}
|
418
|
-
}
|
419
|
-
// 需要特定宽度的的样式
|
420
|
-
.width-60 {
|
421
|
-
width: 60px;
|
422
|
-
}
|
423
|
-
.userpanel {
|
424
|
-
font-weight: 300;
|
425
|
-
color: #333;
|
426
|
-
position: fixed;
|
427
|
-
right: 30px;
|
428
|
-
top: 45px;
|
429
|
-
background-color: white;
|
430
|
-
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
|
431
|
-
padding: 4px 10px 4px 10px;
|
432
|
-
border-radius:2px;
|
433
|
-
}
|
434
|
-
.width-80 {
|
435
|
-
width: 80px;
|
436
|
-
}
|
437
|
-
.width-100 {
|
438
|
-
width: 100px;
|
439
|
-
}
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
/*右侧区域的背景*/
|
444
|
-
.right-bg {
|
445
|
-
width: 100%;
|
446
|
-
flex: 1;
|
447
|
-
color: #304A66;
|
448
|
-
}
|
449
|
-
.tree-flex {
|
450
|
-
height: 100%;
|
451
|
-
// width: 150px;
|
452
|
-
/*width: 60px;*/
|
453
|
-
background: #4a7cae;
|
454
|
-
color: #fff;
|
455
|
-
|
456
|
-
}
|
457
|
-
.tree-flex-icon {
|
458
|
-
width: 50px;
|
459
|
-
/*transition: 0.5s;*/
|
460
|
-
> .span {
|
461
|
-
overflow-x: visible;
|
462
|
-
}
|
463
|
-
}
|
464
|
-
.tree-flex h3 {
|
465
|
-
text-align: center;
|
466
|
-
margin: 1em 0;
|
467
|
-
}
|
468
|
-
|
469
|
-
.tree-flex-footer {
|
470
|
-
height: 50px;
|
471
|
-
display: flex;
|
472
|
-
flex-direction:column;
|
473
|
-
color: #fff;
|
474
|
-
}
|
475
|
-
.tree-flex-footer a,.tree-flex-footer button{
|
476
|
-
flex: 1;
|
477
|
-
padding: 8px 5px;
|
478
|
-
font-size: 1.2em;
|
479
|
-
// border-top: 1px solid #697D93;
|
480
|
-
border-top: 1px solid #4a7cae;
|
481
|
-
text-decoration: none;
|
482
|
-
color: #fff;
|
483
|
-
cursor: pointer;
|
484
|
-
}
|
485
|
-
.tree-flex-footer button {
|
486
|
-
height: auto;
|
487
|
-
width: 100%;
|
488
|
-
border-radius: 0px;
|
489
|
-
background-color: rgba(255,255,255,0);
|
490
|
-
border: none;
|
491
|
-
border-top: 1px solid #4a7cae;
|
492
|
-
// border-top: 1px solid #697D93;
|
493
|
-
text-align: left;
|
494
|
-
}
|
495
|
-
.tree-flex-footer button:hover{
|
496
|
-
outline: none;
|
497
|
-
background-color: rgba(255,255,255,0.2);
|
498
|
-
}
|
499
|
-
.tree-flex-footer button:focus {
|
500
|
-
outline: none;
|
501
|
-
background-color: rgba(255,255,255,0.5);
|
502
|
-
}
|
503
|
-
.tree-flex-footer a:hover {
|
504
|
-
color: #FFF;
|
505
|
-
background-color: rgba(255,255,255,0.2);
|
506
|
-
}
|
507
|
-
.tree-flex .btn-group {
|
508
|
-
height: 50px!important;
|
509
|
-
}
|
510
|
-
|
511
|
-
.tree-flex .dropdown-menu {
|
512
|
-
/* 控制显示列表的样式 */
|
513
|
-
background: #4a7cae;
|
514
|
-
border-radius: 0px;
|
515
|
-
color: #fff;
|
516
|
-
width: auto;
|
517
|
-
margin: 0px;
|
518
|
-
padding: 0px;
|
519
|
-
}
|
520
|
-
.tree-flex .dropdown-menu-up {
|
521
|
-
/* bottom,top控制上下,left和right控制左右*/
|
522
|
-
left: 100%!important;
|
523
|
-
top: auto!important;
|
524
|
-
bottom: 0;
|
525
|
-
}
|
526
|
-
.tree-flex .dropdown-menu-down {
|
527
|
-
/* bottom,top控制上下,left和right控制左右*/
|
528
|
-
left: 100%!important;
|
529
|
-
top: 0!important;
|
530
|
-
}
|
531
|
-
.tree-flex .dropdown-menu li{
|
532
|
-
text-align: center;
|
533
|
-
line-height: 50px;
|
534
|
-
border-bottom: 1px solid #697D93;
|
535
|
-
font-size: 1.2em;
|
536
|
-
width: auto;
|
537
|
-
white-space: nowrap;
|
538
|
-
cursor: default;
|
539
|
-
|
540
|
-
}
|
541
|
-
.tree-flex .dropdown-menu li + li {
|
542
|
-
text-align: left;
|
543
|
-
border: 0;
|
544
|
-
line-height: 40px;
|
545
|
-
padding-left: 15px;
|
546
|
-
padding-right: 15px;
|
547
|
-
font-size: 1em;
|
548
|
-
cursor: pointer;
|
549
|
-
}
|
550
|
-
.tree-flex .dropdown-menu li + li:hover {
|
551
|
-
background-color: rgba(255,255,255,0.2);
|
552
|
-
}
|
553
|
-
.tree-flex .dropdown-menu li a {
|
554
|
-
border: none;
|
555
|
-
color: #fff;
|
556
|
-
height: 40px;
|
557
|
-
line-height: 40px;
|
558
|
-
font-size: 1em;
|
559
|
-
padding: 0px;
|
560
|
-
}
|
561
|
-
.tree-flex .dropdown-menu li a:hover {
|
562
|
-
color: #fff;
|
563
|
-
background-color: rgba(255,255,255,0);
|
564
|
-
}
|
565
|
-
.tree-flex img{
|
566
|
-
height: 1.2em;
|
567
|
-
width: 1.2em;
|
568
|
-
margin-right: 15px;
|
569
|
-
margin-left: 5px;
|
570
|
-
}
|
571
|
-
.line {
|
572
|
-
height: 100%;
|
573
|
-
width: 5px;
|
574
|
-
background: #4C637B;
|
575
|
-
cursor: e-resize;
|
576
|
-
}
|
577
|
-
/*为树(tree)组件写的样式*/
|
578
|
-
.tree-img {
|
579
|
-
font-size: 1.2em;
|
580
|
-
}
|
581
|
-
|
582
|
-
/*将较长信息截断显示,鼠标悬停显示全部信息*/
|
583
|
-
.cutout50 {
|
584
|
-
max-width: 50px;
|
585
|
-
overflow:hidden;
|
586
|
-
text-overflow: ellipsis;
|
587
|
-
white-space: nowrap;
|
588
|
-
}
|
589
|
-
|
590
|
-
/* 滚动条样式 */
|
591
|
-
/*---滚动条默认显示样式--*/
|
592
|
-
::-webkit-scrollbar-thumb{
|
593
|
-
// display: none;
|
594
|
-
background-color:rgba(0,0,0,0.4);
|
595
|
-
/*background-color:red;*/
|
596
|
-
height:50px;
|
597
|
-
outline-offset:-2px;
|
598
|
-
/*outline:2px solid #fff;*/
|
599
|
-
-webkit-border-radius:4px;
|
600
|
-
/*border: 2px solid #fff;*/
|
601
|
-
}
|
602
|
-
|
603
|
-
/*---鼠标点击滚动条显示样式--*/
|
604
|
-
::-webkit-scrollbar-thumb:hover{
|
605
|
-
// display: inherit;
|
606
|
-
background-color:rgba(0,0,0,0.4);
|
607
|
-
height:50px;
|
608
|
-
-webkit-border-radius:4px;
|
609
|
-
}
|
610
|
-
/*---滚动条大小--*/
|
611
|
-
::-webkit-scrollbar{
|
612
|
-
width:8px;
|
613
|
-
height:8px;
|
614
|
-
}
|
615
|
-
/*---滚动框背景样式--*/
|
616
|
-
::-webkit-scrollbar-track-piece{
|
617
|
-
/* 全透明,不显示 */
|
618
|
-
background-color:rgba(255,255,255,0);
|
619
|
-
-webkit-border-radius:0;
|
620
|
-
}
|
621
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div @click="hindsetting1()">
|
3
|
+
<!-- <div class="system-main" id="box" v-el:box v-if="!isManger">-->
|
4
|
+
<!-- <div class="system-logo" style="height: auto">-->
|
5
|
+
<!-- <img :src="imgs.logoimg" alt=""/>-->
|
6
|
+
<!-- <label>{{systemname}}</label>-->
|
7
|
+
<!-- <div class="system-logo-chi" >-->
|
8
|
+
<!-- <div v-if="userpane" class="auto system-logo-prompt" style="float: right">-->
|
9
|
+
<!-- <span>{{orgpathnames}}</span>-->
|
10
|
+
<!-- </div>-->
|
11
|
+
<!-- <!–<div class="system-logo-chi-img1" style="float: right" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()"></div>–>-->
|
12
|
+
<!-- <span style="float: right; padding-top: 2px" @mouseenter="mouseenteruser()" @mouseleave="mouseleaveuser()" class="system-logo-chi-span-1">{{$login.f.name}}</span>-->
|
13
|
+
<!-- <span style="border-left: 1px solid;float: right;padding-top: 2px" class="system-logo-chi-span-1"> <img src="../../static/newStyle/login-f.png" height="20" width="20"> </span>-->
|
14
|
+
<!-- <a href="index.html" onclick="return confirm('您确定要退出系统吗?');" style="float: right;padding-top: 2px">-->
|
15
|
+
<!-- <img src="../../static/newStyle/system-off.png" alt="" >-->
|
16
|
+
<!-- <span class="system-logo-chi-span-1">退出系统</span>-->
|
17
|
+
<!-- </a>-->
|
18
|
+
<!-- <div style="float: right" :class="{'dropstyle':setting,'dropstyle-1':!setting}">-->
|
19
|
+
<!-- <dropdown class="auto" >-->
|
20
|
+
<!-- <span data-toggle="dropdown" @click="hindsetting()" >-->
|
21
|
+
<!-- <img :src="srcsetting" alt=""><span>系统设置</span>-->
|
22
|
+
<!-- </span>-->
|
23
|
+
<!-- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up dropstyle-chi" >-->
|
24
|
+
<!-- <!– <li>系统信息及设置</li>–>-->
|
25
|
+
<!-- <li style="color: #ffffff;white-space: nowrap" @click="show=true">修改密码</li>-->
|
26
|
+
<!-- <li style="color: #ffffff;white-space: nowrap" @click="AddChangeMsgShow=true">系统版本</li>-->
|
27
|
+
<!-- </ul>-->
|
28
|
+
<!-- </dropdown>-->
|
29
|
+
<!-- </div>-->
|
30
|
+
|
31
|
+
<!-- </div>-->
|
32
|
+
<!-- </div>-->
|
33
|
+
<!-- <div class="system-left tree-flex" :class="{'system-left-1': !treeOrIcon}" id="top" v-el:top >-->
|
34
|
+
<!-- <div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >-->
|
35
|
+
<!-- <div class="span system-left-tree" >-->
|
36
|
+
<!-- <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" :treeOrIcon="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>-->
|
37
|
+
<!-- <!– <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>–>-->
|
38
|
+
<!-- </div>-->
|
39
|
+
<!-- </div>-->
|
40
|
+
<!-- <div class="system-foot-stretch" >-->
|
41
|
+
<!-- <a @click="changeShow()"><img src="../../static/images/lefticon/菜单伸缩.png" alt=""></a>-->
|
42
|
+
<!-- </div>-->
|
43
|
+
<!-- </div>-->
|
44
|
+
|
45
|
+
|
46
|
+
<!-- <div class="system-right" :class="{'system-right-1': !treeOrIcon}" id="bottom" v-el:bottom>-->
|
47
|
+
<!-- <div class="span">-->
|
48
|
+
<!-- <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>-->
|
49
|
+
<!-- <dynamic :comps='[]' :showup="true" :showhide="false" name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>-->
|
50
|
+
<!-- </div>-->
|
51
|
+
<!-- </div>-->
|
52
|
+
<!-- <div class="system-foot" v-el:bottom>-->
|
53
|
+
|
54
|
+
<!-- <div class="system-foot-box">-->
|
55
|
+
|
56
|
+
<!-- </div>-->
|
57
|
+
<!-- </div>-->
|
58
|
+
<!-- </div>-->
|
59
|
+
<div class='flex-row system-main' id="box" v-el:box v-if="!isManger">
|
60
|
+
<div class="auto " :class="{'login-operator1':$refs.mic.tabs.length === 0,'login-operator':$refs.mic.tabs.length != 0}">
|
61
|
+
<span>
|
62
|
+
<img
|
63
|
+
src="../assets/people.png" height="15" width="15">
|
64
|
+
登录人:</span>
|
65
|
+
<label>{{orgpathnames}}</label>
|
66
|
+
</div>
|
67
|
+
<div class="system-left tree-flex" :class="{'tree-flex-icon': !treeOrIcon}" id="top" v-el:top >
|
68
|
+
<div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}" >
|
69
|
+
<div class="span system-left-tree " style="height:85%">
|
70
|
+
<h3>{{systemname}}</h3>
|
71
|
+
<!-- <div class="span" style="margin-bottom:10px;padding-bottom:5px;padding-top:5px;flex: 1;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">-->
|
72
|
+
<left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon" :tabs="tabs" v-ref:tree></left-tree>
|
73
|
+
<!--<!– <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>–>-->
|
74
|
+
</div>
|
75
|
+
|
76
|
+
<div class="tree-flex-footer">
|
77
|
+
<!-- <a @click="changeShow()"><img :src="imgs.open" alt=""><span v-if="treeOrIcon">菜单伸缩</span></a>-->
|
78
|
+
<!-- <a><img src="../../../static/treeset.png" alt="">系统设置</a> -->
|
79
|
+
<dropdown class="auto">
|
80
|
+
<button type="button" data-toggle="dropdown">
|
81
|
+
<img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
|
82
|
+
</button>
|
83
|
+
<ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
|
84
|
+
<li>系统信息及设置</li>
|
85
|
+
<!-- <li>{{name}}</li> -->
|
86
|
+
<li>{{date}}</li>
|
87
|
+
<li @click="show=true">修改密码</li>
|
88
|
+
<li @click="AddChangeMsgShow=true">系统版本:1.0.0</li>
|
89
|
+
</ul>
|
90
|
+
|
91
|
+
</dropdown>
|
92
|
+
<a href="index.html" onclick="return confirm('您确定要退出系统吗?');">
|
93
|
+
<img :src="imgs.out" alt="" ><span v-if="treeOrIcon">退出系统</span>
|
94
|
+
</a>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<!-- <div class="line" id="line" v-show="treeOrIcon" v-el:line></div> -->
|
99
|
+
|
100
|
+
<div class="flex right-bg system-right" id="bottom" v-el:bottom>
|
101
|
+
<!-- <operator-badge></operator-badge> -->
|
102
|
+
<div class="span">
|
103
|
+
<echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
|
104
|
+
<dynamic :comps='[]' name='main' :selecttab.sync="selecttab" @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
<div v-show="isManger">
|
109
|
+
<route v-ref:route></route>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<!-- 变更录入 模态框 -->
|
113
|
+
<add-changemsg :show="AddChangeMsgShow" v-on:toggle = "AddChangeMsgShow = false"></add-changemsg>
|
114
|
+
<!-- 修改密码组件 -->
|
115
|
+
<modify-pw :show.sync="show" v-if="show"></modify-pw>
|
116
|
+
<!-- 修改密码模态框 -->
|
117
|
+
</div>
|
118
|
+
</template>
|
119
|
+
|
120
|
+
<script>
|
121
|
+
import vue from 'vue'
|
122
|
+
import co from 'co'
|
123
|
+
|
124
|
+
window.onunload = () => {
|
125
|
+
vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
|
126
|
+
}
|
127
|
+
window.onbeforeunload = () => {
|
128
|
+
vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
|
129
|
+
}
|
130
|
+
export default {
|
131
|
+
title: '主界面',
|
132
|
+
props: ['functions', 'userid'],
|
133
|
+
data () {
|
134
|
+
return {
|
135
|
+
// 左侧树下部三个小图标
|
136
|
+
imgs: {
|
137
|
+
open: '/images/lefticon/菜单伸缩.png',
|
138
|
+
set: '/images/lefticon/系统设置.png',
|
139
|
+
out: '/images/lefticon/退出系统.png',
|
140
|
+
img1: '/images/newStyle/login-user.png',
|
141
|
+
logoimg: '/static/newStyle/fife.png'
|
142
|
+
// img2: '/images/lefticon/退出系统.png',
|
143
|
+
},
|
144
|
+
treeOrIcon: false,
|
145
|
+
isManger: false,
|
146
|
+
show: false,
|
147
|
+
orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
|
148
|
+
systemname: '客服系统',
|
149
|
+
date: this.$login.toStandardDateString(),
|
150
|
+
tabs:[], //已初始化页签数组
|
151
|
+
selecttab:'',
|
152
|
+
setting:true,
|
153
|
+
srcsetting:'../../static/newStyle/setting.png',
|
154
|
+
|
155
|
+
// headerHint: true, // 右侧顶部提示信息
|
156
|
+
// value: 25645.26,
|
157
|
+
// AddChangeMsgShow: false,
|
158
|
+
// showsum: false
|
159
|
+
lockReconnect: false, // 避免重复连接
|
160
|
+
timeout: 100000, // 100秒发一次心跳
|
161
|
+
connectNumber: 150, // 重连次数
|
162
|
+
timeoutObj: null,
|
163
|
+
serverTimeoutObj: null
|
164
|
+
}
|
165
|
+
},
|
166
|
+
ready () {
|
167
|
+
let component = this.$login.getUrlCompileParames('component')
|
168
|
+
if (component) {
|
169
|
+
this.isManger = true
|
170
|
+
this.$refs.route.init(component, {data: this.functions.functions})
|
171
|
+
}
|
172
|
+
if(this.$login.f.password == '1'){
|
173
|
+
this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
|
174
|
+
if(res == 'confirm')
|
175
|
+
this.show = true
|
176
|
+
})
|
177
|
+
}
|
178
|
+
console.log("系统名称",this.$appdata.getSingleValue("系统名称"))
|
179
|
+
this.systemname = this.$appdata.getSingleValue("系统名称")? this.$appdata.getSingleValue("系统名称"):'客服系统'
|
180
|
+
// let oBox = this.getElement("box")
|
181
|
+
// let oTop = this.getElement("top")
|
182
|
+
// let oBottom = this.getElement("bottom")
|
183
|
+
// let oLine = this.getElement("line")
|
184
|
+
// let that = this
|
185
|
+
// oLine.onmousedown = function(e) {
|
186
|
+
// let disX = (e || event).clientX
|
187
|
+
// oLine.left = oLine.offsetLeft
|
188
|
+
// document.onmousemove = function(e) {
|
189
|
+
// let iT = oLine.left + ((e || event).clientX - disX)
|
190
|
+
// var e = e || window.event
|
191
|
+
// let tarnameb = e.target || e.srcElement
|
192
|
+
// let maxT = oBox.clientWight - oLine.offsetWidth
|
193
|
+
// oLine.style.margin = 0
|
194
|
+
// iT < 0 && (iT = 0)
|
195
|
+
// iT > maxT && (iT = maxT)
|
196
|
+
// oLine.style.left = oTop.style.width = iT + "px"
|
197
|
+
// oBottom.style.width = oBox.clientWidth - iT + "px"
|
198
|
+
// that.$set('treeWidth', iT)
|
199
|
+
// return false
|
200
|
+
// }
|
201
|
+
// document.onmouseup = function() {
|
202
|
+
// document.onmousemove = null
|
203
|
+
// document.onmouseup = null
|
204
|
+
// oLine.releaseCapture && oLine.releaseCapture()
|
205
|
+
// }
|
206
|
+
// oLine.setCapture && oLine.setCapture()
|
207
|
+
// return false
|
208
|
+
// }
|
209
|
+
this.changeShow()
|
210
|
+
|
211
|
+
vue.prototype.$connectNumber = this.connectNumber
|
212
|
+
// this.initWebSocket()
|
213
|
+
},
|
214
|
+
methods: {
|
215
|
+
// 清除
|
216
|
+
reset () {
|
217
|
+
clearTimeout(this.timeoutObj)
|
218
|
+
clearTimeout(this.serverTimeoutObj)
|
219
|
+
},
|
220
|
+
// 发送心跳
|
221
|
+
start () {
|
222
|
+
// 重置
|
223
|
+
vue.prototype.$connectNumber = this.connectNumber
|
224
|
+
this.timeoutObj = setTimeout(() => {
|
225
|
+
this.$socket.send('ping')
|
226
|
+
console.log('ping!')
|
227
|
+
this.serverTimeoutObj = setTimeout(() => {
|
228
|
+
this.$socket.close()
|
229
|
+
}, this.timeout)
|
230
|
+
}, this.timeout)
|
231
|
+
},
|
232
|
+
// 重连
|
233
|
+
reconnect () {
|
234
|
+
if (this.lockReconnect) return
|
235
|
+
if (this.$connectNumber <= 0) {
|
236
|
+
vue.showMessage('连接已断开,将无法接收消息,请重新登录', ['confirm']).then((res) => {
|
237
|
+
if (res === 'confirm') {
|
238
|
+
location.reload()
|
239
|
+
}
|
240
|
+
})
|
241
|
+
return
|
242
|
+
}
|
243
|
+
this.$connectNumber--
|
244
|
+
setTimeout(() => {
|
245
|
+
console.log('连接异常,尝试重新连接。。。。')
|
246
|
+
this.initWebSocket()
|
247
|
+
this.lockReconnect = false
|
248
|
+
}, 1000 * 60)
|
249
|
+
},
|
250
|
+
// 初始化
|
251
|
+
initWebSocket () {
|
252
|
+
let path = `ws://${location.host}/ws?token=${this.$login.f.id}`
|
253
|
+
try {
|
254
|
+
if ('WebSocket' in window) {
|
255
|
+
// 创建对象
|
256
|
+
vue.prototype.$socket = new WebSocket(path)
|
257
|
+
} else {
|
258
|
+
this.$showMessage('您的浏览器不支持websocket的协议,建议使用新版谷歌浏览器,请勿使用IE浏览器,360浏览器请使用极速模式,不要使用兼容模式!"')
|
259
|
+
}
|
260
|
+
} catch (e) {
|
261
|
+
this.reconnect()
|
262
|
+
}
|
263
|
+
|
264
|
+
this.$socket.onopen = this.onOpen // 连接成功
|
265
|
+
this.$socket.onmessage = this.onMessage // 收到消息时回调
|
266
|
+
this.$socket.onclose = this.onClose // 连接关闭时回调
|
267
|
+
this.$socket.onerror = this.onError // 通讯异常
|
268
|
+
},
|
269
|
+
// 通讯异常
|
270
|
+
onError () {
|
271
|
+
this.reconnect()
|
272
|
+
},
|
273
|
+
// 连接成功
|
274
|
+
onOpen () {
|
275
|
+
console.log('webSocket连接成功')
|
276
|
+
this.start()
|
277
|
+
},
|
278
|
+
// 收到消息时回调函数
|
279
|
+
onMessage (event) {
|
280
|
+
if (event.data === 'pong') {
|
281
|
+
this.reset()
|
282
|
+
this.start()
|
283
|
+
return
|
284
|
+
}
|
285
|
+
let data = JSON.parse(event.data)
|
286
|
+
this.$broadcast('onMessage', data)
|
287
|
+
this.$showMessage(data.message)
|
288
|
+
},
|
289
|
+
// 关闭连接时回调函数
|
290
|
+
onClose () {
|
291
|
+
console.log('webSocket连接断开')
|
292
|
+
this.reset()
|
293
|
+
this.reconnect()
|
294
|
+
},
|
295
|
+
hindsetting(){
|
296
|
+
|
297
|
+
this.setting=!this.setting
|
298
|
+
if(this.setting){
|
299
|
+
this.srcsetting='../../static/newStyle/setting.png'
|
300
|
+
}else {
|
301
|
+
this.srcsetting='../../static/newStyle/setting1.png'
|
302
|
+
}
|
303
|
+
|
304
|
+
},
|
305
|
+
hindsetting1(){
|
306
|
+
|
307
|
+
if(!this.setting){
|
308
|
+
this.srcsetting='../../static/newStyle/setting.png'
|
309
|
+
this.setting=true
|
310
|
+
}
|
311
|
+
|
312
|
+
},
|
313
|
+
isnodo(val){
|
314
|
+
console.log(val,'ss')
|
315
|
+
this.selecttab = val
|
316
|
+
},
|
317
|
+
unfurl () {
|
318
|
+
if(this.showsum){
|
319
|
+
this.showsum = false
|
320
|
+
} else {
|
321
|
+
this.showsum = true
|
322
|
+
}
|
323
|
+
},
|
324
|
+
// getElement(id) {
|
325
|
+
// return document.getElementById(id)
|
326
|
+
// },
|
327
|
+
changeShow () {
|
328
|
+
// this.treeOrIcon = !this.treeOrIcon
|
329
|
+
// let oBox = this.getElement("box")
|
330
|
+
// let oTop = this.getElement("top")
|
331
|
+
// let oBottom = this.getElement("bottom")
|
332
|
+
// let oLine = this.getElement("line")
|
333
|
+
// if (this.treeOrIcon) {
|
334
|
+
// // oLine.style.left = oTop.style.width = 300 + "px"
|
335
|
+
// oTop.style.width = 150 + "px"
|
336
|
+
// oBottom.style.width = oBox.clientWidth - 150 + "px"
|
337
|
+
// }else {
|
338
|
+
// oLine.style.left = oTop.style.width = 50 + "px"
|
339
|
+
// oBottom.style.width = oBox.clientWidth - 50 + "px"
|
340
|
+
// }
|
341
|
+
// }
|
342
|
+
this.treeOrIcon = !this.treeOrIcon
|
343
|
+
// if (this.treeOrIcon) {
|
344
|
+
// this.$els.top.style.width = 14 + "%"
|
345
|
+
// this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
|
346
|
+
// }else {
|
347
|
+
// this.$els.top.style.width = 8 + "%"
|
348
|
+
// this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
|
349
|
+
// }
|
350
|
+
},
|
351
|
+
changeMain(userid) {
|
352
|
+
this.$goto('res-main', {userid: this.userid}, 'self')
|
353
|
+
},
|
354
|
+
tabChange (name) {
|
355
|
+
console.log(name,'tabchanage')
|
356
|
+
this.selecttab = name
|
357
|
+
this.$refs.tree.changeSelect(name)
|
358
|
+
},
|
359
|
+
tabcg(val){
|
360
|
+
console.log(val)
|
361
|
+
this.tabs = val
|
362
|
+
}
|
363
|
+
},
|
364
|
+
computed: {
|
365
|
+
nowDate () {
|
366
|
+
return this.$login.getNowDate()
|
367
|
+
}
|
368
|
+
}
|
369
|
+
}
|
370
|
+
</script>
|
371
|
+
<style lang="less">
|
372
|
+
/* 组件内通用样式 */
|
373
|
+
.select-error {
|
374
|
+
button {
|
375
|
+
border-bottom: 1px solid #a94442!important;
|
376
|
+
}
|
377
|
+
}
|
378
|
+
// input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
|
379
|
+
// -webkit-appearance:textfield;
|
380
|
+
// }
|
381
|
+
/* 表单输入框组 */
|
382
|
+
.form-input-group {
|
383
|
+
display: flex;
|
384
|
+
|
385
|
+
label {
|
386
|
+
width: 100px;
|
387
|
+
text-align: right;
|
388
|
+
+ * {
|
389
|
+
flex: 1;
|
390
|
+
}
|
391
|
+
}
|
392
|
+
}
|
393
|
+
// 日期组件在表单中沾满
|
394
|
+
.form-horizontal .datepicker {
|
395
|
+
width: 100%;
|
396
|
+
}
|
397
|
+
// 下拉选择框占据剩余全部空间
|
398
|
+
.select-overspread {
|
399
|
+
.form-group {
|
400
|
+
// margin: 0px 5px 10px 0px;
|
401
|
+
.form-control {
|
402
|
+
margin-right: 0px;
|
403
|
+
}
|
404
|
+
}
|
405
|
+
.btn-group, .btn-group-vertical {
|
406
|
+
width: 100%;
|
407
|
+
// padding-right: 5px;
|
408
|
+
button {
|
409
|
+
width: 100%;
|
410
|
+
display: flex;
|
411
|
+
justify-content: space-between;
|
412
|
+
align-items: center;
|
413
|
+
}
|
414
|
+
}
|
415
|
+
.dropdown-menu {
|
416
|
+
width: 100%
|
417
|
+
}
|
418
|
+
}
|
419
|
+
// 需要特定宽度的的样式
|
420
|
+
.width-60 {
|
421
|
+
width: 60px;
|
422
|
+
}
|
423
|
+
.userpanel {
|
424
|
+
font-weight: 300;
|
425
|
+
color: #333;
|
426
|
+
position: fixed;
|
427
|
+
right: 30px;
|
428
|
+
top: 45px;
|
429
|
+
background-color: white;
|
430
|
+
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
|
431
|
+
padding: 4px 10px 4px 10px;
|
432
|
+
border-radius:2px;
|
433
|
+
}
|
434
|
+
.width-80 {
|
435
|
+
width: 80px;
|
436
|
+
}
|
437
|
+
.width-100 {
|
438
|
+
width: 100px;
|
439
|
+
}
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
/*右侧区域的背景*/
|
444
|
+
.right-bg {
|
445
|
+
width: 100%;
|
446
|
+
flex: 1;
|
447
|
+
color: #304A66;
|
448
|
+
}
|
449
|
+
.tree-flex {
|
450
|
+
height: 100%;
|
451
|
+
// width: 150px;
|
452
|
+
/*width: 60px;*/
|
453
|
+
background: #4a7cae;
|
454
|
+
color: #fff;
|
455
|
+
|
456
|
+
}
|
457
|
+
.tree-flex-icon {
|
458
|
+
width: 50px;
|
459
|
+
/*transition: 0.5s;*/
|
460
|
+
> .span {
|
461
|
+
overflow-x: visible;
|
462
|
+
}
|
463
|
+
}
|
464
|
+
.tree-flex h3 {
|
465
|
+
text-align: center;
|
466
|
+
margin: 1em 0;
|
467
|
+
}
|
468
|
+
|
469
|
+
.tree-flex-footer {
|
470
|
+
height: 50px;
|
471
|
+
display: flex;
|
472
|
+
flex-direction:column;
|
473
|
+
color: #fff;
|
474
|
+
}
|
475
|
+
.tree-flex-footer a,.tree-flex-footer button{
|
476
|
+
flex: 1;
|
477
|
+
padding: 8px 5px;
|
478
|
+
font-size: 1.2em;
|
479
|
+
// border-top: 1px solid #697D93;
|
480
|
+
border-top: 1px solid #4a7cae;
|
481
|
+
text-decoration: none;
|
482
|
+
color: #fff;
|
483
|
+
cursor: pointer;
|
484
|
+
}
|
485
|
+
.tree-flex-footer button {
|
486
|
+
height: auto;
|
487
|
+
width: 100%;
|
488
|
+
border-radius: 0px;
|
489
|
+
background-color: rgba(255,255,255,0);
|
490
|
+
border: none;
|
491
|
+
border-top: 1px solid #4a7cae;
|
492
|
+
// border-top: 1px solid #697D93;
|
493
|
+
text-align: left;
|
494
|
+
}
|
495
|
+
.tree-flex-footer button:hover{
|
496
|
+
outline: none;
|
497
|
+
background-color: rgba(255,255,255,0.2);
|
498
|
+
}
|
499
|
+
.tree-flex-footer button:focus {
|
500
|
+
outline: none;
|
501
|
+
background-color: rgba(255,255,255,0.5);
|
502
|
+
}
|
503
|
+
.tree-flex-footer a:hover {
|
504
|
+
color: #FFF;
|
505
|
+
background-color: rgba(255,255,255,0.2);
|
506
|
+
}
|
507
|
+
.tree-flex .btn-group {
|
508
|
+
height: 50px!important;
|
509
|
+
}
|
510
|
+
|
511
|
+
.tree-flex .dropdown-menu {
|
512
|
+
/* 控制显示列表的样式 */
|
513
|
+
background: #4a7cae;
|
514
|
+
border-radius: 0px;
|
515
|
+
color: #fff;
|
516
|
+
width: auto;
|
517
|
+
margin: 0px;
|
518
|
+
padding: 0px;
|
519
|
+
}
|
520
|
+
.tree-flex .dropdown-menu-up {
|
521
|
+
/* bottom,top控制上下,left和right控制左右*/
|
522
|
+
left: 100%!important;
|
523
|
+
top: auto!important;
|
524
|
+
bottom: 0;
|
525
|
+
}
|
526
|
+
.tree-flex .dropdown-menu-down {
|
527
|
+
/* bottom,top控制上下,left和right控制左右*/
|
528
|
+
left: 100%!important;
|
529
|
+
top: 0!important;
|
530
|
+
}
|
531
|
+
.tree-flex .dropdown-menu li{
|
532
|
+
text-align: center;
|
533
|
+
line-height: 50px;
|
534
|
+
border-bottom: 1px solid #697D93;
|
535
|
+
font-size: 1.2em;
|
536
|
+
width: auto;
|
537
|
+
white-space: nowrap;
|
538
|
+
cursor: default;
|
539
|
+
|
540
|
+
}
|
541
|
+
.tree-flex .dropdown-menu li + li {
|
542
|
+
text-align: left;
|
543
|
+
border: 0;
|
544
|
+
line-height: 40px;
|
545
|
+
padding-left: 15px;
|
546
|
+
padding-right: 15px;
|
547
|
+
font-size: 1em;
|
548
|
+
cursor: pointer;
|
549
|
+
}
|
550
|
+
.tree-flex .dropdown-menu li + li:hover {
|
551
|
+
background-color: rgba(255,255,255,0.2);
|
552
|
+
}
|
553
|
+
.tree-flex .dropdown-menu li a {
|
554
|
+
border: none;
|
555
|
+
color: #fff;
|
556
|
+
height: 40px;
|
557
|
+
line-height: 40px;
|
558
|
+
font-size: 1em;
|
559
|
+
padding: 0px;
|
560
|
+
}
|
561
|
+
.tree-flex .dropdown-menu li a:hover {
|
562
|
+
color: #fff;
|
563
|
+
background-color: rgba(255,255,255,0);
|
564
|
+
}
|
565
|
+
.tree-flex img{
|
566
|
+
height: 1.2em;
|
567
|
+
width: 1.2em;
|
568
|
+
margin-right: 15px;
|
569
|
+
margin-left: 5px;
|
570
|
+
}
|
571
|
+
.line {
|
572
|
+
height: 100%;
|
573
|
+
width: 5px;
|
574
|
+
background: #4C637B;
|
575
|
+
cursor: e-resize;
|
576
|
+
}
|
577
|
+
/*为树(tree)组件写的样式*/
|
578
|
+
.tree-img {
|
579
|
+
font-size: 1.2em;
|
580
|
+
}
|
581
|
+
|
582
|
+
/*将较长信息截断显示,鼠标悬停显示全部信息*/
|
583
|
+
.cutout50 {
|
584
|
+
max-width: 50px;
|
585
|
+
overflow:hidden;
|
586
|
+
text-overflow: ellipsis;
|
587
|
+
white-space: nowrap;
|
588
|
+
}
|
589
|
+
|
590
|
+
/* 滚动条样式 */
|
591
|
+
/*---滚动条默认显示样式--*/
|
592
|
+
::-webkit-scrollbar-thumb{
|
593
|
+
// display: none;
|
594
|
+
background-color:rgba(0,0,0,0.4);
|
595
|
+
/*background-color:red;*/
|
596
|
+
height:50px;
|
597
|
+
outline-offset:-2px;
|
598
|
+
/*outline:2px solid #fff;*/
|
599
|
+
-webkit-border-radius:4px;
|
600
|
+
/*border: 2px solid #fff;*/
|
601
|
+
}
|
602
|
+
|
603
|
+
/*---鼠标点击滚动条显示样式--*/
|
604
|
+
::-webkit-scrollbar-thumb:hover{
|
605
|
+
// display: inherit;
|
606
|
+
background-color:rgba(0,0,0,0.4);
|
607
|
+
height:50px;
|
608
|
+
-webkit-border-radius:4px;
|
609
|
+
}
|
610
|
+
/*---滚动条大小--*/
|
611
|
+
::-webkit-scrollbar{
|
612
|
+
width:8px;
|
613
|
+
height:8px;
|
614
|
+
}
|
615
|
+
/*---滚动框背景样式--*/
|
616
|
+
::-webkit-scrollbar-track-piece{
|
617
|
+
/* 全透明,不显示 */
|
618
|
+
background-color:rgba(255,255,255,0);
|
619
|
+
-webkit-border-radius:0;
|
620
|
+
}
|
621
|
+
</style>
|