a40fd85b by “miaofang

--no commit message

1 parent 53b2f560
......@@ -34,7 +34,9 @@
"vue-router": "3.0.2",
"vue-seamless-scroll": "^1.1.23",
"vuex": "3.1.0",
"x2js": "^3.4.4"
"x2js": "^3.4.4",
"xlsx": "^0.17.0",
"xlsx-style": "^0.8.13"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",
......
......@@ -60,9 +60,7 @@
</template>
<script>
import { getBdcqljqtsx, getBdcqljqtsxBdcdyh } from "@/api/djbDetail.js";
import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js";
import { searchTaskToDo } from "@/api/workflow/search.js";
import { leftMenu } from "@/api/workFlow.js";
import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js";
export default {
data() {
return {
......
......@@ -52,7 +52,8 @@
</div>
</template>
<script>
import * as echarts from "echarts";
import * as echarts from "echarts"
import XLSX from 'xlsx';
export default {
components: {},
data() {
......@@ -92,7 +93,6 @@ export default {
// 在 ECharts 实例中配置图表
this.chart.setOption(this.getOption());
this.chooseDateQuick(0);
},
methods: {
setdata() {
......@@ -102,7 +102,24 @@ export default {
}
},
// 导出
derive() {},
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);
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');
},
// 查询
handleSearch() {
console.log("dateRange", this.dateRange);
......@@ -289,10 +306,16 @@ export default {
return `${year}-${month}-${day}`;
},
// 某日期向前/向后num天
jumpNumDay(date, num, linkStr = '-') {
date = new Date(date.getTime() + (num * 24 * 60 * 60 * 1000))
return date.getFullYear() + linkStr + this.changeNum(date.getMonth() + 1) + linkStr + this.changeNum(date.getDate())
},
jumpNumDay(date, num, linkStr = "-") {
date = new Date(date.getTime() + num * 24 * 60 * 60 * 1000);
return (
date.getFullYear() +
linkStr +
this.changeNum(date.getMonth() + 1) +
linkStr +
this.changeNum(date.getDate())
);
},
},
};
</script>
......@@ -306,8 +329,6 @@ jumpNumDay(date, num, linkStr = '-') {
padding-top: 3px;
background-color: #ffffff;
margin-bottom: 10px;
}
.rowAc {
margin-left: 10px;
......
......@@ -53,6 +53,7 @@
</template>
<script>
import * as echarts from "echarts";
import XLSX from 'xlsx';
export default {
components: {},
data() {
......@@ -102,7 +103,25 @@ export default {
}
},
// 导出
derive() {},
// 导出
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);
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');
},
// 查询
handleSearch() {
console.log("dateRange", this.dateRange);
......@@ -135,8 +154,6 @@ export default {
<span font-size: 16px; font-weight: 600;"> ${params.name}: ${
Number(params.value).toFixed(2) + "%"
} </span>
</div>`;
},
},
......
......@@ -59,6 +59,9 @@ module.exports = {
entry: {
app: './src/main.js'
},
externals: [{
'./cptable': 'var cptable'
}],
resolve: {
alias: {
'@': resolve('src')
......