eoss-ui 0.5.10 → 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/lib/button-group.js +18 -33
- package/lib/button.js +18 -33
- package/lib/checkbox-group.js +18 -33
- package/lib/data-table-form.js +18 -33
- package/lib/data-table.js +36 -42
- package/lib/date-picker.js +18 -33
- package/lib/dialog.js +18 -33
- package/lib/eoss-ui.common.js +217 -486
- package/lib/flow-group.js +18 -33
- package/lib/flow-list.js +18 -33
- package/lib/flow.js +18 -33
- package/lib/form.js +50 -172
- package/lib/handle-user.js +18 -33
- package/lib/handler.js +18 -33
- package/lib/index.js +1 -1
- package/lib/input-number.js +18 -33
- package/lib/input.js +18 -33
- package/lib/login.js +18 -33
- package/lib/main.js +117 -282
- package/lib/nav.js +18 -33
- package/lib/page.js +18 -33
- package/lib/player.js +18 -33
- package/lib/qr-code.js +18 -33
- package/lib/radio-group.js +21 -36
- package/lib/retrial-auth.js +18 -33
- package/lib/select-ganged.js +18 -33
- package/lib/select.js +18 -33
- package/lib/selector-panel.js +18 -33
- package/lib/selector.js +18 -33
- package/lib/sizer.js +18 -33
- package/lib/steps.js +18 -33
- package/lib/switch.js +18 -33
- package/lib/table-form.js +30 -61
- package/lib/tabs.js +18 -33
- 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 +18 -33
- package/lib/toolbar.js +19 -9
- package/lib/tree-group.js +18 -33
- package/lib/tree.js +18 -33
- package/lib/upload.js +18 -33
- package/lib/utils/util.js +18 -33
- package/lib/wujie.js +18 -33
- package/lib/wxlogin.js +18 -33
- package/package.json +1 -1
- package/packages/data-table/src/main.vue +14 -6
- package/packages/form/src/main.vue +11 -46
- package/packages/form/src/table.vue +6 -11
- package/packages/main/src/main.vue +12 -150
- package/packages/radio-group/src/main.vue +1 -5
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/pagination.css +1 -1
- package/packages/theme-chalk/lib/toolbar.css +1 -1
- 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/src/index.js +1 -1
- package/src/utils/util.js +20 -34
package/lib/wxlogin.js
CHANGED
|
@@ -746,6 +746,7 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
746
746
|
key.forEach(function (item) {
|
|
747
747
|
if (param.hasOwnProperty(item)) {
|
|
748
748
|
var reg = item + '=' + param[item];
|
|
749
|
+
console.log(reg);
|
|
749
750
|
if (src.indexOf(reg + '&') > -1) {
|
|
750
751
|
src = src.replace(reg + '&', '');
|
|
751
752
|
} else if (src.indexOf('&' + reg) > -1) {
|
|
@@ -1946,7 +1947,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1946
1947
|
next = _ref8.next,
|
|
1947
1948
|
_ref8$exclude = _ref8.exclude,
|
|
1948
1949
|
exclude = _ref8$exclude === undefined ? [] : _ref8$exclude,
|
|
1949
|
-
open = _ref8.open,
|
|
1950
1950
|
cookie = _ref8.cookie,
|
|
1951
1951
|
loginPage = _ref8.loginPage,
|
|
1952
1952
|
redirect = _ref8.redirect;
|
|
@@ -1954,24 +1954,24 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1954
1954
|
if (cookie === undefined) {
|
|
1955
1955
|
cookie = getParams({ name: 'cookie' });
|
|
1956
1956
|
}
|
|
1957
|
+
var pathname = win.top.location.pathname;
|
|
1957
1958
|
if (loginPage) {
|
|
1958
1959
|
sessionStorage.setItem('loginPage', loginPage);
|
|
1959
1960
|
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
1960
|
-
var pathname = win.top.location.pathname;
|
|
1961
1961
|
if (pathname !== '/') {
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
loginPage =
|
|
1962
|
+
var path = pathname.split('/');
|
|
1963
|
+
path.splice(pathname.length - 1);
|
|
1964
|
+
path = path.join('/');
|
|
1965
|
+
loginPage = path + '/' + loginPage.replace('./', '');
|
|
1966
1966
|
} else {
|
|
1967
1967
|
loginPage = pathname + loginPage.replace('./', '');
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
1971
1971
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1972
|
-
|
|
1972
|
+
// const logined = getStorage('logined');
|
|
1973
1973
|
// eslint-disable-next-line eqeqeq
|
|
1974
|
-
if (token ||
|
|
1974
|
+
if (token || cookie == true || cookie == 1) {
|
|
1975
1975
|
next && next();
|
|
1976
1976
|
} else {
|
|
1977
1977
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
@@ -1995,37 +1995,22 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1995
1995
|
deviceUnique: results.deviceUnique
|
|
1996
1996
|
}
|
|
1997
1997
|
});
|
|
1998
|
-
|
|
1998
|
+
var url = delUrlParam({
|
|
1999
|
+
url: win.top.location.href,
|
|
2000
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
2001
|
+
});
|
|
2002
|
+
win.top.location.href = url;
|
|
2003
|
+
setTimeout(function () {
|
|
2004
|
+
win.top.location.reload();
|
|
2005
|
+
}, 200);
|
|
1999
2006
|
break;
|
|
2000
2007
|
case 1:
|
|
2001
2008
|
break;
|
|
2002
2009
|
case 2:
|
|
2003
2010
|
break;
|
|
2004
2011
|
case 3:
|
|
2005
|
-
var
|
|
2006
|
-
|
|
2007
|
-
if (to.query.openType) {
|
|
2008
|
-
switch (to.query.openType) {
|
|
2009
|
-
case 'self':
|
|
2010
|
-
win.location.href = href;
|
|
2011
|
-
break;
|
|
2012
|
-
case 'blank':
|
|
2013
|
-
win.open(href);
|
|
2014
|
-
break;
|
|
2015
|
-
case 'top':
|
|
2016
|
-
win.top.location.href = href;
|
|
2017
|
-
break;
|
|
2018
|
-
case 'parent':
|
|
2019
|
-
win.parent.location.href = href;
|
|
2020
|
-
break;
|
|
2021
|
-
}
|
|
2022
|
-
} else {
|
|
2023
|
-
if (open) {
|
|
2024
|
-
win.open(href);
|
|
2025
|
-
} else {
|
|
2026
|
-
win.top.location.href = href;
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2012
|
+
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
|
|
2013
|
+
win.top.location.href = href;
|
|
2029
2014
|
break;
|
|
2030
2015
|
case 4:
|
|
2031
2016
|
eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
v-if="showToolbar"
|
|
13
13
|
v-bind="{
|
|
14
14
|
contents: toolbars,
|
|
15
|
+
showLabel: showLabel,
|
|
15
16
|
close: close,
|
|
16
17
|
callBack: resetHeight,
|
|
17
18
|
showFormBtn: showFormBtn,
|
|
@@ -281,6 +282,7 @@ export default {
|
|
|
281
282
|
type: [Array, Boolean],
|
|
282
283
|
default: false
|
|
283
284
|
},
|
|
285
|
+
showLabel: Boolean,
|
|
284
286
|
searchValue: Object,
|
|
285
287
|
advanceValue: Object,
|
|
286
288
|
// 是否开启序号
|
|
@@ -725,26 +727,32 @@ export default {
|
|
|
725
727
|
},
|
|
726
728
|
handleClickAddData(scope) {
|
|
727
729
|
const data = JSON.parse(JSON.stringify(scope.row));
|
|
728
|
-
|
|
729
|
-
this.
|
|
730
|
+
let index = scope.$index + 1;
|
|
731
|
+
if (this.page) {
|
|
732
|
+
index += (this.config.pageNum - 1) * this.config.pageSize;
|
|
733
|
+
}
|
|
734
|
+
this.data.splice(index, 0, data);
|
|
730
735
|
this.$emit('dataChange', 'add', data);
|
|
731
736
|
this.$emit('btnClick', {
|
|
732
737
|
event: 'addRow',
|
|
733
738
|
row: data,
|
|
734
739
|
index: index,
|
|
735
|
-
data: data
|
|
740
|
+
data: this.data
|
|
736
741
|
});
|
|
737
742
|
},
|
|
738
743
|
handleClickDeleteData(scope) {
|
|
739
744
|
const data = JSON.parse(JSON.stringify(scope.row));
|
|
740
|
-
|
|
741
|
-
this.
|
|
745
|
+
let index = scope.$index;
|
|
746
|
+
if (this.page) {
|
|
747
|
+
index += (this.config.pageNum - 1) * this.config.pageSize;
|
|
748
|
+
}
|
|
749
|
+
this.data.splice(index, 1);
|
|
742
750
|
this.$emit('dataChange', 'delete', data);
|
|
743
751
|
this.$emit('btnClick', {
|
|
744
752
|
event: 'deleteRow',
|
|
745
753
|
row: data,
|
|
746
754
|
index: index,
|
|
747
|
-
data: this.
|
|
755
|
+
data: this.data
|
|
748
756
|
});
|
|
749
757
|
},
|
|
750
758
|
checkSelect(newVal) {
|
|
@@ -72,9 +72,7 @@
|
|
|
72
72
|
>
|
|
73
73
|
<es-label
|
|
74
74
|
v-if="item.label"
|
|
75
|
-
|
|
76
|
-
:event="item.label.event"
|
|
77
|
-
:events="item.label.events"
|
|
75
|
+
v-bind="getLabel(item.label)"
|
|
78
76
|
></es-label>
|
|
79
77
|
<span v-if="item.text || item.type === 'text'">{{
|
|
80
78
|
item.text || item.contents
|
|
@@ -249,16 +247,7 @@
|
|
|
249
247
|
v-if="
|
|
250
248
|
item.showLabel !== false && item.label && showLabel
|
|
251
249
|
"
|
|
252
|
-
|
|
253
|
-
v-bind="
|
|
254
|
-
item.label
|
|
255
|
-
? {
|
|
256
|
-
event: item.label.event,
|
|
257
|
-
events: item.label.events
|
|
258
|
-
}
|
|
259
|
-
: {}
|
|
260
|
-
"
|
|
261
|
-
:plain="item.plain || item.name === undefined"
|
|
250
|
+
v-bind="getLabel(item.label)"
|
|
262
251
|
></es-label>
|
|
263
252
|
<es-input-number
|
|
264
253
|
v-if="item.type == 'number'"
|
|
@@ -1209,16 +1198,7 @@
|
|
|
1209
1198
|
<es-label
|
|
1210
1199
|
slot="label"
|
|
1211
1200
|
v-if="item.showLabel !== false && item.label && showLabel"
|
|
1212
|
-
|
|
1213
|
-
v-bind="
|
|
1214
|
-
item.label
|
|
1215
|
-
? {
|
|
1216
|
-
event: item.label.event,
|
|
1217
|
-
events: item.label.events
|
|
1218
|
-
}
|
|
1219
|
-
: {}
|
|
1220
|
-
"
|
|
1221
|
-
:plain="item.plain || item.name === undefined"
|
|
1201
|
+
v-bind="getLabel(item.label)"
|
|
1222
1202
|
></es-label>
|
|
1223
1203
|
<es-input-number
|
|
1224
1204
|
v-if="item.type == 'number'"
|
|
@@ -2026,9 +2006,7 @@
|
|
|
2026
2006
|
<div v-else :key="index" class="es-collapse-title-handler">
|
|
2027
2007
|
<es-label
|
|
2028
2008
|
v-if="item.label"
|
|
2029
|
-
|
|
2030
|
-
:event="item.label.event"
|
|
2031
|
-
:events="item.label.events"
|
|
2009
|
+
v-bind="getLabel(item.label)"
|
|
2032
2010
|
></es-label>
|
|
2033
2011
|
<span v-if="item.text || item.type === 'text'">{{
|
|
2034
2012
|
item.text || item.contents
|
|
@@ -2191,16 +2169,7 @@
|
|
|
2191
2169
|
<es-label
|
|
2192
2170
|
slot="label"
|
|
2193
2171
|
v-if="item.showLabel !== false && item.label && showLabel"
|
|
2194
|
-
|
|
2195
|
-
v-bind="
|
|
2196
|
-
item.label
|
|
2197
|
-
? {
|
|
2198
|
-
event: item.label.event,
|
|
2199
|
-
events: item.label.events
|
|
2200
|
-
}
|
|
2201
|
-
: {}
|
|
2202
|
-
"
|
|
2203
|
-
:plain="item.plain || item.name === undefined"
|
|
2172
|
+
v-bind="getLabel(item.label)"
|
|
2204
2173
|
></es-label>
|
|
2205
2174
|
<es-input-number
|
|
2206
2175
|
v-if="item.type == 'number'"
|
|
@@ -3102,16 +3071,7 @@
|
|
|
3102
3071
|
<es-label
|
|
3103
3072
|
slot="label"
|
|
3104
3073
|
v-if="item.showLabel !== false && item.label && showLabel"
|
|
3105
|
-
|
|
3106
|
-
v-bind="
|
|
3107
|
-
item.label
|
|
3108
|
-
? {
|
|
3109
|
-
event: item.label.event,
|
|
3110
|
-
events: item.label.events
|
|
3111
|
-
}
|
|
3112
|
-
: {}
|
|
3113
|
-
"
|
|
3114
|
-
:plain="item.plain || item.name === undefined"
|
|
3074
|
+
v-bind="getLabel(item.label)"
|
|
3115
3075
|
></es-label>
|
|
3116
3076
|
<es-input-number
|
|
3117
3077
|
v-if="item.type == 'number'"
|
|
@@ -4403,6 +4363,11 @@ export default {
|
|
|
4403
4363
|
});
|
|
4404
4364
|
},
|
|
4405
4365
|
methods: {
|
|
4366
|
+
getLabel(res) {
|
|
4367
|
+
return typeof res === 'string'
|
|
4368
|
+
? { contents: res }
|
|
4369
|
+
: { ...res, plain: res.plain || res.name === undefined };
|
|
4370
|
+
},
|
|
4406
4371
|
getHeight() {
|
|
4407
4372
|
if (
|
|
4408
4373
|
util.hasClass(this.$parent.$el, 'el-dialog__wrapper') ||
|
|
@@ -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
|
|
@@ -1233,6 +1223,11 @@ export default {
|
|
|
1233
1223
|
this.getWidth();
|
|
1234
1224
|
},
|
|
1235
1225
|
methods: {
|
|
1226
|
+
getLabel(res) {
|
|
1227
|
+
return typeof res === 'string'
|
|
1228
|
+
? { contents: res }
|
|
1229
|
+
: { ...res, plain: res.plain || res.name === undefined };
|
|
1230
|
+
},
|
|
1236
1231
|
getRules(res) {
|
|
1237
1232
|
if (res.rules && !res.hide) {
|
|
1238
1233
|
if (Array.isArray(res.rules)) {
|
|
@@ -253,7 +253,7 @@ 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,
|
|
@@ -628,7 +628,7 @@ export default {
|
|
|
628
628
|
this.isHeader = params.header;
|
|
629
629
|
let sysLogoIco = sessionStorage.getItem('sysLogoIco');
|
|
630
630
|
sysLogoIco && util.setFavicon(sysLogoIco);
|
|
631
|
-
this.
|
|
631
|
+
this.getConfig(params);
|
|
632
632
|
},
|
|
633
633
|
mounted() {
|
|
634
634
|
util.win.reLogin = this.handleReLogin;
|
|
@@ -643,153 +643,6 @@ export default {
|
|
|
643
643
|
util.win.windowOpen = this.openPage;
|
|
644
644
|
},
|
|
645
645
|
methods: {
|
|
646
|
-
async isLogin(query) {
|
|
647
|
-
const token =
|
|
648
|
-
util.getStorage('token') || util.getStorage('Authorization');
|
|
649
|
-
|
|
650
|
-
let loginPage = util.getStorage('login') || util.getStorage('loginPage');
|
|
651
|
-
if (loginPage) {
|
|
652
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
653
|
-
let pathname = util.win.top.location.pathname;
|
|
654
|
-
if (pathname !== '/') {
|
|
655
|
-
pathname = pathname.split('/');
|
|
656
|
-
pathname.splice(pathname.length - 1);
|
|
657
|
-
pathname = pathname.join('/');
|
|
658
|
-
loginPage = pathname + '/' + loginPage.replace('./', '');
|
|
659
|
-
} else {
|
|
660
|
-
loginPage = pathname + loginPage.replace('./', '');
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
if (
|
|
665
|
-
!token &&
|
|
666
|
-
query &&
|
|
667
|
-
Object.prototype.hasOwnProperty.call(query, 'serverId') &&
|
|
668
|
-
Object.prototype.hasOwnProperty.call(query, 'authType')
|
|
669
|
-
) {
|
|
670
|
-
await util
|
|
671
|
-
.ajax({
|
|
672
|
-
method: 'post',
|
|
673
|
-
url: authCenter,
|
|
674
|
-
data: query
|
|
675
|
-
})
|
|
676
|
-
.then((res) => {
|
|
677
|
-
if (res.rCode === 0) {
|
|
678
|
-
let { results } = res;
|
|
679
|
-
switch (results.statusCode) {
|
|
680
|
-
case 0:
|
|
681
|
-
util.setStorage({
|
|
682
|
-
type: this.storage,
|
|
683
|
-
key: {
|
|
684
|
-
ssId: results.ssId,
|
|
685
|
-
token: results.token,
|
|
686
|
-
Authorization: results.token,
|
|
687
|
-
deviceUnique: results.deviceUnique
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
if (query.openType) {
|
|
691
|
-
let url = util.win.top.location.href;
|
|
692
|
-
let newUrl = util.delUrlParam({
|
|
693
|
-
url: url,
|
|
694
|
-
key: ['serverId', 'authType', 'openType']
|
|
695
|
-
});
|
|
696
|
-
switch (query.openType) {
|
|
697
|
-
case 'self':
|
|
698
|
-
util.win.location.href = newUrl;
|
|
699
|
-
break;
|
|
700
|
-
case 'blank':
|
|
701
|
-
util.win.open(newUrl);
|
|
702
|
-
break;
|
|
703
|
-
case 'parent':
|
|
704
|
-
util.win.parent.location.href = href;
|
|
705
|
-
break;
|
|
706
|
-
default:
|
|
707
|
-
util.win.top.location.href = href;
|
|
708
|
-
}
|
|
709
|
-
} else {
|
|
710
|
-
this.getConfig();
|
|
711
|
-
}
|
|
712
|
-
break;
|
|
713
|
-
case 1:
|
|
714
|
-
break;
|
|
715
|
-
case 2:
|
|
716
|
-
break;
|
|
717
|
-
case 3:
|
|
718
|
-
const href = results.authorizeUrl.replace(
|
|
719
|
-
'{redirectUri}',
|
|
720
|
-
encodeURIComponent(url)
|
|
721
|
-
);
|
|
722
|
-
switch (query.openType) {
|
|
723
|
-
case 'self':
|
|
724
|
-
util.win.location.href = href;
|
|
725
|
-
break;
|
|
726
|
-
case 'blank':
|
|
727
|
-
util.win.open(href);
|
|
728
|
-
break;
|
|
729
|
-
case 'parent':
|
|
730
|
-
util.win.parent.location.href = href;
|
|
731
|
-
break;
|
|
732
|
-
default:
|
|
733
|
-
util.win.top.location.href = href;
|
|
734
|
-
}
|
|
735
|
-
break;
|
|
736
|
-
case 4:
|
|
737
|
-
this.$alert(
|
|
738
|
-
results.msg
|
|
739
|
-
? results.msg
|
|
740
|
-
: '账号未绑定,账号密码登录后自动绑定!',
|
|
741
|
-
'提示',
|
|
742
|
-
{
|
|
743
|
-
confirmButtonText: '确定',
|
|
744
|
-
type: 'error',
|
|
745
|
-
callback: () => {
|
|
746
|
-
sessionStorage.setItem(
|
|
747
|
-
'extUserBindHandleId',
|
|
748
|
-
results.extUserBindHandleId
|
|
749
|
-
);
|
|
750
|
-
//window.location.href = delUrlParam({ key: 'code' });
|
|
751
|
-
if (loginPage) {
|
|
752
|
-
util.win.top.location.replace(loginPage);
|
|
753
|
-
} else if (document.referrer) {
|
|
754
|
-
util.win.top.location.replace(document.referrer);
|
|
755
|
-
} else if (
|
|
756
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
757
|
-
) {
|
|
758
|
-
util.win.top.location.href = './login.html';
|
|
759
|
-
} else {
|
|
760
|
-
this.$router.replace('/login');
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
);
|
|
765
|
-
break;
|
|
766
|
-
default:
|
|
767
|
-
}
|
|
768
|
-
} else {
|
|
769
|
-
this.$alert(res.msg, '提示', {
|
|
770
|
-
confirmButtonText: '确定',
|
|
771
|
-
type: 'error',
|
|
772
|
-
callback: () => {
|
|
773
|
-
if (loginPage) {
|
|
774
|
-
util.win.top.location.replace(loginPage);
|
|
775
|
-
} else if (document.referrer) {
|
|
776
|
-
util.win.top.location.replace(document.referrer);
|
|
777
|
-
} else if (
|
|
778
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
779
|
-
) {
|
|
780
|
-
util.win.top.location.href = './login.html';
|
|
781
|
-
} else {
|
|
782
|
-
this.$router.replace('/login');
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
})
|
|
788
|
-
.catch((e) => {});
|
|
789
|
-
} else {
|
|
790
|
-
this.getConfig();
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
646
|
menuSuccess(res) {
|
|
794
647
|
// this.menus
|
|
795
648
|
this.menuType = 'custom';
|
|
@@ -1055,7 +908,16 @@ export default {
|
|
|
1055
908
|
}
|
|
1056
909
|
},
|
|
1057
910
|
//获取用户配置及信息
|
|
1058
|
-
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
|
+
}
|
|
1059
921
|
if (util.getStorage('mainConfig')) {
|
|
1060
922
|
const results = JSON.parse(util.getStorage('mainConfig'));
|
|
1061
923
|
this.setConfig(results);
|
|
@@ -175,11 +175,7 @@ export default {
|
|
|
175
175
|
return this.options ? this.options : this.data;
|
|
176
176
|
},
|
|
177
177
|
labelVal() {
|
|
178
|
-
if (
|
|
179
|
-
this.readonly &&
|
|
180
|
-
(this.model || this.model === 0) &&
|
|
181
|
-
this.results.length
|
|
182
|
-
) {
|
|
178
|
+
if (this.readonly && this.model !== undefined && this.results.length) {
|
|
183
179
|
if (typeof this.model !== 'object') {
|
|
184
180
|
if (util.isObject(this.results[0])) {
|
|
185
181
|
let val;
|