HZH-PC\HZH 4 years ago
parent
commit
8c769bcf1b
1 changed files with 10 additions and 23 deletions
  1. 10 23
      src/components/MainPage/Quarter.vue

+ 10 - 23
src/components/MainPage/Quarter.vue

@@ -94,7 +94,7 @@ table{
                   
                 <a @click="changeData(item,false)">修改</a>
                 &nbsp;&nbsp;
-                <a @click="table = true">子项</a>
+                <a @click="openChildPlan(item)">子项</a>
                 &nbsp;&nbsp;
                 <a @click="visibleDelete = true;plan.id = item.id">删除</a>
                 <!-- &nbsp;&nbsp;
@@ -152,11 +152,11 @@ table{
       </span>
     </el-dialog>
     <el-drawer
-      title="我嵌套了表格!"
-      :visible.sync="table"
+      title="子任务"
+      :visible.sync="childPlanFlag"
       direction="rtl"
       size="50%">
-      <el-table :data="gridData">
+      <el-table :data="childPlan">
           <el-table-column property="date" label="日期" width="150"></el-table-column>
           <el-table-column property="name" label="姓名" width="200"></el-table-column>
           <el-table-column property="address" label="地址"></el-table-column>
@@ -184,25 +184,8 @@ export default {
         visibleChange: false,
         visibleDelete: false,
         noEdit: false,
-         table: false,
-      dialog: false,
-      gridData: [{
-        date: '2016-05-02',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-04',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-01',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-03',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }],
+        childPlanFlag: false,
+        childPlan: [],
       }
   },
   created() {
@@ -249,6 +232,10 @@ export default {
         })
       }
     },
+    openChildPlan(item){
+      this.childPlanFlag = true;
+      
+    }
   }
 }
 </script>