|
@@ -1,31 +1,48 @@
|
|
<template>
|
|
<template>
|
|
- <div>
|
|
|
|
|
|
+ <div style="padding-top: 12px;">
|
|
<el-form :inline="true" :model="queryParams" ref="queryRef" v-show="true" label-width="60px">
|
|
<el-form :inline="true" :model="queryParams" ref="queryRef" v-show="true" label-width="60px">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input v-model="queryParams.project_id" placeholder="请输入项目名称" clearable
|
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.project_name"
|
|
|
|
+ placeholder="请输入项目名称"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input v-model="queryParams.box_id" placeholder="请输入盒子名称" clearable
|
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.box_name"
|
|
|
|
+ placeholder="请输入盒子名称"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-select v-model="queryParams.online_status" placeholder="请选择在线状态" clearable>
|
|
|
|
- <el-option v-for="item in runStatOptions" :key="item.value" :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ <el-select v-model="queryParams.online_status" placeholder="请选择在线状态" clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in runStatOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-select v-model="queryParams.run_mode" placeholder="请选择运行模式" clearable>
|
|
|
|
- <el-option v-for="item in runModeOptions" :key="item.value" :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ <el-select v-model="queryParams.run_mode" placeholder="请选择运行模式" clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in runModeOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" size="medium" @click="handleQuery">搜索</el-button>
|
|
|
|
- <el-button type="success" size="medium" @click="handleDerive">导出</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="handleQuery">搜索</el-button>
|
|
|
|
+ <el-button v-if="loading" type="success" size="small" :loding="loading">导出中...</el-button>
|
|
|
|
+ <el-button v-else type="success" size="small" @click="handleDerive">导出</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<el-table :data="tableData" border :span-method="objectSpanMethod">
|
|
<el-table :data="tableData" border :span-method="objectSpanMethod">
|
|
@@ -51,37 +68,58 @@
|
|
<el-table-column label="主机控制器" align="center" width="60">
|
|
<el-table-column label="主机控制器" align="center" width="60">
|
|
<el-table-column prop="host_order" label="编号" align="center" width="60">
|
|
<el-table-column prop="host_order" label="编号" align="center" width="60">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{ scope.row.host_order || '-' }}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.host_order || '/' }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="host_connect_status" label="通讯状态" align="center" width="100">
|
|
<el-table-column prop="host_connect_status" label="通讯状态" align="center" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: connectStatColor(scope.row.host_connect_status) }">{{ connectStatText(scope.row.host_connect_status) }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.host_connect_status != undefined && scope.row.host_connect_status != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: connectStatColor(scope.row.host_connect_status) }"
|
|
|
|
+ >
|
|
|
|
+ {{ connectStatText(scope.row.host_connect_status) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="host_fault" label="故障" align="center" width="90">
|
|
<el-table-column prop="host_fault" label="故障" align="center" width="90">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: scope.row.host_fault == 1 ? 'yellowgreen' : 'yellow' }">{{ scope.row.host_fault == 1 ? '无' : '有' }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.host_fault != undefined && scope.row.host_fault != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: faultColor(scope.row.host_fault) }"
|
|
|
|
+ >
|
|
|
|
+ {{ faultText(scope.row.host_fault) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="host_su_temp" label="供水水温(℃)" align="center" width="120">
|
|
<el-table-column prop="host_su_temp" label="供水水温(℃)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: hpTempColor(scope.row.runMode, scope.row.host_su_temp) }">{{ fixedVal(scope.row.host_su_temp) }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.host_su_temp" class="el-table-tag" :style="{ background: hpTempColor(scope.row.runMode, scope.row.host_su_temp) }">
|
|
|
|
+ {{ fixedVal(scope.row.host_su_temp) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="host_re_temp" label="回水水温(℃)" align="center" width="120">
|
|
<el-table-column prop="host_re_temp" label="回水水温(℃)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: hpTempColor(scope.row.runMode, scope.row.host_re_temp) }">{{ fixedVal(scope.row.host_re_temp) }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.host_re_temp" class="el-table-tag" :style="{ background: hpTempColor(scope.row.runMode, scope.row.host_re_temp) }">
|
|
|
|
+ {{ fixedVal(scope.row.host_re_temp) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="host_temp_diff" label="温差" align="center" width="100">
|
|
<el-table-column prop="host_temp_diff" label="温差" align="center" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div>
|
|
|
|
|
|
+ <div v-if="scope.row.host_temp_diff">
|
|
<span class="el-table-tag" :style="{ background: scope.row.host_temp_diff && scope.row.host_temp_diff <= 5 ? 'yellowgreen' : '' }">
|
|
<span class="el-table-tag" :style="{ background: scope.row.host_temp_diff && scope.row.host_temp_diff <= 5 ? 'yellowgreen' : '' }">
|
|
{{ fixedVal(scope.row.host_temp_diff) }}
|
|
{{ fixedVal(scope.row.host_temp_diff) }}
|
|
</span>
|
|
</span>
|
|
<i v-if="scope.row.hpCnt > scope.row.maxCnt" class="el-icon-caret-bottom ml10" @click.stop="handleClickMore(scope.row, 'host')"></i>
|
|
<i v-if="scope.row.hpCnt > scope.row.maxCnt" class="el-icon-caret-bottom ml10" @click.stop="handleClickMore(scope.row, 'host')"></i>
|
|
</div>
|
|
</div>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -89,30 +127,60 @@
|
|
|
|
|
|
<!-- 新风机列 Begin -->
|
|
<!-- 新风机列 Begin -->
|
|
<el-table-column label="新风机控制器" align="center" width="60">
|
|
<el-table-column label="新风机控制器" align="center" width="60">
|
|
- <el-table-column prop="nt_order" label="编号" align="center" width="60" />
|
|
|
|
|
|
+ <el-table-column prop="nt_order" label="编号" align="center" width="60">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ scope.row.nt_order || '/' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="nt_connect_status" label="通讯状态" align="center" width="100">
|
|
<el-table-column prop="nt_connect_status" label="通讯状态" align="center" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: connectStatColor(scope.row.nt_connect_status) }">{{ connectStatText(scope.row.nt_connect_status) }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.nt_connect_status != undefined && scope.row.nt_connect_status != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: connectStatColor(scope.row.nt_connect_status) }"
|
|
|
|
+ >
|
|
|
|
+ {{ connectStatText(scope.row.nt_connect_status) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="nt_fault" label="故障" align="center" width="90">
|
|
<el-table-column prop="nt_fault" label="故障" align="center" width="90">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: scope.row.nt_fault == 1 ? 'yellowgreen' : 'yellow' }">{{ scope.row.nt_fault == 1 ? '无' : '有' }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.nt_fault != undefined && scope.row.nt_fault != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: faultColor(scope.row.nt_fault) }"
|
|
|
|
+ >
|
|
|
|
+ {{ faultText(scope.row.nt_fault) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="nt_in_temp" label="送风温度(℃)" align="center" width="120">
|
|
<el-table-column prop="nt_in_temp" label="送风温度(℃)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: dhTempColor(scope.row.runMode, scope.row.nt_in_temp) }">{{ fixedVal(scope.row.nt_in_temp) }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.nt_in_temp" class="el-table-tag" :style="{ background: dhTempColor(scope.row.runMode, scope.row.nt_in_temp) }">
|
|
|
|
+ {{ fixedVal(scope.row.nt_in_temp) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="nt_in_humidity" label="送风湿度(%)" align="center" width="120">
|
|
<el-table-column prop="nt_in_humidity" label="送风湿度(%)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: dhHumiColor(scope.row.runMode, scope.row.nt_in_humidity) }">{{ fixedVal(scope.row.nt_in_humidity) }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.nt_in_humidity" class="el-table-tag" :style="{ background: dhHumiColor(scope.row.runMode, scope.row.nt_in_humidity) }">
|
|
|
|
+ {{ fixedVal(scope.row.nt_in_humidity) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="nt_dew_point" label="露点(℃)" align="center" width="90">
|
|
|
|
|
|
+ <el-table-column prop="nt_dew_point" label="露点(℃)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: dhDewPointColor(scope.row.nt_dew_point) }">{{ fixedVal(scope.row.nt_dew_point) }}</span>
|
|
|
|
|
|
+ <div v-if="scope.row.nt_dew_point">
|
|
|
|
+ <span class="el-table-tag" :style="{ background: dhDewPointColor(scope.row.nt_dew_point) }">
|
|
|
|
+ {{ fixedVal(scope.row.nt_dew_point) }}
|
|
|
|
+ </span>
|
|
|
|
+ <i v-if="scope.row.dhCnt > scope.row.maxCnt" class="el-icon-caret-bottom ml10" @click.stop="handleClickMore(scope.row, 'newTrend')"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -120,39 +188,72 @@
|
|
|
|
|
|
<!-- 换热站列 Begin -->
|
|
<!-- 换热站列 Begin -->
|
|
<el-table-column label="换热站控制器" align="center" width="60">
|
|
<el-table-column label="换热站控制器" align="center" width="60">
|
|
- <el-table-column prop="hex_order" label="编号" align="center" width="60" />
|
|
|
|
|
|
+ <el-table-column prop="hex_order" label="编号" align="center" width="60">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ scope.row.hex_order || '/' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="hex_connect_status" label="通讯状态" align="center" width="100">
|
|
<el-table-column prop="hex_connect_status" label="通讯状态" align="center" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: connectStatColor(scope.row.hex_connect_status) }">{{ connectStatText(scope.row.hex_connect_status) }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.hex_connect_status != undefined && scope.row.hex_connect_status != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: connectStatColor(scope.row.hex_connect_status) }"
|
|
|
|
+ >
|
|
|
|
+ {{ connectStatText(scope.row.hex_connect_status)}}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="hex_fault" label="故障" align="center" width="90">
|
|
<el-table-column prop="hex_fault" label="故障" align="center" width="90">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: scope.row.hex_fault == 1 ? 'yellowgreen' : 'yellow' }">{{ scope.row.hex_fault == 1 ? '无' : '有' }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.hex_fault != undefined && scope.row.hex_fault != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: faultColor(scope.row.hex_fault) }"
|
|
|
|
+ >
|
|
|
|
+ {{ faultText(scope.row.hex_fault) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="hex_su_temp" label="供水水温(℃)" align="center" width="120">
|
|
<el-table-column prop="hex_su_temp" label="供水水温(℃)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: hexTempColor(scope.row.runMode, scope.row.hex_su_temp) }">{{ fixedVal(scope.row.hex_su_temp) }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.hex_su_temp" class="el-table-tag" :style="{ background: hexTempColor(scope.row.runMode, scope.row.hex_su_temp) }">
|
|
|
|
+ {{ fixedVal(scope.row.hex_su_temp) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="hex_re_temp" label="回水水温(℃)" align="center" width="120">
|
|
<el-table-column prop="hex_re_temp" label="回水水温(℃)" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: hexTempColor(scope.row.runMode, scope.row.hex_re_temp) }">{{ fixedVal(scope.row.hex_re_temp) }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.hex_re_temp" class="el-table-tag" :style="{ background: hexTempColor(scope.row.runMode, scope.row.hex_re_temp) }">
|
|
|
|
+ {{ fixedVal(scope.row.hex_re_temp) }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="hex_temp_diff" label="温差(℃)" align="center" width="90">
|
|
<el-table-column prop="hex_temp_diff" label="温差(℃)" align="center" width="90">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: scope.row.hex_temp_diff && scope.row.hex_temp_diff <= 5 ? 'yellowgreen' : '' }">
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="scope.row.hex_temp_diff != undefined && scope.row.hex_temp_diff != null"
|
|
|
|
+ class="el-table-tag"
|
|
|
|
+ :style="{ background: scope.row.hex_temp_diff <= 5 ? 'yellowgreen' : '' }"
|
|
|
|
+ >
|
|
{{ fixedVal(scope.row.hex_temp_diff) }}
|
|
{{ fixedVal(scope.row.hex_temp_diff) }}
|
|
</span>
|
|
</span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="hex_pump_status" label="水泵状态" align="center" width="100">
|
|
<el-table-column prop="hex_pump_status" label="水泵状态" align="center" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span class="el-table-tag" :style="{ background: scope.row.hex_pump_status == 0 ? 'yellow' : 'yellowgreen' }">
|
|
|
|
- {{ scope.row.hex_pump_status == 0 ? '停止' : '运行' }}
|
|
|
|
- </span>
|
|
|
|
|
|
+ <div v-if="scope.row.hex_pump_status != undefined && scope.row.hex_pump_status != null">
|
|
|
|
+ <span class="el-table-tag" :style="{ background: hexPumpStateColor(scope.row.hex_pump_status) }">
|
|
|
|
+ {{ hexPumpStateText(scope.row.hex_pump_status) }}
|
|
|
|
+ </span>
|
|
|
|
+ <i v-if="scope.row.hexCnt > scope.row.maxCnt" class="el-icon-caret-bottom ml10" @click.stop="handleClickMore(scope.row, 'heatExchange')"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -163,7 +264,10 @@
|
|
<el-table-column prop="end_order" label="编号" align="center" width="60" />
|
|
<el-table-column prop="end_order" label="编号" align="center" width="60" />
|
|
<el-table-column prop="end_exception_num" label="通讯异常数量" align="center" width="120">
|
|
<el-table-column prop="end_exception_num" label="通讯异常数量" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{ scope.row.end_exception_num > 0 ? scope.row.end_exception_num : '无' }}</span>
|
|
|
|
|
|
+ <span v-if="scope.row.end_exception_num != undefined && scope.row.end_exception_num != null">
|
|
|
|
+ {{ scope.row.end_exception_num }}
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>/</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="end_min_temp" label="最低室内温度(℃)" align="center" width="140">
|
|
<el-table-column prop="end_min_temp" label="最低室内温度(℃)" align="center" width="140">
|
|
@@ -214,15 +318,17 @@
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
></el-pagination>
|
|
></el-pagination>
|
|
<!-- 更多信息对话框 -->
|
|
<!-- 更多信息对话框 -->
|
|
- <el-dialog :title="dialog.title" :visible.sync="dialog.show" width="76%">
|
|
|
|
|
|
+ <el-dialog :title="dialog.title" :visible.sync="dialog.show" width="75%">
|
|
<pop-more-table :visible="dialog.show" :tableData="dialog.tableData" :columns="dialog.tableColumns"></pop-more-table>
|
|
<pop-more-table :visible="dialog.show" :tableData="dialog.tableData" :columns="dialog.tableColumns"></pop-more-table>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import axios from 'axios';
|
|
|
|
-import { expandAllNodes, mergeTableRows } from './dataHandler.js';
|
|
|
|
|
|
+import { listProjects, listArgs } from './js/api.js';
|
|
|
|
+import { expandAllNodes, mergeTableRows } from './js/merge.js';
|
|
|
|
+import { exportToExcel } from './js/export.js';
|
|
|
|
+import { runStatDict, runModeDict, connectStatDict, faultDict, hexPumpStatDict } from './js/common.js';
|
|
import PopMoreTable from './components/PopMoreTable.vue';
|
|
import PopMoreTable from './components/PopMoreTable.vue';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -231,21 +337,33 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
connectStatColor() {
|
|
connectStatColor() {
|
|
return function(state) {
|
|
return function(state) {
|
|
- if (this.connectStatMap[state]) {
|
|
|
|
- return this.connectStatMap[state].color;
|
|
|
|
- } else {
|
|
|
|
- return '';
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
+ return this.connectStatMap[state] ? this.connectStatMap[state].color : ''
|
|
|
|
+ }
|
|
},
|
|
},
|
|
connectStatText() {
|
|
connectStatText() {
|
|
return function(state) {
|
|
return function(state) {
|
|
- if (this.connectStatMap[state]) {
|
|
|
|
- return this.connectStatMap[state].label;
|
|
|
|
- } else {
|
|
|
|
- return '/';
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
+ return this.connectStatMap[state] ? this.connectStatMap[state].label : '/'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ faultColor() {
|
|
|
|
+ return function(state) {
|
|
|
|
+ return this.faultMap[state] ? this.faultMap[state].color : ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ faultText() {
|
|
|
|
+ return function(state) {
|
|
|
|
+ return this.faultMap[state] ? this.faultMap[state].label : '/'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ hexPumpStateColor() {
|
|
|
|
+ return function(state) {
|
|
|
|
+ return this.hexPumpStatMap[state] ? this.hexPumpStatMap[state].color : ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ hexPumpStateText() {
|
|
|
|
+ return function(state) {
|
|
|
|
+ return this.hexPumpStatMap[state] ? this.hexPumpStatMap[state].label : '/'
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 主机供水温度与回水温度颜色判定
|
|
// 主机供水温度与回水温度颜色判定
|
|
hpTempColor() {
|
|
hpTempColor() {
|
|
@@ -337,6 +455,25 @@ export default {
|
|
return row.end_max_dew_point > 18 ? 'yellow' : 'yellowgreen';
|
|
return row.end_max_dew_point > 18 ? 'yellow' : 'yellowgreen';
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ calcArgsColor() {
|
|
|
|
+ return function(row, prop) {
|
|
|
|
+ let items = this.argsList.filter(a => a.En === prop);
|
|
|
|
+ if (!items) {
|
|
|
|
+ return '';
|
|
|
|
+ }
|
|
|
|
+ if (items.length > 1) {
|
|
|
|
+ // items.forEach(v => {
|
|
|
|
+ // if (v.RunMode > 0) {
|
|
|
|
+
|
|
|
|
+ // } else {
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ } else {
|
|
|
|
+ return this.getArgsColor(row, prop, items[0].Action, items[0].Threshold);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
fixedVal() {
|
|
fixedVal() {
|
|
return function(val) {
|
|
return function(val) {
|
|
if (val == 0) return 0;
|
|
if (val == 0) return 0;
|
|
@@ -350,28 +487,21 @@ export default {
|
|
queryParams: {
|
|
queryParams: {
|
|
page_index: 1,
|
|
page_index: 1,
|
|
page_size: 10,
|
|
page_size: 10,
|
|
- project_id: undefined,
|
|
|
|
- box_id: undefined,
|
|
|
|
|
|
+ project_name: undefined,
|
|
|
|
+ box_name: undefined,
|
|
online_status: undefined,
|
|
online_status: undefined,
|
|
run_mode: undefined
|
|
run_mode: undefined
|
|
},
|
|
},
|
|
total: 0,
|
|
total: 0,
|
|
dataSource: [], // 数据源
|
|
dataSource: [], // 数据源
|
|
tableData: [],
|
|
tableData: [],
|
|
- mergeColums: ['projectName', 'boxName', 'runStatus'],
|
|
|
|
- runStatMap: {
|
|
|
|
- 0: { label: '离线', color: 'lightgray' },
|
|
|
|
- 1: { label: '在线', color: 'yellowgreen' },
|
|
|
|
- 2: { label: '未关联', color: 'lightgray' }
|
|
|
|
- },
|
|
|
|
- runModeMap: {
|
|
|
|
- 0: { label: '无', color: 'lightgray' },
|
|
|
|
- 1: { label: '制冷', color: 'darkgreen' },
|
|
|
|
- 2: { label: '采暖', color: 'orange' },
|
|
|
|
- 3: { label: '除湿', color: 'rgb(182, 172, 195)' },
|
|
|
|
- 4: { label: '预热', color: 'yellow' },
|
|
|
|
- 5: { label: '通风', color: 'rgb(182, 174, 227)' }
|
|
|
|
- },
|
|
|
|
|
|
+ argsList: [],
|
|
|
|
+ mergeColums: ['projectName', 'boxName', 'runStatus', 'runMode'],
|
|
|
|
+ runStatMap: runStatDict,
|
|
|
|
+ runModeMap: runModeDict,
|
|
|
|
+ connectStatMap: connectStatDict,
|
|
|
|
+ hexPumpStatMap: hexPumpStatDict,
|
|
|
|
+ faultMap: faultDict,
|
|
runStatOptions: [
|
|
runStatOptions: [
|
|
{ label:'在线', value:'1' },
|
|
{ label:'在线', value:'1' },
|
|
{ label:'离线', value:'0' },
|
|
{ label:'离线', value:'0' },
|
|
@@ -383,49 +513,64 @@ export default {
|
|
{ label:'预热', value:'4' },
|
|
{ label:'预热', value:'4' },
|
|
{ label:'通风', value:'5' },
|
|
{ label:'通风', value:'5' },
|
|
],
|
|
],
|
|
- connectStatMap: {
|
|
|
|
- 0: { label: '异常', color: 'yellow' },
|
|
|
|
- 1: { label: '正常', color: 'yellowgreen' }
|
|
|
|
- },
|
|
|
|
dialog: {
|
|
dialog: {
|
|
show: false,
|
|
show: false,
|
|
title: '',
|
|
title: '',
|
|
tableColumns: [],
|
|
tableColumns: [],
|
|
- tableData: [],
|
|
|
|
- totalWidth: 0
|
|
|
|
- }
|
|
|
|
|
|
+ tableData: []
|
|
|
|
+ },
|
|
|
|
+ loading: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getProjects();
|
|
this.getProjects();
|
|
|
|
+ this.getArgsList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/** 获取项目列表 */
|
|
/** 获取项目列表 */
|
|
getProjects() {
|
|
getProjects() {
|
|
var params = {
|
|
var params = {
|
|
- page_index: Math.max(0, this.queryParams.page_index - 1),
|
|
|
|
|
|
+ page_index: this.queryParams.page_index,
|
|
page_size: this.queryParams.page_size,
|
|
page_size: this.queryParams.page_size,
|
|
- project_id: this.queryParams.project_id,
|
|
|
|
- box_id: this.queryParams.box_id,
|
|
|
|
|
|
+ project_name: this.queryParams.project_name,
|
|
|
|
+ box_name: this.queryParams.box_name,
|
|
online_status: this.queryParams.online_status,
|
|
online_status: this.queryParams.online_status,
|
|
run_mode: this.queryParams.run_mode
|
|
run_mode: this.queryParams.run_mode
|
|
};
|
|
};
|
|
- axios
|
|
|
|
- .post('http://47.110.15.40:9001/proj/reportList', params)
|
|
|
|
- .then(resp => {
|
|
|
|
- let data = resp.data || {};
|
|
|
|
- let result = data.result || {};
|
|
|
|
- this.total = result.count;
|
|
|
|
- this.dataSource = result.data || [];
|
|
|
|
- // 展开所有项目下的设备及单机
|
|
|
|
- this.tableData = expandAllNodes(this.dataSource);
|
|
|
|
- let dataSolve = mergeTableRows(this.tableData, this.mergeColums);
|
|
|
|
- this.tableData = dataSolve;
|
|
|
|
- console.log('>>> tableData: ', this.tableData);
|
|
|
|
- })
|
|
|
|
- .catch(err => {
|
|
|
|
- console.log('请求错误: ', err);
|
|
|
|
- });
|
|
|
|
|
|
+ listProjects(params).then(resp => {
|
|
|
|
+ let data = resp.data || {};
|
|
|
|
+ let result = data.result || {};
|
|
|
|
+ this.total = result.count;
|
|
|
|
+ this.dataSource = result.data || [];
|
|
|
|
+ // 展开所有项目下的设备及单机
|
|
|
|
+ this.tableData = expandAllNodes(this.dataSource);
|
|
|
|
+ let dataSolve = mergeTableRows(this.tableData, this.mergeColums);
|
|
|
|
+ this.tableData = dataSolve;
|
|
|
|
+ console.log('>>> tableData: ', this.tableData);
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.log('[reportList]请求错误: ', err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 获取指标数据 */
|
|
|
|
+ getArgsList() {
|
|
|
|
+ listArgs().then(resp => {
|
|
|
|
+ let data = resp.data || {};
|
|
|
|
+ this.argsList = data.result || [];
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.log('[args/list]请求错误: ', err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 计算颜色 */
|
|
|
|
+ getArgsColor(row, prop, action, threshold) {
|
|
|
|
+ if (action === ">") {
|
|
|
|
+ return row[prop] > threshold ? 'yellow' : "yellowgreen";
|
|
|
|
+ } else if (action === "<") {
|
|
|
|
+ return row[prop] < threshold ? 'yellow' : "yellowgreen";
|
|
|
|
+ } else if (action === ">=") {
|
|
|
|
+ return row[prop] >= threshold ? 'yellow' : "yellowgreen";
|
|
|
|
+ } else if (action === "<=") {
|
|
|
|
+ return row[prop] <= threshold ? 'yellow' : "yellowgreen";
|
|
|
|
+ }
|
|
},
|
|
},
|
|
/** 数据行合并 */
|
|
/** 数据行合并 */
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
@@ -590,12 +735,16 @@ export default {
|
|
},
|
|
},
|
|
/** 搜索 */
|
|
/** 搜索 */
|
|
handleQuery(){
|
|
handleQuery(){
|
|
- this.queryParams.page_index = 0;
|
|
|
|
|
|
+ this.queryParams.page_index = 1;
|
|
this.getProjects();
|
|
this.getProjects();
|
|
},
|
|
},
|
|
/** 导出 */
|
|
/** 导出 */
|
|
- handleDerive(){
|
|
|
|
-
|
|
|
|
|
|
+ handleDerive() {
|
|
|
|
+ var that = this;
|
|
|
|
+ that.loading = true;
|
|
|
|
+ exportToExcel(function() {
|
|
|
|
+ that.loading = false;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/** 分页切换 */
|
|
/** 分页切换 */
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|