SmartBeehive/page_Beehive/Beehive_detail.vue
2024-06-21 18:04:01 +08:00

1637 lines
34 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="page">
<u-navbar :title="title" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
:title-bold='true' height='45' id="navbar">
</u-navbar>
<view class="mapbox">
<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude"
:show-location='true'> </map>
<!-- <view class="num">
<view class="txt">
在线1001
</view>
<view class="txt" style="color:#FF473E ;margin-top: 10rpx;">
在线100
</view>
</view> -->
<view class="btn" @click="showwl = true">
<image src="https://api.ccttiot.com/smartmeter/img/static/uAJBChYkLJO66dYUkJ8M" mode=""></image>
</view>
</view>
<view class="tit">
福鼎蜂场-001
<view class="sets">
<image src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ" mode=""></image>
<view class="menu">
<view class="menu_li">
<image src="https://api.ccttiot.com/smartmeter/img/static/uE84FLJ6hKTfgt6gxYMw" mode=""></image>
编辑信息
</view>
<view class="menu_li">
<image src="https://api.ccttiot.com/smartmeter/img/static/uBfAFsDIhqFTFKxL0PVP" mode=""></image>
投放认养
</view>
<view class="menu_li">
<image src="https://api.ccttiot.com/smartmeter/img/static/uwkwkl1CDZfUhQyZdNFY" mode=""></image>
分享认养
</view>
</view>
</view>
</view>
<view class="address">
<image src="https://api.ccttiot.com/smartmeter/img/static/uMOucOG04nN4PrLJfqj6" mode=""></image>
福建省宁德市福鼎市太姥山镇秦屿大道2号
</view>
<view class="weather">
<view class="weather_left">
<view class="txt">
多云 15 ~ 25
</view>
<view class="txt" style="margin-left: 40rpx;">
西南风2级
</view>
</view>
<view class="weather_right">
更多天气 <view class="iconfont icon-xiangyou1"></view>
</view>
</view>
<view class="weather">
<view class="weather_left">
<view class="txt">
<image src="https://api.ccttiot.com/smartmeter/img/static/uZqKuAjf2idHAtkknKEU" mode=""></image>
44%
</view>
<view class="txt" style="margin-left: 26rpx;">
<image src="https://api.ccttiot.com/smartmeter/img/static/uJmWnkVE9UeIhNYdPexV" mode=""></image>
23
</view>
</view>
<view class="weather_right" style="font-weight: 400;font-size: 24rpx;color: #808080;">
更新于 2024-05-15 15:22:36
</view>
</view>
<view class="setbox">
<view class="setcard">
<view class="top">
<view class="left">
预警设置
</view>
<view class="right iconfont icon-xiangyou1">
</view>
</view>
<view class="bot">
时刻注意蜂箱变化
</view>
<view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/uxDnt5rGbJcc6mU6W3cE" mode=""></image>
</view>
</view>
<view class="setcard">
<view class="top">
<view class="left">
视频监控
</view>
<view class="right iconfont icon-xiangyou1">
</view>
</view>
<view class="bot">
更好查看蜂场情况
</view>
<view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/ukN0K37DEPQQxFJ03Qi9" mode=""></image>
</view>
</view>
</view>
<view class="card_top">
<view class="name">
福鼎蜂场-001
</view>
<view class="time">
05-20 16:31:13
</view>
<view class="ele">
<image src="https://api.ccttiot.com/smartmeter/img/static/uWDVO6wzl5tRe8X3rmhT" mode=""></image>
90%
</view>
</view>
<view class="echarts_box">
<view class="echarts_top">
<view class="top_left">
温度
<image src="https://api.ccttiot.com/smartmeter/img/static/utoKXhZBoejfRZwNUMP9" mode=""></image>
</view>
<view class="top_cont">
当前 40
</view>
<view class="top_right">
<view style="width: 1rpx;">
</view>
<view class="txt">
历史走势<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</view>
<view class="echarts">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas1" canvas-id="uni-ec-canvas"
:ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="echarts_box">
<view class="echarts_top">
<view class="top_left">
湿度
<image src="https://api.ccttiot.com/smartmeter/img/static/una6Kbd2gdBZ9gG6lg44" mode=""></image>
</view>
<view class="top_cont">
当前 38%
</view>
<view class="top_right">
<view style="width: 1rpx;">
</view>
<view class="txt">
历史走势<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</view>
<view class="echarts">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas2" canvas-id="uni-ec-canvas"
:ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="echarts_box">
<view class="echarts_top">
<view class="top_left">
重量
<image src="https://api.ccttiot.com/smartmeter/img/static/uk7CvwzeU0ukxvS9cBtD" mode=""></image>
</view>
<view class="top_cont">
当前 55Kg
</view>
<view class="top_right">
<view style="width: 1rpx;">
</view>
<view class="txt">
历史走势<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</view>
<view class="echarts">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas3" canvas-id="uni-ec-canvas"
:ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="echarts_box">
<view class="echarts_top">
<view class="top_left">
进出量
<image src="https://api.ccttiot.com/smartmeter/img/static/uhsU6Y1K35jxA4aRauzy" mode=""></image>
</view>
<view class="top_cont">
当前 552
</view>
<view class="top_right">
<view style="width: 1rpx;">
</view>
<view class="txt">
历史走势<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</view>
<view class="echarts">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas4" canvas-id="uni-ec-canvas"
:ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="echarts_box">
<view class="echarts_top">
<view class="top_left">
频率
<image src="https://api.ccttiot.com/smartmeter/img/static/up9IaGzSg1RKhIZz3V7a" mode=""></image>
</view>
<view class="top_cont">
当前 55Hz
</view>
<view class="top_right">
<view style="width: 1rpx;">
</view>
<view class="txt">
历史走势<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</view>
<view class="echarts">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas5" canvas-id="uni-ec-canvas"
:ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="echarts_box">
<view class="echarts_top">
<view class="top_left">
二氧化碳
<image src="https://api.ccttiot.com/smartmeter/img/static/um4lfl5q2O7FNM1EQc2L" mode=""></image>
</view>
<view class="top_cont">
当前 3%
</view>
<view class="top_right">
<view style="width: 1rpx;">
</view>
<view class="txt">
历史走势<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</view>
<view class="echarts">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas6" canvas-id="uni-ec-canvas"
:ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="weather_info" v-show="showtq">
<view class="top">
<view class="weather_info_tit">
未来7日天气预知
</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uQK4q99a1Qb7LFD6O3Hw" mode="" @click="showtq = false"></image>
</view>
<view class="top" style="margin-top: 14rpx;">
<view class="weather_add">
蜂场位置:<span style="color: #42A5F5;">福鼎市</span>
</view>
<view class="up_time">
1小时前更新
</view>
</view>
<view class="weather_cont">
<view class="weather_li" v-for="imte in 7 " :key="item">
<view class="data">
5/16
</view>
<view class="week">
今天
</view>
<view class="week_weather">
多云
</view>
<view class="week_weather_img">
<image src="https://api.ccttiot.com/smartmeter/img/static/u6wWpgZOuId6JSX8LGmz" mode=""></image>
</view>
</view>
</view>
<view class="echarts_box">
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas7" canvas-id="uni-ec-canvas" :ec="ec">
</uni-ec-canvas>
</view>
</view>
<view class="bottom_box">
<view class="type_li">
去皮
</view>
<view class="type_li">
蜂鸣寻箱
</view>
<view class="type_li">
风扇
</view>
<view class="type_li">
加热
</view>
</view>
</view>
</template>
<script>
import uniEcCanvas from '@/components/uni-ec-canvas/uni-ec-canvas.vue'
import * as echarts from '@/components/uni-ec-canvas/echarts'
let chart = null
export default {
components: {
uniEcCanvas
},
data() {
return {
ec: {
lazyLoad: true
},
bgc: {
backgroundColor: " #FAFDFD",
},
title: "添加视频监控",
latitude: '39.916527',
longitude: ' 116.397128',
isMap: false,
zoomSize: 15,
markers: [{
id: 1,
latitude: 39.90469,
longitude: 116.40717,
title: 'Marker1'
}, {
id: 2,
latitude: 39.90969,
longitude: 116.41217,
title: 'Marker2'
}],
chartday: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
chartData: [120, 200, 150, 80, 70, 110, 130],
showtq:true
}
},
onLoad() {
},
onShow() {
setTimeout(() => {
this.$refs.canvas1.init(this.initChart)
this.$refs.canvas2.init(this.initChart2)
this.$refs.canvas3.init(this.initChart3)
this.$refs.canvas4.init(this.initChart4)
this.$refs.canvas5.init(this.initChart5)
this.$refs.canvas6.init(this.initChart6)
this.$refs.canvas7.init(this.initChart7)
}, 200);
},
methods: {
// 温度
initChart(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
},
xAxis: {
show: true,
type: 'category',
boundaryGap: false,
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
rotate: 0,
},
splitLine: {
show: false,
},
// data: that.chartday,
},
yAxis: {
show: true,
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
formatter: function(value) {
// 保留两位小数没有小数时显示00
return value + '℃'
},
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [{
gt: 1,
lt: 3,
color: 'RGBA(255, 241, 201, 1)',
},
{
gt: 5,
lt: 7,
color: 'RGBA(255, 241, 201, 1)',
},
],
},
series: [{
type: 'line',
smooth: 0.6,
symbol: 'none',
lineStyle: {
color: '#FFE28C',
width: 4,
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFF1C9'
}, ]),
},
},
data: that.chartData,
}],
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
// 湿度
initChart2(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
},
xAxis: {
show: true,
type: 'category',
boundaryGap: false,
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
rotate: 0,
},
splitLine: {
show: false,
},
// data: that.chartday,
},
yAxis: {
show: true,
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
formatter: function(value) {
// 保留两位小数没有小数时显示00
return value + '%'
},
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [{
gt: 1,
lt: 3,
color: 'RGBA(255, 241, 201, 1)',
},
{
gt: 5,
lt: 7,
color: 'RGBA(255, 241, 201, 1)',
},
],
},
series: [{
type: 'line',
smooth: 0.6,
symbol: 'none',
lineStyle: {
color: '#FFE28C',
width: 4,
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFF1C9'
}, ]),
},
},
data: that.chartData,
}],
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
//重量
initChart3(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
},
xAxis: {
show: true,
type: 'category',
boundaryGap: false,
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
rotate: 0,
},
splitLine: {
show: false,
},
// data: that.chartday,
},
yAxis: {
show: true,
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
formatter: function(value) {
// 保留两位小数没有小数时显示00
return value + 'Kg'
},
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [{
gt: 1,
lt: 3,
color: 'RGBA(255, 241, 201, 1)',
},
{
gt: 5,
lt: 7,
color: 'RGBA(255, 241, 201, 1)',
},
],
},
series: [{
type: 'line',
smooth: 0.6,
symbol: 'none',
lineStyle: {
color: '#FFE28C',
width: 4,
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFF1C9'
}, ]),
},
},
data: that.chartData,
}],
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
// 进出量
initChart4(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
},
xAxis: {
show: true,
type: 'category',
boundaryGap: false,
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
rotate: 0,
},
splitLine: {
show: false,
},
// data: that.chartday,
},
yAxis: {
show: true,
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
formatter: function(value) {
// 保留两位小数没有小数时显示00
return value + '只'
},
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [{
gt: 1,
lt: 3,
color: 'RGBA(255, 241, 201, 1)',
},
{
gt: 5,
lt: 7,
color: 'RGBA(255, 241, 201, 1)',
},
],
},
series: [{
type: 'line',
smooth: 0.6,
symbol: 'none',
lineStyle: {
color: '#FFE28C',
width: 4,
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFF1C9'
}, ]),
},
},
data: that.chartData,
}],
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
// 频率
initChart5(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
},
xAxis: {
show: true,
type: 'category',
boundaryGap: false,
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
rotate: 0,
},
splitLine: {
show: false,
},
// data: that.chartday,
},
yAxis: {
show: true,
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
formatter: function(value) {
// 保留两位小数没有小数时显示00
return value + 'Hz'
},
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [{
gt: 1,
lt: 3,
color: 'RGBA(255, 241, 201, 1)',
},
{
gt: 5,
lt: 7,
color: 'RGBA(255, 241, 201, 1)',
},
],
},
series: [{
type: 'line',
smooth: 0.6,
symbol: 'none',
lineStyle: {
color: '#FFE28C',
width: 4,
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFF1C9'
}, ]),
},
},
data: that.chartData,
}],
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
// 二氧化碳
initChart6(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
},
xAxis: {
show: true,
type: 'category',
boundaryGap: false,
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
rotate: 0,
},
splitLine: {
show: false,
},
// data: that.chartday,
},
yAxis: {
show: true,
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: '#ccc',
fontSize: 11,
formatter: function(value) {
// 保留两位小数没有小数时显示00
return value + '%'
},
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [{
gt: 1,
lt: 3,
color: 'RGBA(255, 241, 201, 1)',
},
{
gt: 5,
lt: 7,
color: 'RGBA(255, 241, 201, 1)',
},
],
},
series: [{
type: 'line',
smooth: 0.6,
symbol: 'none',
lineStyle: {
color: '#FFE28C',
width: 4,
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFF1C9'
}, ]),
},
},
data: that.chartData,
}],
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
initChart7(canvas, width, height, canvasDpr) {
let that = this
const option = {
grid: {
left: '4%',
right: '4%',
bottom: '3%',
top:'0%',
containLabel: true
},
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisLine: {
show: false // 隐藏X轴线
},
axisTick: {
show: false // 隐藏X轴刻度
},
axisLabel: {
show: false // 隐藏X轴标签
},
splitLine: {
show: true, // 显示X轴网格线
lineStyle: {
type: 'dashed', // 设置网格线为虚线
color: '#ccc', // 可以设置虚线的颜色
width: 1 // 可以设置虚线的宽度
}
}
},
yAxis: {
type: 'value',
max: 40, // 设置Y轴的最大值为40
axisLabel: {
show: false // 隐藏Y轴标签
},
axisLine: {
show: false // 隐藏Y轴线
},
axisTick: {
show: false // 隐藏Y轴刻度
},
splitLine: {
show: false // 隐藏Y轴背景网格线
}
},
dataZoom: [
{
show: true,
type: 'inside',
filterMode: 'none',
xAxisIndex: [0],
startValue: -20,
endValue: 20
},
{
show: true,
type: 'inside',
filterMode: 'none',
yAxisIndex: [0],
startValue: -20,
endValue: 20
}
],
series: [{
name: '最高温度',
type: 'line',
data: [25, 29, 29, 29, 27, 24, 26],
smooth: true,
symbol: 'circle',
symbolSize: 8,
lineStyle: {
width: 3
},
itemStyle: {
color: '#42A5F5'
},
label: {
show: true,
position: 'top',
formatter: '{c}°',
color: '#42A5F5'
},
markLine: {
silent: true, // 不响应鼠标事件
symbol: ['none', 'none'], // 不显示标记
lineStyle: {
color: 'red', // 使虚线更明显
type: 'dashed'
},
// data: [
// { yAxis: 'min' },
// { yAxis: 'max' }
// ]
},
},
{
name: '最低温蒂',
type: 'line',
data: [15, 18, 19, 19, 21, 20, 20],
smooth: true,
symbol: 'circle',
symbolSize: 8,
lineStyle: {
width: 3
},
itemStyle: {
color: '#42A5F5'
},
label: {
show: true,
position: 'bottom',
formatter: '{c}°',
color: '#42A5F5'
},
}]
};
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
chart.setOption(option)
return chart
},
}
}
</script>
<style lang="scss">
page {
background-color: #FAFDFD;
}
.page {
// position: relative;
padding: 38rpx;
padding-bottom: 200rpx;
width: 750rpx;
.weather_info {
position: fixed;
padding: 30rpx 50rpx;
bottom: 0;
right: 0;
width: 750rpx;
height: 820rpx;
background: #FFFFFF;
z-index: 200;
border-radius: 20rpx 20rpx 0rpx 0rpx;
.echarts_box {
margin-top: 24rpx;
// width: 100%;
// height: 80%;
width: 646rpx;
height: 344rpx;
}
.weather_cont {
margin-top: 42rpx;
width: 100%;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.weather_li {
.data {
text-align: center;
width: 72rpx;
font-weight: 400;
font-size: 24rpx;
color: #50565A;
}
.week {
margin-top: 4rpx;
text-align: center;
width: 72rpx;
font-weight: 600;
font-size: 36rpx;
color: #50565A;
}
.week_weather {
margin-top: 14rpx;
text-align: center;
width: 72rpx;
font-weight: 500;
font-size: 28rpx;
color: #50565A;
}
.week_weather_img {
margin-top: 4rpx;
display: flex;
align-items: center;
justify-content: center;
width: 72rpx;
image {
width: 48rpx;
height: 48rpx;
}
}
}
}
.top {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
.weather_info_tit {
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
image {
width: 42rpx;
height: 42rpx;
}
.weather_add {
font-weight: 600;
font-size: 32rpx;
color: #50565A;
}
.up_time {
font-weight: 400;
font-size: 32rpx;
color: #808080;
}
}
}
.echarts_box {
margin-top: 26rpx;
padding: 18rpx 24rpx;
width: 674rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 28rpx 28rpx 28rpx 28rpx;
.echarts {
margin-top: 24rpx;
// width: 100%;
// height: 80%;
width: 100%;
height: 330rpx;
}
.echarts_top {
display: flex;
align-items: center;
// justify-content: space-between;
.top_left {
width: 33.33%;
display: flex;
align-items: center;
font-weight: 500;
font-size: 36rpx;
color: #3D3D3D;
image {
margin-left: 28rpx;
width: 25.03rpx;
height: 34rpx;
}
}
.top_cont {
width: 33.33%;
text-align: center;
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.top_right {
width: 33.33%;
display: flex;
align-items: center;
.txt {
display: flex;
align-items: center;
flex-wrap: nowrap;
margin-left: auto;
font-weight: 400;
font-size: 32rpx;
color: #4D4D4D;
.icon-xiangyou1 {
margin-top: 4rpx;
margin-left: 8rpx;
}
}
}
}
}
.bottom_box {
padding: 38rpx 20rpx;
position: fixed;
display: flex;
align-items: center;
justify-content: space-around;
width: 750rpx;
height: 142rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 0rpx 0rpx 0rpx 0rpx;
bottom: 0;
left: 0;
.type_li {
// margin-top: 26rpx;
// margin-right: 18rpx;
padding: 12rpx 26rpx;
background: #FFF5D6;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #FFC107;
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
}
.act1 {
background: #FFC107;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #FFC107;
color: #FFFFFF;
}
}
.card_top {
margin-top: 28rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.name {
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.time {
margin-left: 18rpx;
font-weight: 400;
font-size: 28rpx;
color: #808080;
}
.ele {
margin-left: auto;
display: flex;
align-items: center;
flex-wrap: nowrap;
font-weight: 400;
font-size: 28rpx;
color: #808080;
image {
margin-right: 12rpx;
width: 46rpx;
height: 46rpx;
}
}
}
.setbox {
margin: 0 auto;
margin-top: 34rpx;
width: 674rpx;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
.setcard {
position: relative;
padding: 14rpx 22rpx;
width: 320rpx;
height: 132rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.top {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.left {
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
}
.right {
font-size: 24rpx;
color: #808080;
}
}
.bot {
margin-top: 14rpx;
font-weight: 400;
font-size: 24rpx;
color: #808080;
}
.img {
position: absolute;
right: 24rpx;
bottom: 24rpx;
width: 82rpx;
height: 82rpx;
image {
width: 82rpx;
height: 82rpx;
}
}
}
}
.weather {
margin-top: 12rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.weather_left {
display: flex;
flex-wrap: nowrap;
align-items: center;
.txt {
display: flex;
flex-wrap: nowrap;
align-items: center;
image {
width: 38rpx;
height: 38rpx;
margin-right: 8rpx;
}
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
}
.weather_right {
display: flex;
flex-wrap: nowrap;
align-items: center;
font-weight: 400;
font-size: 28rpx;
color: #42A5F5;
.icon-xiangyou1 {}
}
}
.address {
display: flex;
align-items: center;
margin-top: 8rpx;
image {
margin-right: 8rpx;
width: 20rpx;
height: 24rpx;
}
font-weight: 400;
font-size: 28rpx;
color: #808080;
}
.tit {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
margin-top: 24rpx;
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
.sets {
position: relative;
.menu{
padding: 20rpx;
position: absolute;
right: 20rpx;
width: 218rpx;
height: 234rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.15);
border-radius: 20rpx 20rpx 20rpx 20rpx;
z-index: 10;
.menu_li:first-child{
margin-top: 10rpx;
}
.menu_li{
image{
margin-right: 14rpx;
width: 38rpx;
height: 38rpx;
}
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
margin-top: 26rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
}
}
image {
width: 36rpx;
height: 36rpx;
}
}
}
.mapbox {
position: relative;
margin: 0 auto;
margin-top: 34rpx;
width: 674rpx;
height: 372rpx;
border-radius: 20rpx;
overflow: hidden;
.num {
width: 180rpx;
position: absolute;
top: 24rpx;
left: 30rpx;
.txt {
width: 180rpx;
font-weight: 600;
font-size: 32rpx;
color: #FFC107;
}
}
.btn {
position: absolute;
right: 0rpx;
bottom: 0rpx;
// width: 70rpx;
// height: 70rpx;
image {
width: 90rpx;
height: 90rpx;
}
}
.map {
width: 672rpx;
height: 372rpx;
// border-radius:20rpx;
}
}
}
</style>