Xiaopeng Zhang преди 5 месеца
родител
ревизия
978dc20b7e
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 2 1
      src/App2.js
  2. 2 2
      src/Service.js

+ 2 - 1
src/App2.js

@@ -245,6 +245,7 @@ import Tooltip from '@mui/material/Tooltip';
     };
 
     const tihuanCallback = (row, col) => {
+        setPbXilie([]);  
         setDopen(true);
         tihuanRowRef.current = row;
     };
@@ -439,7 +440,7 @@ import Tooltip from '@mui/material/Tooltip';
       
         console.log(itemId);
         if (["0", "3", "4", "6", "7", "8", "9", "11", "12", "13", "15", "16", "18", "19", "20", "21"].includes(itemId['id'])) {
-            Service.generatePeibiXilie(itemId['id']).then(x=>{
+            Service.generatePeibiXilie(itemId['id'], zhuanye).then(x=>{
                 let y = JSON.parse(x);
                 console.log(y);
                

+ 2 - 2
src/Service.js

@@ -657,8 +657,8 @@ async generateQingdanTuijian(name, bh, bt, bm) {
         }
     }
 
-    async generatePeibiXilie(id) {
-        const response = await fetch(this.ip().concat( "/pbxl/").concat(id), {
+    async generatePeibiXilie(id, zhuanye) {
+        const response = await fetch(this.ip().concat( "/pbxl/").concat(id).concat('/').concat(zhuanye.toString()), {
             method : "GET",
            
         });