zhaojijng 2 роки тому
батько
коміт
ad0af46569

+ 0 - 10
src/api/fistpage.ts

@@ -1,10 +0,0 @@
-export default {
-    queryConditionerStatus:
-        "/sgshow/duoduo-service/setup-service/environment/queryConditionerStatus", //空调状态
-    queryEnvHistory:
-        "/sgshow/duoduo-service/setup-service/environment/queryEnvHistory", //上月温度
-    queryEnvCurrent:
-        "/sgshow/duoduo-service/setup-service/environment/queryEnvCurrent", //实时数据
-    queryIndoorTempList:
-        "/sgshow/duoduo-service/setup-service/environment/queryIndoorTempList", //实时温度
-};

+ 0 - 13
src/api/index.ts

@@ -1,13 +0,0 @@
-const files = require.context("@/api", true, /.(ts|js)$/);
-// 合并所有的API
-const allApi = files.keys().reduce((con: any, src: string) => {
-    // console.log("con", files(src));
-    // console.log("src", src);
-    if (src.indexOf("index.ts") == -1) {
-       
-        con=Object.assign(con, files(src).default);
-    }
-    return con;
-}, {});
-
-export default allApi;

+ 0 - 14
src/api/second.ts

@@ -1,14 +0,0 @@
-export default {
-    queryBuilding: "/sgshow/duoduo-service/object-service/object/building/query", //获取楼层
-    queryFs: "/sgshow/duoduo-service/object-service/object/floor/queryFs", //获取楼层
-    queryParam: "/sgshow/duoduo-service/object-service/object/floor/queryParam", //获取楼层详情
-    getWeatherCurrent:
-        "/sgshow/duoduo-service/object-service/weather/getCurrent", //天气
-    queryLastDayEnergy:
-        "/sgshow/duoduo-service/review-service/energy/week/day/query", //上月每日能耗
-    queryLastAllEnergy:
-        "/sgshow/duoduo-service/review-service/sceneValue/query", //上月所有能耗
-    saveMapInfo:"/sgshow/duoduo-service/setup-service/map/saveMapInfo",//保存地图
-    queryProject: "/sgshow/duoduo-service/object-service/object/project/query", //获取楼层详情
-        
-};

+ 0 - 30
src/utils/axios.ts

@@ -1,30 +0,0 @@
-import axios from "axios";
-
-// axios默认配置
-axios.defaults.headers.post["Content-Type"] = "application/json,charset=utf-8";
-axios.defaults.timeout = 1000 * 60 * 60 * 24;
-axios.defaults.baseURL = "";// /daping/duoduo-service/object-service   /daping
-
-//添加请求拦截器
-axios.interceptors.request.use(
-    (config: any) => {
-        //config.data   config.params config.headers
-      //  debugger;
-        return config;
-    },
-    (error: any) => {
-        return Promise.reject(error);
-    }
-);
-
-// 添加响应拦截器
-axios.interceptors.response.use(
-    (response: any) => {
-        return response;
-    },
-    (error: any) => {
-        return Promise.reject(error);
-    }
-);
-
-export default axios;

+ 0 - 5
src/views/About.vue

@@ -1,5 +0,0 @@
-<template>
-  <div class="about">
-    <h1>This is an about page</h1>
-  </div>
-</template>

+ 0 - 41
src/views/Home.vue

@@ -1,41 +0,0 @@
-<template>
-  <div class="home">
-      <el-button >文字按钮</el-button>
-    <div @click="skipPage">跳转about页面</div>
-    <div @click="skipPagew('one')">跳转 横屏1 页面</div>
-    <div @click="skipPagew('tow')">跳转 横屏2 页面</div>
-    <div @click="skipPagew('three')">跳转 横屏3 页面</div>
-  </div>
-</template>
-
-<script>
-
-
-export default {
-  name: 'Home',
-  components: {
-   
-  },
-  methods:{
-      skipPage:function(){
-          this.$router.push({ name: 'About'});
-      },
-      skipPagew:function(type){
-          switch (type) {
-              case "tow":
-                this.$router.push({ name: 'horTwo'});
-                  break;
-              case 'three':
-                this.$router.push({ name: 'horThree'});
-                  break;
-          
-              default:
-                   this.$router.push({ name: 'hor'});
-                  break;
-          }
-         
-      }
-
-  }
-}
-</script>

+ 0 - 143
src/views/valueDelivery/AirSwitchVer.vue

@@ -1,143 +0,0 @@
-<template>
-    <div class="airSwitch verticalClass">
-        <div class="air-title head-title">
-            <span>空调实时开关</span>
-            <span class="status" v-bind:class="{ close: !airStatus }">
-                {{ airStatus ? "空调已开启" : "空调已关闭" }}</span
-            >
-        </div>
-        <div class="air-cont">
-            <div class="air-left">
-                <div class="bar-box">
-                    <div class="bar" v-bind:style="{width:airValue+'%'}"></div>
-                </div>
-                <div class="air-rate">
-                    <span>空调开启率</span>
-                    <span class="air-rate-value">{{ airValue }}%</span>
-                </div>
-            </div>
-            <div class="air-bg">
-                <img :src="[airStatus ? img.openImg : img.closeImg]" />
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import air_close from "@/assets/horImg/air_close.png";
-import air_open from "@/assets/horImg/air_open.png";
-import { mapState } from "vuex";
-
-export default {
-    name: "AirSwitch",
-    props: {
-        status: {
-            type: Boolean,
-            default: () => {
-                return false;
-            }, // 默认开
-        },
-        value: {
-            type: Number,
-            default: () => {
-                return 75;
-            }, // 默认开
-        },
-    },
-    computed: {
-        ...mapState({
-            airValue(state) {
-                var openRate = state.airCondition.openRate;
-                var avalue = openRate
-                    ? Number((openRate * 100).toFixed(0))
-                    : openRate;
-                return avalue;
-            },
-            airStatus: (state) => {
-                var openRate = state.airCondition.openRate;
-                var astate = openRate ? true : false;
-                return astate;
-            },
-        }),
-    },
-    data() {
-        return {
-            img: {
-                openImg: air_open,
-                closeImg: air_close,
-            },
-        };
-    },
-};
-</script>
-<style lang="less" scoped>
-.airSwitch {
-    height: 250px;
-    .air-title {
-        .status {
-            margin-left: 12px;
-            display: inline-block;
-            height: 22px;
-            line-height: 22px;
-            width: 82px;
-            border-radius: 4px;
-            background: rgba(126, 216, 116, 1);
-            box-sizing: border-box;
-            color: #ffffff;
-            font-weight: 600;
-            text-align: center;
-            font-size: 14px;
-            &.close {
-                background: rgba(155, 152, 173, 1);
-            }
-        }
-    }
-    .air-cont {
-        display: flex;
-        flex-direction: row;
-        padding-top:35px;
-        .air-left {
-            flex: 3;
-            display: flex;
-            // justify-content: center;
-            flex-direction: column;
-            padding-top:20px;
-            .bar-box {
-                width: 88%;
-                height: 10px;
-                background: rgba(62, 140, 255, 0.2);
-                border-radius: 6px;
-                .bar {
-                    width: 80%;
-                    height: 10px;
-                    background: linear-gradient(
-                        90deg,
-                        #76deff 0%,
-                        #3e91f8 100%
-                    );
-                    border-radius: 6px;
-                }
-            }
-            .air-rate {
-                font-size: 20px;
-                display: flex;
-                height: 40px;
-                align-items: center;
-                margin-top: 14px;
-                color: #575271;
-                .air-rate-value {
-                    color: #3b3558;
-                    font-size: 32px;
-                    padding-left: 8px;
-                }
-            }
-        }
-        .air-bg {
-            flex: 1;
-            img {
-                width: 240px;
-            }
-            
-        }
-    }
-}
-</style>

+ 0 - 518
src/views/valueDelivery/FloorSpace.vue

@@ -1,518 +0,0 @@
-<template>
-    <div class="floorCont">
-        <div class="topChange">
-            <div class="buildName" v-show="allBuild.length > 1">
-                {{ nowBuildName }}
-            </div>
-            <div class="allIndicator">
-                <div
-                    class="eachItem"
-                    v-for="(item, index) in allIndicator"
-                    @click="clickIndicator(index)"
-                    v-bind:class="{ select: item.id == selIndicator.id }"
-                >
-                    <span>{{ item.name }}</span
-                    ><span class="bar"></span>
-                </div>
-            </div>
-            <div class="imageDiv">
-                <img :src="selIndicator.img" />
-            </div>
-            <div class="textCont">
-                平均<span>{{ selIndicator.name }}</span
-                ><span class="value">{{ totalAvgValues }}</span
-                ><span>
-                    {{ selIndicator.unit }}
-                </span>
-            </div>
-        </div>
-
-        <div class="floorWrap">
-            <div
-                class="floor-item"
-                v-for="(item, index) in showFloors"
-                :key="index"
-                v-bind:style="{ height: item.floorHeight + 'px' }"
-            >
-                <div class="floor-num">
-                    <span>{{ item.localName }}</span>
-                </div>
-                <div class="floor-space">
-                    <div
-                        class="space-box"
-                        v-for="(childItem, id) in item.dataSpaces"
-                        :key="id"
-                        v-bind:style="{
-                            width: item.spacewidth + '%',
-                            height: item.spaceheight + '%',
-                        }"
-                    >
-                        <div
-                            class="space-name"
-                            v-bind:style="{
-                                backgroundColor: selectColor(
-                                    childItem.avgValues,
-                                    selIndicatorId,
-                                    true
-                                ),
-                            }"
-                        >
-                            {{ childItem.localName }}
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import { Loading } from "element-ui";
-import moment from "moment";
-import { selectColor } from "@/utils/publicMethod";
-import { mapState } from "vuex";
-
-export default {
-    name: "FloorSpace",
-    data() {
-        return {
-            selIndicator: {},
-            selIndicatorId: "", //为了颜色
-            nowIndicatorIndex: null, //现在选中的指标 index
-            allIndicator: [
-                {
-                    id: "temp",
-                    name: "温度",
-                    img: require("../../assets/wendu.svg"),
-                    unit: "℃",
-                    code: "Tdb",
-                    fixed: 1,
-                },
-                {
-                    id: "humidity",
-                    code: "RH",
-                    name: "湿度",
-                    img: require("../../assets/shidu.svg"),
-                    unit: "%",
-                    fixed: 0,
-                },
-                {
-                    id: "co2",
-                    code: "CO2",
-                    name: "CO₂",
-                    img: require("../../assets/co2.svg"),
-                    unit: "ppm",
-                    fixed: 0,
-                },
-                {
-                    id: "methanal",
-                    code: "HCHO",
-                    name: "甲醛",
-                    img: require("../../assets/jiaquan.svg"),
-                    unit: "mg/m³",
-                    fixed: 2,
-                },
-                {
-                    id: "pm25",
-                    code: "PM2d5",
-                    name: "PM2.5",
-                    img: require("../../assets/pm25.svg"),
-                    unit: "ug/m³",
-                    fixed: 0,
-                },
-            ],
-            allBuild: [],
-            nowBuildName: "",
-            nowBuildPage: 1, //目前是第几个建筑
-            allFloor: [],
-            firstPageParams: [],
-            secondPageParams: [],
-            nowPage: 1, //当前哪一屏幕
-            pageNum: 0, //总页数 楼层一共几页
-            showFloors: [],
-            totalAvgValues: null,
-        };
-    },
-    props: {
-        showPing: {
-            type: Number,
-            default: () => {
-                return 0;
-            },
-        },
-    },
-    computed: {
-        ...mapState({ projectId: (state) => state.projectId }),
-    },
-    watch: {
-        showPing(newv, oldv) {
-            //debugger;
-            //当前屏幕第几屏
-            if (newv == 2) {
-                this.nowPage = 1;
-                this.queryBuild();
-            }
-        },
-    },
-    mounted() {},
-    methods: {
-        selectColor: selectColor,
-        clickIndicator(index) {
-            this.nowIndicatorIndex = index;
-        },
-        getTimeFloorParam() {
-            //第一屏的参数 第二屏的参数
-            var floorparam =
-                this.nowPage == 1
-                    ? this.firstPageParams
-                    : this.secondPageParams;
-            var _this = this;
-            this.queryParam(floorparam).then(() => {
-                var timeoutsign = setTimeout(() => {
-                    _this.nowIndicatorIndex = _this.nowIndicatorIndex + 1; //湿度等指标的轮询变化
-                    if (_this.nowIndicatorIndex == 5) {
-                        if (_this.pageNum == _this.nowPage) {
-                            //如果指标轮询结束 通知切换
-                            _this.nowIndicatorIndex = 0;
-                            _this.nowPage = 1;
-                            if (_this.nowBuildPage == _this.allBuild.length) {
-                                _this.$emit("donetowpage");
-                                clearTimeout(timeoutsign);
-                            } else {
-                                //换下一个建筑
-                                _this.nowBuildPage = _this.nowBuildPage + 1;
-                                _this.queryFs();
-                            }
-                            return;
-                        }
-                        //如果是两页 并且nowPage是第一页
-                        if (_this.pageNum == 2 && _this.nowPage == 1) {
-                            _this.nowPage = 2;
-                            _this.nowIndicatorIndex = 0;
-                        }
-                    }
-                    this.getTimeFloorParam();
-                }, 1200);
-            });
-        },
-        queryBuild() {
-            var _this = this;
-            this.$axios
-                .post(this.$api.queryBuilding, {
-                    criteria: {
-                        projectId: this.projectId,
-                    },
-                })
-                .then((res) => {
-                    var data = (res.data || {}).content || [];
-                    //todo 删除 之江项目
-                    if (this.projectId == "Pj3301100002") {
-                        var filterdata = data.filter((item) => {
-                            return item.localName == "1#楼";
-                        });
-                         _this.allBuild = filterdata;
-                    }else{
-                           _this.allBuild = data
-                    }
-
-                    _this.nowBuildPage = 1;
-                    _this.queryFs();
-                })
-                .catch((res) => {
-                    // loading.close();
-                });
-        },
-        queryFs() {
-            // var loading = this.$loading({ fullscreen: true });
-            var _this = this;
-            var buildId = (this.allBuild[this.nowBuildPage - 1] || {}).id;
-            if (!buildId) {
-                return;
-            }
-
-            this.$axios
-                .post(this.$api.queryFs, {
-                    criteria: {
-                        projectId: this.projectId,
-                        //'Bd3301100002bba81f4830e04cde87d4b6e5652c0d5e',
-                        buildingId: buildId,
-                    },
-                    size: 14, //最多14层
-                    page: 1,
-                    orders: [
-                        {
-                            column: "floorSequenceId",
-                            asc: true,
-                        },
-                    ],
-                })
-                .then((res) => {
-                    //loading.close();
-                    var allFloor = res.data.content || [];
-                    allFloor = allFloor.filter(function(item) {
-                        return item.spaceNum > 0;
-                    });
-                    //如果该建筑的所有楼层 没有空间 则请求下一个建筑
-                    if (allFloor.length == 0) {
-                        _this.nowBuildPage = _this.nowBuildPage + 1;
-                        if (_this.nowBuildPage > _this.allBuild.length) {
-                            _this.$emit("donetowpage");
-                            return;
-                        }
-                        _this.queryFs();
-                        return;
-                    }
-
-                    _this.nowBuildName =
-                        _this.allBuild[_this.nowBuildPage - 1].localName;
-                    this.allFloor = allFloor;
-                    var allFloorNum = allFloor.length;
-                    //如果超过7层 就显示两屏幕 第一屏 firstPageNum
-                    //如果超过7层 就显示两屏幕 第二屏 secondPageNum
-                    var firstPageNum, secondPageNum;
-                    if (allFloorNum <= 7) {
-                        firstPageNum = allFloorNum;
-                        secondPageNum = 0;
-                        this.pageNum = 1;
-                    } else {
-                        firstPageNum = Math.ceil(allFloorNum / 2);
-                        secondPageNum = Math.floor(allFloorNum / 2);
-                        this.pageNum = 2;
-                    }
-
-                    var firstMaxSpace = this.floorHandle(firstPageNum); //第一屏 一层最多空间
-                    var sendMaxSpace = this.floorHandle(secondPageNum);
-                    var firstPageFloors = allFloor.slice(0, firstPageNum); //第一屏 所有楼层
-                    var secondPageFloors = allFloor.slice(firstPageNum);
-
-                    this.firstPageParams = firstPageFloors.map((item) => {
-                        var obj = {};
-                        obj.id = item.id;
-                        obj.projectId = this.projectId;
-                        obj.spaceNum = firstMaxSpace;
-                        return obj;
-                    });
-
-                    this.secondPageParams = secondPageFloors.map((item) => {
-                        var obj = {};
-                        obj.id = item.id;
-                        obj.projectId = this.projectId;
-                        obj.spaceNum = sendMaxSpace;
-                        return obj;
-                    });
-                    this.nowIndicatorIndex = 0;
-                    this.getTimeFloorParam();
-                })
-                .catch((res) => {
-                    // loading.close();
-                });
-        },
-
-        queryParam(floorparam) {
-            //var loading = this.$loading({ fullscreen: true });
-            //             Tdb 温度
-            // CO2 二氧化碳
-            // RH 湿度
-            // HCHO甲醛
-            // PM2d5 pm2.5
-
-            var endTime = moment();
-            var startTime = moment().subtract(30, "minutes");
-            var startStr = startTime.format("YYYYMMDDHHmmss");
-            var endStr = endTime.format("YYYYMMDDHHmmss");
-            var newv = this.nowIndicatorIndex;
-            //debugger;
-            this.selIndicator = this.allIndicator[newv];
-            var param = this.selIndicator.code;
-            return this.$axios
-                .post(
-                    `${this.$api.queryParam}?endTime=${endStr}&startTime=${startStr}&param=${param}`,
-                    floorparam
-                )
-                .then((res) => {
-                    //loading.close();
-
-                    var showFloors = res.data.data.floors || [];
-                    this.totalAvgValues = res.data.data.avgValues || null;
-                    this.totalAvgValues &&
-                        (this.totalAvgValues = this.totalAvgValues.toFixed(
-                            this.selIndicator.fixed
-                        ));
-                    var wrapHeight =
-                        document.getElementsByTagName("body")[0].offsetHeight -
-                        428;
-                    wrapHeight = Math.max(wrapHeight, 1000); //1000是楼层区域的最小高度
-
-                    showFloors.forEach((ele) => {
-                        var filterFloorarr = this.allFloor.filter((item) => {
-                            return item.id == ele.id;
-                        });
-                        var filterFloor = filterFloorarr[0] || {};
-                        ele.name = filterFloor.name;
-                        ele.localId = filterFloor.localId;
-                        ele.localName = filterFloor.localName;
-                        var dataSpacesNum = (ele.dataSpaces || []).length;
-                        var floorParam = this.spaceHandle(dataSpacesNum); //一行的个数
-                        //debugger;
-                        ele.spacewidth = 100 / floorParam.lineNum;
-                        ele.spaceheight = 100 / floorParam.floorline; //每一行的高度
-                        ele.floorHeight = wrapHeight / showFloors.length; //每一层的高度
-                    });
-                    this.showFloors = showFloors;
-                    this.selIndicatorId = this.selIndicator.id;
-                });
-        },
-        floorHandle(floorNum) {
-            //返回一层 最多多少房间
-            var maxFloorSpace = 1; //一层 最多显示房间数
-            switch (floorNum) {
-                case 1:
-                    maxFloorSpace = 160;
-                    break;
-                case 2:
-                    maxFloorSpace = 80;
-                    break;
-                case 3:
-                    maxFloorSpace = 50;
-                    break;
-                case 4:
-                    maxFloorSpace = 30;
-                    break;
-                case 5:
-                case 6:
-                case 7:
-                    maxFloorSpace = 20;
-                    break;
-            }
-            return maxFloorSpace;
-        },
-        spaceHandle(spaceNum) {
-            //返回一层 的每一行 几个房间
-            var lineNum = spaceNum; //一行的房间数
-            var floorline = Math.ceil(spaceNum / 10); //20-30 3排 30-40个 4排 所以一排10个
-            lineNum = Math.ceil(spaceNum / floorline);
-            return { lineNum, floorline };
-            //debugger;
-        },
-    },
-};
-</script>
-<style lang="less" scoped>
-.floorCont {
-    border-radius: 16px;
-    overflow: hidden;
-}
-.topChange {
-    height: 194px;
-    // width: 1000px;
-    margin: 0 auto;
-    background: #ffffff;
-    position: relative;
-    .buildName {
-        position: absolute;
-        top: 0;
-        left: 0;
-        height: 42px;
-        background: #e2f8ff;
-        line-height: 42px;
-        border-bottom-right-radius: 16px;
-        text-align: center;
-        font-size: 26px;
-        width: 125px;
-    }
-    .allIndicator {
-        padding-top: 32px;
-        padding-bottom: 20px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        .eachItem {
-            cursor: pointer;
-            font-size: 24px;
-            font-weight: 600;
-            color: #9b98ad;
-            margin-right: 60px;
-            display: flex;
-            flex-direction: column;
-            align-items: center;
-            .bar {
-                width: 24px;
-                height: 6px;
-                display: inline-block;
-            }
-            &.select {
-                color: #3b3558;
-                .bar {
-                    background: #46ccf6;
-                }
-            }
-        }
-    }
-    .imageDiv {
-        height: 32px;
-        margin: 0 32px;
-        text-align: center;
-    }
-    .textCont {
-        color: #3b3558;
-        font-size: 20px;
-        font-weight: 600;
-        text-align: center;
-        padding-top: 16px;
-        .value {
-            margin-left: 4px;
-        }
-    }
-}
-
-.floorWrap {
-    // width: 1000px;
-    margin: 0 auto;
-    background: #ffffff;
-    box-sizing: border-box;
-    .floor-item {
-        display: flex;
-        padding: 18px 16px 18px 0;
-        box-sizing: border-box;
-        background: linear-gradient(
-            186deg,
-            rgba(50, 129, 246, 0.1) 6.16%,
-            rgba(50, 129, 246, 0) 81.03%
-        );
-    }
-
-    .floor-num {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        font-family: Persagy;
-        font-size: 36px;
-        font-weight: 700;
-        line-height: 43px;
-        color: #3b3558;
-        width: 90px;
-        flex-shrink: 0;
-    }
-    .floor-space {
-        display: flex;
-        flex: 1;
-        flex-wrap: wrap;
-        .space-box {
-            padding: 4px;
-            box-sizing: border-box;
-            .space-name {
-                display: flex;
-                justify-content: center;
-                align-items: center;
-                //height: 86px;
-                height: 100%;
-                min-width: 80px;
-                border-radius: 8px;
-                background: #d9f5d6;
-                text-align: center;
-                padding: 0 8px;
-                box-sizing: border-box;
-            }
-        }
-    }
-}
-</style>

+ 0 - 117
src/views/valueDelivery/HorAirSwitch.vue

@@ -1,117 +0,0 @@
-<template>
-    <div class="airSwitch horizontalClass">
-        <div class="head-title">
-            <span>空调实时开关</span>
-        </div>
-        <div class="air-status" v-bind:class="{ close: !airStatus }">
-            <span>{{ airStatus ? "空调已开启" : "空调已关闭" }}</span>
-        </div>
-        <div class="air-bg" v-bind:class="{close: !airStatus}">
-            <img :src="[airStatus ? img.openImg : img.closeImg]" />
-        </div>
-        <div class="air-rate">
-            <span>空调开启率</span>
-            <span class="air-rate-value">{{ airValue }}%</span>
-        </div>
-    </div>
-</template>
-<script>
-import air_open from "@/assets/horImg/air_open.png";
-import air_close from "@/assets/horImg/air_close.png";
-import { mapState } from "vuex";
-export default {
-    name: "AirSwitch",
-    props: {
-        // status: {
-        //     type: Boolean,
-        //     default: () => {
-        //         return false;
-        //     }, // 默认开
-        // },
-        // value: {
-        //     type: Number,
-        //     default: () => {
-        //         return 75;
-        //     }, // 默认开
-        // },
-    },
-    data() {
-        return {
-            img: {
-                openImg: air_open,
-                closeImg: air_close,
-            },
-        };
-    },
-    computed: {
-        ...mapState({
-            airValue: (state) => {
-                var openRate = state.airCondition.openRate;
-                var avalue = openRate
-                    ? Number((openRate * 100).toFixed(0))
-                    : openRate;
-                return avalue;
-            },
-            airStatus: (state) => {
-                //debugger
-                 var statecopu=JSON.parse(JSON.stringify(state))  ;
-                //console.log('airStatus',statecopu);
-
-                var openRate = state.airCondition.openRate;
-                var astate = openRate ? true : false;
-                return astate;
-            },
-        }),
-    },
-    watch: {
-        airStatus: function(newv, oldv) {
-            //debugger;
-        },
-    },
-};
-</script>
-<style lang="less" scoped>
-.airSwitch {
-    height: 388px;
-    // width: 446px;
-    .air-status {
-        margin-top: 8px;
-        height: 20px;
-        width: 86px;
-        border-radius: 4px;
-        background: rgba(126, 216, 116, 1);
-        // padding: 2px 8px;
-        box-sizing: border-box;
-        color: #ffffff;
-        font-weight: 600;
-        line-height: 20px;
-        text-align: center;
-        font-size: 14px;
-        &.close {
-            background: rgba(155, 152, 173, 1);
-        }
-    }
-    .air-bg {
-        padding-top: 36px;
-        height: 250px;
-        box-sizing: border-box;
-        text-align: center;
-        &.close{
-            padding-top:41px;
-        }
-    }
-    .air-rate {
-        font-weight: 400;
-        line-height: 20px;
-        color: #575271;
-        font-size:14px;
-        .air-rate-value {
-            color: #3b3558;
-            font-family: Persagy;
-            font-size: 20px;
-            font-weight: 700;
-            padding-left:5px;
-        }
-    }
-}
-</style>

+ 0 - 574
src/views/valueDelivery/HorFloorSpace.vue

@@ -1,574 +0,0 @@
-<template>
-    <div class="floorSpace" ref="floorSpace">
-        <div class="leftChange">
-            <div class="buildName" v-show="allBuild.length>1">{{nowBuildName}}</div>
-            <div class="allIndicator">
-                <div
-                    class="eachItem "
-                    v-for="(item,index) in allIndicator"
-                    @click="clickIndicator(index)"
-                    v-bind:class="{'select':item.id==selIndicator.id}"
-                >
-                    <div class="title">{{item.name}}</div>
-                    <div
-                        class="textCont"
-                        v-show="item.id==selIndicator.id"
-                    ><span class="value">{{totalAvgValues}}{{selIndicator.unit}}</span><br /><span class="name">平均{{selIndicator.name}}</span></div>
-                    <img
-                        v-show="item.id==selIndicator.id"
-                        class="img"
-                        :src="selIndicator.img"
-                    ></img>
-                </div>
-            </div>
-        </div>
-
-        <div class="floorWrap">
-            <div
-                class="floor-item"
-                v-for="(item,index) in showFloors"
-                :key="index"   v-bind:style="{ height: item.floorHeight + 'px' }"
-            >
-                <div class="floor-num"><span>{{item.localName}}</span></div>
-                <div class="floor-space">
-                    <div
-                        class="space-box"
-                        v-for="(childItem,id) in item.dataSpaces"
-                        :key="id"
-                        v-bind:style="{ width: item.spacewidth + '%' ,height: item.spaceheight + '%'  }"
-                    >
-                        <div class="space-name" v-bind:style="{backgroundColor:selectColor(childItem.avgValues,selIndicatorId,true)}">{{childItem.localName}}</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-
-</template>
-<script>
-import moment from "moment";
-import { selectColor } from "@/utils/publicMethod";
-import { mapState } from "vuex";
-
-export default {
-    name: 'FloorSpace',
-    data() {
-        return {
-            selIndicator: {},      
-            selIndicatorId:'',//为了颜色用
-             //              温度
-            //  二氧化碳
-            //  湿度
-            // 
-            //  pm2.5
-            nowIndicatorIndex:null,//现在选中的指标 index
-            allIndicator: [{
-                id: 'temp',
-                code:'Tdb',
-                name: '温度',
-                img: require('../../assets/horImg/wendu.svg'),
-                unit: '℃',
-                fixed:1
-            }, {
-                id: 'humidity',
-                code:'RH',
-                name: '湿度',
-                img: require('../../assets/horImg/shidu.svg'),
-                unit: '%',
-                fixed:0
-            }, {
-                id: 'co2',
-                code:'CO2',
-                name: 'CO₂',
-                img: require('../../assets/horImg/co2.svg'),
-                unit: 'ppm',
-                fixed:0
-            }, {
-                id: 'methanal',
-                code:'HCHO',
-                name: '甲醛',
-                img: require('../../assets/horImg/jiaquan.svg'),
-                unit: 'mg/m³',
-                fixed:2
-
-            }, {
-                id: 'pm25',
-                code:'PM2d5',
-                name: 'PM2.5',
-                img: require('../../assets/horImg/pm25.svg'),
-                unit: 'ug/m³',
-                fixed:0
-            }],
-            allBuild: [],
-            nowBuildName: '',
-            nowBuildPage: 1, //目前是第几个建筑
-
-            allFloor: [],
-            firstPageParams: [],
-            secondPageParams: [],
-            nowPage: 1, //当前哪一屏幕
-            pageNum:0,
-            showFloors: [],
-            totalAvgValues:null
-        }
-    },
-    props: {
-        showPing: {
-            type: Number,
-            default: () => {
-                return 0;
-            }, 
-        },
-    },
-    watch:{
-        showPing(newv,oldv){
-            //当前展示为第二屏时
-            if(newv==2){
-                   this.nowPage = 1;
-                   this.queryBuild();
-            }
-        }
-    },
-    mounted() {
-   
-    },
-    destroyed(){
-        console.log("horfloorspace---destroyed");
-    },
-    computed: {
-        ...mapState({ projectId: (state) => state.projectId }),
-    },
-    methods: {
-        selectColor:selectColor,
-        clickIndicator(index) {
-            this.nowIndicatorIndex = index;
-        },
-        getTimeFloorParam() {
-            //第一屏的参数 第二屏的参数
-            var floorparam =
-                this.nowPage == 1
-                    ? this.firstPageParams
-                    : this.secondPageParams;
-            var _this = this;
-            this.queryParam(floorparam).then(() => {
-                var timeoutsign = setTimeout(() => {
-                    _this.nowIndicatorIndex = _this.nowIndicatorIndex + 1;//湿度等指标的轮询变化
-                    if (_this.nowIndicatorIndex == 5) {//指标切换完毕
-                        //debugger;
-                         if (_this.pageNum == _this.nowPage) {
-                             //一个建筑的所有楼层 切换完毕
-                            _this.nowIndicatorIndex = 0;
-                            _this.nowPage = 1;
-                             //所有建筑指标轮询结束 通知切换
-                            if (_this.nowBuildPage == _this.allBuild.length) {
-                                _this.$emit("donetowpage");
-                                clearTimeout(timeoutsign);
-                            } else {
-                                //换下一个建筑
-                                _this.nowBuildPage = _this.nowBuildPage + 1;
-                                _this.queryFs();
-                            }
-                            return;
-                        }
-                          //如果是两页 并且nowPage是第一页
-                        if (_this.pageNum == 2 && _this.nowPage == 1) {
-                            _this.nowPage = 2;
-                            _this.nowIndicatorIndex = 0;
-                        }
-                       
-                    }
-                    this.getTimeFloorParam();
-                }, 1200);
-            });
-        },
-         queryBuild() {
-            var _this = this;
-            this.$axios
-                .post(this.$api.queryBuilding, {
-                    criteria: {
-                        projectId: this.projectId,
-                    },
-                })
-                .then((res) => {
-                    var data = (res.data || {}).content || [];
-                    //todo 删除
-                       if (this.projectId == "Pj3301100002") {
-                        var filterdata = data.filter((item) => {
-                            return item.localName == "1#楼";
-                        });
-                         _this.allBuild = filterdata;
-                    }else{
-                           _this.allBuild = data
-                    }
-                  
-                   // _this.allBuild = filterdata;
-                    _this.nowBuildPage = 1;
-      
-                    _this.queryFs();
-                })
-                .catch((res) => {
-                    // loading.close();
-                });
-        },
-        queryFs() {
-            //var loading = this.$loading({ fullscreen: true });
-            var _this=this;
-            var buildId= (this.allBuild[this.nowBuildPage - 1]||{}).id;
-            if(!buildId){return;} 
-
-            this.$axios
-                .post(this.$api.queryFs, {
-                    criteria: {
-                        projectId: this.projectId,
-                           buildingId: buildId,
-                    },
-                    size: 14,//最多14层
-                    page: 1,
-                    orders: [
-                        {
-                            column: "floorSequenceId",
-                            asc: true,
-                        },
-                    ],
-                })
-                .then((res) => {
-                   // loading.close();
-                    var allFloor = res.data.content || [];
-                    allFloor = allFloor.filter(function(item) {
-                        return item.spaceNum > 0;
-                    });
-                   
-                    //如果该建筑的所有楼层 没有空间 则请求下一个建筑
-                    if (allFloor.length == 0) {
-                        //换下一栋楼
-                        _this.nowBuildPage = _this.nowBuildPage + 1;
-                        if (_this.nowBuildPage > _this.allBuild.length) {
-                            _this.$emit("donetowpage");
-                            return;
-                        }
-                        _this.queryFs();
-                        return;
-                    }
-                     _this.nowBuildName = _this.allBuild[_this.nowBuildPage - 1].localName;
-                    
-                    this.allFloor = allFloor;
-                    var allFloorNum = allFloor.length;
-                    //如果超过7层 就显示两屏幕 第一屏 firstPageNum
-                    //如果超过7层 就显示两屏幕 第二屏 secondPageNum
-                    var firstPageNum, secondPageNum;
-                    if (allFloorNum <= 7) {
-                        firstPageNum = allFloorNum;
-                        secondPageNum = 0;
-                        this.pageNum=1;
-                    } else {
-                        firstPageNum = Math.ceil(allFloorNum / 2);
-                        secondPageNum = Math.floor(allFloorNum / 2);
-                        this.pageNum=2;
-                    }
-
-                    var firstMaxSpace = this.floorHandle(firstPageNum); //第一屏 一层最多空间
-                    var sendMaxSpace = this.floorHandle(secondPageNum);
-                    var firstPageFloors = allFloor.slice(0, firstPageNum); //第一屏 所有楼层
-                    var secondPageFloors = allFloor.slice(firstPageNum);//第二屏 所有楼层
-                    //第一屏的参数 第二屏的参数
-                    this.firstPageParams = firstPageFloors.map((item) => {
-                        var obj = {};
-                        obj.id = item.id;
-                        obj.projectId = this.projectId;
-                        obj.spaceNum = firstMaxSpace;//最多空间数
-                        return obj;
-                    });
-
-                    this.secondPageParams = secondPageFloors.map((item) => {
-                        var obj = {};
-                        obj.id = item.id;
-                        obj.projectId = this.projectId;
-                        obj.spaceNum = sendMaxSpace;
-                        return obj;
-                    });
-                
-                    this.nowIndicatorIndex=0;
-                    this.getTimeFloorParam();
-                }).catch(function(res){
-                   // loading.close();
-                });
-        },
-        queryParam(floorparam) {
-            //var loading = this.$loading({ fullscreen: true });
-
-            var endTime = moment();
-            var startTime = moment().subtract(30, "minutes");//往前取15分钟
-            var startStr = startTime.format("YYYYMMDDHHmmss");
-            var endStr = endTime.format("YYYYMMDDHHmmss");
-            var newv=this.nowIndicatorIndex;
-            this.selIndicator = this.allIndicator[newv];
-            var param = this.selIndicator.code;
-          return  this.$axios
-                .post(
-                    `${this.$api.queryParam}?endTime=${endStr}&startTime=${startStr}&param=${param}`,
-                    floorparam
-                )
-                .then((res) => {
-                   // loading.close();
-                    //console.log("queryParam", res);
-                    var showFloors = res.data.data.floors || [];
-                    this.totalAvgValues = res.data.data.avgValues || null;
-                    var wrapHeight= document.getElementsByTagName("body")[0].offsetHeight-164;
-                    wrapHeight=Math.max(wrapHeight,730);//730是楼层区域的最小高度
-
-                    this.totalAvgValues&&(this.totalAvgValues=this.totalAvgValues.toFixed(this.selIndicator.fixed));
-                    showFloors.forEach((ele) => {
-                        var filterFloorarr = this.allFloor.filter((item) => {
-                            return item.id == ele.id;
-                        });
-                        var filterFloor = filterFloorarr[0] || {};
-                        ele.name = filterFloor.name;
-                        ele.localId = filterFloor.localId;
-                        ele.localName = filterFloor.localName;
-                        var dataSpacesNum = ele.dataSpaces.length;//一层的空间数
-                        var floorParam = this.spaceHandle(dataSpacesNum,showFloors.length) ; //一行的个数
-                        ele.spacewidth = 100 / floorParam.lineNum;
-                        ele.spaceheight = 100 / floorParam.floorline;//每一行的高度占比
-                        ele.floorHeight= wrapHeight/showFloors.length;//每一层的高度
-                    });
-
-                    this.showFloors = showFloors;
-                    this.selIndicatorId=this.selIndicator.id;
-                }).catch((err)=>{});
-        },
-        spaceHandle(spaceNum,floorNum){//返回一层 的每一行 几个房间
-            var lineNum = spaceNum; //一行的房间数
-            var floorline=1;//一层几行
-            if (floorNum == 1) {//最多一层时
-                    if (spaceNum > 2 && spaceNum <= 24 ) {
-                        floorline=2;
-                        lineNum = spaceNum / 2;
-                    }else if (spaceNum > 24 && spaceNum <= 36) {
-                        floorline=3;
-                        lineNum = Math.ceil(spaceNum / 3);
-                    } else if (spaceNum > 36 && spaceNum <= 48) {
-                        floorline=4;
-                        lineNum = Math.ceil(spaceNum / 4);
-                    } else if (spaceNum > 48 && spaceNum <= 60) {//48-60个 5行
-                        floorline=5;
-                        lineNum = Math.ceil(spaceNum / 5);
-                    }
-                }else{
-                     floorline = Math.ceil(spaceNum / 16); //20-30 3排 30-40个 4排 一层排数
-                    lineNum = Math.ceil(spaceNum / floorline);
-                }
-               
-                return {lineNum,floorline};
-        },
-        floorHandle(floorNum) {
-            var maxFloorSpace = 1;//一层 最多显示房间数
-              switch (floorNum) {
-                case 1:
-                    maxFloorSpace = 60;
-                    break;
-                case 2:
-                    maxFloorSpace = 48;
-                    break;
-                case 3:
-                case 4:
-                    maxFloorSpace = 32;
-                    break;
-                case 5:
-                case 6:
-                case 7:
-                    maxFloorSpace = 16;
-                    break;
-            }
-            return maxFloorSpace;
-        //  if(floorNum == 2) {
-        //     if (spaceNum > 16 && spaceNum < = 32 ) {
-        //         lineNum = Math.ceil(spaceNum / 2);
-        //     }else if (spaceNum > 32 && spaceNum < = 48 ) {
-        //         lineNum = Math.ceil(spaceNum / 3);
-        //     }
-        //     maxFloorSpace=48;
-        // }
-        // if(floorNum ==3||floorNum ==4) {
-        //             if (spaceNum > 16 && spaceNum < = 32 ) {
-        //                 lineNum = Math.ceil(spaceNum / 2);
-        //             }
-        //              maxFloorSpace=32;
-        //         }
-    }
-}
-}
-</script>
-<style lang="less" scoped>
-.floorSpace {
-    width: 100%;
-    // height: 910px;
-    display: flex;
-    //min-height: 730px;
-    background: #ffffff;
-     border-radius: 16px;
-     overflow: hidden;
-  
-}
-.leftChange {
-    height: 100%;
-    width: 154px;
-    margin: 0 auto;
-    //min-height: 730px;
-    .buildName{
-        height: 42px;
-        background:#E2F8FF;
-        line-height: 42px;
-        border-bottom-right-radius: 16px;
-        text-align:center;
-        font-size:26px;
-        width: 125px;
-    }
-    .allIndicator {
-        padding-top: 32px;
-        //padding-bottom: 20px;
-        // display: flex;
-        // align-items: center;
-        // justify-content: center;
-        .eachItem {
-            cursor: pointer;
-            margin-bottom: 56px;
-            padding: 0;
-            text-align: center;
-            font-family: PingFang SC;
-            .title {
-                color: #9b98ad;
-                font-size: 24px;
-                font-weight: 600;
-            }
-            &.select {
-                border-left: 4px solid #46ccf6;
-                .title {
-                    color: #3b3558;
-                    font-size: 24px;
-                }
-                .textCont {
-                    color: #3b3558;
-                    font-size: 20px;
-                    padding-top: 16px;
-                    padding-bottom: 20px;
-                    line-height: 20px;
-                    .value{
-                        font-weight: 600;
-                    }
-                    .name {
-                        font-size: 14px;
-                    }
-                }
-                .img {
-                    height: 196px;
-                    padding: 0;
-                    margin: 0;
-                }
-            }
-           
-        }
-         .eachItem:last-child{
-             margin-bottom:0;
-         }
-
-    }
-    // .allIndicator {
-    //     padding-top: 32px;
-    //     padding-bottom: 20px;
-    //     display: flex;
-    //     align-items: center;
-    //     justify-content: center;
-    //     .eachItem {
-    //         font-size: 24px;
-    //         color: #9b98ad;
-    //         margin-right: 60px;
-    //         display: flex;
-    //         flex-direction: column;
-    //         align-items: center;
-    //         .bar {
-    //             width: 24px;
-    //             height: 6px;
-    //             display: inline-block;
-    //         }
-    //         &.select {
-    //             color: #3b3558;
-    //             .bar {
-    //                 background: #46ccf6;
-    //             }
-    //         }
-    //     }
-    // }
-    // .imageDiv {
-    //     height: 32px;
-    //     margin: 0 32px;
-    // }
-    // .textCont {
-    //     color: #3b3558;
-    //     font-size: 20px;
-    //     font-weight: 600;
-    //     text-align: center;
-    //     padding-top: 16px;
-    //     .value {
-    //         margin-left: 4px;
-    //     }
-    // }
-}
-
-.floorWrap {
-    //  width: 1000px;
-    flex: 1;
-    margin: 0 auto;
-    background: #ffffff;
-    border-top-right-radius: 16px;
-    border-bottom-right-radius: 16px;
-    // padding-right:20px;
-    box-sizing: border-box;
-    .floor-item {
-        display: flex;
-        padding: 18px 20px 18px 0;
-        box-sizing: border-box;
-        background: linear-gradient(
-            186deg,
-            rgba(50, 129, 246, 0.1) 6.16%,
-            rgba(50, 129, 246, 0) 81.03%
-        );
-    }
-
-    .floor-num {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        font-family: Persagy;
-        font-size: 36px;
-        font-weight: 700;
-        line-height: 43px;
-        color: #3b3558;
-        width: 90px;
-        flex-shrink: 0;
-    }
-    .floor-space {
-        display: flex;
-        flex: 1;
-        flex-wrap: wrap;
-        .space-box {
-            padding: 4px;
-            box-sizing: border-box;
-            .space-name {
-                display: flex;
-                justify-content: center;
-                align-items: center;
-                //height: 86px;
-                height: 100%;
-                min-width: 20px;
-                border-radius: 8px;
-                background: #d9f5d6;
-                text-align: center;
-                padding:0 8px;
-                box-sizing: border-box;
-            }
-        }
-    }
-}
-</style>
-
-

+ 0 - 290
src/views/valueDelivery/LastMonthData.vue

@@ -1,290 +0,0 @@
-<template>
-    <div
-        class="lastMonth"
-        :class="[
-            screenType === 'hor'
-                ? 'horizontalClass horiLastMonth'
-                : 'verticalClass verticalLastMonth',
-        ]"
-    >
-        <div class="head-title"><span>上月数据</span></div>
-        <div class="itemWrap">
-            <div class="item" v-for="(item, index) in lastDataArr" :key="index">
-                <div class="item-left">
-                    <img :src="item.img" />
-                </div>
-                <div class="item-right">
-                    <div class="item-value">
-                        <span>{{ item.value }}</span
-                        ><span>{{ item.unit }}</span>
-                    </div>
-                    <div class="item-content">
-                        <div class="item-content-left">
-                            <span
-                                class="max-value maxmin-level"
-                                :style="{
-                                    backgroundColor: selectColor(
-                                        item.max,
-                                        item.id
-                                    ),
-                                }"
-                            ></span>
-                            <span
-                                class="max-min-line"
-                                :style="{
-                                    background:
-                                        'linear-gradient(' +
-                                        selectColor(item.max, item.id) +
-                                        ',' +
-                                        selectColor(item.min, item.id) +
-                                        ')',
-                                }"
-                            ></span>
-                            <span
-                                class="min-value maxmin-level"
-                                :style="{
-                                    backgroundColor: selectColor(
-                                        item.min,
-                                        item.id
-                                    ),
-                                }"
-                            ></span>
-                        </div>
-                        <div class="item-content-right">
-                            <div class="max">
-                                <span>{{ item.maxName }}</span>
-                                <span>{{ item.max }}</span>
-                                <span>{{ item.unit }}</span>
-                            </div>
-                            <div class="min">
-                                <span>{{ item.minName }}</span>
-                                <span>{{ item.min }}</span>
-                                <span>{{ item.unit }}</span>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import icon_temp from "@/assets/icon_temp.png";
-import icon_humidity from "@/assets/icon_humidity.png";
-import icon_CO2 from "@/assets/icon_CO2.png";
-import icon_formaldehyde from "@/assets/icon_formaldehyde.png";
-import icon_PM2d5 from "@/assets/icon_PM2d5.png";
-import { selectColor } from "@/utils/publicMethod";
-import { mapState, mapActions } from "vuex";
-export default {
-    name: "lastMonthData",
-    props: {
-        screenType: {
-            type: String,
-            default: () => {
-                return "hor";
-            }, //hor 横屏  vert 竖屏
-        },
-    },
-    data() {
-        return {};
-    },
-    created() {
-        this.getLastMonthData();
-    },
-    watch: {
-        lastDataArr(newv, oldv) {
-            //debugger;
-        },
-    },
-    destroyed() {
-        // console.log("lastMonthData---destroyed");
-    },
-    computed: {
-        ...mapState({
-            lastDataArr(state) {
-                //state改变时调用  通过state.lastMonthData的值 生成新的值
-                var statecopu = JSON.parse(JSON.stringify(state));
-                //console.log('lastDataArr',statecopu);
-                var lastMonthData = state.lastMonthData;
-                var lastMonthInit = [
-                    {
-                        id: "temp",
-                        name: "温度",
-                        code: "Tdb",
-                        unit: "℃",
-                        maxName: "最高温",
-                        minName: "最低温",
-                        img: icon_temp,
-                        fixed: 1,
-                    },
-                    {
-                        id: "humidity",
-                        name: "湿度",
-                        code: "RH",
-                        unit: "%",
-                        maxName: "最大值",
-                        max: 50,
-                        minName: "最小值",
-                        min: 20,
-                        img: icon_humidity,
-                        fixed: 0,
-                    },
-                    {
-                        id: "co2",
-                        name: "CO2",
-                        code: "CO2",
-                        value: 2600,
-                        unit: "ppm",
-                        maxName: "最大值",
-                        max: 2600,
-                        minName: "最小值",
-                        min: 300,
-                        img: icon_CO2,
-                        fixed: 0,
-                    },
-                    {
-                        id: "methanal",
-                        name: "甲醛",
-                        code: "HCHO",
-                        value: 0.03,
-                        unit: "mg/m³",
-                        maxName: "最大值",
-                        max: 0.01,
-                        minName: "最小值",
-                        min: 0.07,
-                        img: icon_formaldehyde,
-                        fixed: 2,
-                    },
-                    {
-                        id: "pm25",
-                        name: "PM2.5",
-                        code: "PM2d5",
-                        value: 120,
-                        unit: "ug/m³",
-                        maxColor: "#C4E34F",
-                        minColor: "#7ed874",
-                        maxName: "最大值",
-                        max: 340,
-                        minName: "最小值",
-                        min: 20,
-                        img: icon_PM2d5,
-                        fixed: 0,
-                    },
-                ];
-                lastMonthInit.forEach((item) => {
-                    var filterRes = lastMonthData.filter((ele) => {
-                        return ele.code == item.code;
-                    });
-                    var filterObj = filterRes[0] || {};
-                    item.value = filterObj.avgData
-                        ? Number(filterObj.avgData.toFixed(item.fixed))
-                        : filterObj.avgData;
-                    item.max = filterObj.maxData
-                        ? Number(filterObj.maxData.toFixed(item.fixed))
-                        : filterObj.maxData;
-                    item.min = filterObj.minData
-                        ? Number(filterObj.minData.toFixed(item.fixed))
-                        : filterObj.minData;
-                });
-                return lastMonthInit;
-            },
-        }),
-    },
-    methods: {
-        ...mapActions(["getLastMonthData"]),
-        selectColor: selectColor,
-    },
-};
-</script>
-<style lang="less" scoped>
-.lastMonth {
-    &.horizontalClass {
-        height: 100%;
-        //height: 910px;
-        // width: 308px;
-    }
-    .item {
-        padding-top: 60px;
-        display: flex;
-        align-items: center;
-
-        .item-left {
-            width: 86px;
-            height: 86px;
-            margin-right: 20px;
-            img {
-                width: 86px;
-            }
-        }
-        .item-value {
-            font-family: Persagy;
-            font-size: 26px;
-            font-weight: 700;
-            line-height: 31px;
-        }
-        .item-content {
-            display: flex;
-            align-items: center;
-            padding-top: 8px;
-            font-weight: 500;
-            font-size: 14px;
-            .item-content-left {
-                display: flex;
-                flex-direction: column;
-                .max-min-line {
-                    height: 18px;
-                    width: 1px;
-                    //  background: linear-gradient(#f5483d, #7ed874);
-                    position: relative;
-                    left: 4px;
-                }
-            }
-            .maxmin-level {
-                display: inline-block;
-                height: 9px;
-                width: 9px;
-                border-radius: 50%;
-                margin-right: 8px;
-            }
-        }
-        .item-content-right {
-            font-size: 14px;
-            white-space: nowrap;
-            color: #575271;
-            .min {
-                padding-top: 8px;
-            }
-        }
-    }
-}
-.horiLastMonth {
-    .item {
-        padding-top: 0;
-    }
-    .itemWrap {
-        height: calc(100% - 30px);
-        display: flex;
-        flex-direction:column;
-        justify-content: space-evenly;
-    }
-}
-.verticalLastMonth {
-    height: 440px;
-
-    .itemWrap {
-        display: flex;
-        flex-direction: row;
-        flex-wrap: wrap;
-        //  justify-content:space-around;
-        .item {
-            width: 33.33%;
-            // justify-content: center;
-            .item-content-right {
-                font-size: 14px;
-                white-space: nowrap;
-            }
-        }
-    }
-}
-</style>

+ 0 - 260
src/views/valueDelivery/NowData.vue

@@ -1,260 +0,0 @@
-<template>
-    <div
-        class="NowData"
-        :class="[
-            screenType === 'hor'
-                ? 'horizontalClass'
-                : 'verticalClass verticalNowData',
-        ]"
-    >
-        <div class="head-title">
-            <span>实时数据</span>
-            <div class="normal-explain">
-                <span class="title-right-icon"></span>
-                <span>正常范围</span>
-            </div>
-        </div>
-        <div class="subhead-title">主动式空调,会呼吸的写字楼</div>
-        <div class="contain">
-            <div class="item" v-for="(item, index) in realDataArr" :key="index">
-                <div class="item_content">
-                    <img
-                        :class="[screenType === 'hor' ? '' : 'vert']"
-                        :src="item.img"
-                        alt=""
-                    />
-                    <div class="content_value">
-                        <span>{{ item.value }}</span
-                        ><span>{{ item.unit }}</span>
-                    </div>
-                    <div class="content_name">
-                        <span>{{ item.name }}</span>
-                    </div>
-                    <div
-                        class="content_level"
-                        :style="{
-                            backgroundColor: selectColor(item.value, item.id),
-                        }"
-                        :class="item.level"
-                    ></div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import icon_temp from "@/assets/icon_temp.png";
-import icon_humidity from "@/assets/icon_humidity.png";
-import icon_CO2 from "@/assets/icon_CO2.png";
-import icon_formaldehyde from "@/assets/icon_formaldehyde.png";
-import icon_PM2d5 from "@/assets/icon_PM2d5.png";
-import { selectColor } from "@/utils/publicMethod";
-
-import { mapState, mapActions } from "vuex";
-
-export default {
-    props: {
-        screenType: {
-            type: String,
-            default: () => {
-                return "hor";
-            }, //hor 横屏  vert 竖屏
-        },
-    },
-    data() {
-        return {
-            intervalInt: null,
-         
-        };
-    },
-    watch: {
-        // "$store.state.realTimeData"(newv, oldv) {
-        //     //debugger;
-        //     this.realData.forEach(function(item) {
-        //         item.value = newv[item.id];
-        //     });
-        // },
-        realDataArr(newv, oldv) {
-            // debugger;
-        },
-    },
-    mounted() {
-        this.getRealTimeData(); //实时数据
-        this.intervalInt = setInterval(() => {
-            this.getRealTimeData(); //实时数据
-        }, 60000);
-    },
-    computed: {
-        ...mapState({
-            realDataArr(state) {
-                //获取数据realTimeData后的处理
-                var realTimeData = state.realTimeData;
-                var realInit = [
-                    {
-                        id: "temp",
-                        code: "Tdb",
-                        name: "温度",
-                        img: icon_temp,
-                        //value: 24.5,
-                        unit: "℃",
-                        level: "low",
-                        fixed: 1,
-                    },
-                    {
-                        id: "humidity",
-                        name: "湿度",
-                        code: "RH",
-                        img: icon_humidity,
-                        // value: 33,
-                        unit: "%",
-                        level: "middle",
-                        fixed: 0,
-                    },
-                    {
-                        id: "co2",
-                        name: "CO₂",
-                        code: "CO2",
-                        img: icon_CO2,
-                        // value: 2399,
-                        unit: "ppm",
-                        level: "low",
-                        fixed: 0,
-                    },
-                    {
-                        id: "methanal",
-                        code: "HCHO",
-                        name: "甲醛",
-                        img: icon_formaldehyde,
-                        // value: 0.12,
-                        unit: "mg/m³",
-                        level: "low",
-                        fixed: 2,
-                    },
-                    {
-                        id: "pm25",
-                        code: "PM2d5",
-                        name: "PM2.5",
-                        img: icon_PM2d5,
-                        // value: 100,
-                        unit: "ug/m³",
-                        level: "low",
-                        fixed: 0,
-                    },
-                ];
-                realInit.forEach((item) => {
-                    var filterRes = realTimeData.filter((ele) => {
-                        return ele.code == item.code;
-                    });
-                    var value = (filterRes[0] || {}).data;
-                    item.value = value
-                        ? Number(value.toFixed(item.fixed))
-                        : value;
-                });
-
-                return realInit;
-            },
-        }),
-    },
-    destroyed() {
-        console.log('nowdata-destory');
-        clearInterval(this.intervalInt);
-    },
-    methods: {
-        ...mapActions(["getRealTimeData"]),
-        selectColor: selectColor,
-    },
-};
-</script>
-<style lang="less" scoped>
-.NowData {
-    &.horizontalClass {
-        //width: 1508px;
-        height: 498px;
-    }
-    .head-title {
-        justify-content: space-between;
-    }
-    .title-right-icon {
-        display: inline-block;
-        padding: 0;
-        width: 12px;
-        height: 12px;
-        margin-right: 8px;
-        border-radius: 50%;
-        background: rgba(126, 216, 116, 1);
-    }
-
-    .contain {
-        display: flex;
-        padding-top: 47px;
-    }
-    .item {
-        width: calc(100% / 5);
-        .item_content {
-            // height: 100%;
-            display: flex;
-            flex-direction: column;
-            justify-content: center;
-            align-items: center;
-            text-align: center;
-            img {
-                width: 150px;
-                height: 150px;
-                &.vert {
-                    width: 130px;
-                    height: 130px;
-                }
-            }
-            .content_value {
-                font-family: Persagy;
-                font-size: 42px;
-                font-weight: 700;
-                margin-top: 10px;
-                color: rgba(59, 53, 88, 1);
-            }
-            .content_name {
-                margin-top: 8px;
-                font-family: PingFang SC;
-                font-size: 24px;
-                font-weight: 400;
-                line-height: 34px;
-                color:#575271;
-            }
-        }
-    }
-    .content_level {
-        margin-top: 8px;
-        margin-right: 8px;
-        box-sizing: border-box;
-        width: 16px;
-        height: 16px;
-        border-radius: 50%;
-        background: rgba(126, 216, 116, 1);
-        &.middle {
-            background: rgba(239, 214, 46, 1);
-        }
-    }
-    .normal-explain {
-        display: flex;
-        align-items: center;
-        font-size: 14px;
-    }
-    &.verticalNowData {
-        height: 460px;
-        .item {
-            .item_content {
-                .content_value {
-                    font-size: 32px;
-                }
-                .content_name {
-                    margin-top: 12px;
-                    font-size: 20px;
-                }
-                .content_level {
-                    margin-top: 12px;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 294
src/views/valueDelivery/TemChart.vue

@@ -1,294 +0,0 @@
-<template>
-    <div
-        class="temChart"
-        :class="[
-            screenType === 'hor'
-                ? 'horizontalClass'
-                : 'verticalClass verticalTemChart',
-        ]"
-    >
-        <div class="head-title">
-            <span>实时温度</span>
-            <div class="rightVal">
-                室外温度<span>{{ temperature }}</span
-                >℃
-            </div>
-        </div>
-        <div id="tempChartBox" class="tempChartBox" ref="tempChartBox"></div>
-    </div>
-</template>
-<script>
-import G2 from "@antv/g2";
-import { mapState, mapActions, mapGetters } from "vuex";
-import moment from "moment";
-
-export default {
-    name: "TemChart",
-    props: {
-        screenType: {
-            type: String,
-            default: () => {
-                return "ver";
-            }, //hor 横屏  vert 竖屏
-        },
-        showPing: {
-            type: Number,
-            default: () => {
-                return 0;
-            },
-        },
-    },
-    created() {},
-    mounted() {
-        //console.log("temchart--mounted");
-    },
-    data() {
-        return {
-            tempChart: null,
-            timesign: null,
-        };
-    },
-    watch: {
-        showPing(newv, oldv) {
-            //debugger;
-            if (newv == 1) {
-                //如果当前切成第一屏幕 渲染chart图
-                this.getRealTimeTemp().then((res) => {
-                    var cdata = res.data.data || [];
-                    cdata.forEach((element) => {
-                        var timestr = element.time;
-                        var hour = timestr.substr(8, 2);
-                        var minute = timestr.substr(10, 2);
-                        element.time = hour + ":" + minute;
-                    });
-                    this.tempChart = this.cInitChart(cdata);
-                });
-            }
-        },
-        getBodyWidthHeight(newv, oldv) {
-            clearTimeout(this.timesign);
-            this.timesign = setTimeout(() => {
-                var width =
-                    this.screenType === "hor"
-                        ? document.getElementsByTagName("body")[0].offsetWidth -
-                          874
-                        : document.getElementsByTagName("body")[0].offsetWidth -
-                          80;
-                this.showPing == 1 &&
-                    this.tempChart &&
-                    this.tempChart.changeSize(width, 330);
-            }, 300);
-        },
-    },
-    computed: {
-        ...mapState({
-            temperature: (state) => {
-                var weatherCont = state.weatherCont;
-                return weatherCont.temperature;
-            },
-        }),
-        ...mapGetters(["getBodyWidthHeight"]),
-    },
-    methods: {
-        ...mapActions(["getRealTimeTemp"]),
-        cInitChart(cdata) {
-            // var data = [
-            //     { time: "8", type: "温度", temp: 23.5 },
-            //     { time: "9", type: "温度", temp: 26.5 },
-            //     { time: "10", type: "温度", temp: 29.5 },
-            //     { time: "11", type: "温度", temp: 30.5 },
-            //     { time: "12", type: "温度", temp: 26.5 },
-            //     { time: "13", type: "温度", temp: 29.5 },
-            //     { time: "14", type: "温度", temp: 30.5 },
-            //     { time: "15", type: "温度", temp: 33.5 },
-            //     { time: "16", type: "温度", temp: 34.5 },
-            //     { time: "17", type: "温度", temp: 30.5 },
-            // ];
-            //var width = this.$refs.tempChartBox.clientWidth;
-            //debugger;
-            var width =
-                this.screenType === "hor"
-                    ? document.getElementsByTagName("body")[0].offsetWidth - 874
-                    : document.getElementsByTagName("body")[0].offsetWidth - 80;
-            if (this.tempChart) {
-                this.tempChart.clear();
-                var chart = this.tempChart;
-            } else {
-                var chart = new G2.Chart({
-                    container: "tempChartBox",
-                    // forceFit: true,
-                    width: width,
-                    height: 330,
-                    padding: [50, 50, 46, 60],
-                });
-            }
-
-            chart.source(cdata);
-
-            chart.scale("time", {
-                //range: [0, 1],
-                //tickCount: 2,
-                //tickInterval
-                // type: 'timeCat'
-            });
-            chart.scale("temp", {
-                //range: [0, 1],
-                tickCount: 5,
-                minTickInterval: 2,
-                //ticks:[20,24,28,32]
-                //tickInterval
-                // type: 'timeCat'
-            });
-            chart.axis("time", {
-                line: {
-                    lineWidth: 1, // 设置线的宽度
-                    stroke: "rgba(155, 152, 173,0.4)", // 设置线的颜色
-                    lineDash: [3, 3], // 设置虚线样式
-                },
-                label: {
-                    textStyle: {
-                        fill: "#9B98AD",
-                        fontSize: 12,
-                    },
-                },
-                tickLine: null,
-            });
-            chart.axis("temp", {
-                tickLine: null,
-                label: {
-                    textStyle: {
-                        fill: "#9B98AD",
-                        fontSize: 12,
-                    },
-                    // formatter: function formatter(text) {
-                    //     return text;
-                    // }
-                },
-            });
-            // chart.tooltip({
-            //     crosshairs: "y",
-            // });
-            chart.legend(false);
-            //view1
-            // var view1 = chart.view();
-            // view1.source(dv2);
-            // view1.axis(false);
-            // view1.area().position('time*temp').color('#8d8d8d').opacity(0.1).tooltip(false);
-            //view1
-            //var view1 = chart.view();
-
-            chart
-                .line()
-                .position("time*temp")
-                .color("#23CCF9")
-                .opacity(1)
-                .shape("smooth")
-                .tooltip(false)
-                .style({
-                    lineWidth: 3,
-                });
-            chart
-                .point()
-                .position("time*temp")
-                .color("#23CCF9")
-                .opacity(1)
-                .tooltip(false)
-                .shape("circle")
-                .style("time", {
-                    lineWidth: 2,
-                    stroke: "#ffffff",
-                    shadowColor: "#23CCF9",
-                    shadowBlur: (val) => {
-                        //debugger;
-                        if (val && val == cdata[cdata.length - 1].time) {
-                            return 3;
-                        } else {
-                            return 0;
-                        }
-                    },
-                    shadowOffsetX: 0,
-                    shadowOffsetY: 0,
-                });
-            chart
-                .area()
-                .position("time*temp")
-                .color("l(90) 0:#23CCF9 1:#ffffff")
-                .opacity(0.2)
-                .tooltip(false)
-                .shape("smooth");
-            var lastpoint = cdata[cdata.length - 1];
-            var nowtime = moment();
-            var timestr = nowtime.format("YYYY.MM.DD");
-            const tooltipHtml = `<div style='line-height:22px;color:#fff;background: rgba(35,204,249,0.7);padding:10px 12px;border-radius:5px;'>
-                <div style='font-size:13px;font-weight:600;'><span style='margin-right:5px'>${timestr}</span>${
-                lastpoint&&lastpoint.time
-            }</div>
-                <div style='font-size:16px;font-weight:600;'>室内温度:${lastpoint&&lastpoint.temp.toFixed(
-                    1
-                )}℃</div></div>`;
-            chart.guide().html({
-                position: lastpoint,
-                html: tooltipHtml,
-                alignX: "right",
-                alignY: "bottom",
-                offsetX: 60,
-                offsetY: -5,
-            });
-            chart.guide().text({
-                top: false,
-                limitInPlot: true,
-                position: ["max", "min"], // 文本的起始位置,值为原始数据值,支持 callback
-                content: "时间/时分", // 显示的文本内容
-                style: {
-                    fill: "#9590AD", // 文本颜色
-                    fontSize: "12", // 文本大小
-                    // fontWeight: 'bold' // 文本粗细
-                    // rotate: Math.PI / 4 // 文本旋转,以弧度为单位
-                }, // 文本的图形样式属性
-                offsetX: 20, // x 方向的偏移量
-                offsetY: 16, // y 方向偏移量
-            });
-            chart.guide().text({
-                // position: ['min', 'max'], // 文本的起始位置,值为原始数据值,支持 callback
-                position: function(xScale, yScale) {
-                    //console.log("position", xScale, yScale);
-                    return ["0%", "0%"];
-                },
-                content: "温度/℃", // 显示的文本内容
-                style: {
-                    fill: "#9590AD", // 文本颜色
-                    fontSize: "12", // 文本大小
-                    // fontWeight: 'bold' // 文本粗细
-                    // rotate: Math.PI / 4 // 文本旋转,以弧度为单位
-                }, // 文本的图形样式属性
-                offsetX: -40, // x 方向的偏移量
-                offsetY: -24, // y 方向偏移量
-            });
-            chart.render();
-            return chart;
-        },
-    },
-};
-</script>
-<style lang="less" scoped>
-.horizontalClass {
-    // width:1036px;
-    height: 388px;
-}
-.temChart {
-    padding: 24px 0 0 !important;
-    .head-title {
-        justify-content: space-between;
-        padding: 0 32px;
-        .rightVal {
-            color: #39354e;
-            font-size: 14px;
-            font-weight: normal;
-        }
-    }
-    .tempChartBox {
-        width: 100%;
-        height: 330px;
-    }
-}
-</style>

+ 0 - 328
src/views/valueDelivery/lastEnergyChart.vue

@@ -1,328 +0,0 @@
-<template>
-    <div
-        class="lastChart"
-        :class="[
-            screenType === 'hor'
-                ? 'horizontalClass'
-                : 'verticalClass verticalTemChart',
-        ]"
-    >
-        <div class="head-title">
-            <span>上月每日能耗</span>
-        </div>
-        <div id="lastChartBox" class="lastChartBox" ref="lastChartBox"></div>
-        <!-- <div id="slider"></div> -->
-    </div>
-</template>
-<script>
-import G2 from "@antv/g2";
-import DataSet from "@antv/data-set";
-import moment from "moment";
-import { mapGetters, mapState } from "vuex";
-
-// 自定义 shape, 支持图片形式的气泡
-G2.Shape.registerShape("interval", "borderRadius", {
-    draw: function draw(cfg, container) {
-        var points = cfg.points;
-        var path = [];
-        path.push(["M", points[0].x, points[0].y]);
-        path.push(["L", points[1].x, points[1].y]);
-        path.push(["L", points[2].x, points[2].y]);
-        path.push(["L", points[3].x, points[3].y]);
-        path.push("Z");
-        path = this.parsePath(path); // 将 0 - 1 转化为画布坐标
-        return container.addShape("rect", {
-            attrs: {
-                x: path[1][1], // 矩形起始点为左上角
-                y: path[1][2],
-                width: path[2][1] - path[1][1],
-                height: path[0][2] - path[1][2],
-                fill: cfg.color,
-                radius: (path[2][1] - path[1][1]) / 2,
-            },
-        });
-    },
-});
-
-export default {
-    name: "TemChart",
-    props: {
-        screenType: {
-            type: String,
-            default: () => {
-                return "ver";
-            }, //hor 横屏  vert 竖屏
-        },
-        showPing: {
-            type: Number,
-            default: () => {
-                return 0;
-            },
-        },
-    },
-    created() {},
-    mounted() {
-        // window.onresize = () => {
-        // };
-    },
-    computed: {
-        ...mapGetters(["getBodyWidthHeight"]),
-        ...mapState({ projectId: (state) => state.projectId }),
-    },
-    data() {
-        return {
-            ds: null,
-            lastChart: null,
-            time: null,
-        };
-    },
-    watch: {
-        showPing(newv, oldv) {
-            // debugger; 当前是第三屏时请求数据 渲染chart
-            if (newv == 3) {
-                if (!this.lastChart) {
-                    this.queryLastDayEnergy();
-                } else {
-                    this.setChartInterval();
-                }
-            }
-        },
-        getBodyWidthHeight(newv, oldv) {
-            clearTimeout(this.time);
-            this.time = setTimeout(() => {
-                // console.log("resize-over");
-                var width =
-                    document.getElementsByTagName("body")[0].offsetWidth - 80;
-                var height = this.screenType === "hor" ? 274 : 330;
-                this.showPing == 3 &&
-                    this.lastChart &&
-                    this.lastChart.changeSize(width, height);
-            }, 300);
-        },
-    },
-    methods: {
-        queryLastDayEnergy() {
-            //上月每日能耗
-            var start = moment()
-                .subtract(1, "months")
-                .startOf("month")
-                .format("YYYYMMDD");
-            var end = moment()
-                .subtract(1, "months")
-                .endOf("month")
-                .format("YYYYMMDD");
-
-            //console.log("start", start);
-            this.$axios
-                .post(this.$api.queryLastDayEnergy, {
-                    criteria: {
-                        projectId: this.projectId,
-                        date: {
-                            $gte: start,
-                            $lte: end,
-                        },
-                    },
-                })
-                .then((res) => {
-                    var resdata = res.data.content || [];
-                    //debugger;
-                    resdata.forEach(function(item) {
-                        var dateStr = item.date;
-                        item.Date =
-                            dateStr.substr(0, 4) +
-                            "-" +
-                            dateStr.substr(4, 2) +
-                            "-" +
-                            dateStr.substr(6, 2);
-                        item.value = Number(
-                            (
-                                (item.energyAcTerminal || 0) +
-                                (item.energyCooling || 0) +
-                                (item.energyHeating || 0) +
-                                (item.energyLight || 0) +
-                                (item.energyOthers || 0)
-                            ).toFixed(0)
-                        );
-                    });
-                    this.lastChart = this.cInitChart(resdata);
-                    this.setChartInterval();
-                });
-        },
-        setChartInterval() {
-            if (this.screenType == "ver") {
-                //只有竖屏才轮播
-                //上个月
-                var start = moment()
-                    .subtract(1, "months")
-                    .date(1);
-                var end = moment()
-                    .subtract(1, "months")
-                    .date(12);
-                var end2 = moment().subtract(1, "months");
-                var intervalInt = setInterval(() => {
-                    start.add(1, "days");
-                    end.add(1, "days");
-                    //debugger;
-                    //console.log("start--", chart);
-                    //console.log("end--", _this.ds);
-
-                    this.ds.setState("start", start.format("YYYY-MM-DD"));
-                    this.ds.setState("end", end.format("YYYY-MM-DD"));
-
-                    if (
-                        end.format("YYYY-MM-DD") ==
-                        end2.endOf("month").format("YYYY-MM-DD")
-                    ) {
-                        clearInterval(intervalInt);
-                        this.$emit("donethreepage");
-                    }
-                }, 800);
-            }
-        },
-        cInitChart(cdata) {
-            // var data = [
-            //     { Date: "2021-08-01", type: "订阅数", value: 1300 },
-            // ];
-
-            if (this.screenType == "hor") {
-                var end =
-                    cdata[cdata.length - 1] && cdata[cdata.length - 1].Date;
-            } else {
-                var end = cdata[11] && cdata[11].Date;
-            }
-            var ds = new DataSet({
-                state: {
-                    start: cdata[0] && cdata[0].Date,
-                    end: end,
-                },
-            });
-            var dv = ds.createView();
-            dv.source(cdata).transform({
-                type: "filter",
-                callback: function callback(obj) {
-                    var date = obj.Date;
-                    return date <= ds.state.end && date >= ds.state.start;
-                },
-            });
-            var width =
-                document.getElementsByTagName("body")[0].offsetWidth - 80;
-            var chart = new G2.Chart({
-                container: "lastChartBox",
-                //forceFit: true,
-                width: width,
-                height: this.screenType === "hor" ? 274 : 330,
-                padding: [20, 20, 36, 20],
-            });
-            chart.source(dv);
-            chart.tooltip(false);
-            chart.scale("Date", {
-                //range: [0, 1],
-                tickCount: 12,
-                //tickInterval:0,
-                type: "timeCat",
-                mask: "MM-DD",
-                // formatter: function formatter(val) {
-                //     console.log('val',val);
-                //     return val.substr(5);
-                // }
-            });
-            chart.scale("value", {
-                //range: [0, 1],
-                tickCount: 5,
-                type: "linear",
-                //max: 1500,//这个不能小于实际值 不然显示不出来
-                //tickInterval
-                // type: 'timeCat'
-            });
-            chart.axis("Date", {
-                line: {
-                    lineWidth: 1, // 设置线的宽度
-                    stroke: "rgba(155, 152, 173,0.4)", // 设置线的颜色
-                    lineDash: [3, 3], // 设置虚线样式
-                },
-                label: {
-                    textStyle: {
-                        fill: "#9B98AD",
-                        fontSize: 12,
-                    },
-                },
-                tickLine: null,
-            });
-            chart.axis("value", {
-                line: null,
-                tickline: null,
-                label: null,
-            });
-
-            chart.legend(false);
-
-            chart
-                .interval()
-                .position("Date*value")
-                .color("l(90) 0:#3E91F8 1:#76DEFF")
-                .opacity(1)
-                .shape("borderRadius")
-                .adjust({ type: "stack" })
-                .size(12)
-                .label("value", {
-                    offset: 10,
-                    textStyle: {
-                        fill: "#3281F6",
-                        fontSize: 12,
-                    },
-                });
-
-            chart.render();
-            this.ds = ds;
-            // chart.interact('slider', {
-            //     container: 'slider', // DOM id
-            //     start: ds.state.start, // 和状态量对应
-            //     end: ds.state.end,
-            //     data: data, // 源数据
-            //     xAxis: 'Date', // 背景图的横轴对应字段,同时为数据筛选的字段
-            //     yAxis: 'value', // 背景图的纵轴对应字段,同时为数据筛选的字段
-            //     scales: {
-            //         Date: {
-            //             type: 'timeCat',
-            //             nice: false
-            //         }
-            //     },
-            //     onChange: function onChange(_ref) {
-            //         var startText = _ref.startText,
-            //             endText = _ref.endText;
-
-            //         ds.setState('start', startText);
-            //         ds.setState('end', endText);
-            //         setTimeout(function () {
-            //             chart.render();
-            //         }, 32);
-            //     }
-            // });
-            return chart;
-        },
-    },
-};
-</script>
-<style lang="less" scoped>
-.lastChart {
-    padding: 24px 0 0 !important;
-    .head-title {
-        justify-content: space-between;
-        padding: 0 32px;
-        .rightVal {
-            color: #39354e;
-            font-size: 14px;
-            font-weight: normal;
-        }
-    }
-    .lastChartBox {
-        width: 100%;
-        height: 330px;
-    }
-    &.horizontalClass {
-        .lastChartBox {
-            height: 276px;
-        }
-    }
-}
-</style>

+ 0 - 166
src/views/valueDelivery/lastSaveEnergy.vue

@@ -1,166 +0,0 @@
-<template>
-    <div
-        class="lastSaveEnergy"
-        :class="[screenType == 'ver' ? 'verticalClass' : 'horizontalClass']"
-    >
-        <div class="head-title">
-            <span>上月节约能耗</span>
-        </div>
-        <div class="bottomCont">
-            <img src="@/assets/save_energy.png" />
-            <div class="showData">
-                <div class="leftsave">
-                    <div class="firstline">节约电</div>
-                    <div class="secondline">
-                        <span class="value">{{ lastAllEnergy.energySaving }}</span
-                        ><span class="unit">度</span>
-                    </div>
-                </div>
-                <div class="equalTo">相当于</div>
-                <div class="rightCont">
-                    <div class="saveCo2">
-                        减排<span class="value">{{ lastAllEnergy.cdmCo2 }}</span
-                        >kg二氧化碳
-                    </div>
-                    <div class="saveCarbon">
-                        减排<span class="value">{{ lastAllEnergy.cdmC }}</span
-                        >kg碳
-                    </div>
-                    <div class="plantTree">
-                        为国家种<span class="value">{{ lastAllEnergy.cdmTree }}</span
-                        >棵树
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import air_close from "@/assets/horImg/air_close.png";
-import air_open from "@/assets/horImg/air_open.png";
-import { mapState } from "vuex";
-export default {
-    name: "lastSaveEnergy",
-    props: {
-        screenType: {
-            type: String,
-            default: () => {
-                return "hor";
-            }, //hor 横屏  vert 竖屏
-        },
-    },
-    data() {
-        return {};
-    },
-    computed: {
-        ...mapState({
-            lastAllEnergy: (state) => state.lastAllEnergy,
-        }),
-    },
-};
-</script>
-<style lang="less" scoped>
-.lastSaveEnergy {
-    &.verticalClass {
-        height: 535px;
-    }
-    &.horizontalClass {
-        height: 100%;
-    }
-    .bottomCont {
-        max-width: 900px;
-        margin: 40px auto;
-        position: relative;
-        img {
-            width: 100%;
-        }
-        .showData {
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            bottom: 0;
-            box-sizing: border-box;
-            // display: flex;
-            // // align-items: center;
-            // // justify-content: center;
-            // flex-direction: row;
-            .value{
-                font-family: Persagy;
-            }
-            .leftsave {
-                // position: absolute;
-                // left: 12px;
-                // top: 160px;
-                color: #fff;
-                width: 26%;
-                height: 100%;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                float: left;
-                flex-direction: column;
-                font-size:24px;
-                // width: 210px;
-                // line-height: 34px;
-                // text-align: center;
-                .value {
-                    font-size: 32px;
-                }
-            }
-            .equalTo {
-                // position: absolute;
-                // left: 249px;
-                // top: 186px;
-                float: left;
-                font-size: 20px;
-                width: 12%;
-                height: 100%;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                white-space: nowrap;
-            }
-            .rightCont {
-                position: relative;
-                width: 38%;
-                height: 100%;
-                float: right;
-                display: flex;
-                flex-direction: column;
-                justify-content: space-between;
-                .saveCo2 {
-                    // position: absolute;
-                    // left: 562px;
-                    // top: 32px;
-                    height: 22%;
-                    display: flex;
-                    align-items: center;
-                    white-space: nowrap;
-                    // justify-content: center;
-                }
-                .saveCarbon {
-                    // position: absolute;
-                    // left: 562px;
-                    // top: 186px;
-                    height: 30%;
-                    display: flex;
-                    align-items: center;
-                    white-space: nowrap;
-                    //justify-content: center;
-                }
-                .plantTree {
-                    // position: absolute;
-                    // left: 562px;
-                    // top: 340px;
-                    height: 25%;
-                    display: flex;
-                    align-items: center;
-                    white-space: nowrap;
-                    //  justify-content: center;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 176
src/views/valueDelivery/pageHead.vue

@@ -1,176 +0,0 @@
-<template>
-    <div class="horHead horSty">
-        <div class="horHead-content">
-            <div>
-                <div class="firtitle">
-                    {{ projectObj.localName }}
-                </div>
-                <div class="sectitle">
-                    懂空间,更懂办公
-                </div>
-            </div>
-            <!-- <img :src="title" v-else /> -->
-        </div>
-        <div class="horHead-left">
-            <img :src="logo" alt="" style="height:60px;" />
-        </div>
-        <div class="horHead-right">
-            <div class="right-item">
-                <span class="item-time">{{ nowstr }}</span>
-            </div>
-            <div class="right-item">
-                {{ weatherText }}
-            </div>
-            <div class="right-item" @click="changeScreen">
-                <img
-                    class="firstImg"
-                    :src="nowScreen == 'vertical' ? changeHor : changeVer"
-                    alt=""
-                />
-            </div>
-            <div class="right-item" style="display:none">
-                退出
-            </div>
-        </div>
-    </div>
-</template>
-<script lang="ts">
-import Vue from "vue";
-
-// declare function require(img: string): string;
-
-const persagyLogo = require("@/assets/horImg/persagyLogo.svg");
-const zhijiangLogo = require("@/assets/horImg/zhijianglogo.png");
-
-const title = require("@/assets/horImg/hor_title.png");
-const changeVer = require("@/assets/horImg/changeVer.svg");
-const changeHor = require("@/assets/horImg/changeHor.svg");
-import { mapState } from "vuex";
-import moment from "moment";
-export default Vue.extend({
-    data() {
-        return {
-            //logo: this.projectId == "Pj3301100002" ? zhijiangLogo : persagyLogo,
-            title: title,
-            changeVer: changeVer,
-            changeHor: changeHor,
-            nowScreen: "vertical",
-            nowstr: "",
-            // weatherText:''
-        };
-    },
-    mounted() {
-        // console.log("route", this.$route);
-        // console.log("router", this.$router);
-        var path = this.$route.path;
-        if (path.indexOf("horizontalScreen") > -1) {
-            this.nowScreen = "horizontal";
-        } else if (path.indexOf("verticalScreen") > -1) {
-            this.nowScreen = "vertical";
-        }
-        this.nowstr = moment().format("YYYY.MM.DD HH:mm");
-        setInterval(() => {
-            this.nowstr = moment().format("YYYY.MM.DD HH:mm");
-        }, 5000);
-    },
-    computed: {
-        ...mapState({
-            weatherText(state: any) {
-                //debugger;
-                var text = state.weatherCont.text || "晴";
-                return text;
-            },
-            projectId: (state: any) => {
-                return state.projectId;
-            },
-            projectObj: (state: any) => {
-                //debugger;
-                return state.projectObj;
-            },
-        }),
-        logo: function(): any {
-            //console.log("this", this);
-            var logoTemp =
-                this.projectId == "Pj3301100002" ? zhijiangLogo : persagyLogo;
-            return logoTemp;
-        },
-    },
-    methods: {
-        changeScreen() {
-            if (this.nowScreen == "vertical") {
-                this.nowScreen = "horizontal";
-                this.$router.push({ name: "horizontalScreen" });
-            } else {
-                this.nowScreen = "vertical";
-                this.$router.push({ name: "verticalScreen" });
-            }
-        },
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.horHead {
-    // display: flex;
-    // justify-content: space-between;
-    // align-items: center;
-    position: relative;
-    &.horSty {
-        height: 74px;
-        // width: 1840px;
-    }
-    .horHead-content {
-        width: 100%;
-        height: 100%;
-        color: #3b3558;
-        text-align: center;
-        .firtitle {
-            font-weight: 700;
-            font-size: 38px;
-            font-family: Alibaba PuHuiTi;
-        }
-        .sectitle {
-            font-weight: 500;
-            font-size: 16px;
-            letter-spacing: 8px;
-        }
-    }
-    .horHead-left {
-        position: absolute;
-        top: 0;
-        left: 0;
-    }
-    .horHead-right {
-        position: absolute;
-        top: 0;
-        right: 0;
-        display: flex;
-        // justify-content: space-between;
-        height: 46px;
-        // width: 396px;
-        .right-item {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            cursor: pointer;
-            padding: 12px 16px;
-            font-size: 16px;
-            color: #575271;
-            font-weight: 400;
-            line-height: 22px;
-            margin-left: 10px;
-            background: #ffffff99;
-            border: 2px solid #ffffffcc;
-            box-sizing: border-box;
-            border-radius: 8px;
-            .firstImg {
-                margin-right: 6px;
-            }
-            .item-time {
-                font-family: Persagy;
-                font-weight: 400;
-            }
-        }
-    }
-}
-</style>