diff --git a/src/views/device/upkeepOrder/index.vue b/src/views/device/upkeepOrder/index.vue index 08007b6..77d729b 100644 --- a/src/views/device/upkeepOrder/index.vue +++ b/src/views/device/upkeepOrder/index.vue @@ -1,6 +1,13 @@ @@ -1178,85 +1386,114 @@ import { getUpkeepOrder, delUpkeepOrder, addUpkeepOrder, - updateUpkeepOrder, subInspect + updateUpkeepOrder, + subInspect, } from "@/api/device/upkeepOrder"; -import {formatEquItem, formatEquItemNoCondition, querySpareList} from "@/api/device/upkeepPlan"; -import {getEquList, getGroupLine, getPersonList, getWorkCenter} from "@/api/device/plan"; -import {delDeviceOrder, getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder"; -import {getInspectionWork, updateInspectionWork} from "@/api/device/inspectionWork"; +import { + formatEquItem, + formatEquItemNoCondition, + querySpareList, +} from "@/api/device/upkeepPlan"; +import { + getEquList, + getGroupLine, + getPersonList, + getWorkCenter, +} from "@/api/device/plan"; +import { + delDeviceOrder, + getDeviceOrder, + listDeviceOrder, + updateDeviceOrder, +} from "@/api/device/deviceOrder"; +import { + getInspectionWork, + updateInspectionWork, +} from "@/api/device/inspectionWork"; export default { name: "UpkeepOrder", - dicts: ['device_order_status', 'device_loop_type','device_reach_standard','device_upkeep_type','device_inspect_status'], + dicts: [ + "device_order_status", + "device_loop_type", + "device_reach_standard", + "device_upkeep_type", + "device_inspect_status", + ], data() { return { // 设备组线 - groupLineList:[], + groupLineList: [], // 备件选择list - spareOnList:[], + spareOnList: [], // 备件选择 - selectSpareDialog:false, - standardListVo:[], - workDetail:false, + selectSpareDialog: false, + standardListVo: [], + workDetail: false, // 初始化VO workVO: { order: { - planCode:null, - planName:null, - planLoop:null, - planLoopType:null, - orderCode:null, - planWorkShop:null, - planLoopStart:null, - planLoopEnd:null, - orderStart:null, - orderEnd:null, - planPerson:null, - upkeepPictures:[], - },equ: { - equipmentCode:null, + planCode: null, + planName: null, + planLoop: null, + planLoopType: null, + orderCode: null, + planWorkShop: null, + planLoopStart: null, + planLoopEnd: null, + orderStart: null, + orderEnd: null, + planPerson: null, + upkeepPictures: [], + }, + equ: { + equipmentCode: null, equipmentName: null, - equipmentLocation:null, - equipmentTypeCode:null, - equipmentTypeName:null, - workshopCode:null, - workshopName:null, + equipmentLocation: null, + equipmentTypeCode: null, + equipmentTypeName: null, + workshopCode: null, + workshopName: null, }, - detailList:[], - spareList:[], + detailList: [], + spareList: [], }, // 日期范围选择快捷 pickerOptions: { - shortcuts: [{ - text: '最近一周', - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); - picker.$emit('pick', [start, end]); - } - }, { - text: '最近一个月', - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); - picker.$emit('pick', [start, end]); - } - }, { - text: '最近三个月', - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); - picker.$emit('pick', [start, end]); - } - }] + shortcuts: [ + { + text: "最近一周", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "最近一个月", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "最近三个月", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit("pick", [start, end]); + }, + }, + ], }, // 记录 recordList: [], // 检验结果 - inspect: '0', + inspect: "0", // 结果检验弹窗 inspectDialog: false, // 选中的备件 @@ -1304,7 +1541,7 @@ export default { equipmentCode: null, equipmentName: null, workshopCode: null, - groupLine:null, + groupLine: null, pageNum: 1, pageSize: 10, }, @@ -1334,11 +1571,12 @@ export default { open: false, // 查询参数 queryParams: { - orderInspect:null, + orderInspect: null, pageNum: 1, pageSize: 10, planId: null, planCode: null, + planName: null, planType: "maintenance", orderCode: null, planWorkshop: null, @@ -1350,6 +1588,7 @@ export default { orderStart: null, orderEnd: null, equipmentCode: null, + equipmentName: null, orderStatus: null, orderCost: null, planPerson: null, @@ -1364,7 +1603,7 @@ export default { createTime: null, updateBy: null, updateTime: null, - equ: {equipmentName: null}, + equ: { equipmentName: null }, loopStartArray: [], orderStartArray: [], orderEndArray: [], @@ -1372,23 +1611,24 @@ export default { }, // 表单参数 form: { - equ: {equipmentName: null}, + equ: { equipmentName: null }, selectSpareList: [], equipmentItem: [], - shutDown: '0', - calculationRule: '0', - planLoopType: 'day', + shutDown: "0", + calculationRule: "0", + planLoopType: "day", planLoop: null, - upkeep: '1', + upkeep: "1", planName: null, planWorkshop: null, - personList:[], - planTimeArray:[], - timeArray:[], - picturePath: null, + personList: [], + planTimeArray: [], + timeArray: [], + picturePath: [], }, + // picturePath:[], // 表单校验 - rules: {} + rules: {}, }; }, created() { @@ -1398,14 +1638,14 @@ export default { methods: { // 获取备件信息 setSpareList() { - querySpareList(this.spareQuery).then(response => { + querySpareList(this.spareQuery).then((response) => { this.spareTotal = response.total; this.spareList = response.rows; this.spareLoading = false; - }) + }); }, // 备件选择btn - choseSpareBtn(){ + choseSpareBtn() { // 清理缓存 this.spareOnList = []; // 打开选择备件弹窗 @@ -1414,12 +1654,17 @@ export default { // 备件数量 handleEdit(index, row) { // 库存数量-冻结数量 - if ((Number(row.amount)-Number(row.storageAmount)) < Number(row.applyNum)) { + if ( + Number(row.amount) - Number(row.storageAmount) < + Number(row.applyNum) + ) { this.$message({ - message: '领用最大数量为:'+(Number(row.amount)-Number(row.storageAmount)), - type: 'warning' - }) - row.applyNum = (Number(row.amount)-Number(row.storageAmount)); + message: + "领用最大数量为:" + + (Number(row.amount) - Number(row.storageAmount)), + type: "warning", + }); + row.applyNum = Number(row.amount) - Number(row.storageAmount); } }, // 重置设备搜索 @@ -1428,7 +1673,7 @@ export default { equipmentCode: null, equipmentName: null, workshopCode: null, - groupLine:this.groupLineList[0].equipmentCode, + groupLine: this.groupLineList[0].equipmentCode, pageNum: 1, pageSize: 10, }; @@ -1436,13 +1681,13 @@ export default { }, // 删除备件-备件数量 delSpareList(e) { - for (let i = 0; i < this.chooseSpareList.length; i++){ + for (let i = 0; i < this.chooseSpareList.length; i++) { if (this.chooseSpareList[i].materialCode == e.materialCode) { - this.chooseSpareList.splice(i,1); + this.chooseSpareList.splice(i, 1); this.$message({ - message: '删除成功!', - type: 'success' - }) + message: "删除成功!", + type: "success", + }); } } }, @@ -1451,37 +1696,41 @@ export default { this.loading = true; this.reset(); this.standardListVo = []; - const orderId = row.orderId || this.ids - getInspectionWork(orderId).then(response => { + const orderId = row.orderId || this.ids; + getInspectionWork(orderId).then((response) => { this.workVO = response.data; if (this.workVO.order.upkeep == 0) { - this.workVO.order.upkeep = '内部'; - }else { - this.workVO.order.upkeep = '委外'; + this.workVO.order.upkeep = "内部"; + } else { + this.workVO.order.upkeep = "委外"; } if (this.workVO.order.shutDown == 0) { - this.workVO.order.shutDown = '开机保养'; - }else { - this.workVO.order.shutDown = '停机保养'; + this.workVO.order.shutDown = "开机保养"; + } else { + this.workVO.order.shutDown = "停机保养"; } for (let i = 0; i < this.workVO.detailList.length; i++) { - for (let j = 0; j < this.workVO.detailList[i].standardList.length; j++) { - this.workVO.detailList[i].standardList[j].itemName = this.workVO.detailList[i].itemName; + for ( + let j = 0; + j < this.workVO.detailList[i].standardList.length; + j++ + ) { + this.workVO.detailList[i].standardList[j].itemName = + this.workVO.detailList[i].itemName; this.standardListVo.push(this.workVO.detailList[i].standardList[j]); } } this.loading = false; this.workDetail = true; }); - }, // 点击结果检验按钮 clickInspect() { if (this.ids.length == 0 || this.ids == null) { this.$message({ - message: '请勾选工单!', - type: 'warning' - }) + message: "请勾选工单!", + type: "warning", + }); return; } this.inspect = "0"; @@ -1490,31 +1739,31 @@ export default { // 提交检验信息 subInspect() { const data = { - ids : this.ids, - inspect : this.inspect, - } + ids: this.ids, + inspect: this.inspect, + }; - subInspect(data).then(response => { + subInspect(data).then((response) => { this.getList(); this.inspectDialog = false; this.$message({ - message: '提交成功!', - type: 'success' - }) - }) + message: "提交成功!", + type: "success", + }); + }); }, // 获取工作中心 setWorkCenter() { - getWorkCenter().then(response => { + getWorkCenter().then((response) => { this.workCenterList = response.data; - }) + }); }, // 点击快速工单按钮 - cilckFastWork(){ + cilckFastWork() { this.reset(); this.selectPersonList = []; this.personList = []; - this.form.shutDown = "0" + this.form.shutDown = "0"; this.setPerson(); this.setWorkCenter(); this.orderDialog = true; @@ -1529,26 +1778,26 @@ export default { if (this.form.planWorkshop == null) { this.$message({ message: "请选择车间!", - type: "warning" - }) - return + type: "warning", + }); + return; } if (this.form.equipmentItem.length == 0) { this.$message({ message: "请选择设备!", - type: "warning" - }) - return + type: "warning", + }); + return; } if (this.selectPersonList.length == 0) { this.$message({ message: "请选择人员!", - type: "warning" - }) - return + type: "warning", + }); + return; } this.form.personList = this.selectPersonList; - addUpkeepOrder(this.form).then(response => { + addUpkeepOrder(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.orderDialog = false; this.getList(); @@ -1560,12 +1809,13 @@ export default { }, // 获取人员List-置入穿梭框信息 setPerson() { - getPersonList().then(response => { + getPersonList().then((response) => { for (let i = 0; i < response.data.length; i++) { this.personList.push({ - label: response.data[i].nickName + '(' + response.data[i].userName + ')', + label: + response.data[i].nickName + "(" + response.data[i].userName + ")", key: response.data[i].userId, - }) + }); } }); }, @@ -1581,52 +1831,74 @@ export default { }, // 点击编辑设备-保养项目 editorTheItem(e) { - // 清除缓存 this.itemDetailList = []; let qw = 1; for (let i = 0; i < this.form.equipmentItem.length; i++) { - if (e.equipmentCode == this.form.equipmentItem[i].equipmentCode) { - - for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { - + for ( + let j = 0; + j < this.form.equipmentItem[i].equPlanDetailList.length; + j++ + ) { // 部位 - var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName; + var itemName = + this.form.equipmentItem[i].equPlanDetailList[j].itemName; // 方法 - var itemMethod = this.form.equipmentItem[i].equPlanDetailList[j].itemMethod; + var itemMethod = + this.form.equipmentItem[i].equPlanDetailList[j].itemMethod; // 工具 - var itemTools = this.form.equipmentItem[i].equPlanDetailList[j].itemTools; + var itemTools = + this.form.equipmentItem[i].equPlanDetailList[j].itemTools; // // 周期 // var itemLoop = this.form.equipmentItem[i].equPlanDetailList[j].itemLoop; // var itemLoopType = this.form.equipmentItem[i].equPlanDetailList[j].itemLoopType; - for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++) { - - if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) { - - this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName; - this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemMethod = itemMethod; - this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemTools = itemTools; + for ( + let k = 0; + k < + this.form.equipmentItem[i].equPlanDetailList[j] + .equPlanStandardList.length; + k++ + ) { + if ( + this.form.equipmentItem[i].equPlanDetailList[j] + .equPlanStandardList[k].showFlag == true + ) { + this.form.equipmentItem[i].equPlanDetailList[ + j + ].equPlanStandardList[k].itemName = itemName; + this.form.equipmentItem[i].equPlanDetailList[ + j + ].equPlanStandardList[k].itemMethod = itemMethod; + this.form.equipmentItem[i].equPlanDetailList[ + j + ].equPlanStandardList[k].itemTools = itemTools; // this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoop = itemLoop; // this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoopType = itemLoopType; - - if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") { - this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性"; + if ( + this.form.equipmentItem[i].equPlanDetailList[j] + .equPlanStandardList[k].standardType == "qualitative" + ) { + this.form.equipmentItem[i].equPlanDetailList[ + j + ].equPlanStandardList[k].standardTypeName = "定性"; } else { - this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量"; + this.form.equipmentItem[i].equPlanDetailList[ + j + ].equPlanStandardList[k].standardTypeName = "定量"; } - this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]); + this.itemDetailList.push( + this.form.equipmentItem[i].equPlanDetailList[j] + .equPlanStandardList[k] + ); } - } } - } - } this.editorItem = true; @@ -1641,26 +1913,23 @@ export default { }, // 选择设备确认按钮 confirmSelectEquBtn() { - if (this.selectEquList.length > 1) { this.$message({ message: "只能选择一个设备!", - type: "warning" - }) - return + type: "warning", + }); + return; } this.form.equipmentItem = []; // 处理信息 - formatEquItemNoCondition(this.selectEquList).then(response => { - + formatEquItemNoCondition(this.selectEquList).then((response) => { for (let i = 0; i < response.data.length; i++) { this.form.equipmentItem.push(response.data[i]); } this.selectEqu = false; - }) - + }); }, // 选择设备多选操作 selectChangeEqu(e) { @@ -1670,11 +1939,11 @@ export default { getEquList() { this.equLoading = true; this.equipmentQuery.workshopCode = this.form.planWorkshop; - getEquList(this.equipmentQuery).then(response => { + getEquList(this.equipmentQuery).then((response) => { this.equTotal = response.total; this.queryEquipment = response.rows; this.equLoading = false; - }) + }); }, // 点击选择设备按钮 selectEquBtn() { @@ -1682,16 +1951,16 @@ export default { equipmentCode: null, equipmentName: null, workshopCode: null, - groupLine:null, + groupLine: null, pageNum: 1, pageSize: 10, }; // 获取设备组线信息 - getGroupLine().then(response => { + getGroupLine().then((response) => { this.groupLineList = response.data; this.equipmentQuery.groupLine = response.data[0].equipmentCode; this.getEquList(); - }) + }); this.selectEqu = true; }, @@ -1710,33 +1979,36 @@ export default { if (this.spareOnList.length == 0) { this.$message({ message: "请勾选要申领的备件!", - type: "warning" - }) - return + type: "warning", + }); + return; } - for (let i = 0; i < this.chooseSpareList.length; i++){ + for (let i = 0; i < this.chooseSpareList.length; i++) { for (let j = 0; j < this.spareOnList.length; j++) { - if (this.chooseSpareList[i].materialCode == this.spareOnList[j].materialCode) { + if ( + this.chooseSpareList[i].materialCode == + this.spareOnList[j].materialCode + ) { this.$message({ - message: '不可重复添加!', - type: 'warning' - }) + message: "不可重复添加!", + type: "warning", + }); return; } } } for (let j = 0; j < this.spareOnList.length; j++) { if (this.spareOnList[j].applyNum == null) { - this.spareOnList[j].applyNum=1; + this.spareOnList[j].applyNum = 1; } this.chooseSpareList.push(this.spareOnList[j]); } this.$message({ - message: '添加成功!', - type: 'success' - }) + message: "添加成功!", + type: "success", + }); // 关闭备件选择弹窗 this.selectSpareDialog = false; @@ -1750,24 +2022,23 @@ export default { }, // 选择备件-添加备件 addSpareList(e) { - for (let i = 0; i < this.chooseSpareList.length; i++){ + for (let i = 0; i < this.chooseSpareList.length; i++) { if (this.chooseSpareList[i].materialCode == e.materialCode) { this.$message({ - message: '不可重复添加!', - type: 'warning' - }) + message: "不可重复添加!", + type: "warning", + }); return; } } this.chooseSpareList.push(e); this.$message({ - message: '添加成功!', - type: 'success' - }) + message: "添加成功!", + type: "success", + }); }, // 改变巡检周期事件 - changeArray(e) { - }, + changeArray(e) {}, // 备件搜索重置按钮 resetSpare() { this.spareQuery = { @@ -1780,7 +2051,7 @@ export default { }, // 搜索备件按钮 getSpareList() { - this.setSpareList() + this.setSpareList(); }, // 选择备件按钮操作 selectSpareBtn(e) { @@ -1794,7 +2065,7 @@ export default { /** 查询保养工单列表 */ getList() { this.loading = true; - listDeviceOrder(this.queryParams).then(response => { + listDeviceOrder(this.queryParams).then((response) => { this.upkeepOrderList = response.rows; this.total = response.total; this.loading = false; @@ -1808,12 +2079,14 @@ export default { // 表单重置 reset() { this.form = { - queryParams:null, + queryParams: null, orderId: null, planId: null, planCode: null, + planName: null, planType: "maintenance", orderCode: null, + picturePath: null, planWorkshop: null, planProdLine: null, planLoop: null, @@ -1823,6 +2096,7 @@ export default { orderStart: null, orderEnd: null, equipmentCode: null, + equipmentName: null, orderStatus: null, orderCost: null, planPerson: null, @@ -1837,8 +2111,8 @@ export default { createTime: null, updateBy: null, updateTime: null, - equ: {equipmentName: null}, - timeArray:[], + equ: { equipmentName: null }, + timeArray: [], loopStartArray: [], orderStartArray: [], orderEndArray: [], @@ -1862,9 +2136,9 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.orderId) - this.single = selection.length !== 1 - this.multiple = !selection.length + this.ids = selection.map((item) => item.orderId); + this.single = selection.length !== 1; + this.multiple = !selection.length; }, /** 快速工单按钮操作 */ handleAdd() { @@ -1877,29 +2151,87 @@ export default { this.loading = true; this.reset(); this.recordList = []; - const orderCode = row.orderCode || this.ids - getDeviceOrder(orderCode).then(response => { + const orderCode = row.orderCode || this.ids; + getDeviceOrder(orderCode).then((response) => { this.form = response.data; if (response.data.timeArray[0] == null) { - response.data.timeArray = [] + response.data.timeArray = []; } + //每个检查项照片 for (let i = 0; i < this.form.detailList.length; i++) { - for (let j = 0; j < this.form.detailList[i].standardList.length; j++) { - this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName; + for ( + let j = 0; + j < this.form.detailList[i].standardList.length; + j++ + ) { + this.form.detailList[i].standardList[j].itemName = + this.form.detailList[i].itemName; + //显示已经传入的图片 + if ( + response.data.detailList[i].standardList[j].picturePaths != null + ) { + var newFiles = []; + response.data.detailList[i].standardList[j].picturePaths.forEach( + (item) => { + var newFile = {}; + newFile.name = item.fileName; + newFile.url = item.fileAddress; + newFiles.push(newFile); + } + ); + this.form.detailList[i].standardList[j].picturePath = newFiles; + } this.recordList.push(this.form.detailList[i].standardList[j]); } } + + //保养照片 + if (response.data.picturePaths != null) { + var newFiles = []; + response.data.picturePaths.forEach((item) => { + var newFile = {}; + newFile.name = item.fileName; + newFile.url = item.fileAddress; + newFiles.push(newFile); + }); + this.form.picturePath = newFiles; + } + this.loading = false; this.open = true; this.title = "填写记录"; }); }, + /** 提交按钮 */ submitForm() { - this.$refs["form"].validate(valid => { + this.$refs["form"].validate((valid) => { + // //每个检查项照片 + for (let i = 0; i < this.form.detailList.length; i++) { + for ( + let j = 0; + j < this.form.detailList[i].standardList.length; + j++ + ) { + if ( + Array.isArray(this.form.detailList[i].standardList[j].picturePath) + ) { + this.form.detailList[i].standardList[j].picturePath = + this.listToString( + this.form.detailList[i].standardList[j].picturePath + ); + } + } + } + + //保养照片 + if (Array.isArray(this.form.picturePath)) { + this.form.picturePath = this.listToString(this.form.picturePath); + } + if (valid) { if (this.form.orderId != null) { - updateDeviceOrder(this.form).then(response => { + updateDeviceOrder(this.form).then((response) => { this.$modal.msgSuccess("提交成功"); this.open = false; this.getList(); @@ -1914,21 +2246,30 @@ export default { } }); }, + // 对象转成指定字符串分隔 + listToString(list, separator) { + let strs = ""; + separator = separator || ","; + for (let i in list) { + strs += list[i].url + separator; + } + return strs != "" ? strs.substr(0, strs.length - 1) : ""; + }, /** 删除按钮操作 */ handleDelete(row) { const orderIds = row.orderId || this.ids; - var orderCodes = ''; + var orderCodes = ""; // 处理信息 for (let i = 0; i < this.upkeepOrderList.length; i++) { for (let j = 0; j < orderIds.length; j++) { if (orderIds[j] == this.upkeepOrderList[i].orderId) { - orderCodes = orderCodes + this.upkeepOrderList[i].orderCode + ','; + orderCodes = orderCodes + this.upkeepOrderList[i].orderCode + ","; } } } - if (orderCodes == '') { + if (orderCodes == "") { for (let i = 0; i < this.upkeepOrderList.length; i++) { if (orderIds == this.upkeepOrderList[i].orderId) { orderCodes = this.upkeepOrderList[i].orderCode; @@ -1936,24 +2277,31 @@ export default { } } - this.$modal.confirm('是否确认删除保养工单编号为"' + orderCodes + '"的数据项?').then(function () { - return delDeviceOrder(orderIds); - }).then(response => { - if (response.code != 500) { - this.$modal.msgSuccess("删除成功"); - this.getList(); - } - }).catch(() => { - }); + this.$modal + .confirm('是否确认删除保养工单编号为"' + orderCodes + '"的数据项?') + .then(function () { + return delDeviceOrder(orderIds); + }) + .then((response) => { + if (response.code != 500) { + this.$modal.msgSuccess("删除成功"); + this.getList(); + } + }) + .catch(() => {}); this.getList(); }, /** 导出按钮操作 */ handleExport() { - this.download('device/upkeepOrder/export', { - ...this.queryParams - }, `upkeepOrder_${new Date().getTime()}.xlsx`) - } - } + this.download( + "device/upkeepOrder/export", + { + ...this.queryParams, + }, + `upkeepOrder_${new Date().getTime()}.xlsx` + ); + }, + }, };