Commit 335afdb9 authored by 方建宇's avatar 方建宇

锅炉状态-静态数据修改

parent 519a7056
...@@ -362,7 +362,7 @@ import DataForm from '../../components/DataForm.vue'; ...@@ -362,7 +362,7 @@ import DataForm from '../../components/DataForm.vue';
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import http from '../../api/http' import http from '../../api/http'
import store from "../../store/index"; import store from "../../store/index";
import {boilerStatus} from "@/dataJson/RealPage/RealPipePage.js"; import {boilerStatus,boilerStatus2,boilerStatus3} from "@/dataJson/RealPage/RealPipePage.js";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { import {
Search, Search,
...@@ -632,26 +632,23 @@ function makeFormsData(realData) { ...@@ -632,26 +632,23 @@ function makeFormsData(realData) {
} }
//获取静态数据 //获取静态数据
async function getForms(NenterpriseId, deviceType, supplyIdList, boilerIdList, sortList) { async function getForms(NenterpriseId, deviceType, supplyIdList, boilerIdList, sortList) {
try { // enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
// 设置加载状态为 true loading.value = true
loading.value = true; console.log(JSON.stringify(boilerIdList))
// 使用已定义的 boilerStatus 更新表单标题和数据 if(boilerIdList == "af3616fd-ac99-4de4-8b92-7e2eab9a5a90"){
if (boilerStatus && boilerStatus.title && boilerStatus.realData) { makeFormsTitle(boilerStatus2.title);
makeFormsTitle(boilerStatus.title); titleData.value = boilerStatus2.title;
titleData.value = boilerStatus.title; makeFormsData(boilerStatus2.realData);
makeFormsData(boilerStatus.realData); }else if(boilerIdList == "0d4ad9f6-75ee-4914-929a-bedfe13b2560") {
} else { makeFormsTitle(boilerStatus3.title);
console.error('boilerStatus is not properly defined or lacks necessary properties.'); titleData.value = boilerStatus3.title;
makeFormsData([]); // 如果 boilerStatus 不完整,则初始化表单数据为空数组 makeFormsData(boilerStatus3.realData);
} }else{
} catch (error) { makeFormsTitle(boilerStatus.title);
// 捕获并处理任何发生的错误 titleData.value = boilerStatus.title;
console.error('Error processing forms data:', error); makeFormsData(boilerStatus.realData);
makeFormsData([]); // 在发生错误时初始化表单数据为空数组
} finally {
// 无论请求成功与否,最后都将加载状态设置为 false
loading.value = false;
} }
loading.value = false
} }
//获取动态数据 //获取动态数据
// async function getForms(NenterpriseId, deviceType, supplyIdList, boilerIdList, sortList) { // async function getForms(NenterpriseId, deviceType, supplyIdList, boilerIdList, sortList) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment