| 
					
				 | 
			
			
				@@ -0,0 +1,104 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div class="content"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <header>下载数据</header> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="chart-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div :id="type + 'pie2'" style="width:50%;"></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="title-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div class="title">未下载业务员</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="title-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div class="title">已下载业务员</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Pie } from '@antv/g2plot'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    props: ["type"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /* 渲染图表 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        renderer(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const piePlot = new Pie(this.type + 'pie2', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                appendPadding: 10, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                angleField: 'value', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                colorField: 'type', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                radius: 0.75, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                legend: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    position: 'leftTop' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                label: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    type: 'spider', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    labelHeight: 28, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    content: '{name}\n{percentage}', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                interactions: [{ type: 'element-selected' }, { type: 'element-active' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            piePlot.render(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    created() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (this.type == 'agency') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$api.requested({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "classname": "webmanage.saletool.sharematerial.statistics.agent", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "method": "getDownloadList", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "content": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "sat_sharematerialid": this.$route.query.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "pageNumber": 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "pageSize": 20, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "isAll": false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                console.log("下载", res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$api.requested({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "classname": "webmanage.saletool.sharematerial.statistics.agent", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "method": "getUnDownloadList", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "content": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "sat_sharematerialid": this.$route.query.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "pageNumber": 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "pageSize": 20, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "isAll": false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                console.log("未下载", res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    mounted() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$api.requested({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "classname": this.type == 'agency' ? "webmanage.saletool.sharematerial.statistics.agent" : "webmanage.saletool.sharematerial.statistics.team", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "method": "getData", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "content": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "sat_sharematerialid": this.$route.query.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res.msg != '成功') return this.$message.error(res.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const data = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { type: '未下载', value: res.data.unDownloadNum }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { type: '已下载', value: res.data.downloadNum }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.renderer(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<style scoped> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@import url('./public.css'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+.chart-box { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    display: flex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    align-content: center; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    justify-content: center; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    width: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    margin-top: 40px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</style> 
			 |