j1ack 3 years ago
parent
commit
f71b0689f7
  1. 50
      src/components/companySummary/business.vue
  2. 12
      src/components/companySummary/talent.vue
  3. 16
      src/views/Brand.vue

50
src/components/companySummary/business.vue

@ -12,7 +12,7 @@
<script> <script>
export default { export default {
props: { props: {
chartData: { chartData: {
type: Object, type: Object,
required: true, required: true,
@ -25,18 +25,19 @@ export default {
} }
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
// console.log(this.chartData) // console.log(this.chartData)
this.getEchartLeft1(); this.getEchartLeft1();
}, 500); }, 500);
}, },
methods: { methods: {
getEchartLeft1() { getEchartLeft1() {
// //
// eslint-disable-next-line no-undef
let myChart = echarts.init(document.getElementById('chart_left1')); let myChart = echarts.init(document.getElementById('chart_left1'));
let charts = { // let charts = { //
cityList: ['临时车', '月卡车', '免费车', '绿牌车'], cityList: ['临时车', '月卡车', '免费车', '绿牌车'],
cityData: [this.chartData.temporaryCarNum, this.chartData.yueZuCheNum, this.chartData.freeCarNum, this.chartData.greenCarNum] cityData: [this.chartData.temporaryCarNum || 0, this.chartData.yueZuCheNum || 0, this.chartData.freeCarNum || 0, this.chartData.greenCarNum || 0]
} }
let top10CityList = charts.cityList; let top10CityList = charts.cityList;
@ -56,6 +57,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
show: true, show: true,
// eslint-disable-next-line no-undef
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0, offset: 0,
color: color[x] + ', 0.3)' color: color[x] + ', 0.3)'
@ -75,7 +77,7 @@ export default {
} }
// //
let arr = []; let arr = [];
for (var i = 0; i < lineY.length; i++) { for (var i = 0; i < lineY.length; i++) {
arr.push({ arr.push({
value: lineY[i].value, value: lineY[i].value,
symbolPosition: "end", symbolPosition: "end",
@ -158,27 +160,27 @@ export default {
series: [ series: [
{ {
name: '', name: '',
type: 'bar', type: 'bar',
zlevel: 2, zlevel: 2,
barWidth: '7px', barWidth: '7px',
data: lineY, data: lineY,
showBackground: true, showBackground: true,
animationDuration: 1500, animationDuration: 1500,
label: { label: {
position:'top', position: 'top',
show: true, show: true,
formatter: function (params) { formatter: function (params) {
// console.log(params) // console.log(params)
// return params.data.realValue; // return params.data.realValue;
var percent = Number((params.value / 100) * 100).toFixed(2) + '%'; var percent = Number((params.value / 100) * 100).toFixed(2) + '%';
return percent; return percent;
}, },
color: '#fff', color: '#fff',
fontSize: 12, fontSize: 12,
}, },
}, },
{ {
name: "XXX", name: "XXX",
type: "pictorialBar", type: "pictorialBar",
symbol: symbol:

12
src/components/companySummary/talent.vue

@ -10,23 +10,23 @@
<div class="dataText"> <div class="dataText">
<div class="item"> <div class="item">
<span class="p1 blue">{{ chartData.alipayPayAmount }}</span> <span class="p1 blue">{{ chartData.alipayPayAmount }}</span>
<span class="p1 blue">{{ GetPercent(chartData.alipayPayAmount,0.1) }}%</span> <span class="p1 blue">{{ GetPercent(chartData.alipayPayAmount, 0.1) }}%</span>
</div> </div>
<div class="item"> <div class="item">
<span class="p1 green">{{ chartData.weixinPayAmount }}</span> <span class="p1 green">{{ chartData.weixinPayAmount }}</span>
<span class="p1 green">{{ GetPercent(chartData.weixinPayAmount,0.1) }}%</span> <span class="p1 green">{{ GetPercent(chartData.weixinPayAmount, 0.1) }}%</span>
</div> </div>
<div class="item"> <div class="item">
<span class="p1 y">{{ chartData.casePayAmount }}</span> <span class="p1 y">{{ chartData.casePayAmount }}</span>
<span class="p1 y">{{ GetPercent(chartData.casePayAmount,0.1) }}%</span> <span class="p1 y">{{ GetPercent(chartData.casePayAmount, 0.1) }}%</span>
</div> </div>
<div class="item"> <div class="item">
<span class="p1 r">{{ chartData.robotPayAmount }}</span> <span class="p1 r">{{ chartData.robotPayAmount }}</span>
<span class="p1 r">{{ GetPercent(chartData.robotPayAmount,0.1) }}%</span> <span class="p1 r">{{ GetPercent(chartData.robotPayAmount, 0.1) }}%</span>
</div> </div>
<div class="item"> <div class="item">
<span class="p1 b">{{ chartData.unionPayAmount }}</span> <span class="p1 b">{{ chartData.unionPayAmount }}</span>
<span class="p1 b">{{ GetPercent(chartData.unionPayAmount,0.1) }}%</span> <span class="p1 b">{{ GetPercent(chartData.unionPayAmount, 0.1) }}%</span>
</div> </div>
</div> </div>
</div> </div>
@ -123,7 +123,7 @@ export default {
let option = { let option = {
title: { title: {
text: "总金额:" + this.chartData.totalAmount + " 元", text: `总金额: ${this.chartData ? this.chartData.totalAmount || 0 : 0}`,
top: 20, top: 20,
left: 200, left: 200,
textStyle: { textStyle: {

16
src/views/Brand.vue

@ -238,7 +238,7 @@ export default {
// - // -
BiApi.getTodayTrade({ authCode }).then((res) => { BiApi.getTodayTrade({ authCode }).then((res) => {
// console.log(res); // console.log(res);
if (res.code === 200) { if (res && res.code === 200) {
const { totalAmount, totalNum } = res.data const { totalAmount, totalNum } = res.data
this.startNumber = this.endNumber; this.startNumber = this.endNumber;
this.startAmount = this.endAmount; this.startAmount = this.endAmount;
@ -248,32 +248,32 @@ export default {
}); });
// //
BiApi.getRealTimeInOutRecord({ authCode, pageNum: 1, pageSize: 10 }).then((res) => { BiApi.getRealTimeInOutRecord({ authCode, pageNum: 1, pageSize: 10 }).then((res) => {
if (res.code === 200) { if (res && res.code === 200) {
this.realTimeInOutRecord = res.rows this.realTimeInOutRecord = res.rows
} }
}); });
// - // -
BiApi.getParkingRanking({ authCode }).then((res) => { BiApi.getParkingRanking({ authCode }).then((res) => {
this.rankData = res.data if (res && res.code === 200) this.rankData = res.data
}) })
// - // -
BiApi.paymentStatistics({ authCode }).then((res) => { BiApi.paymentStatistics({ authCode }).then((res) => {
this.payData = res.data if (res && res.code === 200) this.payData = res.data
}) })
// - // -
BiApi.amountCartStatistics({ authCode }).then((res) => { BiApi.amountCartStatistics({ authCode }).then((res) => {
this.payDataCar = res.data if (res && res.code === 200) this.payDataCar = res.data
}) })
// -24 // -24
BiApi.todayTrafficStatistics({ authCode }).then((res) => { BiApi.todayTrafficStatistics({ authCode }).then((res) => {
this.todayTraffic = res.data if (res && res.code === 200) this.todayTraffic = res.data
}) })
// -24使 // -24使
BiApi.todayCarUseStatistics({ authCode }).then((res) => { BiApi.todayCarUseStatistics({ authCode }).then((res) => {
this.todayCarUse = res.data if (res && res.code === 200) this.todayCarUse = res.data
}) })
BiApi.useCarStatistics({ authCode }).then((res) => { BiApi.useCarStatistics({ authCode }).then((res) => {
this.useCarCon = res.data if (res && res.code === 200) this.useCarCon = res.data
}) })
BiApi.parkingCarNum({ authCode }).then((res) => { BiApi.parkingCarNum({ authCode }).then((res) => {
this.geoCoordMap = { this.geoCoordMap = {

Loading…
Cancel
Save