qj-common 4.3.0 → 4.3.2

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 (229) hide show
  1. package/.babelrc +12 -12
  2. package/.eslintrc.js +25 -25
  3. package/.idea/common.iml +11 -11
  4. package/.idea/modules.xml +7 -7
  5. package/.idea/vcs.xml +5 -5
  6. package/.postcssrc.js +9 -9
  7. package/.prettierrc.js +7 -7
  8. package/.project +37 -37
  9. package/README.md +2 -2
  10. package/gulpfile.js +20 -20
  11. package/package.json +18 -18
  12. package/src/api/apimanage.js +146 -146
  13. package/src/api/common/index.js +192 -192
  14. package/src/api/login.js +160 -160
  15. package/src/api/shopFbu.js +515 -515
  16. package/src/api/upload.js +8 -8
  17. package/src/components/Bounced/index.vue +145 -145
  18. package/src/components/Breadcrumb/index.vue +71 -71
  19. package/src/components/Checkbox/index.vue +53 -53
  20. package/src/components/Hamburger/index.vue +48 -48
  21. package/src/components/Logistics/logic.vue +186 -186
  22. package/src/components/ScrollBar/index.vue +60 -60
  23. package/src/components/Sticky/index.vue +76 -76
  24. package/src/components/SvgIcon/index.vue +42 -42
  25. package/src/components/ThemePicker/index.vue +243 -243
  26. package/src/components/Tinymce/components/editorImage.vue +94 -94
  27. package/src/components/Tinymce/index.vue +166 -166
  28. package/src/components/Tinymce/plugins.js +7 -7
  29. package/src/components/Tinymce/toolbar.js +6 -6
  30. package/src/components/TreeTable/customEval.js +44 -44
  31. package/src/components/TreeTable/eval.js +29 -29
  32. package/src/components/TreeTable/index.vue +124 -124
  33. package/src/components/TreeTable/readme.md +89 -89
  34. package/src/components/TreeTableApi/customEval.js +49 -49
  35. package/src/components/TreeTableApi/eval.js +29 -29
  36. package/src/components/TreeTableApi/index.vue +124 -124
  37. package/src/components/TreeTableApi/readme.md +89 -89
  38. package/src/components/Upload/singleImage.vue +123 -123
  39. package/src/components/Upload/singleImage2.vue +118 -118
  40. package/src/components/Upload/singleImage3.vue +138 -138
  41. package/src/components/Upload/upload.vue +295 -295
  42. package/src/components/workOrderList/index.vue +158 -158
  43. package/src/dependencies.js +119 -119
  44. package/src/iconShop/demo.css +539 -539
  45. package/src/iconShop/demo_index.html +8445 -8445
  46. package/src/iconShop/iconfont.css +1451 -1451
  47. package/src/iconShop/iconfont.json +2522 -2522
  48. package/src/iconShop/iconfont.svg +1070 -1070
  49. package/src/iconfont/demo.css +539 -539
  50. package/src/iconfont/demo_index.html +5276 -5276
  51. package/src/iconfont/iconfont.css +905 -905
  52. package/src/iconfont/iconfont.json +1563 -1563
  53. package/src/iconfont/iconfont.svg +692 -692
  54. package/src/icons/index.js +9 -9
  55. package/src/lang/e.js +48 -48
  56. package/src/lang/en.js +48 -48
  57. package/src/lang/zh.js +48 -48
  58. package/src/main.js +62 -62
  59. package/src/permission.js +283 -283
  60. package/src/permissionForMall.backup.js +375 -375
  61. package/src/permissionForMall.js +375 -375
  62. package/src/preset.js +67 -67
  63. package/src/router/_import_common.js +1 -1
  64. package/src/router/_import_development.js +1 -1
  65. package/src/router/_import_production.js +1 -1
  66. package/src/store/getters.js +39 -39
  67. package/src/store/index.js +18 -18
  68. package/src/store/modules/app.js +34 -30
  69. package/src/store/modules/menu.js +82 -82
  70. package/src/store/modules/user.js +227 -227
  71. package/src/styles/element-ui.scss +1368 -1368
  72. package/src/styles/index.scss +166 -166
  73. package/src/styles/mixin.scss +27 -27
  74. package/src/styles/pc-ui.scss +1031 -1031
  75. package/src/styles/scrollBar.scss +21 -21
  76. package/src/styles/sidebar.scss +123 -123
  77. package/src/styles/transition.scss +32 -32
  78. package/src/styles/variables.scss +44 -44
  79. package/src/styles/wf-ui.scss +86 -86
  80. package/src/utils/auth.js +57 -57
  81. package/src/utils/dom.js +12 -12
  82. package/src/utils/getQueryString.js +5 -5
  83. package/src/utils/import.js +5 -5
  84. package/src/utils/index.js +355 -355
  85. package/src/utils/interceptor.js +34 -34
  86. package/src/utils/menu.js +116 -116
  87. package/src/utils/proapp.js +35 -35
  88. package/src/utils/query.js +26 -26
  89. package/src/utils/request.js +366 -366
  90. package/src/utils/routeMapping.js +39 -39
  91. package/src/utils/routeMapping.json +310 -310
  92. package/src/utils/utils.js +84 -84
  93. package/src/utils/validate.js +102 -102
  94. package/src/views/404.vue +72 -72
  95. package/src/views/Layout.vue +106 -106
  96. package/src/views/imgSwiper/index.vue +34 -34
  97. package/src/views/layout/Layout.vue +181 -170
  98. package/src/views/layout/components/AppMain.vue +20 -20
  99. package/src/views/layout/components/Footer.vue +22 -22
  100. package/src/views/layout/components/LeftNavbar.vue +318 -310
  101. package/src/views/layout/components/NavMenu.vue +15 -15
  102. package/src/views/layout/components/Navbar.vue +664 -661
  103. package/src/views/layout/components/Sidebar/SidebarItem.vue +116 -113
  104. package/src/views/layout/components/Sidebar/index.vue +203 -193
  105. package/src/views/layout/components/index.js +19 -19
  106. package/src/views/layout/theme/darkBlue/Layout.vue +140 -140
  107. package/src/views/layout/theme/darkBlue/components/AppMain.vue +38 -38
  108. package/src/views/layout/theme/darkBlue/components/Footer.vue +147 -147
  109. package/src/views/layout/theme/darkBlue/components/LeftNavbar(/345/261/225/347/244/272/345/205/250/351/203/250/350/217/234/345/215/225).vue +448 -448
  110. package/src/views/layout/theme/darkBlue/components/LeftNavbar.3.vue +191 -191
  111. package/src/views/layout/theme/darkBlue/components/LeftNavbar.vue +466 -466
  112. package/src/views/layout/theme/darkBlue/components/Navbar.vue +200 -200
  113. package/src/views/layout/theme/darkBlue/components/Sidebar/SidebarItem.vue +71 -71
  114. package/src/views/layout/theme/darkBlue/components/Sidebar/index.vue +49 -49
  115. package/src/views/layout/theme/darkBlue/components/index.js +15 -15
  116. package/src/views/layout-default/Layout.vue +134 -134
  117. package/src/views/layout-default/components/AppMain.vue +19 -19
  118. package/src/views/layout-default/components/Footer.vue +22 -22
  119. package/src/views/layout-default/components/LeftNavbar.vue +164 -164
  120. package/src/views/layout-default/components/Navbar.vue +295 -295
  121. package/src/views/layout-default/components/Sidebar/SidebarItem.vue +67 -67
  122. package/src/views/layout-default/components/Sidebar/index.vue +59 -59
  123. package/src/views/layout-default/components/index.js +4 -4
  124. package/src/views/layout-default/theme/darkBlue/Layout.vue +140 -140
  125. package/src/views/layout-default/theme/darkBlue/components/AppMain.vue +38 -38
  126. package/src/views/layout-default/theme/darkBlue/components/Footer.vue +147 -147
  127. package/src/views/layout-default/theme/darkBlue/components/LeftNavbar.vue +465 -465
  128. package/src/views/layout-default/theme/darkBlue/components/Navbar.vue +200 -200
  129. package/src/views/layout-default/theme/darkBlue/components/Sidebar/SidebarItem.vue +69 -69
  130. package/src/views/layout-default/theme/darkBlue/components/Sidebar/index.vue +49 -49
  131. package/src/views/layout-default/theme/darkBlue/components/index.js +15 -15
  132. package/src/views/pc/Internationalization.vue +80 -80
  133. package/src/views/pc/default/Layout.vue +442 -442
  134. package/src/views/pc/default/LayoutCard.vue +424 -424
  135. package/src/views/pc/default/assets/flex.scss +99 -99
  136. package/src/views/pc/default/footer-modules/DgFooter/index.vue +179 -179
  137. package/src/views/pc/default/footer-modules/DgFooter/indexSDX.vue +187 -187
  138. package/src/views/pc/default/footer-modules/footer.vue +171 -171
  139. package/src/views/pc/default/footer-modules/footerAns.vue +167 -167
  140. package/src/views/pc/default/footer-modules/footerBulk.vue +169 -169
  141. package/src/views/pc/default/footer-modules/footerDM.vue +254 -254
  142. package/src/views/pc/default/footer-modules/footerDefault.vue +267 -267
  143. package/src/views/pc/default/footer-modules/footerDefaultA.vue +270 -270
  144. package/src/views/pc/default/footer-modules/footerDefaultNew.vue +201 -201
  145. package/src/views/pc/default/footer-modules/footerHDB.vue +153 -153
  146. package/src/views/pc/default/footer-modules/footerHy.vue +63 -63
  147. package/src/views/pc/default/footer-modules/footerKYW.vue +163 -163
  148. package/src/views/pc/default/footer-modules/footerMh.vue +30 -30
  149. package/src/views/pc/default/footer-modules/footerNew.vue +116 -116
  150. package/src/views/pc/default/footer-modules/footer_yzj.vue +169 -169
  151. package/src/views/pc/default/footer-modules/footerayd.vue +85 -85
  152. package/src/views/pc/default/footer-modules/ymFooter.vue +154 -154
  153. package/src/views/pc/default/footer-modules/zgl.vue +250 -250
  154. package/src/views/pc/default/header-modules/DgHeader/Logo.vue +57 -57
  155. package/src/views/pc/default/header-modules/DgHeader/Search.vue +135 -135
  156. package/src/views/pc/default/header-modules/DgHeader/Settleup.vue +46 -46
  157. package/src/views/pc/default/header-modules/DgHeader/index.vue +38 -38
  158. package/src/views/pc/default/header-modules/active.vue +177 -177
  159. package/src/views/pc/default/header-modules/header.vue +97 -97
  160. package/src/views/pc/default/header-modules/headerA.vue +142 -142
  161. package/src/views/pc/default/header-modules/headerFLPT.vue +157 -157
  162. package/src/views/pc/default/header-modules/headerMh.vue +187 -187
  163. package/src/views/pc/default/header-modules/headerNew.vue +121 -121
  164. package/src/views/pc/default/header-modules/headerSDX.vue +304 -304
  165. package/src/views/pc/default/header-modules/headerStyle2.vue +173 -173
  166. package/src/views/pc/default/header-modules/headerStyle3.vue +190 -190
  167. package/src/views/pc/default/header-modules/headerStyle4.vue +163 -163
  168. package/src/views/pc/default/header-modules/headerStyleAns.vue +400 -400
  169. package/src/views/pc/default/header-modules/headerStyleBulk.vue +427 -427
  170. package/src/views/pc/default/header-modules/headerStyleDefalut.vue +209 -209
  171. package/src/views/pc/default/header-modules/headerStyleKYW.vue +435 -435
  172. package/src/views/pc/default/header-modules/headerStyle_yzj.vue +427 -427
  173. package/src/views/pc/default/header-modules/headerayd.vue +187 -187
  174. package/src/views/pc/default/header-modules/index.vue +466 -466
  175. package/src/views/pc/default/header-modules/ymHeader.vue +292 -292
  176. package/src/views/pc/default/header-modules/ysHeader.vue +248 -248
  177. package/src/views/pc/default/header-modules/zgl.vue +855 -855
  178. package/src/views/pc/default/leftMenu-modules/leftMenu-logo.vue +194 -194
  179. package/src/views/pc/default/leftMenu-modules/leftMenu-style2.vue +206 -206
  180. package/src/views/pc/default/leftMenu-modules/leftMenu-style3.vue +207 -207
  181. package/src/views/pc/default/leftMenu-modules/leftMenu-style4.vue +192 -192
  182. package/src/views/pc/default/leftMenu-modules/leftMenu.vue +183 -183
  183. package/src/views/pc/default/leftMenu-modules/leftMenuDefault.vue +212 -212
  184. package/src/views/pc/default/leftMenu-modules/leftMenuDefaultEn.vue +214 -214
  185. package/src/views/pc/default/leftMenu-modules/leftMenuDefaultFLPT.vue +220 -220
  186. package/src/views/pc/default/leftMenu-modules/leftMenuDefaultayd.vue +220 -220
  187. package/src/views/pc/default/nav-modules/nav.vue +52 -52
  188. package/src/views/pc/default/nav-modules/navAns.vue +60 -60
  189. package/src/views/pc/default/nav-modules/navBulk.vue +60 -60
  190. package/src/views/pc/default/top-modules/DgTopShortcut/index.vue +177 -177
  191. package/src/views/pc/default/top-modules/Toplg.vue +280 -280
  192. package/src/views/pc/default/top-modules/topA.vue +136 -136
  193. package/src/views/pc/default/top-modules/topAns.vue +261 -261
  194. package/src/views/pc/default/top-modules/topAns_yzj.vue +282 -282
  195. package/src/views/pc/default/top-modules/topBar.vue +304 -304
  196. package/src/views/pc/default/top-modules/topBulk.vue +280 -280
  197. package/src/views/pc/default/top-modules/topDefault.vue +244 -244
  198. package/src/views/pc/default/top-modules/topDefaultDM.vue +197 -197
  199. package/src/views/pc/default/top-modules/topDefaultNew.vue +271 -271
  200. package/src/views/pc/default/top-modules/topFLPT.vue +197 -197
  201. package/src/views/pc/default/top-modules/topHDB.vue +479 -479
  202. package/src/views/pc/default/top-modules/topKYW.vue +258 -258
  203. package/src/views/pc/default/top-modules/topMh.vue +174 -174
  204. package/src/views/pc/default/top-modules/topNew.vue +97 -97
  205. package/src/views/pc/default/top-modules/topSDX.vue +298 -298
  206. package/src/views/pc/default/top-modules/topSimple.vue +247 -247
  207. package/src/views/pc/default/top-modules/topSimpleHy.vue +256 -256
  208. package/src/views/pc/default/top-modules/topUcc.vue +264 -264
  209. package/src/views/pc/default/top-modules/topayd.vue +170 -170
  210. package/src/views/pc/default/top-modules/ymTop.vue +299 -299
  211. package/src/views/pc/default/top-modules/zgltop.vue +499 -499
  212. package/src/views/routerView.vue +9 -9
  213. package/src/views/templates/components/temp-select.vue +80 -80
  214. package/src/views/templates/components/temp-upload.vue +233 -233
  215. package/src/views/templates/readme.md +2 -2
  216. package/src/views/templates/templateInput.vue +421 -421
  217. package/src/views/templates/templateReadme.html +588 -588
  218. package/src/views/templates/templateReadme.md +619 -619
  219. package/src/views/templates/templateTable.vue +2243 -2243
  220. package/src/views/templates/templateTableData.vue +1883 -1883
  221. package/src/views/templates/templateUi/templateTableContent.vue +187 -187
  222. package/src/views/treeTemplate/index.vue +559 -559
  223. package/src/views/treeTemplate/treeTemplate.md +274 -274
  224. package/src/views/uploadDialog/index copy.vue +352 -352
  225. package/src/views/uploadDialog/index.vue +558 -558
  226. package/src/views/uploadDialog/indexOlay.vue +582 -582
  227. package/src/views/uploadDialog/indexPM.vue +578 -578
  228. package/src/views/uploadDialog/indexUpload.vue +543 -543
  229. package/src/views/uploadDialog/readme.md +45 -45
@@ -1,466 +1,466 @@
1
- <template>
2
- <div
3
- :class="{'is-active':sidebar.appNavOpen}"
4
- class="el-menu-vertical-demo"
5
- :style="{height:height+'px'}"
6
- >
7
- <!-- <div class="top-logo">
8
- <img src="../assets/logo.png">
9
- </div>-->
10
- <div class="tool-menu-svg">
11
- <a class="header-container">
12
- <div class="header-img">
13
- <i class="user-icon"></i>
14
- </div>
15
- <span>{{$store.state.user.name}}</span>
16
- </a>
17
- <a class="my-youfu">{{memberName}}</a>
18
- </div>
19
- <div class="el-container-box">
20
- <div class="el-menu-box">
21
- <ul
22
- class="el-menu-ul"
23
- v-for="(item,index) in userLeftRouter.list"
24
- :key="index"
25
- v-if="!item.menuTarget"
26
- >
27
- <li
28
- class="active"
29
- v-for="(itemChild,indexChild) in (item.children ? item.children : [])"
30
- :key="indexChild"
31
- >
32
- <a class="active" @click="menuLi($event)">
33
- <i
34
- class="iconfont"
35
- :class="itemChild.proappMenuRemark ? itemChild.proappMenuRemark :'icon-caidan-shi'"
36
- ></i>
37
- {{itemChild.menuName}}
38
- </a>
39
- <ol v-if="itemChild.children!==null">
40
- <li
41
- v-for="(itemOl,indexOl) in itemChild.children"
42
- :key="indexOl"
43
- :class="[$route.path == '/'+itemOl.menuAction ? 'active':'',itemOl.menuAction]"
44
- v-if=" !itemOl.menuTarget"
45
- >
46
- <div class="el-li-title">
47
- <a @click="menuHref(item.menuAction,itemOl,2)">
48
- <em></em>
49
- <span></span>
50
- {{itemOl.menuName}}
51
- </a>
52
- <i
53
- v-if="itemOl.children!==null"
54
- :class="[iconStatic? 'el-icon-minus':'el-icon-plus', 'el-icon']"
55
- @click="menuIcon($event)"
56
- ></i>
57
- </div>
58
- <dl v-if="itemOl.children!==null" class="el-dl-list-box">
59
- <dd
60
- v-for="(itemDd,indexDd) in itemOl.children"
61
- :key="indexDd"
62
- :class="[$route.path.split('/')[2] == itemDd.menuAction ? 'is-active3':'']"
63
- v-if=" !itemDd.menuTarget"
64
- >
65
- <a
66
- class="el-dd-list"
67
- @click="menuHref(item.menuAction,itemDd,3)"
68
- >{{itemDd.menuName}}</a>
69
- </dd>
70
- </dl>
71
- </li>
72
- </ol>
73
- </li>
74
- </ul>
75
- </div>
76
- </div>
77
- </div>
78
- </template>
79
-
80
- <script>
81
- import { mapGetters } from "vuex";
82
-
83
- export default {
84
- data() {
85
- return {
86
- appActive: process.env.APP_PATH, // 当前点击的项目名称
87
- height: document.documentElement.clientHeight - 85,
88
- heightBox: document.documentElement.clientHeight - 355,
89
- isCollapse: true,
90
- iconStatic: false,
91
- memberName: "会员中心", //会员中心账户名
92
- userLeftRouter: []
93
- };
94
- },
95
- beforeMounted() {
96
- console.log(this.appList, "appListappList");
97
- this.appList.forEach(el => {
98
- if (el.menuDefaultClass === "user") {
99
- this.memberName = el.menuName ? el.menuName : "会员中心";
100
- let memberRouter = el.children ? el.children : [];
101
- memberRouter.forEach(item => {
102
- this.userLeftRouter =
103
- item.menuDefaultClass === "userLeftRouter" && item.children
104
- ? item.children
105
- : [];
106
- });
107
- }
108
- });
109
- },
110
- mounted() {
111
- window.addEventListener("resize", this.heightChange);
112
- //先判断是几级菜单,现在的是二级菜单
113
- if (document.querySelector(".active")) {
114
- //表示二级菜单
115
- document.querySelector(".active").parentNode.parentNode.className =
116
- "active";
117
- } else if (document.querySelector(".is-active3")) {
118
- //三级菜单
119
- let obj = document.querySelector(".is-active3");
120
- console.log(obj, "obj");
121
- this.iconStatic = true;
122
- obj.parentNode.parentNode.childNodes[0].classList.add("active");
123
- obj.parentNode.parentNode.parentNode.parentNode.childNodes[0].classList.add(
124
- "active"
125
- );
126
- obj.className = "active";
127
- }
128
- },
129
- computed: {
130
- ...mapGetters(["appList", "sidebar"])
131
- },
132
- watch: {},
133
- methods: {
134
- // toggle(index) {
135
- // this.checkindex = index;
136
- // },
137
- menuLi(e) {
138
- //点击显示二级菜单
139
- //点击添加class
140
- e.target.classList.toggle("active");
141
- },
142
- menuIcon(e) {
143
- //点击显示三级菜单
144
- e.target.parentNode.classList.toggle("active");
145
- if (e.target.className.indexOf("el-icon-plus") >= 0) {
146
- e.target.classList.remove("el-icon-plus");
147
- e.target.classList.add("el-icon-minus");
148
- } else {
149
- e.target.classList.remove("el-icon-minus");
150
- e.target.classList.add("el-icon-plus");
151
- }
152
- },
153
- handleSelect(key, keyPath) {
154
- if (!key) {
155
- return;
156
- }
157
- var url = "";
158
- this.appList.list.forEach(item => {
159
- if (item.menuJspath === key) {
160
- url = item.menuAction;
161
- }
162
- });
163
- window.location.href = url;
164
- console.log(key, keyPath);
165
- },
166
- handleOpen(key, keyPath) {
167
- console.log(key, keyPath);
168
- },
169
- handleClose(key, keyPath) {
170
- console.log(key, keyPath);
171
- },
172
- heightChange() {
173
- this.height = document.documentElement.clientHeight - 58 - 40;
174
- },
175
- menuHref(menuAction, item, index) {
176
- let path =
177
- index === 2
178
- ? "/" + item.menuAction
179
- : "/" + item.proappMenuPcode + "/" + item.menuAction;
180
- // index===2 是二级菜单,3是三级菜单
181
- if (item.children === null) {
182
- //可跳转
183
- if (location.href.indexOf("localhost") >= 0) {
184
- //localhost表示本地跳转
185
-
186
- this.$router.push({
187
- path: path
188
- });
189
-
190
- this.$store.commit("MENUTITLE", item.menuName);
191
- } else {
192
- if (location.href.indexOf(menuAction) >= 0) {
193
- //表示线上同源下跳转
194
- this.$router.push({
195
- path: path
196
- });
197
- this.$store.commit("MENUTITLE", item.menuName);
198
- } else {
199
- location.href = menuAction + "#" + path;
200
- }
201
- }
202
- }
203
- }
204
- }
205
- };
206
- </script>
207
-
208
- <style rel="stylesheet" scoped>
209
- .el-menu-ul ol {
210
- display: none;
211
- margin-left: 7px;
212
- /* transition: all 0.5s cubic-bezier(0, 1, 0.5, 1);
213
- transform: translateY(0); */
214
- }
215
- .el-menu-ul li ol li.active .el-dl-list-box,
216
- .el-menu-ul ol.active,
217
- .el-menu-ul li a.active + ol {
218
- display: block;
219
- }
220
-
221
- .el-menu-ul .active ol,
222
- .el-menu-ul .active + ol {
223
- display: block;
224
- }
225
-
226
- .el-menu-vertical-demo {
227
- width: 196px;
228
- margin-top: 12px;
229
- }
230
- .user-icon {
231
- display: block;
232
- height: 80px;
233
- overflow: hidden;
234
- background: url("../../../../../assets/nav/admin.png") center no-repeat;
235
- }
236
- .top-logo {
237
- height: 120px;
238
- line-height: 120px;
239
- text-align: center;
240
- margin-bottom: 2px;
241
- background: #fff;
242
- }
243
- .top-logo img {
244
- height: 70px;
245
- }
246
- .el-menu-vertical-demo {
247
- background: none;
248
- }
249
- .el-menu-vertical-demo.is-active {
250
- width: 50px;
251
- }
252
- .el-menu-vertical {
253
- width: 100%;
254
- height: 100%;
255
- border-right: none;
256
- }
257
-
258
- .el-menu-item:hover,
259
- .el-menu-item:hover a,
260
- .el-menu-item:hover a i {
261
- background: #f1f8ff !important;
262
- }
263
- .el-menu-item.is-active,
264
- .el-menu-item.is-active a,
265
- .el-menu-item.is-active a i {
266
- background: #f1f8ff !important;
267
- }
268
-
269
- .header-img {
270
- display: inline-block;
271
- width: 80px;
272
- height: 80px;
273
- border-radius: 50%;
274
- background: #eee;
275
- margin: 20px 0 0px;
276
- text-align: center;
277
- }
278
- .header-container {
279
- display: block;
280
- }
281
- .header-container span {
282
- display: block;
283
- color: #666;
284
- line-height: 30px;
285
- }
286
- .el-submenu .el-menu-item {
287
- min-width: 196px;
288
- }
289
- .tool-menu-svg {
290
- font-size: 14px;
291
- width: 196px;
292
- /*height: 150px;*/
293
- text-align: center;
294
- /*position: absolute;*/
295
- z-index: 12;
296
- background: #fff;
297
- border-bottom: solid 1px #eee;
298
- padding-bottom: 10px;
299
- /* box-shadow: -5px 2px 10px 0 #333; */
300
- }
301
- .my-youfu {
302
- display: block;
303
- height: 50px;
304
- line-height: 50px;
305
- background: #f1f8ff;
306
- color: #2171d2;
307
- margin-top: 30px;
308
- position: relative;
309
- }
310
- .my-youfu:after {
311
- content: "";
312
- display: block;
313
- width: 4px;
314
- background: #2171d2;
315
- position: absolute;
316
- right: -4px;
317
- height: 100%;
318
- top: 0;
319
- }
320
- .app-scroll-container {
321
- /* margin-top: 72px;
322
- padding-bottom: 72px;*/
323
- margin-top: 60px;
324
- }
325
- .app-scroll-container.scroll-container {
326
- background: #fff;
327
- }
328
- .el-menu-custom {
329
- margin-left: 34px;
330
- width: 140px;
331
- }
332
- .el-menu-list {
333
- /* border-top: 1px solid #666; */
334
- min-width: 160px !important;
335
- border-left: 1px solid #999;
336
- padding: 0px !important;
337
- }
338
- .el-menu-ul a {
339
- overflow: hidden;
340
- text-overflow: ellipsis;
341
- white-space: nowrap;
342
- }
343
- .el-menu-list i {
344
- width: 20px;
345
- height: 1px;
346
- background: #999;
347
- display: inline-block;
348
- }
349
- .el-menu-list span {
350
- display: inline-block;
351
- width: 6px;
352
- height: 6px;
353
- border-radius: 50%;
354
- background: #999;
355
- margin-right: 6px;
356
- }
357
-
358
- .el-menu-ul {
359
- margin: 0px 15px;
360
- width: 166px;
361
- font-size: 14px;
362
- line-height: 42px;
363
- -webkit-user-select: none;
364
- -moz-user-select: none;
365
- -ms-user-select: none;
366
- user-select: none;
367
- }
368
- .el-dl-list-box {
369
- display: none;
370
- }
371
- .el-dl-list-box a {
372
- display: block;
373
- }
374
- .el-menu-ul ol li {
375
- position: relative;
376
- }
377
- .el-menu-ul ol li:last-child .el-dl-list-box a::before {
378
- content: "";
379
- position: absolute;
380
- left: 0;
381
- background: #999;
382
- width: 1px;
383
- z-index: 10;
384
- height: 0px;
385
- }
386
- .el-dl-list-box a::before {
387
- content: "";
388
- position: absolute;
389
- left: 0;
390
- background: #999;
391
- width: 1px;
392
- z-index: 10;
393
- height: 44px;
394
- }
395
-
396
- .el-menu-ul ol li::before {
397
- content: "";
398
- position: absolute;
399
- left: 0;
400
- background: #999;
401
- width: 1px;
402
- z-index: 10;
403
- height: 44px;
404
- }
405
- .el-menu-ul ol li:last-child::before {
406
- content: "";
407
- position: absolute;
408
- left: 0;
409
- background: #999;
410
- width: 1px;
411
- z-index: 10;
412
- height: 23px;
413
- }
414
- .el-menu-ul i {
415
- font-size: 16px;
416
- margin-right: 5px;
417
- display: inline-block;
418
- }
419
- .el-menu-box a {
420
- color: #666;
421
- }
422
- .el-menu-box {
423
- position: relative;
424
- }
425
- .el-menu-box ~ .el-menu-box {
426
- /* border-top: 1px solid #eee; */
427
- margin-top: 20px;
428
- }
429
- .el-container-box {
430
- background: #fff;
431
- /*margin-top: 150px;*/
432
- overflow-x: hidden;
433
- overflow-y: auto;
434
- }
435
-
436
- .el-li-title span {
437
- display: inline-block;
438
- width: 6px;
439
- height: 6px;
440
- border-radius: 50%;
441
- background: #999;
442
- margin-right: 6px;
443
- }
444
- .el-li-title.active + dl {
445
- display: block;
446
- }
447
- .el-li-title em {
448
- width: 15px;
449
- height: 1px;
450
- background: #999;
451
- display: inline-block;
452
- vertical-align: middle;
453
- }
454
- .el-dd-list {
455
- display: block;
456
- font-size: 12px;
457
- color: #999;
458
- padding-left: 45px;
459
- }
460
- .el-li-title i.el-icon {
461
- font-size: 12px;
462
- margin-left: 5px;
463
- cursor: pointer;
464
- }
465
- </style>
466
-
1
+ <template>
2
+ <div
3
+ :class="{'is-active':sidebar.appNavOpen}"
4
+ class="el-menu-vertical-demo"
5
+ :style="{height:height+'px'}"
6
+ >
7
+ <!-- <div class="top-logo">
8
+ <img src="../assets/logo.png">
9
+ </div>-->
10
+ <div class="tool-menu-svg">
11
+ <a class="header-container">
12
+ <div class="header-img">
13
+ <i class="user-icon"></i>
14
+ </div>
15
+ <span>{{$store.state.user.name}}</span>
16
+ </a>
17
+ <a class="my-youfu">{{memberName}}</a>
18
+ </div>
19
+ <div class="el-container-box">
20
+ <div class="el-menu-box">
21
+ <ul
22
+ class="el-menu-ul"
23
+ v-for="(item,index) in userLeftRouter.list"
24
+ :key="index"
25
+ v-if="!item.menuTarget"
26
+ >
27
+ <li
28
+ class="active"
29
+ v-for="(itemChild,indexChild) in (item.children ? item.children : [])"
30
+ :key="indexChild"
31
+ >
32
+ <a class="active" @click="menuLi($event)">
33
+ <i
34
+ class="iconfont"
35
+ :class="itemChild.proappMenuRemark ? itemChild.proappMenuRemark :'icon-caidan-shi'"
36
+ ></i>
37
+ {{itemChild.menuName}}
38
+ </a>
39
+ <ol v-if="itemChild.children!==null">
40
+ <li
41
+ v-for="(itemOl,indexOl) in itemChild.children"
42
+ :key="indexOl"
43
+ :class="[$route.path == '/'+itemOl.menuAction ? 'active':'',itemOl.menuAction]"
44
+ v-if=" !itemOl.menuTarget"
45
+ >
46
+ <div class="el-li-title">
47
+ <a @click="menuHref(item.menuAction,itemOl,2)">
48
+ <em></em>
49
+ <span></span>
50
+ {{itemOl.menuName}}
51
+ </a>
52
+ <i
53
+ v-if="itemOl.children!==null"
54
+ :class="[iconStatic? 'el-icon-minus':'el-icon-plus', 'el-icon']"
55
+ @click="menuIcon($event)"
56
+ ></i>
57
+ </div>
58
+ <dl v-if="itemOl.children!==null" class="el-dl-list-box">
59
+ <dd
60
+ v-for="(itemDd,indexDd) in itemOl.children"
61
+ :key="indexDd"
62
+ :class="[$route.path.split('/')[2] == itemDd.menuAction ? 'is-active3':'']"
63
+ v-if=" !itemDd.menuTarget"
64
+ >
65
+ <a
66
+ class="el-dd-list"
67
+ @click="menuHref(item.menuAction,itemDd,3)"
68
+ >{{itemDd.menuName}}</a>
69
+ </dd>
70
+ </dl>
71
+ </li>
72
+ </ol>
73
+ </li>
74
+ </ul>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </template>
79
+
80
+ <script>
81
+ import { mapGetters } from "vuex";
82
+
83
+ export default {
84
+ data() {
85
+ return {
86
+ appActive: process.env.APP_PATH, // 当前点击的项目名称
87
+ height: document.documentElement.clientHeight - 85,
88
+ heightBox: document.documentElement.clientHeight - 355,
89
+ isCollapse: true,
90
+ iconStatic: false,
91
+ memberName: "会员中心", //会员中心账户名
92
+ userLeftRouter: []
93
+ };
94
+ },
95
+ beforeMounted() {
96
+ console.log(this.appList, "appListappList");
97
+ this.appList.forEach(el => {
98
+ if (el.menuDefaultClass === "user") {
99
+ this.memberName = el.menuName ? el.menuName : "会员中心";
100
+ let memberRouter = el.children ? el.children : [];
101
+ memberRouter.forEach(item => {
102
+ this.userLeftRouter =
103
+ item.menuDefaultClass === "userLeftRouter" && item.children
104
+ ? item.children
105
+ : [];
106
+ });
107
+ }
108
+ });
109
+ },
110
+ mounted() {
111
+ window.addEventListener("resize", this.heightChange);
112
+ //先判断是几级菜单,现在的是二级菜单
113
+ if (document.querySelector(".active")) {
114
+ //表示二级菜单
115
+ document.querySelector(".active").parentNode.parentNode.className =
116
+ "active";
117
+ } else if (document.querySelector(".is-active3")) {
118
+ //三级菜单
119
+ let obj = document.querySelector(".is-active3");
120
+ console.log(obj, "obj");
121
+ this.iconStatic = true;
122
+ obj.parentNode.parentNode.childNodes[0].classList.add("active");
123
+ obj.parentNode.parentNode.parentNode.parentNode.childNodes[0].classList.add(
124
+ "active"
125
+ );
126
+ obj.className = "active";
127
+ }
128
+ },
129
+ computed: {
130
+ ...mapGetters(["appList", "sidebar"])
131
+ },
132
+ watch: {},
133
+ methods: {
134
+ // toggle(index) {
135
+ // this.checkindex = index;
136
+ // },
137
+ menuLi(e) {
138
+ //点击显示二级菜单
139
+ //点击添加class
140
+ e.target.classList.toggle("active");
141
+ },
142
+ menuIcon(e) {
143
+ //点击显示三级菜单
144
+ e.target.parentNode.classList.toggle("active");
145
+ if (e.target.className.indexOf("el-icon-plus") >= 0) {
146
+ e.target.classList.remove("el-icon-plus");
147
+ e.target.classList.add("el-icon-minus");
148
+ } else {
149
+ e.target.classList.remove("el-icon-minus");
150
+ e.target.classList.add("el-icon-plus");
151
+ }
152
+ },
153
+ handleSelect(key, keyPath) {
154
+ if (!key) {
155
+ return;
156
+ }
157
+ var url = "";
158
+ this.appList.list.forEach(item => {
159
+ if (item.menuJspath === key) {
160
+ url = item.menuAction;
161
+ }
162
+ });
163
+ window.location.href = url;
164
+ console.log(key, keyPath);
165
+ },
166
+ handleOpen(key, keyPath) {
167
+ console.log(key, keyPath);
168
+ },
169
+ handleClose(key, keyPath) {
170
+ console.log(key, keyPath);
171
+ },
172
+ heightChange() {
173
+ this.height = document.documentElement.clientHeight - 58 - 40;
174
+ },
175
+ menuHref(menuAction, item, index) {
176
+ let path =
177
+ index === 2
178
+ ? "/" + item.menuAction
179
+ : "/" + item.proappMenuPcode + "/" + item.menuAction;
180
+ // index===2 是二级菜单,3是三级菜单
181
+ if (item.children === null) {
182
+ //可跳转
183
+ if (location.href.indexOf("localhost") >= 0) {
184
+ //localhost表示本地跳转
185
+
186
+ this.$router.push({
187
+ path: path
188
+ });
189
+
190
+ this.$store.commit("MENUTITLE", item.menuName);
191
+ } else {
192
+ if (location.href.indexOf(menuAction) >= 0) {
193
+ //表示线上同源下跳转
194
+ this.$router.push({
195
+ path: path
196
+ });
197
+ this.$store.commit("MENUTITLE", item.menuName);
198
+ } else {
199
+ location.href = menuAction + "#" + path;
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+ };
206
+ </script>
207
+
208
+ <style rel="stylesheet" scoped>
209
+ .el-menu-ul ol {
210
+ display: none;
211
+ margin-left: 7px;
212
+ /* transition: all 0.5s cubic-bezier(0, 1, 0.5, 1);
213
+ transform: translateY(0); */
214
+ }
215
+ .el-menu-ul li ol li.active .el-dl-list-box,
216
+ .el-menu-ul ol.active,
217
+ .el-menu-ul li a.active + ol {
218
+ display: block;
219
+ }
220
+
221
+ .el-menu-ul .active ol,
222
+ .el-menu-ul .active + ol {
223
+ display: block;
224
+ }
225
+
226
+ .el-menu-vertical-demo {
227
+ width: 196px;
228
+ margin-top: 12px;
229
+ }
230
+ .user-icon {
231
+ display: block;
232
+ height: 80px;
233
+ overflow: hidden;
234
+ background: url("../../../../../assets/nav/admin.png") center no-repeat;
235
+ }
236
+ .top-logo {
237
+ height: 120px;
238
+ line-height: 120px;
239
+ text-align: center;
240
+ margin-bottom: 2px;
241
+ background: #fff;
242
+ }
243
+ .top-logo img {
244
+ height: 70px;
245
+ }
246
+ .el-menu-vertical-demo {
247
+ background: none;
248
+ }
249
+ .el-menu-vertical-demo.is-active {
250
+ width: 50px;
251
+ }
252
+ .el-menu-vertical {
253
+ width: 100%;
254
+ height: 100%;
255
+ border-right: none;
256
+ }
257
+
258
+ .el-menu-item:hover,
259
+ .el-menu-item:hover a,
260
+ .el-menu-item:hover a i {
261
+ background: #f1f8ff !important;
262
+ }
263
+ .el-menu-item.is-active,
264
+ .el-menu-item.is-active a,
265
+ .el-menu-item.is-active a i {
266
+ background: #f1f8ff !important;
267
+ }
268
+
269
+ .header-img {
270
+ display: inline-block;
271
+ width: 80px;
272
+ height: 80px;
273
+ border-radius: 50%;
274
+ background: #eee;
275
+ margin: 20px 0 0px;
276
+ text-align: center;
277
+ }
278
+ .header-container {
279
+ display: block;
280
+ }
281
+ .header-container span {
282
+ display: block;
283
+ color: #666;
284
+ line-height: 30px;
285
+ }
286
+ .el-submenu .el-menu-item {
287
+ min-width: 196px;
288
+ }
289
+ .tool-menu-svg {
290
+ font-size: 14px;
291
+ width: 196px;
292
+ /*height: 150px;*/
293
+ text-align: center;
294
+ /*position: absolute;*/
295
+ z-index: 12;
296
+ background: #fff;
297
+ border-bottom: solid 1px #eee;
298
+ padding-bottom: 10px;
299
+ /* box-shadow: -5px 2px 10px 0 #333; */
300
+ }
301
+ .my-youfu {
302
+ display: block;
303
+ height: 50px;
304
+ line-height: 50px;
305
+ background: #f1f8ff;
306
+ color: #2171d2;
307
+ margin-top: 30px;
308
+ position: relative;
309
+ }
310
+ .my-youfu:after {
311
+ content: "";
312
+ display: block;
313
+ width: 4px;
314
+ background: #2171d2;
315
+ position: absolute;
316
+ right: -4px;
317
+ height: 100%;
318
+ top: 0;
319
+ }
320
+ .app-scroll-container {
321
+ /* margin-top: 72px;
322
+ padding-bottom: 72px;*/
323
+ margin-top: 60px;
324
+ }
325
+ .app-scroll-container.scroll-container {
326
+ background: #fff;
327
+ }
328
+ .el-menu-custom {
329
+ margin-left: 34px;
330
+ width: 140px;
331
+ }
332
+ .el-menu-list {
333
+ /* border-top: 1px solid #666; */
334
+ min-width: 160px !important;
335
+ border-left: 1px solid #999;
336
+ padding: 0px !important;
337
+ }
338
+ .el-menu-ul a {
339
+ overflow: hidden;
340
+ text-overflow: ellipsis;
341
+ white-space: nowrap;
342
+ }
343
+ .el-menu-list i {
344
+ width: 20px;
345
+ height: 1px;
346
+ background: #999;
347
+ display: inline-block;
348
+ }
349
+ .el-menu-list span {
350
+ display: inline-block;
351
+ width: 6px;
352
+ height: 6px;
353
+ border-radius: 50%;
354
+ background: #999;
355
+ margin-right: 6px;
356
+ }
357
+
358
+ .el-menu-ul {
359
+ margin: 0px 15px;
360
+ width: 166px;
361
+ font-size: 14px;
362
+ line-height: 42px;
363
+ -webkit-user-select: none;
364
+ -moz-user-select: none;
365
+ -ms-user-select: none;
366
+ user-select: none;
367
+ }
368
+ .el-dl-list-box {
369
+ display: none;
370
+ }
371
+ .el-dl-list-box a {
372
+ display: block;
373
+ }
374
+ .el-menu-ul ol li {
375
+ position: relative;
376
+ }
377
+ .el-menu-ul ol li:last-child .el-dl-list-box a::before {
378
+ content: "";
379
+ position: absolute;
380
+ left: 0;
381
+ background: #999;
382
+ width: 1px;
383
+ z-index: 10;
384
+ height: 0px;
385
+ }
386
+ .el-dl-list-box a::before {
387
+ content: "";
388
+ position: absolute;
389
+ left: 0;
390
+ background: #999;
391
+ width: 1px;
392
+ z-index: 10;
393
+ height: 44px;
394
+ }
395
+
396
+ .el-menu-ul ol li::before {
397
+ content: "";
398
+ position: absolute;
399
+ left: 0;
400
+ background: #999;
401
+ width: 1px;
402
+ z-index: 10;
403
+ height: 44px;
404
+ }
405
+ .el-menu-ul ol li:last-child::before {
406
+ content: "";
407
+ position: absolute;
408
+ left: 0;
409
+ background: #999;
410
+ width: 1px;
411
+ z-index: 10;
412
+ height: 23px;
413
+ }
414
+ .el-menu-ul i {
415
+ font-size: 16px;
416
+ margin-right: 5px;
417
+ display: inline-block;
418
+ }
419
+ .el-menu-box a {
420
+ color: #666;
421
+ }
422
+ .el-menu-box {
423
+ position: relative;
424
+ }
425
+ .el-menu-box ~ .el-menu-box {
426
+ /* border-top: 1px solid #eee; */
427
+ margin-top: 20px;
428
+ }
429
+ .el-container-box {
430
+ background: #fff;
431
+ /*margin-top: 150px;*/
432
+ overflow-x: hidden;
433
+ overflow-y: auto;
434
+ }
435
+
436
+ .el-li-title span {
437
+ display: inline-block;
438
+ width: 6px;
439
+ height: 6px;
440
+ border-radius: 50%;
441
+ background: #999;
442
+ margin-right: 6px;
443
+ }
444
+ .el-li-title.active + dl {
445
+ display: block;
446
+ }
447
+ .el-li-title em {
448
+ width: 15px;
449
+ height: 1px;
450
+ background: #999;
451
+ display: inline-block;
452
+ vertical-align: middle;
453
+ }
454
+ .el-dd-list {
455
+ display: block;
456
+ font-size: 12px;
457
+ color: #999;
458
+ padding-left: 45px;
459
+ }
460
+ .el-li-title i.el-icon {
461
+ font-size: 12px;
462
+ margin-left: 5px;
463
+ cursor: pointer;
464
+ }
465
+ </style>
466
+