Commit 519a7056 authored by 方建宇's avatar 方建宇

总管状态-静态数据修改

parent 9eab74aa
...@@ -578,26 +578,17 @@ function makeFormsData(realData) { ...@@ -578,26 +578,17 @@ function makeFormsData(realData) {
//使用静态数据 //使用静态数据
async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) { async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) {
try { // enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
// 设置加载状态为 true
loading.value = true; loading.value = true;
// 使用已定义的 pipeStatus 更新表单标题和数据 if ( supplyIdList == 'b354f45b-23e5-42be-a210-0fb92394f457') {
if (pipeStatus && pipeStatus.title && pipeStatus.realData) {
makeFormsTitle(pipeStatus.title); makeFormsTitle(pipeStatus.title);
titleData.value = pipeStatus.title; titleData.value = pipeStatus.title;
makeFormsData(pipeStatus.realData); makeFormsData(pipeStatus.realData);
} else { }else{
console.error('pipeStatus is not properly defined or lacks necessary properties.'); makeFormsData([]);
makeFormsData([]); // 如果 pipeStatus 不完整,则初始化表单数据为空数组
}
} catch (error) {
// 捕获并处理任何发生的错误
console.error('Error processing forms data:', error);
makeFormsData([]); // 在发生错误时初始化表单数据为空数组
} finally {
// 无论请求成功与否,最后都将加载状态设置为 false
loading.value = false;
} }
// console.log(tableInfo)
loading.value = false
} }
// 使用动态数据 // 使用动态数据
// async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) { // async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) {
...@@ -607,11 +598,11 @@ async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) { ...@@ -607,11 +598,11 @@ async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) {
// if (result.status === 0) { // if (result.status === 0) {
// makeFormsTitle(result.data.title); // makeFormsTitle(result.data.title);
// titleData.value = result.data.title; // titleData.value = result.data.title;
//
//
//
// makeFormsData(result.data.realData); // makeFormsData(result.data.realData);
//
// } else { // } else {
// makeFormsData([]); // makeFormsData([]);
// } // }
......
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