cloud-web-corejs-haier 1.0.5 → 1.0.6

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