温湿度页面修改

main
shilei 2 months ago
parent 1ae09fe5d3
commit 3ff5832083

@ -2,7 +2,7 @@
ENV = development ENV = development
# 本地环境接口地址 # 本地环境接口地址
VITE_API_URL = http://192.168.2.12:5037 VITE_API_URL = http://192.168.2.16:5034
# VITE_API_URL = http://192.168.2.15:5034 # VITE_API_URL = http://192.168.2.15:5034
# VITE_API_URL = http://gvc7ew.natappfree.cc # VITE_API_URL = http://gvc7ew.natappfree.cc
# VITE_API_URL = http://192.168.2.17:5034 # VITE_API_URL = http://192.168.2.17:5034

@ -4,5 +4,5 @@ window.__env__ = {
"VITE_OPEN_CDN": "false", "VITE_OPEN_CDN": "false",
"VITE_PUBLIC_PATH": "", "VITE_PUBLIC_PATH": "",
"VITE_SM_PUBLIC_KEY": "0484C7466D950E120E5ECE5DD85D0C90EAA85081A3A2BD7C57AE6DC822EFCCBD66620C67B0103FC8DD280E36C3B282977B722AAEC3C56518EDCEBAFB72C5A05312", "VITE_SM_PUBLIC_KEY": "0484C7466D950E120E5ECE5DD85D0C90EAA85081A3A2BD7C57AE6DC822EFCCBD66620C67B0103FC8DD280E36C3B282977B722AAEC3C56518EDCEBAFB72C5A05312",
"VITE_API_URL": "http://localhost:5034" "VITE_API_URL": "http://192.168.2.16:5034"
} }

@ -406,7 +406,7 @@ export const SysChargeMonitorApiAxiosParamCreator = function (configuration?: Co
* @throws {RequiredError} * @throws {RequiredError}
*/ */
apiGetHumitureGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { apiGetHumitureGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/Humiture/GetHumiture`; const localVarPath = `/api/Humiture/LstGetHumiture`;
// use dummy base URL string because the URL constructor only accepts absolute URLs. // use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com'); const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions; let baseOptions;
@ -1083,7 +1083,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) {
*/ */
async apiGetHumitureGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysUser>>> { async apiGetHumitureGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysUser>>> {
const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiGetHumitureGet(options); const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiGetHumitureGet(options);
const three_url = 'http://192.168.2.17:5036' const three_url = 'http://192.168.2.16:5036'
return (axios: AxiosInstance = globalAxios, basePath: string = three_url) => { return (axios: AxiosInstance = globalAxios, basePath: string = three_url) => {
const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: three_url + localVarAxiosArgs.url }; const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: three_url + localVarAxiosArgs.url };

@ -1,15 +1,15 @@
<template> <template>
<div> <div>
<el-row class="ac-list" :gutter="40" type="flex" justify="center"> <el-row class="ac-list" :gutter="40" type="flex" justify="center">
<el-col :span="6"> <el-col :span="12">
<div class="ac"> <div class="ac">
<el-row class="info"> <el-row class="info" :gutter="20">
<el-col class="left" :span="24"> <el-col class="left" :span="12" v-for="(item,index) in humidity_list" :key="index">
<img src="../../../assets/imgs/温湿度.png" alt="" /> <img src="../../../assets/imgs/温湿度.png" alt="" />
<div>设备型号{{ humidity_list == null ? '--' : humidity_list.equipmentType }}</div> <div>设备型号{{ humidity_list == null ? '--' : item.equipmentType }}</div>
<!-- <div>传感器位置 -- {{ item.label }}</div> --> <!-- <div>传感器位置 -- {{ item.label }}</div> -->
<div>湿度(%RH): {{ humidity_list == null ? '--' : humidity_list.humidness }}</div> <div>湿度(%RH): {{ humidity_list == null ? '--' : item.humidness }}</div>
<div>温度(°C): {{ humidity_list == null ? '--' : humidity_list.temperature }}</div> <div>温度(°C): {{ humidity_list == null ? '--' : item.temperature }}</div>
</el-col> </el-col>
</el-row> </el-row>
<div class="op"></div> <div class="op"></div>
@ -55,6 +55,7 @@ onMounted(async () => {
const handleQuery = async () => { const handleQuery = async () => {
var res = await getAPI(SysChargeMonitorApi).apiGetHumitureGet(); var res = await getAPI(SysChargeMonitorApi).apiGetHumitureGet();
// console.log(res, "res")
humidity_list.value = res.data; humidity_list.value = res.data;
}; };
</script> </script>

Loading…
Cancel
Save