webpackJsonp([19],{

/***/ "2vAJ":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/map.js
var map = __webpack_require__("ifoU");
var map_default = /*#__PURE__*/__webpack_require__.n(map);

// EXTERNAL MODULE: ./node_modules/babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("Xxa5");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
var stringify = __webpack_require__("mvHQ");
var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("exGp");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./node_modules/moment/moment.js
var moment = __webpack_require__("PJh5");
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);

// EXTERNAL MODULE: ./src/api/index.js + 5 modules
var api = __webpack_require__("gyMJ");

// EXTERNAL MODULE: ./src/components/visualizcomponent/NumberGrow.vue + 2 modules
var NumberGrow = __webpack_require__("eVaK");

// EXTERNAL MODULE: ./node_modules/echarts/index.js
var echarts = __webpack_require__("XLwt");
var echarts_default = /*#__PURE__*/__webpack_require__.n(echarts);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/visualization/flatsIndex.vue




//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//





var xData = function () {
  var data = [];
  for (var i = 1; i < 13; i++) {
    data.push(i + '月');
  }
  return data;
}();

var isFunction = function isFunction(val) {
  return typeof val === 'function';
};
/* harmony default export */ var flatsIndex = ({
  name: "flatsIndex",
  data: function data() {
    return {
      leasesList: [],
      outroom: 0,
      Occupancyrate: 0,
      expirerate: 0,
      sumTotal: 0,
      colNumOne: 12,
      colNum: 8,
      middleChartExtendThree: {
        title: {
          text: '租金收入排行榜（¥）'
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        legend: {},
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        xAxis: {
          type: 'category',
          data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
          splitLine: {
            show: false
          }
        },
        yAxis: {
          type: 'value',
          splitLine: {
            show: false
          }
        },
        series: [{
          name: '公寓',
          type: 'line',
          // itemStyle: {
          //   color: '#4CAF50'
          // },
          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          markPoint: {
            data: [{ type: 'max', name: 'Max' }, { type: 'min', name: 'Min' }]
          },
          itemStyle: {
            color: '	#87CEEB'
          },
          smooth: true,
          areaStyle: {
            color: new echarts_default.a.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#87CEEB'
            }, {
              offset: 1,
              color: 'rgba(255, 255, 255)'
            }])
          }
        }, {
          name: '房源',
          type: 'line',
          // itemStyle: {
          //   color: '#4CAF50'
          // },
          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          markPoint: {
            data: [{ type: 'max', name: 'Max' }, { type: 'min', name: 'Min' }]
          },
          smooth: true,
          itemStyle: {
            color: '	#e54857'
          },
          areaStyle: {
            color: new echarts_default.a.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#e54857'
            }, {
              offset: 1,
              color: 'rgba(255, 255, 255)'
            }])
          }
        }, {
          name: '平山村',
          type: 'line',
          // itemStyle: {
          //   color: '#4CAF50'
          // },
          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          markPoint: {
            data: [{ type: 'max', name: 'Max' }, { type: 'min', name: 'Min' }]
          },
          smooth: true,
          itemStyle: {
            color: '	#FFD700'
          },
          areaStyle: {
            color: new echarts_default.a.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#FFD700'
            }, {
              offset: 1,
              color: 'rgba(255, 255, 255)'
            }])
          }
        }]
      },
      // middleChartExtendTwo: {
      //   title: {
      //     text: '租金收入分析'
      //   },
      //   tooltip: {
      //     trigger: 'axis',
      //     axisPointer: {
      //       type: 'cross',
      //       crossStyle: {
      //         color: '#999'
      //       }
      //     }
      //   },
      //   toolbox: {
      //     feature: {
      //       magicType: { show: true, type: ['line', 'bar'] },
      //       restore: { show: true }
      //     }
      //   },
      //   legend: {},
      //   xAxis: [
      //     {
      //       type: 'category',
      //       data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
      //       axisPointer: {
      //         type: 'shadow'
      //       },
      //       splitLine: {
      //         show: false
      //       }
      //     }
      //   ],
      //   yAxis: [
      //     {
      //       type: 'value',
      //       splitLine: {
      //         show: false
      //       }
      //     }
      //   ],
      //   series: [
      //     {
      //       name: '已收',
      //       type: 'bar',
      //       data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
      //     },
      //     {
      //       name: '未收',
      //       type: 'bar',
      //       data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
      //     }
      //   ]
      // },

      middleChartExtendOne: {
        title: {
          text: '楼栋入住率排行榜（%）'
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        legend: {},
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        xAxis: {
          type: 'value',
          boundaryGap: [0, 0.01],
          splitLine: {
            show: false
          }
        },
        yAxis: {
          type: 'category',
          data: [],
          splitLine: {
            show: false
          }
        },
        series: [{
          name: '入住率',
          type: 'bar',
          itemStyle: {
            color: new echarts_default.a.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#83bff6' }, { offset: 0.5, color: '#188df0' }, { offset: 1, color: '#188df0' }])
          },
          data: []
        }]
      },
      middleChartExtend: {
        title: {
          x: '10',
          top: '10',
          text: '房间入住分析',
          textStyle: {
            color: '#333',
            fontSize: '22'
          },
          subtextStyle: {
            color: '#90979c',
            fontSize: '16'
          }
        },
        tooltip: {
          trigger: 'axis'
        },
        toolbox: {
          feature: {
            magicType: { show: true, type: ['line', 'bar'] },
            restore: { show: true }
          }
        },
        legend: {},
        xAxis: [{
          type: 'category',
          data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
          axisPointer: {
            type: 'shadow'
          }
        }],
        yAxis: [{
          type: 'value',
          splitLine: {
            show: false
          }
        }],
        series: [{
          name: '已入住',
          type: 'bar',
          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          itemStyle: {
            color: '#00FA9A'
          }
        }, {
          name: '未入住',
          type: 'bar',
          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          itemStyle: {
            color: '#1E90FF'
          }
        }, {
          name: '总计',
          type: 'line',
          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          itemStyle: {
            color: '#FFD700'
          }
        }]
      },

      options: {},
      colors: [{ color: '#01bd8d', percentage: 99 }, { color: '#da0051', percentage: 1 }],
      cdata: {
        xData: ["电量(0-20%)", "电量(20-40%)", "电量(40-60%)", "电量(60-80%)", "电量(80-100%)"],
        seriesData: [{ value: 0, name: "电量(0-20%)" }, { value: 0, name: "电量(20-40%)" }, { value: 0, name: "电量(40-60%)" }, { value: 0, name: "电量(60-80%)" }, { value: 0, name: "电量(80-100%)" }]
      },
      collectUS: {},
      sumRoom: 0,
      roomInArrears: 0,
      occupied: 0,
      sumProjects: 0,
      sumOpenlock: 0,
      sumCard: 0,
      todayOpen: 0,
      statisticsDate: {
        seriesData: {
          openTotal: 0,
          closeTotal: 0,
          abnormalTotal: 0,
          offlineTotal: 0,
          onlineTotal: 0,
          isAppBind: 0,
          batteryLevel1: 0
        }
      },
      alertTotal: 0,
      showDom: true,
      timer: null,
      leasesStaticList: [],
      middleChartExtendOneShow: true,
      commonStatisticsList: [],
      statisticsDateDefault: {
        "cdata": ["0", "0", "0", "0", "0"],
        "seriesData": {
          "abnormalTotal": 0,
          "batteryLevel1": 0,
          "batteryLevel2": 0,
          "batteryLevel3": 0,
          "batteryLevel4": 0,
          "batteryLevel5": 0,
          "closeTotal": 0,
          "offlineTotal": 0,
          "onlineTotal": 0,
          "openTotal": 0,
          "projects": 0,
          "total": 0
        },
        "collectUS": {
          "card300": 0,
          "site200": 0,
          "card200": 0,
          "userCount": 0,
          "site300": 0,
          "lock300": 0,
          "site400": 0,
          "lock200": 0,
          "houseSensor400": 0
        },
        "collectOpenLock": {
          "week300": [{
            "count": 0,
            "order": "2022-05-15"
          }, {
            "count": 0,
            "order": "2022-05-16"
          }, {
            "count": 0,
            "order": "2022-05-17"
          }, {
            "count": 0,
            "order": "2022-05-18"
          }, {
            "count": 0,
            "order": "2022-05-19"
          }, {
            "count": 0,
            "order": "2022-05-20"
          }, {
            "count": 0,
            "order": "2022-05-21"
          }, {
            "count": 0,
            "order": "2022-05-22"
          }, {
            "count": 0,
            "order": "2022-05-23"
          }, {
            "count": 0,
            "order": "2022-05-24"
          }, {
            "count": 0,
            "order": "2022-05-25"
          }, {
            "count": 0,
            "order": "2022-05-26"
          }],
          "week200": [{
            "count": 0,
            "order": "2022-05-19"
          }, {
            "count": 0,
            "order": "2022-05-20"
          }, {
            "count": 0,
            "order": "2022-05-21"
          }, {
            "count": 0,
            "order": "2022-05-22"
          }, {
            "count": 0,
            "order": "2022-05-23"
          }, {
            "count": 0,
            "order": "2022-05-24"
          }, {
            "count": 0,
            "order": "2022-05-25"
          }, {
            "count": 0,
            "order": "2022-05-26"
          }],
          "allCount300": 0,
          "allCount200": 0
        },
        "weekopenlock": [{
          "order": "2022-05-19",
          "count": 0
        }, {
          "order": "2022-05-20",
          "count": 0
        }, {
          "order": "2022-05-21",
          "count": 0
        }, {
          "order": "2022-05-22",
          "count": 0
        }, {
          "order": "2022-05-23",
          "count": 0
        }, {
          "order": "2022-05-24",
          "count": 0
        }, {
          "order": "2022-05-25",
          "count": 0
        }, {
          "order": "2022-05-26",
          "count": 0
        }],
        "addDeviceWeek": [{
          "order": "2022/05/20",
          "count": 0
        }, {
          "order": "2022/05/21",
          "count": 0
        }, {
          "order": "2022/05/22",
          "count": 0
        }, {
          "order": "2022/05/23",
          "count": 0
        }, {
          "order": "2022/05/24",
          "count": 0
        }, {
          "order": "2022/05/25",
          "count": 0
        }, {
          "order": "2022-05-26",
          "count": 0
        }]
      }
    };
  },

  components: {
    NumberGrow: NumberGrow["a" /* default */]
  },
  beforeCreate: function beforeCreate() {
    this.$store.commit('settenantid');
  },
  created: function created() {
    var _this2 = this;

    return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
      var data, statisticsDate, key, i, t, l, p, q;
      return regenerator_default.a.wrap(function _callee2$(_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              Object(api["d" /* httpGet */])('', _this2.$api.getCommunityrentStatistics).then(function (res) {});
              _this2.$store.commit('setUser1');
              if (!localStorage.getItem('statisticsDate')) {
                data = _this2.statisticsDateDefault;

                localStorage.setItem('statisticsDate', stringify_default()(data));
                _this2.reload();
              }
              statisticsDate = JSON.parse(localStorage.getItem('statisticsDate'));

              _this2.statisticsDate = statisticsDate;
              _this2.statisticsDate.abnormalTotal = _this2.statisticsDate.seriesData.abnormalTotal || 0;
              _this2.statisticsDate.offlineTotal = _this2.statisticsDate.seriesData.offlineTotal || 0;
              _this2.statisticsDate.onlineTotal = _this2.statisticsDate.seriesData.onlineTotal || 0;
              _this2.statisticsDate.isAppBind = _this2.statisticsDate.seriesData.isAppBind || 0;
              _this2.statisticsDate.batteryLevel1 = _this2.statisticsDate.seriesData.batteryLevel1 || 0;
              _this2.collectUS = statisticsDate.collectUS;
              _this2.sumProjects = statisticsDate.seriesData.projects;
              for (key in statisticsDate.collectOpenLock) {
                i = key.indexOf('allCount');

                if (i != -1) {
                  _this2.sumOpenlock += statisticsDate.collectOpenLock[key];
                }
              }
              for (t in statisticsDate.collectUS) {
                l = t.indexOf('card');

                if (l != -1) {
                  _this2.sumCard += statisticsDate.collectUS[t];
                }
                p = t.indexOf('site');

                if (p != -1) {
                  _this2.sumRoom += statisticsDate.collectUS[t];
                }
                q = t.indexOf('lock');

                if (q != -1) {
                  _this2.alertTotal += statisticsDate.collectUS[t];
                }
              }
              Object(api["d" /* httpGet */])('', _this2.$api.getCommonStatistics).then(function () {
                var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(res) {
                  var list, occupied, roomInArrears;
                  return regenerator_default.a.wrap(function _callee$(_context) {
                    while (1) {
                      switch (_context.prev = _context.next) {
                        case 0:
                          console.log(res);

                          if (!res.success) {
                            _context.next = 17;
                            break;
                          }

                          list = res.data;
                          occupied = 0, roomInArrears = 0;

                          list.map(function (li) {
                            if (li.status === 0) {
                              li.lable = '待签约';
                            } else if (li.status === 1) {
                              li.lable = '已签约';
                              occupied += li.total;
                            } else if (li.status === 2) {
                              li.lable = '已欠费';
                              roomInArrears += li.total;
                            } else if (li.status === 3) {
                              li.lable = '已退租';
                              _this2.outroom += li.total;
                            } else if (li.status === 4) {
                              li.lable = '已删除';
                            } else {
                              li.lable = '';
                            }
                          });
                          _this2.commonStatisticsList = JSON.parse(stringify_default()(list));
                          _this2.occupied = occupied;
                          _this2.Occupancyrate = Number((_this2.occupied / _this2.sumRoom).toFixed(2));
                          _this2.roomInArrears = roomInArrears;
                          _this2.expirerate = Number(((_this2.sumRoom - _this2.occupied - _this2.roomInArrears - _this2.outroom) / _this2.sumRoom).toFixed(2));
                          _context.next = 12;
                          return _this2.processingStatics(list, 'status');

                        case 12:
                          _this2.leasesStaticList = _context.sent;
                          _context.next = 15;
                          return _this2.getRoomOccupancy();

                        case 15:
                          _context.next = 17;
                          return _this2.getSumTotal();

                        case 17:
                        case "end":
                          return _context.stop();
                      }
                    }
                  }, _callee, _this2);
                }));

                return function (_x) {
                  return _ref.apply(this, arguments);
                };
              }());
              if (statisticsDate.weekopenlock[statisticsDate.weekopenlock.length - 1]) {
                _this2.todayOpen = statisticsDate.weekopenlock[statisticsDate.weekopenlock.length - 1].count;
              }
              if (document.documentElement.clientWidth < 1080) {
                _this2.colNumOne = 24;
                _this2.colNum = 24;
              } else {
                _this2.colNumOne = 12;
                _this2.colNum = 8;
              }

            case 17:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2, _this2);
    }))();
  },
  mounted: function mounted() {
    var _this3 = this;

    this.$store.commit('getSumTotal');
    setTimeout(function () {
      _this3.sumTotal = _this3.$store.state.sumTotal;
    }, 500);
    window.onresize = function () {
      return function () {
        if (document.documentElement.clientWidth < 1080) {
          _this3.colNumOne = 24;
          _this3.colNum = 24;
        } else {
          _this3.colNumOne = 12;
          _this3.colNum = 8;
        }
      }();
    };
    var data = {
      "orderBy": "create_time desc",
      "q": stringify_default()({
        status: '1'
      })
    };
    Object(api["g" /* httpPost */])(data, this.$api.postLeasesList).then(function (res) {
      if (res.success) {
        res.data.list.map(function (li) {
          li.signingTime = moment_default()().format("YYYY-MM-DD HH:mm:ss");
        });
        _this3.leasesList = res.data.list;
      }
    });
  },

  methods: {
    // 获取所有收入
    getSumTotal: function getSumTotal() {
      var _this4 = this;

      var date = new Date();
      var year = date.getFullYear();
      var month = date.getMonth() + 1;
      // httpGet('', this.$api.getTotalRevenue).then(res => {
      //   if (res.success) {
      //     this.sumTotal = res.data / 100
      //   }
      // })
      Object(api["d" /* httpGet */])('', this.$api.getStatisticsByMonth + year).then(function (res) {
        if (res.success) {
          var middleChartExtend = _this4.middleChartExtend;
          var arr = new Array(0).fill(_this4.sumRoom);
          middleChartExtend.series[2].data = arr;
          res.data.leases.map(function (li) {
            middleChartExtend.series[0].data[li.order] = li.count;
          });
          res.data.site.map(function (li) {
            middleChartExtend.series[2].data[li.order] = li.count;
          });
          arr.map(function (li, index) {
            middleChartExtend.series[1].data[index] = middleChartExtend.series[2].data[index] - middleChartExtend.series[0].data[index];
          });
          var myMiddleChartObj = _this4.$echarts.init(document.getElementById("myMiddleChart"));
          myMiddleChartObj.setOption(middleChartExtend, true);
        }
      });
      // httpGet('', this.$api.getRevenueByMonth + year).then(res => {
      //   console.log(res)
      //   if (res.success) {
      //     let list = this.mergeMethods(res.data,['count','order'])
      //     let middleChartExtendTwo = this.middleChartExtendTwo
      //     res.data.map(li => {
      //       if (li.code == 1) {
      //         middleChartExtendTwo.series[0].data[li.order] = li.count
      //       } else if (li.code == 2) {
      //         middleChartExtendTwo.series[1].data[li.order] = li.count
      //       }
      //     })
      //     this.middleChartExtendTwo = middleChartExtendTwo
      //     let myMiddleChartObjTwo = this.$echarts.init(
      //       document.getElementById("myMiddleChartTwo")
      //     );
      //     // myMiddleChartObjTwo.on('updateAxisPointer', function (event) {
      //     //   const xAxisInfo = event.axesInfo[0];
      //     //   if (xAxisInfo) {
      //     //     const dimension = xAxisInfo.value + 1;
      //     //     myMiddleChartObjTwo.setOption({
      //     //       series: {
      //     //         id: 'pie',
      //     //         label: {
      //     //           formatter: '{b}: {@[' + dimension + ']} ({d}%)'
      //     //         },
      //     //         encode: {
      //     //           value: dimension,
      //     //           tooltip: dimension
      //     //         }
      //     //       }
      //     //     });
      //     //   }
      //     // })
      //     myMiddleChartObjTwo.setOption(middleChartExtendTwo, true);
      //   }
      // })
      Object(api["d" /* httpGet */])('', this.$api.getStatisticsRevenueTop).then(function (res) {
        if (res.success) {
          var listQuarters = [],
              middleChartExtendThree = _this4.middleChartExtendThree;
          // res.data.map(li => {
          //   if (li.month == month) {
          //     listQuarters.push(li)
          //   }
          // })
          // let listSort = listQuarters.sort((pre, cur) => pre.rent - cur.rent)
          // listSort.map(li => {
          res.data.map(function (li) {
            middleChartExtendThree.series.map(function (li2) {
              if (li.name == li2.name) {
                li2.data[li.month - 1] = li.rent;
              }
            });
            // middleChartExtendThree.yAxis.data.push(li.name)
            // middleChartExtendThree.series[0].data.push(li.rent)
          });
          var myMiddleChartObjThree = _this4.$echarts.init(document.getElementById("myMiddleChartThree"));
          myMiddleChartObjThree.setOption(middleChartExtendThree, true);
        }
      });
    },
    uniqueFunc: function uniqueFunc(arr, uniId) {
      var res = new map_default.a();
      return arr.filter(function (item) {
        return !res.has(item[uniId]) && res.set(item[uniId], 1);
      });
    },

    // 统计处理
    processingStatics: function processingStatics(list, key) {
      var _this5 = this;

      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
        var result;
        return regenerator_default.a.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                result = _this5.uniqueFunc(list, key);

                result.map(function (li, index) {
                  var data = list.filter(function (item) {
                    return item.status == li.status;
                  });
                  if (data.length > 0) {
                    var sum = data.reduce(function (prev, curr, idx, arr) {
                      return prev.total + curr.total;
                    });
                    if (typeof sum == 'number') {
                      li.total = sum;
                    }
                  }
                });
                return _context3.abrupt("return", result);

              case 3:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3, _this5);
      }))();
    },

    // 获取社区入住率
    getRoomOccupancy: function getRoomOccupancy() {
      var _this6 = this;

      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee6() {
        var _this, commonStatisticsList, result;

        return regenerator_default.a.wrap(function _callee6$(_context6) {
          while (1) {
            switch (_context6.prev = _context6.next) {
              case 0:
                _this = _this6;
                commonStatisticsList = _this6.commonStatisticsList;
                result = [];

                Object(api["d" /* httpGet */])('', _this6.$api.getRoomStatistics).then(function () {
                  var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee5(res) {
                    var roomList, percentage, middleChartExtendOne, myMiddleChartObjOne;
                    return regenerator_default.a.wrap(function _callee5$(_context5) {
                      while (1) {
                        switch (_context5.prev = _context5.next) {
                          case 0:
                            if (res.code === 200) {
                              roomList = [], percentage = [];

                              res.data.map(function () {
                                var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee4(li) {
                                  var arr, sum, jg;
                                  return regenerator_default.a.wrap(function _callee4$(_context4) {
                                    while (1) {
                                      switch (_context4.prev = _context4.next) {
                                        case 0:
                                          roomList.push(li.name);
                                          arr = commonStatisticsList.filter(function (item) {
                                            return item.status == 1 && item.name == li.name;
                                          });

                                          if (arr && arr.length > 0) {
                                            sum = arr.reduce(function (prev, item) {
                                              prev += item.total * 1;
                                              return prev;
                                            }, 0);
                                            jg = Number((parseInt(sum) / parseInt(li.total) * 100).toFixed(2));

                                            percentage.push(jg);
                                          } else {
                                            percentage.push(0);
                                          }

                                        case 3:
                                        case "end":
                                          return _context4.stop();
                                      }
                                    }
                                  }, _callee4, _this6);
                                }));

                                return function (_x3) {
                                  return _ref3.apply(this, arguments);
                                };
                              }());
                              middleChartExtendOne = _this6.middleChartExtendOne;

                              middleChartExtendOne.yAxis.data = roomList;
                              middleChartExtendOne.series[0].data = percentage;
                              _this6.middleChartExtendOne = middleChartExtendOne;
                              myMiddleChartObjOne = _this6.$echarts.init(document.getElementById("myMiddleChartOne"));

                              myMiddleChartObjOne.setOption(middleChartExtendOne, true);
                            }

                          case 1:
                          case "end":
                            return _context5.stop();
                        }
                      }
                    }, _callee5, _this6);
                  }));

                  return function (_x2) {
                    return _ref2.apply(this, arguments);
                  };
                }());

              case 4:
              case "end":
                return _context6.stop();
            }
          }
        }, _callee6, _this6);
      }))();
    },

    // 前往路由
    goToPage: function goToPage(url) {
      var lable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

      console.log(url, lable);
      if (lable == '已签约') {
        this.$router.push({
          name: url,
          params: {
            status: '1'
          }
        });
      } else if (lable == '已退租') {
        this.$router.push({
          name: url,
          params: {
            status: '3'
          }
        });
      } else if (lable == '在线数') {
        this.$router.push({
          name: url,
          params: {
            isOnline: '1'
          }
        });
      } else if (lable == '异常数') {
        this.$router.push({
          name: url,
          params: {
            isOnline: '2'
          }
        });
      } else if (lable == '低电数') {
        this.$router.push({
          name: url,
          params: {
            endBattery: '20'
          }
        });
      } else {
        this.$router.push(url);
      }
    }
  }
});
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-334fc069","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/visualization/flatsIndex.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"flatsIndex"},[_c('el-card',{attrs:{"shadow":"never"}},[_c('el-row',{attrs:{"gutter":20}},[_c('el-col',{staticClass:"mb-2",attrs:{"span":_vm.colNum}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{staticClass:"d-flex flex-wrap align-center justify-space-between"},[_c('img',{staticClass:"width-60-px mb-2",attrs:{"src":__webpack_require__("vCOv"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type"},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("总收入")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.sumTotal}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("元")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type"},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4",on:{"click":function($event){return _vm.goToPage('/userManagement')}}},[_vm._v("总人数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.sumCard}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("个")])],1)]),_vm._v(" "),_vm._l((_vm.leasesStaticList),function(item,index){return _c('div',{key:index,staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('agreement', item.lable)}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700",class:item.lable === '已签约' ? 'color-03A9F4' : 'color-FF3D00'},[_vm._v(_vm._s(item.lable))]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{class:item.lable === '已签约' ? 'color-03A9F4' : 'color-FF3D00',attrs:{"value":item.total}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("个")])],1)])})],2)])],1),_vm._v(" "),_c('el-col',{staticClass:"mb-2",attrs:{"span":_vm.colNum}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{staticClass:"d-flex flex-wrap align-center justify-space-between"},[_c('img',{staticClass:"width-60-px mb-2",attrs:{"src":__webpack_require__("fEqM"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('/room')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("总小区数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.sumProjects}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("个")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('/room')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("总房间数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.sumRoom}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("间")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('/room')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("已入住数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.occupied}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("间")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('/room')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-FF3D00"},[_vm._v("欠费房间")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-FF3D00",attrs:{"value":_vm.roomInArrears}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("间")])],1)])])])],1),_vm._v(" "),_c('el-col',{staticClass:"mb-2",attrs:{"span":_vm.colNum}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{staticClass:"d-flex flex-wrap align-center justify-space-between"},[_c('img',{staticClass:"width-60-px mb-2",attrs:{"src":__webpack_require__("S0Vh"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('/doorLock')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("总设备")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.statisticsDate.seriesData.total}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("个")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('doorLock', '异常数')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-FF3D00"},[_vm._v("异常数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-FF3D00",attrs:{"value":_vm.statisticsDate.seriesData.isAppBind}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("间")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type",on:{"click":function($event){return _vm.goToPage('doorLock', '低电数')}}},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-FF3D00"},[_vm._v("低电数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-FF3D00",attrs:{"value":_vm.statisticsDate.seriesData.batteryLevel1}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("间")])],1)]),_vm._v(" "),_c('div',{staticClass:"flexLi d-inlie-block text-center hand-type"},[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-FF3D00"},[_vm._v("到期设备")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-FF3D00",attrs:{"value":0}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("间")])],1)])])])],1)],1),_vm._v(" "),_c('el-row',{staticClass:"mt-4",attrs:{"gutter":20}},[_c('el-col',{staticClass:"mb-2",attrs:{"span":_vm.colNumOne}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{style:({ height: '400px', width: '100%' }),attrs:{"id":"myMiddleChart"}})])],1),_vm._v(" "),_c('el-col',{staticClass:"mb-2",attrs:{"span":_vm.colNumOne}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{style:({ height: '400px', width: '100%' }),attrs:{"id":"myMiddleChartThree"}})])],1),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNumOne}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{style:({ height: '400px', width: '100%' }),attrs:{"id":"myMiddleChartOne"}})])],1),_vm._v(" "),_c('el-col',{staticClass:"mb2",attrs:{"span":_vm.colNumOne}},[_c('el-card',{staticClass:"mb22",attrs:{"shadow":"never"}},[_c('div',{staticClass:"gail",style:({ height: '400px', width: '100%' })},[_c('div',{staticClass:"ruzhu"},[_c('div',{staticClass:"ruzhu-title"},[_vm._v("房间入住率")]),_vm._v(" "),_c('el-progress',{attrs:{"type":"circle","percentage":_vm.Occupancyrate,"color":"rgb(250, 142, 0)"}})],1),_vm._v(" "),_c('div',{staticClass:"ruzhu"},[_c('div',{staticClass:"ruzhu-title"},[_vm._v("房间过期率")]),_vm._v(" "),_c('el-progress',{attrs:{"type":"circle","percentage":_vm.expirerate,"color":"rgb(250, 142, 0)"}})],1)])]),_vm._v(" "),_c('el-card',{staticClass:"mb33",attrs:{"shadow":"never"}},[_c('div',{staticClass:"leaseslog",style:({ height: '400px', width: '100%' })},[_c('div',{staticClass:"leases-title"},[_c('i',{staticClass:"gongyu gy-qianyuequerenqianyuedianziqianyue"}),_vm._v("签约信息")]),_vm._v(" "),_c('div',{staticClass:"leases-list"},_vm._l((_vm.leasesList),function(item){return _c('div',{key:item.id,staticClass:"leases-item"},[_c('span',{staticClass:"leases-ruzhu"},[_vm._v(_vm._s(item.name)+" 签约成功")]),_vm._v(" "),_c('span',{staticClass:"leases-date"},[_vm._v(_vm._s(item.signingTime))])])}),0)])])],1)],1)],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var visualization_flatsIndex = (esExports);
// CONCATENATED MODULE: ./src/views/visualization/flatsIndex.vue
function injectStyle (ssrContext) {
  __webpack_require__("FIM/")
}
var normalizeComponent = __webpack_require__("VU/8")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-334fc069"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  flatsIndex,
  visualization_flatsIndex,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var views_visualization_flatsIndex = __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ "FIM/":
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ "S0Vh":
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),

/***/ "fEqM":
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjc4MzMwODExOTE5IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjUzMTkiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+PHBhdGggZD0iTTc2OCAwSDI1NkMxMTIuNjQgMCAwIDExMi42NCAwIDI1NnY1MTJjMCAxNDMuMzYgMTEyLjY0IDI1NiAyNTYgMjU2aDUxMmMxNDMuMzYgMCAyNTYtMTEyLjY0IDI1Ni0yNTZWMjU2YzAtMTQzLjM2LTExMi42NC0yNTYtMjU2LTI1NnpNMzU4LjQgMzU4LjRjMzAuNzIgMCA1MS4yIDIwLjQ4IDUxLjIgNTEuMnMtMjAuNDggNTEuMi01MS4yIDUxLjItNTEuMi0yMC40OC01MS4yLTUxLjIgMjAuNDgtNTEuMiA1MS4yLTUxLjJ6IG01MTIgMzU4LjRjMCAzMC43Mi0yMC40OCA1MS4yLTUxLjIgNTEuMnMtNTEuMi0yMC40OC01MS4yLTUxLjJ2LTUxLjJIMjU2djUxLjJjMCAzMC43Mi0yMC40OCA1MS4yLTUxLjIgNTEuMnMtNTEuMi0yMC40OC01MS4yLTUxLjJWMzA3LjJjMC0zMC43MiAyMC40OC01MS4yIDUxLjItNTEuMnM1MS4yIDIwLjQ4IDUxLjIgNTEuMnYyNTZoNTYzLjJjMzAuNzIgMCA1MS4yIDIwLjQ4IDUxLjIgNTEuMnYxMDIuNHogbS00MDkuNi0yMDQuOHMyNS42LTE1My42IDEwMi40LTE1My42YzIwOS45MiAwIDMwNy4yIDE1My42IDMwNy4yIDE1My42SDQ2MC44eiIgZmlsbD0iI2E3OGRkNiIgcC1pZD0iNTMyMCI+PC9wYXRoPjwvc3ZnPg=="

/***/ }),

/***/ "vCOv":
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ })

});