eoss-ui 0.5.11 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/button-group.js +215 -123
- package/lib/button.js +154 -74
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +154 -75
- package/lib/clients.js +2 -2
- package/lib/data-table-form.js +154 -75
- package/lib/data-table.js +192 -99
- package/lib/date-picker.js +159 -79
- package/lib/dialog.js +163 -84
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +357 -219
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +154 -74
- package/lib/flow-list.js +189 -84
- package/lib/flow.js +215 -119
- package/lib/form.js +247 -152
- package/lib/handle-user.js +155 -75
- package/lib/handler.js +154 -74
- package/lib/icons.js +4 -4
- package/lib/index.js +1 -1
- package/lib/input-number.js +154 -74
- package/lib/input.js +156 -76
- package/lib/label.js +5 -4
- package/lib/layout.js +4 -4
- package/lib/login.js +157 -78
- package/lib/main.js +203 -122
- package/lib/menu.js +2 -2
- package/lib/nav.js +154 -74
- package/lib/notify.js +2 -2
- package/lib/page.js +154 -74
- package/lib/pagination.js +2 -2
- package/lib/player.js +160 -80
- package/lib/qr-code.js +156 -76
- package/lib/radio-group.js +155 -75
- package/lib/retrial-auth.js +154 -74
- package/lib/select-ganged.js +154 -74
- package/lib/select.js +155 -75
- package/lib/selector-panel.js +155 -76
- package/lib/selector.js +156 -76
- package/lib/sizer.js +156 -76
- package/lib/steps.js +154 -74
- package/lib/switch.js +154 -74
- package/lib/table-form.js +156 -76
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +159 -79
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/nav.css +1 -1
- package/lib/tips.js +154 -74
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +154 -74
- package/lib/tree.js +154 -74
- package/lib/upload.js +157 -78
- package/lib/utils/util.js +8 -61
- package/lib/utils/webSocket.js +131 -0
- package/lib/wujie.js +154 -74
- package/lib/wxlogin.js +154 -74
- package/package.json +1 -1
- package/packages/data-table/src/column copy.vue +977 -0
- package/packages/data-table/src/main copy.vue +1325 -0
- package/packages/data-table/src/main.vue +31 -8
- package/packages/data-table/src/sizer.vue +1 -1
- package/packages/flow/src/component/taskUnionExamine.vue +1 -1
- package/packages/flow/src/main.vue +3 -1
- package/packages/flow/src/processForm.vue +24 -10
- package/packages/flow/src/processReject.vue +1 -1
- package/packages/flow/src/startTaskRead.vue +1 -1
- package/packages/flow-list/src/main.vue +25 -2
- package/packages/label/src/main.vue +3 -2
- package/packages/main/src/main.vue +19 -18
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/nav.css +1 -1
- package/packages/theme-chalk/src/nav.scss +21 -2
- package/src/index.js +1 -1
- package/src/utils/util.js +29 -81
- package/src/utils/webSocket.js +100 -0
|
@@ -415,7 +415,13 @@ export default {
|
|
|
415
415
|
type: Boolean,
|
|
416
416
|
default: true
|
|
417
417
|
},
|
|
418
|
-
zoom: false
|
|
418
|
+
zoom: false,
|
|
419
|
+
exportExcludeLabel: {
|
|
420
|
+
type: Array,
|
|
421
|
+
default() {
|
|
422
|
+
return [];
|
|
423
|
+
}
|
|
424
|
+
}
|
|
419
425
|
},
|
|
420
426
|
data() {
|
|
421
427
|
return {
|
|
@@ -451,8 +457,8 @@ export default {
|
|
|
451
457
|
},
|
|
452
458
|
theads: {
|
|
453
459
|
get() {
|
|
454
|
-
if (
|
|
455
|
-
this.
|
|
460
|
+
if (this.theadData.length) {
|
|
461
|
+
this.setMinWidth(this.theadData);
|
|
456
462
|
return this.theadData;
|
|
457
463
|
}
|
|
458
464
|
this.setMinWidth(this.thead);
|
|
@@ -581,6 +587,11 @@ export default {
|
|
|
581
587
|
this.config = util.extend({}, this.config, this.page);
|
|
582
588
|
}
|
|
583
589
|
},
|
|
590
|
+
'config.pageNum'() {
|
|
591
|
+
if (this.data.length) {
|
|
592
|
+
this.$refs.oaTable.resetScroll(0, 0);
|
|
593
|
+
}
|
|
594
|
+
},
|
|
584
595
|
height: {
|
|
585
596
|
immediate: true,
|
|
586
597
|
handler(val) {
|
|
@@ -822,10 +833,16 @@ export default {
|
|
|
822
833
|
this.config.pageNum = 1;
|
|
823
834
|
}
|
|
824
835
|
this.tableLoadingText = '加载中...';
|
|
825
|
-
let reqData = util.extend(
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
836
|
+
let reqData = util.extend(
|
|
837
|
+
{},
|
|
838
|
+
this.param,
|
|
839
|
+
this.page
|
|
840
|
+
? {
|
|
841
|
+
pageNum: this.config.pageNum,
|
|
842
|
+
pageSize: this.config.pageSize
|
|
843
|
+
}
|
|
844
|
+
: {}
|
|
845
|
+
);
|
|
829
846
|
if (where) {
|
|
830
847
|
reqData = util.extend({}, reqData, where);
|
|
831
848
|
}
|
|
@@ -841,6 +858,7 @@ export default {
|
|
|
841
858
|
.then((res) => {
|
|
842
859
|
this.tableLoading = false;
|
|
843
860
|
if (res.rCode === 0 || res.status === 'success') {
|
|
861
|
+
this.$refs.oaTable.resetScroll(0, 0);
|
|
844
862
|
let results =
|
|
845
863
|
this.parseData !== undefined
|
|
846
864
|
? this.parseData(res.results || res.data || res)
|
|
@@ -1153,9 +1171,14 @@ export default {
|
|
|
1153
1171
|
) {
|
|
1154
1172
|
text = this.theads[this.theads.length - 1].title;
|
|
1155
1173
|
}
|
|
1174
|
+
let type = ['selection', 'index', 'expand'];
|
|
1156
1175
|
thead = thead.map((item) => {
|
|
1157
1176
|
return item.filter((ele) => {
|
|
1158
|
-
return
|
|
1177
|
+
return (
|
|
1178
|
+
!type.includes(ele.type) &&
|
|
1179
|
+
ele.label !== text &&
|
|
1180
|
+
!this.exportExcludeLabel.includes(ele.label)
|
|
1181
|
+
);
|
|
1159
1182
|
});
|
|
1160
1183
|
});
|
|
1161
1184
|
util.exportXls({
|
|
@@ -307,6 +307,7 @@
|
|
|
307
307
|
:multiple="true"
|
|
308
308
|
:selectUserList="selectReadUserList"
|
|
309
309
|
:options="userOptions"
|
|
310
|
+
title="分阅用户"
|
|
310
311
|
:mix="true"
|
|
311
312
|
:types="types"
|
|
312
313
|
@change="changeSelectReadUser($event, 'nextReadUserId')"
|
|
@@ -327,6 +328,7 @@
|
|
|
327
328
|
:options="presetOptions"
|
|
328
329
|
:radioList="presetReadUserId"
|
|
329
330
|
:presetEdit="1"
|
|
331
|
+
title="分阅用户"
|
|
330
332
|
:mix="true"
|
|
331
333
|
:types="types"
|
|
332
334
|
@change="changeSelectReadUser($event, 'presetReadUserId')"
|
|
@@ -1195,7 +1197,7 @@ export default {
|
|
|
1195
1197
|
util
|
|
1196
1198
|
.ajax({
|
|
1197
1199
|
url: findCodeValues,
|
|
1198
|
-
params: { ccCode: 'notification_type' }
|
|
1200
|
+
params: { ccCode: 'notification_type',userId:util.getStorage('userId') }
|
|
1199
1201
|
})
|
|
1200
1202
|
.then((res) => {
|
|
1201
1203
|
const { status, data } = res;
|
|
@@ -145,6 +145,7 @@
|
|
|
145
145
|
:multiple="true"
|
|
146
146
|
:selectUserList="selectReadUserList"
|
|
147
147
|
:options="userOptions"
|
|
148
|
+
title="分阅用户"
|
|
148
149
|
:mix="true"
|
|
149
150
|
:types="types"
|
|
150
151
|
@change="changeSelectReadUser($event, 'nextReadUserId')"
|
|
@@ -163,6 +164,7 @@
|
|
|
163
164
|
:multiple="true"
|
|
164
165
|
:selectUserList="selectPresetUserList"
|
|
165
166
|
:options="presetOptions"
|
|
167
|
+
title="分阅用户"
|
|
166
168
|
:radioList="presetReadUserId"
|
|
167
169
|
:presetEdit="1"
|
|
168
170
|
:mix="true"
|
|
@@ -181,10 +183,7 @@
|
|
|
181
183
|
v-model="nextNode.handleExplain"
|
|
182
184
|
/>
|
|
183
185
|
</el-form-item>
|
|
184
|
-
<el-form-item
|
|
185
|
-
prop="noticeType"
|
|
186
|
-
label="通知方式"
|
|
187
|
-
>
|
|
186
|
+
<el-form-item prop="noticeType" label="通知方式">
|
|
188
187
|
<el-checkbox-group v-model="nextNode.noticeType">
|
|
189
188
|
<el-checkbox
|
|
190
189
|
v-for="item of nextNode.noticeList"
|
|
@@ -331,11 +330,17 @@ export default {
|
|
|
331
330
|
tabs: {
|
|
332
331
|
employee: {
|
|
333
332
|
param: {
|
|
334
|
-
filid: sessionStorage.getItem('
|
|
333
|
+
filid: JSON.parse(sessionStorage.getItem('mainConfig')).userModel
|
|
334
|
+
.orgId,
|
|
335
335
|
name: '本单位用户'
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
|
-
department: {
|
|
338
|
+
department: {
|
|
339
|
+
param: {
|
|
340
|
+
filid: JSON.parse(sessionStorage.getItem('mainConfig')).userModel
|
|
341
|
+
.orgId
|
|
342
|
+
}
|
|
343
|
+
}
|
|
339
344
|
},
|
|
340
345
|
nextUserTabs: {},
|
|
341
346
|
selectPresetUserList: [],
|
|
@@ -383,7 +388,6 @@ export default {
|
|
|
383
388
|
mounted() {
|
|
384
389
|
this.getStartFlow(this.processDefinitionId);
|
|
385
390
|
this.newOpinion = this.opinion;
|
|
386
|
-
|
|
387
391
|
},
|
|
388
392
|
methods: {
|
|
389
393
|
getIsShowNextUser(val) {
|
|
@@ -401,7 +405,12 @@ export default {
|
|
|
401
405
|
if (val == 7 || val == 8) {
|
|
402
406
|
this.nextUserTypes = ['department'];
|
|
403
407
|
this.nextUserTabs = {
|
|
404
|
-
department: {
|
|
408
|
+
department: {
|
|
409
|
+
param: {
|
|
410
|
+
filid: JSON.parse(sessionStorage.getItem('mainConfig'))
|
|
411
|
+
.userModel.orgId
|
|
412
|
+
}
|
|
413
|
+
}
|
|
405
414
|
};
|
|
406
415
|
this.multiple = true;
|
|
407
416
|
} else if (val == 9 || val == 10) {
|
|
@@ -412,7 +421,12 @@ export default {
|
|
|
412
421
|
this.nextUserTypes = ['department', 'enterprise'];
|
|
413
422
|
this.nextUserTabs = {
|
|
414
423
|
enterprise: { param: { filid: 'other' } },
|
|
415
|
-
department: {
|
|
424
|
+
department: {
|
|
425
|
+
param: {
|
|
426
|
+
filid: JSON.parse(sessionStorage.getItem('mainConfig'))
|
|
427
|
+
.userModel.orgId
|
|
428
|
+
}
|
|
429
|
+
}
|
|
416
430
|
};
|
|
417
431
|
this.multiple = true;
|
|
418
432
|
}
|
|
@@ -468,7 +482,7 @@ export default {
|
|
|
468
482
|
util
|
|
469
483
|
.ajax({
|
|
470
484
|
url: findCodeValues,
|
|
471
|
-
params: { ccCode: 'notification_type' }
|
|
485
|
+
params: { ccCode: 'notification_type',userId:util.getStorage('userId') }
|
|
472
486
|
})
|
|
473
487
|
.then((res) => {
|
|
474
488
|
const { status, data } = res;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
(item.type == 'splitReading' &&
|
|
9
9
|
splitReadingData &&
|
|
10
10
|
splitReadingData.length > 0) ||
|
|
11
|
-
(item.type == 'preset' && presetData && presetData.length > 0) ||
|
|
11
|
+
(item.type == 'preset' && presetData && presetData.length > 0 && currentUserHasPresetInfoAuth) ||
|
|
12
12
|
(item.type != 'splitReading' && item.type != 'preset')
|
|
13
13
|
"
|
|
14
14
|
>
|
|
@@ -128,6 +128,7 @@ export default {
|
|
|
128
128
|
pressTableList: [],
|
|
129
129
|
currentPage: 1,
|
|
130
130
|
pageSize: 20,
|
|
131
|
+
currentUserHasPresetInfoAuth:false,
|
|
131
132
|
pressThead: [
|
|
132
133
|
{
|
|
133
134
|
title: '催办节点',
|
|
@@ -320,6 +321,7 @@ export default {
|
|
|
320
321
|
label: '经办部门',
|
|
321
322
|
field: 'deptid',
|
|
322
323
|
align: 'center',
|
|
324
|
+
key:'jbbm',
|
|
323
325
|
showOverflowTooltip: true,
|
|
324
326
|
width: 150
|
|
325
327
|
},
|
|
@@ -327,6 +329,7 @@ export default {
|
|
|
327
329
|
label: '步骤',
|
|
328
330
|
field: 'itemname',
|
|
329
331
|
align: 'center',
|
|
332
|
+
key:'bz',
|
|
330
333
|
showOverflowTooltip: true,
|
|
331
334
|
width: 110
|
|
332
335
|
},
|
|
@@ -334,6 +337,7 @@ export default {
|
|
|
334
337
|
label: '办理人',
|
|
335
338
|
field: 'userName',
|
|
336
339
|
align: 'center',
|
|
340
|
+
key:'blr',
|
|
337
341
|
showOverflowTooltip: true,
|
|
338
342
|
width: 110
|
|
339
343
|
},
|
|
@@ -342,11 +346,13 @@ export default {
|
|
|
342
346
|
field: 'deptName',
|
|
343
347
|
align: 'center',
|
|
344
348
|
showOverflowTooltip: true,
|
|
349
|
+
key:'blrbm',
|
|
345
350
|
width: 110
|
|
346
351
|
},
|
|
347
352
|
{
|
|
348
353
|
label: '状态',
|
|
349
354
|
field: 'pendstate',
|
|
355
|
+
key:'zt',
|
|
350
356
|
align: 'center',
|
|
351
357
|
showOverflowTooltip: true,
|
|
352
358
|
width: 80,
|
|
@@ -369,6 +375,7 @@ export default {
|
|
|
369
375
|
field: 'doresult',
|
|
370
376
|
align: 'center',
|
|
371
377
|
showOverflowTooltip: true,
|
|
378
|
+
key:'blyj',
|
|
372
379
|
render: (h, params) => {
|
|
373
380
|
return h(
|
|
374
381
|
'span',
|
|
@@ -381,6 +388,7 @@ export default {
|
|
|
381
388
|
label: '验签',
|
|
382
389
|
field: 'authTypeStr',
|
|
383
390
|
align: 'center',
|
|
391
|
+
key:'yq',
|
|
384
392
|
showOverflowTooltip: true,
|
|
385
393
|
width: 70,
|
|
386
394
|
render: (h, params) => {
|
|
@@ -393,6 +401,7 @@ export default {
|
|
|
393
401
|
},
|
|
394
402
|
{
|
|
395
403
|
label: '附件',
|
|
404
|
+
key:'fj',
|
|
396
405
|
field: 'hasAdjunct',
|
|
397
406
|
align: 'center',
|
|
398
407
|
showOverflowTooltip: true,
|
|
@@ -414,6 +423,7 @@ export default {
|
|
|
414
423
|
label: '时间',
|
|
415
424
|
field: 'doetime',
|
|
416
425
|
align: 'center',
|
|
426
|
+
key:'sj',
|
|
417
427
|
showOverflowTooltip: true,
|
|
418
428
|
width: 150,
|
|
419
429
|
render: (h, params) => {
|
|
@@ -428,6 +438,7 @@ export default {
|
|
|
428
438
|
label: '代办人',
|
|
429
439
|
field: 'douserid',
|
|
430
440
|
align: 'center',
|
|
441
|
+
key:'dbr',
|
|
431
442
|
showOverflowTooltip: true,
|
|
432
443
|
width: 80,
|
|
433
444
|
hide: _that.flowTableInfo.hasAgent != '1'
|
|
@@ -436,6 +447,7 @@ export default {
|
|
|
436
447
|
label: '催办',
|
|
437
448
|
field: 'pressTimes',
|
|
438
449
|
align: 'center',
|
|
450
|
+
key:'cb',
|
|
439
451
|
showOverflowTooltip: true,
|
|
440
452
|
width: 150,
|
|
441
453
|
render: (h, params) => {
|
|
@@ -472,6 +484,7 @@ export default {
|
|
|
472
484
|
{
|
|
473
485
|
label: '经办部门',
|
|
474
486
|
field: 'deptid',
|
|
487
|
+
key:'jbbm',
|
|
475
488
|
align: 'center',
|
|
476
489
|
showOverflowTooltip: true,
|
|
477
490
|
width: 150
|
|
@@ -480,6 +493,7 @@ export default {
|
|
|
480
493
|
label: '步骤',
|
|
481
494
|
field: 'itemname',
|
|
482
495
|
align: 'center',
|
|
496
|
+
key:'bz',
|
|
483
497
|
showOverflowTooltip: true,
|
|
484
498
|
width: 110
|
|
485
499
|
},
|
|
@@ -487,6 +501,7 @@ export default {
|
|
|
487
501
|
label: '办理人',
|
|
488
502
|
field: 'userName',
|
|
489
503
|
align: 'center',
|
|
504
|
+
key:'blr',
|
|
490
505
|
showOverflowTooltip: true,
|
|
491
506
|
width: 110
|
|
492
507
|
},
|
|
@@ -494,6 +509,7 @@ export default {
|
|
|
494
509
|
label: '状态',
|
|
495
510
|
field: 'pendstate',
|
|
496
511
|
align: 'center',
|
|
512
|
+
key:'zt',
|
|
497
513
|
showOverflowTooltip: true,
|
|
498
514
|
width: 80,
|
|
499
515
|
render: (h, params) => {
|
|
@@ -514,6 +530,7 @@ export default {
|
|
|
514
530
|
label: '办理意见',
|
|
515
531
|
field: 'doresult',
|
|
516
532
|
align: 'center',
|
|
533
|
+
key:'blyj',
|
|
517
534
|
showOverflowTooltip: true,
|
|
518
535
|
render: (h, params) => {
|
|
519
536
|
return h(
|
|
@@ -527,6 +544,7 @@ export default {
|
|
|
527
544
|
label: '验签',
|
|
528
545
|
field: 'authTypeStr',
|
|
529
546
|
align: 'center',
|
|
547
|
+
key:'yq',
|
|
530
548
|
showOverflowTooltip: true,
|
|
531
549
|
width: 70,
|
|
532
550
|
render: (h, params) => {
|
|
@@ -541,6 +559,7 @@ export default {
|
|
|
541
559
|
label: '附件',
|
|
542
560
|
field: 'hasAdjunct',
|
|
543
561
|
align: 'center',
|
|
562
|
+
key:'fj',
|
|
544
563
|
showOverflowTooltip: true,
|
|
545
564
|
width: 70,
|
|
546
565
|
render: (h, params) => {
|
|
@@ -560,6 +579,7 @@ export default {
|
|
|
560
579
|
label: '时间',
|
|
561
580
|
field: 'doetime',
|
|
562
581
|
align: 'center',
|
|
582
|
+
key:'sj',
|
|
563
583
|
showOverflowTooltip: true,
|
|
564
584
|
width: 150,
|
|
565
585
|
render: (h, params) => {
|
|
@@ -574,6 +594,7 @@ export default {
|
|
|
574
594
|
label: '代办人',
|
|
575
595
|
field: 'douserid',
|
|
576
596
|
align: 'center',
|
|
597
|
+
key:'dbr',
|
|
577
598
|
showOverflowTooltip: true,
|
|
578
599
|
width: 80,
|
|
579
600
|
hide: _that.flowTableInfo.hasAgent != '1'
|
|
@@ -582,6 +603,7 @@ export default {
|
|
|
582
603
|
label: '催办',
|
|
583
604
|
field: 'pressTimes',
|
|
584
605
|
align: 'center',
|
|
606
|
+
key:'cb',
|
|
585
607
|
showOverflowTooltip: true,
|
|
586
608
|
width: 150,
|
|
587
609
|
render: (h, params) => {
|
|
@@ -1084,12 +1106,13 @@ export default {
|
|
|
1084
1106
|
const {
|
|
1085
1107
|
status,
|
|
1086
1108
|
message,
|
|
1087
|
-
data: { presetInfoList, presetInfoListHiddenColumns, canDelete }
|
|
1109
|
+
data: { presetInfoList, presetInfoListHiddenColumns, canDelete,currentUserHasPresetInfoAuth }
|
|
1088
1110
|
} = res;
|
|
1089
1111
|
this.loading.close();
|
|
1090
1112
|
if (status == 'success') {
|
|
1091
1113
|
presetInfoList && (this.presetData = presetInfoList);
|
|
1092
1114
|
this.presetInfoListHiddenColumns = presetInfoListHiddenColumns;
|
|
1115
|
+
this.currentUserHasPresetInfoAuth = currentUserHasPresetInfoAuth
|
|
1093
1116
|
this.canDelete = canDelete;
|
|
1094
1117
|
} else {
|
|
1095
1118
|
this.$message.error(message || '系统错误,请联系管理员!');
|
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
return '';
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
+
text: String,
|
|
13
14
|
rules: {
|
|
14
15
|
type: [Array, Object],
|
|
15
16
|
default() {
|
|
@@ -132,8 +133,8 @@ export default {
|
|
|
132
133
|
doms.push(this.$slots.prepend);
|
|
133
134
|
}
|
|
134
135
|
if (typeof this.contents === 'string') {
|
|
135
|
-
if (this.contents) {
|
|
136
|
-
doms.push(this.contents);
|
|
136
|
+
if (this.contents || this.text) {
|
|
137
|
+
doms.push(this.contents || this.text);
|
|
137
138
|
}
|
|
138
139
|
if (this.icon) {
|
|
139
140
|
if (
|
|
@@ -254,6 +254,8 @@ import notice from './notice.vue';
|
|
|
254
254
|
import AsyncComponent from './async-component/index.vue';
|
|
255
255
|
import {
|
|
256
256
|
//authCenter,
|
|
257
|
+
wss,
|
|
258
|
+
topic,
|
|
257
259
|
mainConfig,
|
|
258
260
|
updateUserCustomInfo,
|
|
259
261
|
getComplexApplications,
|
|
@@ -540,8 +542,6 @@ export default {
|
|
|
540
542
|
copyright: { comp: '', data: {} }
|
|
541
543
|
},
|
|
542
544
|
pageLoading: false,
|
|
543
|
-
close: null,
|
|
544
|
-
connect: 0,
|
|
545
545
|
wjName: 'singlespa',
|
|
546
546
|
menus: '',
|
|
547
547
|
//头部导航
|
|
@@ -618,7 +618,8 @@ export default {
|
|
|
618
618
|
navIds: null,
|
|
619
619
|
timer: null,
|
|
620
620
|
pid: null,
|
|
621
|
-
showPage: false
|
|
621
|
+
showPage: false,
|
|
622
|
+
webSocket: null
|
|
622
623
|
};
|
|
623
624
|
},
|
|
624
625
|
created() {
|
|
@@ -818,6 +819,9 @@ export default {
|
|
|
818
819
|
this.showSet = !this.showSet;
|
|
819
820
|
},
|
|
820
821
|
setConfig(results, flag) {
|
|
822
|
+
if (this.socket) {
|
|
823
|
+
this.initWebSocket();
|
|
824
|
+
}
|
|
821
825
|
if (flag) {
|
|
822
826
|
sessionStorage.setItem('mainConfig', JSON.stringify(results));
|
|
823
827
|
util.setStorage({
|
|
@@ -933,9 +937,6 @@ export default {
|
|
|
933
937
|
.then((res) => {
|
|
934
938
|
if (res && res.rCode === 0) {
|
|
935
939
|
this.setConfig(res.results, 1);
|
|
936
|
-
if (this.socket) {
|
|
937
|
-
this.initWebSocket();
|
|
938
|
-
}
|
|
939
940
|
if (this.remote) {
|
|
940
941
|
this.getMenu();
|
|
941
942
|
} else {
|
|
@@ -1874,11 +1875,11 @@ export default {
|
|
|
1874
1875
|
},
|
|
1875
1876
|
//开启weosocket
|
|
1876
1877
|
initWebSocket() {
|
|
1877
|
-
util
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
let data = res.data;
|
|
1878
|
+
this.webSocket = util.socket({
|
|
1879
|
+
url: wss,
|
|
1880
|
+
take: topic,
|
|
1881
|
+
success: (res) => {
|
|
1882
|
+
let data = res.data || {};
|
|
1882
1883
|
for (let i in data) {
|
|
1883
1884
|
if (data[i] !== null && data[i] !== undefined) {
|
|
1884
1885
|
if (i === 'onlineUserNums' && data[i] > 0) {
|
|
@@ -1902,7 +1903,9 @@ export default {
|
|
|
1902
1903
|
}
|
|
1903
1904
|
}
|
|
1904
1905
|
if (this.$store) {
|
|
1905
|
-
|
|
1906
|
+
try {
|
|
1907
|
+
this.$store.commit('websocket', data);
|
|
1908
|
+
} catch (error) {}
|
|
1906
1909
|
}
|
|
1907
1910
|
if (this.$eventBus) {
|
|
1908
1911
|
this.$eventBus.$emit('websocket', data);
|
|
@@ -1910,10 +1913,8 @@ export default {
|
|
|
1910
1913
|
if (util.win.eventBus) {
|
|
1911
1914
|
util.win.eventBus.$emit('websocket', data);
|
|
1912
1915
|
}
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
console.log(err);
|
|
1916
|
-
});
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1917
1918
|
},
|
|
1918
1919
|
handleOpened(res) {
|
|
1919
1920
|
if (res === undefined) {
|
|
@@ -2048,8 +2049,8 @@ export default {
|
|
|
2048
2049
|
},
|
|
2049
2050
|
beforeDestroy() {
|
|
2050
2051
|
this.timer = null;
|
|
2051
|
-
if (this.
|
|
2052
|
-
this.
|
|
2052
|
+
if (this.webSocket) {
|
|
2053
|
+
this.webSocket.destroy();
|
|
2053
2054
|
}
|
|
2054
2055
|
}
|
|
2055
2056
|
};
|