fix:新增病害和路产导出
This commit is contained in:
		
							parent
							
								
									c661674306
								
							
						
					
					
						commit
						43c36aef02
					
				| @ -2,7 +2,7 @@ | |||||||
|  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git |  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git | ||||||
|  * @Date: 2024-10-08 09:26:24 |  * @Date: 2024-10-08 09:26:24 | ||||||
|  * @LastEditors: SunTao 328867980@qq.com |  * @LastEditors: SunTao 328867980@qq.com | ||||||
|  * @LastEditTime: 2024-11-05 13:54:44 |  * @LastEditTime: 2025-01-15 16:27:57 | ||||||
|  * @FilePath: \znxjxt-ui\src\api\xj\disease.js |  * @FilePath: \znxjxt-ui\src\api\xj\disease.js | ||||||
|  * @Description: 巡检信息-病害管理 |  * @Description: 巡检信息-病害管理 | ||||||
|  */ |  */ | ||||||
| @ -48,7 +48,7 @@ export function delDefect(data) { | |||||||
|   return request({ |   return request({ | ||||||
|     url: "/xj/defect/", |     url: "/xj/defect/", | ||||||
|     method: "delete", |     method: "delete", | ||||||
|     data |     data, | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -113,7 +113,6 @@ export function mergeDefect(data) { | |||||||
|   }); |   }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| // 拆分病害接口
 | // 拆分病害接口
 | ||||||
| export function splitDefect(data) { | export function splitDefect(data) { | ||||||
|   return request({ |   return request({ | ||||||
| @ -123,7 +122,6 @@ export function splitDefect(data) { | |||||||
|   }); |   }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| // 根据病害id查询快照id下拉
 | // 根据病害id查询快照id下拉
 | ||||||
| export function getDefectById(id) { | export function getDefectById(id) { | ||||||
|   return request({ |   return request({ | ||||||
| @ -133,7 +131,6 @@ export function getDefectById(id) { | |||||||
|   }); |   }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| // 根据快照id查询查询具体数据
 | // 根据快照id查询查询具体数据
 | ||||||
| export function getDetailsBySnapShotId(snapShotId) { | export function getDetailsBySnapShotId(snapShotId) { | ||||||
|   return request({ |   return request({ | ||||||
| @ -150,4 +147,14 @@ export function getTaskList(params) { | |||||||
|     method: "get", |     method: "get", | ||||||
|     params, |     params, | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | // 病害导出功能
 | ||||||
|  | export function exportDefectData(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: "/xj/defect/export", | ||||||
|  |     responseType: "blob", | ||||||
|  |     method: "post", | ||||||
|  |     data, | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | |||||||
| @ -62,12 +62,12 @@ export function deleteRoad(data) { | |||||||
| 
 | 
 | ||||||
| // 批量修改路产接口
 | // 批量修改路产接口
 | ||||||
| export function changeRoad(data) { | export function changeRoad(data) { | ||||||
|     return request({ |   return request({ | ||||||
|       url: "/xj/equipment/batch", |     url: "/xj/equipment/batch", | ||||||
|       method: "put", |     method: "put", | ||||||
|       data, |     data, | ||||||
|     }); |   }); | ||||||
|   } | } | ||||||
| 
 | 
 | ||||||
| //   路产详情接口
 | //   路产详情接口
 | ||||||
| export function detailRoad(id) { | export function detailRoad(id) { | ||||||
| @ -85,3 +85,13 @@ export function getTaskList(params) { | |||||||
|     params, |     params, | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | // 病害导出功能
 | ||||||
|  | export function exportRoadData(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: "/xj/equipment/export", | ||||||
|  |     responseType: "blob", | ||||||
|  |     method: "post", | ||||||
|  |     data, | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
|  * @Author: SunTao 328867980@qq.com |  * @Author: SunTao 328867980@qq.com | ||||||
|  * @Date: 2024-11-20 11:58:33 |  * @Date: 2024-11-20 11:58:33 | ||||||
|  * @LastEditors: SunTao 328867980@qq.com |  * @LastEditors: SunTao 328867980@qq.com | ||||||
|  * @LastEditTime: 2025-01-15 11:48:48 |  * @LastEditTime: 2025-01-15 16:18:16 | ||||||
|  * @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\components\edit-dialog.vue |  * @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\components\edit-dialog.vue | ||||||
|  * @Description: 养护通知单编辑弹窗 |  * @Description: 养护通知单编辑弹窗 | ||||||
| --> | --> | ||||||
| @ -92,9 +92,9 @@ | |||||||
|     <el-card shadow="never"> |     <el-card shadow="never"> | ||||||
|       <div slot="header" class="clearfix"> |       <div slot="header" class="clearfix"> | ||||||
|         <span>选择病害</span> |         <span>选择病害</span> | ||||||
|         <!-- <el-button style="float: right; padding: 3px 0" type="text" |         <el-button style="float: right; padding: 3px 0" type="text" | ||||||
|           >操作按钮</el-button |           >查看已选数据</el-button | ||||||
|         > --> |         > | ||||||
|       </div> |       </div> | ||||||
|       <!-- 列表查询条件 --> |       <!-- 列表查询条件 --> | ||||||
|       <el-form |       <el-form | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
|  * @Author: SunTao 328867980@qq.com |  * @Author: SunTao 328867980@qq.com | ||||||
|  * @Date: 2024-01-08 11:56:02 |  * @Date: 2024-01-08 11:56:02 | ||||||
|  * @LastEditors: SunTao 328867980@qq.com |  * @LastEditors: SunTao 328867980@qq.com | ||||||
|  * @LastEditTime: 2025-01-15 15:06:33 |  * @LastEditTime: 2025-01-15 15:28:26 | ||||||
|  * @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-setup\index.vue |  * @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-setup\index.vue | ||||||
|  * @Description: 预警中心-预警设置 |  * @Description: 预警中心-预警设置 | ||||||
| --> | --> | ||||||
| @ -96,7 +96,7 @@ | |||||||
|           icon="el-icon-plus" |           icon="el-icon-plus" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleAdd" |           @click="handleAdd" | ||||||
|           v-hasPermi="['system:defect:add']" |           v-hasPermi="['xj:inspection-warn:warning-setup:add']" | ||||||
|           >新增 |           >新增 | ||||||
|         </el-button> |         </el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
| @ -155,6 +155,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="handleUpdate(scope.row)" | ||||||
|  |             v-hasPermi="['xj:inspection-warn:warning-setup:add']" | ||||||
|             >编辑 |             >编辑 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
| @ -162,6 +163,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-delete" |             icon="el-icon-delete" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handleDelete(scope.row)" | ||||||
|  |             v-hasPermi="['xj:inspection-warn:warning-setup:add']" | ||||||
|             >删除 |             >删除 | ||||||
|           </el-button> |           </el-button> | ||||||
|         </template> |         </template> | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
|  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git |  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git | ||||||
|  * @Date: 2024-10-08 10:58:25 |  * @Date: 2024-10-08 10:58:25 | ||||||
|  * @LastEditors: SunTao 328867980@qq.com |  * @LastEditors: SunTao 328867980@qq.com | ||||||
|  * @LastEditTime: 2025-01-14 11:50:15 |  * @LastEditTime: 2025-01-15 15:42:04 | ||||||
|  * @FilePath: \znxjxt-ui\src\views\xj\inspection\disease-management\index.vue |  * @FilePath: \znxjxt-ui\src\views\xj\inspection\disease-management\index.vue | ||||||
|  * @Description: 巡检信息管理-病害管理 |  * @Description: 巡检信息管理-病害管理 | ||||||
| --> | --> | ||||||
| @ -17,9 +17,9 @@ | |||||||
|       v-show="showSearch" |       v-show="showSearch" | ||||||
|       label-width="100px" |       label-width="100px" | ||||||
|     > |     > | ||||||
|       <el-form-item label="道路名称" prop="segmentName"> |       <el-form-item label="道路名称" prop="segmentId"> | ||||||
|         <el-select |         <el-select | ||||||
|           v-model="queryParams.segmentName" |           v-model="queryParams.segmentId" | ||||||
|           placeholder="请选择路段" |           placeholder="请选择路段" | ||||||
|           filterable |           filterable | ||||||
|           clearable |           clearable | ||||||
| @ -194,6 +194,7 @@ | |||||||
|           icon="el-icon-plus" |           icon="el-icon-plus" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleAdd" |           @click="handleAdd" | ||||||
|  |           v-hasPermi="['xj:defect:add']" | ||||||
|           >新增 |           >新增 | ||||||
|         </el-button> |         </el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
| @ -205,6 +206,7 @@ | |||||||
|           size="mini" |           size="mini" | ||||||
|           :disabled="multiple" |           :disabled="multiple" | ||||||
|           @click="handleDelete('')" |           @click="handleDelete('')" | ||||||
|  |           v-hasPermi="['xj:defect:remove']" | ||||||
|           >删除 |           >删除 | ||||||
|         </el-button> |         </el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
| @ -296,6 +298,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="handleUpdate(scope.row)" | ||||||
|  |             v-hasPermi="['xj:defect:edit']" | ||||||
|             >修改 |             >修改 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
| @ -303,6 +306,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-delete" |             icon="el-icon-delete" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handleDelete(scope.row)" | ||||||
|  |             v-hasPermi="['xj:defect:remove']" | ||||||
|             >删除 |             >删除 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
| @ -310,6 +314,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-bangzhu" |             icon="el-icon-bangzhu" | ||||||
|             @click="mergeDefect(scope.row)" |             @click="mergeDefect(scope.row)" | ||||||
|  |             v-hasPermi="['xj:defect:edit']" | ||||||
|             >合并 |             >合并 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
| @ -318,6 +323,7 @@ | |||||||
|             icon="el-icon-copy-document" |             icon="el-icon-copy-document" | ||||||
|             v-if="scope.row.id !== scope.row.snapshotId" |             v-if="scope.row.id !== scope.row.snapshotId" | ||||||
|             @click="splitDefect(scope.row)" |             @click="splitDefect(scope.row)" | ||||||
|  |             v-hasPermi="['xj:defect:edit']" | ||||||
|             >拆分 |             >拆分 | ||||||
|           </el-button> |           </el-button> | ||||||
|         </template> |         </template> | ||||||
| @ -328,8 +334,8 @@ | |||||||
|     <pagination |     <pagination | ||||||
|       v-show="total > 0" |       v-show="total > 0" | ||||||
|       :total="total" |       :total="total" | ||||||
|       :page.sync="queryParams.page" |       :page.sync="pagination.page" | ||||||
|       :limit.sync="queryParams.size" |       :limit.sync="pagination.size" | ||||||
|       @pagination="getList" |       @pagination="getList" | ||||||
|     /> |     /> | ||||||
| 
 | 
 | ||||||
| @ -664,7 +670,9 @@ import { | |||||||
|   getDefectById, |   getDefectById, | ||||||
|   getDetailsBySnapShotId, |   getDetailsBySnapShotId, | ||||||
|   getTaskList, |   getTaskList, | ||||||
|  |   exportDefectData, | ||||||
| } from "@/api/xj/disease"; | } from "@/api/xj/disease"; | ||||||
|  | import { Loading } from "element-ui"; | ||||||
| import { getToken } from "@/utils/auth"; | import { getToken } from "@/utils/auth"; | ||||||
| import MergeDialog from "./components/merge-dialog.vue"; | import MergeDialog from "./components/merge-dialog.vue"; | ||||||
| // 地图 | // 地图 | ||||||
| @ -706,9 +714,7 @@ export default { | |||||||
|       dialogVisible: false, |       dialogVisible: false, | ||||||
|       // 查询表单参数 |       // 查询表单参数 | ||||||
|       queryParams: { |       queryParams: { | ||||||
|         page: 1, |         segmentId: "", | ||||||
|         size: 10, |  | ||||||
|         segmentName: "", |  | ||||||
|         defectType: "", |         defectType: "", | ||||||
|         classType: "", |         classType: "", | ||||||
|         taskId: "", |         taskId: "", | ||||||
| @ -726,6 +732,11 @@ export default { | |||||||
|         snapshotId: "", |         snapshotId: "", | ||||||
|         taskId: "", |         taskId: "", | ||||||
|       }, |       }, | ||||||
|  |       // 分页-页数页码 | ||||||
|  |       pagination: { | ||||||
|  |         page: 1, | ||||||
|  |         size: 10, | ||||||
|  |       }, | ||||||
|       // 日期范围 |       // 日期范围 | ||||||
|       dateTime: [], |       dateTime: [], | ||||||
|       // 巡检任务下拉数据 |       // 巡检任务下拉数据 | ||||||
| @ -935,6 +946,7 @@ export default { | |||||||
|       this.loading = true; |       this.loading = true; | ||||||
|       const params = { |       const params = { | ||||||
|         ...this.queryParams, |         ...this.queryParams, | ||||||
|  |         ...this.pagination, | ||||||
|         startTime: this.dateTime ? this.dateTime[0] : "", |         startTime: this.dateTime ? this.dateTime[0] : "", | ||||||
|         endTime: this.dateTime ? this.dateTime[1] : "", |         endTime: this.dateTime ? this.dateTime[1] : "", | ||||||
|       }; |       }; | ||||||
| @ -991,9 +1003,7 @@ export default { | |||||||
|     resetQuery() { |     resetQuery() { | ||||||
|       this.resetForm("queryForm"); |       this.resetForm("queryForm"); | ||||||
|       this.queryParams = { |       this.queryParams = { | ||||||
|         page: 1, |         segmentId: "", | ||||||
|         size: 10, |  | ||||||
|         segmentName: "", |  | ||||||
|         defectType: "", |         defectType: "", | ||||||
|         classType: "", |         classType: "", | ||||||
|         taskId: "", |         taskId: "", | ||||||
| @ -1011,6 +1021,7 @@ export default { | |||||||
|         snapshotId: "", |         snapshotId: "", | ||||||
|         taskId: "", |         taskId: "", | ||||||
|       }; |       }; | ||||||
|  |       this.pagination.page = 1; | ||||||
|       this.paramsDefectType = []; |       this.paramsDefectType = []; | ||||||
|       this.dateTime = []; |       this.dateTime = []; | ||||||
|       this.getList(); |       this.getList(); | ||||||
| @ -1033,7 +1044,7 @@ export default { | |||||||
|               ? this.paramsDefectType[1] |               ? this.paramsDefectType[1] | ||||||
|               : "" |               : "" | ||||||
|             : ""; |             : ""; | ||||||
|           this.queryParams.page = 1; |           this.pagination.page = 1; | ||||||
|           this.getList(); |           this.getList(); | ||||||
|         } else { |         } else { | ||||||
|           this.$modal.msgWarning("请按照格式填写公里桩进行修改"); |           this.$modal.msgWarning("请按照格式填写公里桩进行修改"); | ||||||
| @ -1048,7 +1059,7 @@ export default { | |||||||
|               ? this.paramsDefectType[1] |               ? this.paramsDefectType[1] | ||||||
|               : "" |               : "" | ||||||
|             : ""; |             : ""; | ||||||
|           this.queryParams.page = 1; |           this.pagination.page = 1; | ||||||
|           this.getList(); |           this.getList(); | ||||||
|         } else { |         } else { | ||||||
|           this.$modal.msgWarning("请按照格式填写公里桩进行修改"); |           this.$modal.msgWarning("请按照格式填写公里桩进行修改"); | ||||||
| @ -1062,7 +1073,7 @@ export default { | |||||||
|             ? this.paramsDefectType[1] |             ? this.paramsDefectType[1] | ||||||
|             : "" |             : "" | ||||||
|           : ""; |           : ""; | ||||||
|         this.queryParams.page = 1; |         this.pagination.page = 1; | ||||||
|         this.getList(); |         this.getList(); | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @ -1315,6 +1326,8 @@ export default { | |||||||
|      * @return {*} |      * @return {*} | ||||||
|      */ |      */ | ||||||
|     handleExport() { |     handleExport() { | ||||||
|  |       Loading.service({ fullscreen: true }); | ||||||
|  |       let loadingInstance = Loading.service({ fullscreen: true }); | ||||||
|       const params = { |       const params = { | ||||||
|         ...this.queryParams, |         ...this.queryParams, | ||||||
|         startTime: this.dateTime ? this.dateTime[0] : "", |         startTime: this.dateTime ? this.dateTime[0] : "", | ||||||
| @ -1331,12 +1344,13 @@ export default { | |||||||
|           link.style.display = "none"; |           link.style.display = "none"; | ||||||
|           link.href = URL.createObjectURL(blob); |           link.href = URL.createObjectURL(blob); | ||||||
|           // TODO 源文件名问题 |           // TODO 源文件名问题 | ||||||
|           link.download = item.extId; |           link.download = "病害导出文档"; | ||||||
|           document.body.appendChild(link); |           document.body.appendChild(link); | ||||||
|           link.click(); |           link.click(); | ||||||
|           document.body.removeChild(link); |           document.body.removeChild(link); | ||||||
|         }) |         }) | ||||||
|         .finally(() => { |         .finally(() => { | ||||||
|  |           loadingInstance.close(); | ||||||
|           this.getList(); |           this.getList(); | ||||||
|         }); |         }); | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
|  * @Author: SunTao 328867980@qq.com |  * @Author: SunTao 328867980@qq.com | ||||||
|  * @Date: 2024-10-11 15:14:16 |  * @Date: 2024-10-11 15:14:16 | ||||||
|  * @LastEditors: SunTao 328867980@qq.com |  * @LastEditors: SunTao 328867980@qq.com | ||||||
|  * @LastEditTime: 2025-01-15 15:08:22 |  * @LastEditTime: 2025-01-15 16:52:53 | ||||||
|  * @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\index.vue |  * @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\index.vue | ||||||
|  * @Description: 巡检信息-路产管理 |  * @Description: 巡检信息-路产管理 | ||||||
| --> | --> | ||||||
| @ -162,6 +162,7 @@ | |||||||
|           icon="el-icon-plus" |           icon="el-icon-plus" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleAdd" |           @click="handleAdd" | ||||||
|  |           v-hasPermi="['xj_equipment_edit']" | ||||||
|           >新增 |           >新增 | ||||||
|         </el-button> |         </el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
| @ -173,9 +174,20 @@ | |||||||
|           size="mini" |           size="mini" | ||||||
|           :disabled="multiple" |           :disabled="multiple" | ||||||
|           @click="handleDelete(null)" |           @click="handleDelete(null)" | ||||||
|  |           v-hasPermi="['xj_equipment_edit']" | ||||||
|           >删除 |           >删除 | ||||||
|         </el-button> |         </el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="success" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-top-right" | ||||||
|  |           size="mini" | ||||||
|  |           @click="handleExport" | ||||||
|  |           >导出 | ||||||
|  |         </el-button> | ||||||
|  |       </el-col> | ||||||
|     </el-row> |     </el-row> | ||||||
|     <!-- 列表 --> |     <!-- 列表 --> | ||||||
|     <el-table |     <el-table | ||||||
| @ -256,6 +268,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="handleUpdate(scope.row)" | ||||||
|  |             v-hasPermi="['xj_equipment_edit']" | ||||||
|             >修改 |             >修改 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
| @ -263,6 +276,7 @@ | |||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-delete" |             icon="el-icon-delete" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handleDelete(scope.row)" | ||||||
|  |             v-hasPermi="['xj_equipment_edit']" | ||||||
|             >删除 |             >删除 | ||||||
|           </el-button> |           </el-button> | ||||||
|         </template> |         </template> | ||||||
| @ -363,7 +377,9 @@ import { | |||||||
|   deleteRoad, |   deleteRoad, | ||||||
|   changeRoad, |   changeRoad, | ||||||
|   getTaskList, |   getTaskList, | ||||||
|  |   exportRoadData, | ||||||
| } from "@/api/xj/road"; | } from "@/api/xj/road"; | ||||||
|  | import { Loading } from "element-ui"; | ||||||
| import RoadAdd from "./components/road-add.vue"; | import RoadAdd from "./components/road-add.vue"; | ||||||
| import RoadView from "./components/road-view.vue"; | import RoadView from "./components/road-view.vue"; | ||||||
| 
 | 
 | ||||||
| @ -645,7 +661,35 @@ export default { | |||||||
|      * @param {*} |      * @param {*} | ||||||
|      * @return {*} |      * @return {*} | ||||||
|      */ |      */ | ||||||
|     handleExport() {}, |     handleExport() { | ||||||
|  |       Loading.service({ fullscreen: true }); | ||||||
|  |       let loadingInstance = Loading.service({ fullscreen: true }); | ||||||
|  |       const params = { | ||||||
|  |         ...this.searchForm, | ||||||
|  |         startTime: this.dateTime ? this.dateTime[0] : "", | ||||||
|  |         endTime: this.dateTime ? this.dateTime[1] : "", | ||||||
|  |       }; | ||||||
|  |       exportRoadData(params) | ||||||
|  |         .then((res) => { | ||||||
|  |           const link = document.createElement("a"); | ||||||
|  |           const blob = new Blob([res], { | ||||||
|  |             // type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", | ||||||
|  |             // type: "application/zip", | ||||||
|  |             type: "application/vnd.ms-excel", | ||||||
|  |           }); | ||||||
|  |           link.style.display = "none"; | ||||||
|  |           link.href = URL.createObjectURL(blob); | ||||||
|  |           // TODO 源文件名问题 | ||||||
|  |           link.download = "路产导出文档"; | ||||||
|  |           document.body.appendChild(link); | ||||||
|  |           link.click(); | ||||||
|  |           document.body.removeChild(link); | ||||||
|  |         }) | ||||||
|  |         .finally(() => { | ||||||
|  |           loadingInstance.close(); | ||||||
|  |           this.getRoadList(); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * @description: 批量确认事件 |      * @description: 批量确认事件 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user