eoss-ui 0.4.99 → 0.5.11
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/CHANGELOG.md +929 -0
- package/lib/button-group.js +118 -43
- package/lib/button.js +119 -44
- package/lib/checkbox-group.js +199 -112
- package/lib/data-table-form.js +118 -47
- package/lib/data-table.js +192 -100
- package/lib/date-picker.js +118 -43
- package/lib/dialog.js +128 -57
- package/lib/eoss-ui.common.js +1174 -1167
- package/lib/flow-group.js +118 -43
- package/lib/flow-list.js +137 -52
- package/lib/flow.js +123 -52
- package/lib/form.js +673 -547
- package/lib/handle-user.js +143 -68
- package/lib/handler.js +118 -43
- package/lib/icons.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input-number.js +119 -44
- package/lib/input.js +121 -46
- package/lib/layout.js +2 -2
- package/lib/login.js +124 -52
- package/lib/main.js +299 -386
- package/lib/nav.js +118 -43
- package/lib/page.js +118 -43
- package/lib/player.js +120 -45
- package/lib/qr-code.js +118 -43
- package/lib/radio-group.js +148 -71
- package/lib/retrial-auth.js +118 -43
- package/lib/select-ganged.js +119 -44
- package/lib/select.js +143 -68
- package/lib/selector-panel.js +172 -90
- package/lib/selector.js +118 -43
- package/lib/sizer.js +121 -46
- package/lib/steps.js +118 -43
- package/lib/switch.js +119 -44
- package/lib/table-form.js +184 -109
- package/lib/tabs.js +118 -43
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/toolbar.css +1 -1
- package/lib/tips.js +118 -43
- package/lib/toolbar.js +19 -9
- package/lib/tree-group.js +118 -43
- package/lib/tree.js +118 -43
- package/lib/upload.js +207 -125
- package/lib/utils/util.js +98 -35
- package/lib/wujie.js +118 -43
- package/lib/wxlogin.js +118 -43
- package/package.json +1 -1
- package/packages/button/src/main.vue +1 -10
- package/packages/data-table/src/column.vue +6 -0
- package/packages/data-table/src/main.vue +14 -6
- package/packages/flow-list/src/main.vue +4 -3
- package/packages/form/src/main.vue +71 -47
- package/packages/form/src/table.vue +12 -11
- package/packages/login/src/main.vue +1 -0
- package/packages/main/src/main.vue +118 -247
- package/packages/radio-group/src/main.vue +2 -5
- package/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +1 -0
- package/packages/theme-chalk/lib/button.css +0 -0
- package/packages/theme-chalk/lib/card.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +1 -0
- package/packages/theme-chalk/lib/clients.css +1 -0
- package/packages/theme-chalk/lib/data-table-form.css +1 -0
- package/packages/theme-chalk/lib/data-table.css +1 -0
- package/packages/theme-chalk/lib/date-picker.css +1 -0
- package/packages/theme-chalk/lib/dialog.css +1 -0
- package/packages/theme-chalk/lib/enterprise.css +1 -0
- package/packages/theme-chalk/lib/error-page.css +1 -0
- package/packages/theme-chalk/lib/flow-chart.css +0 -0
- package/packages/theme-chalk/lib/flow-group.css +1 -0
- package/packages/theme-chalk/lib/flow-list.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/handle-user.css +1 -0
- package/packages/theme-chalk/lib/handler.css +1 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/icons.css +1 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/input-number.css +0 -0
- package/packages/theme-chalk/lib/input.css +1 -0
- package/packages/theme-chalk/lib/label.css +1 -0
- package/packages/theme-chalk/lib/layout.css +1 -0
- package/packages/theme-chalk/lib/login.css +1 -0
- package/packages/theme-chalk/lib/main.css +1 -0
- package/packages/theme-chalk/lib/mainComp.css +0 -0
- package/packages/theme-chalk/lib/menu.css +1 -0
- package/packages/theme-chalk/lib/nav.css +1 -0
- package/packages/theme-chalk/lib/notify.css +0 -0
- package/packages/theme-chalk/lib/page.css +1 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/player.css +1 -0
- package/packages/theme-chalk/lib/qr-code.css +1 -0
- package/packages/theme-chalk/lib/radio-group.css +1 -0
- package/packages/theme-chalk/lib/retrial-auth.css +1 -0
- package/packages/theme-chalk/lib/select-ganged.css +1 -0
- package/packages/theme-chalk/lib/select.css +0 -0
- package/packages/theme-chalk/lib/selector-panel.css +1 -0
- package/packages/theme-chalk/lib/selector.css +1 -0
- package/packages/theme-chalk/lib/sizer.css +1 -0
- package/packages/theme-chalk/lib/steps.css +1 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/table-form.css +0 -0
- package/packages/theme-chalk/lib/tabs-panel.css +0 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tips.css +1 -0
- package/packages/theme-chalk/lib/toolbar.css +1 -0
- package/packages/theme-chalk/lib/tree-group.css +1 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/upload.css +1 -0
- package/packages/theme-chalk/lib/wujie.css +0 -0
- package/packages/theme-chalk/lib/wxlogin.css +1 -0
- package/packages/theme-chalk/src/pagination.scss +8 -0
- package/packages/theme-chalk/src/toolbar.scss +1 -0
- package/packages/toolbar/src/main.vue +17 -8
- package/packages/upload/src/main.vue +0 -1
- package/src/index.js +1 -1
- package/src/utils/util.js +97 -37
- package/packages/theme-chalk/gulpfile.js +0 -25
|
@@ -111,17 +111,7 @@
|
|
|
111
111
|
>
|
|
112
112
|
<es-label
|
|
113
113
|
v-if="item.showLabel !== false && item.label"
|
|
114
|
-
|
|
115
|
-
v-bind="
|
|
116
|
-
item.label
|
|
117
|
-
? {
|
|
118
|
-
event: item.label.event,
|
|
119
|
-
events: item.label.events
|
|
120
|
-
}
|
|
121
|
-
: {}
|
|
122
|
-
"
|
|
123
|
-
:plain="item.plain"
|
|
124
|
-
:rules="item.rules"
|
|
114
|
+
v-bind="getLabel(item.label)"
|
|
125
115
|
></es-label>
|
|
126
116
|
</td>
|
|
127
117
|
<td
|
|
@@ -407,6 +397,12 @@
|
|
|
407
397
|
v-else-if="item.type == 'selector'"
|
|
408
398
|
:readonly="readonly ? readonly : item.readonly"
|
|
409
399
|
:plain="item.plain"
|
|
400
|
+
v-on="
|
|
401
|
+
handleExclAttribute({
|
|
402
|
+
data: item.events,
|
|
403
|
+
attrs: 'change'
|
|
404
|
+
})
|
|
405
|
+
"
|
|
410
406
|
@change="
|
|
411
407
|
(val) => {
|
|
412
408
|
handleChange(item, val);
|
|
@@ -1227,6 +1223,11 @@ export default {
|
|
|
1227
1223
|
this.getWidth();
|
|
1228
1224
|
},
|
|
1229
1225
|
methods: {
|
|
1226
|
+
getLabel(res) {
|
|
1227
|
+
return typeof res === 'string'
|
|
1228
|
+
? { contents: res }
|
|
1229
|
+
: { ...res, plain: res.plain || res.name === undefined };
|
|
1230
|
+
},
|
|
1230
1231
|
getRules(res) {
|
|
1231
1232
|
if (res.rules && !res.hide) {
|
|
1232
1233
|
if (Array.isArray(res.rules)) {
|
|
@@ -253,24 +253,25 @@ import message from './message.vue';
|
|
|
253
253
|
import notice from './notice.vue';
|
|
254
254
|
import AsyncComponent from './async-component/index.vue';
|
|
255
255
|
import {
|
|
256
|
-
authCenter,
|
|
256
|
+
//authCenter,
|
|
257
257
|
mainConfig,
|
|
258
258
|
updateUserCustomInfo,
|
|
259
259
|
getComplexApplications,
|
|
260
260
|
getComplexApplicationsNew,
|
|
261
|
-
mainDetail
|
|
262
|
-
wss,
|
|
263
|
-
topic
|
|
261
|
+
mainDetail
|
|
264
262
|
} from 'eoss-ui/src/config/api.js';
|
|
265
263
|
import store from 'eoss-ui/src/utils/store';
|
|
266
264
|
import util from 'eoss-ui/src/utils/util';
|
|
267
|
-
import SockJS from 'sockjs-client';
|
|
268
|
-
import Stomp from 'stompjs';
|
|
269
265
|
const isIE = navigator.userAgent.indexOf('MSIE') != -1;
|
|
270
266
|
const log = util.getParams('console');
|
|
271
267
|
export default {
|
|
272
268
|
name: 'EsMain',
|
|
273
269
|
inheritAttrs: false,
|
|
270
|
+
provide() {
|
|
271
|
+
return {
|
|
272
|
+
esMain: this
|
|
273
|
+
};
|
|
274
|
+
},
|
|
274
275
|
components: {
|
|
275
276
|
userinfo,
|
|
276
277
|
settings,
|
|
@@ -539,8 +540,7 @@ export default {
|
|
|
539
540
|
copyright: { comp: '', data: {} }
|
|
540
541
|
},
|
|
541
542
|
pageLoading: false,
|
|
542
|
-
|
|
543
|
-
websocket: null,
|
|
543
|
+
close: null,
|
|
544
544
|
connect: 0,
|
|
545
545
|
wjName: 'singlespa',
|
|
546
546
|
menus: '',
|
|
@@ -623,18 +623,12 @@ export default {
|
|
|
623
623
|
},
|
|
624
624
|
created() {
|
|
625
625
|
let params = util.getParams() || {};
|
|
626
|
-
if (Object.prototype.hasOwnProperty.call(params, 'history')) {
|
|
627
|
-
this.history =
|
|
628
|
-
params.history == true ||
|
|
629
|
-
params.history == 'true' ||
|
|
630
|
-
params.history == 1;
|
|
631
|
-
}
|
|
632
626
|
this.homePage =
|
|
633
627
|
typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
|
|
634
628
|
this.isHeader = params.header;
|
|
635
629
|
let sysLogoIco = sessionStorage.getItem('sysLogoIco');
|
|
636
630
|
sysLogoIco && util.setFavicon(sysLogoIco);
|
|
637
|
-
this.
|
|
631
|
+
this.getConfig(params);
|
|
638
632
|
},
|
|
639
633
|
mounted() {
|
|
640
634
|
util.win.reLogin = this.handleReLogin;
|
|
@@ -649,153 +643,6 @@ export default {
|
|
|
649
643
|
util.win.windowOpen = this.openPage;
|
|
650
644
|
},
|
|
651
645
|
methods: {
|
|
652
|
-
async isLogin(query) {
|
|
653
|
-
const token =
|
|
654
|
-
util.getStorage('token') || util.getStorage('Authorization');
|
|
655
|
-
|
|
656
|
-
let loginPage = util.getStorage('login') || util.getStorage('loginPage');
|
|
657
|
-
if (loginPage) {
|
|
658
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
659
|
-
let pathname = util.win.top.location.pathname;
|
|
660
|
-
if (pathname !== '/') {
|
|
661
|
-
pathname = pathname.split('/');
|
|
662
|
-
pathname.splice(pathname.length - 1);
|
|
663
|
-
pathname = pathname.join('/');
|
|
664
|
-
loginPage = pathname + '/' + loginPage.replace('./', '');
|
|
665
|
-
} else {
|
|
666
|
-
loginPage = pathname + loginPage.replace('./', '');
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
if (
|
|
671
|
-
!token &&
|
|
672
|
-
query &&
|
|
673
|
-
Object.prototype.hasOwnProperty.call(query, 'serverId') &&
|
|
674
|
-
Object.prototype.hasOwnProperty.call(query, 'authType')
|
|
675
|
-
) {
|
|
676
|
-
await util
|
|
677
|
-
.ajax({
|
|
678
|
-
method: 'post',
|
|
679
|
-
url: authCenter,
|
|
680
|
-
data: query
|
|
681
|
-
})
|
|
682
|
-
.then((res) => {
|
|
683
|
-
if (res.rCode === 0) {
|
|
684
|
-
let { results } = res;
|
|
685
|
-
switch (results.statusCode) {
|
|
686
|
-
case 0:
|
|
687
|
-
util.setStorage({
|
|
688
|
-
type: this.storage,
|
|
689
|
-
key: {
|
|
690
|
-
ssId: results.ssId,
|
|
691
|
-
token: results.token,
|
|
692
|
-
Authorization: results.token,
|
|
693
|
-
deviceUnique: results.deviceUnique
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
if (query.openType) {
|
|
697
|
-
let url = util.win.top.location.href;
|
|
698
|
-
let newUrl = util.delUrlParam({
|
|
699
|
-
url: url,
|
|
700
|
-
key: ['serverId', 'authType', 'openType']
|
|
701
|
-
});
|
|
702
|
-
switch (query.openType) {
|
|
703
|
-
case 'self':
|
|
704
|
-
util.win.location.href = newUrl;
|
|
705
|
-
break;
|
|
706
|
-
case 'blank':
|
|
707
|
-
util.win.open(newUrl);
|
|
708
|
-
break;
|
|
709
|
-
case 'parent':
|
|
710
|
-
util.win.parent.location.href = href;
|
|
711
|
-
break;
|
|
712
|
-
default:
|
|
713
|
-
util.win.top.location.href = href;
|
|
714
|
-
}
|
|
715
|
-
} else {
|
|
716
|
-
this.getConfig();
|
|
717
|
-
}
|
|
718
|
-
break;
|
|
719
|
-
case 1:
|
|
720
|
-
break;
|
|
721
|
-
case 2:
|
|
722
|
-
break;
|
|
723
|
-
case 3:
|
|
724
|
-
const href = results.authorizeUrl.replace(
|
|
725
|
-
'{redirectUri}',
|
|
726
|
-
encodeURIComponent(url)
|
|
727
|
-
);
|
|
728
|
-
switch (query.openType) {
|
|
729
|
-
case 'self':
|
|
730
|
-
util.win.location.href = href;
|
|
731
|
-
break;
|
|
732
|
-
case 'blank':
|
|
733
|
-
util.win.open(href);
|
|
734
|
-
break;
|
|
735
|
-
case 'parent':
|
|
736
|
-
util.win.parent.location.href = href;
|
|
737
|
-
break;
|
|
738
|
-
default:
|
|
739
|
-
util.win.top.location.href = href;
|
|
740
|
-
}
|
|
741
|
-
break;
|
|
742
|
-
case 4:
|
|
743
|
-
this.$alert(
|
|
744
|
-
results.msg
|
|
745
|
-
? results.msg
|
|
746
|
-
: '账号未绑定,账号密码登录后自动绑定!',
|
|
747
|
-
'提示',
|
|
748
|
-
{
|
|
749
|
-
confirmButtonText: '确定',
|
|
750
|
-
type: 'error',
|
|
751
|
-
callback: () => {
|
|
752
|
-
sessionStorage.setItem(
|
|
753
|
-
'extUserBindHandleId',
|
|
754
|
-
results.extUserBindHandleId
|
|
755
|
-
);
|
|
756
|
-
//window.location.href = delUrlParam({ key: 'code' });
|
|
757
|
-
if (loginPage) {
|
|
758
|
-
util.win.top.location.replace(loginPage);
|
|
759
|
-
} else if (document.referrer) {
|
|
760
|
-
util.win.top.location.replace(document.referrer);
|
|
761
|
-
} else if (
|
|
762
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
763
|
-
) {
|
|
764
|
-
util.win.top.location.href = './login.html';
|
|
765
|
-
} else {
|
|
766
|
-
this.$router.replace('/login');
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
);
|
|
771
|
-
break;
|
|
772
|
-
default:
|
|
773
|
-
}
|
|
774
|
-
} else {
|
|
775
|
-
this.$alert(res.msg, '提示', {
|
|
776
|
-
confirmButtonText: '确定',
|
|
777
|
-
type: 'error',
|
|
778
|
-
callback: () => {
|
|
779
|
-
if (loginPage) {
|
|
780
|
-
util.win.top.location.replace(loginPage);
|
|
781
|
-
} else if (document.referrer) {
|
|
782
|
-
util.win.top.location.replace(document.referrer);
|
|
783
|
-
} else if (
|
|
784
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
785
|
-
) {
|
|
786
|
-
util.win.top.location.href = './login.html';
|
|
787
|
-
} else {
|
|
788
|
-
this.$router.replace('/login');
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
})
|
|
794
|
-
.catch((e) => {});
|
|
795
|
-
} else {
|
|
796
|
-
this.getConfig();
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
646
|
menuSuccess(res) {
|
|
800
647
|
// this.menus
|
|
801
648
|
this.menuType = 'custom';
|
|
@@ -892,7 +739,7 @@ export default {
|
|
|
892
739
|
this.navIds = ids;
|
|
893
740
|
this.setTitle(ids[0]);
|
|
894
741
|
}
|
|
895
|
-
} else if (sessionStorage.getItem('jump') && this.
|
|
742
|
+
} else if (sessionStorage.getItem('jump') && this.isHistory) {
|
|
896
743
|
let ids = this.getId(
|
|
897
744
|
this.menus,
|
|
898
745
|
sessionStorage.getItem('jump'),
|
|
@@ -915,7 +762,7 @@ export default {
|
|
|
915
762
|
this.navIds = ids;
|
|
916
763
|
this.setTitle(ids[0]);
|
|
917
764
|
}
|
|
918
|
-
} else if (sessionStorage.getItem('jump') && this.
|
|
765
|
+
} else if (sessionStorage.getItem('jump') && this.isHistory) {
|
|
919
766
|
let ids = this.getId(
|
|
920
767
|
this.menus,
|
|
921
768
|
sessionStorage.getItem('jump'),
|
|
@@ -998,21 +845,37 @@ export default {
|
|
|
998
845
|
this.results[i] = results[i].split(',');
|
|
999
846
|
}
|
|
1000
847
|
if (i === 'indexUrl' && this.loadHomePage) {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
848
|
+
let applicationid =
|
|
849
|
+
util.getParams('applicationid') || util.getParams('applicationId');
|
|
850
|
+
let hash = util.win.location.hash;
|
|
851
|
+
if (hash) {
|
|
852
|
+
hash = hash.split('?')[0];
|
|
853
|
+
}
|
|
854
|
+
let jump = sessionStorage.getItem('jump');
|
|
855
|
+
if (
|
|
856
|
+
!applicationid &&
|
|
857
|
+
(!jump || !this.isHistory) &&
|
|
858
|
+
hash === '#/' &&
|
|
859
|
+
hash === '#/main'
|
|
860
|
+
) {
|
|
861
|
+
this.homePage =
|
|
862
|
+
typeof this.loadHomePage === 'string'
|
|
863
|
+
? this.loadHomePage
|
|
864
|
+
: results[i];
|
|
865
|
+
if (this.isHomePage && this.homePage) {
|
|
866
|
+
if (this.menus && this.menus.length) {
|
|
867
|
+
let ids = null;
|
|
868
|
+
this.homePage && (ids = this.getId(this.menus, this.homePage));
|
|
869
|
+
if (ids) {
|
|
870
|
+
this.defaultActive = ids;
|
|
871
|
+
} else if (this.homePage) {
|
|
872
|
+
this.handleJump(this.homePage);
|
|
873
|
+
}
|
|
874
|
+
this.setMenu(this.menus);
|
|
1013
875
|
}
|
|
1014
|
-
this.setMenu(this.menus);
|
|
1015
876
|
}
|
|
877
|
+
} else if (this.menus && this.menus.length) {
|
|
878
|
+
this.setMenu(this.menus);
|
|
1016
879
|
}
|
|
1017
880
|
}
|
|
1018
881
|
if (i === 'doorIndex' && results[i]) {
|
|
@@ -1045,7 +908,16 @@ export default {
|
|
|
1045
908
|
}
|
|
1046
909
|
},
|
|
1047
910
|
//获取用户配置及信息
|
|
1048
|
-
getConfig() {
|
|
911
|
+
getConfig(query) {
|
|
912
|
+
const token =
|
|
913
|
+
util.getStorage('token') || util.getStorage('Authorization');
|
|
914
|
+
if (
|
|
915
|
+
!token &&
|
|
916
|
+
Object.prototype.hasOwnProperty.call(query, 'serverId') &&
|
|
917
|
+
Object.prototype.hasOwnProperty.call(query, 'authType')
|
|
918
|
+
) {
|
|
919
|
+
return false;
|
|
920
|
+
}
|
|
1049
921
|
if (util.getStorage('mainConfig')) {
|
|
1050
922
|
const results = JSON.parse(util.getStorage('mainConfig'));
|
|
1051
923
|
this.setConfig(results);
|
|
@@ -1098,22 +970,26 @@ export default {
|
|
|
1098
970
|
}
|
|
1099
971
|
});
|
|
1100
972
|
},
|
|
1101
|
-
jumpMenu(res, flag) {
|
|
973
|
+
jumpMenu(res, flag, param) {
|
|
974
|
+
let option = { url: res, flag: flag, param: param };
|
|
975
|
+
if (util.isObject(res)) {
|
|
976
|
+
option = { ...option, ...res };
|
|
977
|
+
}
|
|
1102
978
|
let ids;
|
|
1103
|
-
if (typeof
|
|
1104
|
-
if (flag) {
|
|
1105
|
-
ids = this.getId(this.menus,
|
|
979
|
+
if (typeof option.url === 'string') {
|
|
980
|
+
if (option.flag) {
|
|
981
|
+
ids = this.getId(this.menus, option.url, true);
|
|
1106
982
|
if (!ids) {
|
|
1107
983
|
this.$message.error('未在菜单栏中找到此地址');
|
|
1108
984
|
return;
|
|
1109
985
|
}
|
|
1110
986
|
} else {
|
|
1111
|
-
ids =
|
|
987
|
+
ids = option.url.split(',');
|
|
1112
988
|
}
|
|
1113
989
|
} else {
|
|
1114
|
-
ids =
|
|
990
|
+
ids = option.url;
|
|
1115
991
|
}
|
|
1116
|
-
this.setDefault(this.menus, ids);
|
|
992
|
+
this.setDefault(this.menus, ids, option.param);
|
|
1117
993
|
},
|
|
1118
994
|
getId(arry, res, path) {
|
|
1119
995
|
if (!res) {
|
|
@@ -1182,7 +1058,7 @@ export default {
|
|
|
1182
1058
|
if (ids) {
|
|
1183
1059
|
this.defaultActive = ids;
|
|
1184
1060
|
}
|
|
1185
|
-
} else if (sessionStorage.getItem('jump') && this.
|
|
1061
|
+
} else if (sessionStorage.getItem('jump') && this.isHistory) {
|
|
1186
1062
|
let ids = this.getId(
|
|
1187
1063
|
this.menus,
|
|
1188
1064
|
sessionStorage.getItem('jump'),
|
|
@@ -1209,7 +1085,7 @@ export default {
|
|
|
1209
1085
|
this.navIds = ids;
|
|
1210
1086
|
this.setTitle(ids[0]);
|
|
1211
1087
|
}
|
|
1212
|
-
} else if (sessionStorage.getItem('jump') && this.
|
|
1088
|
+
} else if (sessionStorage.getItem('jump') && this.isHistory) {
|
|
1213
1089
|
let ids = this.getId(
|
|
1214
1090
|
this.menus,
|
|
1215
1091
|
sessionStorage.getItem('jump'),
|
|
@@ -1415,12 +1291,12 @@ export default {
|
|
|
1415
1291
|
return false;
|
|
1416
1292
|
},
|
|
1417
1293
|
//设置默认导航页面
|
|
1418
|
-
setDefault(res, active) {
|
|
1294
|
+
setDefault(res, active, param) {
|
|
1419
1295
|
this.navIds = JSON.parse(JSON.stringify(active));
|
|
1420
1296
|
this.sysId = '';
|
|
1421
1297
|
this.tabsId = '';
|
|
1422
1298
|
this.active = '';
|
|
1423
|
-
this.getUrl(res, active);
|
|
1299
|
+
this.getUrl(res, active, param);
|
|
1424
1300
|
if (
|
|
1425
1301
|
this.layout === 'subsystem' ||
|
|
1426
1302
|
this.layout === 'subSystem' ||
|
|
@@ -1483,18 +1359,18 @@ export default {
|
|
|
1483
1359
|
this.showPage = true;
|
|
1484
1360
|
},
|
|
1485
1361
|
//获取页面类型及地址
|
|
1486
|
-
getUrl(res, active, index) {
|
|
1362
|
+
getUrl(res, active, index, param) {
|
|
1487
1363
|
index = index === undefined ? 0 : index;
|
|
1488
1364
|
for (let i = 0; i < res.length; i++) {
|
|
1489
1365
|
let item = res[i];
|
|
1490
1366
|
if (item.id === active[index]) {
|
|
1491
1367
|
if (index === active.length - 1) {
|
|
1492
|
-
this.handleJump(item.url, item.urlopenmode, item);
|
|
1368
|
+
this.handleJump(item.url, item.urlopenmode, item, param);
|
|
1493
1369
|
return item.url;
|
|
1494
1370
|
} else {
|
|
1495
1371
|
if (item.children && item.children.length) {
|
|
1496
1372
|
index++;
|
|
1497
|
-
let url = this.getUrl(item.children, active, index);
|
|
1373
|
+
let url = this.getUrl(item.children, active, index, param);
|
|
1498
1374
|
if (url && index === active.length - 1) {
|
|
1499
1375
|
this.tabs = '';
|
|
1500
1376
|
}
|
|
@@ -1502,7 +1378,7 @@ export default {
|
|
|
1502
1378
|
}
|
|
1503
1379
|
if (item.fourthTabs && item.fourthTabs.length) {
|
|
1504
1380
|
index++;
|
|
1505
|
-
let url = this.getUrl(item.fourthTabs, active, index);
|
|
1381
|
+
let url = this.getUrl(item.fourthTabs, active, index, param);
|
|
1506
1382
|
if (url) {
|
|
1507
1383
|
this.$set(this, 'tabs', item.fourthTabs);
|
|
1508
1384
|
}
|
|
@@ -1510,7 +1386,7 @@ export default {
|
|
|
1510
1386
|
}
|
|
1511
1387
|
}
|
|
1512
1388
|
} else if (item.children && item.children.length) {
|
|
1513
|
-
this.getUrl(item.children, active, index);
|
|
1389
|
+
this.getUrl(item.children, active, index, param);
|
|
1514
1390
|
}
|
|
1515
1391
|
}
|
|
1516
1392
|
return false;
|
|
@@ -1772,7 +1648,8 @@ export default {
|
|
|
1772
1648
|
}
|
|
1773
1649
|
},
|
|
1774
1650
|
//跳转页面
|
|
1775
|
-
handleJump(page, type, res) {
|
|
1651
|
+
handleJump(page, type, res, param) {
|
|
1652
|
+
console.log(page);
|
|
1776
1653
|
let prevPage = sessionStorage.getItem('jump');
|
|
1777
1654
|
sessionStorage.setItem('jump', page);
|
|
1778
1655
|
if (res) {
|
|
@@ -1793,7 +1670,7 @@ export default {
|
|
|
1793
1670
|
} else if (type == 3) {
|
|
1794
1671
|
this.method = 'iframe';
|
|
1795
1672
|
this.refresh = false;
|
|
1796
|
-
this.page = util.handlerUrl(page);
|
|
1673
|
+
this.page = util.handlerUrl(page, param);
|
|
1797
1674
|
} else if (page) {
|
|
1798
1675
|
let urls = page.split('?');
|
|
1799
1676
|
if (urls[0].indexOf('.js') > 1) {
|
|
@@ -1809,12 +1686,12 @@ export default {
|
|
|
1809
1686
|
) {
|
|
1810
1687
|
this.method = 'iframe';
|
|
1811
1688
|
this.refresh = false;
|
|
1812
|
-
this.page = util.handlerUrl(page);
|
|
1689
|
+
this.page = util.handlerUrl(page, param);
|
|
1813
1690
|
} else {
|
|
1814
1691
|
if (urls[0].indexOf('.html') === -1 && urls[0].indexOf('#/') === -1) {
|
|
1815
1692
|
this.method = 'iframe';
|
|
1816
1693
|
this.refresh = false;
|
|
1817
|
-
this.page = util.handlerUrl(page);
|
|
1694
|
+
this.page = util.handlerUrl(page, param);
|
|
1818
1695
|
} else {
|
|
1819
1696
|
this.method = 'router';
|
|
1820
1697
|
const routes = this.$router.options.routes;
|
|
@@ -1822,6 +1699,9 @@ export default {
|
|
|
1822
1699
|
let path = this.hasRouter(routes, urls[0]);
|
|
1823
1700
|
if (path) {
|
|
1824
1701
|
let params = util.getParams({ url: page });
|
|
1702
|
+
if (param) {
|
|
1703
|
+
params = { ...params, ...param };
|
|
1704
|
+
}
|
|
1825
1705
|
if (res) {
|
|
1826
1706
|
this.routerKey = res.id;
|
|
1827
1707
|
if (Object.prototype.hasOwnProperty.call(res, 'keepAlive')) {
|
|
@@ -1847,7 +1727,7 @@ export default {
|
|
|
1847
1727
|
) {
|
|
1848
1728
|
this.method = 'iframe';
|
|
1849
1729
|
this.refresh = false;
|
|
1850
|
-
this.page = util.handlerUrl(page);
|
|
1730
|
+
this.page = util.handlerUrl(page, param);
|
|
1851
1731
|
} else {
|
|
1852
1732
|
this.method = 'wujie';
|
|
1853
1733
|
this.wjName =
|
|
@@ -1994,55 +1874,46 @@ export default {
|
|
|
1994
1874
|
},
|
|
1995
1875
|
//开启weosocket
|
|
1996
1876
|
initWebSocket() {
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
() => {
|
|
2012
|
-
//localStorage.setItem("socket",true);
|
|
2013
|
-
//订阅服务端的
|
|
2014
|
-
client.subscribe(topic, (response) => {
|
|
2015
|
-
let res = JSON.parse(response.body);
|
|
2016
|
-
let data = res.data;
|
|
2017
|
-
for (let i in data) {
|
|
2018
|
-
if (data[i] !== null && data[i] !== undefined) {
|
|
2019
|
-
if (i === 'onlineUserNums' && data[i] > 0) {
|
|
2020
|
-
this.online = data[i];
|
|
2021
|
-
}
|
|
2022
|
-
if (i === 'sysMsgNums') {
|
|
2023
|
-
this.notice = data[i];
|
|
2024
|
-
if (this.showMsg) {
|
|
2025
|
-
this.$refs.message.getMsg(true);
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
if (i === 'menuTipsMap') {
|
|
2029
|
-
this.menuTips = data[i];
|
|
2030
|
-
}
|
|
2031
|
-
if (i === 'sysMsgList') {
|
|
2032
|
-
this.sysMsg = data[i];
|
|
2033
|
-
}
|
|
2034
|
-
if (i === 'extraData') {
|
|
2035
|
-
this.extraData = data[i];
|
|
1877
|
+
util
|
|
1878
|
+
.socket()
|
|
1879
|
+
.then((res, close) => {
|
|
1880
|
+
this.close = close;
|
|
1881
|
+
let data = res.data;
|
|
1882
|
+
for (let i in data) {
|
|
1883
|
+
if (data[i] !== null && data[i] !== undefined) {
|
|
1884
|
+
if (i === 'onlineUserNums' && data[i] > 0) {
|
|
1885
|
+
this.online = data[i];
|
|
1886
|
+
}
|
|
1887
|
+
if (i === 'sysMsgNums') {
|
|
1888
|
+
this.notice = data[i];
|
|
1889
|
+
if (this.showMsg) {
|
|
1890
|
+
this.$refs.message.getMsg(true);
|
|
2036
1891
|
}
|
|
2037
1892
|
}
|
|
1893
|
+
if (i === 'menuTipsMap') {
|
|
1894
|
+
this.menuTips = data[i];
|
|
1895
|
+
}
|
|
1896
|
+
if (i === 'sysMsgList') {
|
|
1897
|
+
this.sysMsg = data[i];
|
|
1898
|
+
}
|
|
1899
|
+
if (i === 'extraData') {
|
|
1900
|
+
this.extraData = data[i];
|
|
1901
|
+
}
|
|
2038
1902
|
}
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
1903
|
+
}
|
|
1904
|
+
if (this.$store) {
|
|
1905
|
+
this.$store.commit('websocket', data);
|
|
1906
|
+
}
|
|
1907
|
+
if (this.$eventBus) {
|
|
1908
|
+
this.$eventBus.$emit('websocket', data);
|
|
1909
|
+
}
|
|
1910
|
+
if (util.win.eventBus) {
|
|
1911
|
+
util.win.eventBus.$emit('websocket', data);
|
|
1912
|
+
}
|
|
1913
|
+
})
|
|
1914
|
+
.catch((err) => {
|
|
1915
|
+
console.log(err);
|
|
1916
|
+
});
|
|
2046
1917
|
},
|
|
2047
1918
|
handleOpened(res) {
|
|
2048
1919
|
if (res === undefined) {
|
|
@@ -2177,8 +2048,8 @@ export default {
|
|
|
2177
2048
|
},
|
|
2178
2049
|
beforeDestroy() {
|
|
2179
2050
|
this.timer = null;
|
|
2180
|
-
if (this.
|
|
2181
|
-
this.
|
|
2051
|
+
if (this.close) {
|
|
2052
|
+
this.close();
|
|
2182
2053
|
}
|
|
2183
2054
|
}
|
|
2184
2055
|
};
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
v-else
|
|
12
12
|
v-show="display"
|
|
13
13
|
v-model="model"
|
|
14
|
+
:value-key="valueKey"
|
|
14
15
|
v-bind="$attrs"
|
|
15
16
|
v-on="$listeners"
|
|
16
17
|
>
|
|
@@ -174,11 +175,7 @@ export default {
|
|
|
174
175
|
return this.options ? this.options : this.data;
|
|
175
176
|
},
|
|
176
177
|
labelVal() {
|
|
177
|
-
if (
|
|
178
|
-
this.readonly &&
|
|
179
|
-
(this.model || this.model === 0) &&
|
|
180
|
-
this.results.length
|
|
181
|
-
) {
|
|
178
|
+
if (this.readonly && this.model !== undefined && this.results.length) {
|
|
182
179
|
if (typeof this.model !== 'object') {
|
|
183
180
|
if (util.isObject(this.results[0])) {
|
|
184
181
|
let val;
|