af959938 by “miaofang

--no commit message

1 parent 6e285fc9
......@@ -34,10 +34,7 @@
<el-col :span="5" class="btnColRight">
<el-form-item>
<el-button
type="primary"
native-type="submit"
@click="handleSearch"
<el-button type="primary" native-type="submit" @click="chchch"
>查询</el-button
>
<el-button type="primary" native-type="submit" @click="derive"
......@@ -52,8 +49,8 @@
</div>
</template>
<script>
import * as echarts from "echarts"
import XLSX from 'xlsx';
import * as echarts from "echarts";
import XLSX from "xlsx";
export default {
components: {},
data() {
......@@ -77,12 +74,11 @@ export default {
data3: [],
xAxisData: [
"赵龙龙",
"刘龙龙",
"田龙龙",
"任龙龙",
"孙龙龙",
"李龙龙",
"周龙龙",
"刘刚",
"任启亮",
"梁亚博",
"李含",
"周路",
],
};
},
......@@ -103,25 +99,23 @@ export default {
},
// 导出
derive() {
this.exdata = [
['受理人员', '收件数','退件数','推荐率']
];
this.xAxisData.forEach((item,index) => {
console.log("this.exdata[index+1]",this.exdata[index+1]);
this.exdata.push([])
this.exdata[index+1].push(item)
this.exdata[index+1].push(this.data1[index])
this.exdata[index+1].push(this.data2[index])
this.exdata[index+1].push(this.data3[index])
})
console.log("this.exdata",this.exdata);
this.exdata = [["受理人员", "收件数", "退件数", "推荐率"]];
this.xAxisData.forEach((item, index) => {
console.log("this.exdata[index+1]", this.exdata[index + 1]);
this.exdata.push([]);
this.exdata[index + 1].push(item);
this.exdata[index + 1].push(this.data1[index]);
this.exdata[index + 1].push(this.data2[index]);
this.exdata[index + 1].push(this.data3[index]);
});
console.log("this.exdata", this.exdata);
const ws = XLSX.utils.aoa_to_sheet(this.exdata);
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
XLSX.writeFile(wb, '收件与超时统计情况.xlsx');
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
XLSX.writeFile(wb, "收件与超时统计情况.xlsx");
},
// 查询
handleSearch() {
chchch() {
console.log("dateRange", this.dateRange);
},
getOption() {
......
......@@ -37,7 +37,7 @@
<el-button
type="primary"
native-type="submit"
@click="handleSearch"
@click="chchch"
>查询</el-button
>
<el-button type="primary" native-type="submit" @click="derive"
......@@ -76,13 +76,13 @@ export default {
data2: [1, 4, 1, 3, 2, 3, 4],
data3: [],
xAxisData: [
"赵红红",
"刘红红",
"田红红",
"任红红",
"孙红红",
"李红红",
"周红红",
"任超",
"杨威",
"魏娜",
"张祎旋",
"苗菁",
"王文刚",
"单帅旗",
],
};
},
......@@ -123,7 +123,7 @@ console.log("this.exdata",this.exdata);
XLSX.writeFile(wb, '收件与退件统计情况.xlsx');
},
// 查询
handleSearch() {
chchch() {
console.log("dateRange", this.dateRange);
},
getOption() {
......