--no commit message
Showing
5 changed files
with
57 additions
and
16 deletions
... | @@ -34,7 +34,9 @@ | ... | @@ -34,7 +34,9 @@ |
34 | "vue-router": "3.0.2", | 34 | "vue-router": "3.0.2", |
35 | "vue-seamless-scroll": "^1.1.23", | 35 | "vue-seamless-scroll": "^1.1.23", |
36 | "vuex": "3.1.0", | 36 | "vuex": "3.1.0", |
37 | "x2js": "^3.4.4" | 37 | "x2js": "^3.4.4", |
38 | "xlsx": "^0.17.0", | ||
39 | "xlsx-style": "^0.8.13" | ||
38 | }, | 40 | }, |
39 | "devDependencies": { | 41 | "devDependencies": { |
40 | "@vue/cli-plugin-babel": "4.4.4", | 42 | "@vue/cli-plugin-babel": "4.4.4", | ... | ... |
... | @@ -60,9 +60,7 @@ | ... | @@ -60,9 +60,7 @@ |
60 | </template> | 60 | </template> |
61 | <script> | 61 | <script> |
62 | import { getBdcqljqtsx, getBdcqljqtsxBdcdyh } from "@/api/djbDetail.js"; | 62 | import { getBdcqljqtsx, getBdcqljqtsxBdcdyh } from "@/api/djbDetail.js"; |
63 | import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; | 63 | import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; |
64 | import { searchTaskToDo } from "@/api/workflow/search.js"; | ||
65 | import { leftMenu } from "@/api/workFlow.js"; | ||
66 | export default { | 64 | export default { |
67 | data() { | 65 | data() { |
68 | return { | 66 | return { | ... | ... |
... | @@ -52,7 +52,8 @@ | ... | @@ -52,7 +52,8 @@ |
52 | </div> | 52 | </div> |
53 | </template> | 53 | </template> |
54 | <script> | 54 | <script> |
55 | import * as echarts from "echarts"; | 55 | import * as echarts from "echarts" |
56 | import XLSX from 'xlsx'; | ||
56 | export default { | 57 | export default { |
57 | components: {}, | 58 | components: {}, |
58 | data() { | 59 | data() { |
... | @@ -92,7 +93,6 @@ export default { | ... | @@ -92,7 +93,6 @@ export default { |
92 | // 在 ECharts 实例中配置图表 | 93 | // 在 ECharts 实例中配置图表 |
93 | this.chart.setOption(this.getOption()); | 94 | this.chart.setOption(this.getOption()); |
94 | this.chooseDateQuick(0); | 95 | this.chooseDateQuick(0); |
95 | |||
96 | }, | 96 | }, |
97 | methods: { | 97 | methods: { |
98 | setdata() { | 98 | setdata() { |
... | @@ -102,7 +102,24 @@ export default { | ... | @@ -102,7 +102,24 @@ export default { |
102 | } | 102 | } |
103 | }, | 103 | }, |
104 | // 导出 | 104 | // 导出 |
105 | derive() {}, | 105 | derive() { |
106 | this.exdata = [ | ||
107 | ['受理人员', '收件数','退件数','推荐率'] | ||
108 | ]; | ||
109 | this.xAxisData.forEach((item,index) => { | ||
110 | console.log("this.exdata[index+1]",this.exdata[index+1]); | ||
111 | this.exdata.push([]) | ||
112 | this.exdata[index+1].push(item) | ||
113 | this.exdata[index+1].push(this.data1[index]) | ||
114 | this.exdata[index+1].push(this.data2[index]) | ||
115 | this.exdata[index+1].push(this.data3[index]) | ||
116 | }) | ||
117 | console.log("this.exdata",this.exdata); | ||
118 | const ws = XLSX.utils.aoa_to_sheet(this.exdata); | ||
119 | const wb = XLSX.utils.book_new(); | ||
120 | XLSX.utils.book_append_sheet(wb, ws, 'Sheet1'); | ||
121 | XLSX.writeFile(wb, '收件与超时统计情况.xlsx'); | ||
122 | }, | ||
106 | // 查询 | 123 | // 查询 |
107 | handleSearch() { | 124 | handleSearch() { |
108 | console.log("dateRange", this.dateRange); | 125 | console.log("dateRange", this.dateRange); |
... | @@ -289,10 +306,16 @@ export default { | ... | @@ -289,10 +306,16 @@ export default { |
289 | return `${year}-${month}-${day}`; | 306 | return `${year}-${month}-${day}`; |
290 | }, | 307 | }, |
291 | // 某日期向前/向后num天 | 308 | // 某日期向前/向后num天 |
292 | jumpNumDay(date, num, linkStr = '-') { | 309 | jumpNumDay(date, num, linkStr = "-") { |
293 | date = new Date(date.getTime() + (num * 24 * 60 * 60 * 1000)) | 310 | date = new Date(date.getTime() + num * 24 * 60 * 60 * 1000); |
294 | return date.getFullYear() + linkStr + this.changeNum(date.getMonth() + 1) + linkStr + this.changeNum(date.getDate()) | 311 | return ( |
295 | }, | 312 | date.getFullYear() + |
313 | linkStr + | ||
314 | this.changeNum(date.getMonth() + 1) + | ||
315 | linkStr + | ||
316 | this.changeNum(date.getDate()) | ||
317 | ); | ||
318 | }, | ||
296 | }, | 319 | }, |
297 | }; | 320 | }; |
298 | </script> | 321 | </script> |
... | @@ -306,8 +329,6 @@ jumpNumDay(date, num, linkStr = '-') { | ... | @@ -306,8 +329,6 @@ jumpNumDay(date, num, linkStr = '-') { |
306 | padding-top: 3px; | 329 | padding-top: 3px; |
307 | background-color: #ffffff; | 330 | background-color: #ffffff; |
308 | margin-bottom: 10px; | 331 | margin-bottom: 10px; |
309 | |||
310 | |||
311 | } | 332 | } |
312 | .rowAc { | 333 | .rowAc { |
313 | margin-left: 10px; | 334 | margin-left: 10px; | ... | ... |
... | @@ -53,6 +53,7 @@ | ... | @@ -53,6 +53,7 @@ |
53 | </template> | 53 | </template> |
54 | <script> | 54 | <script> |
55 | import * as echarts from "echarts"; | 55 | import * as echarts from "echarts"; |
56 | import XLSX from 'xlsx'; | ||
56 | export default { | 57 | export default { |
57 | components: {}, | 58 | components: {}, |
58 | data() { | 59 | data() { |
... | @@ -102,7 +103,25 @@ export default { | ... | @@ -102,7 +103,25 @@ export default { |
102 | } | 103 | } |
103 | }, | 104 | }, |
104 | // 导出 | 105 | // 导出 |
105 | derive() {}, | 106 | // 导出 |
107 | derive() { | ||
108 | this.exdata = [ | ||
109 | ['受理人员', '收件数','退件数','推荐率'] | ||
110 | ]; | ||
111 | this.xAxisData.forEach((item,index) => { | ||
112 | console.log("this.exdata[index+1]",this.exdata[index+1]); | ||
113 | this.exdata.push([]) | ||
114 | this.exdata[index+1].push(item) | ||
115 | this.exdata[index+1].push(this.data1[index]) | ||
116 | this.exdata[index+1].push(this.data2[index]) | ||
117 | this.exdata[index+1].push(this.data3[index]) | ||
118 | }) | ||
119 | console.log("this.exdata",this.exdata); | ||
120 | const ws = XLSX.utils.aoa_to_sheet(this.exdata); | ||
121 | const wb = XLSX.utils.book_new(); | ||
122 | XLSX.utils.book_append_sheet(wb, ws, 'Sheet1'); | ||
123 | XLSX.writeFile(wb, '收件与退件统计情况.xlsx'); | ||
124 | }, | ||
106 | // 查询 | 125 | // 查询 |
107 | handleSearch() { | 126 | handleSearch() { |
108 | console.log("dateRange", this.dateRange); | 127 | console.log("dateRange", this.dateRange); |
... | @@ -135,8 +154,6 @@ export default { | ... | @@ -135,8 +154,6 @@ export default { |
135 | <span font-size: 16px; font-weight: 600;"> ${params.name}: ${ | 154 | <span font-size: 16px; font-weight: 600;"> ${params.name}: ${ |
136 | Number(params.value).toFixed(2) + "%" | 155 | Number(params.value).toFixed(2) + "%" |
137 | } </span> | 156 | } </span> |
138 | |||
139 | |||
140 | </div>`; | 157 | </div>`; |
141 | }, | 158 | }, |
142 | }, | 159 | }, | ... | ... |
... | @@ -59,6 +59,9 @@ module.exports = { | ... | @@ -59,6 +59,9 @@ module.exports = { |
59 | entry: { | 59 | entry: { |
60 | app: './src/main.js' | 60 | app: './src/main.js' |
61 | }, | 61 | }, |
62 | externals: [{ | ||
63 | './cptable': 'var cptable' | ||
64 | }], | ||
62 | resolve: { | 65 | resolve: { |
63 | alias: { | 66 | alias: { |
64 | '@': resolve('src') | 67 | '@': resolve('src') | ... | ... |
-
Please register or sign in to post a comment