Commit f53f45e7bff80556fd121acde8a050d884718066

Authored by Andy
1 parent e4acf226

add 我的卡券 账户前端页面 table card

src/assets/cardticket/card_gray.png 0 → 100644

711 Bytes

src/assets/cardticket/card_red.png 0 → 100644

666 Bytes

src/styles/index.scss
@@ -107,3 +107,40 @@ p{ @@ -107,3 +107,40 @@ p{
107 .margin-top-24{ 107 .margin-top-24{
108 margin-top: 24px; 108 margin-top: 24px;
109 } 109 }
  110 +.bgcolor-fff{
  111 + background-color: #fff;
  112 +}
  113 +.boxshadow-4{
  114 + box-shadow:0px 4px 10px 0px rgba(225,227,228,1);
  115 + border-radius:4px;
  116 +}
  117 +.padding-0{
  118 + padding: 0!important;
  119 +}
  120 +.margin-bottom16{
  121 + margin-bottom: 16px;
  122 +}
  123 +.float-left{
  124 + float: left;
  125 +}
  126 +.float-right{
  127 + float: right;
  128 +}
  129 +/*不换行 省略号*/
  130 +.hs-hidden-nowrap{
  131 + overflow: hidden;
  132 + white-space: nowrap;
  133 + text-overflow: ellipsis;
  134 +}
  135 +//定位
  136 +.pos-rel{
  137 + position: relative;
  138 +}
  139 +.pos-abs{
  140 + position: absolute;
  141 +}
  142 +//鼠标
  143 +.hs-cursor-pointer{
  144 + cursor: pointer;
  145 +}
  146 +
src/views/account/index.vue
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </el-row> 31 </el-row>
32 <!--账户明细 sta--> 32 <!--账户明细 sta-->
33 <el-card shadow="always" class="card-second-top margin-top-24"> 33 <el-card shadow="always" class="card-second-top margin-top-24">
34 - <el-tabs :tab-position="left" > 34 + <el-tabs :tab-position="tabPosition" >
35 <el-tab-pane label="充值记录"> 35 <el-tab-pane label="充值记录">
36 <el-table 36 <el-table
37 :data="paytableData" 37 :data="paytableData"
@@ -102,13 +102,6 @@ @@ -102,13 +102,6 @@
102 </el-tab-pane> 102 </el-tab-pane>
103 </el-tabs> 103 </el-tabs>
104 104
105 - <!-- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">  
106 - <el-tab-pane label="充值" name="first">  
107 -  
108 - </el-tab-pane>  
109 - <el-tab-pane label="支出" name="second">配置管理</el-tab-pane>  
110 - </el-tabs>-->  
111 -  
112 </el-card> 105 </el-card>
113 </div> 106 </div>
114 </template> 107 </template>
@@ -129,6 +122,7 @@ export default { @@ -129,6 +122,7 @@ export default {
129 data() { 122 data() {
130 return { 123 return {
131 list: null, 124 list: null,
  125 + tabPosition:'top',
132 listLoading: true, 126 listLoading: true,
133 btnLoading:false, 127 btnLoading:false,
134 loading:false, 128 loading:false,
@@ -232,5 +226,4 @@ export default { @@ -232,5 +226,4 @@ export default {
232 .el-card__header{ 226 .el-card__header{
233 padding:10px 20px!important;; 227 padding:10px 20px!important;;
234 } 228 }
235 -  
236 </style> 229 </style>
src/views/cardticket/index.vue
1 -<template>  
2 - <div class="app-container">  
3 - <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" />  
4 -  
5 - <el-tree  
6 - ref="tree2"  
7 - :data="data2"  
8 - :props="defaultProps"  
9 - :filter-node-method="filterNode"  
10 - class="filter-tree"  
11 - default-expand-all  
12 - />  
13 1
  2 +<template>
  3 + <div class="app-container" style="padding: 0px">
  4 + <!--卡券 sta-->
  5 + <el-row :gutter="16" class="">
  6 + <el-col :span="6" v-for="(ticket,id) in ticketList" :key="id" class="margin-bottom16">
  7 + <el-card class="box-card">
  8 + <div class="ticket-title boxshadow-4 " :class="ticket.ptype == 1 ?'eff-bgcolor': 'off-bgcolor'">
  9 + <div class=" float-left" :class="ticket.ptype == 1 ?'eff-icon': 'off-icon'"></div>
  10 + <div class="ticket-name hs-hidden-nowrap hs-cursor-pointer float-left" >{{ticket.plname}}</div>
  11 + <div class="ticket-oper float-right">{{ticket.pname}}</div>
  12 + </div>
  13 + <div class="ticket-content">
  14 + <div class="ticket-main clearfix">
  15 + <div class=" hs-hidden-nowrap hs-cursor-pointer float-left" :class="ticket.ptype == 1 ?'ticket-effmoney': 'ticket-offmoney'">{{ticket.pmoney}}</div>
  16 + <div class="ticket-notes float-left">元 优惠券</div>
  17 + </div>
  18 + <div class="ticket-time">有效时间:{{ticket.ptime}}</div>
  19 + </div>
  20 + </el-card>
  21 + </el-col>
  22 + </el-row>
14 </div> 23 </div>
15 </template> 24 </template>
16 25
@@ -19,60 +28,179 @@ export default { @@ -19,60 +28,179 @@ export default {
19 28
20 data() { 29 data() {
21 return { 30 return {
22 - filterText: '',  
23 - data2: [{  
24 - id: 1,  
25 - label: 'Level one 1',  
26 - children: [{  
27 - id: 4,  
28 - label: 'Level two 1-1',  
29 - children: [{  
30 - id: 9,  
31 - label: 'Level three 1-1-1'  
32 - }, {  
33 - id: 10,  
34 - label: 'Level three 1-1-2'  
35 - }]  
36 - }]  
37 - }, {  
38 - id: 2,  
39 - label: 'Level one 2',  
40 - children: [{  
41 - id: 5,  
42 - label: 'Level two 2-1'  
43 - }, {  
44 - id: 6,  
45 - label: 'Level two 2-2'  
46 - }]  
47 - }, {  
48 - id: 3,  
49 - label: 'Level one 3',  
50 - children: [{  
51 - id: 7,  
52 - label: 'Level two 3-1'  
53 - }, {  
54 - id: 8,  
55 - label: 'Level two 3-2'  
56 - }]  
57 - }],  
58 - defaultProps: {  
59 - children: 'children',  
60 - label: 'label'  
61 - }  
62 - }  
63 - },  
64 - watch: {  
65 - filterText(val) {  
66 - this.$refs.tree2.filter(val) 31 + ticketList:[
  32 + {
  33 + id:'123',
  34 + ptype:'1',
  35 + plname:'静雅地上停车场',
  36 + pname:'有效',
  37 + pmoney:'50',
  38 + ptime:'2019/8/30',
  39 + },
  40 + {
  41 + id:'123',
  42 + ptype:'2',
  43 + plname:'静雅地上停车场',
  44 + pname:'无效',
  45 + pmoney:'50',
  46 + ptime:'2019/8/30',
  47 + },
  48 + {
  49 + id:'123',
  50 + ptype:'2',
  51 + plname:'静雅地上停车场',
  52 + pname:'无效',
  53 + pmoney:'50',
  54 + ptime:'2019/8/30',
  55 + },
  56 + {
  57 + id:'123',
  58 + ptype:'1',
  59 + plname:'静雅地上停车场',
  60 + pname:'有效',
  61 + pmoney:'50',
  62 + ptime:'2019/8/30',
  63 + },
  64 + {
  65 + id:'123',
  66 + ptype:'1',
  67 + plname:'静雅地上停车场',
  68 + pname:'有效',
  69 + pmoney:'50',
  70 + ptime:'2019/8/30',
  71 + },
  72 + {
  73 + id:'123',
  74 + ptype:'2',
  75 + plname:'静雅地上停车场',
  76 + pname:'无效',
  77 + pmoney:'50',
  78 + ptime:'2019/8/30',
  79 + },
  80 + {
  81 + id:'123',
  82 + ptype:'2',
  83 + plname:'静雅地上停车场',
  84 + pname:'无效',
  85 + pmoney:'50',
  86 + ptime:'2019/8/30',
  87 + },
  88 + {
  89 + id:'123',
  90 + ptype:'1',
  91 + plname:'静雅地上停车场',
  92 + pname:'有效',
  93 + pmoney:'50',
  94 + ptime:'2019/8/30',
  95 + },
  96 + ]
67 } 97 }
68 }, 98 },
69 99
  100 +
70 methods: { 101 methods: {
71 - filterNode(value, data) {  
72 - if (!value) return true  
73 - return data.label.indexOf(value) !== -1  
74 - } 102 +
75 } 103 }
76 } 104 }
77 </script> 105 </script>
78 106
  107 +<style lang="scss" scoped>
  108 + .el-card__body{
  109 + padding: 0;
  110 + }
  111 + .ticket-title{
  112 + height: 46px;
  113 + line-height: 46px;
  114 + width: 100%;
  115 + }
  116 + .ticket-content{
  117 + height: 98px;
  118 + width: 100%;
  119 + }
  120 + .eff-bgcolor{
  121 + background-color: rgb(64, 158, 255);
  122 + }
  123 + .off-bgcolor{
  124 + background-color: #909399;
  125 + }
  126 + .eff-icon{
  127 + margin:8px 8px 8px 16px;
  128 + height: 30px;
  129 + width: 30px;
  130 + background-image: url("../../assets/cardticket/card_red.png");
  131 + background-size: 100% 100%;
  132 + background-repeat: no-repeat;
  133 + }
  134 + .off-icon{
  135 + margin:8px 8px 8px 16px;
  136 + height: 30px;
  137 + width: 30px;
  138 + background-image: url("../../assets/cardticket/card_gray.png");
  139 + background-size: 100% 100%;
  140 + background-repeat: no-repeat;
  141 + }
  142 + .ticket-name{
  143 + width:120px;
  144 + height:46px;
  145 + font-size:14px;
  146 + font-weight:500;
  147 + color:rgba(255,255,255,1);
  148 + line-height:46px;
  149 + }
  150 + .ticket-oper{
  151 + font-size:12px;
  152 + font-weight:500;
  153 + color:rgba(255,255,255,1);
  154 + width:42px;
  155 + height:20px;
  156 + line-height: 20px;
  157 + text-align: center;
  158 + border-radius:2px;
  159 + margin-top: 10px;
  160 + margin-right: 16px;
  161 + border:1px solid rgba(255,255,255,1);
  162 + }
  163 + .ticket-main{
  164 + width:100%;
  165 + height:62px;
  166 + .ticket-effmoney{
  167 + font-size:44px;
  168 + font-weight:600;
  169 + color:rgb(64, 158, 255);
  170 + height:62px;
  171 + line-height:62px;
  172 + margin-left: 16px;
  173 + max-width: 120px;
  174 + }
  175 + .ticket-offmoney{
  176 + font-size:44px;
  177 + font-weight:600;
  178 + color:rgba(92,92,92,1);
  179 + height:62px;
  180 + line-height:62px;
  181 + margin-left: 16px;
  182 + max-width: 120px;
  183 + }
  184 + .ticket-notes{
  185 + height: 20px;
  186 + line-height: 20px;
  187 + font-size:14px;
  188 + font-weight:500;
  189 + color:rgba(64,64,64,1);
  190 + width: 70px;
  191 + margin-left: 10px;
  192 + margin-top: 30px;
  193 + }
  194 + }
  195 + .ticket-time{
  196 + width:143px;
  197 + height:20px;
  198 + font-size:14px;
  199 + font-weight:500;
  200 + color:rgba(64,64,64,1);
  201 + line-height:20px;
  202 + margin-left: 16px;
  203 + }
  204 +
  205 +</style>
  206 +