03402fac by zhangmeng

票务

1 parent 8340c88d
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
2 <div class="app-container"> 2 <div class="app-container">
3 <div class="box"> 3 <div class="box">
4 <el-row :gutter="20"> 4 <el-row :gutter="20">
5 <el-col :lg="5" :md="5" :xl="6" :sm="8" :xs="8"> 5 <el-col :lg="5" :md="5" :sm="8" :xl="6" :xs="8">
6 <el-card class="mb20"> 6 <el-card class="mb20">
7 <div :class="language==0?'center-menu':'center-menu en-menu'"> 7 <div :class="language==0?'center-menu':'center-menu en-menu'">
8 <ul v-if="user.utype=='2'&&language==0"> 8 <ul v-if="user.utype=='2'&&language==0">
9 <li v-for="(m, i) in menus" 9 <li
10 :key="i" 10 v-for="(m, i) in menus"
11 :class="{ active: m.isActive }" 11 :key="i"
12 :class="{ active: m.isActive }"
12 > 13 >
13 <a href="javascript:void(0)" @click="toInfo(m,menus)"> 14 <a href="javascript:void(0)" @click="toInfo(m,menus)">
14 <img :src="m.isActive ? m.picUrl2 : m.picUrl1"> 15 <img :src="m.isActive ? m.picUrl2 : m.picUrl1">
...@@ -17,9 +18,10 @@ ...@@ -17,9 +18,10 @@
17 </li> 18 </li>
18 </ul> 19 </ul>
19 <ul v-if="user.utype=='2'&&language==1"> 20 <ul v-if="user.utype=='2'&&language==1">
20 <li v-for="(m, i) in menusEn" 21 <li
21 :key="i" 22 v-for="(m, i) in menusEn"
22 :class="{ active: m.isActive }" 23 :key="i"
24 :class="{ active: m.isActive }"
23 > 25 >
24 <a href="javascript:void(0)" @click="toInfo(m,menusEn)"> 26 <a href="javascript:void(0)" @click="toInfo(m,menusEn)">
25 <img :src="m.isActive ? m.picUrl2 : m.picUrl1"> 27 <img :src="m.isActive ? m.picUrl2 : m.picUrl1">
...@@ -29,9 +31,9 @@ ...@@ -29,9 +31,9 @@
29 </ul> 31 </ul>
30 <ul v-if="user.utype=='1'&&language==0"> 32 <ul v-if="user.utype=='1'&&language==0">
31 <li 33 <li
32 v-for="(m, i) in menusPersonal" 34 v-for="(m, i) in menusPersonal"
33 :key="i" 35 :key="i"
34 :class="{ active: m.isActive }" 36 :class="{ active: m.isActive }"
35 > 37 >
36 <a href="javascript:void(0)" @click="toInfo(m,menusPersonal)"> 38 <a href="javascript:void(0)" @click="toInfo(m,menusPersonal)">
37 <img :src="m.isActive ? m.picUrl2 : m.picUrl1"> 39 <img :src="m.isActive ? m.picUrl2 : m.picUrl1">
...@@ -41,9 +43,9 @@ ...@@ -41,9 +43,9 @@
41 </ul> 43 </ul>
42 <ul v-if="user.utype=='1'&&language==1"> 44 <ul v-if="user.utype=='1'&&language==1">
43 <li 45 <li
44 v-for="(m, i) in menusPersonalEn" 46 v-for="(m, i) in menusPersonalEn"
45 :key="i" 47 :key="i"
46 :class="{ active: m.isActive }" 48 :class="{ active: m.isActive }"
47 > 49 >
48 <a href="javascript:void(0)" @click="toInfo(m,menusPersonalEn)"> 50 <a href="javascript:void(0)" @click="toInfo(m,menusPersonalEn)">
49 <img :src="m.isActive ? m.picUrl2 : m.picUrl1"> 51 <img :src="m.isActive ? m.picUrl2 : m.picUrl1">
...@@ -53,9 +55,9 @@ ...@@ -53,9 +55,9 @@
53 </ul> 55 </ul>
54 <ul v-if="user.utype=='3'&&language==0"> 56 <ul v-if="user.utype=='3'&&language==0">
55 <li 57 <li
56 v-for="(m, i) in menus3" 58 v-for="(m, i) in menus3"
57 :key="i" 59 :key="i"
58 :class="{ active: m.isActive }" 60 :class="{ active: m.isActive }"
59 > 61 >
60 <a href="javascript:void(0)" @click="toInfo(m,menus3)"> 62 <a href="javascript:void(0)" @click="toInfo(m,menus3)">
61 <img :src="m.isActive ? m.picUrl2 : m.picUrl1"> 63 <img :src="m.isActive ? m.picUrl2 : m.picUrl1">
...@@ -65,9 +67,9 @@ ...@@ -65,9 +67,9 @@
65 </ul> 67 </ul>
66 <ul v-if="user.utype=='3'&&language==1"> 68 <ul v-if="user.utype=='3'&&language==1">
67 <li 69 <li
68 v-for="(m, i) in menus3En" 70 v-for="(m, i) in menus3En"
69 :key="i" 71 :key="i"
70 :class="{ active: m.isActive }" 72 :class="{ active: m.isActive }"
71 > 73 >
72 <a href="javascript:void(0)" @click="toInfo(m,menus3En)"> 74 <a href="javascript:void(0)" @click="toInfo(m,menus3En)">
73 <img :src="m.isActive ? m.picUrl2 : m.picUrl1"> 75 <img :src="m.isActive ? m.picUrl2 : m.picUrl1">
...@@ -78,8 +80,8 @@ ...@@ -78,8 +80,8 @@
78 </div> 80 </div>
79 </el-card> 81 </el-card>
80 </el-col> 82 </el-col>
81 <el-col :lg="19" :md="19" :xl="18" :sm="16" :xs="16"> 83 <el-col :lg="19" :md="19" :sm="16" :xl="18" :xs="16">
82 <router-view :user="user" class="rightPart"/> 84 <router-view :user="user" class="rightPart" />
83 </el-col> 85 </el-col>
84 </el-row> 86 </el-row>
85 </div> 87 </div>
...@@ -87,12 +89,12 @@ ...@@ -87,12 +89,12 @@
87 </template> 89 </template>
88 90
89 <script setup> 91 <script setup>
90 import {ref} from 'vue' 92 import { ref } from 'vue'
91 import {useRoute, useRouter} from 'vue-router' 93 import { useRoute, useRouter } from 'vue-router'
92 import {onMounted} from '@vue/runtime-core' 94 import { onMounted } from '@vue/runtime-core'
93 import useUserStore from '@/store/modules/user' 95 import useUserStore from '@/store/modules/user'
94 import _ from 'lodash' 96 import _ from 'lodash'
95 import {useStorage} from "@vueuse/core/index"; 97 import { useStorage } from '@vueuse/core/index'
96 98
97 const language = useStorage('language', 0) 99 const language = useStorage('language', 0)
98 100
...@@ -245,13 +247,13 @@ const menus3 = ref([ ...@@ -245,13 +247,13 @@ const menus3 = ref([
245 picUrl2: '/img/nav_29_dwn.png', 247 picUrl2: '/img/nav_29_dwn.png',
246 isActive: false 248 isActive: false
247 }, 249 },
248 { 250 // {
249 name: language.value == 0 ? '票务预订' : 'Ticket Reservation', 251 // name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
250 routeName: 'seat_order', 252 // routeName: 'seat_order',
251 picUrl1: '/img/c7.png', 253 // picUrl1: '/img/c7.png',
252 picUrl2: '/img/c7.png', 254 // picUrl2: '/img/c7.png',
253 isActive: false 255 // isActive: false
254 }, 256 // },
255 { 257 {
256 name: language.value == 0 ? '发票申请' : 'Electronic invoice', 258 name: language.value == 0 ? '发票申请' : 'Electronic invoice',
257 routeName: 'myKP', 259 routeName: 'myKP',
...@@ -281,14 +283,14 @@ const menus3En = ref([ ...@@ -281,14 +283,14 @@ const menus3En = ref([
281 picUrl1: '/img/nav_29.png', 283 picUrl1: '/img/nav_29.png',
282 picUrl2: '/img/nav_29_dwn.png', 284 picUrl2: '/img/nav_29_dwn.png',
283 isActive: false 285 isActive: false
284 },
285 {
286 name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
287 routeName: 'seat_order',
288 picUrl1: '/img/c7.png',
289 picUrl2: '/img/c7.png',
290 isActive: false
291 } 286 }
287 // {
288 // name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
289 // routeName: 'seat_order',
290 // picUrl1: '/img/c7.png',
291 // picUrl2: '/img/c7.png',
292 // isActive: false
293 // }
292 ]) 294 ])
293 const menusPersonal = ref([ 295 const menusPersonal = ref([
294 { 296 {
...@@ -319,13 +321,13 @@ const menusPersonal = ref([ ...@@ -319,13 +321,13 @@ const menusPersonal = ref([
319 picUrl2: '/img/nav_29_dwn.png', 321 picUrl2: '/img/nav_29_dwn.png',
320 isActive: false 322 isActive: false
321 }, 323 },
322 { 324 // {
323 name: language.value == 0 ? '票务预订' : 'Ticket Reservation', 325 // name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
324 routeName: 'seat_order', 326 // routeName: 'seat_order',
325 picUrl1: '/img/c7.png', 327 // picUrl1: '/img/c7.png',
326 picUrl2: '/img/c7.png', 328 // picUrl2: '/img/c7.png',
327 isActive: false 329 // isActive: false
328 }, 330 // },
329 { 331 {
330 name: language.value == 0 ? '系统消息' : 'System messages', 332 name: language.value == 0 ? '系统消息' : 'System messages',
331 routeName: 'mySms', 333 routeName: 'mySms',
...@@ -370,13 +372,13 @@ const menusPersonalEn = ref([ ...@@ -370,13 +372,13 @@ const menusPersonalEn = ref([
370 picUrl2: '/img/nav_29_dwn.png', 372 picUrl2: '/img/nav_29_dwn.png',
371 isActive: false 373 isActive: false
372 }, 374 },
373 { 375 // {
374 name: language.value == 0 ? '票务预订' : 'Ticket Reservation', 376 // name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
375 routeName: 'seat_order', 377 // routeName: 'seat_order',
376 picUrl1: '/img/c7.png', 378 // picUrl1: '/img/c7.png',
377 picUrl2: '/img/c7.png', 379 // picUrl2: '/img/c7.png',
378 isActive: false 380 // isActive: false
379 }, 381 // },
380 { 382 {
381 name: language.value == 0 ? '系统消息' : 'System messages', 383 name: language.value == 0 ? '系统消息' : 'System messages',
382 routeName: 'mySms', 384 routeName: 'mySms',
...@@ -389,7 +391,7 @@ let currMenu ...@@ -389,7 +391,7 @@ let currMenu
389 onMounted(() => { 391 onMounted(() => {
390 console.log(route.query) 392 console.log(route.query)
391 if (!user.utype) { 393 if (!user.utype) {
392 router.push({name: 'home'}) 394 router.push({ name: 'home' })
393 return 395 return
394 } 396 }
395 if (user.utype == '1') { 397 if (user.utype == '1') {
...@@ -399,7 +401,7 @@ onMounted(() => { ...@@ -399,7 +401,7 @@ onMounted(() => {
399 currMenu.isActive = true 401 currMenu.isActive = true
400 } 402 }
401 console.log(route.name) 403 console.log(route.name)
402 404
403 if (user.utype == '2') { 405 if (user.utype == '2') {
404 currMenu = _.find(menus.value, (m) => { 406 currMenu = _.find(menus.value, (m) => {
405 return m.routeName === route.name 407 return m.routeName === route.name
...@@ -412,7 +414,6 @@ onMounted(() => { ...@@ -412,7 +414,6 @@ onMounted(() => {
412 }) 414 })
413 currMenu.isActive = true 415 currMenu.isActive = true
414 } 416 }
415
416 }) 417 })
417 418
418 const toInfo = (item, list) => { 419 const toInfo = (item, list) => {
...@@ -420,37 +421,37 @@ const toInfo = (item, list) => { ...@@ -420,37 +421,37 @@ const toInfo = (item, list) => {
420 m.isActive = false 421 m.isActive = false
421 }) 422 })
422 item.isActive = true 423 item.isActive = true
423 424
424 router.push({ 425 router.push({
425 name: item.routeName 426 name: item.routeName
426 }) 427 })
427 } 428 }
428 </script> 429 </script>
429 430
430 <style scoped lang="scss"> 431 <style lang="scss" scoped>
431 :deep(.el-tabs__nav-wrap) { 432 :deep(.el-tabs__nav-wrap) {
432 padding: 0 15px; 433 padding: 0 15px;
433 } 434 }
434 435
435 .center-menu { 436 .center-menu {
436 text-align: center; 437 text-align: center;
437 438
438 li { 439 li {
439 margin-bottom: 15px; 440 margin-bottom: 15px;
440 } 441 }
441 442
442 &.en-menu { 443 &.en-menu {
443 text-align: left; 444 text-align: left;
444 445
445 li { 446 li {
446 padding: 6px 0 6px 14px; 447 padding: 6px 0 6px 14px;
447 448
448 a { 449 a {
449 display: flex; 450 display: flex;
450 align-items: center; 451 align-items: center;
451 } 452 }
452 } 453 }
453 454
454 img { 455 img {
455 padding: 0; 456 padding: 0;
456 width: 26px; 457 width: 26px;
...@@ -477,7 +478,7 @@ li img { ...@@ -477,7 +478,7 @@ li img {
477 } 478 }
478 .el-card { 479 .el-card {
479 box-shadow: none !important; 480 box-shadow: none !important;
480 481
481 :deep(.el-card__body) { 482 :deep(.el-card__body) {
482 padding: 0 !important; 483 padding: 0 !important;
483 } 484 }
...@@ -495,16 +496,16 @@ li img { ...@@ -495,16 +496,16 @@ li img {
495 top: 80px; 496 top: 80px;
496 width: 100px; 497 width: 100px;
497 border-right: 1px solid #eee; 498 border-right: 1px solid #eee;
498 499
499 li { 500 li {
500 font-size: 13px; 501 font-size: 13px;
501 padding: 8px 10px; 502 padding: 8px 10px;
502 border-radius: 0; 503 border-radius: 0;
503 504
504 img { 505 img {
505 display: none 506 display: none
506 } 507 }
507 508
508 &.active { 509 &.active {
509 background: #fff; 510 background: #fff;
510 border-left: 2px solid var(--el-color-primary); 511 border-left: 2px solid var(--el-color-primary);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!