eoss-ui 0.5.63 → 0.5.65

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.
Files changed (82) hide show
  1. package/lib/button-group.js +43 -23
  2. package/lib/button.js +65 -39
  3. package/lib/calendar.js +13 -5
  4. package/lib/checkbox-group.js +4 -2
  5. package/lib/data-table-form.js +4 -2
  6. package/lib/data-table.js +112 -25
  7. package/lib/date-picker.js +4 -2
  8. package/lib/dialog.js +4 -2
  9. package/lib/eoss-ui.common.js +635 -393
  10. package/lib/flow-group.js +4 -2
  11. package/lib/flow-list.js +4 -2
  12. package/lib/flow.js +153 -123
  13. package/lib/form.js +9 -4
  14. package/lib/handle-user.js +4 -2
  15. package/lib/handler.js +4 -2
  16. package/lib/icon.js +4 -2
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +4 -2
  19. package/lib/input.js +4 -2
  20. package/lib/login.js +23 -6
  21. package/lib/main.js +189 -128
  22. package/lib/nav.js +4 -2
  23. package/lib/page.js +4 -2
  24. package/lib/player.js +4 -2
  25. package/lib/qr-code.js +13 -13
  26. package/lib/radio-group.js +4 -2
  27. package/lib/retrial-auth.js +4 -2
  28. package/lib/select-ganged.js +4 -2
  29. package/lib/select.js +4 -2
  30. package/lib/selector-panel.js +4 -2
  31. package/lib/selector.js +4 -2
  32. package/lib/sizer.js +4 -2
  33. package/lib/steps.js +4 -2
  34. package/lib/switch.js +4 -2
  35. package/lib/table-form.js +4 -2
  36. package/lib/tabs.js +4 -2
  37. package/lib/theme-chalk/base.css +1 -1
  38. package/lib/theme-chalk/button-group.css +1 -1
  39. package/lib/theme-chalk/button.css +1 -1
  40. package/lib/theme-chalk/calendar.css +1 -1
  41. package/lib/theme-chalk/index.css +1 -1
  42. package/lib/theme-chalk/main.css +1 -1
  43. package/lib/theme-chalk/menu.css +1 -1
  44. package/lib/theme-chalk/qr-code.css +1 -1
  45. package/lib/theme-chalk/sizer.css +1 -1
  46. package/lib/theme-chalk/upload.css +1 -1
  47. package/lib/tips.js +4 -2
  48. package/lib/tree-group.js +4 -2
  49. package/lib/tree.js +4 -2
  50. package/lib/upload.js +12 -8
  51. package/lib/utils/util.js +4 -2
  52. package/lib/wujie.js +4 -2
  53. package/lib/wxlogin.js +4 -2
  54. package/package.json +2 -2
  55. package/packages/button/src/main.vue +92 -56
  56. package/packages/button-group/src/main.vue +10 -1
  57. package/packages/calendar/src/main.vue +11 -4
  58. package/packages/data-table/src/children.vue +3 -1
  59. package/packages/data-table/src/main.vue +55 -10
  60. package/packages/flow/src/processForm.vue +32 -4
  61. package/packages/form/src/main.vue +3 -0
  62. package/packages/login/src/main.vue +12 -1
  63. package/packages/main/src/main.vue +147 -101
  64. package/packages/qr-code/src/main.vue +10 -5
  65. package/packages/theme-chalk/lib/base.css +1 -1
  66. package/packages/theme-chalk/lib/button-group.css +1 -1
  67. package/packages/theme-chalk/lib/button.css +1 -1
  68. package/packages/theme-chalk/lib/calendar.css +1 -1
  69. package/packages/theme-chalk/lib/index.css +1 -1
  70. package/packages/theme-chalk/lib/main.css +1 -1
  71. package/packages/theme-chalk/lib/menu.css +1 -1
  72. package/packages/theme-chalk/lib/qr-code.css +1 -1
  73. package/packages/theme-chalk/lib/sizer.css +1 -1
  74. package/packages/theme-chalk/lib/upload.css +1 -1
  75. package/packages/theme-chalk/src/base.scss +3 -0
  76. package/packages/theme-chalk/src/button-group.scss +110 -0
  77. package/packages/theme-chalk/src/button.scss +6 -0
  78. package/packages/theme-chalk/src/calendar.scss +3 -0
  79. package/packages/theme-chalk/src/qr-code.scss +1 -1
  80. package/packages/upload/src/main.vue +3 -1
  81. package/src/index.js +1 -1
  82. package/src/utils/util.js +4 -1
@@ -257,6 +257,7 @@ import {
257
257
  findSysCodes,
258
258
  getNotificationMsg,
259
259
  findCodeValues,
260
+ loginUserInfo,
260
261
  register
261
262
  } from 'eoss-ui/src/config/api';
262
263
  import util from 'eoss-ui/src/utils/util';
@@ -342,6 +343,7 @@ export default {
342
343
  }
343
344
  }
344
345
  },
346
+ userModel:{},
345
347
  nextUserTabs: {},
346
348
  selectPresetUserList: [],
347
349
  presetOptions: [],
@@ -384,12 +386,38 @@ export default {
384
386
  return ['employee', 'enterprise', 'department', 'persongroup'];
385
387
  }
386
388
  }
389
+ },
390
+ created() {
391
+ this.getUserInfo();
387
392
  },
388
393
  mounted() {
389
394
  this.getStartFlow(this.processDefinitionId);
390
395
  this.newOpinion = this.opinion;
391
396
  },
392
397
  methods: {
398
+ getUserInfo() {
399
+ let mainConfig = util.getStorage('mainConfig');
400
+ if (mainConfig) {
401
+ this.userModel = JSON.parse(mainConfig).userModel;
402
+ } else {
403
+ util
404
+ .ajax({ url: loginUserInfo })
405
+ .then((res) => {
406
+ const { status, data } = res;
407
+ if (status == 'success') {
408
+ this.userModel = data;
409
+ } else {
410
+ let msg = res.msg || '系统错误,请联系管理员!';
411
+ this.$message.error(msg);
412
+ }
413
+ })
414
+ .catch((err) => {
415
+ if (err.message && err.message !== 'canceled') {
416
+ this.$message.error(err.message);
417
+ }
418
+ });
419
+ }
420
+ },
393
421
  getIsShowNextUser(val) {
394
422
  if (
395
423
  val == 7 ||
@@ -751,15 +779,15 @@ export default {
751
779
  multiple = true;
752
780
  }
753
781
  if (val == 1 || val == 2 || val == 5) {
754
- params.filid = util.getStorage('orgId');
782
+ params.filid = this.userModel.orgId;
755
783
  params.only_filid = true;
756
784
  if (choiceOrgId) {
757
785
  params.filid = choiceOrgId;
758
786
  }
759
787
  }
760
788
  if (val == 5 || val == 6) {
761
- params.filid = util.getStorage('orgId');
762
- params.deptid = util.getStorage('orgId');
789
+ params.filid = this.userModel.orgId;
790
+ params.deptid = this.userModel.orgId;
763
791
  if (choiceDeptId) {
764
792
  params.deptid = choiceDeptId;
765
793
  }
@@ -768,7 +796,7 @@ export default {
768
796
  }
769
797
  }
770
798
  if (val == 15 || val == 16) {
771
- params.filid = util.getStorage('orgId');
799
+ params.filid = this.userModel.orgId;
772
800
  if (pOrgId) {
773
801
  params.filid = pOrgId;
774
802
  }
@@ -5011,6 +5011,9 @@ export default {
5011
5011
  this.$refs.esForm && this.$refs.esForm.clearValidate();
5012
5012
  },
5013
5013
  submitData(handle, close = true, type, validate = true) {
5014
+ if (this.readonly) {
5015
+ return Promise.resolve();
5016
+ }
5014
5017
  if (!handle) {
5015
5018
  handle = this.handles || {};
5016
5019
  }
@@ -186,6 +186,7 @@
186
186
  </div>
187
187
  <es-qr-code
188
188
  :content="identifyingId"
189
+ :logo="qrimg"
189
190
  v-if="active == 3 && identifyingId"
190
191
  ></es-qr-code>
191
192
  <div class="es-wx-qrcode-box" v-if="active == 9">
@@ -694,6 +695,11 @@ export default {
694
695
  this.loginInfo(val == 3);
695
696
  }
696
697
  },
698
+ identifyingId(val) {
699
+ if (val) {
700
+ this.loginInfo(this.active == 3);
701
+ }
702
+ },
697
703
  appName: {
698
704
  immediate: true,
699
705
  handler(val) {
@@ -1011,7 +1017,9 @@ export default {
1011
1017
  this.downloadSetup = res.downloadSetup;
1012
1018
  document.title = res.subsystemName;
1013
1019
  this.app = res.appName || res.subsystemName;
1014
- this.qrimg = res.qrimg || res.qrImg;
1020
+ if (res.qrimg || res.qrImg) {
1021
+ this.qrimg = res.qrimg || res.qrImg;
1022
+ }
1015
1023
  if (res.loginModel) {
1016
1024
  this.loginModel = res.loginModel;
1017
1025
  }
@@ -1342,6 +1350,9 @@ export default {
1342
1350
  }
1343
1351
  },
1344
1352
  initRequestLoginInfo() {
1353
+ if (this.identifyingId == '') {
1354
+ return false;
1355
+ }
1345
1356
  util
1346
1357
  .ajax({
1347
1358
  method: 'post',
@@ -291,10 +291,7 @@ export default {
291
291
  //菜单展开关闭
292
292
  icons: Object,
293
293
  //logo
294
- logo: {
295
- type: String,
296
- default: 'errorlogo'
297
- },
294
+ logo: String,
298
295
  //菜单显示类型
299
296
  scene: {
300
297
  type: String,
@@ -674,8 +671,9 @@ export default {
674
671
  },
675
672
  created() {
676
673
  let params = util.getParams() || {};
677
- this.homePage =
678
- typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
674
+ if (typeof this.loadHomePage === 'string') {
675
+ this.homePage = this.loadHomePage;
676
+ }
679
677
  this.isHeader = params.header;
680
678
  let sysLogoIco = sessionStorage.getItem('sysLogoIco');
681
679
  sysLogoIco && util.setFavicon(sysLogoIco);
@@ -794,11 +792,7 @@ export default {
794
792
  this.setTitle(ids[0]);
795
793
  }
796
794
  } else if (sessionStorage.getItem('jump') && this.isHistory) {
797
- let ids = this.getId(
798
- this.menus,
799
- sessionStorage.getItem('jump'),
800
- true
801
- );
795
+ let ids = this.getId(this.menus, sessionStorage.getItem('jump'));
802
796
  if (ids) {
803
797
  this.defaultActive = ids;
804
798
  this.navIds = ids;
@@ -810,18 +804,14 @@ export default {
810
804
  hash = hash.split('?')[0];
811
805
  }
812
806
  if (hash !== '#/' && hash !== '#/main') {
813
- let ids = this.getId(this.menus, util.win.location.hash, true);
807
+ let ids = this.getId(this.menus, util.win.location.hash);
814
808
  if (ids) {
815
809
  this.defaultActive = ids;
816
810
  this.navIds = ids;
817
811
  this.setTitle(ids[0]);
818
812
  }
819
813
  } else if (sessionStorage.getItem('jump') && this.isHistory) {
820
- let ids = this.getId(
821
- this.menus,
822
- sessionStorage.getItem('jump'),
823
- true
824
- );
814
+ let ids = this.getId(this.menus, sessionStorage.getItem('jump'));
825
815
  if (ids) {
826
816
  this.defaultActive = ids;
827
817
  this.navIds = ids;
@@ -910,10 +900,10 @@ export default {
910
900
  }
911
901
  let jump = sessionStorage.getItem('jump');
912
902
  if (
913
- !applicationid &&
914
- (!jump || !this.isHistory) &&
915
- hash === '#/' &&
916
- hash === '#/main'
903
+ (!applicationid &&
904
+ (!jump || !this.isHistory) &&
905
+ (hash === '#/' || hash === '#/main')) ||
906
+ jump == results[i]
917
907
  ) {
918
908
  this.homePage =
919
909
  typeof this.loadHomePage === 'string'
@@ -1035,17 +1025,71 @@ export default {
1035
1025
  }
1036
1026
  });
1037
1027
  },
1038
- jumpMenu(res, flag, param) {
1039
- let option = { url: res, flag: flag, param: param };
1028
+ /**
1029
+ * @desc 跳转菜单
1030
+ * @param {Object/String} [res] - 菜单id(多个用,隔开)或url地址或系统菜单数据对象
1031
+ * @param {Boolean} [isUrl] - res是否是url地址
1032
+ * @param {Object} [param] - 拼接地址后的参数
1033
+ */
1034
+ jumpMenu(res, isUrl, path) {
1035
+ let option = { url: res, isUrl: isUrl, path: path };
1040
1036
  if (util.isObject(res)) {
1041
- option = { ...option, ...res };
1037
+ if (res.urlopenmode == 1) {
1038
+ util.win.open(res.url);
1039
+ return;
1040
+ } else if (res.urlopenmode == 2) {
1041
+ location.href = res.url;
1042
+ return;
1043
+ } else {
1044
+ option = { ...option, ...res };
1045
+ }
1042
1046
  }
1043
1047
  let ids;
1044
1048
  if (typeof option.url === 'string') {
1045
- if (option.flag) {
1046
- ids = this.getId(this.menus, option.url, true);
1049
+ if (
1050
+ option.isUrl ||
1051
+ option.url.indexOf('.html') > -1 ||
1052
+ option.url.indexOf('.dhtml') > -1 ||
1053
+ option.url.indexOf('/#/') > -1 ||
1054
+ option.url.indexOf('#/') > -1
1055
+ ) {
1056
+ option.isUrlc = true;
1057
+ ids = this.getId(this.menus, option.url);
1047
1058
  if (!ids) {
1048
- this.$message.error('未在菜单栏中找到此地址');
1059
+ if (
1060
+ option.url.indexOf('.html') === -1 &&
1061
+ option.url.indexOf('#/') === -1
1062
+ ) {
1063
+ this.method = 'iframe';
1064
+ this.refresh = false;
1065
+ this.page = option.url;
1066
+ } else {
1067
+ this.method = 'router';
1068
+ const routes = this.$router.options.routes;
1069
+ if (routes) {
1070
+ let path = this.hasRouter(routes, option.url);
1071
+ if (path) {
1072
+ let params = util.getParams({ url: option.url });
1073
+ this.$router.push({
1074
+ path: path,
1075
+ query: params
1076
+ });
1077
+ } else {
1078
+ if (this.loadWujie === false || (this.downgrade && isIE)) {
1079
+ this.method = 'iframe';
1080
+ this.refresh = false;
1081
+ this.page = option.url;
1082
+ } else {
1083
+ this.method = 'wujie';
1084
+ this.wjName = 'application' + Date.now();
1085
+ this.page = this.host + option.url;
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ this.$nextTick(() => {
1091
+ this.refresh = true;
1092
+ });
1049
1093
  return;
1050
1094
  }
1051
1095
  } else {
@@ -1056,17 +1100,22 @@ export default {
1056
1100
  }
1057
1101
  this.setDefault(this.menus, ids, option.param);
1058
1102
  },
1059
- getId(arry, res, path) {
1060
- if (!res) {
1103
+ /**
1104
+ * @desc 获取菜单层级id
1105
+ * @param {Array} [menus] - 系统菜单数据对象
1106
+ * @param {String} [url] - 菜单id或url地址
1107
+ */
1108
+ getId(menus, url) {
1109
+ if (!url) {
1061
1110
  return false;
1062
1111
  }
1063
- for (let i = 0; i < arry.length; i++) {
1064
- let item = arry[i];
1112
+ for (let i = 0; i < menus.length; i++) {
1113
+ let item = menus[i];
1065
1114
  if (
1066
1115
  Object.prototype.hasOwnProperty.call(item, 'children') &&
1067
1116
  item.children.length
1068
1117
  ) {
1069
- let id = this.getId(item.children, res, path);
1118
+ let id = this.getId(item.children, url);
1070
1119
  if (id) {
1071
1120
  if (typeof id === 'string') {
1072
1121
  this.isTabs = false;
@@ -1082,7 +1131,7 @@ export default {
1082
1131
  Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
1083
1132
  item.fourthTabs.length
1084
1133
  ) {
1085
- let id = this.getId(item.fourthTabs, res, path);
1134
+ let id = this.getId(item.fourthTabs, url);
1086
1135
  if (id) {
1087
1136
  if (typeof id === 'string') {
1088
1137
  this.isTabs = true;
@@ -1094,12 +1143,12 @@ export default {
1094
1143
  }
1095
1144
  return id;
1096
1145
  }
1097
- } else if (item.id === res || item.url == res) {
1146
+ } else if (item.id === url || item.url == url) {
1098
1147
  return item.id;
1099
1148
  } else {
1100
- if (path && item.url) {
1149
+ if (item.url) {
1101
1150
  let url = new URL(item.url, window.location.origin);
1102
- if (url.hash == res) {
1151
+ if (url.hash == url) {
1103
1152
  return item.id;
1104
1153
  }
1105
1154
  }
@@ -1117,54 +1166,6 @@ export default {
1117
1166
  if (res.rCode === 0) {
1118
1167
  if (res.results && res.results.length) {
1119
1168
  this.menus = JSON.parse(JSON.stringify(res.results));
1120
- let applicationid =
1121
- util.getParams('applicationid') ||
1122
- util.getParams('applicationId');
1123
- if (applicationid) {
1124
- let ids = this.getId(this.menus, applicationid);
1125
- if (ids) {
1126
- this.defaultActive = ids;
1127
- }
1128
- } else if (sessionStorage.getItem('jump') && this.isHistory) {
1129
- let ids = this.getId(
1130
- this.menus,
1131
- sessionStorage.getItem('jump'),
1132
- true
1133
- );
1134
- if (ids) {
1135
- this.defaultActive = ids;
1136
- this.navIds = ids;
1137
- this.setTitle(ids[0]);
1138
- }
1139
- } else if (util.win.location.hash) {
1140
- let hash = util.win.location.hash;
1141
- if (hash) {
1142
- hash = hash.split('?')[0];
1143
- }
1144
- if (hash !== '#/' && hash !== '#/main') {
1145
- let ids = this.getId(
1146
- this.menus,
1147
- util.win.location.hash,
1148
- true
1149
- );
1150
- if (ids) {
1151
- this.defaultActive = ids;
1152
- this.navIds = ids;
1153
- this.setTitle(ids[0]);
1154
- }
1155
- } else if (sessionStorage.getItem('jump') && this.isHistory) {
1156
- let ids = this.getId(
1157
- this.menus,
1158
- sessionStorage.getItem('jump'),
1159
- true
1160
- );
1161
- if (ids) {
1162
- this.defaultActive = ids;
1163
- this.navIds = ids;
1164
- this.setTitle(ids[0]);
1165
- }
1166
- }
1167
- }
1168
1169
  this.setTips(this.menus);
1169
1170
  store.set('nav', this.menus);
1170
1171
  this.setMenu(this.menus);
@@ -1184,6 +1185,34 @@ export default {
1184
1185
  },
1185
1186
  //设置默认左侧导航
1186
1187
  setMenu(res) {
1188
+ let applicationid =
1189
+ util.getParams('applicationid') || util.getParams('applicationId');
1190
+ if (applicationid) {
1191
+ let ids = this.getId(this.menus, applicationid);
1192
+ if (ids) {
1193
+ this.defaultActive = ids;
1194
+ }
1195
+ } else if (util.win.location.hash) {
1196
+ let hash = util.win.location.hash;
1197
+ if (hash) {
1198
+ hash = hash.split('?')[0];
1199
+ }
1200
+ if (hash !== '#/' && hash !== '#/main') {
1201
+ let ids = this.getId(this.menus, util.win.location.hash);
1202
+ if (ids) {
1203
+ this.defaultActive = ids;
1204
+ this.navIds = ids;
1205
+ this.setTitle(ids[0]);
1206
+ }
1207
+ }
1208
+ } else if (sessionStorage.getItem('jump') && this.isHistory) {
1209
+ let ids = this.getId(this.menus, sessionStorage.getItem('jump'));
1210
+ if (ids) {
1211
+ this.defaultActive = ids;
1212
+ this.navIds = ids;
1213
+ this.setTitle(ids[0]);
1214
+ }
1215
+ }
1187
1216
  if (this.defaultActive && this.defaultActive.length) {
1188
1217
  this.isDefault = false;
1189
1218
  this.setDefault(res, this.defaultActive);
@@ -1258,11 +1287,24 @@ export default {
1258
1287
  if (id && this.menu[0].id !== id) {
1259
1288
  this.active.push(id);
1260
1289
  } else {
1261
- this.handleJump(
1262
- this.menu[0].url,
1263
- this.menu[0].urlopenmode,
1264
- this.menu[0]
1265
- );
1290
+ let hash = util.win.location.hash;
1291
+ if (hash) {
1292
+ hash = hash.split('?')[0];
1293
+ if (hash !== '#/' && hash !== '#/main') {
1294
+ this.handleJump(hash);
1295
+ return;
1296
+ }
1297
+ }
1298
+ let jump = sessionStorage.getItem('jump');
1299
+ if (jump) {
1300
+ this.handleJump(jump);
1301
+ } else {
1302
+ this.handleJump(
1303
+ this.menu[0].url,
1304
+ this.menu[0].urlopenmode,
1305
+ this.menu[0]
1306
+ );
1307
+ }
1266
1308
  }
1267
1309
  }
1268
1310
  }
@@ -1409,7 +1451,7 @@ export default {
1409
1451
  break;
1410
1452
  }
1411
1453
  }
1412
- } else {
1454
+ } else if (active && active.length) {
1413
1455
  this.navs = [];
1414
1456
  this.subsystem = [];
1415
1457
  this.menu = res;
@@ -1504,12 +1546,12 @@ export default {
1504
1546
  this.active = subNode.id;
1505
1547
  this.navIds = [
1506
1548
  node.id,
1507
- ...this.getId(node.children, subNode.url, true)
1549
+ ...this.getId(node.children, subNode.url)
1508
1550
  ];
1509
1551
  }
1510
1552
  }
1511
1553
  } else {
1512
- this.navIds = this.getId(this.menus, node.url, true);
1554
+ this.navIds = this.getId(this.menus, node.url);
1513
1555
  this.setTitle(this.navIds[0]);
1514
1556
  this.tabsId = fourthTabs ? node.id : '';
1515
1557
  }
@@ -1529,7 +1571,7 @@ export default {
1529
1571
  this.active = subNode.id;
1530
1572
  this.navIds = [
1531
1573
  node.id,
1532
- ...this.getId(node.children, subNode.url, true)
1574
+ ...this.getId(node.children, subNode.url)
1533
1575
  ];
1534
1576
  }
1535
1577
  }
@@ -1549,7 +1591,7 @@ export default {
1549
1591
  let subNode = this.getFirst(node);
1550
1592
  this.active = [node.id];
1551
1593
  if (subNode && node.id !== subNode.id) {
1552
- this.navIds = this.getId(this.menus, subNode.url, true);
1594
+ this.navIds = this.getId(this.menus, subNode.url);
1553
1595
  this.$set(this.active, 1, subNode.id);
1554
1596
  }
1555
1597
  }
@@ -1573,7 +1615,7 @@ export default {
1573
1615
  } else {
1574
1616
  this.active = tab.id;
1575
1617
  }
1576
- this.navIds = this.getId(this.menus, tab.url, true);
1618
+ this.navIds = this.getId(this.menus, tab.url);
1577
1619
  }
1578
1620
  } else {
1579
1621
  let tab = (node.fourthTabs || []).filter((item) => {
@@ -1582,9 +1624,9 @@ export default {
1582
1624
  if (tab) {
1583
1625
  this.tabs = node.fourthTabs;
1584
1626
  this.tabsId = tab.id;
1585
- this.navIds = this.getId(this.menus, tab.url, true);
1627
+ this.navIds = this.getId(this.menus, tab.url);
1586
1628
  } else {
1587
- this.navIds = this.getId(this.menus, node.url, true);
1629
+ this.navIds = this.getId(this.menus, node.url);
1588
1630
  }
1589
1631
  }
1590
1632
  } else {
@@ -1596,7 +1638,7 @@ export default {
1596
1638
  this.tabs[0].urlopenmode,
1597
1639
  this.tabs[0]
1598
1640
  );
1599
- this.navIds = this.getId(this.menus, this.tabs[0].url, true);
1641
+ this.navIds = this.getId(this.menus, this.tabs[0].url);
1600
1642
  }
1601
1643
  }
1602
1644
  } else {
@@ -1609,14 +1651,14 @@ export default {
1609
1651
  } else {
1610
1652
  this.active = subNode.id;
1611
1653
  }
1612
- this.navIds = this.getId(this.menus, subNode.url, true);
1654
+ this.navIds = this.getId(this.menus, subNode.url);
1613
1655
  }
1614
1656
  }
1615
1657
  }
1616
1658
  break;
1617
1659
  case 'tabs':
1618
1660
  this.tabsId = node.id;
1619
- this.navIds = this.getId(this.menus, node.url, true);
1661
+ this.navIds = this.getId(this.menus, node.url);
1620
1662
  break;
1621
1663
  }
1622
1664
  if (node.url) {
@@ -1734,7 +1776,11 @@ export default {
1734
1776
  util.win.open(page);
1735
1777
  } else if (type == 2) {
1736
1778
  location.href = page;
1737
- } else if (type == 3) {
1779
+ } else if (
1780
+ type == 3 ||
1781
+ this.loadWujie === false ||
1782
+ (this.downgrade && isIE)
1783
+ ) {
1738
1784
  this.method = 'iframe';
1739
1785
  this.refresh = false;
1740
1786
  this.page = util.handlerUrl(page, param);
@@ -7,13 +7,13 @@
7
7
  ref="qrcodeImg"
8
8
  alt="二维码图片"
9
9
  />
10
- <img
10
+ <!-- <img
11
11
  v-if="logo"
12
12
  class="es-qrcode-logo"
13
13
  ref="qrcodeLogo"
14
14
  :src="logo"
15
15
  alt="二维码logo"
16
- />
16
+ /> -->
17
17
  <canvas
18
18
  :width="_width"
19
19
  :height="_height"
@@ -69,7 +69,7 @@ export default {
69
69
  return {};
70
70
  },
71
71
  watch: {
72
- logo: function(val) {
72
+ logo: function (val) {
73
73
  this.$nextTick(() => {
74
74
  this.createQRCode();
75
75
  });
@@ -92,7 +92,7 @@ export default {
92
92
  methods: {
93
93
  createQRCode() {
94
94
  let qrcodeImg = this.$refs.qrcodeImg;
95
- let qrcodeLogo = this.$refs.qrcodeLogo;
95
+ //let qrcodeLogo = this.$refs.qrcodeLogo;
96
96
  let canvas = this.$refs.canvas;
97
97
  let option = util.extend({}, this.option, {
98
98
  width: this._width,
@@ -110,6 +110,8 @@ export default {
110
110
  //获取图片
111
111
  ctx.drawImage(qrcodeImg, 0, 0, this._width, this._height);
112
112
  if (this.logo && this.logo.indexOf('.') > -1) {
113
+ let logo = new Image();
114
+ logo.src = this.logo;
113
115
  //设置logo大小
114
116
  let logoPosition = (this._width - 46) / 2; //logo相对于canvas居中定位
115
117
  //设置获取的logo将其变为圆角以及添加白色背景
@@ -127,7 +129,10 @@ export default {
127
129
  ctx.arcTo(x, y, x + w, y, r);
128
130
  ctx.closePath();
129
131
  ctx.fill(); */
130
- ctx.drawImage(qrcodeLogo, logoPosition, logoPosition, 46, 46);
132
+ logo.onload = () => {
133
+ ctx.drawImage(logo, logoPosition, logoPosition, 46, 46);
134
+ qrcodeImg.src = canvas.toDataURL();
135
+ };
131
136
  } else if (this.text) {
132
137
  //设置字体
133
138
  let fpadd = 10; //规定内间距