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,428 +1,428 @@
1
- <template>
2
- <header class="ans-header">
3
- <div class="ans-header__head">
4
- <div class="auto flex align-items--center">
5
- <div class="ans-header__head--logo">
6
- <a href="/">
7
- <img :src="proappEnvLogo && proappEnvLogo.proappEnvLogo" alt />
8
- </a>
9
- </div>
10
- <div class="flex flex-item1 justify-content--flex-end">
11
- <div class="ans-header__head--search flex border-theme">
12
- <el-select v-model="selects" placeholder="" class="selects">
13
- <el-option label="竞价" value="0"></el-option>
14
- <el-option label="现货" value="1"></el-option>
15
- </el-select>
16
- <input type="text" v-model="searchValue" placeholder="商品名称、编号搜索"/>
17
-
18
- <button type="button" class="flex-item1 bg-theme" @click="searchBtn"><i class="el-icon-search"></i></button>
19
- </div>
20
- <div
21
- class="ans-header__head--car flex justify-content--center align-items--center border-theme c-theme"
22
- @click="auctionHandler"
23
- >
24
- <i style="padding-right:5px"><img src="../assets/chuizi.png" alt="" width="24" height="24"></i> 我的竞价
25
- <span v-if="auctionNum">{{auctionNum}}</span>
26
- </div>
27
- </div>
28
- </div>
29
- </div>
30
- <div class="ans-header__nav">
31
- <div class="auto flex">
32
- <div class="ans-header__nav--class">
33
-
34
- </div>
35
- <div class="ans-header__nav--list flex-item1">
36
-
37
- <v-nav-ans v-if="navChildren" :navChildren="navChildren"></v-nav-ans>
38
- </div>
39
- </div>
40
- </div>
41
- </header>
42
- </template>
43
-
44
- <script>
45
- import api from "#/api/common/index";
46
- import VNavAns from "#/views/pc/default/nav-modules/navAns";
47
- export default {
48
- components: {
49
- VNavAns
50
- },
51
- data() {
52
- return {
53
- keywords: "",
54
- navChildren: null,
55
- searchValue: this.$route.query.searchParam
56
- ? this.$route.query.searchParam
57
- : "",
58
- menuList: JSON.parse(window.sessionStorage.getItem("menuList"))
59
- ? JSON.parse(window.sessionStorage.getItem("menuList")).menuList
60
- : [],
61
- cate: [], // 二级分类
62
- cateCode: null, //二级选中code
63
- cateThree: [], //三级分类
64
- cateThreeCode: null, //三级选中code,暂时没有用
65
- cateState: false, // 二级菜单默认false
66
- navChildren: null,
67
- auctionNum: null,
68
- selects:'1'
69
- };
70
- },
71
- created() {
72
- localStorage.getItem("searchParam")
73
- ? (this.searchValue = localStorage.getItem("searchParam"))
74
- : "";
75
- },
76
- mounted() {
77
- // 获取分类
78
- if (this.getUserCookie) {
79
- this.getauctionNum();
80
- }
81
- this.queryGoodsClassTree();
82
- //对nav导航进行操作
83
- this.menuList.forEach(el => {
84
- if (el.menuDefaultClass === "nav") {
85
- //表示是导航
86
- this.navChildren = JSON.parse(JSON.stringify(el.children));
87
- }
88
- });
89
- },
90
-
91
- computed: {
92
- proappEnvLogo() {
93
- let proappEnvLogo = sessionStorage.getItem("proappEnvLayout")
94
- ? JSON.parse(sessionStorage.getItem("proappEnvLayout"))
95
- : null;
96
- return proappEnvLogo;
97
- },
98
- searchValue() {
99
- return this.$route.query.searchParam ? this.$route.query.searchParam : "";
100
- },
101
- carName() {
102
- return sessionStorage.getItem("carName")
103
- ? sessionStorage.getItem("carName")
104
- : "购物车";
105
- }
106
- },
107
- methods: {
108
- cateShow() {
109
- this.cateState = true;
110
- },
111
- getauctionNum() {
112
- api.getauctionNum().then(res => {
113
- if (res.success) {
114
- this.auctionNum = res.dataObj;
115
- }
116
- });
117
- },
118
- cateHide() {
119
- this.cateState = false;
120
- },
121
- auctionHandler() {
122
- location.href = "/paas/order-manager/index.html#/auction";
123
- },
124
- queryGoodsClassTree() {
125
- api.queryGoodsClassTree().then(res => {
126
- console.log(res);
127
- this.cate = res; // 二级分类
128
- this.cateThree = res && res[0] && res[0].childList; //默认选中第一个二级分类
129
- this.cateCode = res && res[0] && res[0].goodsClassCode; //二级选中的code
130
- });
131
- },
132
- searchBtn() {
133
- localStorage.removeItem("searchParam");
134
-
135
- if(this.selects == 0){
136
- if (this.$route.path == "/forecastList") {
137
- location.href =
138
- "/paas/pc-mall/index.html#/forecastList?searchParam=" +
139
- this.searchValue;
140
- } else {
141
- // 默认是公共搜索
142
- location.href =
143
- "/paas/pc-mall/index.html#/noticeList?searchParam=" +
144
- this.searchValue;
145
- }
146
- }else{
147
- location.href =
148
- "/paas/pc-mall/index.html#/searchResult?searchParam=" +
149
- this.searchValue;
150
- }
151
- },
152
- cateHandler(item) {
153
- this.cateThree = item.childList;
154
- this.cateCode = item.goodsClassCode; //二级选中的code
155
- },
156
- cateHref(item) {
157
- if (this.$route.path == "/noticeList") {
158
- if (location.href.indexOf("localhost") > 0) {
159
- this.$router.push({
160
- path: "/noticeList",
161
- query: {
162
- classtreeCode: item.classtreeCode,
163
- goodsClassName: item.goodsClassName
164
- }
165
- });
166
- } else {
167
- location.href =
168
- "/paas/pc-mall/index.html#/noticeList?classtreeCode=" +
169
- item.classtreeCode +
170
- "&&goodsClassName=" +
171
- item.goodsClassName;
172
- }
173
- } else if (this.$route.path == "/forecastList") {
174
- if (location.href.indexOf("localhost") > 0) {
175
- this.$router.push({
176
- path: "/forecastList",
177
- query: {
178
- classtreeCode: item.classtreeCode,
179
- goodsClassName: item.goodsClassName
180
- }
181
- });
182
- } else {
183
- location.href =
184
- "/paas/pc-mall/index.html#/forecastList?classtreeCode=" +
185
- item.classtreeCode +
186
- "&&goodsClassName=" +
187
- item.goodsClassName;
188
- }
189
- } else {
190
- if (location.href.indexOf("localhost") > 0) {
191
- this.$router.push({
192
- path: "/noticeList",
193
- query: {
194
- classtreeCode: item.classtreeCode,
195
- goodsClassName: item.goodsClassName
196
- }
197
- });
198
- } else {
199
- location.href =
200
- "/paas/pc-mall/index.html#/noticeList?classtreeCode=" +
201
- item.classtreeCode +
202
- "&&goodsClassName=" +
203
- item.goodsClassName;
204
- }
205
- }
206
- },
207
- getUserCookie() {
208
- let cookie = document.cookie;
209
- let start = cookie.indexOf("saas-user-");
210
- if (start > -1) {
211
- let end = cookie.indexOf("=", start);
212
- return cookie.substring(start, end);
213
- } else {
214
- return null;
215
- }
216
- }
217
- }
218
- };
219
- </script>
220
-
221
- <style lang="scss" scoped>
222
- .ans-header {
223
- &__head {
224
- height: 126px;
225
- line-height: 126px;
226
- background: #fff;
227
-
228
- .auto {
229
- height: inherit;
230
- }
231
-
232
- &--logo {
233
- width: 240px;
234
-
235
- img {
236
- display: block;
237
- }
238
- }
239
-
240
- &--search {
241
- width: 654px;
242
- height:48px;
243
- line-height: 48px;
244
- border: 1px solid;
245
- margin-right: 24px;
246
- box-sizing: content-box;
247
- border-right: 0;
248
- display: flex;
249
- align-items: center;
250
- justify-content: space-between;
251
- .selects{
252
- width: 60px;
253
- height: 100%;
254
- border: none;
255
- border-right: 1px solid #54b2d3;
256
- /deep/ .el-input{
257
- .el-input__inner{
258
- padding-left: 10px;
259
- padding-right: 20px;
260
- border: none;
261
- }
262
- .el-input__suffix{
263
- right: 0;
264
- }
265
- }
266
- }
267
- input {
268
- height: 48px;
269
- line-height: 48px;
270
- width: 500px;
271
- display: block;
272
- padding-left: 16px;
273
- font-size: 13px;
274
- }
275
-
276
- button {
277
- // background: #00c0dc;
278
- width: 100px;
279
- height: 48px;
280
- line-height: 48px;
281
- font-size: 22px;
282
- color: #fff;
283
- cursor: pointer;
284
- display: block;
285
- line-height: inherit;
286
- }
287
- }
288
-
289
- &--car {
290
- width: 188px;
291
- height: 48px;
292
- border: 1px solid;
293
- font-size: 14px;
294
- line-height: 48px;
295
- cursor: pointer;
296
- span {
297
- display: inline-block;
298
- width: 20px;
299
- height: 20px;
300
- text-align: center;
301
- line-height: 20px;
302
- background: #f23a3a;
303
- border-radius: 50%;
304
- font-size: 12px;
305
- color: #fff;
306
- margin-left: 10px;
307
- }
308
- }
309
- }
310
-
311
- &__nav {
312
- background: #fff;
313
- height: 40px;
314
- line-height: 40px;
315
- border-bottom: 1px solid #383838;
316
-
317
- &--class {
318
- margin-right: 8px;
319
- position: relative;
320
- width: 180px;
321
- // &:hover .ans-class {
322
- // display: flex;
323
- // display: -webkit-flex;
324
- // }
325
-
326
- h3 {
327
- width: 170px;
328
- font-size: 14px;
329
- color: #fff;
330
- // background: #00c0dc;
331
- text-align: center;
332
- }
333
- }
334
- }
335
- }
336
- .ans-class {
337
- position: absolute;
338
- width: 1200px;
339
- height: 440px;
340
- top: 40px;
341
- left: 0;
342
- z-index: 10;
343
- overflow: hidden;
344
- border-top: 1px solid #383838;
345
- box-shadow: 3px 3px 6px #e0dcdc;
346
-
347
- &__tab {
348
- width: 170px;
349
- background: #333;
350
-
351
- ul {
352
- li {
353
- height: 40px;
354
- line-height: 40px;
355
- color: #fff;
356
- font-size: 14px;
357
- cursor: pointer;
358
-
359
- p {
360
- width: 100px;
361
- overflow: hidden;
362
- text-overflow: ellipsis;
363
- white-space: nowrap;
364
- }
365
-
366
- span {
367
- display: block;
368
- width: 4px;
369
- height: 4px;
370
- background: rgba(153, 153, 153, 1);
371
- margin-right: 10px;
372
- }
373
-
374
- &:hover,
375
- &.active {
376
- background: #fff;
377
- color: #333;
378
- }
379
- }
380
- }
381
- }
382
-
383
- &__content {
384
- width: 100%;
385
- background: #fff;
386
- padding: 12px 30px;
387
-
388
- dl {
389
- line-height: 14px;
390
- margin: 12px 0;
391
-
392
- dt {
393
- font-size: 14px;
394
- font-weight: bold;
395
- color: rgba(51, 51, 51, 1);
396
- width: 76px;
397
- margin-right: 10px;
398
- overflow: hidden;
399
- text-overflow: ellipsis;
400
- white-space: nowrap;
401
- margin: 10px 0;
402
- }
403
-
404
- dd {
405
- a {
406
- font-size: 14px;
407
- color: #999999;
408
- padding: 0 10px;
409
- border-left: 1px solid #f5f5f5;
410
- margin: 10px 0;
411
-
412
- &:hover,
413
- &.active {
414
- color: #f33415;
415
- }
416
- }
417
- }
418
- }
419
- }
420
- }
421
- .ans-none {
422
- display: none;
423
- }
424
- .auto {
425
- margin: 0 auto;
426
- width: 1200px;
427
- }
1
+ <template>
2
+ <header class="ans-header">
3
+ <div class="ans-header__head">
4
+ <div class="auto flex align-items--center">
5
+ <div class="ans-header__head--logo">
6
+ <a href="/">
7
+ <img :src="proappEnvLogo && proappEnvLogo.proappEnvLogo" alt />
8
+ </a>
9
+ </div>
10
+ <div class="flex flex-item1 justify-content--flex-end">
11
+ <div class="ans-header__head--search flex border-theme">
12
+ <el-select v-model="selects" placeholder="" class="selects">
13
+ <el-option label="竞价" value="0"></el-option>
14
+ <el-option label="现货" value="1"></el-option>
15
+ </el-select>
16
+ <input type="text" v-model="searchValue" placeholder="商品名称、编号搜索"/>
17
+
18
+ <button type="button" class="flex-item1 bg-theme" @click="searchBtn"><i class="el-icon-search"></i></button>
19
+ </div>
20
+ <div
21
+ class="ans-header__head--car flex justify-content--center align-items--center border-theme c-theme"
22
+ @click="auctionHandler"
23
+ >
24
+ <i style="padding-right:5px"><img src="../assets/chuizi.png" alt="" width="24" height="24"></i> 我的竞价
25
+ <span v-if="auctionNum">{{auctionNum}}</span>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ <div class="ans-header__nav">
31
+ <div class="auto flex">
32
+ <div class="ans-header__nav--class">
33
+
34
+ </div>
35
+ <div class="ans-header__nav--list flex-item1">
36
+
37
+ <v-nav-ans v-if="navChildren" :navChildren="navChildren"></v-nav-ans>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </header>
42
+ </template>
43
+
44
+ <script>
45
+ import api from "#/api/common/index";
46
+ import VNavAns from "#/views/pc/default/nav-modules/navAns";
47
+ export default {
48
+ components: {
49
+ VNavAns
50
+ },
51
+ data() {
52
+ return {
53
+ keywords: "",
54
+ navChildren: null,
55
+ searchValue: this.$route.query.searchParam
56
+ ? this.$route.query.searchParam
57
+ : "",
58
+ menuList: JSON.parse(window.sessionStorage.getItem("menuList"))
59
+ ? JSON.parse(window.sessionStorage.getItem("menuList")).menuList
60
+ : [],
61
+ cate: [], // 二级分类
62
+ cateCode: null, //二级选中code
63
+ cateThree: [], //三级分类
64
+ cateThreeCode: null, //三级选中code,暂时没有用
65
+ cateState: false, // 二级菜单默认false
66
+ navChildren: null,
67
+ auctionNum: null,
68
+ selects:'1'
69
+ };
70
+ },
71
+ created() {
72
+ localStorage.getItem("searchParam")
73
+ ? (this.searchValue = localStorage.getItem("searchParam"))
74
+ : "";
75
+ },
76
+ mounted() {
77
+ // 获取分类
78
+ if (this.getUserCookie) {
79
+ this.getauctionNum();
80
+ }
81
+ this.queryGoodsClassTree();
82
+ //对nav导航进行操作
83
+ this.menuList.forEach(el => {
84
+ if (el.menuDefaultClass === "nav") {
85
+ //表示是导航
86
+ this.navChildren = JSON.parse(JSON.stringify(el.children));
87
+ }
88
+ });
89
+ },
90
+
91
+ computed: {
92
+ proappEnvLogo() {
93
+ let proappEnvLogo = sessionStorage.getItem("proappEnvLayout")
94
+ ? JSON.parse(sessionStorage.getItem("proappEnvLayout"))
95
+ : null;
96
+ return proappEnvLogo;
97
+ },
98
+ searchValue() {
99
+ return this.$route.query.searchParam ? this.$route.query.searchParam : "";
100
+ },
101
+ carName() {
102
+ return sessionStorage.getItem("carName")
103
+ ? sessionStorage.getItem("carName")
104
+ : "购物车";
105
+ }
106
+ },
107
+ methods: {
108
+ cateShow() {
109
+ this.cateState = true;
110
+ },
111
+ getauctionNum() {
112
+ api.getauctionNum().then(res => {
113
+ if (res.success) {
114
+ this.auctionNum = res.dataObj;
115
+ }
116
+ });
117
+ },
118
+ cateHide() {
119
+ this.cateState = false;
120
+ },
121
+ auctionHandler() {
122
+ location.href = "/paas/order-manager/index.html#/auction";
123
+ },
124
+ queryGoodsClassTree() {
125
+ api.queryGoodsClassTree().then(res => {
126
+ console.log(res);
127
+ this.cate = res; // 二级分类
128
+ this.cateThree = res && res[0] && res[0].childList; //默认选中第一个二级分类
129
+ this.cateCode = res && res[0] && res[0].goodsClassCode; //二级选中的code
130
+ });
131
+ },
132
+ searchBtn() {
133
+ localStorage.removeItem("searchParam");
134
+
135
+ if(this.selects == 0){
136
+ if (this.$route.path == "/forecastList") {
137
+ location.href =
138
+ "/paas/pc-mall/index.html#/forecastList?searchParam=" +
139
+ this.searchValue;
140
+ } else {
141
+ // 默认是公共搜索
142
+ location.href =
143
+ "/paas/pc-mall/index.html#/noticeList?searchParam=" +
144
+ this.searchValue;
145
+ }
146
+ }else{
147
+ location.href =
148
+ "/paas/pc-mall/index.html#/searchResult?searchParam=" +
149
+ this.searchValue;
150
+ }
151
+ },
152
+ cateHandler(item) {
153
+ this.cateThree = item.childList;
154
+ this.cateCode = item.goodsClassCode; //二级选中的code
155
+ },
156
+ cateHref(item) {
157
+ if (this.$route.path == "/noticeList") {
158
+ if (location.href.indexOf("localhost") > 0) {
159
+ this.$router.push({
160
+ path: "/noticeList",
161
+ query: {
162
+ classtreeCode: item.classtreeCode,
163
+ goodsClassName: item.goodsClassName
164
+ }
165
+ });
166
+ } else {
167
+ location.href =
168
+ "/paas/pc-mall/index.html#/noticeList?classtreeCode=" +
169
+ item.classtreeCode +
170
+ "&&goodsClassName=" +
171
+ item.goodsClassName;
172
+ }
173
+ } else if (this.$route.path == "/forecastList") {
174
+ if (location.href.indexOf("localhost") > 0) {
175
+ this.$router.push({
176
+ path: "/forecastList",
177
+ query: {
178
+ classtreeCode: item.classtreeCode,
179
+ goodsClassName: item.goodsClassName
180
+ }
181
+ });
182
+ } else {
183
+ location.href =
184
+ "/paas/pc-mall/index.html#/forecastList?classtreeCode=" +
185
+ item.classtreeCode +
186
+ "&&goodsClassName=" +
187
+ item.goodsClassName;
188
+ }
189
+ } else {
190
+ if (location.href.indexOf("localhost") > 0) {
191
+ this.$router.push({
192
+ path: "/noticeList",
193
+ query: {
194
+ classtreeCode: item.classtreeCode,
195
+ goodsClassName: item.goodsClassName
196
+ }
197
+ });
198
+ } else {
199
+ location.href =
200
+ "/paas/pc-mall/index.html#/noticeList?classtreeCode=" +
201
+ item.classtreeCode +
202
+ "&&goodsClassName=" +
203
+ item.goodsClassName;
204
+ }
205
+ }
206
+ },
207
+ getUserCookie() {
208
+ let cookie = document.cookie;
209
+ let start = cookie.indexOf("saas-user-");
210
+ if (start > -1) {
211
+ let end = cookie.indexOf("=", start);
212
+ return cookie.substring(start, end);
213
+ } else {
214
+ return null;
215
+ }
216
+ }
217
+ }
218
+ };
219
+ </script>
220
+
221
+ <style lang="scss" scoped>
222
+ .ans-header {
223
+ &__head {
224
+ height: 126px;
225
+ line-height: 126px;
226
+ background: #fff;
227
+
228
+ .auto {
229
+ height: inherit;
230
+ }
231
+
232
+ &--logo {
233
+ width: 240px;
234
+
235
+ img {
236
+ display: block;
237
+ }
238
+ }
239
+
240
+ &--search {
241
+ width: 654px;
242
+ height:48px;
243
+ line-height: 48px;
244
+ border: 1px solid;
245
+ margin-right: 24px;
246
+ box-sizing: content-box;
247
+ border-right: 0;
248
+ display: flex;
249
+ align-items: center;
250
+ justify-content: space-between;
251
+ .selects{
252
+ width: 60px;
253
+ height: 100%;
254
+ border: none;
255
+ border-right: 1px solid #54b2d3;
256
+ /deep/ .el-input{
257
+ .el-input__inner{
258
+ padding-left: 10px;
259
+ padding-right: 20px;
260
+ border: none;
261
+ }
262
+ .el-input__suffix{
263
+ right: 0;
264
+ }
265
+ }
266
+ }
267
+ input {
268
+ height: 48px;
269
+ line-height: 48px;
270
+ width: 500px;
271
+ display: block;
272
+ padding-left: 16px;
273
+ font-size: 13px;
274
+ }
275
+
276
+ button {
277
+ // background: #00c0dc;
278
+ width: 100px;
279
+ height: 48px;
280
+ line-height: 48px;
281
+ font-size: 22px;
282
+ color: #fff;
283
+ cursor: pointer;
284
+ display: block;
285
+ line-height: inherit;
286
+ }
287
+ }
288
+
289
+ &--car {
290
+ width: 188px;
291
+ height: 48px;
292
+ border: 1px solid;
293
+ font-size: 14px;
294
+ line-height: 48px;
295
+ cursor: pointer;
296
+ span {
297
+ display: inline-block;
298
+ width: 20px;
299
+ height: 20px;
300
+ text-align: center;
301
+ line-height: 20px;
302
+ background: #f23a3a;
303
+ border-radius: 50%;
304
+ font-size: 12px;
305
+ color: #fff;
306
+ margin-left: 10px;
307
+ }
308
+ }
309
+ }
310
+
311
+ &__nav {
312
+ background: #fff;
313
+ height: 40px;
314
+ line-height: 40px;
315
+ border-bottom: 1px solid #383838;
316
+
317
+ &--class {
318
+ margin-right: 8px;
319
+ position: relative;
320
+ width: 180px;
321
+ // &:hover .ans-class {
322
+ // display: flex;
323
+ // display: -webkit-flex;
324
+ // }
325
+
326
+ h3 {
327
+ width: 170px;
328
+ font-size: 14px;
329
+ color: #fff;
330
+ // background: #00c0dc;
331
+ text-align: center;
332
+ }
333
+ }
334
+ }
335
+ }
336
+ .ans-class {
337
+ position: absolute;
338
+ width: 1200px;
339
+ height: 440px;
340
+ top: 40px;
341
+ left: 0;
342
+ z-index: 10;
343
+ overflow: hidden;
344
+ border-top: 1px solid #383838;
345
+ box-shadow: 3px 3px 6px #e0dcdc;
346
+
347
+ &__tab {
348
+ width: 170px;
349
+ background: #333;
350
+
351
+ ul {
352
+ li {
353
+ height: 40px;
354
+ line-height: 40px;
355
+ color: #fff;
356
+ font-size: 14px;
357
+ cursor: pointer;
358
+
359
+ p {
360
+ width: 100px;
361
+ overflow: hidden;
362
+ text-overflow: ellipsis;
363
+ white-space: nowrap;
364
+ }
365
+
366
+ span {
367
+ display: block;
368
+ width: 4px;
369
+ height: 4px;
370
+ background: rgba(153, 153, 153, 1);
371
+ margin-right: 10px;
372
+ }
373
+
374
+ &:hover,
375
+ &.active {
376
+ background: #fff;
377
+ color: #333;
378
+ }
379
+ }
380
+ }
381
+ }
382
+
383
+ &__content {
384
+ width: 100%;
385
+ background: #fff;
386
+ padding: 12px 30px;
387
+
388
+ dl {
389
+ line-height: 14px;
390
+ margin: 12px 0;
391
+
392
+ dt {
393
+ font-size: 14px;
394
+ font-weight: bold;
395
+ color: rgba(51, 51, 51, 1);
396
+ width: 76px;
397
+ margin-right: 10px;
398
+ overflow: hidden;
399
+ text-overflow: ellipsis;
400
+ white-space: nowrap;
401
+ margin: 10px 0;
402
+ }
403
+
404
+ dd {
405
+ a {
406
+ font-size: 14px;
407
+ color: #999999;
408
+ padding: 0 10px;
409
+ border-left: 1px solid #f5f5f5;
410
+ margin: 10px 0;
411
+
412
+ &:hover,
413
+ &.active {
414
+ color: #f33415;
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ .ans-none {
422
+ display: none;
423
+ }
424
+ .auto {
425
+ margin: 0 auto;
426
+ width: 1200px;
427
+ }
428
428
  </style>