|
@@ -3,31 +3,30 @@
|
|
<!-- 筛选start -->
|
|
<!-- 筛选start -->
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
<div class="left">
|
|
<div class="left">
|
|
-
|
|
|
|
<div>
|
|
<div>
|
|
-
|
|
|
|
<div class="filter-item" style="margin-right: 20px">
|
|
<div class="filter-item" style="margin-right: 20px">
|
|
- 选择设备:
|
|
|
|
- <el-select
|
|
|
|
- v-model="deviceCode"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- style="width: 150px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="device in deviceList"
|
|
|
|
- :key="device"
|
|
|
|
- :label="device.deviceName"
|
|
|
|
- :value="device.deviceCode"
|
|
|
|
- ></el-option>
|
|
|
|
- <el-option label="设备1" value="DA00021026"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </div>
|
|
|
|
- 数据刷新时间:2021-10-11 15:00:00
|
|
|
|
|
|
+ 选择设备:
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="deviceCode"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 150px"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="device in deviceList"
|
|
|
|
+ :key="device"
|
|
|
|
+ :label="device.deviceName"
|
|
|
|
+ :value="device.deviceCode"
|
|
|
|
+ ></el-option>
|
|
|
|
+ <!-- <el-option label="设备1" value="DA00021026"></el-option> -->
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ 数据刷新时间:{{nowTime}}
|
|
|
|
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
class="search-button"
|
|
class="search-button"
|
|
style="margin-left: 30px"
|
|
style="margin-left: 30px"
|
|
|
|
+ @click="realScore()"
|
|
>
|
|
>
|
|
刷新
|
|
刷新
|
|
</el-button>
|
|
</el-button>
|
|
@@ -47,10 +46,10 @@
|
|
<div class="blanceChartTit">
|
|
<div class="blanceChartTit">
|
|
<span>评分</span>
|
|
<span>评分</span>
|
|
</div>
|
|
</div>
|
|
- <radar-chart></radar-chart>
|
|
|
|
|
|
+ <radar-chart :getTableData="getData[0]"></radar-chart>
|
|
<div class="totalScore">
|
|
<div class="totalScore">
|
|
- 总评分:40
|
|
|
|
- <el-button type="danger">不合格</el-button>
|
|
|
|
|
|
+ 总评分:{{getData[0].score}}
|
|
|
|
+ <el-button type="danger">{{getData[0].score>80?'优秀':getData[0].score>=60?'合格':'不合格'}}</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 评分 end -->
|
|
<!-- 评分 end -->
|
|
@@ -72,95 +71,86 @@
|
|
<el-col :md="24" :lg="17">
|
|
<el-col :md="24" :lg="17">
|
|
<!-- 表格start -->
|
|
<!-- 表格start -->
|
|
<el-table
|
|
<el-table
|
|
- :data="tableData"
|
|
|
|
|
|
+ :data="getData"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
:header-cell-style="headCellStyle"
|
|
:header-cell-style="headCellStyle"
|
|
>
|
|
>
|
|
- <el-table-column prop="huilv" label="回路" width=""></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="gongLv"
|
|
|
|
- label="功率因数"
|
|
|
|
- width=""
|
|
|
|
- ></el-table-column>
|
|
|
|
-
|
|
|
|
- <el-table-column label="不平衡度">
|
|
|
|
- <el-table-column label="电流" width="">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.dianLiu }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="电压">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.dianYa }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="回路" width="" align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{ scope.row.loop ? scope.row.loop : '-' }}
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="电压">
|
|
|
|
- <el-table-column prop="name" label="A相" width="">
|
|
|
|
|
|
+
|
|
|
|
+ <el-table-column label="功率因数" width="" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.name }}
|
|
|
|
|
|
+ <div @click="oneClick(scope)">
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.cosQ ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.cos }}
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="city" label="B相">
|
|
|
|
|
|
+
|
|
|
|
+ <el-table-column label="不平衡度" >
|
|
|
|
+ <el-table-column label="电流" width="" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.city }}
|
|
|
|
|
|
+ <div @click="oneClick(scope)">
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.elBalunQ ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.elBalun }}
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="city" label="C相">
|
|
|
|
|
|
+ <el-table-column label="电压" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.city }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.vtBalunQ ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.vtBalun }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="电流负载率">
|
|
|
|
- <el-table-column prop="name" label="A相" width="">
|
|
|
|
|
|
+
|
|
|
|
+ <el-table-column label="电压">
|
|
|
|
+ <el-table-column prop="name" label="A相" width="" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.name }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.uaQ ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.ua }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="city" label="B相">
|
|
|
|
|
|
+ <el-table-column prop="city" label="B相" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.city }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.ubQ ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.ub }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="city" label="C相">
|
|
|
|
|
|
+ <el-table-column prop="city" label="C相" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.city }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.ucQ ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.uc }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="电流谐波畸变率">
|
|
|
|
- <el-table-column prop="name" label="A相" width="">
|
|
|
|
|
|
+ <el-table-column label="电流负载率" >
|
|
|
|
+ <el-table-column prop="name" label="A相" width="" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.name }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.iaLoadQ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.iaLoad }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="city" label="B相">
|
|
|
|
|
|
+ <el-table-column prop="city" label="B相" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare green"></i>
|
|
|
|
- {{ scope.row.city }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.ibLoadQ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.ibLoad }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="city" label="C相">
|
|
|
|
|
|
+ <el-table-column prop="city" label="C相" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <i class="smallSquare"></i>
|
|
|
|
- {{ scope.row.city }}
|
|
|
|
|
|
+ <i class="smallSquare" :style="{'background': (scope.row.icLoadQ? 'green':'red')}"></i>
|
|
|
|
+ {{ scope.row.icLoad }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- ]
|
|
|
|
-
|
|
|
|
- <el-table-column label="评分" width="">
|
|
|
|
|
|
+ <el-table-column label="评分" width="" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button size="mini" type="warning">
|
|
<el-button size="mini" type="warning">
|
|
{{ scope.row.score }}
|
|
{{ scope.row.score }}
|
|
@@ -181,6 +171,7 @@ import { useStore } from 'vuex'
|
|
import { defineComponent, onMounted, ref } from 'vue'
|
|
import { defineComponent, onMounted, ref } from 'vue'
|
|
import * as api from '@/api/powerQuality/realScore.js'
|
|
import * as api from '@/api/powerQuality/realScore.js'
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
+import { parseTime } from '@/utils'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'RealScore',
|
|
name: 'RealScore',
|
|
@@ -190,21 +181,22 @@ export default defineComponent({
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
const store = useStore()
|
|
const store = useStore()
|
|
- const num = ref(0)
|
|
|
|
|
|
+ const num = ref(1)
|
|
|
|
+ const nowTime=ref(parseTime(new Date()))
|
|
const value4 = ref('')
|
|
const value4 = ref('')
|
|
- const tableData = ref([
|
|
|
|
|
|
+ const getData = ref([
|
|
{
|
|
{
|
|
- huilv: '/HZ183',
|
|
|
|
- gongLv: '2%',
|
|
|
|
- dianLiu: '100%',
|
|
|
|
- dianYa: '0.67%',
|
|
|
|
|
|
+ loop: '/HZ183',
|
|
|
|
+ cos: '2%',
|
|
|
|
+ elBalun: '100%',
|
|
|
|
+ vtBalun: '0.67%',
|
|
name: '5%',
|
|
name: '5%',
|
|
city: '7%',
|
|
city: '7%',
|
|
score: '60',
|
|
score: '60',
|
|
},
|
|
},
|
|
])
|
|
])
|
|
const deviceList = ref([])
|
|
const deviceList = ref([])
|
|
- const deviceCode = ref('DA00021026')
|
|
|
|
|
|
+ const deviceCode = ref('DA00012784')
|
|
|
|
|
|
function headCellStyle({ row, column, rowIndex, columnIndex }) {
|
|
function headCellStyle({ row, column, rowIndex, columnIndex }) {
|
|
row, column
|
|
row, column
|
|
@@ -218,7 +210,7 @@ export default defineComponent({
|
|
function deviceSelect() {
|
|
function deviceSelect() {
|
|
api.deviceListOne({ siteId: store.state.siteId }).then((requset) => {
|
|
api.deviceListOne({ siteId: store.state.siteId }).then((requset) => {
|
|
if (requset.status === 'SUCCESS') {
|
|
if (requset.status === 'SUCCESS') {
|
|
- deviceList.value = requset.data
|
|
|
|
|
|
+ deviceList.value = requset.data;
|
|
} else {
|
|
} else {
|
|
ElMessage.error(requset.msg)
|
|
ElMessage.error(requset.msg)
|
|
}
|
|
}
|
|
@@ -228,27 +220,38 @@ export default defineComponent({
|
|
function realScore() {
|
|
function realScore() {
|
|
api.realScore({ deviceCode: deviceCode.value }).then((requset) => {
|
|
api.realScore({ deviceCode: deviceCode.value }).then((requset) => {
|
|
if (requset.status === 'SUCCESS') {
|
|
if (requset.status === 'SUCCESS') {
|
|
- console.log('requset')
|
|
|
|
|
|
+ console.log('requset.data')
|
|
console.log(requset.data)
|
|
console.log(requset.data)
|
|
- // tableData.value = requset.data
|
|
|
|
|
|
+ getData.value[0] = requset.data
|
|
|
|
+ console.log(getData.value)
|
|
} else {
|
|
} else {
|
|
ElMessage.error(requset.msg)
|
|
ElMessage.error(requset.msg)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ nowTime.value=parseTime(new Date())
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ function oneClick(params){
|
|
|
|
+ console.log(params)
|
|
|
|
+ console.log(params.column.label)
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ console.log(parseTime(new Date()))
|
|
deviceSelect()
|
|
deviceSelect()
|
|
realScore()
|
|
realScore()
|
|
})
|
|
})
|
|
return {
|
|
return {
|
|
store,
|
|
store,
|
|
num,
|
|
num,
|
|
|
|
+ oneClick,
|
|
value4,
|
|
value4,
|
|
- tableData,
|
|
|
|
|
|
+ getData,
|
|
headCellStyle,
|
|
headCellStyle,
|
|
deviceSelect,
|
|
deviceSelect,
|
|
deviceList,
|
|
deviceList,
|
|
|
|
+ realScore,
|
|
|
|
+ nowTime,
|
|
deviceCode,
|
|
deviceCode,
|
|
}
|
|
}
|
|
},
|
|
},
|