style:新增excel导出
Showing
7 changed files
with
203 additions
and
64 deletions
... | @@ -11,10 +11,10 @@ | ... | @@ -11,10 +11,10 @@ |
11 | "@jiaminghi/data-view": "^2.10.0", | 11 | "@jiaminghi/data-view": "^2.10.0", |
12 | "axios": "^0.21.1", | 12 | "axios": "^0.21.1", |
13 | "clipboard": "^2.0.11", | 13 | "clipboard": "^2.0.11", |
14 | "jsoneditor": "^9.9.2", | ||
15 | "core-js": "^3.6.5", | 14 | "core-js": "^3.6.5", |
16 | "echarts": "^4.6.0", | 15 | "echarts": "^4.6.0", |
17 | "js-cookie": "2.2.0", | 16 | "js-cookie": "2.2.0", |
17 | "jsoneditor": "^9.9.2", | ||
18 | "lodash": "^4.17.21", | 18 | "lodash": "^4.17.21", |
19 | "node-sass": "^4.14.1", | 19 | "node-sass": "^4.14.1", |
20 | "normalize.css": "7.0.0", | 20 | "normalize.css": "7.0.0", |
... | @@ -22,6 +22,7 @@ | ... | @@ -22,6 +22,7 @@ |
22 | "vue": "2.6.10", | 22 | "vue": "2.6.10", |
23 | "vue-awesome": "^4.5.0", | 23 | "vue-awesome": "^4.5.0", |
24 | "vue-json-editor": "^1.4.3", | 24 | "vue-json-editor": "^1.4.3", |
25 | "vue-json-excel": "^0.3.0", | ||
25 | "vue-router": "3.0.2", | 26 | "vue-router": "3.0.2", |
26 | "vuex": "3.1.0", | 27 | "vuex": "3.1.0", |
27 | "xe-utils": "^3.5.7" | 28 | "xe-utils": "^3.5.7" | ... | ... |
... | @@ -6,7 +6,7 @@ import '@/styles/element-variables.scss' | ... | @@ -6,7 +6,7 @@ import '@/styles/element-variables.scss' |
6 | import '@/styles/index.scss' | 6 | import '@/styles/index.scss' |
7 | import Base from './base' // 全局组件引入 | 7 | import Base from './base' // 全局组件引入 |
8 | import mixin from '@/utils/mixin/theme.js' | 8 | import mixin from '@/utils/mixin/theme.js' |
9 | 9 | import JsonExcel from 'vue-json-excel' | |
10 | import dataV from '@jiaminghi/data-view'; | 10 | import dataV from '@jiaminghi/data-view'; |
11 | import echarts from "echarts" | 11 | import echarts from "echarts" |
12 | import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading' | 12 | import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading' |
... | @@ -44,6 +44,7 @@ import _ from 'lodash' | ... | @@ -44,6 +44,7 @@ import _ from 'lodash' |
44 | import './permission' // permission control | 44 | import './permission' // permission control |
45 | Vue.use(Element, { size: 'small', zIndex: 1000 }) | 45 | Vue.use(Element, { size: 'small', zIndex: 1000 }) |
46 | Vue.use(Base) | 46 | Vue.use(Base) |
47 | Vue.component('downloadExcel', JsonExcel) | ||
47 | Vue.component('icon', Icon); | 48 | Vue.component('icon', Icon); |
48 | Vue.prototype.$echarts = echarts | 49 | Vue.prototype.$echarts = echarts |
49 | Vue.use(dataV) | 50 | Vue.use(dataV) | ... | ... |
... | @@ -25,6 +25,10 @@ | ... | @@ -25,6 +25,10 @@ |
25 | <el-form-item> | 25 | <el-form-item> |
26 | <btn nativeType="cz" @click="handleResetForm">重置</btn> | 26 | <btn nativeType="cz" @click="handleResetForm">重置</btn> |
27 | <btn nativeType="cx" @click="handleSearch">查询</btn> | 27 | <btn nativeType="cx" @click="handleSearch">查询</btn> |
28 | <download-excel class="export-excel-wrapper" :data="DetailsForm" :fields="json_fields" :header="title" | ||
29 | name="需要导出的表格名字.xls"> | ||
30 | <btn nativeType="cx">导出</btn> | ||
31 | </download-excel> | ||
28 | </el-form-item> | 32 | </el-form-item> |
29 | </el-col> | 33 | </el-col> |
30 | </el-row> | 34 | </el-row> |
... | @@ -111,8 +115,36 @@ export default { | ... | @@ -111,8 +115,36 @@ export default { |
111 | total: 0, | 115 | total: 0, |
112 | pageSize: 10, | 116 | pageSize: 10, |
113 | current: 1 | 117 | current: 1 |
118 | }, | ||
119 | // 表格导出 | ||
120 | title: "xx公司表格", | ||
121 | json_fields: { | ||
122 | "排查日期": 'date', | ||
123 | "整改隐患内容": 'details', | ||
124 | "整改措施": 'measure', | ||
125 | "整改时限": 'timeLimit', | ||
126 | "应急措施和预案": 'plan', | ||
127 | "整改责任人": 'personInCharge', | ||
128 | "填表人": 'preparer', | ||
129 | "整改资金": 'fund', | ||
130 | "整改完成情况": 'complete', | ||
131 | "备注": 'remark', | ||
132 | }, | ||
133 | DetailsForm: [ | ||
134 | { | ||
135 | date: "2022-3-10", | ||
136 | details: "卸油区过路灯损坏", | ||
137 | measure: "更换灯泡", | ||
138 | timeLimit: "2022-3-21", | ||
139 | plan: "先使用充电灯代替,贴好安全提醒告示", | ||
140 | personInCharge: "王xx", | ||
141 | preparer: "王xx", | ||
142 | fund: "20元", | ||
143 | complete: "已完成整改", | ||
144 | remark: "重新更换了灯泡", | ||
145 | } | ||
146 | ] | ||
114 | } | 147 | } |
115 | }; | ||
116 | }, | 148 | }, |
117 | created () { | 149 | created () { |
118 | this.handleResetForm() | 150 | this.handleResetForm() | ... | ... |
... | @@ -7,100 +7,108 @@ class data extends filter { | ... | @@ -7,100 +7,108 @@ class data extends filter { |
7 | return [ | 7 | return [ |
8 | { | 8 | { |
9 | label: "行政区划", | 9 | label: "行政区划", |
10 | type: "xzqh", | 10 | prop: "xzqh", |
11 | width: '80' | 11 | width: '80' |
12 | }, | 12 | }, |
13 | { | 13 | { |
14 | label: '国有建设用地使用权', | 14 | label: '国有建设用地使用权', |
15 | prop: "", | ||
15 | children: [ | 16 | children: [ |
16 | { | 17 | { |
17 | label: '用途', | 18 | label: '用途', |
19 | prop: "", | ||
18 | children: [ | 20 | children: [ |
19 | { | 21 | { |
20 | label: '空项率', | 22 | label: '空项率', |
21 | type: "xx", | 23 | prop: "xx", |
22 | }, | 24 | }, |
23 | { | 25 | { |
24 | label: '分值', | 26 | label: '分值', |
25 | type: "xx", | 27 | prop: "xx", |
26 | } | 28 | } |
27 | ] | 29 | ] |
28 | }, | 30 | }, |
29 | { | 31 | { |
30 | label: '权利性质', | 32 | label: '权利性质', |
33 | prop: "", | ||
31 | children: [ | 34 | children: [ |
32 | { | 35 | { |
33 | label: '空项率', | 36 | label: '空项率', |
34 | type: "xx", | 37 | prop: "xx", |
35 | }, | 38 | }, |
36 | { | 39 | { |
37 | label: '分值', | 40 | label: '分值', |
38 | type: "xx", | 41 | prop: "xx", |
39 | } | 42 | } |
40 | ] | 43 | ] |
41 | }, | 44 | }, |
42 | { | 45 | { |
43 | label: '权利设定方式', | 46 | label: '权利设定方式', |
47 | prop: "", | ||
44 | children: [ | 48 | children: [ |
45 | { | 49 | { |
46 | label: '空项率', | 50 | label: '空项率', |
47 | type: "xx", | 51 | prop: "xx", |
48 | }, | 52 | }, |
49 | { | 53 | { |
50 | label: '分值', | 54 | label: '分值', |
51 | type: "xx", | 55 | prop: "xx", |
52 | } | 56 | } |
53 | ] | 57 | ] |
54 | }, | 58 | }, |
55 | { | 59 | { |
56 | label: '权利设定方式', | 60 | label: '权利设定方式', |
61 | prop: "", | ||
57 | children: [ | 62 | children: [ |
58 | { | 63 | { |
59 | label: '空项率', | 64 | label: '空项率', |
60 | type: "xx", | 65 | prop: "xx", |
61 | }, | 66 | }, |
62 | { | 67 | { |
63 | label: '分值', | 68 | label: '分值', |
64 | type: "xx", | 69 | prop: "xx", |
65 | } | 70 | } |
66 | ] | 71 | ] |
67 | }, | 72 | }, |
68 | { | 73 | { |
69 | label: ' 共有情况(建设用地)', | 74 | label: ' 共有情况(建设用地)', |
75 | prop: "", | ||
70 | children: [ | 76 | children: [ |
71 | { | 77 | { |
72 | label: '空项率', | 78 | label: '空项率', |
73 | type: "xx", | 79 | prop: "xx", |
74 | }, | 80 | }, |
75 | { | 81 | { |
76 | label: '分值', | 82 | label: '分值', |
77 | type: "xx", | 83 | prop: "xx", |
78 | } | 84 | } |
79 | ] | 85 | ] |
80 | }, | 86 | }, |
81 | { | 87 | { |
82 | label: ' 等别', | 88 | label: '等别', |
89 | prop: "", | ||
83 | children: [ | 90 | children: [ |
84 | { | 91 | { |
85 | label: '空项率', | 92 | label: '空项率', |
86 | type: "xx", | 93 | prop: "xx", |
87 | }, | 94 | }, |
88 | { | 95 | { |
89 | label: '分值', | 96 | label: '分值', |
90 | type: "xx", | 97 | prop: "xx", |
91 | } | 98 | } |
92 | ] | 99 | ] |
93 | }, | 100 | }, |
94 | { | 101 | { |
95 | label: ' 容积率', | 102 | label: ' 容积率', |
103 | prop: "", | ||
96 | children: [ | 104 | children: [ |
97 | { | 105 | { |
98 | label: '空项率', | 106 | label: '空项率', |
99 | type: "xx", | 107 | prop: "xx", |
100 | }, | 108 | }, |
101 | { | 109 | { |
102 | label: '分值', | 110 | label: '分值', |
103 | type: "xx", | 111 | prop: "xx", |
104 | } | 112 | } |
105 | ] | 113 | ] |
106 | }, | 114 | }, |
... | @@ -108,56 +116,61 @@ class data extends filter { | ... | @@ -108,56 +116,61 @@ class data extends filter { |
108 | }, | 116 | }, |
109 | { | 117 | { |
110 | label: '房屋所有权', | 118 | label: '房屋所有权', |
119 | prop: "", | ||
111 | children: [ | 120 | children: [ |
112 | { | 121 | { |
113 | label: '房屋共有情况', | 122 | label: '房屋共有情况', |
123 | prop: "", | ||
114 | children: [ | 124 | children: [ |
115 | { | 125 | { |
116 | label: '空项率', | 126 | label: '空项率', |
117 | type: "xx", | 127 | prop: "xx", |
118 | }, | 128 | }, |
119 | { | 129 | { |
120 | label: '分值', | 130 | label: '分值', |
121 | type: "xx", | 131 | prop: "xx", |
122 | } | 132 | } |
123 | ] | 133 | ] |
124 | }, | 134 | }, |
125 | { | 135 | { |
126 | label: '房屋性质', | 136 | label: '房屋性质', |
137 | prop: "", | ||
127 | children: [ | 138 | children: [ |
128 | { | 139 | { |
129 | label: '空项率', | 140 | label: '空项率', |
130 | type: "xx", | 141 | prop: "xx", |
131 | }, | 142 | }, |
132 | { | 143 | { |
133 | label: '分值', | 144 | label: '分值', |
134 | type: "xx", | 145 | prop: "xx", |
135 | } | 146 | } |
136 | ] | 147 | ] |
137 | }, | 148 | }, |
138 | { | 149 | { |
139 | label: '房屋结构', | 150 | label: '房屋结构', |
151 | prop: "", | ||
140 | children: [ | 152 | children: [ |
141 | { | 153 | { |
142 | label: '空项率', | 154 | label: '空项率', |
143 | type: "xx", | 155 | prop: "xx", |
144 | }, | 156 | }, |
145 | { | 157 | { |
146 | label: '分值', | 158 | label: '分值', |
147 | type: "xx", | 159 | prop: "xx", |
148 | } | 160 | } |
149 | ] | 161 | ] |
150 | }, | 162 | }, |
151 | { | 163 | { |
152 | label: '竣工时间', | 164 | label: '竣工时间', |
165 | prop: "", | ||
153 | children: [ | 166 | children: [ |
154 | { | 167 | { |
155 | label: '空项率', | 168 | label: '空项率', |
156 | type: "xx", | 169 | prop: "xx", |
157 | }, | 170 | }, |
158 | { | 171 | { |
159 | label: '分值', | 172 | label: '分值', |
160 | type: "xx", | 173 | prop: "xx", |
161 | } | 174 | } |
162 | ] | 175 | ] |
163 | } | 176 | } |
... | @@ -165,16 +178,18 @@ class data extends filter { | ... | @@ -165,16 +178,18 @@ class data extends filter { |
165 | }, | 178 | }, |
166 | { | 179 | { |
167 | label: '抵押权', | 180 | label: '抵押权', |
181 | prop: "", | ||
168 | children: [ | 182 | children: [ |
169 | { | 183 | { |
170 | label: '债务履行期限(债权确定时间)', | 184 | label: '债务履行期限(债权确定时间)', |
185 | prop: "", | ||
171 | children: [ | 186 | children: [ |
172 | { | 187 | { |
173 | type: 'xxx', | 188 | prop: 'xxx', |
174 | label: '空项率', | 189 | label: '空项率', |
175 | }, | 190 | }, |
176 | { | 191 | { |
177 | type: 'xxx', | 192 | prop: 'xxx', |
178 | label: '分值', | 193 | label: '分值', |
179 | } | 194 | } |
180 | ] | 195 | ] |
... | @@ -183,16 +198,18 @@ class data extends filter { | ... | @@ -183,16 +198,18 @@ class data extends filter { |
183 | }, | 198 | }, |
184 | { | 199 | { |
185 | label: '最高额抵押', | 200 | label: '最高额抵押', |
201 | prop: "", | ||
186 | children: [ | 202 | children: [ |
187 | { | 203 | { |
188 | label: '最高债权确定事实和数额', | 204 | label: '最高债权确定事实和数额', |
205 | prop: "", | ||
189 | children: [ | 206 | children: [ |
190 | { | 207 | { |
191 | type: 'xxx', | 208 | prop: 'xxx', |
192 | label: '空项率', | 209 | label: '空项率', |
193 | }, | 210 | }, |
194 | { | 211 | { |
195 | type: 'xxx', | 212 | prop: 'xxx', |
196 | label: '分值', | 213 | label: '分值', |
197 | } | 214 | } |
198 | ] | 215 | ] |
... | @@ -201,29 +218,32 @@ class data extends filter { | ... | @@ -201,29 +218,32 @@ class data extends filter { |
201 | }, | 218 | }, |
202 | { | 219 | { |
203 | label: '在建建筑物坐落(一般)', | 220 | label: '在建建筑物坐落(一般)', |
221 | prop: "", | ||
204 | children: [ | 222 | children: [ |
205 | { | 223 | { |
206 | label: '在建建筑物坐落', | 224 | label: '在建建筑物坐落', |
225 | prop: "", | ||
207 | children: [ | 226 | children: [ |
208 | { | 227 | { |
209 | type: 'xxx', | 228 | prop: 'xxx', |
210 | label: '空项率', | 229 | label: '空项率', |
211 | }, | 230 | }, |
212 | { | 231 | { |
213 | type: 'xxx', | 232 | prop: 'xxx', |
214 | label: '分值', | 233 | label: '分值', |
215 | } | 234 | } |
216 | ] | 235 | ] |
217 | }, | 236 | }, |
218 | { | 237 | { |
219 | label: '在建建筑物抵押范围', | 238 | label: '在建建筑物抵押范围', |
239 | prop: "", | ||
220 | children: [ | 240 | children: [ |
221 | { | 241 | { |
222 | type: 'xxx', | 242 | prop: 'xxx', |
223 | label: '空项率', | 243 | label: '空项率', |
224 | }, | 244 | }, |
225 | { | 245 | { |
226 | type: 'xxx', | 246 | prop: 'xxx', |
227 | label: '分值', | 247 | label: '分值', |
228 | } | 248 | } |
229 | ] | 249 | ] |
... | @@ -232,29 +252,32 @@ class data extends filter { | ... | @@ -232,29 +252,32 @@ class data extends filter { |
232 | }, | 252 | }, |
233 | { | 253 | { |
234 | label: '在建建筑物坐落(最高额)', | 254 | label: '在建建筑物坐落(最高额)', |
255 | prop: "", | ||
235 | children: [ | 256 | children: [ |
236 | { | 257 | { |
237 | label: '在建建筑物坐落', | 258 | label: '在建建筑物坐落', |
259 | prop: "", | ||
238 | children: [ | 260 | children: [ |
239 | { | 261 | { |
240 | type: 'xxx', | 262 | prop: 'xxx', |
241 | label: '空项率', | 263 | label: '空项率', |
242 | }, | 264 | }, |
243 | { | 265 | { |
244 | type: 'xxx', | 266 | prop: 'xxx', |
245 | label: '分值', | 267 | label: '分值', |
246 | } | 268 | } |
247 | ] | 269 | ] |
248 | }, | 270 | }, |
249 | { | 271 | { |
250 | label: '在建建筑物抵押范围', | 272 | label: '在建建筑物抵押范围', |
273 | prop: "", | ||
251 | children: [ | 274 | children: [ |
252 | { | 275 | { |
253 | type: 'xxx', | 276 | prop: 'xxx', |
254 | label: '空项率', | 277 | label: '空项率', |
255 | }, | 278 | }, |
256 | { | 279 | { |
257 | type: 'xxx', | 280 | prop: 'xxx', |
258 | label: '分值', | 281 | label: '分值', |
259 | } | 282 | } |
260 | ] | 283 | ] |
... | @@ -263,29 +286,32 @@ class data extends filter { | ... | @@ -263,29 +286,32 @@ class data extends filter { |
263 | }, | 286 | }, |
264 | { | 287 | { |
265 | label: '抵押注销', | 288 | label: '抵押注销', |
289 | prop: "", | ||
266 | children: [ | 290 | children: [ |
267 | { | 291 | { |
268 | label: '注销抵押原因', | 292 | label: '注销抵押原因', |
293 | prop: "", | ||
269 | children: [ | 294 | children: [ |
270 | { | 295 | { |
271 | type: 'xxx', | 296 | prop: 'xxx', |
272 | label: '空项率', | 297 | label: '空项率', |
273 | }, | 298 | }, |
274 | { | 299 | { |
275 | type: 'xxx', | 300 | prop: 'xxx', |
276 | label: '分值', | 301 | label: '分值', |
277 | } | 302 | } |
278 | ] | 303 | ] |
279 | }, | 304 | }, |
280 | { | 305 | { |
281 | label: '注销时间', | 306 | label: '注销时间', |
307 | prop: "", | ||
282 | children: [ | 308 | children: [ |
283 | { | 309 | { |
284 | type: 'xxx', | 310 | prop: 'xxx', |
285 | label: '空项率', | 311 | label: '空项率', |
286 | }, | 312 | }, |
287 | { | 313 | { |
288 | type: 'xxx', | 314 | prop: 'xxx', |
289 | label: '分值', | 315 | label: '分值', |
290 | } | 316 | } |
291 | ] | 317 | ] |
... | @@ -294,55 +320,60 @@ class data extends filter { | ... | @@ -294,55 +320,60 @@ class data extends filter { |
294 | }, | 320 | }, |
295 | { | 321 | { |
296 | label: '预告登记', | 322 | label: '预告登记', |
323 | prop: "", | ||
297 | children: [ | 324 | children: [ |
298 | { | 325 | { |
299 | label: '义务人证件种类', | 326 | label: '义务人证件种类', |
327 | prop: "", | ||
300 | children: [ | 328 | children: [ |
301 | { | 329 | { |
302 | type: 'xxx', | 330 | prop: 'xxx', |
303 | label: '空项率', | 331 | label: '空项率', |
304 | }, | 332 | }, |
305 | { | 333 | { |
306 | type: 'xxx', | 334 | prop: 'xxx', |
307 | label: '分值', | 335 | label: '分值', |
308 | } | 336 | } |
309 | ] | 337 | ] |
310 | }, | 338 | }, |
311 | { | 339 | { |
312 | label: '义务人证件号', | 340 | label: '义务人证件号', |
341 | prop: "", | ||
313 | children: [ | 342 | children: [ |
314 | { | 343 | { |
315 | type: 'xxx', | 344 | prop: 'xxx', |
316 | label: '空项率', | 345 | label: '空项率', |
317 | }, | 346 | }, |
318 | { | 347 | { |
319 | type: 'xxx', | 348 | prop: 'xxx', |
320 | label: '分值', | 349 | label: '分值', |
321 | } | 350 | } |
322 | ] | 351 | ] |
323 | }, | 352 | }, |
324 | { | 353 | { |
325 | label: '规划用途', | 354 | label: '规划用途', |
355 | prop: "", | ||
326 | children: [ | 356 | children: [ |
327 | { | 357 | { |
328 | type: 'xxx', | 358 | prop: 'xxx', |
329 | label: '空项率', | 359 | label: '空项率', |
330 | }, | 360 | }, |
331 | { | 361 | { |
332 | type: 'xxx', | 362 | prop: 'xxx', |
333 | label: '分值', | 363 | label: '分值', |
334 | } | 364 | } |
335 | ] | 365 | ] |
336 | }, | 366 | }, |
337 | { | 367 | { |
338 | label: '房屋性质', | 368 | label: '房屋性质', |
369 | prop: "", | ||
339 | children: [ | 370 | children: [ |
340 | { | 371 | { |
341 | type: 'xxx', | 372 | prop: 'xxx', |
342 | label: '空项率', | 373 | label: '空项率', |
343 | }, | 374 | }, |
344 | { | 375 | { |
345 | type: 'xxx', | 376 | prop: 'xxx', |
346 | label: '分值', | 377 | label: '分值', |
347 | } | 378 | } |
348 | ] | 379 | ] |
... | @@ -351,68 +382,74 @@ class data extends filter { | ... | @@ -351,68 +382,74 @@ class data extends filter { |
351 | }, | 382 | }, |
352 | { | 383 | { |
353 | label: '查封登记', | 384 | label: '查封登记', |
385 | prop: "", | ||
354 | children: [ | 386 | children: [ |
355 | { | 387 | { |
356 | label: '解封机关', | 388 | label: '解封机关', |
389 | prop: "", | ||
357 | children: [ | 390 | children: [ |
358 | { | 391 | { |
359 | type: 'xxx', | 392 | prop: 'xxx', |
360 | label: '空项率', | 393 | label: '空项率', |
361 | }, | 394 | }, |
362 | { | 395 | { |
363 | type: 'xxx', | 396 | prop: 'xxx', |
364 | label: '分值', | 397 | label: '分值', |
365 | } | 398 | } |
366 | ] | 399 | ] |
367 | }, | 400 | }, |
368 | { | 401 | { |
369 | label: '解封文件', | 402 | label: '解封文件', |
403 | prop: "", | ||
370 | children: [ | 404 | children: [ |
371 | { | 405 | { |
372 | type: 'xxx', | 406 | prop: 'xxx', |
373 | label: '空项率', | 407 | label: '空项率', |
374 | }, | 408 | }, |
375 | { | 409 | { |
376 | type: 'xxx', | 410 | prop: 'xxx', |
377 | label: '分值', | 411 | label: '分值', |
378 | } | 412 | } |
379 | ] | 413 | ] |
380 | }, | 414 | }, |
381 | { | 415 | { |
382 | label: '解封登记时间', | 416 | label: '解封登记时间', |
417 | prop: "", | ||
383 | children: [ | 418 | children: [ |
384 | { | 419 | { |
385 | type: 'xxx', | 420 | prop: 'xxx', |
386 | label: '空项率', | 421 | label: '空项率', |
387 | }, | 422 | }, |
388 | { | 423 | { |
389 | type: 'xxx', | 424 | prop: 'xxx', |
390 | label: '分值', | 425 | label: '分值', |
391 | } | 426 | } |
392 | ] | 427 | ] |
393 | }, | 428 | }, |
394 | { | 429 | { |
395 | label: '解封登簿人', | 430 | label: '解封登簿人', |
431 | prop: "", | ||
396 | children: [ | 432 | children: [ |
397 | { | 433 | { |
398 | type: 'xxx', | 434 | prop: 'xxx', |
399 | label: '空项率', | 435 | label: '空项率', |
400 | }, | 436 | }, |
401 | { | 437 | { |
402 | type: 'xxx', | 438 | prop: 'xxx', |
403 | label: '分值', | 439 | label: '分值', |
404 | } | 440 | } |
405 | ] | 441 | ] |
406 | }, | 442 | }, |
407 | { | 443 | { |
408 | label: '解封业务号', | 444 | label: '解封业务号', |
445 | prop: "", | ||
409 | children: [ | 446 | children: [ |
410 | { | 447 | { |
411 | type: 'xxx', | 448 | prop: 'xxx', |
412 | label: '空项率', | 449 | label: '空项率', |
413 | }, | 450 | }, |
414 | { | 451 | { |
415 | type: 'xxx', | 452 | prop: 'xxx', |
416 | label: '分值', | 453 | label: '分值', |
417 | } | 454 | } |
418 | ] | 455 | ] | ... | ... |
... | @@ -22,9 +22,14 @@ | ... | @@ -22,9 +22,14 @@ |
22 | </el-col> | 22 | </el-col> |
23 | <!-- 按钮操作 --> | 23 | <!-- 按钮操作 --> |
24 | <el-col :span="12" class="btnColRight"> | 24 | <el-col :span="12" class="btnColRight"> |
25 | <el-form-item> | 25 | <el-form-item class="d-flex"> |
26 | <btn nativeType="cz" @click="handleResetForm">重置</btn> | 26 | <btn nativeType="cz" @click="handleResetForm">重置</btn> |
27 | <!-- 导出excel --> | ||
27 | <btn nativeType="cx" @click="handleSearch">查询</btn> | 28 | <btn nativeType="cx" @click="handleSearch">查询</btn> |
29 | <download-excel class="export-excel-wrapper" :data="DetailsForm" :fields="json_fields" :header="title" | ||
30 | name="需要导出的表格名字.xls"> | ||
31 | <btn nativeType="cx">导出</btn> | ||
32 | </download-excel> | ||
28 | </el-form-item> | 33 | </el-form-item> |
29 | </el-col> | 34 | </el-col> |
30 | </el-row> | 35 | </el-row> |
... | @@ -111,8 +116,36 @@ export default { | ... | @@ -111,8 +116,36 @@ export default { |
111 | total: 0, | 116 | total: 0, |
112 | pageSize: 10, | 117 | pageSize: 10, |
113 | current: 1 | 118 | current: 1 |
119 | }, | ||
120 | // 表格导出 | ||
121 | title: "xx公司表格", | ||
122 | json_fields: { | ||
123 | "排查日期": 'date', | ||
124 | "整改隐患内容": 'details', | ||
125 | "整改措施": 'measure', | ||
126 | "整改时限": 'timeLimit', | ||
127 | "应急措施和预案": 'plan', | ||
128 | "整改责任人": 'personInCharge', | ||
129 | "填表人": 'preparer', | ||
130 | "整改资金": 'fund', | ||
131 | "整改完成情况": 'complete', | ||
132 | "备注": 'remark', | ||
133 | }, | ||
134 | DetailsForm: [ | ||
135 | { | ||
136 | date: "2022-3-10", | ||
137 | details: "卸油区过路灯损坏", | ||
138 | measure: "更换灯泡", | ||
139 | timeLimit: "2022-3-21", | ||
140 | plan: "先使用充电灯代替,贴好安全提醒告示", | ||
141 | personInCharge: "王xx", | ||
142 | preparer: "王xx", | ||
143 | fund: "20元", | ||
144 | complete: "已完成整改", | ||
145 | remark: "重新更换了灯泡", | ||
146 | } | ||
147 | ] | ||
114 | } | 148 | } |
115 | }; | ||
116 | }, | 149 | }, |
117 | created () { | 150 | created () { |
118 | this.handleResetForm() | 151 | this.handleResetForm() | ... | ... |
... | @@ -25,6 +25,10 @@ | ... | @@ -25,6 +25,10 @@ |
25 | <el-form-item> | 25 | <el-form-item> |
26 | <btn nativeType="cz" @click="handleResetForm">重置</btn> | 26 | <btn nativeType="cz" @click="handleResetForm">重置</btn> |
27 | <btn nativeType="cx" @click="handleSearch">查询</btn> | 27 | <btn nativeType="cx" @click="handleSearch">查询</btn> |
28 | <download-excel class="export-excel-wrapper" :data="DetailsForm" :fields="json_fields" :header="title" | ||
29 | name="需要导出的表格名字.xls"> | ||
30 | <btn nativeType="cx">导出</btn> | ||
31 | </download-excel> | ||
28 | </el-form-item> | 32 | </el-form-item> |
29 | </el-col> | 33 | </el-col> |
30 | </el-row> | 34 | </el-row> |
... | @@ -111,8 +115,36 @@ export default { | ... | @@ -111,8 +115,36 @@ export default { |
111 | total: 0, | 115 | total: 0, |
112 | pageSize: 10, | 116 | pageSize: 10, |
113 | current: 1 | 117 | current: 1 |
118 | }, | ||
119 | // 表格导出 | ||
120 | title: "xx公司表格", | ||
121 | json_fields: { | ||
122 | "排查日期": 'date', | ||
123 | "整改隐患内容": 'details', | ||
124 | "整改措施": 'measure', | ||
125 | "整改时限": 'timeLimit', | ||
126 | "应急措施和预案": 'plan', | ||
127 | "整改责任人": 'personInCharge', | ||
128 | "填表人": 'preparer', | ||
129 | "整改资金": 'fund', | ||
130 | "整改完成情况": 'complete', | ||
131 | "备注": 'remark', | ||
132 | }, | ||
133 | DetailsForm: [ | ||
134 | { | ||
135 | date: "2022-3-10", | ||
136 | details: "卸油区过路灯损坏", | ||
137 | measure: "更换灯泡", | ||
138 | timeLimit: "2022-3-21", | ||
139 | plan: "先使用充电灯代替,贴好安全提醒告示", | ||
140 | personInCharge: "王xx", | ||
141 | preparer: "王xx", | ||
142 | fund: "20元", | ||
143 | complete: "已完成整改", | ||
144 | remark: "重新更换了灯泡", | ||
145 | } | ||
146 | ] | ||
114 | } | 147 | } |
115 | }; | ||
116 | }, | 148 | }, |
117 | created () { | 149 | created () { |
118 | this.handleResetForm() | 150 | this.handleResetForm() | ... | ... |
-
Please register or sign in to post a comment