点检方案

This commit is contained in:
xusd 2024-10-08 14:31:50 +08:00
parent 118ad97a8d
commit ef6edf9ac1
16 changed files with 293 additions and 34 deletions

View File

@ -106,8 +106,14 @@ public class EquipAlarmDataController {
@GetMapping("/isSubmitOrder/{alarmId}") @GetMapping("/isSubmitOrder/{alarmId}")
@Operation(summary = "判断报警是否已经提交工单") @Operation(summary = "判断报警是否已经提交工单")
public CommonResult<Boolean> isSubmitOrder(@PathVariable("alarmId") String alarmId){ public CommonResult<String> isSubmitOrder(@PathVariable("alarmId") String alarmId){
return success(equipAlarmDataService.isSubmitOrder(alarmId)); return success(equipAlarmDataService.isSubmitOrder(alarmId));
} }
@GetMapping("/isSubmitPatrolPlan/{alarmId}")
@Operation(summary = "判断报警是否已经提交点检方案")
public CommonResult<Boolean> isSubmitPatrolPlan(@PathVariable("alarmId") String alarmId){
return success(equipAlarmDataService.isSubmitPatrolPlan(alarmId));
}
} }

View File

@ -1,10 +1,7 @@
package com.inspur.module.system.controller.maintenance; package com.inspur.module.system.controller.maintenance;
import com.inspur.framework.common.pojo.PageResult; import com.inspur.framework.common.pojo.PageResult;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderPageReqVO; import com.inspur.module.system.controller.maintenance.vo.*;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRecordsPageReqVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRespVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderSaveReqVO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
import com.inspur.module.system.service.maintenance.MaintenanceOrderService; import com.inspur.module.system.service.maintenance.MaintenanceOrderService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -121,4 +118,10 @@ public class MaintenanceOrderController {
return success(maintenanceOrderService.getMaintenanceCountByEquipId(equipId)); return success(maintenanceOrderService.getMaintenanceCountByEquipId(equipId));
} }
@Operation(summary = "提交点检方案")
@PostMapping("/submitPatrolPlan")
public CommonResult<Boolean> submitPatrolPlan(@Valid @RequestBody MaintenanceSubmitPatrolPlanVO vo){
return success(maintenanceOrderService.submitPatrolPlan(vo));
}
} }

View File

@ -96,4 +96,6 @@ public class MaintenanceOrderRespVO {
@Schema(description = "报告id") @Schema(description = "报告id")
private String reportId; private String reportId;
@Schema(description = "点检方案")
private String patrolPlan;
} }

View File

@ -67,4 +67,7 @@ public class MaintenanceOrderSaveReqVO {
@Schema(description = "报警id") @Schema(description = "报警id")
private String alarmId; private String alarmId;
@Schema(description = "点检方案")
private String patrolPlan;
} }

View File

@ -0,0 +1,28 @@
package com.inspur.module.system.controller.maintenance.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 提交点检方案
*
* @Author xusd
* @Date 2024/9/29 9:51
**/
@Data
public class MaintenanceSubmitPatrolPlanVO {
/**
* 维修工单id
*/
@NotBlank(message = "维修工单id不能为空")
private String maintenanceOrderId;
/**
* 点检方案
*/
@NotBlank(message = "点检方案不能为空")
private String patrolPlan;
}

View File

@ -85,6 +85,10 @@ public class MaintenanceOrderDO extends BaseDO {
* 报警id * 报警id
*/ */
private String alarmId; private String alarmId;
/**
* 点检方案
*/
private String patrolPlan;
@TableField(exist = false) @TableField(exist = false)
private String equipNo; private String equipNo;

View File

@ -74,7 +74,17 @@ public interface EquipAlarmDataService {
* @Author xusd * @Author xusd
* @Date 16:44 2024/9/14 * @Date 16:44 2024/9/14
* @param alarmId 报警id * @param alarmId 报警id
* @return java.lang.String
*/
String isSubmitOrder(String alarmId);
/**
* 判断报警是否已经提交点检方案
*
* @Author xusd
* @Date 9:16 2024/10/8
* @param alarmId 报警id
* @return java.lang.Boolean * @return java.lang.Boolean
*/ */
Boolean isSubmitOrder(String alarmId); Boolean isSubmitPatrolPlan(String alarmId);
} }

View File

@ -1,5 +1,8 @@
package com.inspur.module.system.service.alarm; package com.inspur.module.system.service.alarm;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.framework.tenant.core.aop.TenantIgnore;
@ -105,9 +108,21 @@ public class EquipAlarmDataServiceImpl implements EquipAlarmDataService {
@Override @Override
@TenantIgnore @TenantIgnore
public Boolean isSubmitOrder(String alarmId) { public String isSubmitOrder(String alarmId) {
MaintenanceOrderDO maintenanceOrderDO = maintenanceOrderMapper.selectOne(MaintenanceOrderDO::getAlarmId, alarmId); List<MaintenanceOrderDO> list = maintenanceOrderMapper.selectList(new LambdaQueryWrapper<MaintenanceOrderDO>()
return Objects.nonNull(maintenanceOrderDO); .eq(MaintenanceOrderDO::getAlarmId, alarmId)
.eq(MaintenanceOrderDO::getStatus,-1)
.orderByDesc(MaintenanceOrderDO::getCreateTime));
if (CollUtil.isNotEmpty(list)){
return list.get(0).getMaintenanceOrderId();
}
return null;
} }
@Override
public Boolean isSubmitPatrolPlan(String alarmId) {
List<MaintenanceOrderDO> list = maintenanceOrderMapper.selectList(new LambdaQueryWrapper<MaintenanceOrderDO>()
.eq(MaintenanceOrderDO::getAlarmId, alarmId));
return !CollUtil.isEmpty(list);
}
} }

View File

@ -1,10 +1,7 @@
package com.inspur.module.system.service.maintenance; package com.inspur.module.system.service.maintenance;
import com.inspur.framework.common.pojo.PageResult; import com.inspur.framework.common.pojo.PageResult;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderPageReqVO; import com.inspur.module.system.controller.maintenance.vo.*;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRecordsPageReqVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRespVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderSaveReqVO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
import javax.validation.*; import javax.validation.*;
@ -112,4 +109,14 @@ public interface MaintenanceOrderService {
* @return java.lang.Long * @return java.lang.Long
*/ */
Long getMaintenanceCountByEquipId(String equipId); Long getMaintenanceCountByEquipId(String equipId);
/**
* 提交点检方案
*
* @Author xusd
* @Date 9:55 2024/9/29
* @param vo vo
* @return java.lang.Boolean
*/
Boolean submitPatrolPlan(MaintenanceSubmitPatrolPlanVO vo);
} }

View File

@ -12,10 +12,7 @@ import com.inspur.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import com.inspur.module.system.controller.baseData.vo.CustomerInfoSelectionVO; import com.inspur.module.system.controller.baseData.vo.CustomerInfoSelectionVO;
import com.inspur.module.system.controller.equip.vo.ComponentSelectionVO; import com.inspur.module.system.controller.equip.vo.ComponentSelectionVO;
import com.inspur.module.system.controller.equip.vo.EquipSelectionVO; import com.inspur.module.system.controller.equip.vo.EquipSelectionVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderPageReqVO; import com.inspur.module.system.controller.maintenance.vo.*;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRecordsPageReqVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderRespVO;
import com.inspur.module.system.controller.maintenance.vo.MaintenanceOrderSaveReqVO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO;
import com.inspur.module.system.dal.dataobject.user.AdminUserDO; import com.inspur.module.system.dal.dataobject.user.AdminUserDO;
@ -260,4 +257,9 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
public Long getMaintenanceCountByEquipId(String equipId) { public Long getMaintenanceCountByEquipId(String equipId) {
return maintenanceOrderMapper.selectCount(MaintenanceOrderDO::getEquipId,equipId); return maintenanceOrderMapper.selectCount(MaintenanceOrderDO::getEquipId,equipId);
} }
@Override
public Boolean submitPatrolPlan(MaintenanceSubmitPatrolPlanVO vo) {
return maintenanceOrderMapper.updateById(new MaintenanceOrderDO().setMaintenanceOrderId(vo.getMaintenanceOrderId()).setPatrolPlan(vo.getPatrolPlan())) > 0;
}
} }

View File

@ -67,3 +67,11 @@ export function isSubmitOrder(alarmId) {
method: "get", method: "get",
}); });
} }
// 判断报警是否已经提交点检方案
export function isSubmitPatrolPlan(alarmId) {
return request({
url: "/imt/equip-alarm-data/isSubmitPatrolPlan/" + alarmId,
method: "get",
});
}

View File

@ -364,7 +364,14 @@
> >
<div class="repair-info"> <div class="repair-info">
<el-button <el-button
v-if="!showOrderSubmit" v-if="!showPatrolPlanSubmit"
type="success"
@click="handelPatrolPlan"
>
点检方案提交</el-button>
<el-button
<el-button
v-if="maintenanceOrderId !== null"
type="success" type="success"
@click="handelMaintanence" @click="handelMaintanence"
> >
@ -506,6 +513,7 @@
></div> ></div>
</el-dialog> </el-dialog>
<alarm-submit-maintenance-order-form ref="submitOrderForm"/> <alarm-submit-maintenance-order-form ref="submitOrderForm"/>
<alarm-submit-maintenance-patrol-plan-form ref="submitPatrolPlanForm"/>
</div> </div>
</template> </template>
@ -518,11 +526,14 @@ import { getFieldList } from "@/api/data/query.js";
import { getAlarmRules } from "@/api/system/alarm/alarmrules"; import { getAlarmRules } from "@/api/system/alarm/alarmrules";
import AlarmSubmitMaintenanceOrderForm import AlarmSubmitMaintenanceOrderForm
from "@/views/system/maintenance/maintenanceInfo/alarmSubmitMaintenanceOrderForm.vue"; from "@/views/system/maintenance/maintenanceInfo/alarmSubmitMaintenanceOrderForm.vue";
import AlarmSubmitMaintenancePatrolPlanForm
from "@/views/system/maintenance/maintenanceInfo/AlarmSubmitMaintenancePatrolPlanForm.vue";
var _ = require("lodash"); var _ = require("lodash");
export default { export default {
name: "AlarmData", name: "AlarmData",
components: { components: {
AlarmSubmitMaintenanceOrderForm, AlarmSubmitMaintenanceOrderForm,
AlarmSubmitMaintenancePatrolPlanForm,
AlarmDataForm, AlarmDataForm,
}, },
data() { data() {
@ -598,22 +609,30 @@ export default {
loading: false, loading: false,
selectedRow: {}, selectedRow: {},
datetimeRange: [], datetimeRange: [],
showOrderSubmit: false, maintenanceOrderId: null,
showPatrolPlanSubmit: true,
}; };
}, },
created() { created() {
this.getThrList(); this.getThrList();
this.getTreList(); this.getTreList();
this.getIsSubmitOrder(); this.showSubmitButton();
this.customerName = this.$route.query.customerName; this.customerName = this.$route.query.customerName;
this.modelName = this.$route.query.modelName; this.modelName = this.$route.query.modelName;
this.equipNo = this.$route.query.equipNo; this.equipNo = this.$route.query.equipNo;
this.alarmLevel = this.$route.query.alarmLevel; this.alarmLevel = this.$route.query.alarmLevel;
}, },
methods: { methods: {
getIsSubmitOrder(){ //
EquipAlarmDataApi.isSubmitOrder(this.$route.query.equipAlarmId).then(res=>{ showSubmitButton(){
this.showOrderSubmit = res.data EquipAlarmDataApi.isSubmitPatrolPlan(this.$route.query.equipAlarmId).then(res=>{
this.showPatrolPlanSubmit = res.data;
console.log("this.showPatrolPlanSubmit",this.showPatrolPlanSubmit);
if (res.data){
EquipAlarmDataApi.isSubmitOrder(this.$route.query.equipAlarmId).then(res=>{
this.maintenanceOrderId = res.data
})
}
}) })
}, },
async handleAlarmDataQuery(row) { async handleAlarmDataQuery(row) {
@ -711,7 +730,10 @@ export default {
* 维修工单 * 维修工单
*/ */
handelMaintanence() { handelMaintanence() {
this.$refs.submitOrderForm.open(this.$route.query.equipAlarmId) this.$refs.submitOrderForm.open(this.$route.query.equipAlarmId,this.maintenanceOrderId)
},
handelPatrolPlan() {
this.$refs.submitPatrolPlanForm.open(this.$route.query.equipAlarmId)
}, },
/**echart表初始化 */ /**echart表初始化 */
initchart(xData, yData, name, unit) { initchart(xData, yData, name, unit) {

View File

@ -0,0 +1,136 @@
<template>
<div class="app-container">
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
<el-card class="box-card">
<div slot="header"><span>报警信息</span></div>
<el-form ref="alarmForm" :model="alarmFormData" v-loading="alarmFormLoading" label-width="160px">
<el-row>
<el-col :span="12">
<el-form-item label="机床设备编号:" prop="equipNo">
{{alarmFormData.equipNo}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备型号:" prop="modelName">
{{alarmFormData.modelName}}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="机床组件名称:" prop="componentName">
{{alarmFormData.componentName}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="机床客户名称:" prop="customerName">
{{alarmFormData.customerName}}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="机床分析状态:" prop="equipAnalyseStatus">
<dict-tag :type="DICT_TYPE.TREND_ANALY_STATUS" :value="alarmFormData.equipAnalyseStatus"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报警等级:" prop="alarmLevel">
<dict-tag :type="DICT_TYPE.ALARM_LEVEL" :value="alarmFormData.alarmLevel"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="首次报警时间:" prop="firstAlarmTime">
{{ parseTime(alarmFormData.firstAlarmTime) }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="最新报警时间:" prop="latestAlarmTime">
{{ parseTime(alarmFormData.latestAlarmTime) }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="报警类型:" prop="alarmType">
<dict-tag :type="DICT_TYPE.ALARM_TYPE" :value="alarmFormData.alarmType"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="box-card" style="margin-top: 20px">
<div slot="header"><span>维修工单信息</span></div>
<el-form ref="submitForm" :model="submitFormData" v-loading="submitFormLoading" :rules="submitFormRules" label-width="100px">
<el-form-item label="点检方案" prop="patrolPlan">
<el-input v-model="submitFormData.patrolPlan" :rows="4" type="textarea" placeholder="请输入内容"/>
</el-form-item>
<div style="text-align: right">
<el-button type="primary" @click="submitOrder" > </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</div>
</el-form>
</el-card>
</el-dialog>
</div>
</template>
<script>
import {getSubmitOrderDetails} from '@/api/system/alarm/equipalarmdata'
import {parseTime} from "../../../../utils/ruoyi";
import * as MaintenanceOrderApi from "@/api/system/maintenance/maintenance";
export default {
name: "alarmSubmitMaintenanceOrderForm",
data() {
return {
dialogTitle: "维修工单提交",
dialogVisible: false,
alarmFormData:{},
alarmFormLoading:false,
submitFormData:{},
submitFormLoading:false,
submitFormRules:{
patrolPlan: [{ required: true, message: '点检方案不能为空', trigger: 'blur' }]
}
}
},
methods: {
parseTime,
open(id) {
this.alarmFormData = {};
this.submitFormData = {};
console.log(id);
//
getSubmitOrderDetails(id).then(res=>{
console.log(res);
if (res.data == null){
this.$modal.msgError("未获取到设备报警信息");
return;
}
this.dialogVisible = true;
this.alarmFormLoading = true
this.alarmFormData = res.data;
this.alarmFormLoading = false
})
},
async submitOrder(){
this.submitFormLoading = true;
await this.$refs.submitForm.validate();
console.log(this.alarmFormData);
this.submitFormData.equipId = this.alarmFormData.equipId;
this.submitFormData.componentId = this.alarmFormData.componentId;
this.submitFormData.customerId = this.alarmFormData.customerId;
this.submitFormData.alarmId = this.alarmFormData.equipAlarmId;
this.submitFormData.status = -1;
await MaintenanceOrderApi.createRemoteMaintenanceOrder(this.submitFormData)
this.$modal.msgSuccess("提交成功");
this.dialogVisible = false;
this.submitFormLoading = false;
},
},
}
</script>

View File

@ -5,7 +5,7 @@
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="160px"> <el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="160px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="机床设备" prop="equipId"> <el-form-item label="机床设备" prop="equipId">
<el-cascader <el-cascader
v-model="cascaderValue" v-model="cascaderValue"
:options="equipCascader" :options="equipCascader"
@ -15,7 +15,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="机床组件" prop="componentId"> <el-form-item label="机床组件" prop="componentId">
<el-select v-model="formData.componentId" placeholder="请选择机床组件"> <el-select v-model="formData.componentId" placeholder="请选择机床组件">
<el-option v-for="item in componentSelection" <el-option v-for="item in componentSelection"
:key="item.componentId" :label="item.componentName" :value="item.componentId"/> :key="item.componentId" :label="item.componentName" :value="item.componentId"/>
@ -25,7 +25,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="机床客户信息" prop="customerId"> <el-form-item label="机床客户信息" prop="customerId">
<el-select v-model="formData.customerId" placeholder="请选择机床客户信息"> <el-select v-model="formData.customerId" placeholder="请选择机床客户信息">
<el-option v-for="item in customerSelection" <el-option v-for="item in customerSelection"
:key="item.customerId" :label="item.customerName" :value="item.customerId"/> :key="item.customerId" :label="item.customerName" :value="item.customerId"/>
@ -33,7 +33,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="故障类型" prop="faultType"> <el-form-item label="故障类型" prop="faultType">
<el-select v-model="formData.faultType" placeholder="请选择故障类型"> <el-select v-model="formData.faultType" placeholder="请选择故障类型">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.FAULT_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.FAULT_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/>
@ -43,7 +43,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="优先级" prop="priority"> <el-form-item label="优先级" prop="priority">
<el-select v-model="formData.priority" placeholder="请选择优先级"> <el-select v-model="formData.priority" placeholder="请选择优先级">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.MAINTENANCE_PRIORITY)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.MAINTENANCE_PRIORITY)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/>
@ -51,9 +51,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="故障描述" prop="description"> <el-form-item label="故障描述" prop="description">
<el-input v-model="formData.description" :rows="4" type="textarea" placeholder="请输入内容"/> <el-input v-model="formData.description" :rows="4" type="textarea" placeholder="请输入内容"/>
</el-form-item> </el-form-item>
<el-form-item v-if="id" label="点检方案:" prop="patrolPlan">
{{formData.patrolPlan}}
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button> <el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button>
@ -77,6 +80,7 @@ export default {
}, },
data() { data() {
return { return {
id: null,
userList:[], userList:[],
cascaderValue:[], cascaderValue:[],
equipCascader:[], equipCascader:[],
@ -173,6 +177,7 @@ export default {
}, },
/** 打开弹窗 */ /** 打开弹窗 */
async open(id) { async open(id) {
this.id = id;
this.dialogVisible = true; this.dialogVisible = true;
this.reset(); this.reset();
// //

View File

@ -105,6 +105,7 @@ export default {
name: "alarmSubmitMaintenanceOrderForm", name: "alarmSubmitMaintenanceOrderForm",
data() { data() {
return { return {
orderId: null,
dialogTitle: "维修工单提交", dialogTitle: "维修工单提交",
dialogVisible: false, dialogVisible: false,
alarmFormData:{}, alarmFormData:{},
@ -119,12 +120,13 @@ export default {
}, },
methods: { methods: {
parseTime, parseTime,
open(id) { open(alarmId,orderId) {
this.orderId = orderId;
this.alarmFormData = {}; this.alarmFormData = {};
this.submitFormData = {}; this.submitFormData = {};
console.log(id); console.log(alarmId);
// //
getSubmitOrderDetails(id).then(res=>{ getSubmitOrderDetails(alarmId).then(res=>{
console.log(res); console.log(res);
if (res.data == null){ if (res.data == null){
this.$modal.msgError("未获取到设备报警信息"); this.$modal.msgError("未获取到设备报警信息");
@ -140,12 +142,13 @@ export default {
this.submitFormLoading = true; this.submitFormLoading = true;
await this.$refs.submitForm.validate(); await this.$refs.submitForm.validate();
console.log(this.alarmFormData); console.log(this.alarmFormData);
this.submitFormData.maintenanceOrderId = this.orderId;
this.submitFormData.equipId = this.alarmFormData.equipId; this.submitFormData.equipId = this.alarmFormData.equipId;
this.submitFormData.componentId = this.alarmFormData.componentId; this.submitFormData.componentId = this.alarmFormData.componentId;
this.submitFormData.customerId = this.alarmFormData.customerId; this.submitFormData.customerId = this.alarmFormData.customerId;
this.submitFormData.alarmId = this.alarmFormData.equipAlarmId; this.submitFormData.alarmId = this.alarmFormData.equipAlarmId;
this.submitFormData.status = 0; this.submitFormData.status = 0;
await MaintenanceOrderApi.createRemoteMaintenanceOrder(this.submitFormData) await MaintenanceOrderApi.updateRemoteMaintenanceOrder(this.submitFormData)
this.$modal.msgSuccess("提交成功"); this.$modal.msgSuccess("提交成功");
this.dialogVisible = false; this.dialogVisible = false;
this.submitFormLoading = false; this.submitFormLoading = false;

View File

@ -37,6 +37,11 @@
<dict-tag :type="DICT_TYPE.MAINTENANCE_PRIORITY" :value="formData.priority" /> <dict-tag :type="DICT_TYPE.MAINTENANCE_PRIORITY" :value="formData.priority" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="点检方案:" prop="patrolPlan">
{{formData.patrolPlan}}
</el-form-item>
</el-col>
</el-form> </el-form>
<!-- 维修报告 --> <!-- 维修报告 -->