|
@@ -63,7 +63,7 @@
|
|
|
<span class="title-btn" :style="off_line_warning ? 'background-color: #3965FF;color:#ffffff' : ''"
|
|
<span class="title-btn" :style="off_line_warning ? 'background-color: #3965FF;color:#ffffff' : ''"
|
|
|
@click="off_line_warning_handle">离线预警</span>
|
|
@click="off_line_warning_handle">离线预警</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-table :data="yujing_tableData" height="350" stripe :cell-style="cell_style" v-loading="airTimeoutWarning_loading"
|
|
|
|
|
|
|
+ <el-table :data="caoshi_yujing_tableData" height="350" stripe :cell-style="cell_style" v-loading="caoshi_yujing_PageParam_loading"
|
|
|
:header-cell-style="header_cell_style" v-if="time_out_warning" style="width: 100%">
|
|
:header-cell-style="header_cell_style" v-if="time_out_warning" style="width: 100%">
|
|
|
<el-table-column prop="deviceId" label="设备号" align="center"> </el-table-column>
|
|
<el-table-column prop="deviceId" label="设备号" align="center"> </el-table-column>
|
|
|
<el-table-column prop="warningTime" label="告警时间" align="center"> </el-table-column>
|
|
<el-table-column prop="warningTime" label="告警时间" align="center"> </el-table-column>
|
|
@@ -71,14 +71,22 @@
|
|
|
<el-table-column prop="contact" label="联系方式" align="center"> </el-table-column>
|
|
<el-table-column prop="contact" label="联系方式" align="center"> </el-table-column>
|
|
|
<el-table-column prop="operator" label="操作人" align="center"> </el-table-column>
|
|
<el-table-column prop="operator" label="操作人" align="center"> </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- <el-table :data="yujing_tableData" height="350" stripe :cell-style="cell_style" v-loading="airTimeoutWarning_loading"
|
|
|
|
|
|
|
+ <el-pagination class="dialog-page" @current-change="caoshi_yujing_HandleCurrentChange" v-if="time_out_warning"
|
|
|
|
|
+ :current-page.sync="caoshi_yujing_PageParam.currentPage" :page-size="caoshi_yujing_PageParam.pageSize"
|
|
|
|
|
+ layout="prev, pager, next, jumper" :total="caoshi_yujing_PageParam.total">
|
|
|
|
|
+ </el-pagination>
|
|
|
|
|
+ <el-table :data="lixian_yujing_tableData" height="350" stripe :cell-style="cell_style" v-loading="lixian_yujing_loading"
|
|
|
:header-cell-style="header_cell_style" v-if="off_line_warning" style="width: 100%">
|
|
:header-cell-style="header_cell_style" v-if="off_line_warning" style="width: 100%">
|
|
|
- <el-table-column prop="deviceId" label="空调设备" align="center"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="room" label="房间号" align="center"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="floor" label="楼层" align="center"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="drom" label="楼栋" align="center"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="warningTime" label="告警时间" align="center"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="air_name" label="空调设备" align="center" width="100"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="dom" label="房间号" align="center"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="floors" label="楼层" align="center" width="80"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="build" label="楼栋" align="center"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="time" label="告警时间" align="center" width="200"> </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
+ <el-pagination class="dialog-page" @current-change="lixian_yujing_HandleCurrentChange" v-if="off_line_warning"
|
|
|
|
|
+ :current-page.sync="lixian_yujing_PageParam.currentPage" :page-size="lixian_yujing_PageParam.pageSize"
|
|
|
|
|
+ layout="prev, pager, next, jumper" :total="lixian_yujing_PageParam.total">
|
|
|
|
|
+ </el-pagination>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -93,24 +101,26 @@
|
|
|
<img src="../../icons/images/index/yewu.png" alt="">
|
|
<img src="../../icons/images/index/yewu.png" alt="">
|
|
|
<span>办公室能耗排名top10</span>
|
|
<span>办公室能耗排名top10</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <span class="card-desc pointer" @click="dialogTableVisible = true">查看更多>></span>
|
|
|
|
|
- <el-dialog title="办公室能耗排名" :visible.sync="dialogTableVisible" width="530px" :close-on-click-modal="false">
|
|
|
|
|
- <el-table :data="gridData" height="540">
|
|
|
|
|
- <el-table-column property="date" label="房间号" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column property="name" label="能耗KWH" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column property="address" label="排名" align="center"></el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <el-pagination class="dialog-page" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage3"
|
|
|
|
|
- :page-size="10" layout="prev, pager, next, jumper" :total="1000">
|
|
|
|
|
- </el-pagination>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ <span class="card-desc pointer" @click="click_view_more">查看更多>></span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-table :data="yewu_tableData" height="490" stripe :cell-style="handle_cell_style" :header-cell-style="header_cell_style"
|
|
|
|
|
- v-loading="realTimeBusinessInformation_loading" style="width: 100%" :show-header="true">
|
|
|
|
|
- <el-table-column prop="desc" label="房间号" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="desc" label="能耗KWH" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="desc" label="排名" align="center"></el-table-column>
|
|
|
|
|
|
|
+ <el-table :data="yewu_tableData" height="530" stripe :cell-style="handle_cell_style" :header-cell-style="header_cell_style"
|
|
|
|
|
+ v-loading="officeEnergyConsumptionRanking_loading" style="width: 100%" :show-header="true">
|
|
|
|
|
+ <el-table-column label="房间号" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{scope.row.dom}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="能耗KWH" align="center" width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{scope.row.account}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="排名" align="center" width="80">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{scope.row.num}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
@@ -129,7 +139,7 @@
|
|
|
<div class="card-desc">A/B=已开机/总设备</div>
|
|
<div class="card-desc">A/B=已开机/总设备</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-table :data="zhuangtai_tableData" height="490" stripe :cell-style="cell_style" :header-cell-style="header_cell_style"
|
|
|
|
|
|
|
+ <el-table :data="zhuangtai_tableData" height="530" stripe :cell-style="cell_style" :header-cell-style="header_cell_style"
|
|
|
style="width: 100%" v-loading="airRealTimeMonitor_loading">
|
|
style="width: 100%" v-loading="airRealTimeMonitor_loading">
|
|
|
<el-table-column v-for="col in cols" :prop="col.prop" :label="col.label" :align="col.align" :width="col.width">
|
|
<el-table-column v-for="col in cols" :prop="col.prop" :label="col.label" :align="col.align" :width="col.width">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -138,6 +148,28 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+ <el-dialog title="办公室能耗排名" :visible.sync="dialogTableVisible" width="600px" :close-on-click-modal="false">
|
|
|
|
|
+ <el-table :data="yewu_tableData_page" height="540">
|
|
|
|
|
+ <el-table-column label="房间号" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{scope.row.dom}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="能耗KWH" align="center" width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{scope.row.account}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="排名" align="center" width="80">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{scope.row.num}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <el-pagination class="dialog-page" @current-change="officeEnergyHandleCurrentChange" :current-page.sync="officeEnergy.currentPage"
|
|
|
|
|
+ :page-size="officeEnergy.pageSize" layout="prev, pager, next, jumper" :total="officeEnergy.total">
|
|
|
|
|
+ </el-pagination>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -147,8 +179,10 @@
|
|
|
thisMonthRecharge,
|
|
thisMonthRecharge,
|
|
|
thisMonthConsume,
|
|
thisMonthConsume,
|
|
|
airTimeoutWarning,
|
|
airTimeoutWarning,
|
|
|
|
|
+ offlineTimeoutWarning,
|
|
|
getChart,
|
|
getChart,
|
|
|
airRealTimeMonitor,
|
|
airRealTimeMonitor,
|
|
|
|
|
+ officeEnergyConsumptionRanking,
|
|
|
realTimeBusinessInformation
|
|
realTimeBusinessInformation
|
|
|
} from '@/api/index';
|
|
} from '@/api/index';
|
|
|
|
|
|
|
@@ -175,62 +209,27 @@
|
|
|
TitleComponent, ToolboxComponent, TooltipComponent, GridComponent, LegendComponent, LineChart,
|
|
TitleComponent, ToolboxComponent, TooltipComponent, GridComponent, LegendComponent, LineChart,
|
|
|
CanvasRenderer
|
|
CanvasRenderer
|
|
|
]);
|
|
]);
|
|
|
- var getAirRealTimeMonitor, getRealTimeBusinessInformation;
|
|
|
|
|
|
|
+ var getAirRealTimeMonitor, getOfficeEnergyConsumptionRanking;
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ officeEnergy: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ caoshi_yujing_PageParam: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageSize: 6,
|
|
|
|
|
+ total: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ lixian_yujing_PageParam: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageSize: 6,
|
|
|
|
|
+ total: 0
|
|
|
|
|
+ },
|
|
|
// 弹出框表格
|
|
// 弹出框表格
|
|
|
dialogTableVisible: false,
|
|
dialogTableVisible: false,
|
|
|
- // 弹出框表格
|
|
|
|
|
- gridData: [{
|
|
|
|
|
- date: '2016-05-02',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-04',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-01',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-03',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-02',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-04',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-01',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-03',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-02',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-04',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-01',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }, {
|
|
|
|
|
- date: '2016-05-03',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '1518'
|
|
|
|
|
- }],
|
|
|
|
|
// 账户总余额
|
|
// 账户总余额
|
|
|
showTotalMoney: {
|
|
showTotalMoney: {
|
|
|
time: '0000/00/00 00:00:00',
|
|
time: '0000/00/00 00:00:00',
|
|
@@ -252,11 +251,12 @@
|
|
|
loading: false
|
|
loading: false
|
|
|
},
|
|
},
|
|
|
// 空调超时预警loading
|
|
// 空调超时预警loading
|
|
|
- airTimeoutWarning_loading: false,
|
|
|
|
|
|
|
+ caoshi_yujing_PageParam_loading: false,
|
|
|
|
|
+ lixian_yujing_loading: false,
|
|
|
// 空调实时监控loading
|
|
// 空调实时监控loading
|
|
|
airRealTimeMonitor_loading: false,
|
|
airRealTimeMonitor_loading: false,
|
|
|
// 实时业务信息,获取充值记录loading
|
|
// 实时业务信息,获取充值记录loading
|
|
|
- realTimeBusinessInformation_loading: true,
|
|
|
|
|
|
|
+ officeEnergyConsumptionRanking_loading: true,
|
|
|
// 选择年份范围
|
|
// 选择年份范围
|
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
disabledDate(time) {
|
|
@@ -269,7 +269,7 @@
|
|
|
// 表格单元格样式
|
|
// 表格单元格样式
|
|
|
cell_style: {
|
|
cell_style: {
|
|
|
color: '#1A202B',
|
|
color: '#1A202B',
|
|
|
- 'font-size': '16px',
|
|
|
|
|
|
|
+ 'font-size': '14px',
|
|
|
'font-family': 'Microsoft YaHei-3970(82674968)'
|
|
'font-family': 'Microsoft YaHei-3970(82674968)'
|
|
|
},
|
|
},
|
|
|
// 表格头部样式
|
|
// 表格头部样式
|
|
@@ -279,10 +279,14 @@
|
|
|
'font-size': '16px',
|
|
'font-size': '16px',
|
|
|
'font-family': 'Microsoft YaHei-3970(82674968)'
|
|
'font-family': 'Microsoft YaHei-3970(82674968)'
|
|
|
},
|
|
},
|
|
|
- // 预警表格数据
|
|
|
|
|
- yujing_tableData: [],
|
|
|
|
|
- // 业务表格数据
|
|
|
|
|
|
|
+ // 超时预警表格数据
|
|
|
|
|
+ caoshi_yujing_tableData: [],
|
|
|
|
|
+ // 离线预警表格数据
|
|
|
|
|
+ lixian_yujing_tableData: [],
|
|
|
|
|
+ // 耗能表格数据
|
|
|
yewu_tableData: [],
|
|
yewu_tableData: [],
|
|
|
|
|
+ // 耗能分页数据
|
|
|
|
|
+ yewu_tableData_page: [],
|
|
|
// 状态表格数据
|
|
// 状态表格数据
|
|
|
zhuangtai_tableData: [],
|
|
zhuangtai_tableData: [],
|
|
|
air_on_total: 0,
|
|
air_on_total: 0,
|
|
@@ -331,74 +335,121 @@
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// 获取总金额
|
|
// 获取总金额
|
|
|
- this.getTotalMoney()
|
|
|
|
|
|
|
+ this.getTotalMoney();
|
|
|
// 本月充值
|
|
// 本月充值
|
|
|
- this.getThisMonthRecharge()
|
|
|
|
|
|
|
+ this.getThisMonthRecharge();
|
|
|
// 本月消费
|
|
// 本月消费
|
|
|
- this.getThisMonthConsume()
|
|
|
|
|
|
|
+ this.getThisMonthConsume();
|
|
|
// 空调超时预警
|
|
// 空调超时预警
|
|
|
- this.getAirTimeoutWarning()
|
|
|
|
|
|
|
+ this.getAirTimeoutWarning();
|
|
|
|
|
+ // 离线预警
|
|
|
|
|
+ this.getOfflineTimeoutWarning();
|
|
|
// 用电消费走势图
|
|
// 用电消费走势图
|
|
|
- this.getChart()
|
|
|
|
|
|
|
+ this.getChart();
|
|
|
// 空调实时监控
|
|
// 空调实时监控
|
|
|
- this.getAirRealTimeMonitor()
|
|
|
|
|
|
|
+ this.getAirRealTimeMonitor();
|
|
|
getAirRealTimeMonitor = setInterval(() => {
|
|
getAirRealTimeMonitor = setInterval(() => {
|
|
|
- this.getAirRealTimeMonitor()
|
|
|
|
|
|
|
+ this.getAirRealTimeMonitor();
|
|
|
}, 1000 * 60);
|
|
}, 1000 * 60);
|
|
|
- // 实时业务信息,获取充值记录
|
|
|
|
|
- this.getRealTimeBusinessInformation()
|
|
|
|
|
- getRealTimeBusinessInformation = setInterval(() => {
|
|
|
|
|
- this.getRealTimeBusinessInformation()
|
|
|
|
|
|
|
+ // 办公室能耗排名分页数据
|
|
|
|
|
+ this.getOfficeEnergyConsumptionRanking();
|
|
|
|
|
+ getOfficeEnergyConsumptionRanking = setInterval(() => {
|
|
|
|
|
+ this.getOfficeEnergyConsumptionRanking();
|
|
|
}, 1000 * 10);
|
|
}, 1000 * 10);
|
|
|
},
|
|
},
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
|
clearInterval(getAirRealTimeMonitor);
|
|
clearInterval(getAirRealTimeMonitor);
|
|
|
- clearInterval(getRealTimeBusinessInformation);
|
|
|
|
|
|
|
+ clearInterval(getOfficeEnergyConsumptionRanking);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 超时预警页面改变
|
|
|
|
|
+ */
|
|
|
|
|
+ caoshi_yujing_HandleCurrentChange() {
|
|
|
|
|
+ this.getAirTimeoutWarning();
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 离线预警页面改变
|
|
|
|
|
+ */
|
|
|
|
|
+ lixian_yujing_HandleCurrentChange() {
|
|
|
|
|
+ this.getOfflineTimeoutWarning();
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 超时预警选项卡
|
|
|
|
|
+ */
|
|
|
time_out_warning_handle() {
|
|
time_out_warning_handle() {
|
|
|
this.time_out_warning = true;
|
|
this.time_out_warning = true;
|
|
|
this.off_line_warning = false;
|
|
this.off_line_warning = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 离线预警选项卡
|
|
|
|
|
+ */
|
|
|
off_line_warning_handle() {
|
|
off_line_warning_handle() {
|
|
|
this.time_out_warning = false;
|
|
this.time_out_warning = false;
|
|
|
this.off_line_warning = true;
|
|
this.off_line_warning = true;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
- * 实时业务信息,获取充值记录
|
|
|
|
|
|
|
+ * 办公室能耗排名查看更多
|
|
|
*/
|
|
*/
|
|
|
- getRealTimeBusinessInformation() {
|
|
|
|
|
- this.realTimeBusinessInformation_loading = true
|
|
|
|
|
-
|
|
|
|
|
|
|
+ click_view_more() {
|
|
|
|
|
+ this.dialogTableVisible = true
|
|
|
|
|
+ this.officeEnergy.currentPage = 1
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 办公室能耗排名查看更多翻页
|
|
|
|
|
+ */
|
|
|
|
|
+ officeEnergyHandleCurrentChange() {
|
|
|
|
|
+ this.getOfficeEnergyConsumptionRanking();
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 办公室能耗排名分页数据
|
|
|
|
|
+ */
|
|
|
|
|
+ getOfficeEnergyConsumptionRanking() {
|
|
|
|
|
+ this.officeEnergyConsumptionRanking_loading = true
|
|
|
let data = {
|
|
let data = {
|
|
|
- page: 1,
|
|
|
|
|
- rows: 7
|
|
|
|
|
|
|
+ page: this.officeEnergy.currentPage,
|
|
|
|
|
+ rows: this.officeEnergy.pageSize
|
|
|
}
|
|
}
|
|
|
- realTimeBusinessInformation(data).then((res) => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ officeEnergyConsumptionRanking(data).then((res) => {
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- this.yewu_tableData = [];
|
|
|
|
|
|
|
+ if (this.officeEnergy.currentPage == 1)
|
|
|
|
|
+ this.yewu_tableData = [];
|
|
|
|
|
+ this.yewu_tableData_page = [];
|
|
|
let tmp = []
|
|
let tmp = []
|
|
|
for (var i = 0; i < res.rows.length; i++) {
|
|
for (var i = 0; i < res.rows.length; i++) {
|
|
|
- tmp.push({
|
|
|
|
|
- desc: res.rows[i].user_name + ' 充值',
|
|
|
|
|
- dataTime: res.rows[i].time
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (this.officeEnergy.currentPage > 1) {
|
|
|
|
|
+ tmp.push({
|
|
|
|
|
+ num: res.rows[i].num + (this.officeEnergy.currentPage - 1) * this.officeEnergy.pageSize,
|
|
|
|
|
+ dom: res.rows[i].dom,
|
|
|
|
|
+ account: res.rows[i].account
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tmp.push({
|
|
|
|
|
+ num: res.rows[i].num,
|
|
|
|
|
+ dom: res.rows[i].dom,
|
|
|
|
|
+ account: res.rows[i].account
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- this.yewu_tableData = tmp;
|
|
|
|
|
|
|
+ if (this.officeEnergy.currentPage == 1)
|
|
|
|
|
+ this.yewu_tableData = tmp;
|
|
|
|
|
+ this.yewu_tableData_page = tmp;
|
|
|
|
|
+ this.officeEnergy.total = res.total;
|
|
|
} else {
|
|
} else {
|
|
|
- // this.$message.error('空调实时监控返回的数据异常!');
|
|
|
|
|
|
|
+ // this.$message.error('办公室能耗排名分页数据!');
|
|
|
}
|
|
}
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
this.$message.error(err.message)
|
|
this.$message.error(err.message)
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.realTimeBusinessInformation_loading = false
|
|
|
|
|
|
|
+ this.officeEnergyConsumptionRanking_loading = false
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 空调实时监控
|
|
* 空调实时监控
|
|
@@ -409,7 +460,7 @@
|
|
|
airRealTimeMonitor().then((res) => {
|
|
airRealTimeMonitor().then((res) => {
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -467,7 +518,7 @@
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -493,16 +544,6 @@
|
|
|
xAxis_data.push(tmp[i].month)
|
|
xAxis_data.push(tmp[i].month)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // 一般方法,无法解决数据缺失
|
|
|
|
|
- // for (var i = 0; i < series.length; i++) {
|
|
|
|
|
- // for (var j = 0; j < xAxis_data.length; j++) {
|
|
|
|
|
- // for (var k = 0; k < tmp.length; k++) {
|
|
|
|
|
- // if (series[i].name == tmp[k].air_config && xAxis_data[j] == tmp[k].month) {
|
|
|
|
|
- // series[i].data.push(tmp[k].num);
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
// 通用方法,可以解决数据缺失
|
|
// 通用方法,可以解决数据缺失
|
|
|
for (var i = 0; i < series.length; i++) {
|
|
for (var i = 0; i < series.length; i++) {
|
|
|
for (var j = 0; j < xAxis_data.length; j++) {
|
|
for (var j = 0; j < xAxis_data.length; j++) {
|
|
@@ -550,121 +591,170 @@
|
|
|
this.getChart()
|
|
this.getChart()
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 离线预警
|
|
|
|
|
+ */
|
|
|
|
|
+ getOfflineTimeoutWarning() {
|
|
|
|
|
+ this.lixian_yujing_loading = true
|
|
|
|
|
+
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ page: this.lixian_yujing_PageParam.currentPage,
|
|
|
|
|
+ rows: this.lixian_yujing_PageParam.pageSize
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ offlineTimeoutWarning(data).then((res) => {
|
|
|
|
|
+ // console.log('offlineTimeoutWarning', res);
|
|
|
|
|
+ if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.lixian_yujing_tableData = [];
|
|
|
|
|
+ for (var i = 0; i < res.rows.length; i++) {
|
|
|
|
|
+ this.lixian_yujing_tableData.push({
|
|
|
|
|
+ // id
|
|
|
|
|
+ // air_name
|
|
|
|
|
+ // time
|
|
|
|
|
+ // air_ip
|
|
|
|
|
+ // is_normal
|
|
|
|
|
+ build: res.rows[i].build,
|
|
|
|
|
+ floors: res.rows[i].floors,
|
|
|
|
|
+ dom: res.rows[i].dom,
|
|
|
|
|
+ air_name: res.rows[i].air_name,
|
|
|
|
|
+ time: res.rows[i].time
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ this.lixian_yujing_PageParam.total = res.total;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // this.$message.error('空调超时预警返回的数据异常!');
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch((err) => {
|
|
|
|
|
+ // console.log(err);
|
|
|
|
|
+ this.$message.error(err.message)
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.lixian_yujing_loading = false
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
* 空调超时预警
|
|
* 空调超时预警
|
|
|
*/
|
|
*/
|
|
|
getAirTimeoutWarning() {
|
|
getAirTimeoutWarning() {
|
|
|
- this.airTimeoutWarning_loading = true
|
|
|
|
|
|
|
+ this.caoshi_yujing_PageParam_loading = true
|
|
|
|
|
|
|
|
- airTimeoutWarning().then((res) => {
|
|
|
|
|
- // console.log(res);
|
|
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ page: this.caoshi_yujing_PageParam.currentPage,
|
|
|
|
|
+ rows: this.caoshi_yujing_PageParam.pageSize
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ airTimeoutWarning(data).then((res) => {
|
|
|
|
|
+ // console.log('airTimeoutWarning', res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- this.yujing_tableData = [];
|
|
|
|
|
|
|
+ this.caoshi_yujing_tableData = [];
|
|
|
for (var i = 0; i < res.monthT.length; i++) {
|
|
for (var i = 0; i < res.monthT.length; i++) {
|
|
|
- this.yujing_tableData.push({
|
|
|
|
|
|
|
+ this.caoshi_yujing_tableData.push({
|
|
|
deviceId: res.monthT[i].dom + ' ' + res.monthT[i].air_name + ' ' + res.monthT[i].air_config,
|
|
deviceId: res.monthT[i].dom + ' ' + res.monthT[i].air_name + ' ' + res.monthT[i].air_config,
|
|
|
warningTime: res.monthT[i].time,
|
|
warningTime: res.monthT[i].time,
|
|
|
operator: res.monthT[i].user_name,
|
|
operator: res.monthT[i].user_name,
|
|
|
durationUse: res.monthT[i].duration_use,
|
|
durationUse: res.monthT[i].duration_use,
|
|
|
contact: res.monthT[i].phone
|
|
contact: res.monthT[i].phone
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
// this.$message.error('空调超时预警返回的数据异常!');
|
|
// this.$message.error('空调超时预警返回的数据异常!');
|
|
|
}
|
|
}
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
- this.$message.error(err.message)
|
|
|
|
|
|
|
+ this.$message.error(err.message);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.airTimeoutWarning_loading = false
|
|
|
|
|
|
|
+ this.caoshi_yujing_PageParam_loading = false;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 本月消费
|
|
* 本月消费
|
|
|
*/
|
|
*/
|
|
|
getThisMonthConsume() {
|
|
getThisMonthConsume() {
|
|
|
- this.showThisMonthConsume.loading = true
|
|
|
|
|
|
|
+ this.showThisMonthConsume.loading = true;
|
|
|
|
|
|
|
|
thisMonthConsume().then((res) => {
|
|
thisMonthConsume().then((res) => {
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!')
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- this.showThisMonthConsume.time = res.time
|
|
|
|
|
- this.showThisMonthConsume.amount = res.zongCo.tong
|
|
|
|
|
|
|
+ this.showThisMonthConsume.time = res.time;
|
|
|
|
|
+ this.showThisMonthConsume.amount = res.zongCo.tong;
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
|
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
}
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
- this.$message.error(err.message)
|
|
|
|
|
|
|
+ this.$message.error(err.message);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.showThisMonthConsume.loading = false
|
|
|
|
|
|
|
+ this.showThisMonthConsume.loading = false;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 本月充值
|
|
* 本月充值
|
|
|
*/
|
|
*/
|
|
|
getThisMonthRecharge() {
|
|
getThisMonthRecharge() {
|
|
|
- this.showThisMonthRecharge.loading = true
|
|
|
|
|
|
|
+ this.showThisMonthRecharge.loading = true;
|
|
|
|
|
|
|
|
thisMonthRecharge().then((res) => {
|
|
thisMonthRecharge().then((res) => {
|
|
|
- // console.log(res);
|
|
|
|
|
|
|
+ // console.log('thisMonthRecharge' + res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!')
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- this.showThisMonthRecharge.time = res.time
|
|
|
|
|
- this.showThisMonthRecharge.online_amount = res.zongRe.tong // 线上充值
|
|
|
|
|
- this.showThisMonthRecharge.offline_amount = res.zongRo.tong // 线下充值
|
|
|
|
|
- this.showThisMonthRecharge.amount = res.zongRe.tong + res.zongRo.tong // 总充值
|
|
|
|
|
|
|
+ this.showThisMonthRecharge.time = res.time;
|
|
|
|
|
+ this.showThisMonthRecharge.online_amount = res.zongRe.tong; // 线上充值
|
|
|
|
|
+ this.showThisMonthRecharge.offline_amount = res.zongRo.tong; // 线下充值
|
|
|
|
|
+ this.showThisMonthRecharge.amount = res.zongRe.tong + res.zongRo.tong; // 总充值
|
|
|
} else if (res.code == 205) {
|
|
} else if (res.code == 205) {
|
|
|
this.showThisMonthRecharge.time = getFormatDateTime('datetime');
|
|
this.showThisMonthRecharge.time = getFormatDateTime('datetime');
|
|
|
- this.$message.error('本月充值:' + res.message)
|
|
|
|
|
|
|
+ this.$message.error('本月充值:' + res.message);
|
|
|
} else {
|
|
} else {
|
|
|
this.showThisMonthRecharge.time = getFormatDateTime('datetime');
|
|
this.showThisMonthRecharge.time = getFormatDateTime('datetime');
|
|
|
- this.$message.error('本月充值:' + res.message)
|
|
|
|
|
|
|
+ this.$message.error('本月充值:' + res.message);
|
|
|
}
|
|
}
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
- this.$message.error(err.message)
|
|
|
|
|
|
|
+ this.$message.error(err.message);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.showThisMonthRecharge.loading = false
|
|
|
|
|
|
|
+ this.showThisMonthRecharge.loading = false;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 获取总金额
|
|
* 获取总金额
|
|
|
*/
|
|
*/
|
|
|
getTotalMoney() {
|
|
getTotalMoney() {
|
|
|
- this.showTotalMoney.loading = true
|
|
|
|
|
|
|
+ this.showTotalMoney.loading = true;
|
|
|
|
|
|
|
|
totalMoney().then((res) => {
|
|
totalMoney().then((res) => {
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
if (typeof res.code == 'undefined' || res.code == '') {
|
|
|
- this.$message.error('返回数据格式问题,code未获取到!')
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ // this.$message.error('返回数据格式问题,code未获取到!');
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- this.showTotalMoney.time = res.time
|
|
|
|
|
- this.showTotalMoney.amount = res.zongYu.tong
|
|
|
|
|
|
|
+ this.showTotalMoney.time = res.time;
|
|
|
|
|
+ this.showTotalMoney.amount = res.zongYu.tong;
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
|
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
}
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
- this.$message.error(err.message)
|
|
|
|
|
|
|
+ this.$message.error(err.message);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.showTotalMoney.loading = false
|
|
|
|
|
|
|
+ this.showTotalMoney.loading = false;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 初始化折线图
|
|
* 初始化折线图
|
|
@@ -684,9 +774,9 @@
|
|
|
}) {
|
|
}) {
|
|
|
if (columnIndex === 1 || columnIndex === 2) {
|
|
if (columnIndex === 1 || columnIndex === 2) {
|
|
|
// 指定列号
|
|
// 指定列号
|
|
|
- return "font-size:18px; color:#808080"
|
|
|
|
|
|
|
+ return "font-size:14px; color:#808080;"
|
|
|
} else {
|
|
} else {
|
|
|
- return "font-size:18px; color:#292B34"
|
|
|
|
|
|
|
+ return "font-size:14px; color:#292B34"
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -753,43 +843,30 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .rmb1 {
|
|
|
|
|
|
|
+ .rmb1,
|
|
|
|
|
+ .rmb2,
|
|
|
|
|
+ .rmb3 {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
- align-items: center;
|
|
|
|
|
width: 60px;
|
|
width: 60px;
|
|
|
height: 60px;
|
|
height: 60px;
|
|
|
- border-radius: 30px;
|
|
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ padding-top: 5px;
|
|
|
font-size: 50px;
|
|
font-size: 50px;
|
|
|
color: #FDFDFF;
|
|
color: #FDFDFF;
|
|
|
- background: linear-gradient(-45deg, #3965FF, #3055FE);
|
|
|
|
|
box-shadow: 0 0 8px #3660FF;
|
|
box-shadow: 0 0 8px #3660FF;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .rmb1 {
|
|
|
|
|
+ background: linear-gradient(-45deg, #3965FF, #3055FE);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.rmb2 {
|
|
.rmb2 {
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- width: 60px;
|
|
|
|
|
- height: 60px;
|
|
|
|
|
- border-radius: 30px;
|
|
|
|
|
- font-size: 50px;
|
|
|
|
|
- color: #FDFDFF;
|
|
|
|
|
background: linear-gradient(-45deg, #FFB977, #FF5C5C);
|
|
background: linear-gradient(-45deg, #FFB977, #FF5C5C);
|
|
|
- box-shadow: 0 0 8px #3660FF;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.rmb3 {
|
|
.rmb3 {
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- width: 60px;
|
|
|
|
|
- height: 60px;
|
|
|
|
|
- border-radius: 30px;
|
|
|
|
|
- font-size: 50px;
|
|
|
|
|
- color: #FDFDFF;
|
|
|
|
|
background: linear-gradient(-45deg, #9187F0, #7760F1);
|
|
background: linear-gradient(-45deg, #9187F0, #7760F1);
|
|
|
- box-shadow: 0 0 8px #3660FF;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -837,7 +914,7 @@
|
|
|
color: #FFFFFF;
|
|
color: #FFFFFF;
|
|
|
background-color: #3965FF;
|
|
background-color: #3965FF;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.dialog-page {
|
|
.dialog-page {
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
}
|
|
}
|
|
@@ -870,6 +947,36 @@
|
|
|
height: 370px;
|
|
height: 370px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .el-table__row .cell {
|
|
|
|
|
+ white-space: nowrap !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-table__row:nth-child(1) td:nth-child(3) .cell span,
|
|
|
|
|
+ .el-table__row:nth-child(2) td:nth-child(3) .cell span,
|
|
|
|
|
+ .el-table__row:nth-child(3) td:nth-child(3) .cell span {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ width: 20px;
|
|
|
|
|
+ height: 20px;
|
|
|
|
|
+ line-height: 20px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ margin-left: 20px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ color: #FFFFFF !important;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-table__row:nth-child(1) td:nth-child(3) .cell span {
|
|
|
|
|
+ background-color: #f73131 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-table__row:nth-child(2) td:nth-child(3) .cell span {
|
|
|
|
|
+ background-color: #f60 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-table__row:nth-child(3) td:nth-child(3) .cell span {
|
|
|
|
|
+ background-color: #ffc20d !important;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.cell-row1 {
|
|
.cell-row1 {
|