123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <template>
- <div>
- <Head :headText="headText"></Head>
- <div class="nav-right">
- <el-radio v-model="radio" label="1">近30天</el-radio>
- <el-radio v-model="radio" label="2" style="margin-right:10px;">自定义</el-radio>
- <div class="count-top-right">
- <span class="arrow-left" @click="daterangeLeft"></span>
- <span class="arrow-line arrow-line1" @click="daterangeLeft"></span>
- <el-date-picker
- v-model="pickerVal2"
- type="daterange"
- format="yyyy.MM.dd"
- value-format="yyyy.MM.dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- <span class="arrow-line" @click="daterangeRight"></span>
- <span class="arrow-right" @click="daterangeRight"></span>
- </div>
- </div>
- <div class="evaluateContainer">
- <div class="ev-content">
- <div class="ev-cont-div">
- <p class="ev-top Micbold">室内温度满足率</p>
- <div class="ev-bottom">
- <div class="ev-bottom-left">
- <ev-satisfaction-rate :tindoorFillRate="tindoorFillRate"></ev-satisfaction-rate>
- </div>
- <div class="ev-bottom-right MicrYaHei">
- <p>
- <span>超限时长</span>
- <span>{{'--'}}</span>
- <span>h/日</span>
- </p>
- <p>
- <span>超限程度</span>
- <span>{{tindoorOverrunDegree}}</span>
- <span>°C</span>
- </p>
- </div>
- </div>
- </div>
- <div class="ev-cont-div">
- <p class="ev-top">节能率</p>
- <div class="ev-bottom">
- <div class="ev-bottom-left">
- <ev-energy-saving-rate :energySavingRate="energySavingRate"></ev-energy-saving-rate>
- </div>
- <div class="ev-bottom-right">
- <p>
- <span>节能量</span>
- <span>{{energySaving}}</span>
- <span>kW</span>
- </p>
- </div>
- </div>
- </div>
- <div class="ev-cont-div">
- <p class="ev-top">策略执行率</p>
- <div class="ev-bottom">
- <div class="ev-bottom-left">
- <ev-implementation-rate :chillerExecuteRate="chillerExecuteRate"></ev-implementation-rate>
- </div>
- <div class="ev-bottom-right">
- <p>
- <span>执行数量</span>
- <span>{{isExecutedNum}}</span>
- <span>条</span>
- </p>
- <p>
- <span>已发策略</span>
- <span>{{allReceivedNum}}</span>
- <span>条</span>
- </p>
- </div>
- </div>
- </div>
- </div>
- <div class="ev-footer">
- <ev-indoor-temperature :date="date"></ev-indoor-temperature>
- </div>
- </div>
- </div>
- </template>
- <script>
- import Head from "../main/index";
- import EvEnergySavingRate from "./evEnergySavingRate";
- import EvImplementationRate from "./evImplementationRate";
- import EvSatisfactionRate from "./evSatisfactionRate";
- import EvIndoorTemperature from "./evIndoorTemperature";
- import { runDataQury } from "@/api/evaluate/evaluate.js";
- var moment = require("moment");
- import "moment/locale/zh-cn";
- export default {
- data() {
- return {
- headText: "运行评价",
- date: "2",
- pickerVal2: "",
- radio: "1",
- tindoorFillRate: "", //室内温度满足率
- energySavingRate: "", //节能率
- chillerExecuteRate: "", //略执行率
- energySaving: "", //节能量
- isExecutedNum: "", //已执行数量
- allReceivedNum: "", //共收到数量
- tindoorOverrunDegree: "" //超限程度
- };
- },
- components: {
- Head,
- EvEnergySavingRate,
- EvImplementationRate,
- EvSatisfactionRate,
- EvIndoorTemperature
- },
- mounted() {
- this.query();
- },
- methods: {
- formatter(date) {
- return moment.unix(date / 1000).format("YYYYMMDD");
- },
- query() {
- this.runDataQuryArr = [];
- runDataQury({}).then(res => {
- if (res.result == "success") {
- this.tindoorFillRate = res.tindoorFillRate; //室内温度满足率
- this.energySavingRate = res.energySavingRate; //节能率
- this.chillerExecuteRate = res.chillerExecuteRate; //略执行率
- this.energySaving = res.energySaving; //节能量
- this.isExecutedNum = res.isExecutedNum; //已执行数量
- this.allReceivedNum = res.allReceivedNum; //共收到数量
- this.tindoorOverrunDegree = res.tindoorOverrunDegree; //超限程度
- }
- });
- },
- daterangeLeft() {
- if (this.pickerVal2.length > 0) {
- let dateTime = new Date(this.pickerVal2[0]);
- let newData = this.formatter(
- new Date(dateTime.setDate(dateTime.getDate() - 1))
- );
- this.pickerVal2[0] =
- newData.slice(0, 4) +
- "." +
- newData.slice(4, 6) +
- "." +
- newData.slice(6, 8);
- this.pickerVal2 = [this.pickerVal2[0], this.pickerVal2[1]];
- }
- },
- daterangeRight() {
- if (this.pickerVal2.length > 0) {
- let dateTime = new Date(this.pickerVal2[1]);
- let newData = this.formatter(
- new Date(dateTime.setDate(dateTime.getDate() + 1))
- );
- this.pickerVal2[1] =
- newData.slice(0, 4) +
- "." +
- newData.slice(4, 6) +
- "." +
- newData.slice(6, 8);
- }
- this.pickerVal2 = [this.pickerVal2[0], this.pickerVal2[1]];
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .nav-right {
- height: 48px;
- position: fixed;
- right: 24px;
- top: 53px;
- z-index: 1;
- display: flex;
- align-items: center;
- .count-top-right {
- width: 254px;
- height: 32px;
- background: rgba(255, 255, 255, 1);
- border-radius: 4px;
- border: 1px solid rgba(195, 198, 203, 1);
- display: flex;
- align-items: center;
- .arrow-left {
- width: 16px;
- height: 16px;
- background: url("../../assets/left.png");
- margin-right: 5px;
- margin-left: 7px;
- cursor: pointer;
- }
- .arrow-right {
- margin-right: 7px;
- margin-left: 5px;
- width: 16px;
- height: 16px;
- background: url("../../assets/right.png");
- cursor: pointer;
- }
- .arrow-line {
- display: inline-block;
- width: 2px;
- height: 16px;
- background: rgba(228, 229, 231, 1);
- }
- .arrow-line1 {
- margin-right: 3.5px;
- }
- }
- }
- .evaluateContainer {
- padding: 0 24px;
- background: #fff;
- .ev-content {
- margin-top: 20px;
- display: flex;
- .ev-cont-div {
- padding: 16px 20px;
- background: rgba(248, 249, 250, 1);
- border-radius: 6px;
- border: 1px solid rgba(238, 238, 238, 1);
- margin-right: 12px;
- flex: 1;
- .ev-top {
- margin: 0;
- height: 24px;
- font-size: 16px;
- color: rgba(31, 36, 41, 1);
- line-height: 21px;
- }
- .ev-bottom {
- display: flex;
- align-items: center;
- p {
- margin: 0;
- }
- .ev-bottom-left {
- width: 124px;
- height: 124px;
- justify-content: flex-start;
- margin: 0;
- }
- .ev-bottom-right {
- p {
- font-size: 14px;
- color: rgba(100, 108, 115, 1);
- line-height: 19px;
- span {
- display: inline-block;
- }
- span:nth-of-type(1) {
- margin-right: 12px;
- }
- span:nth-of-type(2) {
- font-size: 18px;
- font-family: Persagy;
- color: rgba(32, 35, 42, 1);
- line-height: 22px;
- }
- span:nth-of-type(3) {
- font-size: 10px;
- }
- }
- p:nth-of-type(1) {
- margin-bottom: 10px;
- }
- }
- }
- }
- }
- .ev-footer {
- width: 100%;
- height: 430px;
- margin-top: 36px;
- }
- }
- </style>
- <style lang="scss">
- .count-top-right {
- .count-top-right .el-input__inner {
- margin: 7px 0;
- }
- .el-input__inner {
- width: 210px;
- margin: 7px 6px;
- height: 22px;
- line-height: 22px;
- font-size: 12px;
- border: none;
- }
- .el-input__icon {
- display: none;
- }
- .el-range-editor.el-input__inner {
- padding: 3px 0;
- }
- .el-input--prefix .el-input__inner {
- padding-left: 5px;
- }
- .el-input--suffix .el-input__inner {
- padding-right: 5px;
- }
- .el-date-editor .el-range-input {
- width: 45%;
- }
- .el-date-editor .el-range-separator {
- line-height: 18px;
- color: #8d9399;
- }
- .el-date-editor .el-range-input {
- color: #1f2329;
- }
- .el-date-editor .el-range-separator {
- padding: 0 15px;
- }
- .el-radio__label {
- height: 22px;
- font-size: 14px;
- font-family: MicrosoftYaHei;
- color: rgba(31, 36, 41, 1);
- line-height: 19px;
- padding-left: 5px;
- }
- .el-radio {
- margin-right: 20px !important;
- }
- }
- </style>
|