From 574952bcc00d9da5eda15ebf2e898954f5b4e841 Mon Sep 17 00:00:00 2001 From: hejiangbo <2309689757@qq.com> Date: Fri, 20 Sep 2024 22:48:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E6=8A=A5=E9=94=999.20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api-services/api.ts | 1 + .../apis/sys-chargemonitor-api.ts | 18 ++++++------ src/views/heat/warehouses/index.vue | 2 +- src/views/home/swapping/index.vue | 28 +++++++++++-------- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/api-services/api.ts b/src/api-services/api.ts index c877760..527735f 100644 --- a/src/api-services/api.ts +++ b/src/api-services/api.ts @@ -76,4 +76,5 @@ export * from './apis/sys-equip-alarm-log-api'; export * from './apis/sys-equipinfo-api'; export * from './apis/sys-bty-mode-info-api'; export * from './apis/sys-charg-capacity-api'; +export * from './apis/sys-day-swap-run-result-api'; diff --git a/src/api-services/apis/sys-chargemonitor-api.ts b/src/api-services/apis/sys-chargemonitor-api.ts index bdefdce..0773cd5 100644 --- a/src/api-services/apis/sys-chargemonitor-api.ts +++ b/src/api-services/apis/sys-chargemonitor-api.ts @@ -1050,7 +1050,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { */ async apiSendPowerRegulationGet(code: string, power: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiSendPowerRegulationGet(code, power, options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1082,7 +1082,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { */ async apiGetChargerCodeListGET(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiGetChargerCodeListGET(options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1113,7 +1113,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { */ async apiSetStartChargeByBinNoGet(binNo: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiSetStartChargeByBinNoGet(binNo, options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1129,7 +1129,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { */ async apiSetStopChargeByBinNoGet(binNo: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiSetStopChargeByBinNoGet(binNo, options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1160,7 +1160,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { */ async apiDistributeElecPriceForChargeGet(ceid: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiDistributeElecPriceForChargeGet(ceid, options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1176,7 +1176,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { */ async apiChargerSendAuthGet(code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiChargerSendAuthGet(code, options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1193,7 +1193,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { async apiGetBattPerStatusCountGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiGetBattPerStatusCountGet(options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1210,7 +1210,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { async apiBatteryStatusInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiBatteryStatusInfoGet(options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; @@ -1227,7 +1227,7 @@ export const SysChargeMonitorApiFp = function (configuration?: Configuration) { async apiGetChargMonitorChargBinData(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysChargeMonitorApiAxiosParamCreator(configuration).apiGetChargMonitorChargBinData(options); - const second_url = 'http://192.168.2.7:5035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; diff --git a/src/views/heat/warehouses/index.vue b/src/views/heat/warehouses/index.vue index 661bc82..18713de 100644 --- a/src/views/heat/warehouses/index.vue +++ b/src/views/heat/warehouses/index.vue @@ -13,7 +13,7 @@ - + diff --git a/src/views/home/swapping/index.vue b/src/views/home/swapping/index.vue index ca96161..a21c995 100644 --- a/src/views/home/swapping/index.vue +++ b/src/views/home/swapping/index.vue @@ -396,6 +396,7 @@ const car_list = ref([]); const car_list_manual = ref([]); const charg_list = ref([]); const timer = ref(null); +const timer_one = ref(null); const error_info_list = ref([]); const batter_list = ref([]); onMounted(async () => { @@ -403,23 +404,28 @@ onMounted(async () => { handle_error_list(); handle_charge(); // load(); - // handle_GetStationSwapModel(); - // handle_apiSwapPlcSuccGet(); + handle_GetStationSwapModel(); + handle_apiSwapPlcSuccGet(); handle_SwapMonitorData(); - // handle_GetDeviceState(); - // timer.value = setInterval(() => { - // handle_SwapMonitorData(); - // handle_GetDeviceState(); - // handle_apiSwapPlcSuccGet(); - // }, 4000); + handle_GetDeviceState(); + timer.value = setInterval(() => { + handle_SwapMonitorData(); + handle_GetDeviceState(); + handle_apiSwapPlcSuccGet(); + }, 4000); + timer_one.value = setInterval(() => { + updateTime(); + }, 1000); // // console.log(wind_content_list.value, '---'); - // handle_car_list(); - // handle_charg_List(); - // handle_car_maual_list(); + handle_car_list(); + handle_charg_List(); + handle_car_maual_list(); }); onBeforeUnmount(() => { clearInterval(timer.value); + clearInterval(timer_one.value); timer.value = null; + timer_one.value = null; }); const handle_GetDeviceState = async () => { const response = await getAPI(SysMonitorApi).apiGetDeviceStatePost();