eoss-ui 0.7.70 → 0.7.72
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 +60 -56
- package/lib/button.js +60 -56
- package/lib/calogin.js +60 -56
- package/lib/checkbox-group.js +60 -56
- package/lib/config/api.js +4 -1
- package/lib/data-table-form.js +60 -56
- package/lib/data-table.js +60 -56
- package/lib/date-picker.js +60 -56
- package/lib/dialog.js +60 -56
- package/lib/eoss-ui.common.js +706 -622
- package/lib/flow-group.js +60 -56
- package/lib/flow-list.js +62 -58
- package/lib/flow.js +99 -94
- package/lib/form.js +60 -56
- package/lib/handle-user.js +61 -57
- package/lib/handler.js +60 -56
- package/lib/icon.js +60 -56
- package/lib/index.js +1 -1
- package/lib/input-number.js +60 -56
- package/lib/input.js +60 -56
- package/lib/login.js +63 -59
- package/lib/main.js +761 -677
- package/lib/nav.js +60 -56
- package/lib/notify.js +65 -61
- package/lib/page.js +60 -56
- package/lib/pagination.js +60 -56
- package/lib/player.js +60 -56
- package/lib/qr-code.js +60 -56
- package/lib/radio-group.js +60 -56
- package/lib/retrial-auth.js +61 -57
- package/lib/select-ganged.js +60 -56
- package/lib/select.js +60 -56
- package/lib/selector-panel.js +60 -56
- package/lib/selector.js +60 -56
- package/lib/sizer.js +60 -56
- package/lib/steps.js +60 -56
- package/lib/switch.js +60 -56
- package/lib/table-form.js +60 -56
- package/lib/tabs.js +60 -56
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/simplicity-top.css +1 -1
- package/lib/tips.js +60 -56
- package/lib/tree-group.js +60 -56
- package/lib/tree.js +60 -56
- package/lib/upload.js +64 -60
- package/lib/wujie.js +60 -56
- package/lib/wxlogin.js +60 -56
- package/package.json +1 -1
- package/packages/flow/src/freeStartFlow.vue +2 -1
- package/packages/login/src/main.vue +3 -1
- package/packages/main/src/main.vue +50 -27
- package/packages/main/src/public/settings.vue +2 -2
- package/packages/main/src/simplicity/handler.vue +1 -3
- package/packages/main/src/simplicity/index.vue +13 -3
- package/packages/main/src/simplicityTop/handler.vue +1 -4
- package/packages/main/src/simplicityTop/index.vue +110 -61
- package/packages/theme-chalk/gulpfile.js +25 -0
- package/packages/theme-chalk/src/common/var.scss +1 -1
- package/packages/theme-chalk/src/simplicity-top.scss +3 -156
- package/src/config/api.js +4 -0
- package/src/index.js +1 -1
- package/packages/theme-chalk/lib/base.css +0 -1
- package/packages/theme-chalk/lib/button-group.css +0 -1
- package/packages/theme-chalk/lib/button.css +0 -1
- package/packages/theme-chalk/lib/calendar.css +0 -1
- package/packages/theme-chalk/lib/calogin.css +0 -0
- package/packages/theme-chalk/lib/card.css +0 -1
- package/packages/theme-chalk/lib/cascader.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +0 -1
- package/packages/theme-chalk/lib/clients.css +0 -1
- package/packages/theme-chalk/lib/data-table-form.css +0 -1
- package/packages/theme-chalk/lib/data-table.css +0 -1
- package/packages/theme-chalk/lib/date-picker.css +0 -1
- package/packages/theme-chalk/lib/dialog.css +0 -1
- package/packages/theme-chalk/lib/enable-drag.css +0 -1
- package/packages/theme-chalk/lib/enterprise.css +0 -1
- package/packages/theme-chalk/lib/error-page.css +0 -1
- package/packages/theme-chalk/lib/flow-chart.css +0 -0
- package/packages/theme-chalk/lib/flow-group.css +0 -1
- package/packages/theme-chalk/lib/flow-list.css +0 -1
- package/packages/theme-chalk/lib/flow.css +0 -1
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +0 -1
- package/packages/theme-chalk/lib/handle-user.css +0 -1
- package/packages/theme-chalk/lib/handler.css +0 -1
- package/packages/theme-chalk/lib/icon.css +0 -1
- package/packages/theme-chalk/lib/icons.css +0 -1
- package/packages/theme-chalk/lib/index.css +0 -1
- package/packages/theme-chalk/lib/input-number.css +0 -0
- package/packages/theme-chalk/lib/input.css +0 -1
- package/packages/theme-chalk/lib/label.css +0 -1
- package/packages/theme-chalk/lib/layout.css +0 -1
- package/packages/theme-chalk/lib/login.css +0 -1
- package/packages/theme-chalk/lib/main.css +0 -1
- package/packages/theme-chalk/lib/menu.css +0 -1
- package/packages/theme-chalk/lib/nav.css +0 -1
- package/packages/theme-chalk/lib/notify.css +0 -0
- package/packages/theme-chalk/lib/page.css +0 -1
- package/packages/theme-chalk/lib/pagination.css +0 -1
- package/packages/theme-chalk/lib/player.css +0 -1
- package/packages/theme-chalk/lib/qr-code.css +0 -1
- package/packages/theme-chalk/lib/radio-group.css +0 -1
- package/packages/theme-chalk/lib/retrial-auth.css +0 -1
- package/packages/theme-chalk/lib/select-ganged.css +0 -1
- package/packages/theme-chalk/lib/select.css +0 -1
- package/packages/theme-chalk/lib/selector-panel.css +0 -1
- package/packages/theme-chalk/lib/selector.css +0 -1
- package/packages/theme-chalk/lib/simplicity-top.css +0 -1
- package/packages/theme-chalk/lib/simplicity.css +0 -1
- package/packages/theme-chalk/lib/sizer.css +0 -1
- package/packages/theme-chalk/lib/steps.css +0 -1
- package/packages/theme-chalk/lib/switch.css +0 -1
- package/packages/theme-chalk/lib/table-form.css +0 -0
- package/packages/theme-chalk/lib/tabs-panel.css +0 -0
- package/packages/theme-chalk/lib/tabs.css +0 -1
- package/packages/theme-chalk/lib/tips.css +0 -1
- package/packages/theme-chalk/lib/toolbar.css +0 -1
- package/packages/theme-chalk/lib/tree-group.css +0 -1
- package/packages/theme-chalk/lib/tree.css +0 -1
- package/packages/theme-chalk/lib/upload.css +0 -1
- package/packages/theme-chalk/lib/wujie.css +0 -0
- package/packages/theme-chalk/lib/wxlogin.css +0 -1
|
@@ -120,7 +120,6 @@ export default {
|
|
|
120
120
|
return { 'background-image': `url(${img})` };
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
watch: {},
|
|
124
123
|
data() {
|
|
125
124
|
return {
|
|
126
125
|
sysCode: '',
|
|
@@ -134,17 +133,7 @@ export default {
|
|
|
134
133
|
isIE: /MSIE|Trident/.test(navigator.userAgent)
|
|
135
134
|
};
|
|
136
135
|
},
|
|
137
|
-
watch: {
|
|
138
|
-
layoutType() {
|
|
139
|
-
// 当主题变化时,重新绑定一次事件 防止事件丢失 或者绑定错误
|
|
140
|
-
this.bindEvent();
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
136
|
created() {
|
|
144
|
-
const layoutType = localStorage.getItem('layoutType');
|
|
145
|
-
if (layoutType) {
|
|
146
|
-
this.layoutType = layoutType;
|
|
147
|
-
}
|
|
148
137
|
this.params = util.getParams() || {};
|
|
149
138
|
this.sysCode = this.params.sysCode;
|
|
150
139
|
this.appCode = this.params.appCode || this.params.appcode;
|
|
@@ -165,13 +154,22 @@ export default {
|
|
|
165
154
|
) {
|
|
166
155
|
return false;
|
|
167
156
|
}
|
|
168
|
-
this
|
|
157
|
+
this.$nextTick(() => {
|
|
158
|
+
// 当主题变化时,重新绑定一次事件 防止事件丢失 或者绑定错误
|
|
159
|
+
this.bindEvent();
|
|
160
|
+
const layoutType = localStorage.getItem('layoutType');
|
|
161
|
+
if (layoutType) {
|
|
162
|
+
this.layoutType = layoutType;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
169
165
|
},
|
|
170
166
|
methods: {
|
|
171
167
|
/**
|
|
172
168
|
* @desc: 绑定事件
|
|
173
169
|
**/
|
|
174
170
|
bindEvent() {
|
|
171
|
+
// 先解绑事件,以免弹出多次
|
|
172
|
+
this.unbindEvent();
|
|
175
173
|
if (this.isLogin) {
|
|
176
174
|
if (util.win.$wujie) {
|
|
177
175
|
util.win.$wujie.bus.$on('changeTheme', (res) => {
|
|
@@ -184,6 +182,7 @@ export default {
|
|
|
184
182
|
if (bus) {
|
|
185
183
|
bus.$on('reLogin', this.handleReLogin);
|
|
186
184
|
bus.$on('refresh', this.$refs.main.handleRefresh);
|
|
185
|
+
bus.$on('menuRefresh', this.$refs.main.handleRefresh);
|
|
187
186
|
bus.$on('windowOpen', this.winOpen);
|
|
188
187
|
bus.$on('windowClose', this.winClose);
|
|
189
188
|
bus.$on('jumpMenu', this.$refs.main.jumpMenu);
|
|
@@ -196,9 +195,11 @@ export default {
|
|
|
196
195
|
util.win.windowOpen = this.winOpen;
|
|
197
196
|
util.win.windowClose = this.winClose;
|
|
198
197
|
util.win.refresh = this.$refs.main.handleRefresh;
|
|
198
|
+
util.win.menuRefresh = this.$refs.main.handleRefresh;
|
|
199
199
|
util.win.jumpMenu = this.$refs.main.jumpMenu;
|
|
200
200
|
WujieVue.bus.$on('reLogin', this.handleReLogin);
|
|
201
201
|
WujieVue.bus.$on('refresh', this.$refs.main.handleRefresh);
|
|
202
|
+
WujieVue.bus.$on('menuRefresh', this.$refs.main.handleRefresh);
|
|
202
203
|
WujieVue.bus.$on('jumpMenu', this.$refs.main.jumpMenu);
|
|
203
204
|
WujieVue.bus.$on('windowOpen', this.winOpen);
|
|
204
205
|
WujieVue.bus.$on('windowClose', this.winClose);
|
|
@@ -235,6 +236,27 @@ export default {
|
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
},
|
|
239
|
+
/**
|
|
240
|
+
* @desc: 解绑事件
|
|
241
|
+
**/
|
|
242
|
+
unbindEvent() {
|
|
243
|
+
window.removeEventListener('message', this.handleMessage);
|
|
244
|
+
const bus = this.bus || this.$root.Bus;
|
|
245
|
+
if (bus) {
|
|
246
|
+
bus.$off('reLogin');
|
|
247
|
+
bus.$off('refresh');
|
|
248
|
+
bus.$off('menuRefresh');
|
|
249
|
+
bus.$off('windowOpen');
|
|
250
|
+
bus.$off('windowClose');
|
|
251
|
+
bus.$off('jumpMenu');
|
|
252
|
+
bus.$off('emit');
|
|
253
|
+
}
|
|
254
|
+
WujieVue.bus.$off('reLogin');
|
|
255
|
+
WujieVue.bus.$off('refresh');
|
|
256
|
+
WujieVue.bus.$off('menuRefresh');
|
|
257
|
+
WujieVue.bus.$off('jumpMenu');
|
|
258
|
+
WujieVue.bus.$off('emit');
|
|
259
|
+
},
|
|
238
260
|
/**
|
|
239
261
|
* @desc: 切换布局风格
|
|
240
262
|
* @author huangbo
|
|
@@ -444,7 +466,16 @@ export default {
|
|
|
444
466
|
* @author huangbo
|
|
445
467
|
* @date 2024年9月7日
|
|
446
468
|
**/
|
|
447
|
-
winClose({
|
|
469
|
+
winClose({
|
|
470
|
+
url,
|
|
471
|
+
appCode,
|
|
472
|
+
id,
|
|
473
|
+
index,
|
|
474
|
+
refresh,
|
|
475
|
+
menuRefresh,
|
|
476
|
+
jumpMenu,
|
|
477
|
+
callback
|
|
478
|
+
}) {
|
|
448
479
|
if (!appCode && !id) {
|
|
449
480
|
console.error('参数错误,缺少appCode或者id');
|
|
450
481
|
return;
|
|
@@ -470,6 +501,7 @@ export default {
|
|
|
470
501
|
}
|
|
471
502
|
} else {
|
|
472
503
|
refresh && this.$refs.main.handleRefresh(refresh);
|
|
504
|
+
menuRefresh && this.$refs.main.handleRefresh(menuRefresh);
|
|
473
505
|
jumpMenu &&
|
|
474
506
|
(Array.isArray(jumpMenu)
|
|
475
507
|
? this.$refs.main.jumpMenu(...jumpMenu)
|
|
@@ -491,6 +523,9 @@ export default {
|
|
|
491
523
|
case 'refresh':
|
|
492
524
|
this.$refs.main.handleRefresh(args);
|
|
493
525
|
break;
|
|
526
|
+
case 'menuRefresh':
|
|
527
|
+
this.$refs.main.handleRefresh(args);
|
|
528
|
+
break;
|
|
494
529
|
case 'jumpMenu':
|
|
495
530
|
Array.isArray(args)
|
|
496
531
|
? this.$refs.main.jumpMenu(...args)
|
|
@@ -580,21 +615,9 @@ export default {
|
|
|
580
615
|
this.$emit('busEvent', event, args);
|
|
581
616
|
}
|
|
582
617
|
},
|
|
618
|
+
|
|
583
619
|
beforeDestroy() {
|
|
584
|
-
|
|
585
|
-
const bus = this.bus || this.$root.Bus;
|
|
586
|
-
if (bus) {
|
|
587
|
-
bus.$off('reLogin');
|
|
588
|
-
bus.$off('refresh');
|
|
589
|
-
bus.$off('windowOpen');
|
|
590
|
-
bus.$off('windowClose');
|
|
591
|
-
bus.$off('jumpMenu');
|
|
592
|
-
bus.$off('emit');
|
|
593
|
-
}
|
|
594
|
-
WujieVue.bus.$off('reLogin');
|
|
595
|
-
WujieVue.bus.$off('refresh');
|
|
596
|
-
WujieVue.bus.$off('jumpMenu');
|
|
597
|
-
WujieVue.bus.$off('emit');
|
|
620
|
+
this.unbindEvent();
|
|
598
621
|
}
|
|
599
622
|
};
|
|
600
623
|
</script>
|
|
@@ -179,6 +179,7 @@ export default {
|
|
|
179
179
|
themes: Array,
|
|
180
180
|
//默认主题色
|
|
181
181
|
theme: String,
|
|
182
|
+
showSimplicityTop: Boolean,
|
|
182
183
|
//颜色板预设颜色
|
|
183
184
|
predefine: {
|
|
184
185
|
type: Array,
|
|
@@ -230,8 +231,7 @@ export default {
|
|
|
230
231
|
showMoreTheme:
|
|
231
232
|
process.env.NODE_ENV === 'development'
|
|
232
233
|
? true
|
|
233
|
-
: this.
|
|
234
|
-
this.layoutType === 'simplicity'
|
|
234
|
+
: this.showSimplicityTop
|
|
235
235
|
? false
|
|
236
236
|
: true
|
|
237
237
|
};
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
{{ simpleUserInfo.orgShortName || simpleUserInfo.orgName }}
|
|
10
10
|
</div>
|
|
11
11
|
<el-dropdown
|
|
12
|
-
v-if="
|
|
12
|
+
v-if="
|
|
13
|
+
jobExplicited && user.identityList && user.identityList.length > 1
|
|
14
|
+
"
|
|
13
15
|
trigger="click"
|
|
14
16
|
placement="bottom-start"
|
|
15
17
|
@command="handleDepSelect"
|
|
@@ -646,7 +648,8 @@ export default {
|
|
|
646
648
|
validator(val) {
|
|
647
649
|
return ['tooltip', 'text'].includes(val);
|
|
648
650
|
}
|
|
649
|
-
}
|
|
651
|
+
},
|
|
652
|
+
jobExplicit: Boolean
|
|
650
653
|
},
|
|
651
654
|
data() {
|
|
652
655
|
return {
|
|
@@ -768,7 +771,8 @@ export default {
|
|
|
768
771
|
//单点退出地址
|
|
769
772
|
singleLogout: null,
|
|
770
773
|
//展示系统操作按钮标题类型
|
|
771
|
-
showTitleType: this.showHandlerTitleType
|
|
774
|
+
showTitleType: this.showHandlerTitleType,
|
|
775
|
+
jobExplicited: this.jobExplicit
|
|
772
776
|
};
|
|
773
777
|
},
|
|
774
778
|
computed: {
|
|
@@ -1090,6 +1094,12 @@ export default {
|
|
|
1090
1094
|
results[i].menuCollapse !== false &&
|
|
1091
1095
|
results[i].menuCollapse !== 'false';
|
|
1092
1096
|
}
|
|
1097
|
+
//是否显示岗位
|
|
1098
|
+
if (results[i].jobExplicit !== undefined) {
|
|
1099
|
+
this.jobExplicited =
|
|
1100
|
+
results[i].jobExplicit !== false &&
|
|
1101
|
+
results[i].jobExplicit !== 'false';
|
|
1102
|
+
}
|
|
1093
1103
|
}
|
|
1094
1104
|
if (i === 'userModel' && results[i]) {
|
|
1095
1105
|
if (results[i].userHeadUrl) {
|
|
@@ -127,15 +127,12 @@ export default {
|
|
|
127
127
|
data: {
|
|
128
128
|
handler: 'deep',
|
|
129
129
|
immediate: true,
|
|
130
|
-
handler(newVal, oldVal) {
|
|
131
|
-
console.log(newVal, 122221212);
|
|
132
|
-
}
|
|
130
|
+
handler(newVal, oldVal) {}
|
|
133
131
|
}
|
|
134
132
|
},
|
|
135
133
|
created() {
|
|
136
134
|
//this.time = util.timeCycle() + '好!';
|
|
137
135
|
this.date = util.formatDate('', 'yyyy年M月d日');
|
|
138
|
-
console.log(this.data, 'this.data');
|
|
139
136
|
},
|
|
140
137
|
mounted() {
|
|
141
138
|
this.getTime();
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
</div>
|
|
126
126
|
<div
|
|
127
127
|
class="es-simplicitytop-main-fourth-tabs"
|
|
128
|
-
v-if="
|
|
128
|
+
v-if="appCodes && appCodes !== 'indexUrl'"
|
|
129
129
|
>
|
|
130
130
|
<el-tabs
|
|
131
131
|
ref="fourthTab"
|
|
@@ -269,6 +269,7 @@
|
|
|
269
269
|
layout-type="simplicityTop"
|
|
270
270
|
active="simplicity"
|
|
271
271
|
:theme="themeColor"
|
|
272
|
+
:showSimplicityTop="showSimplicityTop"
|
|
272
273
|
:predefine="themes"
|
|
273
274
|
:visible.sync="showSet"
|
|
274
275
|
@change="handleChange"
|
|
@@ -316,7 +317,8 @@ import {
|
|
|
316
317
|
getIndexCount,
|
|
317
318
|
getUserTipsInstanceNum,
|
|
318
319
|
getShareFilesReceiveCountNew,
|
|
319
|
-
getVoteMeetingNum
|
|
320
|
+
getVoteMeetingNum,
|
|
321
|
+
queryChildMenuUrl
|
|
320
322
|
} from 'eoss-ui/src/config/api.js';
|
|
321
323
|
import store from 'eoss-ui/src/utils/store';
|
|
322
324
|
import util from 'eoss-ui/src/utils/util';
|
|
@@ -382,7 +384,7 @@ export default {
|
|
|
382
384
|
provide() {
|
|
383
385
|
return {
|
|
384
386
|
esMain: this,
|
|
385
|
-
|
|
387
|
+
menuRefresh: this.handleRefresh,
|
|
386
388
|
jumpMenu: this.jumpTopMenu
|
|
387
389
|
};
|
|
388
390
|
},
|
|
@@ -405,6 +407,11 @@ export default {
|
|
|
405
407
|
type: Boolean,
|
|
406
408
|
default: true
|
|
407
409
|
},
|
|
410
|
+
//是否显示顶部
|
|
411
|
+
showSimplicityTop: {
|
|
412
|
+
type: Boolean,
|
|
413
|
+
default: false
|
|
414
|
+
},
|
|
408
415
|
//im用例编码
|
|
409
416
|
imUseCaseCode: String,
|
|
410
417
|
//ai用例编码
|
|
@@ -582,10 +589,15 @@ export default {
|
|
|
582
589
|
userCommonMenu: {
|
|
583
590
|
type: String,
|
|
584
591
|
default: queryUseCommonMenu
|
|
592
|
+
},
|
|
593
|
+
queryChildMenu: {
|
|
594
|
+
type: String,
|
|
595
|
+
default: queryChildMenuUrl
|
|
585
596
|
}
|
|
586
597
|
},
|
|
587
598
|
data() {
|
|
588
599
|
return {
|
|
600
|
+
appCodes: 'indexUrl',
|
|
589
601
|
tabActiveName: '',
|
|
590
602
|
currentPage: {
|
|
591
603
|
method: ''
|
|
@@ -953,7 +965,9 @@ export default {
|
|
|
953
965
|
method: 'iframe',
|
|
954
966
|
loading: false
|
|
955
967
|
}
|
|
956
|
-
]
|
|
968
|
+
],
|
|
969
|
+
myRemindMenu: [],
|
|
970
|
+
myShortcut: []
|
|
957
971
|
};
|
|
958
972
|
},
|
|
959
973
|
computed: {
|
|
@@ -1056,17 +1070,86 @@ export default {
|
|
|
1056
1070
|
this.doorIndex = sessionStorage.getItem('doorIndex');
|
|
1057
1071
|
},
|
|
1058
1072
|
mounted() {
|
|
1073
|
+
console.log(
|
|
1074
|
+
this.menuUrl,
|
|
1075
|
+
this.topLogo,
|
|
1076
|
+
this.hides,
|
|
1077
|
+
this.showSimplicityTop,
|
|
1078
|
+
'this.menuUrl'
|
|
1079
|
+
);
|
|
1080
|
+
|
|
1059
1081
|
// this.handleListener();
|
|
1060
1082
|
this.getNums();
|
|
1061
1083
|
window.top.jumpMenu = window.top.jumpTopMenu = this.handleSelect;
|
|
1084
|
+
this.queryChildMenuData();
|
|
1062
1085
|
},
|
|
1063
1086
|
methods: {
|
|
1087
|
+
/**
|
|
1088
|
+
* queryChildMenu: 查询左侧我的提醒和我的快捷菜单
|
|
1089
|
+
*/
|
|
1090
|
+
queryChildMenuData() {
|
|
1091
|
+
util
|
|
1092
|
+
.ajax({
|
|
1093
|
+
url: queryChildMenuUrl,
|
|
1094
|
+
method: 'get'
|
|
1095
|
+
})
|
|
1096
|
+
.then((res) => {
|
|
1097
|
+
if (res.rCode === 0) {
|
|
1098
|
+
console.log(res.results, 'res.results');
|
|
1099
|
+
const tree = this.flatToNestedTree(res.results);
|
|
1100
|
+
console.log(tree, 'tree');
|
|
1101
|
+
this.myRemindMenu = tree[0];
|
|
1102
|
+
this.myShortcut = tree[1];
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
},
|
|
1106
|
+
|
|
1107
|
+
flatToNestedTree(flatTree, rootPid = 'root') {
|
|
1108
|
+
if (!Array.isArray(flatTree)) {
|
|
1109
|
+
console.error('flatTree must be an array');
|
|
1110
|
+
return [];
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// 创建ID映射表,用于快速查找节点
|
|
1114
|
+
const idMap = new Map();
|
|
1115
|
+
// 存储根节点
|
|
1116
|
+
const rootNodes = [];
|
|
1117
|
+
|
|
1118
|
+
// 首次遍历:创建映射表并初始化每个节点的children数组
|
|
1119
|
+
flatTree.forEach((node) => {
|
|
1120
|
+
// 深拷贝节点,避免修改原数据
|
|
1121
|
+
const nodeCopy = { ...node };
|
|
1122
|
+
// 确保children数组存在且为空
|
|
1123
|
+
nodeCopy.children = [];
|
|
1124
|
+
// 建立ID到节点的映射
|
|
1125
|
+
idMap.set(nodeCopy.id, nodeCopy);
|
|
1126
|
+
|
|
1127
|
+
// 找出根节点
|
|
1128
|
+
if (nodeCopy.pid === rootPid) {
|
|
1129
|
+
rootNodes.push(nodeCopy);
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
|
|
1133
|
+
// 第二次遍历:建立父子关系
|
|
1134
|
+
flatTree.forEach((node) => {
|
|
1135
|
+
const currentNode = idMap.get(node.id);
|
|
1136
|
+
const parentNode = idMap.get(node.pid);
|
|
1137
|
+
|
|
1138
|
+
// 如果找到父节点且父节点不是根节点
|
|
1139
|
+
if (parentNode && node.pid !== rootPid) {
|
|
1140
|
+
parentNode.children.push(currentNode);
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
|
|
1144
|
+
return rootNodes;
|
|
1145
|
+
},
|
|
1064
1146
|
// tab点击事件
|
|
1065
1147
|
fourthTabClick(res) {
|
|
1066
1148
|
const index = res.index;
|
|
1067
1149
|
this.currentPage = {
|
|
1068
|
-
|
|
1150
|
+
...this.fourthTabs[index]
|
|
1069
1151
|
};
|
|
1152
|
+
this.appCodes = this.fourthTabs[index].appCode;
|
|
1070
1153
|
console.log(this.currentPage, 'this.currentPage');
|
|
1071
1154
|
|
|
1072
1155
|
// console.log(this.fourthTabs[index], 'this.fourthTabs[index]');
|
|
@@ -1242,13 +1325,13 @@ export default {
|
|
|
1242
1325
|
* @author huangbo
|
|
1243
1326
|
* @date 2024年9月7日
|
|
1244
1327
|
**/
|
|
1245
|
-
init(results
|
|
1328
|
+
init(results) {
|
|
1246
1329
|
this.setConfig(results);
|
|
1247
|
-
if (this.remote && first) {
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
}
|
|
1330
|
+
// if (this.remote && first) {
|
|
1331
|
+
this.getApplications();
|
|
1332
|
+
// 此处的快捷 是用户自定义的 不是系统配置的快捷菜单 所以注释掉
|
|
1333
|
+
// this.getUseCommonMenu();
|
|
1334
|
+
// }
|
|
1252
1335
|
},
|
|
1253
1336
|
/**
|
|
1254
1337
|
* @desc:设置用户配置及信息
|
|
@@ -1591,7 +1674,8 @@ export default {
|
|
|
1591
1674
|
appCode: 'indexUrl'
|
|
1592
1675
|
};
|
|
1593
1676
|
this.homePage = this.setIframeType(obj);
|
|
1594
|
-
this.currentPage = this.homePage;
|
|
1677
|
+
this.currentPage = { ...this.homePage };
|
|
1678
|
+
this.appCodes = 'indexUrl';
|
|
1595
1679
|
// console.log(this.currentPage, 'currentPage');
|
|
1596
1680
|
},
|
|
1597
1681
|
/**
|
|
@@ -2103,48 +2187,10 @@ export default {
|
|
|
2103
2187
|
* @author huangbo
|
|
2104
2188
|
* @date 2024年9月7日
|
|
2105
2189
|
**/
|
|
2106
|
-
handleRefresh(
|
|
2190
|
+
handleRefresh() {
|
|
2107
2191
|
this.getNums();
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
? util.indexOfObj(this.tabs, arg, 'appCode,code,id,url')
|
|
2111
|
-
: util.indexOfObj(this.tabs, this.activeName, 'id');
|
|
2112
|
-
let tab = this.tabs[i];
|
|
2113
|
-
if (isIE || tab.method === 'iframe') {
|
|
2114
|
-
if (arg && arg === 'pageData') {
|
|
2115
|
-
let iframe = document.getElementById(tab.id || tab.appCode);
|
|
2116
|
-
let source = tab.url;
|
|
2117
|
-
if (source && !util.startWith(source, ['http', 'https'], true)) {
|
|
2118
|
-
source = location.origin + source.replace('./', '/');
|
|
2119
|
-
}
|
|
2120
|
-
!iframe && (iframe = document.getElementById(this.iframeId));
|
|
2121
|
-
iframe &&
|
|
2122
|
-
iframe.contentWindow.postMessage(
|
|
2123
|
-
{ method: 'pageData' },
|
|
2124
|
-
source || '*'
|
|
2125
|
-
);
|
|
2126
|
-
} else {
|
|
2127
|
-
this.$set(this.tabs[i], 'url', util.handlerUrl(tab.url));
|
|
2128
|
-
}
|
|
2129
|
-
return;
|
|
2130
|
-
}
|
|
2131
|
-
if (tab.method === 'wujie' && tab.appCode) {
|
|
2132
|
-
if (arg && arg === 'pageData') {
|
|
2133
|
-
WujieVue.$emit('pageData', tab);
|
|
2134
|
-
} else {
|
|
2135
|
-
window.document
|
|
2136
|
-
.querySelector(`iframe[name=${tab.appCode}]`)
|
|
2137
|
-
.contentWindow.location.reload(true);
|
|
2138
|
-
}
|
|
2139
|
-
return;
|
|
2140
|
-
}
|
|
2141
|
-
if (tab.method === 'router') {
|
|
2142
|
-
if (arg && arg === 'pageData') {
|
|
2143
|
-
const bus = this.bus || this.$root.Bus;
|
|
2144
|
-
bus.$emit('pageData', tab);
|
|
2145
|
-
} else {
|
|
2146
|
-
this.$set(this.tabs[i], 'keys', util.uuid());
|
|
2147
|
-
}
|
|
2192
|
+
if (window.top.refreshList) {
|
|
2193
|
+
window.top.refreshList();
|
|
2148
2194
|
}
|
|
2149
2195
|
},
|
|
2150
2196
|
/**
|
|
@@ -2264,7 +2310,9 @@ export default {
|
|
|
2264
2310
|
break;
|
|
2265
2311
|
case 'index':
|
|
2266
2312
|
// util.win.open(this.doorIndex, '_self');
|
|
2267
|
-
this.currentPage = this.homePage;
|
|
2313
|
+
this.currentPage = { ...this.homePage };
|
|
2314
|
+
this.appCodes = 'indexUrl';
|
|
2315
|
+
console.log(this.currentPage, 'this.currentPage');
|
|
2268
2316
|
break;
|
|
2269
2317
|
case 'userinfo':
|
|
2270
2318
|
this.$refs.user.handleOpen();
|
|
@@ -2483,14 +2531,12 @@ export default {
|
|
|
2483
2531
|
**/
|
|
2484
2532
|
handleSelect(res, params = {}) {
|
|
2485
2533
|
console.log(res, 'handleSelect');
|
|
2486
|
-
|
|
2487
|
-
if (
|
|
2488
|
-
util.win.open(
|
|
2489
|
-
} else if (
|
|
2490
|
-
util.win.open(
|
|
2534
|
+
const node = res.node ? res.node : res;
|
|
2535
|
+
if (node.urlopenmode == 1 || node.openModel == 1) {
|
|
2536
|
+
util.win.open(node.url || node.menuurl);
|
|
2537
|
+
} else if (node.urlopenmode == 2 || node.openModel == 2) {
|
|
2538
|
+
util.win.open(node.url || node.menuurl, '_self');
|
|
2491
2539
|
} else {
|
|
2492
|
-
const node = res.node ? res.node : res;
|
|
2493
|
-
|
|
2494
2540
|
let apps = node;
|
|
2495
2541
|
let param = params;
|
|
2496
2542
|
let reload = true;
|
|
@@ -2514,6 +2560,7 @@ export default {
|
|
|
2514
2560
|
if (currentPage.fourthTabs && currentPage.fourthTabs.length > 0) {
|
|
2515
2561
|
this.fourthTabs = currentPage.fourthTabs;
|
|
2516
2562
|
this.currentPage = this.setIframeType(this.fourthTabs[0]);
|
|
2563
|
+
this.appCodes = this.currentPage.appCode;
|
|
2517
2564
|
if (param) {
|
|
2518
2565
|
this.currentPage.url = util.handlerUrl(
|
|
2519
2566
|
this.currentPage.url,
|
|
@@ -2521,9 +2568,11 @@ export default {
|
|
|
2521
2568
|
);
|
|
2522
2569
|
}
|
|
2523
2570
|
this.tabActiveName = this.currentPage.id;
|
|
2571
|
+
this.appCodes = this.currentPage.appCode;
|
|
2524
2572
|
} else {
|
|
2525
2573
|
this.fourthTabs = fourthTabs;
|
|
2526
2574
|
this.currentPage = this.setIframeType(currentPage);
|
|
2575
|
+
this.appCodes = this.currentPage.appCode;
|
|
2527
2576
|
if (param) {
|
|
2528
2577
|
this.currentPage.url = util.handlerUrl(
|
|
2529
2578
|
this.currentPage.url,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { series, src, dest } = require('gulp');
|
|
4
|
+
const sass = require('gulp-sass');
|
|
5
|
+
const autoprefixer = require('gulp-autoprefixer');
|
|
6
|
+
const cssmin = require('gulp-cssmin');
|
|
7
|
+
|
|
8
|
+
function compile() {
|
|
9
|
+
return src('./src/*.scss')
|
|
10
|
+
.pipe(sass.sync())
|
|
11
|
+
.pipe(autoprefixer({
|
|
12
|
+
overrideBrowserslist: ['ie > 9', 'last 2 versions'],
|
|
13
|
+
cascade: false
|
|
14
|
+
}))
|
|
15
|
+
.pipe(cssmin())
|
|
16
|
+
.pipe(dest('./lib'));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function copyfont() {
|
|
20
|
+
return src('./src/fonts/**')
|
|
21
|
+
.pipe(cssmin())
|
|
22
|
+
.pipe(dest('./lib/fonts'));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
exports.build = series(compile, copyfont);
|