system-clients 3.2.1-23 → 3.2.1-26

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