cloud-web-corejs 1.0.14 → 1.0.16

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 (38) hide show
  1. package/package.json +1 -1
  2. package/src/components/jsonImport/exportDialog.vue +63 -0
  3. package/src/components/jsonImport/index.js +3 -1
  4. package/src/components/jsonImport/index.vue +6 -5
  5. package/src/components/jsonImport/mixins.js +1 -1
  6. package/src/components/xform/form-designer/form-widget/dialog/preformDialog.vue +77 -0
  7. package/src/components/xform/form-designer/index.vue +13 -3
  8. package/src/components/xform/form-designer/indexMixin.js +4 -3
  9. package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +1 -1
  10. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
  11. package/src/components/xform/form-render/container-item/containerItemMixin.js +11 -11
  12. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
  13. package/src/layout/components/Sidebar/default.vue +1226 -0
  14. package/src/layout/components/Sidebar/index.vue +5 -1178
  15. package/src/layout/defaultLayout.vue +150 -0
  16. package/src/layout/index.vue +4 -138
  17. package/src/permission.js +1 -1
  18. package/src/router/modules/customer.js +1 -1
  19. package/src/router/modules/system.js +2 -2
  20. package/src/store/modules/permission.js +4 -3
  21. package/src/views/bd/setting/bd_attach_setting/list.vue +64 -45
  22. package/src/views/bd/setting/form_script/edit.vue +40 -25
  23. package/src/views/bd/setting/form_script/edit1.vue +40 -25
  24. package/src/views/bd/setting/form_script/list.vue +13 -8
  25. package/src/views/bd/setting/form_script/list1.vue +74 -37
  26. package/src/views/bd/setting/form_template/edit.vue +41 -25
  27. package/src/views/bd/setting/form_template/list.vue +72 -58
  28. package/src/views/bd/setting/form_template/preformDialog.vue +77 -0
  29. package/src/views/bd/setting/menu_kind/authDialog.vue +308 -0
  30. package/src/views/bd/setting/menu_kind/dialog.vue +3 -0
  31. package/src/views/bd/setting/menu_kind/list.vue +35 -9
  32. package/src/views/bd/setting/table_model/edit.vue +48 -34
  33. package/src/views/bd/setting/table_model/list.vue +72 -33
  34. package/src/views/user/home/index.vue +4 -2
  35. package/src/views/user/login/indexMixin.js +45 -21
  36. package/src/views/user/user/form_edit.vue +483 -0
  37. package/src/views/user/user/form_list.vue +348 -0
  38. package/src/views/user/user/list.vue +2 -2
@@ -0,0 +1,1226 @@
1
+ <template>
2
+ <div :class="{ 'has-logo': showLogo }">
3
+ <!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
4
+
5
+ <div class="hamburger-box" ref="hamhurger" @click="openUserInfo">
6
+ <!-- <hamburger :is-active="sidebar.opened" @toggleClick="toggleSideBar" /> -->
7
+ <div>
8
+ <p class="name"><i class="iconfont icon-ziyuan"></i><span>{{ userInfo.nickName }}</span></p>
9
+ </div>
10
+ </div>
11
+ <div class="business-name" ref="business">
12
+ <el-tooltip :enterable="false" effect="dark" :content="companyInfo.companyName" :placement="direction">
13
+ <p>{{ companyInfo.companyName }}</p>
14
+ </el-tooltip>
15
+ </div>
16
+ <div class="fase-box" ref="fase" @mouseleave="$emit('selfClose')" @mouseenter="$emit('selfEnter')">
17
+ <langTool v-if="userInfo.flag!==8"></langTool>
18
+ <div class="item" @click="openCompanyDialog" v-if="userInfo.flag!==8">
19
+ <el-tooltip :enterable="false" effect="dark" content="切换组织" :placement="direction">
20
+ <i class="el-icon-set-up"/>
21
+ </el-tooltip>
22
+ </div>
23
+ <div class="item" v-if="userInfo.flag!==8">
24
+ <el-tooltip :enterable="false" effect="dark" content="流程待办" :placement="direction">
25
+ <i class="iconfont icon-liuchengdaiban" @click="$router.push('/basic/wf/wf_manage/list')"/>
26
+ </el-tooltip>
27
+ </div>
28
+ <div class="item" @click="logout()">
29
+ <el-tooltip :enterable="false" effect="dark" content="退出" :placement="direction">
30
+ <i class="el-icon-switch-button"/>
31
+ </el-tooltip>
32
+ </div>
33
+ </div>
34
+ <template v-for="router1 in viewRouter">
35
+ <template v-for="router2 in router1.children">
36
+ <div
37
+ class="second-list"
38
+ :key="router1.id + 't'+router2.id"
39
+ :class="{ on: router2.id == nowNavID }"
40
+ @mouseenter="stopFlag = 1"
41
+ @mouseleave="showNav()"
42
+ v-show="router2.id == nowNavID"
43
+ :ref="'seconMenus' + router2.id"
44
+ >
45
+ <i class="ico-arrow"></i>
46
+ <div>
47
+ <div class="tit"><i :class="getMenuClass(router2,2)"></i><span>{{ getMenuName(router2) }}</span></div>
48
+ <dl v-for="(router3,index3) in router2.children" :key="'router3'+index3">
49
+
50
+ <div class="item" v-if="!router3.hidden" @click="rourteTo(router3,router1)">
51
+ <!--<i class="el-icon-caret-right"></i>-->
52
+ <i :class="getMenuClass(router3,3)"></i>
53
+ <a>{{ getMenuName(router3) }}</a>
54
+ </div>
55
+ </dl>
56
+ </div>
57
+ </div>
58
+ </template>
59
+ </template>
60
+ <el-menu
61
+ class="menu-box"
62
+ :class="{'lang-zh':$i18n.locale=='zh'}"
63
+ text-color="#fff"
64
+ active-text-color="#fff"
65
+ :unique-opened="true"
66
+ @mouseleave="showNav()"
67
+ ref="seconMenus"
68
+ >
69
+ <el-scrollbar wrap-class="scrollbar-wrapper" id="menuUl">
70
+ <el-submenu v-for="menuModule in menuModules" :index="''+menuModule.id" :key="'menuModule'+menuModule.id">
71
+ <template slot="title" @click="rourteTo(menuModule)">
72
+ <i :class="getMenuClass(menuModule,1)"></i>
73
+ <span>{{ getMenuName(menuModule) }}</span>
74
+ </template>
75
+ <el-menu-item v-for="(router1, index1) in menuModule.children" :key="index1" :index="''+router1.id"
76
+ :class="getMenuClass(router1,2)"
77
+ @mouseenter.native="showNav(router1, $event)" @mouseleave.native="showNav()"
78
+ @click="rourteTo(router1)">
79
+ {{ getMenuName(router1) }}
80
+ <i class="el-icon-caret-right" v-if="router1.children.length > 0"/>
81
+ </el-menu-item>
82
+ </el-submenu>
83
+ </el-scrollbar>
84
+ </el-menu>
85
+ <div class="menu-btn">
86
+ <i class="el-icon-arrow-up" @click="toUpMove()"></i>
87
+ <i class="el-icon-arrow-down" @click="toDownMove()"></i>
88
+ </div>
89
+ <div id="tta" style="position: absolute;height: 100%;top: 0;right: 0;z-index: 9999;width: 800px;left: 100%;"
90
+ v-if="showMenuModal"></div>
91
+ <el-dialog
92
+ title="切换组织"
93
+ width="355px"
94
+ custom-class="dialog-style list-dialog"
95
+ v-if="showCompanyDialog"
96
+ :visible.sync="showCompanyDialog"
97
+ :append-to-body="true"
98
+ :modal-append-to-body="true"
99
+ :close-on-click-modal="false"
100
+ v-el-drag-dialog
101
+ v-el-dialog-center
102
+ @close="changeCompanyClose"
103
+ >
104
+ <div class="cont">
105
+ <el-input placeholder="搜索" class="search-btn" v-model="filterText"></el-input>
106
+ <el-tree
107
+ :props="defaultProps"
108
+ :load="loadNode"
109
+ node-key="id"
110
+ ref="tree"
111
+ highlight-current
112
+ lazy
113
+ :expand-on-click-node="true"
114
+ @node-click="handleNodeClick"
115
+ class="organization-tree"
116
+ icon-class="el-icon-arrow-right"
117
+ :filter-node-method="filterNode"
118
+ ></el-tree>
119
+ </div>
120
+ <!-- <span slot="footer" class="dialog-footer">
121
+ <el-button type="primary" plain class="button-sty" @click="changeCompanyClose">
122
+ <i class="el-icon-close el-icon"></i>
123
+ 取 消
124
+ </el-button>
125
+ <el-button type="primary" @click="changeCompany" class="button-sty">
126
+ <i class="el-icon-check el-icon"></i>
127
+ 确 定
128
+ </el-button>
129
+ </span> -->
130
+ </el-dialog>
131
+
132
+ <infoIframeDialog v-if="showInfoIframeDialog" :visiable.sync="showInfoIframeDialog"
133
+ :dataId="userInfo.id"></infoIframeDialog>
134
+ <userInfo v-if="showUserInfoDialog" :visiable.sync="showUserInfoDialog" :_dataId="userInfo.id" topValue="128px"
135
+ @reload="userInfoReload"></userInfo>
136
+
137
+ <onlineTalk></onlineTalk>
138
+ </div>
139
+ </template>
140
+
141
+ <script>
142
+ import {mapGetters} from 'vuex';
143
+ import variables from '@/styles/variables.scss';
144
+ import userInfo from '@base/views/user/user/info.vue';
145
+ import onlineTalk from "@base/components/onlineTalk";
146
+ import {
147
+ getToken
148
+ } from '@base/utils/auth';
149
+ import indexUtil from "@base/utils/index.js"
150
+ import langTool from "../langTool.vue";
151
+ import sidebarConfig from "@/config/layout/componets/Sidebar/index";
152
+
153
+ export default {
154
+ props: {
155
+ option: Object
156
+ },
157
+ data() {
158
+ return {
159
+ direction: 'bottom',
160
+ defaultOpenedsArray: [],
161
+ viewRouter: [],
162
+ showMenuModal: false,
163
+ menuheight: {
164
+ height: ''
165
+ },
166
+ defaultProps: {
167
+ label: 'label', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
168
+ children: [],
169
+ isLeaf: 'leaf'
170
+ },
171
+ filterText: null,
172
+ showCompanyDialog: false,
173
+ choose_company_info: '',
174
+ userInfo: {},
175
+ companyInfo: {},
176
+ showUserInfoDialog: false,
177
+ hoverStatus: false,
178
+ nowNavID: 'null',
179
+ stopFlag: 0,
180
+ showInfoIframeDialog: false,
181
+ currentMenu: null,
182
+ menuModules: [],
183
+ firstMenuHeight: 0, // 第一个菜单的高度
184
+ eveyMenuHeight: 48, // 每一个菜单的高度
185
+ };
186
+ },
187
+ components: {userInfo, onlineTalk, langTool},
188
+ computed: {
189
+ ...mapGetters(['permission_routes', 'sidebar', 'sidebarRouters']),
190
+ activeMenu() {
191
+ const route = this.$route;
192
+ const {meta, path} = route;
193
+ // if set path, the sidebar will highlight the path you set
194
+ if (meta.activeMenu) {
195
+ return meta.activeMenu;
196
+ }
197
+ return path;
198
+ },
199
+ showLogo() {
200
+ return this.$store.state.settings.sidebarLogo;
201
+ },
202
+ variables() {
203
+ return variables;
204
+ },
205
+ /*isCollapse() {
206
+ if (this.sidebar.opened) {
207
+ this.direction = 'bottom';
208
+ } else {
209
+ this.direction = 'right-start';
210
+ }
211
+ return !this.sidebar.opened;
212
+ }*/
213
+ },
214
+ watch: {
215
+ filterText(val) {
216
+ this.$refs.tree.filter(val);
217
+ }
218
+ },
219
+ created() {
220
+ indexUtil.initI18nMessage('menus')
221
+ },
222
+ async mounted() {
223
+ await this.getUserInfo();
224
+ setTimeout(() => {
225
+ this.filterRoute();
226
+ }, 100);
227
+ this.countHeight();
228
+ let query = this.$route.query;
229
+ if (query && query.flag == 1) {
230
+ this.showCompanyDialog = true;
231
+ }
232
+ },
233
+ methods: {
234
+ getMenuName(item) {
235
+ let locale = this.$i18n?.locale;
236
+ let zhTitle = (item.meta ? item.meta.title : '');
237
+ let enTitle = (item.meta ? item.meta.enTitle : '');
238
+ let title;
239
+ if (locale == "en") {
240
+ title = enTitle || zhTitle;
241
+ } else {
242
+ title = zhTitle
243
+ }
244
+ if (!enTitle || locale !== "en") {
245
+ title = zhTitle
246
+ }
247
+ if (this.$t) {
248
+ title = this.$t(title)
249
+ }
250
+
251
+ return title;
252
+ },
253
+ jumpOutLink(route) {
254
+ let path = route.url || route.path;
255
+ if (route.type == 4 && path) {
256
+ if (path.indexOf('token={token}') >= 0) {
257
+ path = path.replace('token={token}', 'token=' + getToken())
258
+ }
259
+ window.open(path);
260
+ }
261
+ },
262
+ changeModules(row, cRow) {
263
+ if (!row.route) return;
264
+ localStorage.setItem('currentMenuId', row.id);
265
+ let route = row.route ? '/' + row.route : '';
266
+ sessionStorage.setItem('reUrl', cRow.path)
267
+ sessionStorage.setItem('reCid', row.id)
268
+ location.href = route + '/index.html/#/home';
269
+
270
+ // location.reload();
271
+ },
272
+ filterRoute() {
273
+ var oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
274
+ var nRoute1s = [];
275
+ oldRoutes.forEach((route1, index1) => {
276
+ let nRoute2s = [];
277
+ if (!route1.hidden) {
278
+ route1.children.forEach((route2, index2) => {
279
+ let nRoute3s = [];
280
+ if (!route2.hidden) {
281
+ route2.children.forEach((route3, index3) => {
282
+ if (!route3.hidden) {
283
+ nRoute3s.push(route3);
284
+ }
285
+ });
286
+ }
287
+ if (route2.type == 4 || route2.url || nRoute3s.length > 0) {
288
+ route2.children = nRoute3s;
289
+ nRoute2s.push(route2);
290
+ }
291
+ });
292
+ }
293
+ if (route1.type == 4 || route1.url || nRoute2s.length > 0) {
294
+ route1.children = nRoute2s;
295
+ nRoute1s.push(route1);
296
+ }
297
+ });
298
+ this.viewRouter = nRoute1s || [];
299
+ this.menuModules = nRoute1s || [];
300
+
301
+ let reUrl = sessionStorage.getItem('reUrl');
302
+ let reCid = sessionStorage.getItem('reCid');
303
+ if (reUrl) {
304
+ this.$nextTick(() => {
305
+ this.$refs.seconMenus.open(reCid);
306
+ })
307
+ this.$router.push(reUrl);
308
+ sessionStorage.removeItem('reUrl');
309
+ sessionStorage.removeItem('reCid');
310
+ }
311
+ },
312
+ filterRoute1() {
313
+ var oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
314
+ var nRoute1s = [];
315
+ oldRoutes.forEach((route1, index1) => {
316
+ let nRoute2s = [];
317
+ if (!route1.hidden && route1.route) {
318
+ route1.children.forEach((route2, index2) => {
319
+ let nRoute3s = [];
320
+ if (!route2.hidden) {
321
+ route2.children.forEach((route3, index3) => {
322
+ if (!route3.hidden) {
323
+ nRoute3s.push(route3);
324
+ }
325
+ });
326
+ }
327
+ if (nRoute3s.length > 0) {
328
+ route2.children = nRoute3s;
329
+ nRoute2s.push(route2);
330
+ }
331
+ });
332
+ }
333
+ if (nRoute2s.length > 0) {
334
+ route1.children = nRoute2s;
335
+ nRoute1s.push(route1);
336
+ }
337
+ });
338
+ let rows = nRoute1s;
339
+ if (rows.length) {
340
+ let currentMenu;
341
+ if (nRoute1s.length) {
342
+ var currentMenuId = localStorage.getItem('currentMenuId');
343
+ if (currentMenuId) {
344
+ currentMenu = nRoute1s.find(row => row.id == currentMenuId);
345
+ }
346
+ if (!currentMenu) {
347
+ currentMenu = nRoute1s[0];
348
+ }
349
+ this.viewRouter = currentMenu.children;
350
+ }
351
+ this.currentMenu = currentMenu;
352
+ this.menuModules = rows || [];
353
+
354
+ /*if (currentMenu) {
355
+ if (currentMenu.route != WEB_PREFIX.substring(1, WEB_PREFIX.length)) {
356
+ this.changeModules(currentMenu, 1);
357
+ } else {
358
+ localStorage.setItem('currentMenuId', currentMenu.id);
359
+ }
360
+ } else {
361
+ localStorage.removeItem('currentMenuId');
362
+ }*/
363
+ }
364
+ },
365
+ rourteTo(route) {
366
+ let path = route.url || route.path;
367
+ if (!path) {
368
+ return
369
+ }
370
+ this.showMenuModal = true;
371
+ setTimeout(() => {
372
+ this.showMenuModal = false;
373
+ }, 200);
374
+ try {
375
+ if (route.linkType == 4) {
376
+ this.jumpOutLink(route)
377
+ } else if (route.linkType == 3) {
378
+ this.$router.push({path: path, query: {url: route.outLink, route: route.route}});
379
+ } else {
380
+ this.$router.push(path);
381
+ }
382
+ } catch (e) {
383
+ console.error(e);
384
+ }
385
+ },
386
+ logout() {
387
+ this.$store.dispatch('user/logout2').then(res => {
388
+ this.$router.push(`/login?redirect=${this.$route.fullPath}`);
389
+ });
390
+ },
391
+ toggleSideBar() {
392
+ this.$store.dispatch('app/toggleSideBar');
393
+ },
394
+ countHeight() {
395
+ var h = this.$refs.hamhurger.offsetHeight + this.$refs.fase.offsetHeight + this.$refs.business.offsetHeight;
396
+ this.menuheight.height = window.innerHeight - h + 'px';
397
+ },
398
+ handleNodeClick(data, node, v) {
399
+ if (!data.hasChild) {
400
+ this.choose_company_info = data;
401
+ this.changeCompany();
402
+ } else {
403
+ this.choose_company_info = {};
404
+ }
405
+ },
406
+ // 异步树叶子节点懒加载逻辑
407
+ loadNode(node, resolve) {
408
+ let companyCode = node && node.data && node.data.companyCode ? node.data.companyCode || '' : '';
409
+ let url = !companyCode ? USER_PREFIX + '/user_company_info/getAllList' : USER_PREFIX + '/user_company_info/getChildren';
410
+
411
+ this.$http({
412
+ url: url,
413
+ method: 'post',
414
+ data: {
415
+ parentCompanyCode: companyCode
416
+ },
417
+ success: res => {
418
+ let datas = res.objx || [];
419
+ let parentLabel = companyCode ? node.label : null;
420
+ datas.forEach(item => {
421
+ item.leaf = !item.hasChild;
422
+ let label = item.companyName;
423
+ /*if(companyCode){
424
+ label = label + '('+companyTypeMap[item.companyType]+')'
425
+ }*/
426
+ item.label = label;
427
+ item.parentLabel = parentLabel;
428
+ });
429
+
430
+ if (node.level === 0) {
431
+ if (datas.length > 0 && datas[0].hasChild) {
432
+ this.$nextTick(() => {
433
+ let nodedata = node.childNodes[0];
434
+ nodedata.expanded = true;
435
+ nodedata.loadData();
436
+ });
437
+ }
438
+ }
439
+ resolve(datas);
440
+ }
441
+ });
442
+ },
443
+ filterNode(value, data) {
444
+ if (!value) return true;
445
+ let flag1 = data.label.indexOf(value) !== -1;
446
+ let flag2 = data.parentLabel && data.parentLabel.indexOf(value) !== -1;
447
+ return flag1 || flag2;
448
+ },
449
+ openCompanyDialog() {
450
+ this.filterText = null;
451
+ this.showCompanyDialog = true;
452
+ },
453
+ getWebPrefix(callback) {
454
+ this.$http({
455
+ url: USER_PREFIX + '/auth/getWebPrefix',
456
+ method: `post`,
457
+ data: {},
458
+ isLoading: true,
459
+ success: res => {
460
+ let webPrefix = res.objx
461
+ callback && callback(webPrefix)
462
+ }
463
+ });
464
+ },
465
+ changeCompany() {
466
+ let row = this.choose_company_info;
467
+ let query = this.$route.query;
468
+ let flag = query && query.flag == 1 ? 1 : null;
469
+ this.showCompanyDialog = false;
470
+ if (row && row.companyCode) {
471
+ this.$baseLoading({target: document.body, fullscreen: true});
472
+ this.$http({
473
+ url: USER_PREFIX + '/auth/switchCompany',
474
+ method: 'post',
475
+ data: {stringOne: row.companyCode},
476
+ isLoading: true,
477
+ success: res => {
478
+ this.getWebPrefix((prefix) => {
479
+ let webPrefix = prefix ? ("/" + prefix) : window.MAIN_WEB_PREFIX;
480
+ sessionStorage.removeItem("out-token");
481
+ this.$store.dispatch('user/changeCompanyInfo', row);
482
+ this.$store.dispatch('tagsView/delAllViews');
483
+ window.location.href = webPrefix + '/index.html';
484
+ });
485
+ }
486
+ });
487
+ } else {
488
+ if (flag == 1) {
489
+ this.$router.push({
490
+ path: '/'
491
+ });
492
+ }
493
+ }
494
+ },
495
+ changeCompanyClose() {
496
+ let query = this.$route.query;
497
+ let flag = query && query.flag == 1 ? 1 : null;
498
+ if (flag == 1) {
499
+ this.$router.push({
500
+ path: '/'
501
+ });
502
+ }
503
+ this.showCompanyDialog = false;
504
+ },
505
+ getUserInfo() {
506
+ return this.$http({
507
+ url: USER_PREFIX + '/user/currentUser',
508
+ method: 'post',
509
+ success: res => {
510
+ let userInfo = res.objx;
511
+ this.headPhotoUrl = userInfo.headPhotoUrl ? userInfo.headPhotoUrl : require('@/resources/images' + '/default-header.png');
512
+ this.userInfo = userInfo;
513
+ this.handleRoute()
514
+ }
515
+ });
516
+
517
+ this.$http({
518
+ url: USER_PREFIX + '/company_info/getCurrent',
519
+ method: `post`,
520
+ success: res => {
521
+ this.companyInfo = res.objx || {};
522
+ }
523
+ });
524
+ },
525
+ openUserInfo() {
526
+ this.showUserInfoDialog = true;
527
+ // this.showInfoIframeDialog = true;
528
+ },
529
+ userInfoReload() {
530
+ this.showUserInfoDialog = true;
531
+ },
532
+ showNav(route, event) {
533
+ let id = route && route.id ? route.id : null;
534
+ if (id != null) {
535
+ if (!route.children || !route.children.length) {
536
+ return;
537
+ }
538
+ this.stopFlag = 1;
539
+ this.nowNavID = id;
540
+ this.$nextTick(() => {
541
+ var wh = window.innerHeight;
542
+ let dom = event.target;
543
+ let domAttr = dom.getBoundingClientRect();
544
+ // var sh1 = dom.offsetTop;
545
+ var sh1 = domAttr.top;
546
+ let $snav = this.$refs['seconMenus' + id][0];
547
+ let snavAttr = $snav.getBoundingClientRect();
548
+
549
+ // var sh2 = $snav.outerHeight;
550
+ var sh2 = snavAttr.height;
551
+ var sh = wh - (sh1 + sh2);
552
+
553
+ var hd = 20;
554
+ var xhd = sh - hd; //移动距离+固定值
555
+ if (sh >= 0) {
556
+
557
+ $snav.style['margin-top'] = sh1 + 'px';
558
+ } else if (sh < 0) {
559
+ let bd = sh1 + sh;
560
+
561
+ $snav.style['margin-top'] = bd + 'px';
562
+ $snav.querySelector(".ico-arrow").style['margin-top'] = (sh1 - bd) + 'px';
563
+ }
564
+ });
565
+ } else {
566
+ this.stopFlag = 0;
567
+ setTimeout(() => {
568
+ if (this.stopFlag == 0) {
569
+ this.nowNavID = id;
570
+ }
571
+ }, 200);
572
+ }
573
+ },
574
+ jumpTo(row, firstRow) {
575
+ let route = firstRow.route ? '/' + firstRow.route : '';
576
+ if (route == WEB_PREFIX) {
577
+ this.$router.push({
578
+ path: row.path
579
+ });
580
+ } else {
581
+ this.changeModules(firstRow, row);
582
+ }
583
+ },
584
+ toDownMove() {
585
+ let containter = document.getElementById('menuUl').querySelector(".scrollbar-wrapper");
586
+ let menuscrollTop = containter.scrollTop
587
+ let scrollHeight = containter.scrollHeight
588
+ let val = menuscrollTop + this.eveyMenuHeight;
589
+ if (val < scrollHeight) {
590
+ containter.scrollTop = val
591
+ } else {
592
+ containter.scrollTop = scrollHeight
593
+ }
594
+ },
595
+ toUpMove() {
596
+ let containter = document.getElementById('menuUl').querySelector(".scrollbar-wrapper");
597
+ let menuscrollTop = containter.scrollTop
598
+ let val = menuscrollTop - this.eveyMenuHeight;
599
+ if (val > 0) {
600
+ containter.scrollTop = val
601
+ } else {
602
+ containter.scrollTop = 0
603
+ }
604
+ },
605
+ getMenuClass(menu, flag) {
606
+ let res = "";
607
+ if (menu.menuImg) {
608
+ res = "iconfont " + menu.menuImg;
609
+ } else if (flag == 1) {
610
+ res = "iconfont icon-jinggao";//一级默认图标
611
+ } else if (flag == 2) {
612
+ res = "iconfont icon-circle";//二级默认图标
613
+ } else if (flag == 3) {
614
+ res = "iconfont icon-thirdMemu";//三级级默认图标
615
+ }
616
+
617
+ if (flag == 2) {
618
+ if (menu.id == this.nowNavID) {
619
+ res += " on";
620
+ }
621
+ }
622
+ return res;
623
+ },
624
+ handleRoute() {
625
+ if (this.userInfo.flag !== 8) return;
626
+ let menus = sidebarConfig.bdadminMenus
627
+ this.$store.dispatch('permission/setSidebarRoute', menus)
628
+
629
+ }
630
+ }
631
+ };
632
+ </script>
633
+ <style lang="scss">
634
+ @import '~@/styles/variables.scss';
635
+
636
+ .hamburger-box {
637
+ background-color: #0000004d;
638
+ height: 42px;
639
+ /* line-height: 30px; */
640
+ text-align: center;
641
+ /* box-shadow: 0 2px 6px rgb(0 0 0 / 10%); */
642
+ position: relative;
643
+ z-index: 2;
644
+ overflow: hidden;
645
+ font-size: 12px;
646
+ color: rgba(255, 255, 255, 0.65);
647
+
648
+ > div {
649
+ color: #fff;
650
+ font-size: 13px;
651
+ margin-bottom: 4px;
652
+ cursor: pointer;
653
+ height: 36px;
654
+ border-radius: 7px;
655
+ margin: 6px 10px 6px 8px;
656
+ overflow: hidden;
657
+ background: #2a6494;
658
+ }
659
+
660
+ p {
661
+ color: #fff;
662
+ font-size: 13px;
663
+ margin-bottom: 4px;
664
+ cursor: pointer;
665
+ /* border: solid 1px #ffffff61; */
666
+ display: block;
667
+ line-height: 27px;
668
+ /* width: 88%; */
669
+ margin-top: 6px;
670
+ border-radius: 7px;
671
+ margin: 6px 10px 6px 8px;
672
+ background: #2a6494;
673
+
674
+ i {
675
+ font-size: 14px;
676
+ vertical-align: middle;
677
+ margin: 0 4px 0 6px;
678
+ height: 36px;
679
+ line-height: 36px;
680
+ width: 21px;
681
+ }
682
+
683
+ span {
684
+ width: 94px;
685
+ display: table-cell;
686
+ height: 32px;
687
+ word-break: break-word;
688
+ line-height: 16px;
689
+ overflow: hidden;
690
+ vertical-align: middle;
691
+ }
692
+
693
+ &.name {
694
+ display: table-row;
695
+ margin: 0;
696
+ }
697
+ }
698
+ }
699
+
700
+ .business-name {
701
+ height: 47px;
702
+ color: #ffffffb8;
703
+ background: #0000004d;
704
+ /* padding-top: 12px; */
705
+ font-size: 12px;
706
+ /* padding-left: 5px; */
707
+ display: table-cell;
708
+ vertical-align: middle;
709
+ width: 140px;
710
+ padding: 6px 10px;
711
+ text-align: center;
712
+
713
+ p {
714
+ margin: 0;
715
+ }
716
+ }
717
+
718
+ .fase-box {
719
+ color: #fff;
720
+ /* border-bottom: solid 1px rgba(255, 255, 255, 0.12); */
721
+ border-top: solid 1px rgba(255, 255, 255, 0.12);
722
+ background: #225076;
723
+ padding: 4px 0 8px;
724
+ width: 100%;
725
+ z-index: 999;
726
+ position: relative;
727
+ /* display: flex;*/
728
+ //text-align: left !important;
729
+ // &:hover {
730
+ // color: $baseColor;
731
+ // background-color: #fbfdfe;
732
+ // .fase-list {
733
+ // display: block;
734
+ // }
735
+ // }
736
+ .item {
737
+ flex: 1;
738
+ text-align: center;
739
+ font-size: 16px;
740
+ height: 40px;
741
+ line-height: 40px;
742
+ cursor: pointer;
743
+ display: inline-block;
744
+ min-width: 30px;
745
+ }
746
+
747
+ .fase-list {
748
+ position: absolute;
749
+ left: 100%;
750
+ color: $baseColor;
751
+ background-color: #fbfdfe;
752
+ border: solid 1px $baseColor;
753
+ border-left: none;
754
+ top: -0.5px;
755
+ padding: 10px 0 10px 24px;
756
+ height: 43px;
757
+ width: 413px;
758
+ display: none;
759
+
760
+ .l-item {
761
+ display: inline-block;
762
+ font-size: 12px;
763
+ margin-right: 36px;
764
+ line-height: 20px;
765
+ cursor: pointer;
766
+
767
+ i {
768
+ vertical-align: middle;
769
+ margin-right: 4px;
770
+ font-size: 15px;
771
+ margin-bottom: 2px;
772
+ }
773
+
774
+ &:hover {
775
+ border-bottom: solid 1px $baseColor;
776
+ }
777
+ }
778
+ }
779
+ }
780
+
781
+ .openSidebar .fase-box {
782
+ text-align: center;
783
+ //padding: 0;
784
+ }
785
+
786
+ #app .sidebar-container {
787
+ overflow: visible;
788
+ z-index: 1003;
789
+
790
+ &.hover {
791
+ z-index: 1003;
792
+ }
793
+
794
+ &.hover1 .fase-box {
795
+ width: 138px;
796
+ color: $baseColor;
797
+ background-color: #fbfdfe;
798
+ border-color: $baseColor;
799
+ }
800
+
801
+ .el-menu.menu-box {
802
+ height: calc(100vh - 173px);
803
+ font-size: 13px;
804
+ z-index: -1;
805
+ position: relative;
806
+ background-color: rgba(0, 0, 0, .2);
807
+ word-break: break-word;
808
+
809
+ .el-submenu {
810
+ overflow: hidden; //有点电脑分辨率问题
811
+ .el-submenu__title {
812
+ padding: 0 11px !important;
813
+ height: 48px;
814
+ line-height: 48px;
815
+
816
+ i {
817
+ color: #fff;
818
+ font-size: 13px;
819
+ margin-right: 0;
820
+ width: 18px;
821
+
822
+ &.iconfont {
823
+ margin-right: 5px;
824
+ font-size: 19px;
825
+ float: left;
826
+ }
827
+
828
+ &.el-submenu__icon-arrow {
829
+ right: 3px;
830
+ text-align: center;
831
+ font-size: 12px;
832
+ margin-top: -5px;
833
+ display: none;
834
+ }
835
+ }
836
+
837
+ > span {
838
+ height: 48px;
839
+ display: table-cell;
840
+ width: 114px;
841
+ vertical-align: middle;
842
+ font-size: 13px;
843
+ white-space: normal;
844
+ line-height: 16px;
845
+ }
846
+ }
847
+
848
+ &.is-opened .el-submenu__title {
849
+ //background-color: rgba(27, 66, 97) !important;
850
+ }
851
+ }
852
+
853
+ .el-submenu {
854
+ .el-menu {
855
+ background: rgba(0, 0, 0, 0.35) !important;
856
+ box-shadow: 0px -5px 8px #00000014 inset;
857
+ //padding:4px 0;
858
+ }
859
+
860
+ .el-menu-item {
861
+ height: auto;
862
+ line-height: 1.4;
863
+ padding-left: 33px !important;
864
+ font-size: 12px;
865
+ opacity: 0.8;
866
+ margin: 10px 0 10px 14px;
867
+ padding: 7px 2px 7px 0px;
868
+ border-radius: 8px;
869
+ text-align: left;
870
+ min-width: 81px !important;
871
+ white-space: normal;
872
+ margin-right: 10px;
873
+ word-break: break-word;
874
+
875
+ &:before {
876
+ position: absolute;
877
+ top: 50%;
878
+ height: 20px;
879
+ margin-top: -10px;
880
+ line-height: 20px;
881
+ left: 7px;
882
+ font-size: 18px;
883
+ }
884
+
885
+ [class^=el-icon-] {
886
+ font-size: 12px;
887
+ color: #FFF;
888
+ position: absolute;
889
+ right: 2px;
890
+ top: 50%;
891
+ margin-top: -5px;
892
+ width: 14px;
893
+ zoom: 0.8;
894
+ display: none;
895
+ }
896
+
897
+ &:hover, &.on {
898
+ opacity: 1;
899
+ background-color: #FBFDFE !important;
900
+ color: $baseColor !important;
901
+
902
+ .el-icon-arrow-right {
903
+ color: $baseColor
904
+ }
905
+ }
906
+ }
907
+ }
908
+
909
+ &.lang-zh {
910
+ font-size: 14px;
911
+
912
+ .el-submenu {
913
+ .el-submenu__title {
914
+ > span {
915
+ font-size: 14px;
916
+ text-align: center
917
+ }
918
+
919
+ i.iconfont {
920
+ margin-right: 2px;
921
+ }
922
+ }
923
+
924
+ .el-menu-item {
925
+ font-size: 13px
926
+ }
927
+ }
928
+
929
+ }
930
+ }
931
+ }
932
+
933
+ .main-container {
934
+ z-index: 1002;
935
+ }
936
+
937
+ .menu-btn {
938
+ background-color: #0000001c;
939
+ height: 30px;
940
+ line-height: 30px;
941
+ text-align: center;
942
+ box-shadow: 0 -10px 6px rgb(0 0 0 / 10%);
943
+ display: flex;
944
+ color: #FFF;
945
+ font-size: 16px;
946
+
947
+ i {
948
+ display: inline-block;
949
+ flex: 1;
950
+ line-height: 30px;
951
+ cursor: pointer;
952
+ border-right: solid 1px rgba(0, 0, 0, 0.2);
953
+
954
+ &:last-child {
955
+ border-right: none;
956
+ }
957
+
958
+ &:hover {
959
+ background-color: rgba(255, 255, 255, 0.12);
960
+ }
961
+ }
962
+ }
963
+
964
+ /*.menu-box {
965
+ background-color: #0000002e !important;
966
+ font-size: 14px;
967
+ z-index: -1;
968
+ position: relative;
969
+ &.hover .el-scrollbar {
970
+ width: 1000px;
971
+ }
972
+ .el-scrollbar {
973
+ .el-scrollbar__view {
974
+ padding-top: 1px;
975
+ }
976
+ .el-scrollbar__bar.is-vertical {
977
+ left: 104px;
978
+ }
979
+ }
980
+ .first-item {
981
+ position: relative;
982
+ width: 104px;
983
+ &:nth-child(-n + 6) .second-list {
984
+ bottom: inherit !important;
985
+ top: -40.5px !important;
986
+ }
987
+ &:nth-child(1) .second-list {
988
+ top: 0 !important;
989
+ }
990
+ &:nth-last-child(-n + 6) .second-list {
991
+ bottom: -1%;
992
+ top: inherit;
993
+ }
994
+ .f-name {
995
+ height: 55px;
996
+ line-height: 55px;
997
+ padding-left: 9px;
998
+ color: #fff;
999
+ cursor: pointer;
1000
+ position: relative;
1001
+ padding-right: 6px;
1002
+ -webkit-transition: all 0.2s ease-in;
1003
+ -moz-transition: all 0.2s ease-in;
1004
+ -o-transition: all 0.2s ease-in;
1005
+ transition: all 0.2s ease-in;
1006
+ width: 104px;
1007
+ i.el-icon-arrow-right {
1008
+ position: absolute;
1009
+ right: 3px;
1010
+ top: 21.5px;
1011
+ width: 14px;
1012
+ height: 14px;
1013
+ }
1014
+ .el-icon-s-opportunity {
1015
+ opacity: 0.92;
1016
+ font-size: 13px;
1017
+ vertical-align: middle;
1018
+ margin-right: 2px;
1019
+ }
1020
+ span{display: inline-block;width: calc(100% - 20px);vertical-align: middle;line-height: 1.2;}
1021
+ }
1022
+
1023
+ &:hover,
1024
+ &.current {
1025
+ .f-name {
1026
+ background-color: #fbfdfe;
1027
+ color: $baseColor;
1028
+ }
1029
+ .second-list {
1030
+ display: block;
1031
+ }
1032
+ }
1033
+ }
1034
+ }
1035
+
1036
+
1037
+ */
1038
+ .second-list {
1039
+ display: none;
1040
+ position: absolute;
1041
+ left: $sideBarWidth;
1042
+ padding-left: 2px;
1043
+ top: 0.5px;
1044
+ // &:before {
1045
+ // content: "";
1046
+ // top: 22px;
1047
+ // bottom: 22px;
1048
+ // background-color: $baseColor;
1049
+ // width: 2px;
1050
+ // position: absolute;
1051
+ // left: 24px;
1052
+ // }
1053
+ > div {
1054
+ background: #fbfdfe;
1055
+ border: solid 1px $baseColor;
1056
+ top: -0.5px;
1057
+ padding: 24px 0;
1058
+ border-radius: 8px;
1059
+ margin-left: 9px;
1060
+ max-height: calc(84vh);
1061
+ overflow-y: auto;
1062
+ overflow-x: hidden;
1063
+ width: 458px;
1064
+ }
1065
+
1066
+ .ico-arrow {
1067
+ border-top: solid 7px transparent;
1068
+ border-bottom: solid 7px transparent;
1069
+ border-right: solid 7px $baseColor;
1070
+ position: absolute;
1071
+ left: 2px;
1072
+ top: 8px;
1073
+ }
1074
+
1075
+ &.on {
1076
+ display: block;
1077
+ }
1078
+
1079
+ .tit {
1080
+ width: auto;
1081
+ /* text-align: center; */
1082
+ /* background: #22507614; */
1083
+ color: $baseColor;
1084
+ /* border: dashed 1px #1d4667; */
1085
+ padding: 0 0 10px;
1086
+ /* border-radius: 6px; */
1087
+ /* margin: 5px auto; */
1088
+ margin: 0 22px;
1089
+ display: block;
1090
+ border-bottom: solid 1px #eee;
1091
+
1092
+ i, span {
1093
+ opacity: 1;
1094
+ vertical-align: middle;
1095
+ margin-right: 7px;
1096
+ font-size: 18px;
1097
+ }
1098
+
1099
+ span {
1100
+ font-size: 14px
1101
+ }
1102
+ }
1103
+
1104
+ dl {
1105
+ padding: 8px 16px 3px 24px;
1106
+ margin-top: 0;
1107
+ margin-bottom: 0;
1108
+ display: inline-block;
1109
+ width: 50%;
1110
+ position: relative;
1111
+ word-break: break-all;
1112
+
1113
+ &:after {
1114
+ content: "";
1115
+ width: 1px;
1116
+ height: 14px;
1117
+ background: #e4e4e4;
1118
+ display: inline-block;
1119
+ position: absolute;
1120
+ right: -5px;
1121
+ top: 50%;
1122
+ margin-top: -3px;
1123
+ }
1124
+
1125
+ .s-name {
1126
+ color: $baseColor;
1127
+ display: inline-block;
1128
+ width: 190px;
1129
+ font-size: 14px;
1130
+ vertical-align: top;
1131
+ margin-top: 11px;
1132
+ text-align: right;
1133
+
1134
+ i {
1135
+ margin-left: 5px;
1136
+
1137
+ &.icon {
1138
+ font-size: 13px;
1139
+ opacity: 0.92;
1140
+ margin-left: 2px;
1141
+ margin-right: 4px;
1142
+ }
1143
+ }
1144
+ }
1145
+
1146
+ .item {
1147
+ position: relative;
1148
+ border: dashed 1px #FFF;
1149
+ border-radius: 6px;
1150
+ display: block;
1151
+ padding: 6px 8px 6px 27px;
1152
+ cursor: pointer;
1153
+
1154
+ &:hover {
1155
+ border-color: $baseColor;
1156
+ color: $baseColor;
1157
+
1158
+ i, a {
1159
+ color: $baseColor;
1160
+ }
1161
+ }
1162
+
1163
+ // &:after {
1164
+ // content: "";
1165
+ // width: 1px;
1166
+ // height: 12px;
1167
+ // background: #dcdcdc;
1168
+ // position: absolute;
1169
+ // right: -25px;
1170
+ // top: 2px
1171
+ // }
1172
+
1173
+ i {
1174
+ opacity: 0.8;
1175
+ margin-right: 8px;
1176
+ vertical-align: middle;
1177
+ position: absolute;
1178
+ left: 4px;
1179
+ top: 50%;
1180
+ margin-top: -11px;
1181
+ height: 22px;
1182
+ line-height: 22px;
1183
+ font-size: 16px;
1184
+ }
1185
+
1186
+ a {
1187
+ color: rgba(0, 0, 0, 0.82);
1188
+ display: inline-block;
1189
+ font-size: 13px;
1190
+ position: relative;
1191
+ overflow: initial !important;
1192
+ -webkit-transition: all 0.2s ease-in;
1193
+ -moz-transition: all 0.2s ease-in;
1194
+ -o-transition: all 0.2s ease-in;
1195
+ transition: all 0.2s ease-in;
1196
+ width: auto !important;
1197
+ vertical-align: middle;
1198
+ word-break: break-word;
1199
+
1200
+ &:hover {
1201
+ color: $baseColor;
1202
+
1203
+ // &:after {
1204
+ // content: '';
1205
+ // position: absolute;
1206
+ // bottom: -4px;
1207
+ // left: 0;
1208
+ // right: 0;
1209
+ // border-bottom: solid 1px $baseColor;
1210
+ // }
1211
+ }
1212
+ }
1213
+ }
1214
+
1215
+ &:last-child {
1216
+ .list-box {
1217
+ border-bottom: none;
1218
+ }
1219
+ }
1220
+ }
1221
+ }
1222
+
1223
+ // .el-submenu .el-menu {
1224
+ // height: auto !important;
1225
+ // }
1226
+ </style>