Forráskód Böngészése

修复切换学生时树未更新的问题

zhuf 1 éve%!(EXTRA string=óta)
szülő
commit
ca5c5404da
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      src/views/wypj/wypj/tree.vue

+ 3 - 2
src/views/wypj/wypj/tree.vue

@@ -35,6 +35,8 @@ export default {
   methods: {
     // 获取树形数据
     getTreeData() {
+      // 删除元素
+      d3.select("#d3>svg").remove()
       if (!this.xh) return;
       request({
         url: '/xddy/dygl_wypj_pjjl/tree_pjjl',
@@ -70,8 +72,7 @@ export default {
           console.log('data : ', data)
           {
             console.log('d3.select("#d3>svg") : ', d3.select("#d3>svg"))
-            // 删除元素
-            d3.select("#d3>svg").remove()
+
 
             const width = 1200;
             const height = 400;