zhuliu пре 1 година
родитељ
комит
43269cbce5
1 измењених фајлова са 48 додато и 2 уклоњено
  1. 48 2
      src/views/analyse/custom/components/dialog/reportTemplate.vue

+ 48 - 2
src/views/analyse/custom/components/dialog/reportTemplate.vue

@@ -12,7 +12,7 @@
         <el-container>
             <el-header>
                 <div style="display:flex;width: 100%;justify-content: flex-end;">
-                    <el-button type="primary" size="small">自定义模板</el-button>
+                    <el-button type="primary" size="small" @click="newTemplate">自定义模板</el-button>
                 </div>
             </el-header>
           <el-main class="height_100" :loading="loading">
@@ -47,6 +47,41 @@
         </el-container>
       </div>
     </el-dialog>
+    <el-dialog
+      title="自定义分析项"
+      :visible.sync="dialogVisible2"
+      width="500px"
+      :before-close="()=>{dialogVisible2=false}"
+      :append-to-body="true"
+      :close-on-click-modal="false"
+    >
+        <div style="height: calc(100vh - 350px)">
+                <el-collapse >
+                        <el-collapse-item v-for="menu in treeList" :key="menu.id" :name="menu.id">
+                            <template slot="title">
+                            <div class="custom-title">
+                                <span class="label">{{ menu.name }}</span>
+                            </div>
+                            </template>
+                            <div v-for="item in menu.children" :key="item.uid" class="tree-item" >
+                            <div class="custom-title">
+                                
+                                <el-checkbox-group v-model="checkList">
+                                    <el-checkbox :label="item"><span class="label">{{ item.name }}</span></el-checkbox>
+                                </el-checkbox-group>
+                            </div>
+                            </div>
+                        </el-collapse-item>
+                    </el-collapse> 
+            
+        </div>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible2=false">关 闭</el-button>
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
+        </div>
+    </el-dialog>
+
+    
   </div>
 </template>
 
@@ -65,10 +100,16 @@ export default {
             size:10
         },
         total:0,
+        dialogVisible2:false,
+        checkList:[]
     };
   },
   watch: {},
-  computed: {},
+  computed: {
+    treeList() {
+      return this.$store.state.chart.treeList
+    },
+  },
   created() {},
   mounted() {},
   methods: {
@@ -101,6 +142,11 @@ export default {
         this.queryParams.size = 10
         this.getList()
     },
+    newTemplate(){
+        this.checkList = []
+        this.dialogVisible2 = true
+    },
+    handleConfirm(){},
   },
 };
 </script>