eoss-ui 0.5.81-beta2 → 0.5.81-beta21

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 (131) hide show
  1. package/lib/button-group.js +76 -53
  2. package/lib/button.js +51 -46
  3. package/lib/checkbox-group.js +49 -45
  4. package/lib/clients.js +4 -3
  5. package/lib/config/api.js +3 -1
  6. package/lib/data-table-form.js +49 -45
  7. package/lib/data-table.js +471 -256
  8. package/lib/date-picker.js +49 -45
  9. package/lib/dialog.js +71 -70
  10. package/lib/eoss-ui.common.js +4165 -2449
  11. package/lib/flow-group.js +98 -63
  12. package/lib/flow-list.js +50 -46
  13. package/lib/flow.js +152 -83
  14. package/lib/form.js +96 -49
  15. package/lib/handle-user.js +66 -49
  16. package/lib/handler.js +61 -48
  17. package/lib/icon.js +49 -45
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +49 -45
  20. package/lib/input.js +49 -45
  21. package/lib/login.js +64 -53
  22. package/lib/main.js +2677 -1479
  23. package/lib/menu.js +1 -1
  24. package/lib/nav.js +49 -45
  25. package/lib/notify.js +54 -50
  26. package/lib/page.js +49 -45
  27. package/lib/pagination.js +3719 -3
  28. package/lib/player.js +54 -50
  29. package/lib/qr-code.js +49 -45
  30. package/lib/radio-group.js +49 -45
  31. package/lib/retrial-auth.js +50 -46
  32. package/lib/select-ganged.js +49 -45
  33. package/lib/select.js +50 -46
  34. package/lib/selector-panel.js +117 -65
  35. package/lib/selector.js +493 -422
  36. package/lib/sizer.js +49 -45
  37. package/lib/steps.js +49 -45
  38. package/lib/switch.js +49 -45
  39. package/lib/table-form.js +49 -45
  40. package/lib/tabs.js +86 -79
  41. package/lib/theme-chalk/base.css +1 -1
  42. package/lib/theme-chalk/button-group.css +1 -1
  43. package/lib/theme-chalk/data-table.css +1 -1
  44. package/lib/theme-chalk/handler.css +1 -1
  45. package/lib/theme-chalk/index.css +1 -1
  46. package/lib/theme-chalk/main.css +1 -1
  47. package/lib/theme-chalk/menu.css +1 -1
  48. package/lib/theme-chalk/nav.css +1 -1
  49. package/lib/theme-chalk/pagination.css +1 -1
  50. package/lib/theme-chalk/selector-panel.css +1 -1
  51. package/lib/theme-chalk/simplicity.css +1 -1
  52. package/lib/theme-chalk/sizer.css +1 -1
  53. package/lib/theme-chalk/tabs.css +1 -1
  54. package/lib/theme-chalk/toolbar.css +1 -1
  55. package/lib/theme-chalk/tree.css +1 -1
  56. package/lib/theme-chalk/upload.css +1 -1
  57. package/lib/tips.js +49 -45
  58. package/lib/tree-group.js +49 -45
  59. package/lib/tree.js +49 -45
  60. package/lib/upload.js +59 -55
  61. package/lib/wujie.js +49 -45
  62. package/lib/wxlogin.js +49 -45
  63. package/package.json +3 -3
  64. package/packages/button/src/main.vue +2 -1
  65. package/packages/button-group/src/main.vue +8 -6
  66. package/packages/clients/src/main.vue +2 -1
  67. package/packages/data-table/src/column.vue +132 -53
  68. package/packages/data-table/src/formItem.vue +430 -0
  69. package/packages/data-table/src/main.vue +85 -45
  70. package/packages/data-table/src/sizer.vue +2 -0
  71. package/packages/dialog/src/main.vue +17 -23
  72. package/packages/flow/src/main.vue +32 -17
  73. package/packages/flow-group/src/main.vue +18 -11
  74. package/packages/form/src/main.vue +45 -10
  75. package/packages/handle-user/src/main.vue +10 -3
  76. package/packages/handler/src/main.vue +5 -3
  77. package/packages/login/src/main.vue +13 -6
  78. package/packages/main/src/default/index.vue +102 -179
  79. package/packages/main/src/main.vue +243 -16
  80. package/packages/main/src/public/online.vue +90 -0
  81. package/packages/main/src/simplicity/apps.vue +176 -145
  82. package/packages/main/src/simplicity/avatar.vue +16 -6
  83. package/packages/main/src/simplicity/handler.vue +6 -2
  84. package/packages/main/src/simplicity/index.vue +555 -344
  85. package/packages/main/src/simplicity/menu-list.vue +75 -24
  86. package/packages/main/src/simplicity/message.vue +35 -25
  87. package/packages/main/src/simplicity/notice.vue +72 -39
  88. package/packages/main/src/simplicity/router-page.vue +44 -0
  89. package/packages/main/src/simplicity/settings.vue +1 -1
  90. package/packages/main/src/simplicity/sub-menu.vue +169 -54
  91. package/packages/main/src/simplicity/user.vue +10 -5
  92. package/packages/main/src/simplicity/userinfo.vue +1 -0
  93. package/packages/menu/src/main.vue +4 -3
  94. package/packages/pagination/src/main.vue +20 -1
  95. package/packages/select/src/main.vue +4 -1
  96. package/packages/selector/src/main.vue +152 -136
  97. package/packages/selector-panel/src/main.vue +23 -9
  98. package/packages/selector-panel/src/selection.vue +8 -2
  99. package/packages/tabs/src/main.vue +14 -14
  100. package/packages/theme-chalk/lib/base.css +1 -1
  101. package/packages/theme-chalk/lib/button-group.css +1 -1
  102. package/packages/theme-chalk/lib/data-table.css +1 -1
  103. package/packages/theme-chalk/lib/handler.css +1 -1
  104. package/packages/theme-chalk/lib/index.css +1 -1
  105. package/packages/theme-chalk/lib/main.css +1 -1
  106. package/packages/theme-chalk/lib/menu.css +1 -1
  107. package/packages/theme-chalk/lib/nav.css +1 -1
  108. package/packages/theme-chalk/lib/pagination.css +1 -1
  109. package/packages/theme-chalk/lib/selector-panel.css +1 -1
  110. package/packages/theme-chalk/lib/simplicity.css +1 -1
  111. package/packages/theme-chalk/lib/sizer.css +1 -1
  112. package/packages/theme-chalk/lib/tabs.css +1 -1
  113. package/packages/theme-chalk/lib/toolbar.css +1 -1
  114. package/packages/theme-chalk/lib/tree.css +1 -1
  115. package/packages/theme-chalk/lib/upload.css +1 -1
  116. package/packages/theme-chalk/src/base.scss +5 -0
  117. package/packages/theme-chalk/src/button-group.scss +18 -4
  118. package/packages/theme-chalk/src/common/var.scss +9 -2
  119. package/packages/theme-chalk/src/data-table.scss +60 -23
  120. package/packages/theme-chalk/src/handler.scss +5 -1
  121. package/packages/theme-chalk/src/login.scss +2 -2
  122. package/packages/theme-chalk/src/nav.scss +3 -2
  123. package/packages/theme-chalk/src/pagination.scss +7 -0
  124. package/packages/theme-chalk/src/selector-panel.scss +2 -1
  125. package/packages/theme-chalk/src/simplicity.scss +355 -58
  126. package/packages/theme-chalk/src/tabs.scss +24 -28
  127. package/packages/theme-chalk/src/toolbar.scss +16 -4
  128. package/packages/theme-chalk/src/tree.scss +4 -2
  129. package/packages/upload/src/main.vue +3 -1
  130. package/src/config/api.js +3 -1
  131. package/src/index.js +1 -1
@@ -203,7 +203,10 @@
203
203
  ref="es-form-pane"
204
204
  :key="item.name"
205
205
  :label-width="
206
- item.showLabel !== false && item.label && showLabel
206
+ item.showLabel !== false &&
207
+ item.label &&
208
+ !item.labelHide &&
209
+ showLabel
207
210
  ? labelWidth
208
211
  : '0'
209
212
  "
@@ -251,7 +254,10 @@
251
254
  <es-label
252
255
  slot="label"
253
256
  v-if="
254
- item.showLabel !== false && item.label && showLabel
257
+ item.showLabel !== false &&
258
+ item.label &&
259
+ !item.labelHide &&
260
+ showLabel
255
261
  "
256
262
  v-bind="getLabel(item.label)"
257
263
  ></es-label>
@@ -1192,7 +1198,10 @@
1192
1198
  ref="es-form-pane"
1193
1199
  :key="item.name"
1194
1200
  :label-width="
1195
- item.showLabel !== false && item.label && showLabel
1201
+ item.showLabel !== false &&
1202
+ item.label &&
1203
+ !item.labelHide &&
1204
+ showLabel
1196
1205
  ? labelWidth
1197
1206
  : '0'
1198
1207
  "
@@ -1238,7 +1247,12 @@
1238
1247
  >
1239
1248
  <es-label
1240
1249
  slot="label"
1241
- v-if="item.showLabel !== false && item.label && showLabel"
1250
+ v-if="
1251
+ item.showLabel !== false &&
1252
+ item.label &&
1253
+ !item.labelHide &&
1254
+ showLabel
1255
+ "
1242
1256
  v-bind="getLabel(item.label)"
1243
1257
  ></es-label>
1244
1258
  <es-input-number
@@ -2194,7 +2208,10 @@
2194
2208
  ref="es-form-pane"
2195
2209
  :key="item.name"
2196
2210
  :label-width="
2197
- item.showLabel !== false && item.label && showLabel
2211
+ item.showLabel !== false &&
2212
+ item.label &&
2213
+ !item.labelHide &&
2214
+ showLabel
2198
2215
  ? labelWidth
2199
2216
  : '0'
2200
2217
  "
@@ -2244,7 +2261,12 @@
2244
2261
  >
2245
2262
  <es-label
2246
2263
  slot="label"
2247
- v-if="item.showLabel !== false && item.label && showLabel"
2264
+ v-if="
2265
+ item.showLabel !== false &&
2266
+ item.label &&
2267
+ !item.labelHide &&
2268
+ showLabel
2269
+ "
2248
2270
  v-bind="getLabel(item.label)"
2249
2271
  ></es-label>
2250
2272
  <es-input-number
@@ -3135,7 +3157,10 @@
3135
3157
  ref="es-form-pane"
3136
3158
  :key="item.name"
3137
3159
  :label-width="
3138
- item.showLabel !== false && item.label && showLabel
3160
+ item.showLabel !== false &&
3161
+ item.label &&
3162
+ !item.labelHide &&
3163
+ showLabel
3139
3164
  ? labelWidth
3140
3165
  : '0'
3141
3166
  "
@@ -3181,7 +3206,12 @@
3181
3206
  >
3182
3207
  <es-label
3183
3208
  slot="label"
3184
- v-if="item.showLabel !== false && item.label && showLabel"
3209
+ v-if="
3210
+ item.showLabel !== false &&
3211
+ item.label &&
3212
+ !item.labelHide &&
3213
+ showLabel
3214
+ "
3185
3215
  v-bind="getLabel(item.label)"
3186
3216
  ></es-label>
3187
3217
  <es-input-number
@@ -4193,7 +4223,8 @@ export default {
4193
4223
  return {};
4194
4224
  }
4195
4225
  },
4196
- active: Array
4226
+ active: Array,
4227
+ resetActive: Boolean
4197
4228
  },
4198
4229
  data() {
4199
4230
  return {
@@ -4418,7 +4449,11 @@ export default {
4418
4449
  }
4419
4450
  });
4420
4451
  if (!this.active || (this.active && !this.active.length)) {
4421
- this.activeNames = names;
4452
+ if (this.resetActive) {
4453
+ this.activeNames = names;
4454
+ } else if (this.activeNames.length == 0) {
4455
+ this.activeNames = names;
4456
+ }
4422
4457
  }
4423
4458
  this.content = contents;
4424
4459
  if (this.content.length === 1) {
@@ -20,7 +20,10 @@
20
20
  <div class="es-user-job es-pointer" :title="job.name">
21
21
  {{ job.name }}<i class="es-icon-tri-down"></i>
22
22
  </div>
23
- <el-dropdown-menu slot="dropdown">
23
+ <el-dropdown-menu
24
+ slot="dropdown"
25
+ :max-height="jobScrollbar ? undefined : 0"
26
+ >
24
27
  <el-dropdown-item
25
28
  v-for="(ele, ins) in user.identityList"
26
29
  :key="ins"
@@ -29,8 +32,8 @@
29
32
  >{{ ele.name }}</el-dropdown-item
30
33
  >
31
34
  </el-dropdown-menu>
32
- </el-dropdown></template
33
- >
35
+ </el-dropdown>
36
+ </template>
34
37
  </div>
35
38
  </div>
36
39
  </template>
@@ -42,6 +45,10 @@ import util from 'eoss-ui/src/utils/util';
42
45
  export default {
43
46
  name: 'EsHandleUser',
44
47
  props: {
48
+ jobScrollbar: {
49
+ type: Boolean,
50
+ default: true
51
+ },
45
52
  data: Object,
46
53
  userModel: Object
47
54
  },
@@ -11,6 +11,7 @@
11
11
  class="es-handler-user"
12
12
  :data="item"
13
13
  :userModel="userModel"
14
+ :job-scrollbar="jobScrollbar"
14
15
  @click="handleClick"
15
16
  @change="handleChange"
16
17
  ></es-handle-user>
@@ -21,7 +22,7 @@
21
22
  >当前<span
22
23
  class="es-online-num"
23
24
  :class="{ 'es-pointer': onlineList }"
24
- @click="onlineList ? handleClick({ type: 'online' }) : ''"
25
+ @click.stop="onlineList ? handleClick({ type: 'online' }) : ''"
25
26
  >{{ online }}</span
26
27
  >人在线</span
27
28
  >
@@ -91,7 +92,7 @@
91
92
  class="es-handler-icon"
92
93
  :title="item.title"
93
94
  :class="item.icon"
94
- @click="handleClick(item)"
95
+ @click.stop="handleClick(item)"
95
96
  ></div>
96
97
  </el-badge>
97
98
  <div
@@ -99,7 +100,7 @@
99
100
  class="es-handler-icon"
100
101
  :title="item.title"
101
102
  :class="item.icon"
102
- @click="handleClick(item)"
103
+ @click.stop="handleClick(item)"
103
104
  ></div>
104
105
  </li>
105
106
  </ul>
@@ -116,6 +117,7 @@ export default {
116
117
  }
117
118
  },
118
119
  props: {
120
+ jobScrollbar: Boolean,
119
121
  data: Array,
120
122
  color: {
121
123
  type: String,
@@ -352,7 +352,7 @@
352
352
  custom-class="es-clients-dialog"
353
353
  :visible.sync="showDownLoadApp"
354
354
  >
355
- <es-clients :downloads="download"></es-clients>
355
+ <es-clients :downloads="download" :showTips="showIosTips"></es-clients>
356
356
  </es-dialog>
357
357
  <slot name="calogin"></slot>
358
358
  <es-dialog
@@ -579,6 +579,7 @@ export default {
579
579
  type: String,
580
580
  default: 'center'
581
581
  },
582
+ translate: String,
582
583
  useResults: {
583
584
  type: Boolean,
584
585
  default: true
@@ -587,35 +588,41 @@ export default {
587
588
  type: Number,
588
589
  default: 1500
589
590
  },
590
- isScale: Boolean
591
+ isScale: Boolean,
592
+ showIosTips: Boolean
591
593
  },
592
594
  computed: {
593
595
  transform() {
596
+ let translate = this.translate
597
+ ? this.translate
598
+ : this.align === 'center'
599
+ ? '-50%, -51%'
600
+ : '-51%';
594
601
  if (this.align.indexOf('%') > -1) {
595
602
  return {
596
603
  left: this.align,
597
604
  top: '50%',
598
- transform: 'translateY(-51%)'
605
+ transform: `translateY(${translate})`
599
606
  };
600
607
  }
601
608
  if (this.align === 'left') {
602
609
  return {
603
610
  left: '30%',
604
611
  top: '50%',
605
- transform: 'translateY(-51%)'
612
+ transform: `translateY(${translate})`
606
613
  };
607
614
  }
608
615
  if (this.align === 'right') {
609
616
  return {
610
617
  left: '70%',
611
618
  top: '50%',
612
- transform: 'translateY(-51%)'
619
+ transform: `translateY(${translate})`
613
620
  };
614
621
  }
615
622
  return {
616
623
  left: '50%',
617
624
  top: '50%',
618
- transform: 'translate(-50%, -51%)'
625
+ transform: `translate(${translate})`
619
626
  };
620
627
  },
621
628
  redirectUri() {
@@ -31,6 +31,7 @@
31
31
  ></es-menu>
32
32
  </div>
33
33
  <es-handler
34
+ :job-scrollbar="jobScrollbar"
34
35
  :userModel="userModel"
35
36
  :hide="hide"
36
37
  :subSystem="subsystem"
@@ -191,8 +192,11 @@
191
192
  </es-dialog>
192
193
  <notice :data="sysMsg" :winopen="winopen" @opened="handleOpened"></notice>
193
194
  <es-dialog :title="dialog.title" :visible.sync="dialog.show" size="md">
195
+ <template v-if="dialog.title == '查看在线人员' && !dialog.src">
196
+ <online></online>
197
+ </template>
194
198
  <iframe
195
- v-if="dialog.show"
199
+ v-else-if="dialog.show"
196
200
  width="100%"
197
201
  height="100%"
198
202
  frameborder="0"
@@ -206,6 +210,7 @@ import userinfo from './userinfo.vue';
206
210
  import settings from './settings.vue';
207
211
  import message from './message.vue';
208
212
  import notice from './notice.vue';
213
+ import online from '../public/online.vue';
209
214
  import {
210
215
  //authCenter,
211
216
  wss,
@@ -213,8 +218,7 @@ import {
213
218
  mainConfig,
214
219
  updateUserCustomInfo,
215
220
  getComplexApplications,
216
- getComplexApplicationsNew,
217
- mainDetail
221
+ getComplexApplicationsNew
218
222
  } from 'eoss-ui/src/config/api.js';
219
223
  import store from 'eoss-ui/src/utils/store';
220
224
  import util from 'eoss-ui/src/utils/util';
@@ -222,20 +226,24 @@ const isIE = navigator.userAgent.indexOf('MSIE') != -1;
222
226
  const log = util.getParams('console');
223
227
  const appCode = util.getParams('appCode') || util.getParams('appcode');
224
228
  export default {
225
- name: 'EsMainDefault',
229
+ name: 'MainDefault',
226
230
  inheritAttrs: false,
227
231
  provide() {
228
232
  return {
229
- esMain: this
233
+ esMain: this,
234
+ refresh: this.handleRefresh,
235
+ jumpMenu: this.jumpMenu
230
236
  };
231
237
  },
232
238
  components: {
233
239
  userinfo,
234
240
  settings,
235
241
  message,
236
- notice
242
+ notice,
243
+ online
237
244
  },
238
245
  props: {
246
+ jobScrollbar: Boolean,
239
247
  maxHeight: String,
240
248
  //菜单导航地址
241
249
  menuUrl: String,
@@ -533,9 +541,7 @@ export default {
533
541
  },
534
542
  onlineUrl() {
535
543
  if (this.onlineView) {
536
- return typeof this.onlineView == 'string'
537
- ? this.onlineView
538
- : '/main/sysuseronline/list.dhtml';
544
+ return typeof this.onlineView == 'string' ? this.onlineView : '';
539
545
  }
540
546
  return false;
541
547
  }
@@ -671,20 +677,13 @@ export default {
671
677
  let mainConfig = util.getStorage('mainConfig');
672
678
  if (mainConfig) {
673
679
  const results = JSON.parse(mainConfig);
674
- this.init(results);
680
+ if (Object.keys(results).length) {
681
+ this.init(results);
682
+ }
675
683
  }
676
684
  },
677
685
  mounted() {
678
- util.win.reLogin = this.handleReLogin;
679
686
  this.handleListener();
680
- util.win.refresh = this.handleRefresh;
681
- util.win.jumpMenu = this.jumpMenu;
682
- if (util.win.$wujie) {
683
- util.win.$wujie.bus.$on('changeTheme', (res) => {
684
- util.updateTheme(res);
685
- });
686
- }
687
- util.win.windowOpen = this.openPage;
688
687
  util.win.addEventListener('popstate', this.stateHandle, false);
689
688
  },
690
689
  methods: {
@@ -979,7 +978,7 @@ export default {
979
978
  option.url.indexOf('/#/') > -1 ||
980
979
  option.url.indexOf('#/') > -1
981
980
  ) {
982
- option.isUrlc = true;
981
+ option.isUrl = true;
983
982
  ids = this.getId(this.menus, option.url);
984
983
  if (!ids) {
985
984
  if (
@@ -1020,6 +1019,9 @@ export default {
1020
1019
  }
1021
1020
  } else {
1022
1021
  ids = option.url.split(',');
1022
+ if (ids.length == 1) {
1023
+ ids = this.getId(this.menus, option.url);
1024
+ }
1023
1025
  }
1024
1026
  } else {
1025
1027
  ids = option.url;
@@ -1037,7 +1039,48 @@ export default {
1037
1039
  }
1038
1040
  for (let i = 0; i < menus.length; i++) {
1039
1041
  let item = menus[i];
1040
- if (
1042
+ if (item.id === url) {
1043
+ if (item.url) {
1044
+ if (
1045
+ Object.prototype.hasOwnProperty.call(item, 'children') &&
1046
+ item.children.length
1047
+ ) {
1048
+ let id = this.getId(item.children, item.url);
1049
+ if (id) {
1050
+ if (typeof id === 'string') {
1051
+ this.isTabs = false;
1052
+ }
1053
+ if (item.pid === 'root' || Array.isArray(id)) {
1054
+ return [item.id].concat(id);
1055
+ } else if (typeof id === 'string') {
1056
+ return [item.id, id];
1057
+ }
1058
+ return id;
1059
+ }
1060
+ } else if (
1061
+ Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
1062
+ item.fourthTabs.length
1063
+ ) {
1064
+ let id = this.getId(item.fourthTabs, item.url);
1065
+ if (id) {
1066
+ if (typeof id === 'string') {
1067
+ this.isTabs = true;
1068
+ }
1069
+ if (item.pid === 'root') {
1070
+ return [item.id].concat(id);
1071
+ } else if (typeof id === 'string') {
1072
+ return [item.id, id];
1073
+ }
1074
+ return id;
1075
+ }
1076
+ } else {
1077
+ return item.id;
1078
+ }
1079
+ } else {
1080
+ console.error(item);
1081
+ return false;
1082
+ }
1083
+ } else if (
1041
1084
  Object.prototype.hasOwnProperty.call(item, 'children') &&
1042
1085
  item.children.length
1043
1086
  ) {
@@ -1069,7 +1112,7 @@ export default {
1069
1112
  }
1070
1113
  return id;
1071
1114
  }
1072
- } else if (item.id === url || item.url == url) {
1115
+ } else if (item.url == url) {
1073
1116
  return item.id;
1074
1117
  } else {
1075
1118
  if (item.url) {
@@ -1336,7 +1379,7 @@ export default {
1336
1379
  this.sysId = '';
1337
1380
  this.tabsId = '';
1338
1381
  this.active = '';
1339
- this.getUrl(res, active, param);
1382
+ this.getUrl(res, active[active.length - 1], param);
1340
1383
  if (
1341
1384
  this.layout === 'subsystem' ||
1342
1385
  this.layout === 'subSystem' ||
@@ -1389,7 +1432,7 @@ export default {
1389
1432
  if (this.biserial) {
1390
1433
  this.active = active.slice(
1391
1434
  0,
1392
- active.length > 2 ? active.length - 1 : active.length
1435
+ this.tabs && this.tabs.length ? active.length - 1 : active.length
1393
1436
  );
1394
1437
  } else {
1395
1438
  this.active = active.slice(1);
@@ -1399,34 +1442,29 @@ export default {
1399
1442
  this.showPage = true;
1400
1443
  },
1401
1444
  //获取页面类型及地址
1402
- getUrl(res, active, index, param) {
1403
- index = index === undefined ? 0 : index;
1445
+ getUrl(res, active, param) {
1404
1446
  for (let i = 0; i < res.length; i++) {
1405
1447
  let item = res[i];
1406
- if (item.id === active[index]) {
1407
- if (index === active.length - 1) {
1448
+ if (item.id === active) {
1449
+ if (item.url) {
1408
1450
  this.handleJump(item.url, item.urlopenmode, item, param);
1409
1451
  return item.url;
1410
1452
  } else {
1411
- if (item.children && item.children.length) {
1412
- index++;
1413
- let url = this.getUrl(item.children, active, index, param);
1414
- if (url && index === active.length - 1) {
1415
- this.tabs = '';
1416
- }
1417
- return url;
1453
+ console.error(item);
1454
+ }
1455
+ } else {
1456
+ if (item.children && item.children.length) {
1457
+ let url = this.getUrl(item.children, active, param);
1458
+ if (url) {
1459
+ this.tabs = '';
1418
1460
  }
1419
- if (item.fourthTabs && item.fourthTabs.length) {
1420
- index++;
1421
- let url = this.getUrl(item.fourthTabs, active, index, param);
1422
- if (url) {
1423
- this.$set(this, 'tabs', item.fourthTabs);
1424
- }
1425
- return url;
1461
+ }
1462
+ if (item.fourthTabs && item.fourthTabs.length) {
1463
+ let url = this.getUrl(item.fourthTabs, active, param);
1464
+ if (url) {
1465
+ this.$set(this, 'tabs', item.fourthTabs);
1426
1466
  }
1427
1467
  }
1428
- } else if (item.children && item.children.length) {
1429
- this.getUrl(item.children, active, index, param);
1430
1468
  }
1431
1469
  }
1432
1470
  return false;
@@ -1549,13 +1587,16 @@ export default {
1549
1587
  }
1550
1588
  //this.navIds = this.getId(this.menus, tab.url);
1551
1589
  }
1552
- } else {
1553
- let tab = (node.fourthTabs || []).filter((item) => {
1590
+ } else if (node.fourthTabs && node.fourthTabs.length) {
1591
+ this.tabs = [];
1592
+ let tab = node.fourthTabs.filter((item) => {
1554
1593
  return item.url === node.url;
1555
1594
  })[0];
1556
1595
  if (tab) {
1557
- this.tabs = node.fourthTabs;
1558
1596
  this.tabsId = tab.id;
1597
+ this.$nextTick(() => {
1598
+ this.tabs = node.fourthTabs;
1599
+ });
1559
1600
  //this.navIds = this.getId(this.menus, tab.url);
1560
1601
  } else {
1561
1602
  //this.navIds = this.getId(this.menus, node.url);
@@ -1563,13 +1604,15 @@ export default {
1563
1604
  }
1564
1605
  } else {
1565
1606
  if (node.fourthTabs.length) {
1566
- this.tabs = node.fourthTabs;
1567
- this.tabsId = this.tabs[0].id;
1568
- this.handleJump(
1569
- this.tabs[0].url,
1570
- this.tabs[0].urlopenmode,
1571
- this.tabs[0]
1572
- );
1607
+ this.tabsId = node.fourthTabs[0].id;
1608
+ this.$nextTick(() => {
1609
+ this.tabs = node.fourthTabs;
1610
+ this.handleJump(
1611
+ this.tabs[0].url,
1612
+ this.tabs[0].urlopenmode,
1613
+ this.tabs[0]
1614
+ );
1615
+ });
1573
1616
  //this.navIds = this.getId(this.menus, this.tabs[0].url);
1574
1617
  }
1575
1618
  }
@@ -1658,13 +1701,11 @@ export default {
1658
1701
  this.showUserInfo = true;
1659
1702
  break;
1660
1703
  case 'online':
1661
- if (this.onlineUrl) {
1662
- this.dialog = {
1663
- title: '查看在线人员',
1664
- show: true,
1665
- src: this.onlineUrl
1666
- };
1667
- }
1704
+ this.dialog = {
1705
+ title: '查看在线人员',
1706
+ show: true,
1707
+ src: this.onlineUrl
1708
+ };
1668
1709
  break;
1669
1710
  case 'notice':
1670
1711
  this.showMsg = !this.showMsg;
@@ -1990,124 +2031,6 @@ export default {
1990
2031
  let n = parseInt(this.menuTips[id], 10) - 1;
1991
2032
  this.$set(this.menuTips, id, n);
1992
2033
  }
1993
- },
1994
- handleReLogin(res) {
1995
- if (res && typeof res == 'string') {
1996
- res = JSON.parse(res);
1997
- }
1998
- let msg = '提示';
1999
- let btn = {
2000
- confirmButtonText: '确定',
2001
- cancelButtonText: '取消',
2002
- closeOnClickModal: false,
2003
- type: 'warning'
2004
- };
2005
- if (res) {
2006
- if (res.rCode === 69) {
2007
- msg = '该账号在其他地方已登陆!';
2008
- btn = {
2009
- confirmButtonText: '确定',
2010
- closeOnClickModal: false,
2011
- type: 'warning'
2012
- };
2013
- } else {
2014
- msg = '登录已过期,请重新登录!';
2015
- }
2016
- }
2017
- cl;
2018
- let remind = sessionStorage.getItem('remind');
2019
- if (!remind) {
2020
- clearTimeout(this.timer);
2021
- this.timer = setTimeout(() => {
2022
- console.log('handleReLogin');
2023
- sessionStorage.setItem('remind', 1);
2024
- this.$confirm(msg, btn)
2025
- .then(() => {
2026
- util.removeStorage([
2027
- 'Authorization',
2028
- 'token',
2029
- 'ssId',
2030
- 'userId',
2031
- 'userName',
2032
- 'auth',
2033
- 'deviceUnique',
2034
- 'menus',
2035
- 'useCaseCodes',
2036
- 'mainConfig',
2037
- 'jump'
2038
- ]);
2039
- const loginPage =
2040
- util.getStorage('login') || util.getStorage('loginPage');
2041
- try {
2042
- if (loginPage) {
2043
- let src;
2044
- if (!util.startWith(loginPage, ['http', '/'], true)) {
2045
- let pathname = util.win.top.location.pathname;
2046
- if (pathname !== '/') {
2047
- pathname = pathname.split('/');
2048
- pathname.splice(pathname.length - 1);
2049
- pathname = pathname.join('/');
2050
- src = pathname + '/' + loginPage.replace('./', '');
2051
- } else {
2052
- src = pathname + loginPage.replace('./', '');
2053
- }
2054
- } else {
2055
- src = loginPage;
2056
- }
2057
- util.win.top.location.href = src;
2058
- } else if (
2059
- util.win.top.location.href.indexOf('main.html') > -1
2060
- ) {
2061
- util.win.top.location.href = './login.html';
2062
- } else {
2063
- const hash = util.win.top.location.hash;
2064
- if (hash) {
2065
- const len = util.win.top.location.href.indexOf(hash);
2066
- util.win.top.location.href =
2067
- util.win.location.href.slice(0, len) + '#/login';
2068
- } else {
2069
- util.win.top.location.href = '/login.html';
2070
- }
2071
- }
2072
- } catch (error) {
2073
- util.win.postMessage({ type: 1 }, '*');
2074
- }
2075
- })
2076
- .catch((e) => {
2077
- sessionStorage.removeItem('remind');
2078
- });
2079
- }, 2000);
2080
- }
2081
- },
2082
- openPage(url, name, width, height) {
2083
- let src = url;
2084
- if (!util.startWith(url, ['http', '/'], true)) {
2085
- let pathname = window.location.pathname;
2086
- if (pathname !== '/') {
2087
- pathname = pathname.split('/');
2088
- pathname.splice(pathname.length - 1);
2089
- pathname = pathname.join('/');
2090
- }
2091
- src = pathname + url.replace('./', '/');
2092
- }
2093
- if (name) {
2094
- let w = 0;
2095
- let h = 0;
2096
- try {
2097
- w = width ? width : util.win.top.screen.availWidth - 10;
2098
- h = height ? height : util.win.top.screen.availHeight - 60;
2099
- } catch (error) {
2100
- w = width ? width : util.win.screen.availWidth - 10;
2101
- h = height ? height : util.win.screen.availHeight - 60;
2102
- }
2103
- return util.win.open(
2104
- src,
2105
- name,
2106
- `width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
2107
- );
2108
- } else {
2109
- return util.win.open(src);
2110
- }
2111
2034
  }
2112
2035
  },
2113
2036
  beforeDestroy() {