|
@@ -0,0 +1,245 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
|
|
|
|
+ <!-- <el-form-item label="安装位置:" prop="name">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="queryParams.name"
|
|
|
|
+ placeholder="请输入安装位置"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 160px"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="设备名称:" prop="name">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="queryParams.name"
|
|
|
|
+ placeholder="请输入设备名称"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 160px"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <el-form-item label="采集时间:" class="time">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ style="margin-top:5px;;width:340px"
|
|
|
|
+ v-model="dateRange"
|
|
|
|
+ size="small"
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ type="datetimerange"
|
|
|
|
+ range-separator="-"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ ></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
+ <!-- <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ size="mini"
|
|
|
|
+ :loading="exportLoading"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ v-hasPermi="['system:admin:export']"
|
|
|
|
+ >导出</el-button> -->
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-table v-loading="loading" :data="adminList" height="calc(100vh - 28vh)">
|
|
|
|
+ <el-table-column label="序号" align="center" prop="id" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="采集时间" align="center" prop="createTime" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="运行状态" align="center" prop="rs" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.rs == 0 ? 'color3' : 'color4'">{{scope.row.rs == 0 ? "停止" : scope.row.rs == 1 ? "运行" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="故障状态" align="center" prop="al" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.al == 1 ? 'color3' : 'color4'">{{scope.row.al == 1 ? "故障" : scope.row.al == 0 ? "正常" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="手自动" align="center" prop="aom" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.aom == 0 ? 'color3' : 'color4'">{{scope.row.aom == 0 ? "手动" : scope.row.amo == 1 ? "自动" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="启停控制" align="center" prop="c" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.c == 0 ? 'color3' : 'color4'">{{scope.row.c == 0 ? "停止" : scope.row.c == 1 ? "启动" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="风机压差" align="center" prop="jdps" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.jdps == 0 ? 'color3' : 'color4'">{{scope.row.c == 0 ? "停止" : scope.row.jdps == 1 ? "启动" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="滤网压差" align="center" prop="zx" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.zx == 0 ? 'color4' : 'color3'">{{scope.row.zx == 0 ? "干净" : scope.row.zx == 1 ? "脏堵" :""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="防冻报警" align="center" prop="fd" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.fd == 0 ? 'color3' : 'color4'">{{scope.row.fd == 0 ? "正常" : scope.row.fd == 1 ? "冷冻" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="送风温度" align="center" prop="st" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.st">{{scope.row.st}}℃</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="送风湿度" align="center" prop="sh" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.st">{{scope.row.st}}RH</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="回风温度" align="center" prop="rt" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.rt">{{scope.row.rt}}℃</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="回风湿度" align="center" prop="rh" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.rh">{{scope.row.rh}}RH</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="排风温度" align="center" prop="pt" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.pt">{{scope.row.pt}}℃</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="排风湿度" align="center" prop="ph" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.ph">{{scope.row.ph}}RH</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <!-- <el-table-column label="新风阀反馈(%)" align="center" prop="xffb" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="新风阀开关控制(%)" align="center" prop="xfc" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="回风阀反馈(%)" align="center" prop="hffb" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="回风阀开关控制(%)" align="center" prop="hfc" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="排风阀反馈" align="center" prop="pffb" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="排风阀开关控制(%)" align="center" prop="pfc" show-overflow-tooltip /> -->
|
|
|
|
+ <el-table-column label="水阀调节控(%)" align="center" prop="sfm" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.sfm">{{scope.row.sfm}}%</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="水阀反馈" align="center" prop="sffb" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.sffb">{{scope.row.sffb}}%</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <!-- <el-table-column label="风阀调节控制(%)" align="center" prop="ffm" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="风阀反馈" align="center" prop="fffb" show-overflow-tooltip /> -->
|
|
|
|
+ <el-table-column label="设定温度" align="center" prop="sett" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.sett">{{scope.row.sett}}℃</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="冬夏季切换" align="center" prop="mode" show-overflow-tooltip >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.mode == 0 ? 'color3' : 'color4'">{{scope.row.mode == 0 ? "夏季" : scope.row.mode == 1 ? "冬季" : ""}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ </el-table>
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.current"
|
|
|
|
+ :limit.sync="queryParams.size"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+ <!-- 导出-->
|
|
|
|
+ <a href="" download="" id="xz" style="position: absolute;z-index: -1;opacity: 0;"></a>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import { getAirConditioner, exportAirConditioner } from "@/api/business/ba/airConditioner";
|
|
|
|
+import { BASEPATH } from "@/assets/js/common.js";
|
|
|
|
+export default {
|
|
|
|
+ name: "Device",
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ fileList:[],
|
|
|
|
+ loading:true,
|
|
|
|
+ exportLoading:false,
|
|
|
|
+ // 显示搜索条件
|
|
|
|
+ showSearch: true,
|
|
|
|
+ // 总条数
|
|
|
|
+ total: 0,
|
|
|
|
+ // 表格数据
|
|
|
|
+ adminList: [],
|
|
|
|
+ // 弹出层标题
|
|
|
|
+ title: "",
|
|
|
|
+ // 是否显示弹出层
|
|
|
|
+ open: false,
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParams: {
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ name: undefined,
|
|
|
|
+ dwtype:undefined,
|
|
|
|
+ },
|
|
|
|
+ dateRange:[],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList();//初始化table
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // 取消按钮
|
|
|
|
+ cancel() {
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.reset();
|
|
|
|
+ },
|
|
|
|
+ /** 重置按钮操作 */
|
|
|
|
+ resetQuery() {
|
|
|
|
+ this.dateRange = [];
|
|
|
|
+ this.queryParams = {
|
|
|
|
+ name: undefined,
|
|
|
|
+ channelTypeName:undefined,
|
|
|
|
+ current:1,
|
|
|
|
+ size:10
|
|
|
|
+ }
|
|
|
|
+ this.resetForm("queryForm");
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+ /** 搜索按钮操作 */
|
|
|
|
+ handleQuery() {
|
|
|
|
+ this.queryParams.current = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ /** 查询参数列表 */
|
|
|
|
+ getList() {
|
|
|
|
+ let data = this.addDateRange(this.queryParams,this.dateRange)
|
|
|
|
+ data.endTime = data.params.endTime
|
|
|
|
+ data.startTime = data.params.beginTime
|
|
|
|
+ delete data.params
|
|
|
|
+ getAirConditioner(this.queryParams).then(response => {
|
|
|
|
+ this.adminList = response.data.records;
|
|
|
|
+ this.total = response.data.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /** 导出按钮操作 */
|
|
|
|
+ handleExport() {
|
|
|
|
+ let queryParams = {...this.queryParams};
|
|
|
|
+ delete queryParams.current
|
|
|
|
+ delete queryParams.size
|
|
|
|
+ queryParams.dwType = queryParams.dwtype
|
|
|
|
+ this.exportLoading = true;
|
|
|
|
+ exportAirConditioner(queryParams).then(response =>{
|
|
|
|
+ this.exportLoading = false;
|
|
|
|
+ document.getElementById("xz").href = BASEPATH() + response.data
|
|
|
|
+ document.getElementById("xz").download = response.data
|
|
|
|
+ document.getElementById("xz").click()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|