eoss-ui 0.4.18 → 0.4.20
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 +88 -88
- package/lib/button.js +90 -90
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +89 -89
- package/lib/clients.js +2 -2
- package/lib/data-table-form.js +870 -198
- package/lib/data-table.js +91 -91
- package/lib/date-picker.js +90 -90
- package/lib/dialog.js +138 -105
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +1457 -630
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +112 -95
- package/lib/flow-list.js +92 -92
- package/lib/flow.js +152 -146
- package/lib/form.js +184 -103
- package/lib/handle-user.js +91 -91
- package/lib/handler.js +91 -91
- package/lib/index.js +1 -1
- package/lib/input-number.js +90 -90
- package/lib/input.js +90 -90
- package/lib/label.js +2 -2
- package/lib/login.js +174 -131
- package/lib/main.js +111 -108
- package/lib/mainComp.js +107 -106
- package/lib/menu.js +2 -2
- package/lib/nav.js +90 -90
- package/lib/notify.js +95 -95
- package/lib/page.js +90 -90
- package/lib/pagination.js +2 -2
- package/lib/player.js +90 -90
- package/lib/qr-code.js +97 -97
- package/lib/radio-group.js +91 -91
- package/lib/select-ganged.js +90 -90
- package/lib/select.js +101 -101
- package/lib/selector-panel.js +115 -108
- package/lib/selector.js +91 -91
- package/lib/sizer.js +92 -92
- package/lib/steps.js +90 -90
- package/lib/switch.js +90 -90
- package/lib/table-form.js +97 -97
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +113 -94
- package/lib/theme-chalk/data-table-form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/tips.js +91 -91
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +105 -95
- package/lib/tree.js +97 -93
- package/lib/upload.js +175 -125
- package/lib/wujie.js +90 -90
- package/lib/wxlogin.js +90 -90
- package/package.json +2 -2
- package/packages/data-table-form/src/checkbox.vue +101 -0
- package/packages/data-table-form/src/radio.vue +65 -0
- package/packages/data-table-form/src/table.vue +34 -6
- package/packages/data-table-form/src/tbody.vue +139 -25
- package/packages/dialog/src/main.vue +29 -3
- package/packages/flow/src/main.vue +103 -87
- package/packages/flow-group/src/main.vue +22 -13
- package/packages/form/src/main.vue +564 -471
- package/packages/login/src/main.vue +79 -34
- package/packages/main/src/main.vue +3 -1
- package/packages/select/src/main.vue +20 -20
- package/packages/selector-panel/src/main.vue +27 -17
- package/packages/tabs/src/main.vue +20 -12
- package/packages/theme-chalk/lib/data-table-form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/data-table-form.scss +7 -6
- package/packages/theme-chalk/src/index.scss +0 -1
- package/packages/tree/src/main.vue +4 -0
- package/packages/tree-group/src/main.vue +7 -4
- package/packages/upload/src/main.vue +77 -20
- package/src/index.js +1 -4
- package/lib/ca-login.js +0 -326
- package/lib/theme-chalk/ca-login.css +0 -1
- package/packages/ca-login/index.js +0 -5
- package/packages/ca-login/src/main.vue +0 -62
- package/packages/theme-chalk/lib/ca-login.css +0 -1
- package/packages/theme-chalk/src/ca-login.scss +0 -4
|
@@ -301,6 +301,7 @@
|
|
|
301
301
|
:visible.sync="showDownLoadApp"
|
|
302
302
|
><es-clients v-bind="download"></es-clients>
|
|
303
303
|
</es-dialog>
|
|
304
|
+
<slot name="calogin"></slot>
|
|
304
305
|
</div>
|
|
305
306
|
</template>
|
|
306
307
|
<script>
|
|
@@ -315,7 +316,8 @@ import {
|
|
|
315
316
|
doQrLogin,
|
|
316
317
|
getLoginCode,
|
|
317
318
|
doCodeLogin,
|
|
318
|
-
doWechatQrLogin
|
|
319
|
+
doWechatQrLogin,
|
|
320
|
+
doCaLogin
|
|
319
321
|
} from 'eoss-ui/src/config/api.js';
|
|
320
322
|
export default {
|
|
321
323
|
name: 'EsLogin',
|
|
@@ -408,6 +410,11 @@ export default {
|
|
|
408
410
|
type: String,
|
|
409
411
|
default: doUserLogin
|
|
410
412
|
},
|
|
413
|
+
//ca登录地址
|
|
414
|
+
caAction: {
|
|
415
|
+
type: String,
|
|
416
|
+
default: doCaLogin
|
|
417
|
+
},
|
|
411
418
|
//扫码登录接口地址
|
|
412
419
|
scanAction: {
|
|
413
420
|
type: String,
|
|
@@ -549,22 +556,22 @@ export default {
|
|
|
549
556
|
const types = this.loginType.split(',');
|
|
550
557
|
return types.length > 2
|
|
551
558
|
? {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
+
0: { type: '0', icon: 'es-icon-shuru', name: '账号登录' },
|
|
560
|
+
1: { type: '1', icon: 'es-icon-usb-key', name: '证书登录' },
|
|
561
|
+
3: { type: '3', icon: 'es-icon-saoma', name: '扫码登录' },
|
|
562
|
+
6: { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
|
|
563
|
+
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
564
|
+
9: { type: '9', icon: 'es-icon-weixin', name: '微信扫码登录' },
|
|
565
|
+
11: { type: '11', icon: 'es-icon-youxiang', name: '邮箱登录' }
|
|
559
566
|
}
|
|
560
567
|
: {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
+
0: { type: '0', icon: 'es-icon-jianpan', name: '账号登录' },
|
|
569
|
+
1: { type: '1', icon: 'es-icon-ca', name: '证书登录' },
|
|
570
|
+
3: { type: '3', icon: 'es-icon-qrcode', name: '扫码登录' },
|
|
571
|
+
6: { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
|
|
572
|
+
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
573
|
+
9: { type: '9', icon: 'es-icon-weixin', name: '微信扫码登录' },
|
|
574
|
+
11: {
|
|
568
575
|
type: '11',
|
|
569
576
|
icon: 'es-icon-wodeyouxiang',
|
|
570
577
|
name: '邮箱登录'
|
|
@@ -574,7 +581,7 @@ export default {
|
|
|
574
581
|
icons() {
|
|
575
582
|
let icon = [];
|
|
576
583
|
const types = this.loginType.split(',');
|
|
577
|
-
types.forEach(item => {
|
|
584
|
+
types.forEach((item) => {
|
|
578
585
|
icon.push(this.iconfonts[item]);
|
|
579
586
|
});
|
|
580
587
|
return icon;
|
|
@@ -688,7 +695,7 @@ export default {
|
|
|
688
695
|
url: this.doWechatQrLogin,
|
|
689
696
|
data: { code: code }
|
|
690
697
|
})
|
|
691
|
-
.then(res => {
|
|
698
|
+
.then((res) => {
|
|
692
699
|
if (res.rCode == 0) {
|
|
693
700
|
const results = res.results;
|
|
694
701
|
this.handleResults(results);
|
|
@@ -708,7 +715,7 @@ export default {
|
|
|
708
715
|
});
|
|
709
716
|
}
|
|
710
717
|
})
|
|
711
|
-
.catch(err => {
|
|
718
|
+
.catch((err) => {
|
|
712
719
|
if (err.message && err.message !== 'canceled') {
|
|
713
720
|
this.$message.error(err.message);
|
|
714
721
|
}
|
|
@@ -721,7 +728,7 @@ export default {
|
|
|
721
728
|
}
|
|
722
729
|
if (Array.isArray(urls)) {
|
|
723
730
|
url = urls
|
|
724
|
-
.map(item => {
|
|
731
|
+
.map((item) => {
|
|
725
732
|
return `url(${item})`;
|
|
726
733
|
})
|
|
727
734
|
.join(',');
|
|
@@ -804,9 +811,11 @@ export default {
|
|
|
804
811
|
switchLogin(res) {
|
|
805
812
|
//this.$refs.login && this.$refs.login.resetFields();
|
|
806
813
|
this.$refs.login && this.$refs.login.clearValidate();
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
814
|
+
if (res != 1) {
|
|
815
|
+
this.active = res;
|
|
816
|
+
this.formData = JSON.parse(JSON.stringify(this.defaultModel));
|
|
817
|
+
}
|
|
818
|
+
this.$emit('change-type', res, this.identifyingId);
|
|
810
819
|
},
|
|
811
820
|
isShow(res) {
|
|
812
821
|
return this.loginType.indexOf(res) > -1;
|
|
@@ -818,7 +827,7 @@ export default {
|
|
|
818
827
|
} else {
|
|
819
828
|
util
|
|
820
829
|
.ajax({ url: this.initLogin })
|
|
821
|
-
.then(res => {
|
|
830
|
+
.then((res) => {
|
|
822
831
|
if (res && res.rCode === 0) {
|
|
823
832
|
store.set('initLogin', res.results);
|
|
824
833
|
util.setStorage({
|
|
@@ -835,7 +844,7 @@ export default {
|
|
|
835
844
|
});
|
|
836
845
|
}
|
|
837
846
|
})
|
|
838
|
-
.catch(err => {
|
|
847
|
+
.catch((err) => {
|
|
839
848
|
if (err.message && err.message !== 'canceled') {
|
|
840
849
|
this.$message.error(err.message);
|
|
841
850
|
}
|
|
@@ -915,7 +924,7 @@ export default {
|
|
|
915
924
|
return false;
|
|
916
925
|
} else {
|
|
917
926
|
let flag = false;
|
|
918
|
-
this.$refs.login.validateField('target', res => {
|
|
927
|
+
this.$refs.login.validateField('target', (res) => {
|
|
919
928
|
flag = res != '';
|
|
920
929
|
});
|
|
921
930
|
if (flag) {
|
|
@@ -942,7 +951,7 @@ export default {
|
|
|
942
951
|
url: this.getLoginCode,
|
|
943
952
|
data: data
|
|
944
953
|
})
|
|
945
|
-
.then(res => {
|
|
954
|
+
.then((res) => {
|
|
946
955
|
this.$message({
|
|
947
956
|
message: res.msg,
|
|
948
957
|
duration: 2000,
|
|
@@ -952,7 +961,7 @@ export default {
|
|
|
952
961
|
// clearInterval(this.timer);
|
|
953
962
|
// }
|
|
954
963
|
})
|
|
955
|
-
.catch(err => {
|
|
964
|
+
.catch((err) => {
|
|
956
965
|
if (err.message && err.message !== 'canceled') {
|
|
957
966
|
this.$message.error(err.message);
|
|
958
967
|
}
|
|
@@ -963,7 +972,7 @@ export default {
|
|
|
963
972
|
if (this.submit) {
|
|
964
973
|
return false;
|
|
965
974
|
}
|
|
966
|
-
this.$refs['login'].validate(valid => {
|
|
975
|
+
this.$refs['login'].validate((valid) => {
|
|
967
976
|
if (valid) {
|
|
968
977
|
this.submit = true;
|
|
969
978
|
const data =
|
|
@@ -1020,7 +1029,7 @@ export default {
|
|
|
1020
1029
|
? { ...data, extUserBindHandleId: extUserBindHandleId }
|
|
1021
1030
|
: data
|
|
1022
1031
|
})
|
|
1023
|
-
.then(res => {
|
|
1032
|
+
.then((res) => {
|
|
1024
1033
|
this.submit = false;
|
|
1025
1034
|
if (res.rCode == 0) {
|
|
1026
1035
|
sessionStorage.removeItem('extUserBindHandleId');
|
|
@@ -1044,7 +1053,43 @@ export default {
|
|
|
1044
1053
|
this.onError(res);
|
|
1045
1054
|
}
|
|
1046
1055
|
})
|
|
1047
|
-
.catch(err => {
|
|
1056
|
+
.catch((err) => {
|
|
1057
|
+
this.submit = false;
|
|
1058
|
+
if (err.message && err.message !== 'canceled') {
|
|
1059
|
+
this.$message.error(err.message);
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
},
|
|
1063
|
+
caLogin(signedData) {
|
|
1064
|
+
util
|
|
1065
|
+
.ajax({
|
|
1066
|
+
method: 'post',
|
|
1067
|
+
url: this.caAction,
|
|
1068
|
+
data: { identifyingId: this.identifyingId, signedData: signedData }
|
|
1069
|
+
})
|
|
1070
|
+
.then((res) => {
|
|
1071
|
+
this.submit = false;
|
|
1072
|
+
if (res.rCode == 0) {
|
|
1073
|
+
const results = res.results;
|
|
1074
|
+
this.handleResults(results);
|
|
1075
|
+
if (this.onSuccess) {
|
|
1076
|
+
this.onSuccess(res);
|
|
1077
|
+
}
|
|
1078
|
+
} else {
|
|
1079
|
+
const msg =
|
|
1080
|
+
res.results && res.results.msg ? res.results.msg : res.msg;
|
|
1081
|
+
this.$message({
|
|
1082
|
+
message: msg || '系统错误,请联系管理员!',
|
|
1083
|
+
type: 'error',
|
|
1084
|
+
duration: 1500,
|
|
1085
|
+
onClose: () => {
|
|
1086
|
+
this.getImgCode();
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
this.onError(res);
|
|
1090
|
+
}
|
|
1091
|
+
})
|
|
1092
|
+
.catch((err) => {
|
|
1048
1093
|
if (err.message && err.message !== 'canceled') {
|
|
1049
1094
|
this.$message.error(err.message);
|
|
1050
1095
|
}
|
|
@@ -1079,13 +1124,13 @@ export default {
|
|
|
1079
1124
|
identifyingId: this.identifyingId
|
|
1080
1125
|
}
|
|
1081
1126
|
})
|
|
1082
|
-
.then(res => {
|
|
1127
|
+
.then((res) => {
|
|
1083
1128
|
if (res.rCode === 0) {
|
|
1084
1129
|
const results = res.results;
|
|
1085
1130
|
this.handleResults(results, 3);
|
|
1086
1131
|
}
|
|
1087
1132
|
})
|
|
1088
|
-
.catch(err => {
|
|
1133
|
+
.catch((err) => {
|
|
1089
1134
|
clearInterval(this.interval);
|
|
1090
1135
|
if (err.message && err.message !== 'canceled') {
|
|
1091
1136
|
this.$message.error(err.message);
|
|
@@ -1145,7 +1190,7 @@ export default {
|
|
|
1145
1190
|
this.showResetPassword = true;
|
|
1146
1191
|
}
|
|
1147
1192
|
})
|
|
1148
|
-
.catch(e => {});
|
|
1193
|
+
.catch((e) => {});
|
|
1149
1194
|
break;
|
|
1150
1195
|
case 3:
|
|
1151
1196
|
let url =
|
|
@@ -1185,7 +1230,7 @@ export default {
|
|
|
1185
1230
|
location.reload();
|
|
1186
1231
|
}
|
|
1187
1232
|
})
|
|
1188
|
-
.catch(e => {});
|
|
1233
|
+
.catch((e) => {});
|
|
1189
1234
|
break;
|
|
1190
1235
|
default:
|
|
1191
1236
|
if (type !== 3) {
|
|
@@ -513,6 +513,8 @@ export default {
|
|
|
513
513
|
if (this.socket) {
|
|
514
514
|
this.initWebSocket();
|
|
515
515
|
}
|
|
516
|
+
let sysLogoIco = sessionStorage.getItem('sysLogoIco');
|
|
517
|
+
sysLogoIco && util.setFavicon(sysLogoIco);
|
|
516
518
|
},
|
|
517
519
|
mounted() {
|
|
518
520
|
util.win.reLogin = this.handleReLogin;
|
|
@@ -643,6 +645,7 @@ export default {
|
|
|
643
645
|
sessionStorage.setItem('useCaseCodes', results[i]);
|
|
644
646
|
}
|
|
645
647
|
if (i === 'sysLogoIco' && results[i]) {
|
|
648
|
+
sessionStorage.setItem('sysLogoIco', results[i]);
|
|
646
649
|
util.setFavicon(results[i]);
|
|
647
650
|
}
|
|
648
651
|
if (i === 'userStyle' && results[i].color) {
|
|
@@ -1212,7 +1215,6 @@ export default {
|
|
|
1212
1215
|
},
|
|
1213
1216
|
//跳转页面
|
|
1214
1217
|
handleJump(page, type, res) {
|
|
1215
|
-
console.log(page);
|
|
1216
1218
|
if (util.win.location.hash === page) {
|
|
1217
1219
|
this.refresh = true;
|
|
1218
1220
|
return;
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
valueType: {
|
|
37
37
|
type: String,
|
|
38
38
|
default: 'string',
|
|
39
|
-
validator: function(value) {
|
|
39
|
+
validator: function (value) {
|
|
40
40
|
return ['string', 'object'].includes(value);
|
|
41
41
|
}
|
|
42
42
|
},
|
|
@@ -153,10 +153,10 @@ export default {
|
|
|
153
153
|
if (this.filtrate) {
|
|
154
154
|
if (Array.isArray(this.filtrate) && this.filtrate.length) {
|
|
155
155
|
let ary = [];
|
|
156
|
-
this.filtrate.forEach(items => {
|
|
156
|
+
this.filtrate.forEach((items) => {
|
|
157
157
|
let val = typeof items === 'string' ? items : items[this.valKey];
|
|
158
158
|
ary.concat(
|
|
159
|
-
this.data.filter(item => {
|
|
159
|
+
this.data.filter((item) => {
|
|
160
160
|
return item[this.filtrateKey] == val;
|
|
161
161
|
})
|
|
162
162
|
);
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
typeof this.filtrate === 'string'
|
|
167
167
|
? this.filtrate
|
|
168
168
|
: this.filtrate[this.valKey];
|
|
169
|
-
return this.data.filter(item => {
|
|
169
|
+
return this.data.filter((item) => {
|
|
170
170
|
return item[this.filtrateKey] == val;
|
|
171
171
|
});
|
|
172
172
|
}
|
|
@@ -225,7 +225,7 @@ export default {
|
|
|
225
225
|
let filte =
|
|
226
226
|
filtrate && util.isObject(filtrate) ? filtrate[this.valKey] : filtrate;
|
|
227
227
|
let eles = [];
|
|
228
|
-
data.forEach(item => {
|
|
228
|
+
data.forEach((item) => {
|
|
229
229
|
if (this.models === undefined && item.selected) {
|
|
230
230
|
this.$emit(
|
|
231
231
|
'input',
|
|
@@ -288,7 +288,7 @@ export default {
|
|
|
288
288
|
});
|
|
289
289
|
return eles;
|
|
290
290
|
},
|
|
291
|
-
getData(sysCode, param) {
|
|
291
|
+
getData(sysCode, param, reload) {
|
|
292
292
|
if (
|
|
293
293
|
!this.ajax ||
|
|
294
294
|
(!this.isNoParamRequest && Object.keys(this.param).length == 0)
|
|
@@ -296,7 +296,7 @@ export default {
|
|
|
296
296
|
return false;
|
|
297
297
|
}
|
|
298
298
|
let params = {};
|
|
299
|
-
if (this.results.length === 0) {
|
|
299
|
+
if (this.results.length === 0 || reload) {
|
|
300
300
|
params = util.extend(
|
|
301
301
|
{},
|
|
302
302
|
this.param,
|
|
@@ -317,7 +317,7 @@ export default {
|
|
|
317
317
|
params: params,
|
|
318
318
|
data: params
|
|
319
319
|
})
|
|
320
|
-
.then(res => {
|
|
320
|
+
.then((res) => {
|
|
321
321
|
this.loading = false;
|
|
322
322
|
if (res.rCode === 0) {
|
|
323
323
|
if (this.parseData) {
|
|
@@ -330,7 +330,7 @@ export default {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
})
|
|
333
|
-
.catch(err => {
|
|
333
|
+
.catch((err) => {
|
|
334
334
|
this.loading = false;
|
|
335
335
|
if (err.message && err.message !== 'canceled') {
|
|
336
336
|
this.$message.error(err.message);
|
|
@@ -351,10 +351,10 @@ export default {
|
|
|
351
351
|
params: params,
|
|
352
352
|
data: params
|
|
353
353
|
})
|
|
354
|
-
.then(res => {
|
|
354
|
+
.then((res) => {
|
|
355
355
|
this.loading = false;
|
|
356
356
|
if (res.rCode === 0) {
|
|
357
|
-
this.options = res.results.filter(item => {
|
|
357
|
+
this.options = res.results.filter((item) => {
|
|
358
358
|
if (item[this.label]) {
|
|
359
359
|
return (
|
|
360
360
|
item[this.label]
|
|
@@ -369,7 +369,7 @@ export default {
|
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
371
|
})
|
|
372
|
-
.catch(err => {
|
|
372
|
+
.catch((err) => {
|
|
373
373
|
this.loading = false;
|
|
374
374
|
if (err.message && err.message !== 'canceled') {
|
|
375
375
|
this.$message.error(err.message);
|
|
@@ -423,7 +423,7 @@ export default {
|
|
|
423
423
|
? { innerHTML: this.$attrs[type].icon }
|
|
424
424
|
: {},
|
|
425
425
|
on: {
|
|
426
|
-
click: e => {
|
|
426
|
+
click: (e) => {
|
|
427
427
|
this.$attrs[type].click &&
|
|
428
428
|
this.$attrs[type].click(this, this.model);
|
|
429
429
|
this.$attrs[type].event &&
|
|
@@ -473,7 +473,7 @@ export default {
|
|
|
473
473
|
return '';
|
|
474
474
|
},
|
|
475
475
|
reload(param) {
|
|
476
|
-
this.getData(null, param);
|
|
476
|
+
this.getData(null, param, true);
|
|
477
477
|
},
|
|
478
478
|
handleExpand(data, node) {
|
|
479
479
|
if (this.onExpand) {
|
|
@@ -502,11 +502,11 @@ export default {
|
|
|
502
502
|
}
|
|
503
503
|
if (this.onLoadsub) {
|
|
504
504
|
this.onLoadsub({ data, params, node })
|
|
505
|
-
.then(res => {
|
|
505
|
+
.then((res) => {
|
|
506
506
|
this.loading = false;
|
|
507
507
|
this.$set(data, 'children', JSON.parse(JSON.stringify(res)));
|
|
508
508
|
})
|
|
509
|
-
.catch(e => {
|
|
509
|
+
.catch((e) => {
|
|
510
510
|
this.loading = false;
|
|
511
511
|
});
|
|
512
512
|
} else {
|
|
@@ -517,7 +517,7 @@ export default {
|
|
|
517
517
|
data: params,
|
|
518
518
|
params: params
|
|
519
519
|
})
|
|
520
|
-
.then(res => {
|
|
520
|
+
.then((res) => {
|
|
521
521
|
if (res.rCode === 0) {
|
|
522
522
|
this.loading = false;
|
|
523
523
|
let results = JSON.parse(JSON.stringify(res.results));
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
})
|
|
537
|
-
.catch(err => {
|
|
537
|
+
.catch((err) => {
|
|
538
538
|
this.loading = false;
|
|
539
539
|
if (err.message && err.message !== 'canceled') {
|
|
540
540
|
this.$message.error(err.message);
|
|
@@ -552,7 +552,7 @@ export default {
|
|
|
552
552
|
if (this.readonly) {
|
|
553
553
|
let dom = [];
|
|
554
554
|
if (Array.isArray(this.models)) {
|
|
555
|
-
dom = this.models.map(item => {
|
|
555
|
+
dom = this.models.map((item) => {
|
|
556
556
|
if (util.isObject(item)) {
|
|
557
557
|
if (!item[this.label] && !item.label) {
|
|
558
558
|
return this.getLabel(value[this.valKey], data);
|
|
@@ -588,7 +588,7 @@ export default {
|
|
|
588
588
|
let cls = [];
|
|
589
589
|
if (this.results.length && !this.tree) {
|
|
590
590
|
if (this.filtrate && Array.isArray(this.filtrate)) {
|
|
591
|
-
doms = this.filtrate.map(item => {
|
|
591
|
+
doms = this.filtrate.map((item) => {
|
|
592
592
|
return h(
|
|
593
593
|
'el-option-group',
|
|
594
594
|
{
|
|
@@ -531,6 +531,16 @@ export default {
|
|
|
531
531
|
this.ajaxActive(val);
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
|
+
tabs: {
|
|
535
|
+
deep: true,
|
|
536
|
+
handler() {
|
|
537
|
+
this.loading = true;
|
|
538
|
+
this.getTreeData(
|
|
539
|
+
this.host + this.newTabs[this.activeName].url,
|
|
540
|
+
this.newTabs[this.activeName].param
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
},
|
|
534
544
|
value: {
|
|
535
545
|
immediate: true,
|
|
536
546
|
handler(val) {
|
|
@@ -544,7 +554,7 @@ export default {
|
|
|
544
554
|
},
|
|
545
555
|
checkboxs(val) {
|
|
546
556
|
let flag = this.checkboxs.length ? true : false;
|
|
547
|
-
this.checkboxs.forEach(item => {
|
|
557
|
+
this.checkboxs.forEach((item) => {
|
|
548
558
|
if (util.isObject(item)) {
|
|
549
559
|
if (util.indexOfObj(this.checkeds, item) === -1) {
|
|
550
560
|
flag = false;
|
|
@@ -565,7 +575,7 @@ export default {
|
|
|
565
575
|
this.checkAll = false;
|
|
566
576
|
} else {
|
|
567
577
|
let flag = true;
|
|
568
|
-
this.checkboxs.forEach(item => {
|
|
578
|
+
this.checkboxs.forEach((item) => {
|
|
569
579
|
if (util.isObject(item)) {
|
|
570
580
|
if (util.indexOfObj(val, item) === -1) {
|
|
571
581
|
flag = false;
|
|
@@ -625,13 +635,13 @@ export default {
|
|
|
625
635
|
params: this.param,
|
|
626
636
|
data: this.param
|
|
627
637
|
})
|
|
628
|
-
.then(res => {
|
|
638
|
+
.then((res) => {
|
|
629
639
|
if (res.rCode === 0) {
|
|
630
640
|
this.selections = JSON.parse(JSON.stringify(res.results));
|
|
631
641
|
this.checkboxs = JSON.parse(JSON.stringify(res.results)) || [];
|
|
632
642
|
}
|
|
633
643
|
})
|
|
634
|
-
.catch(err => {
|
|
644
|
+
.catch((err) => {
|
|
635
645
|
if (err.message && err.message !== 'canceled') {
|
|
636
646
|
this.$message.error(err.message);
|
|
637
647
|
}
|
|
@@ -649,7 +659,7 @@ export default {
|
|
|
649
659
|
}
|
|
650
660
|
util
|
|
651
661
|
.ajax({ method: this.method, url: url, params: data, data: data })
|
|
652
|
-
.then(res => {
|
|
662
|
+
.then((res) => {
|
|
653
663
|
if (res.rCode === 0) {
|
|
654
664
|
this.loading = false;
|
|
655
665
|
if (!Object.prototype.hasOwnProperty.call(params, 'seachkey')) {
|
|
@@ -670,7 +680,7 @@ export default {
|
|
|
670
680
|
}
|
|
671
681
|
}
|
|
672
682
|
})
|
|
673
|
-
.catch(err => {
|
|
683
|
+
.catch((err) => {
|
|
674
684
|
if (err.message && err.message !== 'canceled') {
|
|
675
685
|
this.$message.error(err.message);
|
|
676
686
|
}
|
|
@@ -703,7 +713,7 @@ export default {
|
|
|
703
713
|
params: params,
|
|
704
714
|
data: params
|
|
705
715
|
})
|
|
706
|
-
.then(res => {
|
|
716
|
+
.then((res) => {
|
|
707
717
|
if (res.rCode === 0) {
|
|
708
718
|
data.selection = JSON.parse(JSON.stringify(res.results));
|
|
709
719
|
this.$set(
|
|
@@ -716,7 +726,7 @@ export default {
|
|
|
716
726
|
this.checkboxs = this.trees[this.activeName].selection;
|
|
717
727
|
}
|
|
718
728
|
})
|
|
719
|
-
.catch(err => {
|
|
729
|
+
.catch((err) => {
|
|
720
730
|
if (err.message && err.message !== 'canceled') {
|
|
721
731
|
this.$message.error(err.message);
|
|
722
732
|
}
|
|
@@ -748,7 +758,7 @@ export default {
|
|
|
748
758
|
data: params,
|
|
749
759
|
params: params
|
|
750
760
|
})
|
|
751
|
-
.then(res => {
|
|
761
|
+
.then((res) => {
|
|
752
762
|
if (res.rCode === 0) {
|
|
753
763
|
this.loading = false;
|
|
754
764
|
this.$set(
|
|
@@ -763,7 +773,7 @@ export default {
|
|
|
763
773
|
);
|
|
764
774
|
}
|
|
765
775
|
})
|
|
766
|
-
.catch(err => {
|
|
776
|
+
.catch((err) => {
|
|
767
777
|
if (err.message && err.message !== 'canceled') {
|
|
768
778
|
this.$message.error(err.message);
|
|
769
779
|
}
|
|
@@ -805,7 +815,7 @@ export default {
|
|
|
805
815
|
} else {
|
|
806
816
|
if (this.isShowTree) {
|
|
807
817
|
this.nodeData.checkAll = false;
|
|
808
|
-
this.checkboxs.forEach(element => {
|
|
818
|
+
this.checkboxs.forEach((element) => {
|
|
809
819
|
for (let i in this.checkeds) {
|
|
810
820
|
if (
|
|
811
821
|
(isObject &&
|
|
@@ -842,7 +852,7 @@ export default {
|
|
|
842
852
|
if (this.isShowTree) {
|
|
843
853
|
if (this.nodeData && this.nodeData.selection) {
|
|
844
854
|
let arry = [];
|
|
845
|
-
this.nodeData.selection.forEach(item => {
|
|
855
|
+
this.nodeData.selection.forEach((item) => {
|
|
846
856
|
if (util.isObject(item)) {
|
|
847
857
|
if (item[this.labelKey].indexOf(this.search) > -1) {
|
|
848
858
|
arry.push(item);
|
|
@@ -857,7 +867,7 @@ export default {
|
|
|
857
867
|
}
|
|
858
868
|
} else {
|
|
859
869
|
let arry = [];
|
|
860
|
-
this.selections.forEach(item => {
|
|
870
|
+
this.selections.forEach((item) => {
|
|
861
871
|
if (util.isObject(item)) {
|
|
862
872
|
if (item[this.labelKey].indexOf(this.search) > -1) {
|
|
863
873
|
arry.push(item);
|
|
@@ -877,7 +887,7 @@ export default {
|
|
|
877
887
|
if (this.nodeData && this.nodeData.selection) {
|
|
878
888
|
if (this.search !== '') {
|
|
879
889
|
let arry = [];
|
|
880
|
-
this.nodeData.selection.forEach(item => {
|
|
890
|
+
this.nodeData.selection.forEach((item) => {
|
|
881
891
|
if (util.isObject(item)) {
|
|
882
892
|
if (item[this.labelKey].indexOf(this.search) > -1) {
|
|
883
893
|
arry.push(item);
|
|
@@ -905,12 +915,12 @@ export default {
|
|
|
905
915
|
namelike: this.search
|
|
906
916
|
}
|
|
907
917
|
})
|
|
908
|
-
.then(res => {
|
|
918
|
+
.then((res) => {
|
|
909
919
|
if (res.rCode === 0) {
|
|
910
920
|
this.checkboxs = JSON.parse(JSON.stringify(res.results));
|
|
911
921
|
}
|
|
912
922
|
})
|
|
913
|
-
.catch(err => {
|
|
923
|
+
.catch((err) => {
|
|
914
924
|
if (err.message && err.message !== 'canceled') {
|
|
915
925
|
this.$message.error(err.message);
|
|
916
926
|
}
|
|
@@ -919,7 +929,7 @@ export default {
|
|
|
919
929
|
} else {
|
|
920
930
|
if (this.search !== '') {
|
|
921
931
|
let arry = [];
|
|
922
|
-
this.selections.forEach(item => {
|
|
932
|
+
this.selections.forEach((item) => {
|
|
923
933
|
if (util.isObject(item)) {
|
|
924
934
|
if (item[this.labelKey].indexOf(this.search) > -1) {
|
|
925
935
|
arry.push(item);
|