|
@@ -62,8 +62,9 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="Pie_charts">
|
|
|
|
- <PieCharts></PieCharts>
|
|
|
|
|
|
+ <view class="Pie_charts" style="min-height: 580rpx;">
|
|
|
|
+ <!-- <PieCharts></PieCharts> -->
|
|
|
|
+ <qiun-data-charts type="ring" :opts="optsPied" :chartData="chartDataPied" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="echarts-two">
|
|
<view class="echarts-two">
|
|
@@ -75,8 +76,7 @@
|
|
单位:元
|
|
单位:元
|
|
</view>
|
|
</view>
|
|
<view class="line_charts_one">
|
|
<view class="line_charts_one">
|
|
- <LineOne />
|
|
|
|
-
|
|
|
|
|
|
+ <qiun-data-charts type="area" :opts="revenueOptsone" :chartData="revenueChartDataOne" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="echarts-three">
|
|
<view class="echarts-three">
|
|
@@ -90,7 +90,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="line_charts_two">
|
|
<view class="line_charts_two">
|
|
- <LineTwo />
|
|
|
|
|
|
+ <qiun-data-charts type="area" :opts="revenueOptstwo" :chartData="revenueChartDataTwo" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<Tabbar :tabbarIndex="2"></Tabbar>
|
|
<Tabbar :tabbarIndex="2"></Tabbar>
|
|
@@ -115,13 +115,136 @@
|
|
date: '2024-01',
|
|
date: '2024-01',
|
|
fromData: {
|
|
fromData: {
|
|
dateDay: '2024-01',
|
|
dateDay: '2024-01',
|
|
- homestayId: '1744620500506251265'
|
|
|
|
|
|
+ homestayId: ''
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ chartDataPied: {},
|
|
|
|
+ optsPied: {
|
|
|
|
+ rotate: false,
|
|
|
|
+ rotateLock: false,
|
|
|
|
+ color: ['#1372FF', '#F89F2A', '#02C493'],
|
|
|
|
+ padding: [30, 30, 30, 35],
|
|
|
|
+ dataLabel: true,
|
|
|
|
+ enableScroll: false,
|
|
|
|
+ legend: {
|
|
|
|
+ show: true,
|
|
|
|
+ position: "bottom",
|
|
|
|
+ lineHeight: 25
|
|
|
|
+ },
|
|
|
|
+ title: {
|
|
|
|
+ name: "",
|
|
|
|
+ fontSize: 15,
|
|
|
|
+ color: "#666666"
|
|
|
|
+ },
|
|
|
|
+ subtitle: {
|
|
|
|
+ name: "",
|
|
|
|
+ fontSize: 25,
|
|
|
|
+ color: "#7cb5ec"
|
|
|
|
+ },
|
|
|
|
+ extra: {
|
|
|
|
+ ring: {
|
|
|
|
+ ringWidth: 25,
|
|
|
|
+ activeOpacity: 0.5,
|
|
|
|
+ activeRadius: 10,
|
|
|
|
+ offsetAngle: 0,
|
|
|
|
+ labelWidth: 10,
|
|
|
|
+ border: false,
|
|
|
|
+ borderWidth: 3,
|
|
|
|
+ borderColor: "#FFFFFF"
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ PieChartsList: {},
|
|
|
|
+
|
|
|
|
+ // 公司营收
|
|
|
|
+ revenueChartDataOne: {},
|
|
|
|
+ revenueOptsone: {
|
|
|
|
+ color: ["#4B98FE"],
|
|
|
|
+ padding: [15, 15],
|
|
|
|
+ dataLabel: false,
|
|
|
|
+ xAxis: {
|
|
|
|
+ disableGrid: true,
|
|
|
|
+ },
|
|
|
|
+ yAxis: {
|
|
|
|
+ // gridColor: "rgba(230,230,230,0.6)",
|
|
|
|
+ gridColor: "rgba(200,200,200,0.6)",
|
|
|
|
+ disabled: false,
|
|
|
|
+ disableGrid: false,
|
|
|
|
+ gridType: 'dash',
|
|
|
|
+ dashLength: '4',
|
|
|
|
+ data: [{
|
|
|
|
+ axisLineColor: "#FFFFFF",
|
|
|
|
+ min: 0,
|
|
|
|
+ }],
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ show: false,
|
|
|
|
+ position: "top",
|
|
|
|
+ float: "right",
|
|
|
|
+ },
|
|
|
|
+ extra: {
|
|
|
|
+ area: {
|
|
|
|
+ type: "curve",
|
|
|
|
+ opacity: 0.8,
|
|
|
|
+ addLine: true,
|
|
|
|
+ width: 1,
|
|
|
|
+ gradient: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
+ dataListOne: [],
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 公司营收
|
|
|
|
+ revenueChartDataTwo: {},
|
|
|
|
+ revenueOptstwo: {
|
|
|
|
+ color: ["#4B98FE"],
|
|
|
|
+ padding: [15, 15],
|
|
|
|
+ dataLabel: false,
|
|
|
|
+ xAxis: {
|
|
|
|
+ disableGrid: true,
|
|
|
|
+ },
|
|
|
|
+ yAxis: {
|
|
|
|
+ // gridColor: "rgba(230,230,230,0.6)",
|
|
|
|
+ gridColor: "rgba(200,200,200,0.6)",
|
|
|
|
+ disabled: false,
|
|
|
|
+ disableGrid: false,
|
|
|
|
+ gridType: 'dash',
|
|
|
|
+ dashLength: '4',
|
|
|
|
+ data: [{
|
|
|
|
+ axisLineColor: "#FFFFFF",
|
|
|
|
+ min: 0,
|
|
|
|
+ max: 1
|
|
|
|
+ }],
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ show: false,
|
|
|
|
+ position: "top",
|
|
|
|
+ float: "right",
|
|
|
|
+ },
|
|
|
|
+ extra: {
|
|
|
|
+ area: {
|
|
|
|
+ type: "curve",
|
|
|
|
+ opacity: 0.8,
|
|
|
|
+ addLine: true,
|
|
|
|
+ width: 1,
|
|
|
|
+ gradient: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ dataListTwo: [],
|
|
|
|
+
|
|
|
|
+
|
|
list: {}
|
|
list: {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
- this.getList()
|
|
|
|
|
|
+ // this.fromData.dateDay = e.detail.value
|
|
|
|
+ this.fromData.homestayId = wx.getStorageSync('homestayId')
|
|
|
|
+ if (this.fromData.homestayId !== '') {
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
bindDateChange(e) {
|
|
bindDateChange(e) {
|
|
@@ -136,13 +259,99 @@
|
|
endDate() {
|
|
endDate() {
|
|
return this.getDate('end')
|
|
return this.getDate('end')
|
|
},
|
|
},
|
|
|
|
+
|
|
getList() {
|
|
getList() {
|
|
this.$api.get('/merchant/hotel/mine/getHotelCountInfo', this.fromData).then(res => {
|
|
this.$api.get('/merchant/hotel/mine/getHotelCountInfo', this.fromData).then(res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.list = res.data.data
|
|
this.list = res.data.data
|
|
- // wx.setStorageSync('fromData', this.list)
|
|
|
|
|
|
+ // 环图 营业概况
|
|
|
|
+ this.getServerData();
|
|
|
|
+ // 交易趋势
|
|
|
|
+ this.drawRevenueChartsOne()
|
|
|
|
+ // 入住率
|
|
|
|
+ this.drawRevenueChartstwo()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 环图 营业概况
|
|
|
|
+ getServerData() {
|
|
|
|
+ this.PieChartsList = this.list
|
|
|
|
+ console.log('环图2222', this.PieChartsList);
|
|
|
|
+ this.PieChartsList = {
|
|
|
|
+ series: [{
|
|
|
|
+ data: [{
|
|
|
|
+ "name": "房费",
|
|
|
|
+ "value": this.PieChartsList.roomAmount,
|
|
|
|
+ "labelText": "房费" + this.PieChartsList.roomRatio + '%'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "商品",
|
|
|
|
+ "value": this.PieChartsList.othersAmount,
|
|
|
|
+ "labelText": "商品" + this.PieChartsList.othersRatio + '%'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "其他",
|
|
|
|
+ "value": this.PieChartsList.breakfastAmount,
|
|
|
|
+ "labelText": "其他" + this.PieChartsList.breakfastRatio + '%',
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ }],
|
|
|
|
+ }
|
|
|
|
+ this.chartDataPied = JSON.parse(JSON.stringify(this.PieChartsList));
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 交易趋势
|
|
|
|
+ drawRevenueChartsOne() {
|
|
|
|
+ // this.list = this.objList
|
|
|
|
+ // console.log('交易趋势33333333', this.list);
|
|
|
|
+ this.list.checkedInChant.forEach(item => {
|
|
|
|
+ this.dataListOne.push(item.checkedInRatio)
|
|
|
|
+ })
|
|
|
|
+ let list1 = {
|
|
|
|
+ categories: [
|
|
|
|
+ "01-01", "", "", "", "", "", "",
|
|
|
|
+ "01-08", "", "", "", "", "", "",
|
|
|
|
+ "01-15", "", "", "", "", "", "",
|
|
|
|
+ "01-22", "", "", "", "", "", "",
|
|
|
|
+ "01-29", "", ""
|
|
|
|
+ ],
|
|
|
|
+ series: [{
|
|
|
|
+ name: "收入",
|
|
|
|
+ data: this.dataListOne,
|
|
|
|
+ legendShape: "circle",
|
|
|
|
+ color: "#4088FE",
|
|
|
|
+ pointShape: "none",
|
|
|
|
+ }, ],
|
|
|
|
+ }
|
|
|
|
+ this.revenueChartDataOne = JSON.parse(JSON.stringify(list1));
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 入住率
|
|
|
|
+ drawRevenueChartstwo() {
|
|
|
|
+ this.list.checkedInChant.forEach(item => {
|
|
|
|
+ this.dataListTwo.push(item.checkedInRatio)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ let list2 = {
|
|
|
|
+ categories: ["01-01", "", "", "", "", "", "", "01-08", "", "", "", "", "", "", "01-15",
|
|
|
|
+ "", "", "", "", "", "", "01-22", "", "", "", "", "", "", "01-29", "", "",
|
|
|
|
+ ],
|
|
|
|
+ series: [{
|
|
|
|
+ name: "入住率",
|
|
|
|
+ data: this.dataListTwo,
|
|
|
|
+ legendShape: "circle",
|
|
|
|
+ color: "#600EFF",
|
|
|
|
+ pointShape: "none",
|
|
|
|
+ }, ],
|
|
|
|
+ }
|
|
|
|
+ this.revenueChartDataTwo = JSON.parse(JSON.stringify(list2));
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -251,9 +460,10 @@
|
|
}
|
|
}
|
|
|
|
|
|
.Pie_charts {
|
|
.Pie_charts {
|
|
- height: 600rpx;
|
|
|
|
- width: 630rpx;
|
|
|
|
|
|
+ width: 600rpx !important;
|
|
|
|
+ height: 560rpx !important;
|
|
// background-color: aqua;
|
|
// background-color: aqua;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -286,6 +496,7 @@
|
|
.line_charts_one {
|
|
.line_charts_one {
|
|
width: 630rpx;
|
|
width: 630rpx;
|
|
height: 388rpx;
|
|
height: 388rpx;
|
|
|
|
+
|
|
// background-color: aqua;
|
|
// background-color: aqua;
|
|
}
|
|
}
|
|
|
|
|