af959938 by “miaofang

--no commit message

1 parent 6e285fc9
...@@ -34,10 +34,7 @@ ...@@ -34,10 +34,7 @@
34 34
35 <el-col :span="5" class="btnColRight"> 35 <el-col :span="5" class="btnColRight">
36 <el-form-item> 36 <el-form-item>
37 <el-button 37 <el-button type="primary" native-type="submit" @click="chchch"
38 type="primary"
39 native-type="submit"
40 @click="handleSearch"
41 >查询</el-button 38 >查询</el-button
42 > 39 >
43 <el-button type="primary" native-type="submit" @click="derive" 40 <el-button type="primary" native-type="submit" @click="derive"
...@@ -52,8 +49,8 @@ ...@@ -52,8 +49,8 @@
52 </div> 49 </div>
53 </template> 50 </template>
54 <script> 51 <script>
55 import * as echarts from "echarts" 52 import * as echarts from "echarts";
56 import XLSX from 'xlsx'; 53 import XLSX from "xlsx";
57 export default { 54 export default {
58 components: {}, 55 components: {},
59 data() { 56 data() {
...@@ -77,12 +74,11 @@ export default { ...@@ -77,12 +74,11 @@ export default {
77 data3: [], 74 data3: [],
78 xAxisData: [ 75 xAxisData: [
79 "赵龙龙", 76 "赵龙龙",
80 "刘龙龙", 77 "刘刚",
81 "田龙龙", 78 "任启亮",
82 "任龙龙", 79 "梁亚博",
83 "孙龙龙", 80 "李含",
84 "李龙龙", 81 "周路",
85 "周龙龙",
86 ], 82 ],
87 }; 83 };
88 }, 84 },
...@@ -103,25 +99,23 @@ export default { ...@@ -103,25 +99,23 @@ export default {
103 }, 99 },
104 // 导出 100 // 导出
105 derive() { 101 derive() {
106 this.exdata = [ 102 this.exdata = [["受理人员", "收件数", "退件数", "推荐率"]];
107 ['受理人员', '收件数','退件数','推荐率'] 103 this.xAxisData.forEach((item, index) => {
108 ]; 104 console.log("this.exdata[index+1]", this.exdata[index + 1]);
109 this.xAxisData.forEach((item,index) => { 105 this.exdata.push([]);
110 console.log("this.exdata[index+1]",this.exdata[index+1]); 106 this.exdata[index + 1].push(item);
111 this.exdata.push([]) 107 this.exdata[index + 1].push(this.data1[index]);
112 this.exdata[index+1].push(item) 108 this.exdata[index + 1].push(this.data2[index]);
113 this.exdata[index+1].push(this.data1[index]) 109 this.exdata[index + 1].push(this.data3[index]);
114 this.exdata[index+1].push(this.data2[index]) 110 });
115 this.exdata[index+1].push(this.data3[index]) 111 console.log("this.exdata", this.exdata);
116 })
117 console.log("this.exdata",this.exdata);
118 const ws = XLSX.utils.aoa_to_sheet(this.exdata); 112 const ws = XLSX.utils.aoa_to_sheet(this.exdata);
119 const wb = XLSX.utils.book_new(); 113 const wb = XLSX.utils.book_new();
120 XLSX.utils.book_append_sheet(wb, ws, 'Sheet1'); 114 XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
121 XLSX.writeFile(wb, '收件与超时统计情况.xlsx'); 115 XLSX.writeFile(wb, "收件与超时统计情况.xlsx");
122 }, 116 },
123 // 查询 117 // 查询
124 handleSearch() { 118 chchch() {
125 console.log("dateRange", this.dateRange); 119 console.log("dateRange", this.dateRange);
126 }, 120 },
127 getOption() { 121 getOption() {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
37 <el-button 37 <el-button
38 type="primary" 38 type="primary"
39 native-type="submit" 39 native-type="submit"
40 @click="handleSearch" 40 @click="chchch"
41 >查询</el-button 41 >查询</el-button
42 > 42 >
43 <el-button type="primary" native-type="submit" @click="derive" 43 <el-button type="primary" native-type="submit" @click="derive"
...@@ -76,13 +76,13 @@ export default { ...@@ -76,13 +76,13 @@ export default {
76 data2: [1, 4, 1, 3, 2, 3, 4], 76 data2: [1, 4, 1, 3, 2, 3, 4],
77 data3: [], 77 data3: [],
78 xAxisData: [ 78 xAxisData: [
79 "赵红红", 79 "任超",
80 "刘红红", 80 "杨威",
81 "田红红", 81 "魏娜",
82 "任红红", 82 "张祎旋",
83 "孙红红", 83 "苗菁",
84 "李红红", 84 "王文刚",
85 "周红红", 85 "单帅旗",
86 ], 86 ],
87 }; 87 };
88 }, 88 },
...@@ -123,7 +123,7 @@ console.log("this.exdata",this.exdata); ...@@ -123,7 +123,7 @@ console.log("this.exdata",this.exdata);
123 XLSX.writeFile(wb, '收件与退件统计情况.xlsx'); 123 XLSX.writeFile(wb, '收件与退件统计情况.xlsx');
124 }, 124 },
125 // 查询 125 // 查询
126 handleSearch() { 126 chchch() {
127 console.log("dateRange", this.dateRange); 127 console.log("dateRange", this.dateRange);
128 }, 128 },
129 getOption() { 129 getOption() {
......