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

锅炉状态-静态数据修改

parent 519a7056
......@@ -362,7 +362,7 @@ import DataForm from '../../components/DataForm.vue';
import { useRoute } from 'vue-router'
import http from '../../api/http'
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 {
Search,
......@@ -632,26 +632,23 @@ function makeFormsData(realData) {
}
//获取静态数据
async function getForms(NenterpriseId, deviceType, supplyIdList, boilerIdList, sortList) {
try {
// 设置加载状态为 true
loading.value = true;
// 使用已定义的 boilerStatus 更新表单标题和数据
if (boilerStatus && boilerStatus.title && boilerStatus.realData) {
// enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
loading.value = true
console.log(JSON.stringify(boilerIdList))
if(boilerIdList == "af3616fd-ac99-4de4-8b92-7e2eab9a5a90"){
makeFormsTitle(boilerStatus2.title);
titleData.value = boilerStatus2.title;
makeFormsData(boilerStatus2.realData);
}else if(boilerIdList == "0d4ad9f6-75ee-4914-929a-bedfe13b2560") {
makeFormsTitle(boilerStatus3.title);
titleData.value = boilerStatus3.title;
makeFormsData(boilerStatus3.realData);
}else{
makeFormsTitle(boilerStatus.title);
titleData.value = boilerStatus.title;
makeFormsData(boilerStatus.realData);
} else {
console.error('boilerStatus is not properly defined or lacks necessary properties.');
makeFormsData([]); // 如果 boilerStatus 不完整,则初始化表单数据为空数组
}
} catch (error) {
// 捕获并处理任何发生的错误
console.error('Error processing forms data:', error);
makeFormsData([]); // 在发生错误时初始化表单数据为空数组
} finally {
// 无论请求成功与否,最后都将加载状态设置为 false
loading.value = false;
}
loading.value = false
}
//获取动态数据
// 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