eoss-ui 0.4.17 → 0.4.19
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 +144 -105
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +1518 -671
- 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 +187 -173
- package/lib/form.js +183 -102
- 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 +114 -113
- 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 +97 -95
- 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/flow.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.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 +104 -94
- 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 +35 -4
- package/packages/flow/src/main.vue +103 -87
- package/packages/flow/src/selectUser.vue +13 -12
- package/packages/flow-group/src/main.vue +22 -13
- package/packages/form/src/main.vue +563 -470
- package/packages/login/src/main.vue +79 -34
- package/packages/main/src/main.vue +6 -6
- package/packages/select/src/main.vue +20 -20
- package/packages/selector/src/main.vue +9 -9
- 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/flow.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/tree.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/data-table-form.scss +7 -6
- package/packages/theme-chalk/src/flow.scss +10 -20
- package/packages/theme-chalk/src/index.scss +0 -1
- package/packages/theme-chalk/src/tree.scss +1 -1
- package/packages/theme-chalk/src/upload.scss +10 -3
- package/packages/tree/src/main.vue +20 -13
- 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) {
|
|
@@ -215,9 +215,7 @@ export default {
|
|
|
215
215
|
//host
|
|
216
216
|
host: {
|
|
217
217
|
type: String,
|
|
218
|
-
default
|
|
219
|
-
return util.getStorage('host') ? util.getStorage('host') : '';
|
|
220
|
-
}
|
|
218
|
+
default: ''
|
|
221
219
|
},
|
|
222
220
|
header: {
|
|
223
221
|
type: Boolean,
|
|
@@ -515,6 +513,8 @@ export default {
|
|
|
515
513
|
if (this.socket) {
|
|
516
514
|
this.initWebSocket();
|
|
517
515
|
}
|
|
516
|
+
let sysLogoIco = sessionStorage.getItem('sysLogoIco');
|
|
517
|
+
sysLogoIco && util.setFavicon(sysLogoIco);
|
|
518
518
|
},
|
|
519
519
|
mounted() {
|
|
520
520
|
util.win.reLogin = this.handleReLogin;
|
|
@@ -645,6 +645,7 @@ export default {
|
|
|
645
645
|
sessionStorage.setItem('useCaseCodes', results[i]);
|
|
646
646
|
}
|
|
647
647
|
if (i === 'sysLogoIco' && results[i]) {
|
|
648
|
+
sessionStorage.setItem('sysLogoIco', results[i]);
|
|
648
649
|
util.setFavicon(results[i]);
|
|
649
650
|
}
|
|
650
651
|
if (i === 'userStyle' && results[i].color) {
|
|
@@ -1214,7 +1215,6 @@ export default {
|
|
|
1214
1215
|
},
|
|
1215
1216
|
//跳转页面
|
|
1216
1217
|
handleJump(page, type, res) {
|
|
1217
|
-
console.log(page);
|
|
1218
1218
|
if (util.win.location.hash === page) {
|
|
1219
1219
|
this.refresh = true;
|
|
1220
1220
|
return;
|
|
@@ -1232,7 +1232,7 @@ export default {
|
|
|
1232
1232
|
if (urls[0].indexOf('.js') > 1) {
|
|
1233
1233
|
this.method = 'wujie';
|
|
1234
1234
|
this.wjName = 'singlespa';
|
|
1235
|
-
this.page = page;
|
|
1235
|
+
this.page = this.host + page;
|
|
1236
1236
|
this.$nextTick(() => {
|
|
1237
1237
|
this.refresh = true;
|
|
1238
1238
|
});
|
|
@@ -1284,7 +1284,7 @@ export default {
|
|
|
1284
1284
|
} else {
|
|
1285
1285
|
this.method = 'wujie';
|
|
1286
1286
|
this.wjName = res.appCode ? res.appCode : 'application';
|
|
1287
|
-
this.page = page;
|
|
1287
|
+
this.page = this.host + page;
|
|
1288
1288
|
this.$nextTick(() => {
|
|
1289
1289
|
this.refresh = true;
|
|
1290
1290
|
});
|
|
@@ -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
|
{
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
ref="openDialog"
|
|
92
92
|
v-if="filterable && showButton"
|
|
93
93
|
@click.stop="openDialog"
|
|
94
|
-
>选择</el-button
|
|
94
|
+
><slot>选择</slot></el-button
|
|
95
95
|
>
|
|
96
96
|
</template>
|
|
97
97
|
</el-input>
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
ref="openDialog"
|
|
131
131
|
v-if="filterable && showButton"
|
|
132
132
|
@click.stop="openDialog"
|
|
133
|
-
>选择</el-button
|
|
133
|
+
><slot>选择</slot></el-button
|
|
134
134
|
>
|
|
135
135
|
</template>
|
|
136
136
|
</el-input>
|
|
@@ -249,7 +249,7 @@ export default {
|
|
|
249
249
|
valueType: {
|
|
250
250
|
type: String,
|
|
251
251
|
default: 'object',
|
|
252
|
-
validator: function(value) {
|
|
252
|
+
validator: function (value) {
|
|
253
253
|
return ['string', 'object'].includes(value);
|
|
254
254
|
}
|
|
255
255
|
},
|
|
@@ -350,7 +350,7 @@ export default {
|
|
|
350
350
|
return this.selected[this.labelKey];
|
|
351
351
|
} else if (Array.isArray(this.selected)) {
|
|
352
352
|
return this.selected
|
|
353
|
-
.map(item => {
|
|
353
|
+
.map((item) => {
|
|
354
354
|
return typeof item === 'string' ? item : item[this.labelKey];
|
|
355
355
|
})
|
|
356
356
|
.join(',');
|
|
@@ -442,11 +442,11 @@ export default {
|
|
|
442
442
|
url: this.action,
|
|
443
443
|
params: params
|
|
444
444
|
})
|
|
445
|
-
.then(res => {
|
|
445
|
+
.then((res) => {
|
|
446
446
|
if (res.rCode === 0) {
|
|
447
447
|
this.options = res.results;
|
|
448
448
|
if (this.selected.length && this.multiple) {
|
|
449
|
-
this.selected.forEach(item => {
|
|
449
|
+
this.selected.forEach((item) => {
|
|
450
450
|
let i = util.indexOfObj(this.options, item, this.valueKey);
|
|
451
451
|
if (i > -1) {
|
|
452
452
|
this.options[i].selected = true;
|
|
@@ -456,7 +456,7 @@ export default {
|
|
|
456
456
|
this.show = true;
|
|
457
457
|
}
|
|
458
458
|
})
|
|
459
|
-
.catch(err => {
|
|
459
|
+
.catch((err) => {
|
|
460
460
|
if (err.message && err.message !== 'canceled') {
|
|
461
461
|
this.$message.error(err.message);
|
|
462
462
|
}
|
|
@@ -528,7 +528,7 @@ export default {
|
|
|
528
528
|
let inputChildNodes = this.$refs.reference.$el.childNodes;
|
|
529
529
|
let input = [].filter.call(
|
|
530
530
|
inputChildNodes,
|
|
531
|
-
item => item.tagName === 'INPUT'
|
|
531
|
+
(item) => item.tagName === 'INPUT'
|
|
532
532
|
)[0];
|
|
533
533
|
if (input) {
|
|
534
534
|
input.focus();
|
|
@@ -567,7 +567,7 @@ export default {
|
|
|
567
567
|
let inputChildNodes = this.$refs.reference.$el.childNodes;
|
|
568
568
|
let input = [].filter.call(
|
|
569
569
|
inputChildNodes,
|
|
570
|
-
item => item.tagName === 'INPUT'
|
|
570
|
+
(item) => item.tagName === 'INPUT'
|
|
571
571
|
)[0];
|
|
572
572
|
input.style.height = height;
|
|
573
573
|
}
|