feat: 合肥南方的总数据量页面

This commit is contained in:
caoqianming 2025-06-12 08:47:16 +08:00
parent b117708119
commit e33f0786dd
3 changed files with 83 additions and 0 deletions

16
src/api/model/hfnf.js Normal file
View File

@ -0,0 +1,16 @@
import config from "@/config"
import http from "@/utils/request"
export default {
mplogx: {
list: {
name: "列表",
req: async function(data){
return await http.post(
`${config.HOST_URL}/hfnf_api/mplogx/`,
// "http://10.0.11.52:5800/mplogx/",
data
);
}
},
}
}

View File

@ -0,0 +1,31 @@
<template>
<el-row>
<el-col :span="6">
<el-card style="max-width: 480px" @click="goDetail">
<template #header>
<span>数据总量</span>
</template>
<span style="color:darkblue;font-size: 20px;font-weight: bold;">{{ total }}</span>
</el-card>
</el-col>
</el-row>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import API from '@/api'
import { useRouter } from 'vue-router'
const total = ref(0)
const router = useRouter()
onMounted(() => {
API.hfnf.mplogx.list.req({page:1, page_size:1}).then(res=>{
total.value = res.count
})
})
const goDetail = () => {
router.push("/hfnf_mplogx")
}
</script>

View File

@ -0,0 +1,36 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
</div>
<div class="right-panel">
<el-input v-model="query.mpoint_id" placeholder="测点ID" @keyup.enter="handQuery"/>
<el-button type="primary" @click="handQuery" icon="el-icon-search"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:query="query"
>
<el-table-column label="测点ID" prop="mpoint_id" width="200"></el-table-column>
<el-table-column label="监测时间" prop="timex"></el-table-column>
<el-table-column label="监测值" prop="val_float"></el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import API from '@/api'
const apiObj = ref(API.hfnf.mplogx.list);
const query = ref({});
const table = ref(null);
const handQuery = () => {
table.value.refresh();
}
</script>