eoss-ui 0.5.84 → 0.5.85
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 +17 -16
- package/lib/button.js +17 -16
- package/lib/checkbox-group.js +17 -16
- package/lib/config/api.js +3 -2
- package/lib/data-table-form.js +17 -16
- package/lib/data-table.js +417 -262
- package/lib/date-picker.js +17 -16
- package/lib/dialog.js +17 -16
- package/lib/eoss-ui.common.js +6189 -13674
- package/lib/flow-group.js +17 -16
- package/lib/flow-list.js +17 -16
- package/lib/flow.js +17 -16
- package/lib/form.js +5647 -13458
- package/lib/handle-user.js +17 -16
- package/lib/handler.js +23 -18
- package/lib/icon.js +17 -16
- package/lib/index.js +1 -1
- package/lib/input-number.js +17 -16
- package/lib/input.js +17 -16
- package/lib/login.js +28 -19
- package/lib/main.js +579 -418
- package/lib/nav.js +17 -16
- package/lib/notify.js +3 -2
- package/lib/page.js +17 -16
- package/lib/pagination.js +17 -16
- package/lib/player.js +17 -16
- package/lib/qr-code.js +17 -16
- package/lib/radio-group.js +17 -16
- package/lib/retrial-auth.js +17 -16
- package/lib/select-ganged.js +17 -16
- package/lib/select.js +18 -17
- package/lib/selector-panel.js +17 -16
- package/lib/selector.js +17 -16
- package/lib/sizer.js +17 -16
- package/lib/steps.js +17 -16
- package/lib/switch.js +17 -16
- package/lib/table-form.js +17 -16
- package/lib/tabs.js +17 -16
- package/lib/theme-chalk/calendar.css +1 -1
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/tips.js +17 -16
- package/lib/tree-group.js +17 -16
- package/lib/tree.js +17 -16
- package/lib/upload.js +30 -29
- package/lib/utils/util.js +14 -14
- package/lib/wujie.js +17 -16
- package/lib/wxlogin.js +17 -16
- package/package.json +2 -2
- package/packages/data-table/src/children.vue +3 -2
- package/packages/data-table/src/column.vue +2 -4
- package/packages/data-table/src/main.vue +150 -66
- package/packages/data-table/src/sizer.vue +51 -22
- package/packages/form/src/main.vue +119 -2103
- package/packages/handler/src/main.vue +5 -0
- package/packages/login/src/main.vue +12 -1
- package/packages/main/src/default/index.vue +35 -54
- package/packages/main/src/public/search.vue +138 -31
- package/packages/main/src/simplicity/apps.vue +12 -0
- package/packages/main/src/simplicity/handler.vue +0 -2
- package/packages/main/src/simplicity/index.vue +68 -32
- package/packages/select/src/main.vue +1 -1
- package/packages/theme-chalk/lib/calendar.css +1 -1
- package/packages/theme-chalk/lib/data-table.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/src/calendar.scss +3 -3
- package/packages/theme-chalk/src/data-table.scss +12 -0
- package/packages/theme-chalk/src/main.scss +2 -1
- package/packages/theme-chalk/src/simplicity.scss +15 -2
- package/packages/upload/src/main.vue +16 -12
- package/src/config/api.js +3 -2
- package/src/index.js +1 -1
- package/src/utils/util.js +2 -2
|
@@ -390,6 +390,7 @@ import {
|
|
|
390
390
|
doCaLogin,
|
|
391
391
|
doAssistanceQrLogin
|
|
392
392
|
} from 'eoss-ui/src/config/api.js';
|
|
393
|
+
const ceshi = util.getParams('ceshi');
|
|
393
394
|
export default {
|
|
394
395
|
name: 'EsLogin',
|
|
395
396
|
inheritAttrs: false,
|
|
@@ -817,6 +818,9 @@ export default {
|
|
|
817
818
|
]);
|
|
818
819
|
},
|
|
819
820
|
created() {
|
|
821
|
+
if (ceshi == 'true' || ceshi == true) {
|
|
822
|
+
this.loginModel = '0';
|
|
823
|
+
}
|
|
820
824
|
if (this.isScale) {
|
|
821
825
|
util.setScale();
|
|
822
826
|
window.addEventListener('resize', this.setScale);
|
|
@@ -1021,6 +1025,7 @@ export default {
|
|
|
1021
1025
|
key: 'initLogin',
|
|
1022
1026
|
value: JSON.stringify(res.results)
|
|
1023
1027
|
});
|
|
1028
|
+
this.$emit('initLogin', res.results);
|
|
1024
1029
|
this.setConfig(res.results);
|
|
1025
1030
|
} else {
|
|
1026
1031
|
this.$message({
|
|
@@ -1069,7 +1074,7 @@ export default {
|
|
|
1069
1074
|
if (res.qrimg || res.qrImg) {
|
|
1070
1075
|
this.qrimg = res.qrimg || res.qrImg;
|
|
1071
1076
|
}
|
|
1072
|
-
if (res.loginModel) {
|
|
1077
|
+
if (res.loginModel && ceshi !== 'true' && ceshi !== true) {
|
|
1073
1078
|
this.loginModel = res.loginModel;
|
|
1074
1079
|
}
|
|
1075
1080
|
if (res.loginBackgroundUrl) {
|
|
@@ -1087,6 +1092,12 @@ export default {
|
|
|
1087
1092
|
if (res.subsystemExtend.login_url) {
|
|
1088
1093
|
this.actionUrl = res.subsystemExtend.login_url;
|
|
1089
1094
|
}
|
|
1095
|
+
if (
|
|
1096
|
+
res.subsystemExtend.loginModel &&
|
|
1097
|
+
(ceshi == 'true' || ceshi == true)
|
|
1098
|
+
) {
|
|
1099
|
+
this.loginModel = res.subsystemExtend.loginModel;
|
|
1100
|
+
}
|
|
1090
1101
|
if (res.subsystemExtend.applicationName) {
|
|
1091
1102
|
localStorage.setItem('appcode', res.subsystemExtend.applicationName);
|
|
1092
1103
|
}
|
|
@@ -297,7 +297,12 @@ export default {
|
|
|
297
297
|
//主题颜色选择颜色集合
|
|
298
298
|
themes: Array,
|
|
299
299
|
//需要隐藏的头部功能
|
|
300
|
-
hides:
|
|
300
|
+
hides: {
|
|
301
|
+
type: Object,
|
|
302
|
+
default() {
|
|
303
|
+
return {};
|
|
304
|
+
}
|
|
305
|
+
},
|
|
301
306
|
//储存数据
|
|
302
307
|
storage: {
|
|
303
308
|
type: String,
|
|
@@ -467,66 +472,29 @@ export default {
|
|
|
467
472
|
},
|
|
468
473
|
//隐藏操作按键
|
|
469
474
|
hide() {
|
|
470
|
-
let
|
|
471
|
-
|
|
472
|
-
let topRightToolHide = '';
|
|
473
|
-
if (
|
|
474
|
-
mainConfig &&
|
|
475
|
-
mainConfig.subsystemExtend &&
|
|
476
|
-
mainConfig.subsystemExtend.topRightToolHide
|
|
477
|
-
) {
|
|
475
|
+
let topRightToolHide = {};
|
|
476
|
+
if (this.topRightToolHide) {
|
|
478
477
|
topRightToolHide = JSON.parse(
|
|
479
|
-
|
|
478
|
+
this.topRightToolHide.replace(
|
|
480
479
|
/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,
|
|
481
480
|
'"$2":'
|
|
482
481
|
)
|
|
483
482
|
);
|
|
484
483
|
}
|
|
484
|
+
let hides = {
|
|
485
|
+
set: !this.set,
|
|
486
|
+
index: this.doorIndex ? false : true,
|
|
487
|
+
system: true,
|
|
488
|
+
home: this.homePage ? false : true
|
|
489
|
+
};
|
|
490
|
+
|
|
485
491
|
if (this.layout === 'subsystem' || this.application) {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
} else {
|
|
491
|
-
return { set: !this.set, system: false };
|
|
492
|
-
}
|
|
493
|
-
} else if (this.layout === 'topside' || this.layout === 'side') {
|
|
494
|
-
if (this.hides && Object.keys(this.hides).length) {
|
|
495
|
-
return {
|
|
496
|
-
...this.hides,
|
|
497
|
-
set: !this.set,
|
|
498
|
-
system: true,
|
|
499
|
-
user: true
|
|
500
|
-
};
|
|
501
|
-
} else if (topRightToolHide && Object.keys(topRightToolHide).length) {
|
|
502
|
-
return {
|
|
503
|
-
...topRightToolHide,
|
|
504
|
-
set: !this.set,
|
|
505
|
-
system: true,
|
|
506
|
-
user: true
|
|
507
|
-
};
|
|
508
|
-
} else {
|
|
509
|
-
return { set: !this.set, system: true, user: true };
|
|
510
|
-
}
|
|
511
|
-
} else {
|
|
512
|
-
if (this.hides && Object.keys(this.hides).length) {
|
|
513
|
-
return {
|
|
514
|
-
...this.hides,
|
|
515
|
-
set: !this.set,
|
|
516
|
-
system: true,
|
|
517
|
-
user: true
|
|
518
|
-
};
|
|
519
|
-
} else if (topRightToolHide && Object.keys(topRightToolHide).length) {
|
|
520
|
-
return {
|
|
521
|
-
...topRightToolHide,
|
|
522
|
-
set: !this.set,
|
|
523
|
-
system: true,
|
|
524
|
-
user: true
|
|
525
|
-
};
|
|
526
|
-
} else {
|
|
527
|
-
return { set: !this.set, system: true };
|
|
528
|
-
}
|
|
492
|
+
hides.system = false;
|
|
493
|
+
}
|
|
494
|
+
if (this.layout === 'topside' || this.layout === 'side') {
|
|
495
|
+
hides.user = true;
|
|
529
496
|
}
|
|
497
|
+
return { ...hides, ...this.hides, ...topRightToolHide };
|
|
530
498
|
},
|
|
531
499
|
logoUrl() {
|
|
532
500
|
if (this.mainLogo) {
|
|
@@ -664,7 +632,9 @@ export default {
|
|
|
664
632
|
showPage: false,
|
|
665
633
|
webSocket: null,
|
|
666
634
|
dialog: {},
|
|
667
|
-
hideSubMenu: false
|
|
635
|
+
hideSubMenu: false,
|
|
636
|
+
doorIndex: '',
|
|
637
|
+
topRightToolHide: ''
|
|
668
638
|
};
|
|
669
639
|
},
|
|
670
640
|
created() {
|
|
@@ -683,6 +653,7 @@ export default {
|
|
|
683
653
|
this.init(results);
|
|
684
654
|
}
|
|
685
655
|
}
|
|
656
|
+
this.doorIndex = sessionStorage.getItem('doorIndex');
|
|
686
657
|
},
|
|
687
658
|
mounted() {
|
|
688
659
|
this.handleListener();
|
|
@@ -878,6 +849,7 @@ export default {
|
|
|
878
849
|
}
|
|
879
850
|
if (i === 'doorIndex' && results[i]) {
|
|
880
851
|
window.open(results[i]);
|
|
852
|
+
this.doorIndex = results[i];
|
|
881
853
|
}
|
|
882
854
|
if (i === 'subsystemName' && results[i]) {
|
|
883
855
|
document.title = results[i];
|
|
@@ -916,6 +888,12 @@ export default {
|
|
|
916
888
|
if (results[i].loginPage) {
|
|
917
889
|
util.setStorage('loginPage', results[i].loginPage);
|
|
918
890
|
}
|
|
891
|
+
if (results[i].portalPage || results[i].portalpage) {
|
|
892
|
+
this.doorIndex = results[i].portalPage || results[i].portalpage;
|
|
893
|
+
}
|
|
894
|
+
if (results[i].topRightToolHide) {
|
|
895
|
+
this.topRightToolHide = results[i].topRightToolHide;
|
|
896
|
+
}
|
|
919
897
|
}
|
|
920
898
|
store.set(i, results[i]);
|
|
921
899
|
}
|
|
@@ -1707,6 +1685,9 @@ export default {
|
|
|
1707
1685
|
this.reset = true;
|
|
1708
1686
|
});
|
|
1709
1687
|
break;
|
|
1688
|
+
case 'index':
|
|
1689
|
+
util.win.open(this.doorIndex, '_self');
|
|
1690
|
+
break;
|
|
1710
1691
|
case 'user':
|
|
1711
1692
|
this.showUserInfo = true;
|
|
1712
1693
|
break;
|
|
@@ -29,14 +29,15 @@
|
|
|
29
29
|
v-for="ele in item.records.slice(0, 3)"
|
|
30
30
|
class="es-public-search-list-item"
|
|
31
31
|
:key="ele.id"
|
|
32
|
+
@click="handleClick(ele, item)"
|
|
32
33
|
>
|
|
33
34
|
<es-icon
|
|
34
35
|
class="es-public-search-item-icon"
|
|
35
|
-
v-bind="getIcon(ele,
|
|
36
|
+
v-bind="getIcon(ele, item)"
|
|
36
37
|
:style="setStyle(ele, index)"
|
|
37
38
|
></es-icon>
|
|
38
39
|
<div class="es-public-search-item-name">
|
|
39
|
-
{{ ele.name || ele.title }}
|
|
40
|
+
{{ ele.name || ele.title || ele.text }}
|
|
40
41
|
</div>
|
|
41
42
|
<div class="es-public-search-item-texts" v-if="ele.summary">
|
|
42
43
|
{{ ele.summary }}
|
|
@@ -74,15 +75,16 @@
|
|
|
74
75
|
:label="item.name"
|
|
75
76
|
:name="item.id || String(index + 1)"
|
|
76
77
|
:key="item.id"
|
|
77
|
-
v-loading="loadings[item.id || String(index
|
|
78
|
+
v-loading="loadings[item.id || String(index)]"
|
|
78
79
|
element-loading-background="rgba(0, 0, 0, 0.01)"
|
|
79
80
|
element-loading-text="加载中..."
|
|
81
|
+
v-show="hides.includes(item.name)"
|
|
80
82
|
>
|
|
81
83
|
<el-scrollbar
|
|
82
|
-
class="es-scrollbar"
|
|
84
|
+
class="es-scrollbar es-public-search-scrollbar"
|
|
83
85
|
:infinite-scroll="
|
|
84
86
|
() => {
|
|
85
|
-
|
|
87
|
+
handleSearchd(item, index);
|
|
86
88
|
}
|
|
87
89
|
"
|
|
88
90
|
:infinite-scroll-disabled="disabled"
|
|
@@ -99,14 +101,15 @@
|
|
|
99
101
|
v-for="ele in item.records"
|
|
100
102
|
class="es-public-search-list-item"
|
|
101
103
|
:key="ele.id"
|
|
104
|
+
@click="handleClick(ele, item)"
|
|
102
105
|
>
|
|
103
106
|
<es-icon
|
|
104
107
|
class="es-public-search-item-icon"
|
|
105
|
-
v-bind="getIcon(ele)"
|
|
108
|
+
v-bind="getIcon(ele, item)"
|
|
106
109
|
:style="setStyle(ele, index)"
|
|
107
110
|
></es-icon>
|
|
108
111
|
<div class="es-public-search-item-name">
|
|
109
|
-
{{ ele.name || ele.title }}
|
|
112
|
+
{{ ele.name || ele.title || ele.text }}
|
|
110
113
|
</div>
|
|
111
114
|
<div class="es-public-search-item-texts" v-if="ele.summary">
|
|
112
115
|
{{ ele.summary }}
|
|
@@ -124,7 +127,12 @@
|
|
|
124
127
|
</div>
|
|
125
128
|
</li>
|
|
126
129
|
</ul>
|
|
127
|
-
<p
|
|
130
|
+
<p
|
|
131
|
+
class="es-public-search-no-more"
|
|
132
|
+
v-if="noMore[item.id || String(index)]"
|
|
133
|
+
>
|
|
134
|
+
没有更多了
|
|
135
|
+
</p>
|
|
128
136
|
</el-scrollbar>
|
|
129
137
|
</el-tab-pane>
|
|
130
138
|
</el-tabs>
|
|
@@ -139,6 +147,22 @@ export default {
|
|
|
139
147
|
name: 'Search',
|
|
140
148
|
components: {},
|
|
141
149
|
props: {
|
|
150
|
+
menuIcon: {
|
|
151
|
+
type: String,
|
|
152
|
+
default: 'es-icon-application'
|
|
153
|
+
},
|
|
154
|
+
menus: {
|
|
155
|
+
type: Array,
|
|
156
|
+
default() {
|
|
157
|
+
return [];
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
apps: {
|
|
161
|
+
type: Array,
|
|
162
|
+
default() {
|
|
163
|
+
return [];
|
|
164
|
+
}
|
|
165
|
+
},
|
|
142
166
|
searchType: {
|
|
143
167
|
type: String,
|
|
144
168
|
default: searchType
|
|
@@ -146,6 +170,12 @@ export default {
|
|
|
146
170
|
pageSize: {
|
|
147
171
|
type: Number,
|
|
148
172
|
default: 10
|
|
173
|
+
},
|
|
174
|
+
hides: {
|
|
175
|
+
type: Array,
|
|
176
|
+
default() {
|
|
177
|
+
return [];
|
|
178
|
+
}
|
|
149
179
|
}
|
|
150
180
|
},
|
|
151
181
|
data() {
|
|
@@ -204,39 +234,47 @@ export default {
|
|
|
204
234
|
this.handleSearchAll = debounce(500, (res) => {
|
|
205
235
|
this.searchAll(res);
|
|
206
236
|
});
|
|
237
|
+
this.handleSearchd = debounce(500, (obj, index) => {
|
|
238
|
+
this.handleSearch(obj, index);
|
|
239
|
+
});
|
|
207
240
|
},
|
|
208
241
|
created() {
|
|
209
242
|
this.getTypes();
|
|
210
243
|
},
|
|
211
244
|
mounted() {},
|
|
212
245
|
methods: {
|
|
213
|
-
getIcon(res) {
|
|
246
|
+
getIcon(res, item) {
|
|
214
247
|
let icon;
|
|
215
248
|
let cls;
|
|
216
|
-
if (res.icon) {
|
|
217
|
-
icon = this.icons[res.icon.toLowerCase()];
|
|
249
|
+
if (res.icon || res.icons) {
|
|
250
|
+
icon = this.icons[(res.icon || res.icons).toLowerCase()];
|
|
218
251
|
if (!icon) {
|
|
219
|
-
if (res.icon == '#last') {
|
|
220
|
-
|
|
252
|
+
if (res.icon == '#last' || res.icons == '#last') {
|
|
253
|
+
let title = res.title || res.name || res.text;
|
|
254
|
+
icon = title.substr(-1, 1);
|
|
221
255
|
cls = 'es-public-search-item-icon-text';
|
|
222
256
|
} else {
|
|
223
257
|
cls = 'es-public-search-item-icons';
|
|
224
|
-
icon = res.icon;
|
|
258
|
+
icon = res.icon || res.icons;
|
|
225
259
|
}
|
|
226
260
|
}
|
|
227
261
|
} else {
|
|
228
|
-
let
|
|
262
|
+
let title = res.title || res.name || res.text;
|
|
263
|
+
let key = title.split('.')[1];
|
|
229
264
|
icon = key ? this.icons[key.toLowerCase()] : '';
|
|
230
265
|
if (!icon) {
|
|
231
|
-
icon =
|
|
266
|
+
icon =
|
|
267
|
+
item.name == '菜单' || item.name == '应用'
|
|
268
|
+
? this.menuIcon
|
|
269
|
+
: title.substr(-1, 1);
|
|
232
270
|
cls = 'es-public-search-item-icon-text';
|
|
233
271
|
}
|
|
234
272
|
}
|
|
235
273
|
return { class: cls, contents: icon };
|
|
236
274
|
},
|
|
237
275
|
setStyle(res, index) {
|
|
238
|
-
if (res.icon) {
|
|
239
|
-
let icon = this.icons[res.icon.toLowerCase()];
|
|
276
|
+
if (res.icon || res.icons) {
|
|
277
|
+
let icon = this.icons[(res.icon || res.icons).toLowerCase()];
|
|
240
278
|
if (!icon && res.icon != '#last') {
|
|
241
279
|
return { backgroundColor: this.colors[index % this.colors.length] };
|
|
242
280
|
}
|
|
@@ -249,8 +287,10 @@ export default {
|
|
|
249
287
|
util
|
|
250
288
|
.ajax({
|
|
251
289
|
url: this.searchType,
|
|
252
|
-
|
|
253
|
-
|
|
290
|
+
method: 'post',
|
|
291
|
+
format: false,
|
|
292
|
+
data: {
|
|
293
|
+
terminalType: 'web'
|
|
254
294
|
}
|
|
255
295
|
})
|
|
256
296
|
.then((res) => {
|
|
@@ -258,9 +298,9 @@ export default {
|
|
|
258
298
|
let { results } = res;
|
|
259
299
|
let loadings = {};
|
|
260
300
|
let noMore = {};
|
|
261
|
-
let types = results.
|
|
262
|
-
loadings[item.id || String(index
|
|
263
|
-
noMore[item.id || String(index
|
|
301
|
+
let types = results.catalog.map((item, index) => {
|
|
302
|
+
loadings[item.id || String(index)] = false;
|
|
303
|
+
noMore[item.id || String(index)] = false;
|
|
264
304
|
return { ...item, pageNum: 0, pageCount: 1, records: [] };
|
|
265
305
|
});
|
|
266
306
|
this.types = types;
|
|
@@ -272,33 +312,83 @@ export default {
|
|
|
272
312
|
searchAll(keyWords) {
|
|
273
313
|
for (let i = 0; i < this.types.length; i++) {
|
|
274
314
|
if (keyWords) {
|
|
275
|
-
this.
|
|
315
|
+
let item = this.types[i];
|
|
316
|
+
if (item.name == '菜单' && this.menus.length) {
|
|
317
|
+
this.isLoading = false;
|
|
318
|
+
this.types[i].records = this.searchData(this.menus, keyWords);
|
|
319
|
+
this.types[i].totalCount = this.types[i].records.length;
|
|
320
|
+
this.types[i].pageCount = Math.ceil(
|
|
321
|
+
this.types[i].records.length / this.pageSize
|
|
322
|
+
);
|
|
323
|
+
this.types[i].pageNum = 0;
|
|
324
|
+
this.$set(this.loadings, item.id || String(i), false);
|
|
325
|
+
this.$set(this.noMore, item.id || String(i), true);
|
|
326
|
+
} else if (item.name == '应用' && this.apps.length) {
|
|
327
|
+
this.isLoading = false;
|
|
328
|
+
this.types[i].records = this.searchData(this.apps, keyWords);
|
|
329
|
+
this.types[i].totalCount = this.types[i].records.length;
|
|
330
|
+
this.types[i].pageCount = Math.ceil(
|
|
331
|
+
this.types[i].records.length / this.pageSize
|
|
332
|
+
);
|
|
333
|
+
this.types[i].pageNum = 0;
|
|
334
|
+
this.$set(this.loadings, item.id || String(i), false);
|
|
335
|
+
this.$set(this.noMore, item.id || String(i), true);
|
|
336
|
+
} else if (item.dataRequestUrl) {
|
|
337
|
+
this.isLoading = true;
|
|
338
|
+
this.handleSearch(item, i);
|
|
339
|
+
} else {
|
|
340
|
+
this.types[i].records = [];
|
|
341
|
+
this.types[i].totalCount = 0;
|
|
342
|
+
this.types[i].pageCount = 1;
|
|
343
|
+
this.types[i].pageNum = 0;
|
|
344
|
+
this.$set(this.loadings, item.id || String(i), false);
|
|
345
|
+
this.$set(this.noMore, item.id || String(i), true);
|
|
346
|
+
}
|
|
276
347
|
} else {
|
|
277
348
|
this.isLoading = false;
|
|
278
349
|
this.types[i].records = [];
|
|
279
350
|
this.types[i].totalCount = 0;
|
|
280
351
|
this.types[i].pageCount = 1;
|
|
281
352
|
this.types[i].pageNum = 0;
|
|
353
|
+
this.$set(this.loadings, item.id || String(i), false);
|
|
354
|
+
this.$set(this.noMore, item.id || String(i), true);
|
|
282
355
|
}
|
|
283
356
|
}
|
|
284
357
|
},
|
|
358
|
+
searchData(data, name) {
|
|
359
|
+
let records = [];
|
|
360
|
+
data.forEach((item) => {
|
|
361
|
+
let words = item.name || item.text;
|
|
362
|
+
if (words.indexOf(name) > -1 && item.permission !== false) {
|
|
363
|
+
records.push(item);
|
|
364
|
+
}
|
|
365
|
+
if (item.children && item.children.length) {
|
|
366
|
+
records = records.concat(this.searchData(item.children, name));
|
|
367
|
+
}
|
|
368
|
+
if (item.fourthTabs && item.fourthTabs.length) {
|
|
369
|
+
records = records.concat(this.searchData(item.fourthTabs, name));
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
return records;
|
|
373
|
+
},
|
|
285
374
|
handleSearch(obj, index) {
|
|
286
|
-
if (obj.pageNum < obj.pageCount) {
|
|
287
|
-
this.$set(this.loadings, obj.id || String(index
|
|
375
|
+
if (obj.pageNum < obj.pageCount && this.keyWords) {
|
|
376
|
+
this.$set(this.loadings, obj.id || String(index), true);
|
|
288
377
|
if (this.active == '0') {
|
|
289
378
|
this.isLoading = true;
|
|
290
379
|
}
|
|
291
380
|
util
|
|
292
381
|
.ajax({
|
|
293
382
|
url: obj.dataRequestUrl,
|
|
294
|
-
|
|
383
|
+
method: 'post',
|
|
384
|
+
data: {
|
|
295
385
|
pageNum: obj.pageNum + 1,
|
|
296
386
|
pageSize: this.pageSize,
|
|
297
387
|
keyWords: this.keyWords
|
|
298
388
|
}
|
|
299
389
|
})
|
|
300
390
|
.then((res) => {
|
|
301
|
-
this.$set(this.loadings, obj.id || String(index
|
|
391
|
+
this.$set(this.loadings, obj.id || String(index), false);
|
|
302
392
|
let flag = false;
|
|
303
393
|
for (let i in this.loadings) {
|
|
304
394
|
if (this.loadings[i]) {
|
|
@@ -306,7 +396,9 @@ export default {
|
|
|
306
396
|
break;
|
|
307
397
|
}
|
|
308
398
|
}
|
|
309
|
-
!flag
|
|
399
|
+
if (!flag) {
|
|
400
|
+
this.isLoading = false;
|
|
401
|
+
}
|
|
310
402
|
if (res.rCode == 0) {
|
|
311
403
|
let { results } = res;
|
|
312
404
|
obj.totalCount = results.totalCount;
|
|
@@ -315,14 +407,26 @@ export default {
|
|
|
315
407
|
obj.records = obj.records.concat(results.records);
|
|
316
408
|
this.$set(
|
|
317
409
|
this.noMore,
|
|
318
|
-
obj.id || String(index
|
|
410
|
+
obj.id || String(index),
|
|
319
411
|
results.pageNum >= results.pageCount
|
|
320
412
|
);
|
|
413
|
+
} else {
|
|
414
|
+
this.types[index].records = [];
|
|
415
|
+
this.types[index].totalCount = 0;
|
|
416
|
+
this.types[index].pageCount = 1;
|
|
417
|
+
this.types[index].pageNum = 0;
|
|
418
|
+
this.$set(this.loadings, obj.id || String(index), false);
|
|
419
|
+
this.$set(this.noMore, obj.id || String(index), true);
|
|
321
420
|
}
|
|
322
421
|
})
|
|
323
422
|
.catch((err) => {
|
|
324
423
|
this.isLoading = false;
|
|
325
|
-
this
|
|
424
|
+
this.types[index].records = [];
|
|
425
|
+
this.types[index].totalCount = 0;
|
|
426
|
+
this.types[index].pageCount = 1;
|
|
427
|
+
this.types[index].pageNum = 0;
|
|
428
|
+
this.$set(this.loadings, obj.id || String(index), false);
|
|
429
|
+
this.$set(this.noMore, obj.id || String(index), true);
|
|
326
430
|
if (err.message && err.message !== 'canceled') {
|
|
327
431
|
this.$message.error(err.message);
|
|
328
432
|
}
|
|
@@ -331,6 +435,9 @@ export default {
|
|
|
331
435
|
},
|
|
332
436
|
handleTabs(res, index) {
|
|
333
437
|
this.active = res.id || String(index + 1);
|
|
438
|
+
},
|
|
439
|
+
handleClick(res, parent) {
|
|
440
|
+
this.$emit('select', res, parent);
|
|
334
441
|
}
|
|
335
442
|
}
|
|
336
443
|
};
|
|
@@ -192,10 +192,12 @@
|
|
|
192
192
|
|
|
193
193
|
<script>
|
|
194
194
|
import { debounce } from 'throttle-debounce';
|
|
195
|
+
import { recordUserApp } from 'eoss-ui/src/config/api.js';
|
|
195
196
|
export default {
|
|
196
197
|
name: 'Apps',
|
|
197
198
|
components: {},
|
|
198
199
|
props: {
|
|
200
|
+
user: Object,
|
|
199
201
|
visible: Boolean,
|
|
200
202
|
//菜单、应用默认图标
|
|
201
203
|
menuIcon: String,
|
|
@@ -348,6 +350,16 @@ export default {
|
|
|
348
350
|
}
|
|
349
351
|
},
|
|
350
352
|
handleClick(res) {
|
|
353
|
+
util
|
|
354
|
+
.ajax({
|
|
355
|
+
url: recordUserApp,
|
|
356
|
+
params: {
|
|
357
|
+
userId: this.user.userId,
|
|
358
|
+
appId: res.id
|
|
359
|
+
}
|
|
360
|
+
})
|
|
361
|
+
.then(() => {})
|
|
362
|
+
.catch(() => {});
|
|
351
363
|
this.$emit('click', res);
|
|
352
364
|
},
|
|
353
365
|
/**
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
49
|
import util from 'eoss-ui/src/utils/util';
|
|
50
|
-
let doorIndex = sessionStorage.getItem('doorIndex');
|
|
51
50
|
export default {
|
|
52
51
|
name: 'Handler',
|
|
53
52
|
components: {},
|
|
@@ -67,7 +66,6 @@ export default {
|
|
|
67
66
|
default() {
|
|
68
67
|
return {
|
|
69
68
|
type: 'index',
|
|
70
|
-
link: doorIndex,
|
|
71
69
|
icon: 'es-icon-home',
|
|
72
70
|
title: '门户'
|
|
73
71
|
};
|