eoss-ui 0.5.81-beta20 → 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.
- package/lib/data-table.js +38 -26
- package/lib/dialog.js +15 -19
- package/lib/eoss-ui.common.js +335 -253
- package/lib/flow-group.js +48 -17
- package/lib/flow.js +16 -10
- package/lib/index.js +1 -1
- package/lib/main.js +147 -115
- package/lib/selector-panel.js +9 -9
- package/lib/selector.js +4 -2
- package/lib/tabs.js +37 -34
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/package.json +3 -3
- package/packages/data-table/src/column.vue +21 -14
- package/packages/dialog/src/main.vue +13 -20
- package/packages/flow/src/main.vue +2 -0
- package/packages/flow-group/src/main.vue +17 -10
- package/packages/main/src/simplicity/index.vue +103 -46
- package/packages/main/src/simplicity/router-page.vue +5 -14
- package/packages/selector/src/main.vue +1 -0
- package/packages/selector-panel/src/selection.vue +2 -2
- package/packages/tabs/src/main.vue +14 -14
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/tabs.css +1 -1
- package/packages/theme-chalk/src/tabs.scss +24 -28
- package/src/index.js +1 -1
package/lib/theme-chalk/tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.es-tabs:not(.el-tabs--card):not(.el-tabs--border-card):not(.el-tabs--left) .el-tabs__nav-wrap{padding:5px 8px 0}.es-tabs:not(.el-tabs--card):not(.el-tabs--border-card):not(.el-tabs--left) .el-tabs__nav-wrap .is-top .el-tabs__item{padding:0 16px}.es-tabs:not(.el-tabs--card):not(.el-tabs--border-card):not(.el-tabs--left) .el-tabs__nav-wrap .is-top .el-tabs__item+.el-tabs__item{padding-left:20px}.es-tabs .el-tabs__nav-wrap::after{height:1px}.es-tabs.el-tabs--left .el-tabs__nav-wrap.is-left::after,.es-tabs.el-tabs--left .el-tabs__nav-wrap.is-right::after,.es-tabs.el-tabs--right .el-tabs__nav-wrap.is-left::after,.es-tabs.el-tabs--right .el-tabs__nav-wrap.is-right::after{width:1px}.es-tabs.el-tabs--border-card
|
|
1
|
+
@charset "UTF-8";.es-tabs:not(.el-tabs--card):not(.el-tabs--border-card):not(.el-tabs--left) .el-tabs__nav-wrap:not(.is-scrollable){padding:5px 8px 0}.es-tabs:not(.el-tabs--card):not(.el-tabs--border-card):not(.el-tabs--left) .el-tabs__nav-wrap:not(.is-scrollable) .is-top .el-tabs__item{padding:0 16px}.es-tabs:not(.el-tabs--card):not(.el-tabs--border-card):not(.el-tabs--left) .el-tabs__nav-wrap:not(.is-scrollable) .is-top .el-tabs__item+.el-tabs__item{padding-left:20px}.es-tabs .el-tabs__nav-wrap::after{height:1px}.es-tabs.el-tabs--left .el-tabs__nav-wrap.is-left::after,.es-tabs.el-tabs--left .el-tabs__nav-wrap.is-right::after,.es-tabs.el-tabs--right .el-tabs__nav-wrap.is-left::after,.es-tabs.el-tabs--right .el-tabs__nav-wrap.is-right::after{width:1px}.es-tabs.el-tabs--border-card>.el-tabs__header{height:44px;border-bottom:1px solid #d9d9d9}.es-tabs.el-tabs--border-card>.el-tabs__header .el-tabs__nav-scroll{padding:9px 10px 0}.es-tabs.el-tabs--border-card>.el-tabs__header .el-tabs__nav-scroll .el-tabs__item{height:36px;line-height:36px}.es-tabs.el-tabs--border-card>.el-tabs__header .el-tabs__nav-scroll .el-tabs__item .el-badge .el-badge__content{display:block;line-height:16px;font-weight:200;width:16px;height:16px;padding:0;border:0}.es-tabs.el-tabs--border-card>.el-tabs__header .el-tabs__nav-scroll .el-tabs__item.is-active{border-top-color:#d9d9d9;border-top-left-radius:2px;border-top-right-radius:2px;font-weight:700;color:#1890ff}.es-tabs .el-tabs__content{padding:0}.es-tabs.es-tabs-full{padding-top:44px;position:relative}.es-tabs.es-tabs-full .el-tabs__header.is-top{position:absolute;left:0;top:0;right:0}.es-tabs.es-tabs-full .el-tab-pane,.es-tabs.es-tabs-full .el-tabs__content{height:100%}.es-tabs.es-tabs-full .el-tab-pane.es-tabs-padding,.es-tabs.es-tabs-full .el-tabs__content.es-tabs-padding{padding:12px}.es-tabs .es-tabs-panel{height:100%}.es-tabs .es-tabs-panel .es-data-table-content{padding:16px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eoss-ui",
|
|
3
|
-
"version": "0.5.81-
|
|
3
|
+
"version": "0.5.81-beta21",
|
|
4
4
|
"description": "eoss内部业务组件",
|
|
5
5
|
"main": "lib/eoss-ui.common.js",
|
|
6
6
|
"files": [
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"stompjs": "^2.3.3",
|
|
70
70
|
"throttle-debounce": "^5.0.2",
|
|
71
71
|
"video.js": "^8.0.4",
|
|
72
|
-
"wujie-vue2": "^1.0.
|
|
72
|
+
"wujie-vue2": "^1.0.22"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"vue": "^2.5.22"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"cp-cli": "^1.0.2",
|
|
98
98
|
"cross-env": "^3.1.3",
|
|
99
99
|
"css-loader": "^2.1.0",
|
|
100
|
-
"eoss-element": "^0.3.
|
|
100
|
+
"eoss-element": "^0.3.17",
|
|
101
101
|
"es6-promise": "^4.0.5",
|
|
102
102
|
"eslint": "4.18.2",
|
|
103
103
|
"eslint-config-elemefe": "0.1.1",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<component
|
|
14
14
|
v-if="getType(scope.row.formConfigs, 'component')"
|
|
15
15
|
:is="tag"
|
|
16
|
-
v-bind="
|
|
16
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
17
17
|
v-model="scope.row[field || prop]"
|
|
18
18
|
:data="getData(scope.row.formOptions)"
|
|
19
19
|
@blur="
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
></component>
|
|
51
51
|
<es-select
|
|
52
52
|
v-else-if="getType(scope.row.formConfigs, 'select')"
|
|
53
|
-
v-bind="
|
|
53
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
54
54
|
v-model="scope.row[field || prop]"
|
|
55
55
|
:data="getData(scope.row.formOptions)"
|
|
56
56
|
@blur="
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
</es-select>
|
|
89
89
|
<es-cascader
|
|
90
90
|
v-else-if="getType(scope.row.formConfigs, 'cascader')"
|
|
91
|
-
v-bind="
|
|
91
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
92
92
|
v-model="scope.row[field || prop]"
|
|
93
93
|
:data="getData(scope.row.formOptions)"
|
|
94
94
|
@blur="
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
</es-cascader>
|
|
127
127
|
<es-select-ganged
|
|
128
128
|
v-else-if="getType(scope.row.formConfigs, 'ganged')"
|
|
129
|
-
v-bind="
|
|
129
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
130
130
|
v-model="scope.row[field || prop]"
|
|
131
131
|
:data="init(getData(scope.row.formOptions), config)"
|
|
132
132
|
@change="
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
</es-select-ganged>
|
|
144
144
|
<es-radio-group
|
|
145
145
|
v-else-if="getType(scope.row.formConfigs, 'radio')"
|
|
146
|
-
v-bind="
|
|
146
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
147
147
|
v-model="scope.row[field || prop]"
|
|
148
148
|
:data="getData(scope.row.formOptions)"
|
|
149
149
|
@change="
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
</es-radio-group>
|
|
161
161
|
<es-checkbox-group
|
|
162
162
|
v-else-if="getType(scope.row.formConfigs, 'checkbox')"
|
|
163
|
-
v-bind="
|
|
163
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
164
164
|
v-model="scope.row[field || prop]"
|
|
165
165
|
:data="getData(scope.row.formOptions)"
|
|
166
166
|
@change="
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
</es-checkbox-group>
|
|
178
178
|
<es-switch
|
|
179
179
|
v-else-if="getType(scope.row.formConfigs, 'switch')"
|
|
180
|
-
v-bind="
|
|
180
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
181
181
|
v-model="scope.row[field || prop]"
|
|
182
182
|
:data="getData(scope.row.formOptions)"
|
|
183
183
|
@change="
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
'halfyear'
|
|
211
211
|
])
|
|
212
212
|
"
|
|
213
|
-
v-bind="
|
|
213
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
214
214
|
v-model="scope.row[field || prop]"
|
|
215
215
|
:type="type"
|
|
216
216
|
@blur="
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
</es-date-picker>
|
|
249
249
|
<es-input-number
|
|
250
250
|
v-else-if="getType(scope.row.formConfigs, 'number')"
|
|
251
|
-
v-bind="
|
|
251
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
252
252
|
v-model="scope.row[field || prop]"
|
|
253
253
|
@blur="
|
|
254
254
|
(event) => {
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
</es-input-number>
|
|
286
286
|
<es-selector
|
|
287
287
|
v-else-if="getType(scope.row.formConfigs, 'selector')"
|
|
288
|
-
v-bind="
|
|
288
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
289
289
|
v-model="scope.row[field || prop]"
|
|
290
290
|
v-on="
|
|
291
291
|
exclAttribute({
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
<input
|
|
315
315
|
v-if="getType(scope.row.formConfigs, ['text', 'input'])"
|
|
316
316
|
class="el-input__inner"
|
|
317
|
-
v-bind="
|
|
317
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
318
318
|
v-model.lazy="scope.row[field]"
|
|
319
319
|
@blur="
|
|
320
320
|
(event) => {
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
<textarea
|
|
352
352
|
v-else
|
|
353
353
|
class="el-textarea__inner"
|
|
354
|
-
v-bind="
|
|
354
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
355
355
|
v-model.lazy="scope.row[field]"
|
|
356
356
|
@blur="
|
|
357
357
|
(event) => {
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
</template>
|
|
389
389
|
<es-input
|
|
390
390
|
v-else
|
|
391
|
-
v-bind="
|
|
391
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
392
392
|
:type="type"
|
|
393
393
|
:scope="scope"
|
|
394
394
|
v-model="scope.row[field || prop]"
|
|
@@ -784,10 +784,17 @@ export default {
|
|
|
784
784
|
getType(config, types) {
|
|
785
785
|
let type =
|
|
786
786
|
config && config[this.field || this.prop]
|
|
787
|
-
? config[this.field || this.prop]
|
|
787
|
+
? config[this.field || this.prop]['type'] ||
|
|
788
|
+
config[this.field || this.prop]
|
|
788
789
|
: this.type;
|
|
789
790
|
return Array.isArray(types) ? types.includes(type) : type == types;
|
|
790
791
|
},
|
|
792
|
+
getOptions(config) {
|
|
793
|
+
let option = config && config[this.field || this.prop];
|
|
794
|
+
return option && typeof option == 'object'
|
|
795
|
+
? { ...this.formOption, ...option }
|
|
796
|
+
: this.formOption;
|
|
797
|
+
},
|
|
791
798
|
getData(res) {
|
|
792
799
|
return res && res[this.field || this.prop]
|
|
793
800
|
? res[this.field || this.prop]
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
class="es-dialog"
|
|
4
4
|
:title="titles"
|
|
5
5
|
:visible.sync="show"
|
|
6
|
-
:width="
|
|
7
|
-
:height="
|
|
6
|
+
:width="_width"
|
|
7
|
+
:height="_height"
|
|
8
8
|
:close-on-click-modal="shadeClose"
|
|
9
9
|
:showScale="showScale"
|
|
10
10
|
:drag="drag"
|
|
@@ -264,6 +264,10 @@ import WujieVue from 'wujie-vue2';
|
|
|
264
264
|
import util from 'eoss-ui/src/utils/util';
|
|
265
265
|
import mbus from 'eoss-ui/src/utils/bus';
|
|
266
266
|
const { bus } = WujieVue;
|
|
267
|
+
let availWidth = 0;
|
|
268
|
+
let availHeight = 0;
|
|
269
|
+
availWidth = util.win.top.document.body.offsetWidth - 260;
|
|
270
|
+
availHeight = util.win.top.document.body.offsetHeight - 60;
|
|
267
271
|
export default {
|
|
268
272
|
name: 'EsDialog',
|
|
269
273
|
inheritAttrs: false,
|
|
@@ -344,6 +348,12 @@ export default {
|
|
|
344
348
|
computed: {
|
|
345
349
|
wujieName() {
|
|
346
350
|
return this.name ? this.name : util.uuid(16);
|
|
351
|
+
},
|
|
352
|
+
_width() {
|
|
353
|
+
return this.width ? this.width : this.sizes[this.size]['width'];
|
|
354
|
+
},
|
|
355
|
+
_height() {
|
|
356
|
+
return this.height ? this.height : this.sizes[this.size]['height'];
|
|
347
357
|
}
|
|
348
358
|
},
|
|
349
359
|
watch: {
|
|
@@ -367,33 +377,16 @@ export default {
|
|
|
367
377
|
sm: { width: '960px', height: '500px' },
|
|
368
378
|
md: { width: '1060px', height: '600px' },
|
|
369
379
|
lg: { width: '1200px', height: '800px' },
|
|
380
|
+
max: { width: `${availWidth}px`, height: `${availHeight}px` },
|
|
370
381
|
full: { width: '100%', height: '100%' }
|
|
371
382
|
},
|
|
372
383
|
show: this.visible,
|
|
373
384
|
defaultProps: {},
|
|
374
|
-
wd: '',
|
|
375
|
-
ht: '',
|
|
376
385
|
zoom: 1,
|
|
377
386
|
scales: { zoom: 1 }
|
|
378
387
|
};
|
|
379
388
|
},
|
|
380
389
|
created() {
|
|
381
|
-
let availWidth = 0;
|
|
382
|
-
let availHeight = 0;
|
|
383
|
-
availWidth = util.win.top.document.body.offsetWidth - 260;
|
|
384
|
-
availHeight = util.win.top.document.body.offsetHeight - 60;
|
|
385
|
-
this.sizes.max = { width: `${availWidth}px`, height: `${availHeight}px` };
|
|
386
|
-
if (
|
|
387
|
-
this.size === 'full' ||
|
|
388
|
-
(this.width == '100%' && this.height == '100%')
|
|
389
|
-
) {
|
|
390
|
-
this.full = true;
|
|
391
|
-
this.wd = '100%';
|
|
392
|
-
this.ht = '100%';
|
|
393
|
-
} else {
|
|
394
|
-
this.wd = this.width ? this.width : this.sizes[this.size]['width'];
|
|
395
|
-
this.ht = this.height ? this.height : this.sizes[this.size]['height'];
|
|
396
|
-
}
|
|
397
390
|
if (this.busEvent) {
|
|
398
391
|
mbus.$on(this.busEvent, async (res) => {
|
|
399
392
|
this.titles = res.title;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
<div class="es-flow-title">
|
|
10
10
|
<span v-show="!shrink">当前节点:{{ isFlow ? '拟稿' : NodeName }}</span>
|
|
11
11
|
<es-button
|
|
12
|
+
v-if="showShrink"
|
|
12
13
|
size="medium"
|
|
13
14
|
class="es-icon"
|
|
14
15
|
:icon="shrink ? 'es-icon-indent' : 'es-icon-increase'"
|
|
@@ -717,6 +718,7 @@ export default {
|
|
|
717
718
|
Preset
|
|
718
719
|
},
|
|
719
720
|
props: {
|
|
721
|
+
showShrink: { type: Boolean, default: true },
|
|
720
722
|
isStartFlow: { type: Boolean, default: false },
|
|
721
723
|
businessId: { type: String, default: '' },
|
|
722
724
|
pendingId: { type: String, default: '' },
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
:value="items.title.count"
|
|
33
33
|
:color="items.title.color"
|
|
34
34
|
:max="99"
|
|
35
|
-
|
|
35
|
+
>{{ items.title.text }}
|
|
36
36
|
</el-badge>
|
|
37
|
-
<template v-
|
|
37
|
+
<template v-else>{{ items.title.text }}</template>
|
|
38
38
|
</template>
|
|
39
39
|
<template v-else>{{ items.title }}</template>
|
|
40
40
|
</template>
|
|
@@ -279,11 +279,12 @@
|
|
|
279
279
|
>
|
|
280
280
|
</es-dialog>
|
|
281
281
|
<component
|
|
282
|
-
v-if="item.component"
|
|
283
|
-
:is="item.type"
|
|
282
|
+
v-if="item.component || item.type == 'component'"
|
|
283
|
+
:is="item.is || item.name || item.type"
|
|
284
284
|
v-bind="
|
|
285
285
|
handleExclAttribute({
|
|
286
|
-
data: item
|
|
286
|
+
data: item,
|
|
287
|
+
attrs: ['is', 'type']
|
|
287
288
|
})
|
|
288
289
|
"
|
|
289
290
|
></component>
|
|
@@ -292,11 +293,12 @@
|
|
|
292
293
|
</template>
|
|
293
294
|
<template v-else>
|
|
294
295
|
<component
|
|
295
|
-
v-if="contents.component"
|
|
296
|
-
:is="contents.type"
|
|
296
|
+
v-if="contents.component || contents.type == 'component'"
|
|
297
|
+
:is="contents.is || contents.name || contents.type"
|
|
297
298
|
v-bind="
|
|
298
299
|
handleExclAttribute({
|
|
299
|
-
data: contents
|
|
300
|
+
data: contents,
|
|
301
|
+
attrs: ['is', 'type']
|
|
300
302
|
})
|
|
301
303
|
"
|
|
302
304
|
></component>
|
|
@@ -426,7 +428,7 @@
|
|
|
426
428
|
class="es-group-flow"
|
|
427
429
|
v-bind="_flow"
|
|
428
430
|
:width="width"
|
|
429
|
-
:before-submit="handleSubmit"
|
|
431
|
+
:before-submit="isSubmit ? handleSubmit : undefined"
|
|
430
432
|
:businessId="businessId"
|
|
431
433
|
@startTaskRead="handleTaskRead"
|
|
432
434
|
@success="handleSuccess"
|
|
@@ -482,7 +484,11 @@ export default {
|
|
|
482
484
|
type: String,
|
|
483
485
|
default: '360px'
|
|
484
486
|
},
|
|
485
|
-
refs: String
|
|
487
|
+
refs: String,
|
|
488
|
+
isSubmit: {
|
|
489
|
+
type: Boolean,
|
|
490
|
+
default: true
|
|
491
|
+
}
|
|
486
492
|
},
|
|
487
493
|
data() {
|
|
488
494
|
return {
|
|
@@ -635,6 +641,7 @@ export default {
|
|
|
635
641
|
if (Array.isArray(esFlowForm)) {
|
|
636
642
|
esFlowForm = esFlowForm[0];
|
|
637
643
|
}
|
|
644
|
+
esFlowForm;
|
|
638
645
|
this.showMsg = res == 1 ? false : true;
|
|
639
646
|
return esFlowForm.submitData(undefined, false, {}, res);
|
|
640
647
|
},
|
|
@@ -232,34 +232,28 @@
|
|
|
232
232
|
:label="item.text || item.name"
|
|
233
233
|
:name="item.id"
|
|
234
234
|
>
|
|
235
|
-
<
|
|
235
|
+
<iframe
|
|
236
236
|
v-if="(isIE && item.method !== 'router') || item.method == 'iframe'"
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<router-page
|
|
258
|
-
v-bind="item"
|
|
259
|
-
:show="activeName == item.id"
|
|
260
|
-
:query="$parent.params"
|
|
261
|
-
></router-page>
|
|
262
|
-
</template>
|
|
237
|
+
:id="activeName == item.id ? iframeId : ''"
|
|
238
|
+
:name="activeName == item.id ? iframeId : ''"
|
|
239
|
+
frameborder="0"
|
|
240
|
+
width="100%"
|
|
241
|
+
height="100%"
|
|
242
|
+
:src="item.url"
|
|
243
|
+
></iframe>
|
|
244
|
+
<es-wujie
|
|
245
|
+
v-else-if="item.method === 'wujie' && item.refresh"
|
|
246
|
+
:show="true"
|
|
247
|
+
:props="wjProps"
|
|
248
|
+
:attrs="wjAttrs"
|
|
249
|
+
:name="item.appCode"
|
|
250
|
+
:url="item.url"
|
|
251
|
+
></es-wujie>
|
|
252
|
+
<router-page
|
|
253
|
+
v-else-if="item.method === 'router' && item.refresh"
|
|
254
|
+
v-bind="item"
|
|
255
|
+
:query="$parent.params"
|
|
256
|
+
></router-page>
|
|
263
257
|
</el-tab-pane>
|
|
264
258
|
</el-tabs>
|
|
265
259
|
<!-- 路由、iframe end -->
|
|
@@ -867,6 +861,49 @@ export default {
|
|
|
867
861
|
}
|
|
868
862
|
});
|
|
869
863
|
},
|
|
864
|
+
/**
|
|
865
|
+
* @desc 获取菜单层级id
|
|
866
|
+
* @param {Array} [menus] - 系统菜单数据对象
|
|
867
|
+
* @param {String} [url] - 菜单id或url地址
|
|
868
|
+
*/
|
|
869
|
+
getId(menus, code) {
|
|
870
|
+
if (!code) {
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
for (let i = 0; i < menus.length; i++) {
|
|
874
|
+
let item = menus[i];
|
|
875
|
+
if (item.appCode === code) {
|
|
876
|
+
return item.id;
|
|
877
|
+
} else if (
|
|
878
|
+
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
879
|
+
item.children.length
|
|
880
|
+
) {
|
|
881
|
+
let id = this.getId(item.children, code);
|
|
882
|
+
if (id) {
|
|
883
|
+
if (item.pid === 'root' || Array.isArray(id)) {
|
|
884
|
+
return [item.id].concat(id);
|
|
885
|
+
} else if (typeof id === 'string') {
|
|
886
|
+
return [item.id, id];
|
|
887
|
+
}
|
|
888
|
+
return id;
|
|
889
|
+
}
|
|
890
|
+
} else if (
|
|
891
|
+
Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
|
|
892
|
+
item.fourthTabs.length
|
|
893
|
+
) {
|
|
894
|
+
let id = this.getId(item.fourthTabs, code);
|
|
895
|
+
if (id) {
|
|
896
|
+
if (item.pid === 'root' || Array.isArray(id)) {
|
|
897
|
+
return [item.id].concat(id);
|
|
898
|
+
} else if (typeof id === 'string') {
|
|
899
|
+
return [item.id, id];
|
|
900
|
+
}
|
|
901
|
+
return id;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
return false;
|
|
906
|
+
},
|
|
870
907
|
/**
|
|
871
908
|
* @desc:获取菜单列表
|
|
872
909
|
* @author huangbo
|
|
@@ -899,14 +936,16 @@ export default {
|
|
|
899
936
|
}
|
|
900
937
|
}
|
|
901
938
|
}
|
|
902
|
-
let
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
'
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
939
|
+
let ids = this.getId(this.menus, this.appCode);
|
|
940
|
+
let subMenus;
|
|
941
|
+
if (ids && Array.isArray(ids) && ids.length > 1) {
|
|
942
|
+
subMenus = this.getMenu(this.menus, ids[0], 'id');
|
|
943
|
+
if (subMenus) {
|
|
944
|
+
let obj = this.getMenu(
|
|
945
|
+
this.menus,
|
|
946
|
+
ids[ids.length - 1],
|
|
947
|
+
'id'
|
|
948
|
+
);
|
|
910
949
|
if (obj) {
|
|
911
950
|
this.subActive = obj.id;
|
|
912
951
|
let tab = this.setIframeType(obj);
|
|
@@ -916,6 +955,23 @@ export default {
|
|
|
916
955
|
this.subActive = '';
|
|
917
956
|
}
|
|
918
957
|
}
|
|
958
|
+
} else {
|
|
959
|
+
subMenus = this.getMenu(this.menus, this.appCode, 'appCode');
|
|
960
|
+
if (subMenus) {
|
|
961
|
+
if (this.tabs.length == 0) {
|
|
962
|
+
let obj = this.getFirst(subMenus);
|
|
963
|
+
if (obj) {
|
|
964
|
+
this.subActive = obj.id;
|
|
965
|
+
let tab = this.setIframeType(obj);
|
|
966
|
+
this.tabs = [tab];
|
|
967
|
+
this.activeName = tab.id;
|
|
968
|
+
} else {
|
|
969
|
+
this.subActive = '';
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
if (subMenus) {
|
|
919
975
|
this.subMenus = subMenus;
|
|
920
976
|
this.showMenu = true;
|
|
921
977
|
} else {
|
|
@@ -1368,23 +1424,24 @@ export default {
|
|
|
1368
1424
|
this.showMsg = false;
|
|
1369
1425
|
this.showSet = false;
|
|
1370
1426
|
let i = util.indexOfObj(this.tabs, res, 'id');
|
|
1371
|
-
this.activeName = res.id;
|
|
1372
1427
|
if (i == -1) {
|
|
1373
1428
|
let tab = this.setIframeType(res);
|
|
1374
1429
|
this.tabs.push(tab);
|
|
1430
|
+
this.activeName = res.id;
|
|
1375
1431
|
} else {
|
|
1376
|
-
|
|
1377
|
-
|
|
1432
|
+
let tab = this.tabs[i];
|
|
1433
|
+
if (tab.method === 'iframe') {
|
|
1434
|
+
this.activeName = res.id;
|
|
1435
|
+
this.$set(this.tabs[i], 'url', util.handlerUrl(tab.url));
|
|
1378
1436
|
} else {
|
|
1379
|
-
|
|
1380
|
-
if (tab.method === '
|
|
1381
|
-
this
|
|
1382
|
-
} else {
|
|
1383
|
-
this.$set(this.tabs[i], 'refresh', false);
|
|
1384
|
-
this.$nextTick(() => {
|
|
1385
|
-
this.$set(this.tabs[i], 'refresh', true);
|
|
1386
|
-
});
|
|
1437
|
+
this.$set(this.tabs[i], 'refresh', false);
|
|
1438
|
+
if (tab.method === 'wujie') {
|
|
1439
|
+
this.activeName = res.id;
|
|
1387
1440
|
}
|
|
1441
|
+
this.$nextTick(() => {
|
|
1442
|
+
this.$set(this.tabs[i], 'refresh', true);
|
|
1443
|
+
this.activeName = res.id;
|
|
1444
|
+
});
|
|
1388
1445
|
}
|
|
1389
1446
|
}
|
|
1390
1447
|
},
|
|
@@ -18,32 +18,23 @@ export default {
|
|
|
18
18
|
default() {
|
|
19
19
|
return {};
|
|
20
20
|
}
|
|
21
|
-
}
|
|
22
|
-
show: Boolean
|
|
21
|
+
}
|
|
23
22
|
},
|
|
24
23
|
data() {
|
|
25
|
-
return {
|
|
26
|
-
params: {}
|
|
27
|
-
};
|
|
24
|
+
return {};
|
|
28
25
|
},
|
|
29
26
|
computed: {},
|
|
30
|
-
watch: {
|
|
31
|
-
show(val) {
|
|
32
|
-
if (val) {
|
|
33
|
-
this.jump();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
27
|
+
watch: {},
|
|
37
28
|
created() {},
|
|
38
29
|
mounted() {
|
|
39
|
-
this.params = util.getParams({ url: this.url });
|
|
40
30
|
this.jump();
|
|
41
31
|
},
|
|
42
32
|
methods: {
|
|
43
33
|
jump() {
|
|
34
|
+
let params = util.getParams({ url: this.url });
|
|
44
35
|
this.$router.push({
|
|
45
36
|
path: this.path,
|
|
46
|
-
query: { ...this.query, ...
|
|
37
|
+
query: { ...this.query, ...params }
|
|
47
38
|
});
|
|
48
39
|
}
|
|
49
40
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:key="index"
|
|
14
14
|
v-show="item.disabled ? showDisabled : true"
|
|
15
15
|
v-bind="getprops($attrs, item)"
|
|
16
|
-
:label="isObject || typeof item == 'string' ? item : item[
|
|
16
|
+
:label="isObject || typeof item == 'string' ? item : item[valueKey]"
|
|
17
17
|
:disabled="typeof item == 'string' ? false : item.disabled"
|
|
18
18
|
:class="{ 'es-radio-delete': genre === 'delete' }"
|
|
19
19
|
:value-key="valueKey"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
:key="index"
|
|
37
37
|
v-show="item.disabled ? showDisabled : true"
|
|
38
38
|
v-bind="getprops($attrs, item)"
|
|
39
|
-
:label="isObject || typeof item == 'string' ? item : item[
|
|
39
|
+
:label="isObject || typeof item == 'string' ? item : item[valueKey]"
|
|
40
40
|
:disabled="typeof item == 'string' ? false : item.disabled"
|
|
41
41
|
:class="{ 'es-checkbox-delete': genre === 'delete' }"
|
|
42
42
|
:value-key="valueKey"
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
:name="items.name || String(indexs)"
|
|
20
20
|
>
|
|
21
21
|
<template slot="label" v-if="items.title">
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
<el-badge
|
|
26
|
-
v-if="
|
|
27
|
-
Object.prototype.hasOwnProperty.call(items.title, 'count')
|
|
28
|
-
"
|
|
29
|
-
type="primary"
|
|
30
|
-
:value="items.title.count"
|
|
31
|
-
:max="99"
|
|
32
|
-
>
|
|
33
|
-
</el-badge>
|
|
22
|
+
<template v-if="typeof items.title === 'object'">
|
|
23
|
+
<i v-if="items.title.icon" :class="items.title.icon"></i>
|
|
24
|
+
<template v-if="items.title.text">
|
|
34
25
|
{{ items.title.text }}
|
|
35
26
|
</template>
|
|
36
|
-
<
|
|
37
|
-
|
|
27
|
+
<el-badge
|
|
28
|
+
v-if="
|
|
29
|
+
Object.prototype.hasOwnProperty.call(items.title, 'count')
|
|
30
|
+
"
|
|
31
|
+
type="primary"
|
|
32
|
+
:value="items.title.count"
|
|
33
|
+
:max="99"
|
|
34
|
+
>
|
|
35
|
+
</el-badge>
|
|
36
|
+
</template>
|
|
37
|
+
<template v-else>{{ items.title }}</template>
|
|
38
38
|
</template>
|
|
39
39
|
<template slot-scope="{ loaded }">
|
|
40
40
|
<es-tabs-panel v-bind="items" :show="loaded">
|