Browse Source

参数替换

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 8 months ago
parent
commit
217a155116
1 changed files with 8 additions and 5 deletions
  1. 8 5
      src/views/generatingCapacity/dataFilter/process/index.vue

+ 8 - 5
src/views/generatingCapacity/dataFilter/process/index.vue

@@ -21,7 +21,7 @@
             :height="treeHeight"
             @currentChange="
               (treeItem) => {
-                funProcessCurrentChange(treeItem, true);
+                funProcessCurrentChange(treeItem);
               }
             "
             @refresh="funGetProcessTree"
@@ -78,6 +78,7 @@ const tableHeight = ref(window.innerHeight - 116 + "px");
 const excelCheckboxShow = ref(false);
 const excelCheckIds = ref([]);
 const excelList = ref([]);
+const xhrId = ref("");
 const funExcelChange = async (obj) => {
   //点击excel项时
   tableShowId.value = obj.id;
@@ -85,12 +86,14 @@ const funExcelChange = async (obj) => {
   let res = null;
   tableLoading.value = true;
   if (obj.type === "prepare") {
+    xhrId.value = obj.id;
     res = await httpRequest.get("/power/prepare/show", {
       params: {
         id: obj.id,
       },
     });
   } else if (obj.type === "process") {
+    xhrId.value = obj.id;
     res = await httpRequest.get("/power/process/show", {
       params: {
         id: obj.id,
@@ -229,7 +232,7 @@ const funGetProcessTree = async () => {
     funExcelChange(obj);
   }
 };
-const funProcessCurrentChange = ({ current, currentNode }, xhrFlg = false) => {
+const funProcessCurrentChange = ({ current, currentNode }) => {
   excelCheckboxShow.value = false;
   if (current.childs) {
     excelList.value = current.childs.map((o) => {
@@ -253,9 +256,6 @@ const funProcessCurrentChange = ({ current, currentNode }, xhrFlg = false) => {
   } else {
     excelList.value = [];
   }
-  if (xhrFlg) {
-    httpRequest.get(`/report/analysis?id=${current.id}`);
-  }
 };
 
 /**table 开始 */
@@ -274,6 +274,9 @@ const funExport = async () => {
 /**table 结束 */
 /**search 开始 */
 const funSubmit = async (query) => {
+  if (xhrId.value) {
+    await httpRequest.get(`/report/analysis?id=${xhrId.value}`);
+  }
   if (!excelCheckIds.value.length) {
     ElMessage.error("请勾选要预处理的项");
     return false;