Commit 3ca9714c by 匡雅琴

众筹二级页面表格

1 parent a1c37b62
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"core-js": "^3.6.4", "core-js": "^3.6.4",
"dayjs": "^1.10.5", "dayjs": "^1.10.5",
"echarts": "^5.3.3", "echarts": "^5.3.3",
"element-ui": "^2.15.13",
"lib-flexible": "^0.3.2", "lib-flexible": "^0.3.2",
"postcss-loader": "^6.2.0", "postcss-loader": "^6.2.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
// import 'core-js/stable' // import 'core-js/stable'
// import 'regenerator-runtime/runtime' // import 'regenerator-runtime/runtime'
import Vue from 'vue' import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import store from './store' import store from './store'
...@@ -33,6 +35,8 @@ Vue.prototype.to = function(name, params) { ...@@ -33,6 +35,8 @@ Vue.prototype.to = function(name, params) {
} }
router.push({ name, params }) router.push({ name, params })
} }
Vue.use(ElementUI)
// 移动端适配 rem // 移动端适配 rem
// import 'lib-flexible/flexible.js' // import 'lib-flexible/flexible.js'
......
...@@ -64,11 +64,11 @@ export default { ...@@ -64,11 +64,11 @@ export default {
}, },
{ {
name: 'merchantname', name: 'merchantname',
width: '12vw' width: '13vw'
}, },
{ {
name: 'num', name: 'num',
width: '3vw', width: '6.5vw',
type: 'decimal' type: 'decimal'
} }
] ]
......
...@@ -9,9 +9,11 @@ ...@@ -9,9 +9,11 @@
<div class="right"> <div class="right">
<MainTab class="main-tab" :tabList="tabList" @tabChange="tabChange"></MainTab> <MainTab class="main-tab" :tabList="tabList" @tabChange="tabChange"></MainTab>
<template v-if="currentTab == 0"> <template v-if="currentTab == 0">
<!-- 广联维度 -->
<GlDemension></GlDemension> <GlDemension></GlDemension>
</template> </template>
<template v-else> <template v-else>
<!-- 品牌维度 -->
<BrandDimension></BrandDimension> <BrandDimension></BrandDimension>
</template> </template>
</div> </div>
......
...@@ -2,20 +2,53 @@ ...@@ -2,20 +2,53 @@
<div class="activity-box"> <div class="activity-box">
<box-title title="活动数据明细"></box-title> <box-title title="活动数据明细"></box-title>
<div class="content-box"> <div class="content-box">
<DateTab></DateTab> <div class="flex">
<DateTab></DateTab>
</div>
<ActivityTable class="activity-table" :tableData="tableData" :dataTotal="dataTotal"></ActivityTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import DateTab from './DateTab.vue' import DateTab from './DateTab.vue'
import ActivityTable from './ActivityTable.vue'
export default { export default {
name: 'ActivityDetail', name: 'ActivityDetail',
components: { components: {
DateTab DateTab,
ActivityTable
}, },
data() { data() {
return {} return {
tableData: [
{
activityName: '续保膨胀金活动',
activityTime: '2023-07-05 16:30:05',
type: '962,230',
production: '962,230',
browser: '962,230',
share: '962,230',
num: '962,230',
rate: '80%',
price: '6,400',
reject: '32%'
},
{
activityName: '续保膨胀金活动',
activityTime: '2023-07-05 16:30:05',
type: '962,230',
production: '962,230',
browser: '962,230',
share: '962,230',
num: '962,230',
rate: '80%',
price: '6,400',
reject: '32%'
}
],
dataTotal: 20
}
}, },
mounted() {}, mounted() {},
...@@ -30,6 +63,12 @@ export default { ...@@ -30,6 +63,12 @@ export default {
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
.content-box { .content-box {
padding: 1.78vh 1.39vw; padding: 1.78vh 1.39vw;
.activity-table {
margin-top: 2.22vh;
}
} }
} }
.flex {
display: flex;
}
</style> </style>
<template>
<div>
<el-table
:data="tableData"
style="width: 100%;"
:header-cell-style="{ color: '#ffffff', fontSize: '14px', height: '4.44vh', background: '#244888' }"
:row-class-name="tableRowClassName"
>
<el-table-column label="序号" width="60">
<!-- <template slot-scope="scope">
{{searchData.pageSize * (searchData.pageNo - 1) + (scope.$index + 1)}}
</template> -->
</el-table-column>
<el-table-column prop="activityName" label="活动名称" width="180"></el-table-column>
<el-table-column prop="activityTime" label="活动时间" width="210"></el-table-column>
<el-table-column prop="type" label="品类"></el-table-column>
<el-table-column prop="production" label="产值"></el-table-column>
<el-table-column prop="browser" label="浏览量"></el-table-column>
<el-table-column prop="share" label="分享次数"></el-table-column>
<el-table-column prop="num" label="订单量"></el-table-column>
<el-table-column prop="rate" label="转化率"></el-table-column>
<el-table-column prop="price" label="客单价"></el-table-column>
<el-table-column prop="reject" label="退单率"></el-table-column>
</el-table>
<el-pagination
class="pagination-box"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="curPageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="dataTotal"
></el-pagination>
</div>
</template>
<script>
export default {
name: 'ActivityTable',
props: {
tableData: {
type: Array,
default: () => []
},
dataTotal: String || Number
},
data() {
return {
currentPage: 1,
curPageSize: 10
}
},
mounted() {},
methods: {
tableRowClassName({ rowIndex }) {
if (rowIndex % 2 === 0) {
return 'usual-row'
} else if (rowIndex % 2 === 1) {
return 'warning-row'
}
},
handleSizeChange(e) {
console.log(e)
},
handleCurrentChange(e) {
console.log(e)
}
}
}
</script>
<style lang="scss">
.el-table {
font-weight: 400;
font-size: 14px;
text-align: center;
thead {
height: 4.44vh;
background: #244888;
color: #ffffff;
}
tbody tr {
height: 5.33vh;
color: #cccccc;
}
}
.el-table tr {
background-color: transparent;
}
.el-table .el-table__cell {
padding: 0 !important;
}
.el-table--enable-row-hover .el-table__body tr:hover > td {
background-color: transparent !important;
}
.el-table--enable-row-hover .el-table__body tr:hover {
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%) !important;
font-weight: 500;
color: #ffffff;
}
.pagination-box {
margin-top: 1.78vh;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: transparent;
background-image: linear-gradient(270deg, #6578FF 0%, #079FF1 100%);
color: #FFF;
}
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
background-color: #072545;
color: #C9C9C9;
}
.el-pagination__total,
.el-pagination__jump {
color: #C9C9C9;
}
.el-pagination .el-input__inner {
color: #C9C9C9;
background: #051526;
border: 2px solid;
border-image: linear-gradient(90deg, #074989, #30dcff, #074989) 1;
}
.usual-row {
background: #051526 !important
}
.warning-row {
background: #072545 !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!