cloud-web-corejs 1.1.0-dev.6 → 1.1.0-dev.7

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 (45) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/view.vue +27 -26
  3. package/src/components/excelImport/index.vue +156 -156
  4. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  5. package/src/components/mobile/wf/content.vue +110 -67
  6. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  7. package/src/components/mobile/wf/selectUserDialog.vue +122 -0
  8. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  9. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  10. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  11. package/src/components/xform/form-designer/designer.js +36 -52
  12. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  13. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  14. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +2 -2
  15. package/src/components/xform/form-designer/indexMixin.js +25 -0
  16. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -860
  17. package/src/components/xform/form-designer/toolbar-panel/index.vue +874 -874
  18. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  19. package/src/components/xform/form-designer/widget-panel/indexMixin.js +15 -2
  20. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -1
  21. package/src/components/xform/form-render/container-item/list-h5-item.vue +154 -27
  22. package/src/components/xform/form-render/indexMixin.js +23 -3
  23. package/src/components/xform/styles/h5.scss +774 -588
  24. package/src/directive/append-to-body/index.js +48 -0
  25. package/src/index.js +4 -0
  26. package/src/layout/components/Sidebar/default.vue +1655 -1655
  27. package/src/router/index.js +48 -48
  28. package/src/utils/vab.js +1283 -1283
  29. package/src/views/bd/setting/form_template/edit.vue +378 -356
  30. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  31. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  32. package/src/views/bd/setting/form_template/list.vue +304 -303
  33. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  34. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  35. package/src/views/user/file_view_ins/list.vue +970 -970
  36. package/src/views/user/form/vform/designer.vue +823 -821
  37. package/src/views/user/home/default.vue +1117 -1117
  38. package/src/views/user/home/index.vue +103 -103
  39. package/src/views/user/notify_message/dialog.vue +139 -139
  40. package/src/views/user/outLink/form_view.vue +202 -202
  41. package/src/views/user/outLink/index.vue +110 -110
  42. package/src/views/user/wf/iframe/index.vue +51 -51
  43. package/src/views/user/wf/iframe/index2.vue +64 -64
  44. package/src/views/user/wf/wf_manage/list2.vue +871 -871
  45. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -134
@@ -1,1655 +1,1655 @@
1
- <template>
2
- <div :class="{ 'has-logo': showLogo, telescopMenu: !isMenu }">
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">
9
- <i class="iconfont icon-ziyuan"></i
10
- ><span>{{ userInfo.nickName }}</span>
11
- </p>
12
- </div>
13
- </div>
14
- <div class="business-name" ref="business">
15
- <el-tooltip
16
- :enterable="false"
17
- effect="dark"
18
- :content="companyInfo.companyName"
19
- :placement="direction"
20
- >
21
- <p v-show="getMenuFlag()">{{ companyInfo.companyName }}</p>
22
- </el-tooltip>
23
- </div>
24
- <div
25
- class="fase-box"
26
- ref="fase"
27
- @mouseleave="$emit('selfClose')"
28
- @mouseenter="$emit('selfEnter')"
29
- >
30
- <langTool v-if="getMenuFlag()"></langTool>
31
- <div class="item" @click="openCompanyDialog" v-if="getMenuFlag()">
32
- <el-tooltip
33
- :enterable="false"
34
- effect="dark"
35
- :content="$t1('切换组织')"
36
- :placement="direction"
37
- >
38
- <i class="el-icon-set-up" />
39
- </el-tooltip>
40
- </div>
41
- <div class="item" v-if="getMenuFlag()">
42
- <el-tooltip
43
- :enterable="false"
44
- effect="dark"
45
- :content="$t1('流程待办')"
46
- :placement="direction"
47
- >
48
- <i
49
- class="iconfont icon-liuchengdaiban"
50
- @click="$router.push('/basic/wf/wf_manage/list')"
51
- />
52
- </el-tooltip>
53
- </div>
54
- <div class="item" v-if="isDev && isBdAdmin">
55
- <el-tooltip
56
- :enterable="false"
57
- effect="dark"
58
- :content="$t1('获取提取码')"
59
- :placement="direction"
60
- >
61
- <i
62
- class="el-icon-setting"
63
- @click="showExtractedCodeCreateDialog = true"
64
- />
65
- </el-tooltip>
66
- </div>
67
- <div class="item" v-if="isBdAdmin">
68
- <el-tooltip
69
- :enterable="false"
70
- effect="dark"
71
- :content="$t1('查看提取码')"
72
- :placement="direction"
73
- >
74
- <i
75
- class="el-icon-tickets"
76
- @click="showExtractedCodeQueryDialog = true"
77
- />
78
- </el-tooltip>
79
- </div>
80
-
81
- <div class="item" @click="logout()">
82
- <el-tooltip
83
- :enterable="false"
84
- effect="dark"
85
- :content="$t1('退出')"
86
- :placement="direction"
87
- >
88
- <i class="el-icon-switch-button" />
89
- </el-tooltip>
90
- </div>
91
- </div>
92
- <template v-for="router1 in viewRouter">
93
- <template v-for="router2 in router1.children">
94
- <div
95
- class="second-list"
96
- :key="router1.id + 't' + router2.id"
97
- :class="{ on: router2.id == nowNavID }"
98
- @mouseenter="stopFlag = 1"
99
- @mouseleave="showNav()"
100
- v-show="router2.id == nowNavID"
101
- :ref="'seconMenus' + router2.id"
102
- >
103
- <i class="ico-arrow"></i>
104
- <div>
105
- <div class="tit">
106
- <i :class="getMenuClass(router2, 2)"></i
107
- ><span>{{ getMenuName(router2) }}</span>
108
- </div>
109
- <dl
110
- v-for="(router3, index3) in router2.children"
111
- :key="'router3' + index3"
112
- >
113
- <div
114
- class="item"
115
- v-if="!router3.hidden"
116
- @click="rourteTo(router3, router1)"
117
- >
118
- <!--<i class="el-icon-caret-right"></i>-->
119
- <i :class="getMenuClass(router3, 3)"></i>
120
- <a>{{ getMenuName(router3) }}</a>
121
- </div>
122
- </dl>
123
- </div>
124
- </div>
125
- </template>
126
- </template>
127
- <el-menu
128
- class="menu-box"
129
- :class="{ 'lang-zh': $i18n.locale == 'zh' }"
130
- text-color="#fff"
131
- active-text-color="#fff"
132
- :unique-opened="true"
133
- @mouseleave="showNav()"
134
- ref="seconMenus"
135
- :collapse="!isMenu"
136
- >
137
- <el-scrollbar wrap-class="scrollbar-wrapper" id="menuUl">
138
- <component
139
- v-for="menuModule in menuModules"
140
- :is="getMenuType(menuModule)"
141
- :index="'' + menuModule.id"
142
- :key="'menuModule' + menuModule.id"
143
- @click.native="rourteTo(menuModule)"
144
- >
145
- <i
146
- :class="getMenuClass(menuModule, 1)"
147
- v-if="menuModule.children.length <= 0"
148
- ></i>
149
- <template slot="title">
150
- <i
151
- :class="getMenuClass(menuModule, 1)"
152
- v-if="menuModule.children.length > 0"
153
- ></i>
154
- <span>{{ getMenuName(menuModule) }}</span>
155
- </template>
156
- <component
157
- v-for="(router2, index1) in menuModule.children"
158
- :is="getMenuType(router2)"
159
- :key="index1"
160
- :index="'' + router2.id"
161
- @mouseenter.native="showNav(router2, $event)"
162
- @mouseleave.native="showNav()"
163
- @click="rourteTo(router2)"
164
- >
165
- <template slot="title">
166
- <i :class="getMenuClass(router2, 2)"></i>
167
- <span>{{ getMenuName(router2) }}</span>
168
- </template>
169
- <el-menu-item
170
- v-for="(router3, index3) in router2.children"
171
- :key="index3"
172
- :index="'' + router3.id"
173
- @click="rourteTo(router3)"
174
- >
175
- <template slot="title">
176
- <i :class="getMenuClass(router3, 3)"></i>
177
- <span>{{ getMenuName(router3) }}</span>
178
- </template>
179
- </el-menu-item>
180
- </component>
181
- </component>
182
- <!-- <el-menu-item
183
- @click.native="openCreateCompanyDialog"
184
- index="xx"
185
- v-if="isFormDev"
186
- >
187
- <template slot="title">
188
- <i :class="getMenuClass({}, 1)"></i>
189
- <span>新建企业</span>
190
- </template>
191
- </el-menu-item> -->
192
- </el-scrollbar>
193
- </el-menu>
194
- <div class="menu-btn">
195
- <i class="el-icon-arrow-up" @click="toUpMove()"></i>
196
- <i class="el-icon-arrow-down" @click="toDownMove()"></i>
197
- </div>
198
- <div
199
- id="tta"
200
- style="
201
- position: absolute;
202
- height: 100%;
203
- top: 0;
204
- right: 0;
205
- z-index: 9999;
206
- width: 800px;
207
- left: 100%;
208
- "
209
- v-if="showMenuModal"
210
- ></div>
211
- <el-dialog
212
- :title="$t1('切换组织')"
213
- width="355px"
214
- custom-class="dialog-style list-dialog"
215
- v-if="showCompanyDialog"
216
- :visible.sync="showCompanyDialog"
217
- :append-to-body="true"
218
- :modal-append-to-body="true"
219
- :close-on-click-modal="false"
220
- v-el-drag-dialog
221
- v-el-dialog-center
222
- @close="changeCompanyClose"
223
- >
224
- <div class="cont">
225
- <el-input
226
- :placeholder="$t1('搜索')"
227
- class="search-btn"
228
- v-model="filterText"
229
- ></el-input>
230
- <el-tree
231
- :props="defaultProps"
232
- :load="loadNode"
233
- node-key="id"
234
- ref="tree"
235
- highlight-current
236
- lazy
237
- :expand-on-click-node="true"
238
- @node-click="handleNodeClick"
239
- class="organization-tree"
240
- icon-class="el-icon-arrow-right"
241
- :filter-node-method="filterNode"
242
- ></el-tree>
243
- </div>
244
- <!-- <span slot="footer" class="dialog-footer">
245
- <el-button type="primary" plain class="button-sty" @click="changeCompanyClose">
246
- <i class="el-icon-close el-icon"></i>
247
- 取 消
248
- </el-button>
249
- <el-button type="primary" @click="changeCompany" class="button-sty">
250
- <i class="el-icon-check el-icon"></i>
251
- 确 定
252
- </el-button>
253
- </span> -->
254
- </el-dialog>
255
-
256
- <!-- <infoIframeDialog v-if="showInfoIframeDialog" :visiable.sync="showInfoIframeDialog"
257
- :dataId="userInfo.id"></infoIframeDialog>-->
258
- <userInfo
259
- v-if="!isFormDev && showUserInfoDialog"
260
- :visiable.sync="showUserInfoDialog"
261
- :_dataId="userInfo.id"
262
- topValue="128px"
263
- @reload="userInfoReload"
264
- ></userInfo>
265
- <userFormInfo
266
- v-if="isFormDev && showUserInfoDialog"
267
- :visiable.sync="showUserInfoDialog"
268
- :_dataId="userInfo.id"
269
- topValue="128px"
270
- @reload="userInfoReload"
271
- ></userFormInfo>
272
- <onlineTalk></onlineTalk>
273
- <extractedCodeCreateDialog
274
- v-if="showExtractedCodeCreateDialog"
275
- :visiable.sync="showExtractedCodeCreateDialog"
276
- ></extractedCodeCreateDialog>
277
- <extractedCodeQueryDialog
278
- v-if="showExtractedCodeQueryDialog"
279
- :visiable.sync="showExtractedCodeQueryDialog"
280
- ></extractedCodeQueryDialog>
281
- <createCompanyDialog
282
- v-if="showCreateCompanyDialog"
283
- :visiable.sync="showCreateCompanyDialog"
284
- ></createCompanyDialog>
285
- </div>
286
- </template>
287
-
288
- <script>
289
- import { mapGetters } from "vuex";
290
- import variables from "@/styles/variables.scss";
291
- import userInfo from "@base/views/user/user/info.vue";
292
- import userFormInfo from "@base/views/user/user/form_info.vue";
293
- import onlineTalk from "@base/components/onlineTalk";
294
- import { getToken } from "@base/utils/auth";
295
- import indexUtil from "@base/utils/index.js";
296
- import langTool from "../langTool.vue";
297
- import { initPddLog } from "@base/utils/pddLog";
298
-
299
- import extractedCodeCreateDialog from "../extractedCode/createDialog.vue";
300
- import extractedCodeQueryDialog from "../extractedCode/queryDialog.vue";
301
- import { getBdFlag } from "@base/api/user";
302
- import createCompanyDialog from "@base/layout/components/createCompany/createCompanyDialog.vue";
303
-
304
- export default {
305
- props: {
306
- option: Object,
307
- isMenu: {
308
- type: Boolean,
309
- },
310
- },
311
- components: {
312
- userInfo,
313
- userFormInfo,
314
- onlineTalk,
315
- langTool,
316
- extractedCodeCreateDialog,
317
- extractedCodeQueryDialog,
318
- createCompanyDialog,
319
- },
320
- data() {
321
- return {
322
- direction: "bottom",
323
- defaultOpenedsArray: [],
324
- viewRouter: [],
325
- showMenuModal: false,
326
- menuheight: {
327
- height: "",
328
- },
329
- defaultProps: {
330
- label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
331
- children: [],
332
- isLeaf: "leaf",
333
- },
334
- filterText: null,
335
- showCompanyDialog: false,
336
- choose_company_info: "",
337
- userInfo: {},
338
- companyInfo: {},
339
- showUserInfoDialog: false,
340
- hoverStatus: false,
341
- nowNavID: "null",
342
- stopFlag: 0,
343
- showInfoIframeDialog: false,
344
- currentMenu: null,
345
- menuModules: [],
346
- firstMenuHeight: 0, // 第一个菜单的高度
347
- eveyMenuHeight: 48, // 每一个菜单的高度
348
- isFormDev: false,
349
-
350
- showExtractedCodeCreateDialog: false,
351
- showExtractedCodeQueryDialog: false,
352
- isDev: false,
353
- showCreateCompanyDialog: false,
354
- };
355
- },
356
- computed: {
357
- ...mapGetters([
358
- "permission_routes",
359
- "sidebar",
360
- "sidebarRouters",
361
- "isBdAdmin",
362
- "userFlag",
363
- ]),
364
- activeMenu() {
365
- const route = this.$route;
366
- const { meta, path } = route;
367
- // if set path, the sidebar will highlight the path you set
368
- if (meta.activeMenu) {
369
- return meta.activeMenu;
370
- }
371
- return path;
372
- },
373
- showLogo() {
374
- return this.$store.state.settings.sidebarLogo;
375
- },
376
- variables() {
377
- return variables;
378
- },
379
- /*isCollapse() {
380
- if (this.sidebar.opened) {
381
- this.direction = 'bottom';
382
- } else {
383
- this.direction = 'right-start';
384
- }
385
- return !this.sidebar.opened;
386
- }*/
387
- },
388
- watch: {
389
- filterText(val) {
390
- this.$refs.tree.filter(val);
391
- },
392
- },
393
- created() {
394
- indexUtil.initI18nMessage("menus");
395
- },
396
- mounted() {
397
- this.getUserInfo();
398
- setTimeout(() => {
399
- this.filterRoute();
400
- }, 100);
401
- this.countHeight();
402
- let query = this.$route.query;
403
- if (query && query.flag == 1) {
404
- this.showCompanyDialog = true;
405
- }
406
- initPddLog(); //初始化拼多多日志
407
- this.initIsFormDev();
408
- this.getBdEnv();
409
- },
410
- methods: {
411
- getMenuType(item) {
412
- if (item.children && item.children.length > 0) {
413
- return "el-submenu";
414
- } else {
415
- return "el-menu-item";
416
- }
417
- },
418
- getBdEnv() {
419
- getBdFlag({
420
- success: (res) => {
421
- this.isDev = res.objx == 1;
422
- },
423
- });
424
- },
425
- initIsFormDev() {
426
- let userFlag = this.userFlag;
427
- this.isFormDev = userFlag == 6 || userFlag == 7 || userFlag == 8;
428
- },
429
- getMenuFlag() {
430
- return !this.isBdAdmin;
431
- },
432
- getMenuName(item) {
433
- let locale = this.$i18n?.locale;
434
- let zhTitle = item.meta ? item.meta.title : "";
435
- let enTitle = item.meta ? item.meta.enTitle : "";
436
- let title;
437
- if (locale == "en") {
438
- title = enTitle || zhTitle;
439
- } else {
440
- title = zhTitle;
441
- }
442
- if (!enTitle || locale !== "en") {
443
- title = zhTitle;
444
- }
445
- if (this.$t1) {
446
- title = this.$t1(title);
447
- }
448
-
449
- return title;
450
- },
451
- jumpOutLink(route) {
452
- let path = route.url || route.path;
453
- if (route.type == 4 && path) {
454
- let params = this.getCustomReqUrlAndCleanUrl(path);
455
- let reqUrl = params.custom_req_url;
456
- if (reqUrl) {
457
- this.$http({
458
- url: reqUrl,
459
- method: `post`,
460
- data: { thirdUrl: params.newUrl },
461
- isLoading: true,
462
- success: (res) => {
463
- path = res.objx;
464
- window.open(path);
465
- },
466
- });
467
- } else {
468
- if (path.indexOf("token={token}") >= 0) {
469
- path = path.replace("token={token}", "token=" + getToken());
470
- }
471
- window.open(path);
472
- }
473
- }
474
- },
475
- getCustomReqUrlAndCleanUrl(url) {
476
- // 直接使用正则表达式匹配
477
- const match = url.match(/[?&]custom_req_url=([^&?#]+)/);
478
- if (match) {
479
- const customReqUrl = decodeURIComponent(match[1]);
480
- // 移除匹配到的参数部分
481
- const newUrl = url.replace(
482
- match[0],
483
- match[0].startsWith("?") ? "?" : ""
484
- );
485
-
486
- return {
487
- custom_req_url: customReqUrl,
488
- newUrl: newUrl.replace(/\?$/, "").replace(/\?&/, "?"),
489
- };
490
- }
491
-
492
- return {
493
- custom_req_url: "",
494
- newUrl: url,
495
- };
496
- },
497
- changeModules(row, cRow) {
498
- if (!row.route) return;
499
- localStorage.setItem("currentMenuId", row.id);
500
- let route = row.route ? "/" + row.route : "";
501
- sessionStorage.setItem("reUrl", cRow.path);
502
- sessionStorage.setItem("reCid", row.id);
503
- location.href = route + "/index.html/#/home";
504
-
505
- // location.reload();
506
- },
507
- filterRoute() {
508
- var oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
509
- var nRoute1s = [];
510
- oldRoutes.forEach((route1, index1) => {
511
- let nRoute2s = [];
512
- if (!route1.hidden) {
513
- route1.children.forEach((route2, index2) => {
514
- let nRoute3s = [];
515
- if (!route2.hidden) {
516
- route2.children.forEach((route3, index3) => {
517
- if (!route3.hidden) {
518
- nRoute3s.push(route3);
519
- }
520
- });
521
- }
522
- if (route2.type == 4 || route2.url || nRoute3s.length > 0) {
523
- route2.children = nRoute3s;
524
- nRoute2s.push(route2);
525
- }
526
- });
527
- }
528
- if (route1.type == 4 || route1.url || nRoute2s.length > 0) {
529
- route1.children = nRoute2s;
530
- nRoute1s.push(route1);
531
- }
532
- });
533
- this.viewRouter = nRoute1s || [];
534
- this.menuModules = nRoute1s || [];
535
-
536
- let reUrl = sessionStorage.getItem("reUrl");
537
- let reCid = sessionStorage.getItem("reCid");
538
- if (reUrl) {
539
- this.$nextTick(() => {
540
- this.$refs.seconMenus.open(reCid);
541
- });
542
- this.$router.push(reUrl);
543
- sessionStorage.removeItem("reUrl");
544
- sessionStorage.removeItem("reCid");
545
- }
546
- },
547
- filterRoute1() {
548
- var oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
549
- var nRoute1s = [];
550
- oldRoutes.forEach((route1, index1) => {
551
- let nRoute2s = [];
552
- if (!route1.hidden && route1.route) {
553
- route1.children.forEach((route2, index2) => {
554
- let nRoute3s = [];
555
- if (!route2.hidden) {
556
- route2.children.forEach((route3, index3) => {
557
- if (!route3.hidden) {
558
- nRoute3s.push(route3);
559
- }
560
- });
561
- }
562
- if (nRoute3s.length > 0) {
563
- route2.children = nRoute3s;
564
- nRoute2s.push(route2);
565
- }
566
- });
567
- }
568
- if (nRoute2s.length > 0) {
569
- route1.children = nRoute2s;
570
- nRoute1s.push(route1);
571
- }
572
- });
573
- let rows = nRoute1s;
574
- if (rows.length) {
575
- let currentMenu;
576
- if (nRoute1s.length) {
577
- var currentMenuId = localStorage.getItem("currentMenuId");
578
- if (currentMenuId) {
579
- currentMenu = nRoute1s.find((row) => row.id == currentMenuId);
580
- }
581
- if (!currentMenu) {
582
- currentMenu = nRoute1s[0];
583
- }
584
- this.viewRouter = currentMenu.children;
585
- }
586
- this.currentMenu = currentMenu;
587
- this.menuModules = rows || [];
588
-
589
- /*if (currentMenu) {
590
- if (currentMenu.route != WEB_PREFIX.substring(1, WEB_PREFIX.length)) {
591
- this.changeModules(currentMenu, 1);
592
- } else {
593
- localStorage.setItem('currentMenuId', currentMenu.id);
594
- }
595
- } else {
596
- localStorage.removeItem('currentMenuId');
597
- }*/
598
- }
599
- },
600
- rourteTo(route) {
601
- let path = route.url || route.path;
602
- if (!path) {
603
- return;
604
- }
605
- this.showMenuModal = true;
606
- setTimeout(() => {
607
- this.showMenuModal = false;
608
- }, 200);
609
- try {
610
- if (route.linkType == 4) {
611
- this.jumpOutLink(route);
612
- } else if (route.linkType == 3) {
613
- this.$router.push({
614
- path: path,
615
- query: { url: route.outLink, route: route.route },
616
- });
617
- } else {
618
- // 通用打开:可重复时附加唯一标识生成独立标签页
619
- this.$openView(path, route);
620
- }
621
- } catch (e) {
622
- console.error(e);
623
- }
624
- },
625
- logout() {
626
- this.$store.dispatch("user/logout2").then((res) => {
627
- this.$router.push(`/login?redirect=${this.$route.fullPath}`);
628
- });
629
- },
630
- toggleSideBar() {
631
- this.$store.dispatch("app/toggleSideBar");
632
- },
633
- countHeight() {
634
- var h =
635
- this.$refs.hamhurger.offsetHeight +
636
- this.$refs.fase.offsetHeight +
637
- this.$refs.business.offsetHeight;
638
- this.menuheight.height = window.innerHeight - h + "px";
639
- },
640
- handleNodeClick(data, node, v) {
641
- if (!data.hasChild) {
642
- this.choose_company_info = data;
643
- this.changeCompany();
644
- } else {
645
- this.choose_company_info = {};
646
- }
647
- },
648
- // 异步树叶子节点懒加载逻辑
649
- loadNode(node, resolve) {
650
- let companyCode =
651
- node && node.data && node.data.companyCode
652
- ? node.data.companyCode || ""
653
- : "";
654
- let url = !companyCode
655
- ? USER_PREFIX + "/user_company_info/getAllList"
656
- : USER_PREFIX + "/user_company_info/getChildren";
657
-
658
- this.$http({
659
- url: url,
660
- method: "post",
661
- data: {
662
- parentCompanyCode: companyCode,
663
- },
664
- success: (res) => {
665
- let datas = res.objx || [];
666
- let parentLabel = companyCode ? node.label : null;
667
- datas.forEach((item) => {
668
- item.leaf = !item.hasChild;
669
- let label = this.$t1(item.companyName);
670
- /*if(companyCode){
671
- label = label + '('+companyTypeMap[item.companyType]+')'
672
- }*/
673
- item.label = label;
674
- item.parentLabel = parentLabel;
675
- });
676
-
677
- if (node.level === 0) {
678
- if (datas.length > 0 && datas[0].hasChild) {
679
- this.$nextTick(() => {
680
- let nodedata = node.childNodes[0];
681
- nodedata.expanded = true;
682
- nodedata.loadData();
683
- });
684
- }
685
- }
686
- resolve(datas);
687
- },
688
- });
689
- },
690
- filterNode(value, data) {
691
- if (!value) return true;
692
- let flag1 = data.label.indexOf(value) !== -1;
693
- let flag2 = data.parentLabel && data.parentLabel.indexOf(value) !== -1;
694
- return flag1 || flag2;
695
- },
696
- openCompanyDialog() {
697
- this.filterText = null;
698
- this.showCompanyDialog = true;
699
- },
700
- getWebPrefix(callback) {
701
- this.$http({
702
- url: USER_PREFIX + "/auth/getWebPrefix",
703
- method: `post`,
704
- data: {},
705
- isLoading: true,
706
- success: (res) => {
707
- let webPrefix = res.objx;
708
- callback && callback(webPrefix);
709
- },
710
- });
711
- },
712
- changeCompany() {
713
- let row = this.choose_company_info;
714
- let query = this.$route.query;
715
- let flag = query && query.flag == 1 ? 1 : null;
716
- this.showCompanyDialog = false;
717
- if (row && row.companyCode) {
718
- this.$baseLoading({ target: document.body, fullscreen: true });
719
- this.$http({
720
- url: USER_PREFIX + "/auth/switchCompany",
721
- method: "post",
722
- data: { stringOne: row.companyCode },
723
- isLoading: true,
724
- success: (res) => {
725
- this.getWebPrefix((prefix) => {
726
- let webPrefix = prefix ? "/" + prefix : window.MAIN_WEB_PREFIX;
727
- sessionStorage.removeItem("out-token");
728
- this.$store.dispatch("user/changeCompanyInfo", row);
729
- this.$store.dispatch("tagsView/delAllViews");
730
- window.location.href = webPrefix + "/index.html";
731
- });
732
- },
733
- });
734
- } else {
735
- if (flag == 1) {
736
- this.$router.push({
737
- path: "/",
738
- });
739
- }
740
- }
741
- },
742
- changeCompanyClose() {
743
- let query = this.$route.query;
744
- let flag = query && query.flag == 1 ? 1 : null;
745
- if (flag == 1) {
746
- this.$router.push({
747
- path: "/",
748
- });
749
- }
750
- this.showCompanyDialog = false;
751
- },
752
- getUserInfo() {
753
- this.$http({
754
- url: USER_PREFIX + "/user/currentUser",
755
- method: "post",
756
- success: (res) => {
757
- let userInfo = res.objx;
758
- this.headPhotoUrl = userInfo.headPhotoUrl
759
- ? userInfo.headPhotoUrl
760
- : (require("@/resources/images/default-header.png").default || require("@/resources/images/default-header.png"));
761
- this.userInfo = userInfo;
762
- },
763
- });
764
-
765
- this.$http({
766
- url: USER_PREFIX + "/company_info/getCurrent",
767
- method: `post`,
768
- success: (res) => {
769
- this.companyInfo = res.objx || {};
770
- },
771
- });
772
- },
773
- openUserInfo() {
774
- this.showUserInfoDialog = true;
775
- // this.showInfoIframeDialog = true;
776
- },
777
- userInfoReload() {
778
- this.showUserInfoDialog = true;
779
- },
780
- showNav(route, event) {
781
- if (!this.isMenu) return;
782
- let id = route && route.id ? route.id : null;
783
- if (id != null) {
784
- if (!route.children || !route.children.length) {
785
- return;
786
- }
787
- this.stopFlag = 1;
788
- this.nowNavID = id;
789
- this.$nextTick(() => {
790
- var wh = window.innerHeight;
791
- let dom = event.target;
792
- let domAttr = dom.getBoundingClientRect();
793
- // var sh1 = dom.offsetTop;
794
- var sh1 = domAttr.top + 5;
795
- let $snav = this.$refs["seconMenus" + id][0];
796
- let snavAttr = $snav.getBoundingClientRect();
797
-
798
- // var sh2 = $snav.outerHeight;
799
- var sh2 = snavAttr.height;
800
- var sh = wh - (sh1 + sh2);
801
-
802
- var hd = 20;
803
- var xhd = sh - hd; //移动距离+固定值
804
- if (sh >= 0) {
805
- $snav.style["margin-top"] = sh1 + "px";
806
- } else if (sh < 0) {
807
- let bd = sh1 + sh;
808
-
809
- $snav.style["margin-top"] = bd + "px";
810
- $snav.querySelector(".ico-arrow").style["margin-top"] =
811
- sh1 - bd + "px";
812
- }
813
- });
814
- } else {
815
- this.stopFlag = 0;
816
- setTimeout(() => {
817
- if (this.stopFlag == 0) {
818
- this.nowNavID = id;
819
- }
820
- }, 200);
821
- }
822
- },
823
- jumpTo(row, firstRow) {
824
- let route = firstRow.route ? "/" + firstRow.route : "";
825
- if (route == WEB_PREFIX) {
826
- this.$router.push({
827
- path: row.path,
828
- });
829
- } else {
830
- this.changeModules(firstRow, row);
831
- }
832
- },
833
- toDownMove() {
834
- let containter = document
835
- .getElementById("menuUl")
836
- .querySelector(".scrollbar-wrapper");
837
- let menuscrollTop = containter.scrollTop;
838
- let scrollHeight = containter.scrollHeight;
839
- let val = menuscrollTop + this.eveyMenuHeight;
840
- if (val < scrollHeight) {
841
- containter.scrollTop = val;
842
- } else {
843
- containter.scrollTop = scrollHeight;
844
- }
845
- },
846
- toUpMove() {
847
- let containter = document
848
- .getElementById("menuUl")
849
- .querySelector(".scrollbar-wrapper");
850
- let menuscrollTop = containter.scrollTop;
851
- let val = menuscrollTop - this.eveyMenuHeight;
852
- if (val > 0) {
853
- containter.scrollTop = val;
854
- } else {
855
- containter.scrollTop = 0;
856
- }
857
- },
858
- getMenuClass(menu, flag) {
859
- let res = "";
860
- if (menu.menuImg) {
861
- res = "iconfont " + menu.menuImg;
862
- } else if (flag == 1) {
863
- res = "iconfont icon-jinggao"; //一级默认图标
864
- } else if (flag == 2) {
865
- res = "iconfont icon-circle"; //二级默认图标
866
- } else if (flag == 3) {
867
- res = "iconfont icon-thirdMemu"; //三级级默认图标
868
- }
869
-
870
- if (flag == 2) {
871
- if (menu.id == this.nowNavID) {
872
- res += " on";
873
- }
874
- }
875
- return res;
876
- },
877
- openCreateCompanyDialog() {
878
- this.showCreateCompanyDialog = true;
879
- },
880
- confirmCreateCompanyDialog() {
881
- this.showCreateCompanyDialog = false;
882
- },
883
- },
884
- };
885
- </script>
886
- <style lang="scss">
887
- @import "~@/styles/variables.scss";
888
-
889
- .hamburger-box {
890
- background-color: #0000004d;
891
- height: 42px;
892
- /* line-height: 30px; */
893
- text-align: center;
894
- /* box-shadow: 0 2px 6px rgb(0 0 0 / 10%); */
895
- position: relative;
896
- z-index: 2;
897
- overflow: hidden;
898
- font-size: 12px;
899
- color: rgba(255, 255, 255, 0.65);
900
-
901
- > div {
902
- color: #fff;
903
- font-size: 13px;
904
- margin-bottom: 4px;
905
- cursor: pointer;
906
- height: 36px;
907
- border-radius: 7px;
908
- margin: 6px 10px 6px 8px;
909
- overflow: hidden;
910
- background: #2a6494;
911
- }
912
-
913
- p {
914
- color: #fff;
915
- font-size: 13px;
916
- margin-bottom: 4px;
917
- cursor: pointer;
918
- /* border: solid 1px #ffffff61; */
919
- display: block;
920
- line-height: 27px;
921
- /* width: 88%; */
922
- margin-top: 6px;
923
- border-radius: 7px;
924
- margin: 6px 10px 6px 8px;
925
- background: #2a6494;
926
-
927
- i {
928
- font-size: 14px;
929
- vertical-align: middle;
930
- margin: 0 4px 0 6px;
931
- height: 36px;
932
- line-height: 36px;
933
- width: 21px;
934
- }
935
-
936
- span {
937
- width: 94px;
938
- display: table-cell;
939
- height: 32px;
940
- word-break: break-word;
941
- line-height: 16px;
942
- overflow: hidden;
943
- vertical-align: middle;
944
- white-space: nowrap;
945
- }
946
-
947
- &.name {
948
- display: table-row;
949
- margin: 0;
950
- }
951
- }
952
- }
953
-
954
- .business-name {
955
- height: 47px;
956
- color: #ffffffb8;
957
- background: #0000004d;
958
- /* padding-top: 12px; */
959
- font-size: 12px;
960
- /* padding-left: 5px; */
961
- display: table-cell;
962
- vertical-align: middle;
963
- width: 140px;
964
- padding: 6px 10px;
965
- text-align: center;
966
-
967
- p {
968
- margin: 0;
969
- display: -webkit-box;
970
- overflow: hidden;
971
- text-overflow: ellipsis;
972
- -webkit-line-clamp: 2;
973
- -webkit-box-orient: vertical;
974
- }
975
- }
976
-
977
- .fase-box {
978
- color: #fff;
979
- /* border-bottom: solid 1px rgba(255, 255, 255, 0.12); */
980
- border-top: solid 1px rgba(255, 255, 255, 0.12);
981
- background: #225076;
982
- padding: 4px 0 8px;
983
- width: 100%;
984
- z-index: 999;
985
- position: relative;
986
- /* display: flex;*/
987
- //text-align: left !important;
988
- // &:hover {
989
- // color: $baseColor;
990
- // background-color: #fbfdfe;
991
- // .fase-list {
992
- // display: block;
993
- // }
994
- // }
995
- .item {
996
- flex: 1;
997
- text-align: center;
998
- font-size: 16px;
999
- height: 40px;
1000
- line-height: 40px;
1001
- cursor: pointer;
1002
- display: inline-block;
1003
- min-width: 30px;
1004
- }
1005
-
1006
- .fase-list {
1007
- position: absolute;
1008
- left: 100%;
1009
- color: $baseColor;
1010
- background-color: #fbfdfe;
1011
- border: solid 1px $baseColor;
1012
- border-left: none;
1013
- top: -0.5px;
1014
- padding: 10px 0 10px 24px;
1015
- height: 43px;
1016
- width: 413px;
1017
- display: none;
1018
-
1019
- .l-item {
1020
- display: inline-block;
1021
- font-size: 12px;
1022
- margin-right: 36px;
1023
- line-height: 20px;
1024
- cursor: pointer;
1025
-
1026
- i {
1027
- vertical-align: middle;
1028
- margin-right: 4px;
1029
- font-size: 15px;
1030
- margin-bottom: 2px;
1031
- }
1032
-
1033
- &:hover {
1034
- border-bottom: solid 1px $baseColor;
1035
- }
1036
- }
1037
- }
1038
- }
1039
-
1040
- .openSidebar .fase-box {
1041
- text-align: center;
1042
- //padding: 0;
1043
- }
1044
-
1045
- #app .sidebar-container {
1046
- overflow: visible;
1047
- z-index: 1003;
1048
-
1049
- &.hover {
1050
- z-index: 1003;
1051
- }
1052
-
1053
- &.hover1 .fase-box {
1054
- width: 138px;
1055
- color: $baseColor;
1056
- background-color: #fbfdfe;
1057
- border-color: $baseColor;
1058
- }
1059
-
1060
- .el-menu.menu-box {
1061
- height: calc(100vh - 173px);
1062
- font-size: 13px;
1063
- z-index: -1;
1064
- position: relative;
1065
- background-color: rgba(0, 0, 0, 0.2);
1066
- word-break: break-word;
1067
- .el-scrollbar__view > {
1068
- .el-menu-item {
1069
- padding: 0 11px !important;
1070
- span {
1071
- font-size: 14px;
1072
- }
1073
- }
1074
- .el-submenu > .el-submenu__title {
1075
- padding: 0 11px !important;
1076
- span {
1077
- font-size: 14px;
1078
- }
1079
- ~ .el-menu {
1080
- padding: 5px 0;
1081
- display: grid;
1082
- > .el-menu-item {
1083
- span {
1084
- line-height: 1.4;
1085
- height: 26px;
1086
- }
1087
- }
1088
- .el-submenu.is-opened .el-submenu__title {
1089
- background-color: #fff;
1090
- opacity: 1;
1091
- span {
1092
- color: $baseColor;
1093
- }
1094
- i.iconfont {
1095
- color: $baseColor;
1096
- }
1097
- }
1098
- }
1099
- }
1100
- }
1101
- .el-submenu__title,
1102
- .el-menu-item {
1103
- padding: 0 11px;
1104
- height: 48px;
1105
- line-height: 48px;
1106
- overflow: hidden;
1107
- &:hover,
1108
- &.is-active {
1109
- background-color: rgba(0, 0, 0, 0.29);
1110
- }
1111
- i {
1112
- color: #fff;
1113
- font-size: 13px;
1114
- margin-right: 0;
1115
- width: 18px;
1116
-
1117
- &.iconfont {
1118
- margin-right: 5px;
1119
- font-size: 18px;
1120
- float: left;
1121
- }
1122
-
1123
- &.el-submenu__icon-arrow {
1124
- right: 3px;
1125
- text-align: center;
1126
- font-size: 12px;
1127
- margin-top: -5px;
1128
- display: none;
1129
- }
1130
- }
1131
-
1132
- > span {
1133
- height: 48px;
1134
- display: table-cell;
1135
- width: 114px;
1136
- vertical-align: middle;
1137
- font-size: 13px;
1138
- white-space: normal;
1139
- line-height: 16px;
1140
- }
1141
- }
1142
-
1143
- .el-submenu {
1144
- overflow: hidden; //有点电脑分辨率问题
1145
-
1146
- &.is-opened .el-submenu__title {
1147
- //background-color: rgba(27, 66, 97) !important;
1148
- }
1149
- .el-submenu .el-menu {
1150
- display: none;
1151
- }
1152
- }
1153
-
1154
- .el-submenu {
1155
- &.is-opened {
1156
- > .el-submenu__title {
1157
- background-color: rgba(0, 0, 0, 0.29);
1158
- }
1159
- }
1160
- .el-menu {
1161
- background: rgba(0, 0, 0, 0.35);
1162
- box-shadow: 0px -5px 8px #00000014 inset;
1163
- //padding:4px 0;
1164
- .el-submenu__title {
1165
- height: auto;
1166
- line-height: 1.4;
1167
- font-size: 12px;
1168
- opacity: 0.8;
1169
- margin: 5px 0 5px 14px;
1170
- padding: 7px 2px 7px 33px !important;
1171
- border-radius: 8px;
1172
- text-align: left;
1173
- min-width: 81px;
1174
- white-space: normal;
1175
- margin-right: 10px;
1176
- word-break: break-word;
1177
- i.iconfont {
1178
- position: absolute;
1179
- top: 50%;
1180
- height: 20px;
1181
- margin-top: -10px;
1182
- line-height: 20px;
1183
- left: 7px;
1184
- font-size: 18px;
1185
- }
1186
-
1187
- [class^="el-icon-"] {
1188
- font-size: 12px;
1189
- color: #fff;
1190
- position: absolute;
1191
- right: 2px;
1192
- top: 50%;
1193
- margin-top: -5px;
1194
- width: 14px;
1195
- zoom: 0.8;
1196
- display: none;
1197
- }
1198
- span {
1199
- height: auto;
1200
- text-align: left !important;
1201
- }
1202
- &:hover,
1203
- &.on {
1204
- opacity: 1;
1205
- background-color: #fbfdfe !important;
1206
- color: $baseColor !important;
1207
- i.iconfont {
1208
- color: $baseColor;
1209
- }
1210
- .el-icon-arrow-right {
1211
- color: $baseColor;
1212
- }
1213
- }
1214
- }
1215
- }
1216
-
1217
- .el-menu-item {
1218
- height: auto;
1219
- line-height: 1.4;
1220
- padding-left: 33px !important;
1221
- font-size: 12px;
1222
- opacity: 0.8;
1223
- margin: 5px 0 5px 14px;
1224
- padding: 2px 2px 2px 0px;
1225
- border-radius: 8px;
1226
- text-align: left;
1227
- min-width: 81px !important;
1228
- white-space: normal;
1229
- margin-right: 10px;
1230
- word-break: break-word;
1231
-
1232
- i.iconfont {
1233
- position: absolute;
1234
- top: 50%;
1235
- height: 20px;
1236
- margin-top: -10px;
1237
- line-height: 20px;
1238
- left: 7px;
1239
- font-size: 18px;
1240
- color: #d0d6db;
1241
- }
1242
-
1243
- [class^="el-icon-"] {
1244
- font-size: 12px;
1245
- color: #fff;
1246
- position: absolute;
1247
- right: 2px;
1248
- top: 50%;
1249
- margin-top: -5px;
1250
- width: 14px;
1251
- zoom: 0.8;
1252
- display: none;
1253
- }
1254
-
1255
- &:hover,
1256
- &.on {
1257
- opacity: 1;
1258
- background-color: #fbfdfe !important;
1259
- color: $baseColor !important;
1260
-
1261
- .el-icon-arrow-right,
1262
- i.iconfont {
1263
- color: $baseColor;
1264
- }
1265
- }
1266
- }
1267
- }
1268
-
1269
- &.lang-zh {
1270
- font-size: 14px;
1271
-
1272
- .el-submenu {
1273
- .el-submenu__title {
1274
- > span {
1275
- text-align: center;
1276
- }
1277
-
1278
- i.iconfont {
1279
- margin-right: 2px;
1280
- }
1281
- }
1282
-
1283
- .el-menu-item {
1284
- font-size: 13px;
1285
- }
1286
- }
1287
- }
1288
- }
1289
- }
1290
-
1291
- .main-container {
1292
- z-index: 1002;
1293
- }
1294
-
1295
- .menu-btn {
1296
- background-color: #0000001c;
1297
- height: 30px;
1298
- line-height: 30px;
1299
- text-align: center;
1300
- box-shadow: 0 -10px 6px rgb(0 0 0 / 10%);
1301
- display: flex;
1302
- color: #fff;
1303
- font-size: 16px;
1304
-
1305
- i {
1306
- display: inline-block;
1307
- flex: 1;
1308
- line-height: 30px;
1309
- cursor: pointer;
1310
- border-right: solid 1px rgba(0, 0, 0, 0.2);
1311
-
1312
- &:last-child {
1313
- border-right: none;
1314
- }
1315
-
1316
- &:hover {
1317
- background-color: rgba(255, 255, 255, 0.12);
1318
- }
1319
- }
1320
- }
1321
-
1322
- /*.menu-box {
1323
- background-color: #0000002e !important;
1324
- font-size: 14px;
1325
- z-index: -1;
1326
- position: relative;
1327
- &.hover .el-scrollbar {
1328
- width: 1000px;
1329
- }
1330
- .el-scrollbar {
1331
- .el-scrollbar__view {
1332
- padding-top: 1px;
1333
- }
1334
- .el-scrollbar__bar.is-vertical {
1335
- left: 104px;
1336
- }
1337
- }
1338
- .first-item {
1339
- position: relative;
1340
- width: 104px;
1341
- &:nth-child(-n + 6) .second-list {
1342
- bottom: inherit !important;
1343
- top: -40.5px !important;
1344
- }
1345
- &:nth-child(1) .second-list {
1346
- top: 0 !important;
1347
- }
1348
- &:nth-last-child(-n + 6) .second-list {
1349
- bottom: -1%;
1350
- top: inherit;
1351
- }
1352
- .f-name {
1353
- height: 55px;
1354
- line-height: 55px;
1355
- padding-left: 9px;
1356
- color: #fff;
1357
- cursor: pointer;
1358
- position: relative;
1359
- padding-right: 6px;
1360
- -webkit-transition: all 0.2s ease-in;
1361
- -moz-transition: all 0.2s ease-in;
1362
- -o-transition: all 0.2s ease-in;
1363
- transition: all 0.2s ease-in;
1364
- width: 104px;
1365
- i.el-icon-arrow-right {
1366
- position: absolute;
1367
- right: 3px;
1368
- top: 21.5px;
1369
- width: 14px;
1370
- height: 14px;
1371
- }
1372
- .el-icon-s-opportunity {
1373
- opacity: 0.92;
1374
- font-size: 13px;
1375
- vertical-align: middle;
1376
- margin-right: 2px;
1377
- }
1378
- span{display: inline-block;width: calc(100% - 20px);vertical-align: middle;line-height: 1.2;}
1379
- }
1380
-
1381
- &:hover,
1382
- &.current {
1383
- .f-name {
1384
- background-color: #fbfdfe;
1385
- color: $baseColor;
1386
- }
1387
- .second-list {
1388
- display: block;
1389
- }
1390
- }
1391
- }
1392
- }
1393
-
1394
-
1395
- */
1396
- .second-list {
1397
- display: none;
1398
- position: absolute;
1399
- left: $sideBarWidth;
1400
- padding-left: 2px;
1401
- top: 0.5px;
1402
- // &:before {
1403
- // content: "";
1404
- // top: 22px;
1405
- // bottom: 22px;
1406
- // background-color: $baseColor;
1407
- // width: 2px;
1408
- // position: absolute;
1409
- // left: 24px;
1410
- // }
1411
- > div {
1412
- background: #fbfdfe;
1413
- border: solid 1px $baseColor;
1414
- top: -0.5px;
1415
- padding: 24px 0;
1416
- border-radius: 8px;
1417
- margin-left: 9px;
1418
- max-height: calc(84vh);
1419
- overflow-y: auto;
1420
- overflow-x: hidden;
1421
- width: 458px;
1422
- }
1423
-
1424
- .ico-arrow {
1425
- border-top: solid 7px transparent;
1426
- border-bottom: solid 7px transparent;
1427
- border-right: solid 7px $baseColor;
1428
- position: absolute;
1429
- left: 2px;
1430
- top: 8px;
1431
- }
1432
-
1433
- &.on {
1434
- display: block;
1435
- }
1436
-
1437
- .tit {
1438
- width: auto;
1439
- /* text-align: center; */
1440
- /* background: #22507614; */
1441
- color: $baseColor;
1442
- /* border: dashed 1px #1d4667; */
1443
- padding: 0 0 10px;
1444
- /* border-radius: 6px; */
1445
- /* margin: 5px auto; */
1446
- margin: 0 22px;
1447
- display: block;
1448
- border-bottom: solid 1px #eee;
1449
-
1450
- i,
1451
- span {
1452
- opacity: 1;
1453
- vertical-align: middle;
1454
- margin-right: 7px;
1455
- font-size: 18px;
1456
- }
1457
-
1458
- span {
1459
- font-size: 14px;
1460
- }
1461
- }
1462
-
1463
- dl {
1464
- padding: 8px 16px 3px 24px;
1465
- margin-top: 0;
1466
- margin-bottom: 0;
1467
- display: inline-block;
1468
- width: 50%;
1469
- position: relative;
1470
- word-break: break-all;
1471
-
1472
- &:after {
1473
- content: "";
1474
- width: 1px;
1475
- height: 14px;
1476
- background: #e4e4e4;
1477
- display: inline-block;
1478
- position: absolute;
1479
- right: -5px;
1480
- top: 50%;
1481
- margin-top: -3px;
1482
- }
1483
-
1484
- .s-name {
1485
- color: $baseColor;
1486
- display: inline-block;
1487
- width: 190px;
1488
- font-size: 14px;
1489
- vertical-align: top;
1490
- margin-top: 11px;
1491
- text-align: right;
1492
-
1493
- i {
1494
- margin-left: 5px;
1495
-
1496
- &.icon {
1497
- font-size: 13px;
1498
- opacity: 0.92;
1499
- margin-left: 2px;
1500
- margin-right: 4px;
1501
- }
1502
- }
1503
- }
1504
-
1505
- .item {
1506
- position: relative;
1507
- border: dashed 1px #fff;
1508
- border-radius: 6px;
1509
- display: block;
1510
- padding: 6px 8px 6px 27px;
1511
- cursor: pointer;
1512
-
1513
- &:hover {
1514
- border-color: $baseColor;
1515
- color: $baseColor;
1516
-
1517
- i,
1518
- a {
1519
- color: $baseColor;
1520
- }
1521
- }
1522
-
1523
- // &:after {
1524
- // content: "";
1525
- // width: 1px;
1526
- // height: 12px;
1527
- // background: #dcdcdc;
1528
- // position: absolute;
1529
- // right: -25px;
1530
- // top: 2px
1531
- // }
1532
-
1533
- i {
1534
- opacity: 0.8;
1535
- margin-right: 8px;
1536
- vertical-align: middle;
1537
- position: absolute;
1538
- left: 4px;
1539
- top: 50%;
1540
- margin-top: -11px;
1541
- height: 22px;
1542
- line-height: 22px;
1543
- font-size: 16px;
1544
- }
1545
-
1546
- a {
1547
- color: rgba(0, 0, 0, 0.82);
1548
- display: inline-block;
1549
- font-size: 13px;
1550
- position: relative;
1551
- overflow: initial !important;
1552
- -webkit-transition: all 0.2s ease-in;
1553
- -moz-transition: all 0.2s ease-in;
1554
- -o-transition: all 0.2s ease-in;
1555
- transition: all 0.2s ease-in;
1556
- width: auto !important;
1557
- vertical-align: middle;
1558
- word-break: break-word;
1559
-
1560
- &:hover {
1561
- color: $baseColor;
1562
-
1563
- // &:after {
1564
- // content: '';
1565
- // position: absolute;
1566
- // bottom: -4px;
1567
- // left: 0;
1568
- // right: 0;
1569
- // border-bottom: solid 1px $baseColor;
1570
- // }
1571
- }
1572
- }
1573
- }
1574
-
1575
- &:last-child {
1576
- .list-box {
1577
- border-bottom: none;
1578
- }
1579
- }
1580
- }
1581
- }
1582
- // .el-submenu .el-menu {
1583
- // height: auto !important;
1584
- // }
1585
- .el-menu--vertical {
1586
- > .el-menu--popup {
1587
- overflow: auto; //不用atuo 超出不出滚动条
1588
- .el-submenu__title,
1589
- .el-menu-item {
1590
- height: auto !important;
1591
- line-height: 1.4 !important;
1592
- padding: 8px 0;
1593
- text-align: left;
1594
- white-space: normal;
1595
- word-break: break-word;
1596
- background: none;
1597
- i.iconfont {
1598
- color: #fff;
1599
- margin-right: 8px;
1600
- }
1601
- }
1602
- }
1603
- .el-submenu {
1604
- .el-submenu__title {
1605
- .el-submenu__icon-arrow {
1606
- display: none;
1607
- }
1608
- }
1609
- &:hover {
1610
- .el-submenu__title {
1611
- background-color: rgba(0, 0, 0, 0.29) !important;
1612
- i.iconfont {
1613
- color: $baseColor;
1614
- }
1615
- }
1616
- }
1617
-
1618
- &.is-opened {
1619
- .el-submenu__title {
1620
- background-color: rgba(0, 0, 0, 0.29) !important;
1621
- i.iconfont {
1622
- color: $baseColor;
1623
- }
1624
- }
1625
- }
1626
- }
1627
- .el-menu-item {
1628
- &:hover {
1629
- background-color: rgba(0, 0, 0, 0.29) !important;
1630
- i.iconfont {
1631
- color: $baseColor;
1632
- }
1633
- }
1634
-
1635
- &.is-opened {
1636
- background-color: rgba(0, 0, 0, 0.29) !important;
1637
- i.iconfont {
1638
- color: $baseColor;
1639
- }
1640
- }
1641
- }
1642
- // .el-menu-item{
1643
- // &:hover{
1644
- // background:#FFF !important;opacity:1;
1645
- // span{color:$baseColor}
1646
- // i.iconfont{color:$baseColor}
1647
- // }
1648
- // &.is-opened{
1649
- // background:#FFF;opacity:1;
1650
- // span{color:$baseColor}
1651
- // i.iconfont{color:$baseColor}
1652
- // }
1653
- // }
1654
- }
1655
- </style>
1
+ <template>
2
+ <div :class="{ 'has-logo': showLogo, telescopMenu: !isMenu }">
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">
9
+ <i class="iconfont icon-ziyuan"></i
10
+ ><span>{{ userInfo.nickName }}</span>
11
+ </p>
12
+ </div>
13
+ </div>
14
+ <div class="business-name" ref="business">
15
+ <el-tooltip
16
+ :enterable="false"
17
+ effect="dark"
18
+ :content="companyInfo.companyName"
19
+ :placement="direction"
20
+ >
21
+ <p v-show="getMenuFlag()">{{ companyInfo.companyName }}</p>
22
+ </el-tooltip>
23
+ </div>
24
+ <div
25
+ class="fase-box"
26
+ ref="fase"
27
+ @mouseleave="$emit('selfClose')"
28
+ @mouseenter="$emit('selfEnter')"
29
+ >
30
+ <langTool v-if="getMenuFlag()"></langTool>
31
+ <div class="item" @click="openCompanyDialog" v-if="getMenuFlag()">
32
+ <el-tooltip
33
+ :enterable="false"
34
+ effect="dark"
35
+ :content="$t1('切换组织')"
36
+ :placement="direction"
37
+ >
38
+ <i class="el-icon-set-up" />
39
+ </el-tooltip>
40
+ </div>
41
+ <div class="item" v-if="getMenuFlag()">
42
+ <el-tooltip
43
+ :enterable="false"
44
+ effect="dark"
45
+ :content="$t1('流程待办')"
46
+ :placement="direction"
47
+ >
48
+ <i
49
+ class="iconfont icon-liuchengdaiban"
50
+ @click="$router.push('/basic/wf/wf_manage/list')"
51
+ />
52
+ </el-tooltip>
53
+ </div>
54
+ <div class="item" v-if="isDev && isBdAdmin">
55
+ <el-tooltip
56
+ :enterable="false"
57
+ effect="dark"
58
+ :content="$t1('获取提取码')"
59
+ :placement="direction"
60
+ >
61
+ <i
62
+ class="el-icon-setting"
63
+ @click="showExtractedCodeCreateDialog = true"
64
+ />
65
+ </el-tooltip>
66
+ </div>
67
+ <div class="item" v-if="isBdAdmin">
68
+ <el-tooltip
69
+ :enterable="false"
70
+ effect="dark"
71
+ :content="$t1('查看提取码')"
72
+ :placement="direction"
73
+ >
74
+ <i
75
+ class="el-icon-tickets"
76
+ @click="showExtractedCodeQueryDialog = true"
77
+ />
78
+ </el-tooltip>
79
+ </div>
80
+
81
+ <div class="item" @click="logout()">
82
+ <el-tooltip
83
+ :enterable="false"
84
+ effect="dark"
85
+ :content="$t1('退出')"
86
+ :placement="direction"
87
+ >
88
+ <i class="el-icon-switch-button" />
89
+ </el-tooltip>
90
+ </div>
91
+ </div>
92
+ <template v-for="router1 in viewRouter">
93
+ <template v-for="router2 in router1.children">
94
+ <div
95
+ class="second-list"
96
+ :key="router1.id + 't' + router2.id"
97
+ :class="{ on: router2.id == nowNavID }"
98
+ @mouseenter="stopFlag = 1"
99
+ @mouseleave="showNav()"
100
+ v-show="router2.id == nowNavID"
101
+ :ref="'seconMenus' + router2.id"
102
+ >
103
+ <i class="ico-arrow"></i>
104
+ <div>
105
+ <div class="tit">
106
+ <i :class="getMenuClass(router2, 2)"></i
107
+ ><span>{{ getMenuName(router2) }}</span>
108
+ </div>
109
+ <dl
110
+ v-for="(router3, index3) in router2.children"
111
+ :key="'router3' + index3"
112
+ >
113
+ <div
114
+ class="item"
115
+ v-if="!router3.hidden"
116
+ @click="rourteTo(router3, router1)"
117
+ >
118
+ <!--<i class="el-icon-caret-right"></i>-->
119
+ <i :class="getMenuClass(router3, 3)"></i>
120
+ <a>{{ getMenuName(router3) }}</a>
121
+ </div>
122
+ </dl>
123
+ </div>
124
+ </div>
125
+ </template>
126
+ </template>
127
+ <el-menu
128
+ class="menu-box"
129
+ :class="{ 'lang-zh': $i18n.locale == 'zh' }"
130
+ text-color="#fff"
131
+ active-text-color="#fff"
132
+ :unique-opened="true"
133
+ @mouseleave="showNav()"
134
+ ref="seconMenus"
135
+ :collapse="!isMenu"
136
+ >
137
+ <el-scrollbar wrap-class="scrollbar-wrapper" id="menuUl">
138
+ <component
139
+ v-for="menuModule in menuModules"
140
+ :is="getMenuType(menuModule)"
141
+ :index="'' + menuModule.id"
142
+ :key="'menuModule' + menuModule.id"
143
+ @click.native="rourteTo(menuModule)"
144
+ >
145
+ <i
146
+ :class="getMenuClass(menuModule, 1)"
147
+ v-if="menuModule.children.length <= 0"
148
+ ></i>
149
+ <template slot="title">
150
+ <i
151
+ :class="getMenuClass(menuModule, 1)"
152
+ v-if="menuModule.children.length > 0"
153
+ ></i>
154
+ <span>{{ getMenuName(menuModule) }}</span>
155
+ </template>
156
+ <component
157
+ v-for="(router2, index1) in menuModule.children"
158
+ :is="getMenuType(router2)"
159
+ :key="index1"
160
+ :index="'' + router2.id"
161
+ @mouseenter.native="showNav(router2, $event)"
162
+ @mouseleave.native="showNav()"
163
+ @click="rourteTo(router2)"
164
+ >
165
+ <template slot="title">
166
+ <i :class="getMenuClass(router2, 2)"></i>
167
+ <span>{{ getMenuName(router2) }}</span>
168
+ </template>
169
+ <el-menu-item
170
+ v-for="(router3, index3) in router2.children"
171
+ :key="index3"
172
+ :index="'' + router3.id"
173
+ @click="rourteTo(router3)"
174
+ >
175
+ <template slot="title">
176
+ <i :class="getMenuClass(router3, 3)"></i>
177
+ <span>{{ getMenuName(router3) }}</span>
178
+ </template>
179
+ </el-menu-item>
180
+ </component>
181
+ </component>
182
+ <!-- <el-menu-item
183
+ @click.native="openCreateCompanyDialog"
184
+ index="xx"
185
+ v-if="isFormDev"
186
+ >
187
+ <template slot="title">
188
+ <i :class="getMenuClass({}, 1)"></i>
189
+ <span>新建企业</span>
190
+ </template>
191
+ </el-menu-item> -->
192
+ </el-scrollbar>
193
+ </el-menu>
194
+ <div class="menu-btn">
195
+ <i class="el-icon-arrow-up" @click="toUpMove()"></i>
196
+ <i class="el-icon-arrow-down" @click="toDownMove()"></i>
197
+ </div>
198
+ <div
199
+ id="tta"
200
+ style="
201
+ position: absolute;
202
+ height: 100%;
203
+ top: 0;
204
+ right: 0;
205
+ z-index: 9999;
206
+ width: 800px;
207
+ left: 100%;
208
+ "
209
+ v-if="showMenuModal"
210
+ ></div>
211
+ <el-dialog
212
+ :title="$t1('切换组织')"
213
+ width="355px"
214
+ custom-class="dialog-style list-dialog"
215
+ v-if="showCompanyDialog"
216
+ :visible.sync="showCompanyDialog"
217
+ :append-to-body="true"
218
+ :modal-append-to-body="true"
219
+ :close-on-click-modal="false"
220
+ v-el-drag-dialog
221
+ v-el-dialog-center
222
+ @close="changeCompanyClose"
223
+ >
224
+ <div class="cont">
225
+ <el-input
226
+ :placeholder="$t1('搜索')"
227
+ class="search-btn"
228
+ v-model="filterText"
229
+ ></el-input>
230
+ <el-tree
231
+ :props="defaultProps"
232
+ :load="loadNode"
233
+ node-key="id"
234
+ ref="tree"
235
+ highlight-current
236
+ lazy
237
+ :expand-on-click-node="true"
238
+ @node-click="handleNodeClick"
239
+ class="organization-tree"
240
+ icon-class="el-icon-arrow-right"
241
+ :filter-node-method="filterNode"
242
+ ></el-tree>
243
+ </div>
244
+ <!-- <span slot="footer" class="dialog-footer">
245
+ <el-button type="primary" plain class="button-sty" @click="changeCompanyClose">
246
+ <i class="el-icon-close el-icon"></i>
247
+ 取 消
248
+ </el-button>
249
+ <el-button type="primary" @click="changeCompany" class="button-sty">
250
+ <i class="el-icon-check el-icon"></i>
251
+ 确 定
252
+ </el-button>
253
+ </span> -->
254
+ </el-dialog>
255
+
256
+ <!-- <infoIframeDialog v-if="showInfoIframeDialog" :visiable.sync="showInfoIframeDialog"
257
+ :dataId="userInfo.id"></infoIframeDialog>-->
258
+ <userInfo
259
+ v-if="!isFormDev && showUserInfoDialog"
260
+ :visiable.sync="showUserInfoDialog"
261
+ :_dataId="userInfo.id"
262
+ topValue="128px"
263
+ @reload="userInfoReload"
264
+ ></userInfo>
265
+ <userFormInfo
266
+ v-if="isFormDev && showUserInfoDialog"
267
+ :visiable.sync="showUserInfoDialog"
268
+ :_dataId="userInfo.id"
269
+ topValue="128px"
270
+ @reload="userInfoReload"
271
+ ></userFormInfo>
272
+ <onlineTalk></onlineTalk>
273
+ <extractedCodeCreateDialog
274
+ v-if="showExtractedCodeCreateDialog"
275
+ :visiable.sync="showExtractedCodeCreateDialog"
276
+ ></extractedCodeCreateDialog>
277
+ <extractedCodeQueryDialog
278
+ v-if="showExtractedCodeQueryDialog"
279
+ :visiable.sync="showExtractedCodeQueryDialog"
280
+ ></extractedCodeQueryDialog>
281
+ <createCompanyDialog
282
+ v-if="showCreateCompanyDialog"
283
+ :visiable.sync="showCreateCompanyDialog"
284
+ ></createCompanyDialog>
285
+ </div>
286
+ </template>
287
+
288
+ <script>
289
+ import { mapGetters } from "vuex";
290
+ import variables from "@/styles/variables.scss";
291
+ import userInfo from "@base/views/user/user/info.vue";
292
+ import userFormInfo from "@base/views/user/user/form_info.vue";
293
+ import onlineTalk from "@base/components/onlineTalk";
294
+ import { getToken } from "@base/utils/auth";
295
+ import indexUtil from "@base/utils/index.js";
296
+ import langTool from "../langTool.vue";
297
+ import { initPddLog } from "@base/utils/pddLog";
298
+
299
+ import extractedCodeCreateDialog from "../extractedCode/createDialog.vue";
300
+ import extractedCodeQueryDialog from "../extractedCode/queryDialog.vue";
301
+ import { getBdFlag } from "@base/api/user";
302
+ import createCompanyDialog from "@base/layout/components/createCompany/createCompanyDialog.vue";
303
+
304
+ export default {
305
+ props: {
306
+ option: Object,
307
+ isMenu: {
308
+ type: Boolean,
309
+ },
310
+ },
311
+ components: {
312
+ userInfo,
313
+ userFormInfo,
314
+ onlineTalk,
315
+ langTool,
316
+ extractedCodeCreateDialog,
317
+ extractedCodeQueryDialog,
318
+ createCompanyDialog,
319
+ },
320
+ data() {
321
+ return {
322
+ direction: "bottom",
323
+ defaultOpenedsArray: [],
324
+ viewRouter: [],
325
+ showMenuModal: false,
326
+ menuheight: {
327
+ height: "",
328
+ },
329
+ defaultProps: {
330
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
331
+ children: [],
332
+ isLeaf: "leaf",
333
+ },
334
+ filterText: null,
335
+ showCompanyDialog: false,
336
+ choose_company_info: "",
337
+ userInfo: {},
338
+ companyInfo: {},
339
+ showUserInfoDialog: false,
340
+ hoverStatus: false,
341
+ nowNavID: "null",
342
+ stopFlag: 0,
343
+ showInfoIframeDialog: false,
344
+ currentMenu: null,
345
+ menuModules: [],
346
+ firstMenuHeight: 0, // 第一个菜单的高度
347
+ eveyMenuHeight: 48, // 每一个菜单的高度
348
+ isFormDev: false,
349
+
350
+ showExtractedCodeCreateDialog: false,
351
+ showExtractedCodeQueryDialog: false,
352
+ isDev: false,
353
+ showCreateCompanyDialog: false,
354
+ };
355
+ },
356
+ computed: {
357
+ ...mapGetters([
358
+ "permission_routes",
359
+ "sidebar",
360
+ "sidebarRouters",
361
+ "isBdAdmin",
362
+ "userFlag",
363
+ ]),
364
+ activeMenu() {
365
+ const route = this.$route;
366
+ const { meta, path } = route;
367
+ // if set path, the sidebar will highlight the path you set
368
+ if (meta.activeMenu) {
369
+ return meta.activeMenu;
370
+ }
371
+ return path;
372
+ },
373
+ showLogo() {
374
+ return this.$store.state.settings.sidebarLogo;
375
+ },
376
+ variables() {
377
+ return variables;
378
+ },
379
+ /*isCollapse() {
380
+ if (this.sidebar.opened) {
381
+ this.direction = 'bottom';
382
+ } else {
383
+ this.direction = 'right-start';
384
+ }
385
+ return !this.sidebar.opened;
386
+ }*/
387
+ },
388
+ watch: {
389
+ filterText(val) {
390
+ this.$refs.tree.filter(val);
391
+ },
392
+ },
393
+ created() {
394
+ indexUtil.initI18nMessage("menus");
395
+ },
396
+ mounted() {
397
+ this.getUserInfo();
398
+ setTimeout(() => {
399
+ this.filterRoute();
400
+ }, 100);
401
+ this.countHeight();
402
+ let query = this.$route.query;
403
+ if (query && query.flag == 1) {
404
+ this.showCompanyDialog = true;
405
+ }
406
+ initPddLog(); //初始化拼多多日志
407
+ this.initIsFormDev();
408
+ this.getBdEnv();
409
+ },
410
+ methods: {
411
+ getMenuType(item) {
412
+ if (item.children && item.children.length > 0) {
413
+ return "el-submenu";
414
+ } else {
415
+ return "el-menu-item";
416
+ }
417
+ },
418
+ getBdEnv() {
419
+ getBdFlag({
420
+ success: (res) => {
421
+ this.isDev = res.objx == 1;
422
+ },
423
+ });
424
+ },
425
+ initIsFormDev() {
426
+ let userFlag = this.userFlag;
427
+ this.isFormDev = userFlag == 6 || userFlag == 7 || userFlag == 8;
428
+ },
429
+ getMenuFlag() {
430
+ return !this.isBdAdmin;
431
+ },
432
+ getMenuName(item) {
433
+ let locale = this.$i18n?.locale;
434
+ let zhTitle = item.meta ? item.meta.title : "";
435
+ let enTitle = item.meta ? item.meta.enTitle : "";
436
+ let title;
437
+ if (locale == "en") {
438
+ title = enTitle || zhTitle;
439
+ } else {
440
+ title = zhTitle;
441
+ }
442
+ if (!enTitle || locale !== "en") {
443
+ title = zhTitle;
444
+ }
445
+ if (this.$t1) {
446
+ title = this.$t1(title);
447
+ }
448
+
449
+ return title;
450
+ },
451
+ jumpOutLink(route) {
452
+ let path = route.url || route.path;
453
+ if (route.type == 4 && path) {
454
+ let params = this.getCustomReqUrlAndCleanUrl(path);
455
+ let reqUrl = params.custom_req_url;
456
+ if (reqUrl) {
457
+ this.$http({
458
+ url: reqUrl,
459
+ method: `post`,
460
+ data: { thirdUrl: params.newUrl },
461
+ isLoading: true,
462
+ success: (res) => {
463
+ path = res.objx;
464
+ window.open(path);
465
+ },
466
+ });
467
+ } else {
468
+ if (path.indexOf("token={token}") >= 0) {
469
+ path = path.replace("token={token}", "token=" + getToken());
470
+ }
471
+ window.open(path);
472
+ }
473
+ }
474
+ },
475
+ getCustomReqUrlAndCleanUrl(url) {
476
+ // 直接使用正则表达式匹配
477
+ const match = url.match(/[?&]custom_req_url=([^&?#]+)/);
478
+ if (match) {
479
+ const customReqUrl = decodeURIComponent(match[1]);
480
+ // 移除匹配到的参数部分
481
+ const newUrl = url.replace(
482
+ match[0],
483
+ match[0].startsWith("?") ? "?" : ""
484
+ );
485
+
486
+ return {
487
+ custom_req_url: customReqUrl,
488
+ newUrl: newUrl.replace(/\?$/, "").replace(/\?&/, "?"),
489
+ };
490
+ }
491
+
492
+ return {
493
+ custom_req_url: "",
494
+ newUrl: url,
495
+ };
496
+ },
497
+ changeModules(row, cRow) {
498
+ if (!row.route) return;
499
+ localStorage.setItem("currentMenuId", row.id);
500
+ let route = row.route ? "/" + row.route : "";
501
+ sessionStorage.setItem("reUrl", cRow.path);
502
+ sessionStorage.setItem("reCid", row.id);
503
+ location.href = route + "/index.html/#/home";
504
+
505
+ // location.reload();
506
+ },
507
+ filterRoute() {
508
+ var oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
509
+ var nRoute1s = [];
510
+ oldRoutes.forEach((route1, index1) => {
511
+ let nRoute2s = [];
512
+ if (!route1.hidden) {
513
+ route1.children.forEach((route2, index2) => {
514
+ let nRoute3s = [];
515
+ if (!route2.hidden) {
516
+ route2.children.forEach((route3, index3) => {
517
+ if (!route3.hidden) {
518
+ nRoute3s.push(route3);
519
+ }
520
+ });
521
+ }
522
+ if (route2.type == 4 || route2.url || nRoute3s.length > 0) {
523
+ route2.children = nRoute3s;
524
+ nRoute2s.push(route2);
525
+ }
526
+ });
527
+ }
528
+ if (route1.type == 4 || route1.url || nRoute2s.length > 0) {
529
+ route1.children = nRoute2s;
530
+ nRoute1s.push(route1);
531
+ }
532
+ });
533
+ this.viewRouter = nRoute1s || [];
534
+ this.menuModules = nRoute1s || [];
535
+
536
+ let reUrl = sessionStorage.getItem("reUrl");
537
+ let reCid = sessionStorage.getItem("reCid");
538
+ if (reUrl) {
539
+ this.$nextTick(() => {
540
+ this.$refs.seconMenus.open(reCid);
541
+ });
542
+ this.$router.push(reUrl);
543
+ sessionStorage.removeItem("reUrl");
544
+ sessionStorage.removeItem("reCid");
545
+ }
546
+ },
547
+ filterRoute1() {
548
+ var oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
549
+ var nRoute1s = [];
550
+ oldRoutes.forEach((route1, index1) => {
551
+ let nRoute2s = [];
552
+ if (!route1.hidden && route1.route) {
553
+ route1.children.forEach((route2, index2) => {
554
+ let nRoute3s = [];
555
+ if (!route2.hidden) {
556
+ route2.children.forEach((route3, index3) => {
557
+ if (!route3.hidden) {
558
+ nRoute3s.push(route3);
559
+ }
560
+ });
561
+ }
562
+ if (nRoute3s.length > 0) {
563
+ route2.children = nRoute3s;
564
+ nRoute2s.push(route2);
565
+ }
566
+ });
567
+ }
568
+ if (nRoute2s.length > 0) {
569
+ route1.children = nRoute2s;
570
+ nRoute1s.push(route1);
571
+ }
572
+ });
573
+ let rows = nRoute1s;
574
+ if (rows.length) {
575
+ let currentMenu;
576
+ if (nRoute1s.length) {
577
+ var currentMenuId = localStorage.getItem("currentMenuId");
578
+ if (currentMenuId) {
579
+ currentMenu = nRoute1s.find((row) => row.id == currentMenuId);
580
+ }
581
+ if (!currentMenu) {
582
+ currentMenu = nRoute1s[0];
583
+ }
584
+ this.viewRouter = currentMenu.children;
585
+ }
586
+ this.currentMenu = currentMenu;
587
+ this.menuModules = rows || [];
588
+
589
+ /*if (currentMenu) {
590
+ if (currentMenu.route != WEB_PREFIX.substring(1, WEB_PREFIX.length)) {
591
+ this.changeModules(currentMenu, 1);
592
+ } else {
593
+ localStorage.setItem('currentMenuId', currentMenu.id);
594
+ }
595
+ } else {
596
+ localStorage.removeItem('currentMenuId');
597
+ }*/
598
+ }
599
+ },
600
+ rourteTo(route) {
601
+ let path = route.url || route.path;
602
+ if (!path) {
603
+ return;
604
+ }
605
+ this.showMenuModal = true;
606
+ setTimeout(() => {
607
+ this.showMenuModal = false;
608
+ }, 200);
609
+ try {
610
+ if (route.linkType == 4) {
611
+ this.jumpOutLink(route);
612
+ } else if (route.linkType == 3) {
613
+ this.$router.push({
614
+ path: path,
615
+ query: { url: route.outLink, route: route.route },
616
+ });
617
+ } else {
618
+ // 通用打开:可重复时附加唯一标识生成独立标签页
619
+ this.$openView(path, route);
620
+ }
621
+ } catch (e) {
622
+ console.error(e);
623
+ }
624
+ },
625
+ logout() {
626
+ this.$store.dispatch("user/logout2").then((res) => {
627
+ this.$router.push(`/login?redirect=${this.$route.fullPath}`);
628
+ });
629
+ },
630
+ toggleSideBar() {
631
+ this.$store.dispatch("app/toggleSideBar");
632
+ },
633
+ countHeight() {
634
+ var h =
635
+ this.$refs.hamhurger.offsetHeight +
636
+ this.$refs.fase.offsetHeight +
637
+ this.$refs.business.offsetHeight;
638
+ this.menuheight.height = window.innerHeight - h + "px";
639
+ },
640
+ handleNodeClick(data, node, v) {
641
+ if (!data.hasChild) {
642
+ this.choose_company_info = data;
643
+ this.changeCompany();
644
+ } else {
645
+ this.choose_company_info = {};
646
+ }
647
+ },
648
+ // 异步树叶子节点懒加载逻辑
649
+ loadNode(node, resolve) {
650
+ let companyCode =
651
+ node && node.data && node.data.companyCode
652
+ ? node.data.companyCode || ""
653
+ : "";
654
+ let url = !companyCode
655
+ ? USER_PREFIX + "/user_company_info/getAllList"
656
+ : USER_PREFIX + "/user_company_info/getChildren";
657
+
658
+ this.$http({
659
+ url: url,
660
+ method: "post",
661
+ data: {
662
+ parentCompanyCode: companyCode,
663
+ },
664
+ success: (res) => {
665
+ let datas = res.objx || [];
666
+ let parentLabel = companyCode ? node.label : null;
667
+ datas.forEach((item) => {
668
+ item.leaf = !item.hasChild;
669
+ let label = this.$t1(item.companyName);
670
+ /*if(companyCode){
671
+ label = label + '('+companyTypeMap[item.companyType]+')'
672
+ }*/
673
+ item.label = label;
674
+ item.parentLabel = parentLabel;
675
+ });
676
+
677
+ if (node.level === 0) {
678
+ if (datas.length > 0 && datas[0].hasChild) {
679
+ this.$nextTick(() => {
680
+ let nodedata = node.childNodes[0];
681
+ nodedata.expanded = true;
682
+ nodedata.loadData();
683
+ });
684
+ }
685
+ }
686
+ resolve(datas);
687
+ },
688
+ });
689
+ },
690
+ filterNode(value, data) {
691
+ if (!value) return true;
692
+ let flag1 = data.label.indexOf(value) !== -1;
693
+ let flag2 = data.parentLabel && data.parentLabel.indexOf(value) !== -1;
694
+ return flag1 || flag2;
695
+ },
696
+ openCompanyDialog() {
697
+ this.filterText = null;
698
+ this.showCompanyDialog = true;
699
+ },
700
+ getWebPrefix(callback) {
701
+ this.$http({
702
+ url: USER_PREFIX + "/auth/getWebPrefix",
703
+ method: `post`,
704
+ data: {},
705
+ isLoading: true,
706
+ success: (res) => {
707
+ let webPrefix = res.objx;
708
+ callback && callback(webPrefix);
709
+ },
710
+ });
711
+ },
712
+ changeCompany() {
713
+ let row = this.choose_company_info;
714
+ let query = this.$route.query;
715
+ let flag = query && query.flag == 1 ? 1 : null;
716
+ this.showCompanyDialog = false;
717
+ if (row && row.companyCode) {
718
+ this.$baseLoading({ target: document.body, fullscreen: true });
719
+ this.$http({
720
+ url: USER_PREFIX + "/auth/switchCompany",
721
+ method: "post",
722
+ data: { stringOne: row.companyCode },
723
+ isLoading: true,
724
+ success: (res) => {
725
+ this.getWebPrefix((prefix) => {
726
+ let webPrefix = prefix ? "/" + prefix : window.MAIN_WEB_PREFIX;
727
+ sessionStorage.removeItem("out-token");
728
+ this.$store.dispatch("user/changeCompanyInfo", row);
729
+ this.$store.dispatch("tagsView/delAllViews");
730
+ window.location.href = webPrefix + "/index.html";
731
+ });
732
+ },
733
+ });
734
+ } else {
735
+ if (flag == 1) {
736
+ this.$router.push({
737
+ path: "/",
738
+ });
739
+ }
740
+ }
741
+ },
742
+ changeCompanyClose() {
743
+ let query = this.$route.query;
744
+ let flag = query && query.flag == 1 ? 1 : null;
745
+ if (flag == 1) {
746
+ this.$router.push({
747
+ path: "/",
748
+ });
749
+ }
750
+ this.showCompanyDialog = false;
751
+ },
752
+ getUserInfo() {
753
+ this.$http({
754
+ url: USER_PREFIX + "/user/currentUser",
755
+ method: "post",
756
+ success: (res) => {
757
+ let userInfo = res.objx;
758
+ this.headPhotoUrl = userInfo.headPhotoUrl
759
+ ? userInfo.headPhotoUrl
760
+ : (require("@/resources/images/default-header.png").default || require("@/resources/images/default-header.png"));
761
+ this.userInfo = userInfo;
762
+ },
763
+ });
764
+
765
+ this.$http({
766
+ url: USER_PREFIX + "/company_info/getCurrent",
767
+ method: `post`,
768
+ success: (res) => {
769
+ this.companyInfo = res.objx || {};
770
+ },
771
+ });
772
+ },
773
+ openUserInfo() {
774
+ this.showUserInfoDialog = true;
775
+ // this.showInfoIframeDialog = true;
776
+ },
777
+ userInfoReload() {
778
+ this.showUserInfoDialog = true;
779
+ },
780
+ showNav(route, event) {
781
+ if (!this.isMenu) return;
782
+ let id = route && route.id ? route.id : null;
783
+ if (id != null) {
784
+ if (!route.children || !route.children.length) {
785
+ return;
786
+ }
787
+ this.stopFlag = 1;
788
+ this.nowNavID = id;
789
+ this.$nextTick(() => {
790
+ var wh = window.innerHeight;
791
+ let dom = event.target;
792
+ let domAttr = dom.getBoundingClientRect();
793
+ // var sh1 = dom.offsetTop;
794
+ var sh1 = domAttr.top + 5;
795
+ let $snav = this.$refs["seconMenus" + id][0];
796
+ let snavAttr = $snav.getBoundingClientRect();
797
+
798
+ // var sh2 = $snav.outerHeight;
799
+ var sh2 = snavAttr.height;
800
+ var sh = wh - (sh1 + sh2);
801
+
802
+ var hd = 20;
803
+ var xhd = sh - hd; //移动距离+固定值
804
+ if (sh >= 0) {
805
+ $snav.style["margin-top"] = sh1 + "px";
806
+ } else if (sh < 0) {
807
+ let bd = sh1 + sh;
808
+
809
+ $snav.style["margin-top"] = bd + "px";
810
+ $snav.querySelector(".ico-arrow").style["margin-top"] =
811
+ sh1 - bd + "px";
812
+ }
813
+ });
814
+ } else {
815
+ this.stopFlag = 0;
816
+ setTimeout(() => {
817
+ if (this.stopFlag == 0) {
818
+ this.nowNavID = id;
819
+ }
820
+ }, 200);
821
+ }
822
+ },
823
+ jumpTo(row, firstRow) {
824
+ let route = firstRow.route ? "/" + firstRow.route : "";
825
+ if (route == WEB_PREFIX) {
826
+ this.$router.push({
827
+ path: row.path,
828
+ });
829
+ } else {
830
+ this.changeModules(firstRow, row);
831
+ }
832
+ },
833
+ toDownMove() {
834
+ let containter = document
835
+ .getElementById("menuUl")
836
+ .querySelector(".scrollbar-wrapper");
837
+ let menuscrollTop = containter.scrollTop;
838
+ let scrollHeight = containter.scrollHeight;
839
+ let val = menuscrollTop + this.eveyMenuHeight;
840
+ if (val < scrollHeight) {
841
+ containter.scrollTop = val;
842
+ } else {
843
+ containter.scrollTop = scrollHeight;
844
+ }
845
+ },
846
+ toUpMove() {
847
+ let containter = document
848
+ .getElementById("menuUl")
849
+ .querySelector(".scrollbar-wrapper");
850
+ let menuscrollTop = containter.scrollTop;
851
+ let val = menuscrollTop - this.eveyMenuHeight;
852
+ if (val > 0) {
853
+ containter.scrollTop = val;
854
+ } else {
855
+ containter.scrollTop = 0;
856
+ }
857
+ },
858
+ getMenuClass(menu, flag) {
859
+ let res = "";
860
+ if (menu.menuImg) {
861
+ res = "iconfont " + menu.menuImg;
862
+ } else if (flag == 1) {
863
+ res = "iconfont icon-jinggao"; //一级默认图标
864
+ } else if (flag == 2) {
865
+ res = "iconfont icon-circle"; //二级默认图标
866
+ } else if (flag == 3) {
867
+ res = "iconfont icon-thirdMemu"; //三级级默认图标
868
+ }
869
+
870
+ if (flag == 2) {
871
+ if (menu.id == this.nowNavID) {
872
+ res += " on";
873
+ }
874
+ }
875
+ return res;
876
+ },
877
+ openCreateCompanyDialog() {
878
+ this.showCreateCompanyDialog = true;
879
+ },
880
+ confirmCreateCompanyDialog() {
881
+ this.showCreateCompanyDialog = false;
882
+ },
883
+ },
884
+ };
885
+ </script>
886
+ <style lang="scss">
887
+ @import "~@/styles/variables.scss";
888
+
889
+ .hamburger-box {
890
+ background-color: #0000004d;
891
+ height: 42px;
892
+ /* line-height: 30px; */
893
+ text-align: center;
894
+ /* box-shadow: 0 2px 6px rgb(0 0 0 / 10%); */
895
+ position: relative;
896
+ z-index: 2;
897
+ overflow: hidden;
898
+ font-size: 12px;
899
+ color: rgba(255, 255, 255, 0.65);
900
+
901
+ > div {
902
+ color: #fff;
903
+ font-size: 13px;
904
+ margin-bottom: 4px;
905
+ cursor: pointer;
906
+ height: 36px;
907
+ border-radius: 7px;
908
+ margin: 6px 10px 6px 8px;
909
+ overflow: hidden;
910
+ background: #2a6494;
911
+ }
912
+
913
+ p {
914
+ color: #fff;
915
+ font-size: 13px;
916
+ margin-bottom: 4px;
917
+ cursor: pointer;
918
+ /* border: solid 1px #ffffff61; */
919
+ display: block;
920
+ line-height: 27px;
921
+ /* width: 88%; */
922
+ margin-top: 6px;
923
+ border-radius: 7px;
924
+ margin: 6px 10px 6px 8px;
925
+ background: #2a6494;
926
+
927
+ i {
928
+ font-size: 14px;
929
+ vertical-align: middle;
930
+ margin: 0 4px 0 6px;
931
+ height: 36px;
932
+ line-height: 36px;
933
+ width: 21px;
934
+ }
935
+
936
+ span {
937
+ width: 94px;
938
+ display: table-cell;
939
+ height: 32px;
940
+ word-break: break-word;
941
+ line-height: 16px;
942
+ overflow: hidden;
943
+ vertical-align: middle;
944
+ white-space: nowrap;
945
+ }
946
+
947
+ &.name {
948
+ display: table-row;
949
+ margin: 0;
950
+ }
951
+ }
952
+ }
953
+
954
+ .business-name {
955
+ height: 47px;
956
+ color: #ffffffb8;
957
+ background: #0000004d;
958
+ /* padding-top: 12px; */
959
+ font-size: 12px;
960
+ /* padding-left: 5px; */
961
+ display: table-cell;
962
+ vertical-align: middle;
963
+ width: 140px;
964
+ padding: 6px 10px;
965
+ text-align: center;
966
+
967
+ p {
968
+ margin: 0;
969
+ display: -webkit-box;
970
+ overflow: hidden;
971
+ text-overflow: ellipsis;
972
+ -webkit-line-clamp: 2;
973
+ -webkit-box-orient: vertical;
974
+ }
975
+ }
976
+
977
+ .fase-box {
978
+ color: #fff;
979
+ /* border-bottom: solid 1px rgba(255, 255, 255, 0.12); */
980
+ border-top: solid 1px rgba(255, 255, 255, 0.12);
981
+ background: #225076;
982
+ padding: 4px 0 8px;
983
+ width: 100%;
984
+ z-index: 999;
985
+ position: relative;
986
+ /* display: flex;*/
987
+ //text-align: left !important;
988
+ // &:hover {
989
+ // color: $baseColor;
990
+ // background-color: #fbfdfe;
991
+ // .fase-list {
992
+ // display: block;
993
+ // }
994
+ // }
995
+ .item {
996
+ flex: 1;
997
+ text-align: center;
998
+ font-size: 16px;
999
+ height: 40px;
1000
+ line-height: 40px;
1001
+ cursor: pointer;
1002
+ display: inline-block;
1003
+ min-width: 30px;
1004
+ }
1005
+
1006
+ .fase-list {
1007
+ position: absolute;
1008
+ left: 100%;
1009
+ color: $baseColor;
1010
+ background-color: #fbfdfe;
1011
+ border: solid 1px $baseColor;
1012
+ border-left: none;
1013
+ top: -0.5px;
1014
+ padding: 10px 0 10px 24px;
1015
+ height: 43px;
1016
+ width: 413px;
1017
+ display: none;
1018
+
1019
+ .l-item {
1020
+ display: inline-block;
1021
+ font-size: 12px;
1022
+ margin-right: 36px;
1023
+ line-height: 20px;
1024
+ cursor: pointer;
1025
+
1026
+ i {
1027
+ vertical-align: middle;
1028
+ margin-right: 4px;
1029
+ font-size: 15px;
1030
+ margin-bottom: 2px;
1031
+ }
1032
+
1033
+ &:hover {
1034
+ border-bottom: solid 1px $baseColor;
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+
1040
+ .openSidebar .fase-box {
1041
+ text-align: center;
1042
+ //padding: 0;
1043
+ }
1044
+
1045
+ #app .sidebar-container {
1046
+ overflow: visible;
1047
+ z-index: 1003;
1048
+
1049
+ &.hover {
1050
+ z-index: 1003;
1051
+ }
1052
+
1053
+ &.hover1 .fase-box {
1054
+ width: 138px;
1055
+ color: $baseColor;
1056
+ background-color: #fbfdfe;
1057
+ border-color: $baseColor;
1058
+ }
1059
+
1060
+ .el-menu.menu-box {
1061
+ height: calc(100vh - 173px);
1062
+ font-size: 13px;
1063
+ z-index: -1;
1064
+ position: relative;
1065
+ background-color: rgba(0, 0, 0, 0.2);
1066
+ word-break: break-word;
1067
+ .el-scrollbar__view > {
1068
+ .el-menu-item {
1069
+ padding: 0 11px !important;
1070
+ span {
1071
+ font-size: 14px;
1072
+ }
1073
+ }
1074
+ .el-submenu > .el-submenu__title {
1075
+ padding: 0 11px !important;
1076
+ span {
1077
+ font-size: 14px;
1078
+ }
1079
+ ~ .el-menu {
1080
+ padding: 5px 0;
1081
+ display: grid;
1082
+ > .el-menu-item {
1083
+ span {
1084
+ line-height: 1.4;
1085
+ height: 26px;
1086
+ }
1087
+ }
1088
+ .el-submenu.is-opened .el-submenu__title {
1089
+ background-color: #fff;
1090
+ opacity: 1;
1091
+ span {
1092
+ color: $baseColor;
1093
+ }
1094
+ i.iconfont {
1095
+ color: $baseColor;
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ }
1101
+ .el-submenu__title,
1102
+ .el-menu-item {
1103
+ padding: 0 11px;
1104
+ height: 48px;
1105
+ line-height: 48px;
1106
+ overflow: hidden;
1107
+ &:hover,
1108
+ &.is-active {
1109
+ background-color: rgba(0, 0, 0, 0.29);
1110
+ }
1111
+ i {
1112
+ color: #fff;
1113
+ font-size: 13px;
1114
+ margin-right: 0;
1115
+ width: 18px;
1116
+
1117
+ &.iconfont {
1118
+ margin-right: 5px;
1119
+ font-size: 18px;
1120
+ float: left;
1121
+ }
1122
+
1123
+ &.el-submenu__icon-arrow {
1124
+ right: 3px;
1125
+ text-align: center;
1126
+ font-size: 12px;
1127
+ margin-top: -5px;
1128
+ display: none;
1129
+ }
1130
+ }
1131
+
1132
+ > span {
1133
+ height: 48px;
1134
+ display: table-cell;
1135
+ width: 114px;
1136
+ vertical-align: middle;
1137
+ font-size: 13px;
1138
+ white-space: normal;
1139
+ line-height: 16px;
1140
+ }
1141
+ }
1142
+
1143
+ .el-submenu {
1144
+ overflow: hidden; //有点电脑分辨率问题
1145
+
1146
+ &.is-opened .el-submenu__title {
1147
+ //background-color: rgba(27, 66, 97) !important;
1148
+ }
1149
+ .el-submenu .el-menu {
1150
+ display: none;
1151
+ }
1152
+ }
1153
+
1154
+ .el-submenu {
1155
+ &.is-opened {
1156
+ > .el-submenu__title {
1157
+ background-color: rgba(0, 0, 0, 0.29);
1158
+ }
1159
+ }
1160
+ .el-menu {
1161
+ background: rgba(0, 0, 0, 0.35);
1162
+ box-shadow: 0px -5px 8px #00000014 inset;
1163
+ //padding:4px 0;
1164
+ .el-submenu__title {
1165
+ height: auto;
1166
+ line-height: 1.4;
1167
+ font-size: 12px;
1168
+ opacity: 0.8;
1169
+ margin: 5px 0 5px 14px;
1170
+ padding: 7px 2px 7px 33px !important;
1171
+ border-radius: 8px;
1172
+ text-align: left;
1173
+ min-width: 81px;
1174
+ white-space: normal;
1175
+ margin-right: 10px;
1176
+ word-break: break-word;
1177
+ i.iconfont {
1178
+ position: absolute;
1179
+ top: 50%;
1180
+ height: 20px;
1181
+ margin-top: -10px;
1182
+ line-height: 20px;
1183
+ left: 7px;
1184
+ font-size: 18px;
1185
+ }
1186
+
1187
+ [class^="el-icon-"] {
1188
+ font-size: 12px;
1189
+ color: #fff;
1190
+ position: absolute;
1191
+ right: 2px;
1192
+ top: 50%;
1193
+ margin-top: -5px;
1194
+ width: 14px;
1195
+ zoom: 0.8;
1196
+ display: none;
1197
+ }
1198
+ span {
1199
+ height: auto;
1200
+ text-align: left !important;
1201
+ }
1202
+ &:hover,
1203
+ &.on {
1204
+ opacity: 1;
1205
+ background-color: #fbfdfe !important;
1206
+ color: $baseColor !important;
1207
+ i.iconfont {
1208
+ color: $baseColor;
1209
+ }
1210
+ .el-icon-arrow-right {
1211
+ color: $baseColor;
1212
+ }
1213
+ }
1214
+ }
1215
+ }
1216
+
1217
+ .el-menu-item {
1218
+ height: auto;
1219
+ line-height: 1.4;
1220
+ padding-left: 33px !important;
1221
+ font-size: 12px;
1222
+ opacity: 0.8;
1223
+ margin: 5px 0 5px 14px;
1224
+ padding: 2px 2px 2px 0px;
1225
+ border-radius: 8px;
1226
+ text-align: left;
1227
+ min-width: 81px !important;
1228
+ white-space: normal;
1229
+ margin-right: 10px;
1230
+ word-break: break-word;
1231
+
1232
+ i.iconfont {
1233
+ position: absolute;
1234
+ top: 50%;
1235
+ height: 20px;
1236
+ margin-top: -10px;
1237
+ line-height: 20px;
1238
+ left: 7px;
1239
+ font-size: 18px;
1240
+ color: #d0d6db;
1241
+ }
1242
+
1243
+ [class^="el-icon-"] {
1244
+ font-size: 12px;
1245
+ color: #fff;
1246
+ position: absolute;
1247
+ right: 2px;
1248
+ top: 50%;
1249
+ margin-top: -5px;
1250
+ width: 14px;
1251
+ zoom: 0.8;
1252
+ display: none;
1253
+ }
1254
+
1255
+ &:hover,
1256
+ &.on {
1257
+ opacity: 1;
1258
+ background-color: #fbfdfe !important;
1259
+ color: $baseColor !important;
1260
+
1261
+ .el-icon-arrow-right,
1262
+ i.iconfont {
1263
+ color: $baseColor;
1264
+ }
1265
+ }
1266
+ }
1267
+ }
1268
+
1269
+ &.lang-zh {
1270
+ font-size: 14px;
1271
+
1272
+ .el-submenu {
1273
+ .el-submenu__title {
1274
+ > span {
1275
+ text-align: center;
1276
+ }
1277
+
1278
+ i.iconfont {
1279
+ margin-right: 2px;
1280
+ }
1281
+ }
1282
+
1283
+ .el-menu-item {
1284
+ font-size: 13px;
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+
1291
+ .main-container {
1292
+ z-index: 1002;
1293
+ }
1294
+
1295
+ .menu-btn {
1296
+ background-color: #0000001c;
1297
+ height: 30px;
1298
+ line-height: 30px;
1299
+ text-align: center;
1300
+ box-shadow: 0 -10px 6px rgb(0 0 0 / 10%);
1301
+ display: flex;
1302
+ color: #fff;
1303
+ font-size: 16px;
1304
+
1305
+ i {
1306
+ display: inline-block;
1307
+ flex: 1;
1308
+ line-height: 30px;
1309
+ cursor: pointer;
1310
+ border-right: solid 1px rgba(0, 0, 0, 0.2);
1311
+
1312
+ &:last-child {
1313
+ border-right: none;
1314
+ }
1315
+
1316
+ &:hover {
1317
+ background-color: rgba(255, 255, 255, 0.12);
1318
+ }
1319
+ }
1320
+ }
1321
+
1322
+ /*.menu-box {
1323
+ background-color: #0000002e !important;
1324
+ font-size: 14px;
1325
+ z-index: -1;
1326
+ position: relative;
1327
+ &.hover .el-scrollbar {
1328
+ width: 1000px;
1329
+ }
1330
+ .el-scrollbar {
1331
+ .el-scrollbar__view {
1332
+ padding-top: 1px;
1333
+ }
1334
+ .el-scrollbar__bar.is-vertical {
1335
+ left: 104px;
1336
+ }
1337
+ }
1338
+ .first-item {
1339
+ position: relative;
1340
+ width: 104px;
1341
+ &:nth-child(-n + 6) .second-list {
1342
+ bottom: inherit !important;
1343
+ top: -40.5px !important;
1344
+ }
1345
+ &:nth-child(1) .second-list {
1346
+ top: 0 !important;
1347
+ }
1348
+ &:nth-last-child(-n + 6) .second-list {
1349
+ bottom: -1%;
1350
+ top: inherit;
1351
+ }
1352
+ .f-name {
1353
+ height: 55px;
1354
+ line-height: 55px;
1355
+ padding-left: 9px;
1356
+ color: #fff;
1357
+ cursor: pointer;
1358
+ position: relative;
1359
+ padding-right: 6px;
1360
+ -webkit-transition: all 0.2s ease-in;
1361
+ -moz-transition: all 0.2s ease-in;
1362
+ -o-transition: all 0.2s ease-in;
1363
+ transition: all 0.2s ease-in;
1364
+ width: 104px;
1365
+ i.el-icon-arrow-right {
1366
+ position: absolute;
1367
+ right: 3px;
1368
+ top: 21.5px;
1369
+ width: 14px;
1370
+ height: 14px;
1371
+ }
1372
+ .el-icon-s-opportunity {
1373
+ opacity: 0.92;
1374
+ font-size: 13px;
1375
+ vertical-align: middle;
1376
+ margin-right: 2px;
1377
+ }
1378
+ span{display: inline-block;width: calc(100% - 20px);vertical-align: middle;line-height: 1.2;}
1379
+ }
1380
+
1381
+ &:hover,
1382
+ &.current {
1383
+ .f-name {
1384
+ background-color: #fbfdfe;
1385
+ color: $baseColor;
1386
+ }
1387
+ .second-list {
1388
+ display: block;
1389
+ }
1390
+ }
1391
+ }
1392
+ }
1393
+
1394
+
1395
+ */
1396
+ .second-list {
1397
+ display: none;
1398
+ position: absolute;
1399
+ left: $sideBarWidth;
1400
+ padding-left: 2px;
1401
+ top: 0.5px;
1402
+ // &:before {
1403
+ // content: "";
1404
+ // top: 22px;
1405
+ // bottom: 22px;
1406
+ // background-color: $baseColor;
1407
+ // width: 2px;
1408
+ // position: absolute;
1409
+ // left: 24px;
1410
+ // }
1411
+ > div {
1412
+ background: #fbfdfe;
1413
+ border: solid 1px $baseColor;
1414
+ top: -0.5px;
1415
+ padding: 24px 0;
1416
+ border-radius: 8px;
1417
+ margin-left: 9px;
1418
+ max-height: calc(84vh);
1419
+ overflow-y: auto;
1420
+ overflow-x: hidden;
1421
+ width: 458px;
1422
+ }
1423
+
1424
+ .ico-arrow {
1425
+ border-top: solid 7px transparent;
1426
+ border-bottom: solid 7px transparent;
1427
+ border-right: solid 7px $baseColor;
1428
+ position: absolute;
1429
+ left: 2px;
1430
+ top: 8px;
1431
+ }
1432
+
1433
+ &.on {
1434
+ display: block;
1435
+ }
1436
+
1437
+ .tit {
1438
+ width: auto;
1439
+ /* text-align: center; */
1440
+ /* background: #22507614; */
1441
+ color: $baseColor;
1442
+ /* border: dashed 1px #1d4667; */
1443
+ padding: 0 0 10px;
1444
+ /* border-radius: 6px; */
1445
+ /* margin: 5px auto; */
1446
+ margin: 0 22px;
1447
+ display: block;
1448
+ border-bottom: solid 1px #eee;
1449
+
1450
+ i,
1451
+ span {
1452
+ opacity: 1;
1453
+ vertical-align: middle;
1454
+ margin-right: 7px;
1455
+ font-size: 18px;
1456
+ }
1457
+
1458
+ span {
1459
+ font-size: 14px;
1460
+ }
1461
+ }
1462
+
1463
+ dl {
1464
+ padding: 8px 16px 3px 24px;
1465
+ margin-top: 0;
1466
+ margin-bottom: 0;
1467
+ display: inline-block;
1468
+ width: 50%;
1469
+ position: relative;
1470
+ word-break: break-all;
1471
+
1472
+ &:after {
1473
+ content: "";
1474
+ width: 1px;
1475
+ height: 14px;
1476
+ background: #e4e4e4;
1477
+ display: inline-block;
1478
+ position: absolute;
1479
+ right: -5px;
1480
+ top: 50%;
1481
+ margin-top: -3px;
1482
+ }
1483
+
1484
+ .s-name {
1485
+ color: $baseColor;
1486
+ display: inline-block;
1487
+ width: 190px;
1488
+ font-size: 14px;
1489
+ vertical-align: top;
1490
+ margin-top: 11px;
1491
+ text-align: right;
1492
+
1493
+ i {
1494
+ margin-left: 5px;
1495
+
1496
+ &.icon {
1497
+ font-size: 13px;
1498
+ opacity: 0.92;
1499
+ margin-left: 2px;
1500
+ margin-right: 4px;
1501
+ }
1502
+ }
1503
+ }
1504
+
1505
+ .item {
1506
+ position: relative;
1507
+ border: dashed 1px #fff;
1508
+ border-radius: 6px;
1509
+ display: block;
1510
+ padding: 6px 8px 6px 27px;
1511
+ cursor: pointer;
1512
+
1513
+ &:hover {
1514
+ border-color: $baseColor;
1515
+ color: $baseColor;
1516
+
1517
+ i,
1518
+ a {
1519
+ color: $baseColor;
1520
+ }
1521
+ }
1522
+
1523
+ // &:after {
1524
+ // content: "";
1525
+ // width: 1px;
1526
+ // height: 12px;
1527
+ // background: #dcdcdc;
1528
+ // position: absolute;
1529
+ // right: -25px;
1530
+ // top: 2px
1531
+ // }
1532
+
1533
+ i {
1534
+ opacity: 0.8;
1535
+ margin-right: 8px;
1536
+ vertical-align: middle;
1537
+ position: absolute;
1538
+ left: 4px;
1539
+ top: 50%;
1540
+ margin-top: -11px;
1541
+ height: 22px;
1542
+ line-height: 22px;
1543
+ font-size: 16px;
1544
+ }
1545
+
1546
+ a {
1547
+ color: rgba(0, 0, 0, 0.82);
1548
+ display: inline-block;
1549
+ font-size: 13px;
1550
+ position: relative;
1551
+ overflow: initial !important;
1552
+ -webkit-transition: all 0.2s ease-in;
1553
+ -moz-transition: all 0.2s ease-in;
1554
+ -o-transition: all 0.2s ease-in;
1555
+ transition: all 0.2s ease-in;
1556
+ width: auto !important;
1557
+ vertical-align: middle;
1558
+ word-break: break-word;
1559
+
1560
+ &:hover {
1561
+ color: $baseColor;
1562
+
1563
+ // &:after {
1564
+ // content: '';
1565
+ // position: absolute;
1566
+ // bottom: -4px;
1567
+ // left: 0;
1568
+ // right: 0;
1569
+ // border-bottom: solid 1px $baseColor;
1570
+ // }
1571
+ }
1572
+ }
1573
+ }
1574
+
1575
+ &:last-child {
1576
+ .list-box {
1577
+ border-bottom: none;
1578
+ }
1579
+ }
1580
+ }
1581
+ }
1582
+ // .el-submenu .el-menu {
1583
+ // height: auto !important;
1584
+ // }
1585
+ .el-menu--vertical {
1586
+ > .el-menu--popup {
1587
+ overflow: auto; //不用atuo 超出不出滚动条
1588
+ .el-submenu__title,
1589
+ .el-menu-item {
1590
+ height: auto !important;
1591
+ line-height: 1.4 !important;
1592
+ padding: 8px 0;
1593
+ text-align: left;
1594
+ white-space: normal;
1595
+ word-break: break-word;
1596
+ background: none;
1597
+ i.iconfont {
1598
+ color: #fff;
1599
+ margin-right: 8px;
1600
+ }
1601
+ }
1602
+ }
1603
+ .el-submenu {
1604
+ .el-submenu__title {
1605
+ .el-submenu__icon-arrow {
1606
+ display: none;
1607
+ }
1608
+ }
1609
+ &:hover {
1610
+ .el-submenu__title {
1611
+ background-color: rgba(0, 0, 0, 0.29) !important;
1612
+ i.iconfont {
1613
+ color: $baseColor;
1614
+ }
1615
+ }
1616
+ }
1617
+
1618
+ &.is-opened {
1619
+ .el-submenu__title {
1620
+ background-color: rgba(0, 0, 0, 0.29) !important;
1621
+ i.iconfont {
1622
+ color: $baseColor;
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ .el-menu-item {
1628
+ &:hover {
1629
+ background-color: rgba(0, 0, 0, 0.29) !important;
1630
+ i.iconfont {
1631
+ color: $baseColor;
1632
+ }
1633
+ }
1634
+
1635
+ &.is-opened {
1636
+ background-color: rgba(0, 0, 0, 0.29) !important;
1637
+ i.iconfont {
1638
+ color: $baseColor;
1639
+ }
1640
+ }
1641
+ }
1642
+ // .el-menu-item{
1643
+ // &:hover{
1644
+ // background:#FFF !important;opacity:1;
1645
+ // span{color:$baseColor}
1646
+ // i.iconfont{color:$baseColor}
1647
+ // }
1648
+ // &.is-opened{
1649
+ // background:#FFF;opacity:1;
1650
+ // span{color:$baseColor}
1651
+ // i.iconfont{color:$baseColor}
1652
+ // }
1653
+ // }
1654
+ }
1655
+ </style>