|
@@ -1,13 +1,261 @@
|
|
|
<template>
|
|
|
- <div>饮水监测</div>
|
|
|
+ <div class="drinkWater">
|
|
|
+ <div class="reply" :style="{color: color}">全场饮水情况</div>
|
|
|
+ <x-form :formItems="formItems" :day="day" @setDay="setDay" @onClickType="onClickType"></x-form>
|
|
|
+ <div class="echarts">
|
|
|
+ <div class="echarts-l">
|
|
|
+ <chart-water-pie></chart-water-pie>
|
|
|
+ </div>
|
|
|
+ <div class="echarts-r">
|
|
|
+ <chart-water></chart-water>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br/>
|
|
|
+ <div class="reply" :style="{color: color}">饮用水详情</div>
|
|
|
+ <div class="carousel">
|
|
|
+ <swiper class="swiper" :options="swiperOption">
|
|
|
+ <swiper-slide v-for="item in 10" :key="item" style="padding-top: 10px">
|
|
|
+ <div class="box">
|
|
|
+ <p>育肥1栋1单元</p>
|
|
|
+ <div class="flex">
|
|
|
+ <div>
|
|
|
+ <i class="icon1"></i>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>145吨</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </swiper-slide>
|
|
|
+ <div class="swiper-pagination" slot="pagination"></div>
|
|
|
+ <div class="swiper-button-prev" slot="button-prev"></div>
|
|
|
+ <div class="swiper-button-next" slot="button-next"></div>
|
|
|
+ </swiper>
|
|
|
+ </div>
|
|
|
+ <br/>
|
|
|
+ <div class="reply" :style="{color: color}">筛选查询</div>
|
|
|
+ <x-form :formItems="selectItems" :day="day1" @setDay="setDay1" @onClickType="onClickType1"></x-form>
|
|
|
+ <div class="echarts">
|
|
|
+ <div class="echarts-l">
|
|
|
+ <chart-water-pie :id="'1'"></chart-water-pie>
|
|
|
+ </div>
|
|
|
+ <div class="echarts-r">
|
|
|
+ <chart-water :id="'1'" :dataValue="dataValue"></chart-water>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import XForm from "@/components/XForm";
|
|
|
+import ChartWaterPie from "@/views/Env/chart/ChartWaterPie";
|
|
|
+import ChartWater from "@/views/dashboard/chart/ChartWater";
|
|
|
+import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
|
|
+import 'swiper/css/swiper.css';
|
|
|
+import { mapState } from 'vuex';
|
|
|
export default {
|
|
|
- name: "DrinkWater"
|
|
|
+ name: "DrinkWater",
|
|
|
+ components: {
|
|
|
+ XForm,
|
|
|
+ ChartWaterPie,
|
|
|
+ ChartWater,
|
|
|
+ swiper,
|
|
|
+ swiperSlide
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['color'])
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ formItems: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ type: 'text',
|
|
|
+ text: '今日',
|
|
|
+ value: 1,
|
|
|
+ col: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ type: 'text',
|
|
|
+ text: '本周',
|
|
|
+ value: 2,
|
|
|
+ col: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ type: 'text',
|
|
|
+ text: '本月',
|
|
|
+ value: 3,
|
|
|
+ col: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ type: 'datepicker',
|
|
|
+ placeholder: [],
|
|
|
+ field: 'value1',
|
|
|
+ col: 6
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 5,
|
|
|
+ type: 'button',
|
|
|
+ text: '导出数据',
|
|
|
+ col: 2,
|
|
|
+ click: 'derive'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ day: 2,
|
|
|
+ swiperOption: {
|
|
|
+ slidesPerView: 8,
|
|
|
+ spaceBetween: 30,
|
|
|
+ autoplay: {
|
|
|
+ delay: 2500,
|
|
|
+ disableOnInteraction: false
|
|
|
+ },
|
|
|
+ pagination: {
|
|
|
+ el: '.swiper-pagination',
|
|
|
+ type: 'progressbar'
|
|
|
+ },
|
|
|
+ navigation: {
|
|
|
+ nextEl: '.swiper-button-next',
|
|
|
+ prevEl: '.swiper-button-prev'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectItems: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ type: 'select',
|
|
|
+ label: '栋舍:',
|
|
|
+ placeholder: '请选择栋舍',
|
|
|
+ field: 'areaId',
|
|
|
+ options: [],
|
|
|
+ col: 4
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ type: 'select',
|
|
|
+ label: '单元:',
|
|
|
+ placeholder: '请选择单元',
|
|
|
+ field: 'unitId',
|
|
|
+ options: [],
|
|
|
+ col: 4
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ type: 'text',
|
|
|
+ text: '今日',
|
|
|
+ value: 1,
|
|
|
+ col: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ type: 'text',
|
|
|
+ text: '本周',
|
|
|
+ value: 2,
|
|
|
+ col: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 5,
|
|
|
+ type: 'text',
|
|
|
+ text: '本月',
|
|
|
+ value: 3,
|
|
|
+ col: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 6,
|
|
|
+ type: 'datepicker',
|
|
|
+ placeholder: [],
|
|
|
+ field: 'value1',
|
|
|
+ col: 6
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 7,
|
|
|
+ type: 'button',
|
|
|
+ text: '导出数据',
|
|
|
+ col: 2,
|
|
|
+ click: 'derive'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ day1: 2,
|
|
|
+ dataValue: [12, 13, 10, 13, 9, 23, 21, 21, 24, 23, 14, 21, 21]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setDay(data) {
|
|
|
+ this.day = data;
|
|
|
+ },
|
|
|
+ onClickType() {},
|
|
|
+ setDay1(data) {
|
|
|
+ this.day1 = data;
|
|
|
+ },
|
|
|
+ onClickType1() {}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-
|
|
|
+ .drinkWater {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 20px 20px 0 20px;
|
|
|
+ }
|
|
|
+ .reply {
|
|
|
+ width: 100%;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-bottom: 0;
|
|
|
+ height: 50px;
|
|
|
+ background-color: #F3F3F3;
|
|
|
+ line-height: 50px;
|
|
|
+ font-size: 18px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-left: 20px;
|
|
|
+ }
|
|
|
+ .echarts {
|
|
|
+ width: 100%;
|
|
|
+ height: 401px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-top: 0;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+ .echarts-l {
|
|
|
+ width: 30%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .echarts-r {
|
|
|
+ width: 70%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .carousel {
|
|
|
+ width: 100%;
|
|
|
+ height: 150px;
|
|
|
+ border-top: 1px solid #ddd;
|
|
|
+ }
|
|
|
+ .swiper {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 30px 0;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .flex {
|
|
|
+ width: 100%;
|
|
|
+ height: 32px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .icon1 {
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ background: url('../../assets/images/u3077.svg') no-repeat;
|
|
|
+ display: inline-block;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
</style>
|