Commit adb378d5 by 杨北旺

修复Bug

1 parent 96ca9f12
......@@ -21,18 +21,23 @@
</div>
<div class="tbale_wrap">
<el-table :data="tableData" height="350" style="100%" highlight-current-row>
<el-table-column prop="merchantName" label="门店名称" align="center"></el-table-column>
<el-table-column prop="merchantName" label="参与场次" align="center"></el-table-column>
<el-table-column prop="merchantName" label="总产值" align="center"></el-table-column>
<el-table-column prop="merchantName" label="平均单场产值" align="center"></el-table-column>
<!-- <el-table-column label="总产值" width="500">
<el-table-column prop="merchantName" label="门店名称" width="300px" align="center"></el-table-column>
<el-table-column prop="count" label="参与场次" width="100px" align="center"></el-table-column>
<el-table-column prop="total" label="总产值" width="500px">
<template slot-scope="scope">
<div class="echat_wrap">
<div class="h19_title xtext">{{ scope.row.divisionMoney }}</div>
<div :style="{ width: (100 * scope.row.divisionMoney) / custSortMax + '%' }" class="summary-progress-barin"></div>
<div class="h19_title xtext">¥{{ scope.row.total }}</div>
<div class="progress_wrap">
<div :style="{ width: (100 * scope.row.total) / custSortMax + '%' }" class="summary-progress-barin"></div>
</div>
</div>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column label="平均单场产值" align="center">
<template slot-scope="scope">
<div class="h19_title">¥{{ scope.row.perProduct }}</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
......@@ -42,8 +47,28 @@
export default {
data() {
return {
tableData:[]
tableData: [],
custSortMax: 0
}
},
mounted() {
// 模拟数据
this.custSortMax = 0
for (let i = 0; i < 10; i++) {
let obj = {
merchantName: '门店' + i,
count: i + 10,
total: Math.round(Math.random() * 10000),
perProduct: Math.round(Math.random() * 6000)
}
this.tableData.push(obj)
}
this.tableData.forEach(item => {
if (item.total >= this.custSortMax) {
this.custSortMax = item.total
}
})
}
}
</script>
......@@ -110,5 +135,22 @@ export default {
}
}
}
.tbale_wrap {
.echat_wrap {
display: flex;
align-items: center;
.xtext {
width: 20%;
}
.progress_wrap {
width: 65%;
margin-left: 10px;
}
.summary-progress-barin {
height: 15px;
background-color: #5850ff;
}
}
}
}
</style>
\ No newline at end of file
......@@ -303,7 +303,7 @@ export default {
position: relative;
.table_icon {
position: absolute;
left: 22px;
left: 19px;
top: 158px;
width: 24px;
height: 24px;
......@@ -311,7 +311,7 @@ export default {
}
.pos1 {
position: absolute;
left: 22px;
left: 19px;
top: 282px;
}
.tbale_one {
......
......@@ -4,7 +4,7 @@
<img src="../../assets/scrm_bar_table_icon.png">
</div>
<div class="chart_wrapper">
<line-chart ref="myline" echartId="myline"></line-chart>
<line-chart :width="width" ref="myline" echartId="myline"></line-chart>
</div>
<div class="table-wrapper">
<div class="top_line flex_scb">
......@@ -43,6 +43,10 @@ export default {
show: {
type: Boolean,
default: false
},
width:{
type:Number,
default:400
}
},
data() {
......
......@@ -87,7 +87,7 @@
</div>
</template>
<div v-show="accountLevel != 4">
<bloc-con ref="mybloc" :show="openRankFlag" @showRanking="toOpenRanking"></bloc-con>
<bloc-con ref="mybloc" :width="chartWidth" :show="openRankFlag" @showRanking="toOpenRanking"></bloc-con>
</div>
</div>
<div v-show="accountLevel != 4">
......
......@@ -27,7 +27,9 @@
<template slot-scope="scope">
<div class="echat_wrap">
<div class="h19_title xtext">{{ scope.row.divisionMoney }}</div>
<div :style="{ width: (100 * scope.row.divisionMoney) / custSortMax + '%' }" class="summary-progress-barin"></div>
<div class="progress_wrap">
<div :style="{ width: (100 * scope.row.divisionMoney) / custSortMax + '%' }" class="summary-progress-barin"></div>
</div>
</div>
</template>
</el-table-column>
......@@ -60,7 +62,7 @@ export default {
type: Boolean,
default: false
},
product:Number
product: Number
},
created() {
this.today = utils.dateFormat(new Date())
......@@ -160,14 +162,16 @@ export default {
.echat_wrap {
display: flex;
align-items: center;
.xtext{
.xtext {
width: 20%;
}
.summary-progress-barin {
.progress_wrap {
margin-left: 10px;
width: 65%;
}
.summary-progress-barin {
background-color: #5850ff;
height: 15px;
width: 65%;
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!