|
@@ -7,7 +7,7 @@ import {stations} from '@/utils/station'
|
|
|
import StripeTable from '@/components/StripeTable.vue'
|
|
|
import ColorTag from '@/components/tag/ColorTag.vue'
|
|
|
import ImageTag from '@/components/tag/ImageTag.vue'
|
|
|
-import { getRStLLMaxDate } from '@/api/home'
|
|
|
+import { getDetailInfo, getDeviceInfo } from '@/api/device'
|
|
|
import Chart from '@/components/Chart.vue'
|
|
|
|
|
|
const route = useRoute()
|
|
@@ -41,18 +41,18 @@ const wlData = reactive({ ss: '3.80', zg: '4.65', zd: '4.65', bz: '4.65', jj: '4
|
|
|
|
|
|
const moduleTableColumns = [
|
|
|
{
|
|
|
- label: '耗材名称', prop: 'stnm', width: '100', convertFn: (data) => {
|
|
|
+ label: '耗材名称', prop: 'partsName', width: '100', convertFn: (data) => {
|
|
|
return data ? data.trim() : ''
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '剩余有效期', prop: 'z', width: '100', convertFn: (data) => {
|
|
|
- return Number(data).toFixed(2)
|
|
|
+ label: '剩余有效期', prop: 'useDate', width: '100', convertFn: (data) => {
|
|
|
+ return Number(data).toFixed(0)
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '时间', prop: 'tm', width: '190', convertFn: (data) => {
|
|
|
- return data ? data.substring(5, 16) : ''
|
|
|
+ label: '时间', prop: 'offDate', width: '190', convertFn: (data) => {
|
|
|
+ return data
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -75,17 +75,26 @@ const reagentTableColumns = [
|
|
|
]
|
|
|
const deviceTableColumns = [
|
|
|
{
|
|
|
- label: '设备类型', prop: 'stnm', width: '110', convertFn: (data) => {
|
|
|
+ label: '设备类型', prop: 'deviceType', width: '110', convertFn: (data) => {
|
|
|
return data ? data.trim() : ''
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '设备名称', prop: 'z', width: '280', convertFn: (data) => {
|
|
|
+ label: '设备名称', prop: 'deviceName', width: '110', convertFn: (data) => {
|
|
|
+ return data ? data.trim() : ''
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ label: '运行状态', prop: 'state', width: '90', convertFn: (data) => {
|
|
|
+ return data ? data.trim() : ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '运行情况', prop: 'online', width: '100', convertFn: (data) => {
|
|
|
return data ? data.trim() : ''
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
-const tableData = reactive([])
|
|
|
+const operationTableData = reactive([])
|
|
|
const deviceTableData = reactive([])
|
|
|
|
|
|
const right3Ref = ref(null)
|
|
@@ -167,9 +176,14 @@ function reloadRight3() {
|
|
|
right3Ref.value.loadChart(option)
|
|
|
}
|
|
|
|
|
|
-function getStationList() {
|
|
|
- getRStLLMaxDate().then(res => {
|
|
|
- tableData.push(...res)
|
|
|
+function getDeviceInfoList() {
|
|
|
+ getDeviceInfo().then(res => {
|
|
|
+ deviceTableData.push(...res)
|
|
|
+ })
|
|
|
+}
|
|
|
+function getDeviceDetailInfoList() {
|
|
|
+ getDetailInfo().then(res => {
|
|
|
+ operationTableData.push(...res)
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -195,7 +209,8 @@ onMounted(() => {
|
|
|
{ label: '总氮', value: '22.3', unit: 'mg/L', imgSrc: new URL('@/assets/images/sz-tn.png', import.meta.url).href },
|
|
|
{ label: '氨氮', value: '22.3', unit: 'mg/L', imgSrc: new URL('@/assets/images/sz-ad.png', import.meta.url).href }
|
|
|
]
|
|
|
- getStationList()
|
|
|
+ getDeviceInfoList()
|
|
|
+ getDeviceDetailInfoList()
|
|
|
reloadRight3()
|
|
|
})
|
|
|
</script>
|
|
@@ -208,7 +223,7 @@ onMounted(() => {
|
|
|
<el-col :span="7">
|
|
|
<div class="device_num">
|
|
|
<span class="background-image">设备管理</span>
|
|
|
- <span style="font-size: 26px;font-weight: bold;">36</span>
|
|
|
+ <span style="font-size: 26px;font-weight: bold;">31</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="10">
|
|
@@ -220,22 +235,19 @@ onMounted(() => {
|
|
|
<el-col :span="7">
|
|
|
<div class="device_num">
|
|
|
<span class="background-image">在线设备</span>
|
|
|
- <span style="font-size: 26px;font-weight: bold;">36</span>
|
|
|
+ <span style="font-size: 26px;font-weight: bold;">30</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="height: calc(100% - 120px)">
|
|
|
- <stripe-table :columns="deviceTableColumns" :data="tableData"></stripe-table>
|
|
|
+ <stripe-table :columns="deviceTableColumns" :data="deviceTableData"></stripe-table>
|
|
|
</el-row>
|
|
|
|
|
|
</card01>
|
|
|
</template>
|
|
|
<template #rightModule>
|
|
|
<card01 style="height: 33%" title="配件运维信息">
|
|
|
- <stripe-table :columns="moduleTableColumns" :data="tableData"></stripe-table>
|
|
|
- </card01>
|
|
|
- <card01 style="height: 33%" title="试剂运维信息">
|
|
|
- <stripe-table :columns="reagentTableColumns" :data="tableData"></stripe-table>
|
|
|
+ <stripe-table :columns="moduleTableColumns" :data="operationTableData"></stripe-table>
|
|
|
</card01>
|
|
|
<card01 style="height: 33%" title="耗材余量监控">
|
|
|
<chart ref="right3Ref"></chart>
|