diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java index 52420dd..ac6c146 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java @@ -46,4 +46,11 @@ public class AcsToWmsZDController { public ResponseEntity taskDeprecate(@RequestBody Map whereJson) throws Exception { return new ResponseEntity<>(acsToWmsZDService.taskDeprecate(whereJson), HttpStatus.OK); } + + @PostMapping("/checkDeviceStatus") + @Log("设备状态获取") + @ApiOperation("设备状态获取") + public ResponseEntity checkDeviceStatus(@RequestBody Map whereJson) throws Exception { + return new ResponseEntity<>(acsToWmsZDService.checkDeviceStatus(whereJson), HttpStatus.OK); + } } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsZDService.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsZDService.java index c1b8083..cf50b6c 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsZDService.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsZDService.java @@ -36,5 +36,5 @@ public interface AcsToWmsZDService { * * @return Map */ - HttpResponse deviceStatusQuery(JSONObject whereJson) throws Exception; + Map checkDeviceStatus(Map whereJson) throws Exception; } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java index 218b7f9..87829e6 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java @@ -8,30 +8,26 @@ import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.nl.acs.config.AcsConfig; import org.nl.acs.config.server.AcsConfigService; import org.nl.acs.device.address.service.AddressService; import org.nl.acs.device.address.service.dto.AddressDto; import org.nl.acs.device.service.DeviceService; -import org.nl.acs.ext.wms.service.AcsToWmsService; +import org.nl.acs.device_driver.standard_conveyor_line.StandardConveyorLineDeviceDriver; import org.nl.acs.ext.wms.service.AcsToWmsZDService; -import org.nl.acs.instruction.service.InstructionService; -import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.log.service.LogServer; +import org.nl.acs.opc.Device; +import org.nl.acs.opc.DeviceAppService; import org.nl.acs.route.service.RouteLineService; import org.nl.acs.route.service.dto.RouteLineDto; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; -import org.nl.exception.BadRequestException; -import org.nl.exception.WDKException; -import org.nl.utils.SpringContextHolder; -import org.nl.wql.core.bean.WQLObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -40,6 +36,8 @@ import java.util.Map; @Slf4j public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { + private final DeviceAppService deviceAppService; + @Autowired RouteLineService routeLineService; @@ -64,121 +62,117 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { @Override public Map taskCreate(JSONObject whereJson) { - - JSONObject resultJson = new JSONObject(); + Map map = new HashMap<>(); log.info("taskCreate--------------:输入参数:" + whereJson.toString()); - try { - JSONArray errArr = new JSONArray(); - - //获取甲方wcs传过来的参数 - String houseCode = whereJson.optString("houseCode"); - String systemCode = whereJson.optString("systemCode"); - JSONObject parameters = whereJson.optJSONObject("parameters"); - String taskCode = whereJson.optString("taskCode"); - String taskType = whereJson.optString("taskType"); - String taskCreateDatetime = whereJson.optString("taskCreateDatetime"); - String containerCode = whereJson.optString("containerCode"); - String containerType = whereJson.optString("containerType"); - String start_point_code = whereJson.optString("locationFrom"); - String next_point_code = whereJson.optString("locationTo"); - String priority = whereJson.optString("priority"); - - String start_device_code = ""; - String next_device_code = ""; - //判断必填项是否为空 - if (StrUtil.isEmpty(taskCode)) { - throw new WDKException("任务号不能为空"); - } - if (StrUtil.isEmpty(start_point_code)) { - throw new WDKException("起点不能为空"); - } - if (StrUtil.isEmpty(next_point_code)) { - throw new WDKException("终点不能为空"); - } - if (StrUtil.isEmpty(containerCode)) { - throw new WDKException("容器编号不能为空"); - } - if (start_point_code.indexOf("-") > 0) { - String str[] = start_point_code.split("-"); - start_device_code = str[0]; - } else { - start_device_code = start_point_code; - } + //获取甲方wcs传过来的参数 + String houseCode = whereJson.optString("houseCode"); + String systemCode = whereJson.optString("systemCode"); + JSONObject parameters = whereJson.optJSONObject("parameters"); + String taskCode = whereJson.optString("taskCode"); + String taskType = whereJson.optString("taskType"); + String taskCreateDatetime = whereJson.optString("taskCreateDatetime"); + String containerCode = whereJson.optString("containerCode"); + String containerType = whereJson.optString("containerType"); + String start_point_code = whereJson.optString("locationFrom"); + String next_point_code = whereJson.optString("locationTo"); + String priority = whereJson.optString("priority"); - if (next_point_code.indexOf("-") > 0) { - String str[] = next_point_code.split("-"); - next_device_code = str[0]; - } else { - next_device_code = next_point_code; - } + String start_device_code = ""; + String next_device_code = ""; + //判断必填项是否为空 + if (StrUtil.isEmpty(taskCode)) { + map.put("responseCode", 1); + map.put("responseMessage", "任务号不能为空"); + return map; + } + if (StrUtil.isEmpty(start_point_code)) { + map.put("responseCode", 1); + map.put("responseMessage", "起点不能为空"); + return map; + } + if (StrUtil.isEmpty(next_point_code)) { + map.put("responseCode", 1); + map.put("responseMessage", "终点不能为空"); + return map; + } + if (StrUtil.isEmpty(containerCode)) { + map.put("responseCode", 1); + map.put("responseMessage", "容器编号不能为空"); + return map; + } - //查询wcs传过来的起点终点路由 - List list = routeLineService.getShortPathLines(start_device_code, next_device_code, "normal"); - if (ObjectUtil.isEmpty(list)) { - throw new WDKException("路由不通!"); - } - //查询任务编码是否重复 - TaskDto taskDto = taskService.findByCodeFromCache(taskCode); - if (taskDto != null) { - throw new WDKException("不能存在相同的任务号!"); - } - //判断载具编码是否相同 - if (!StrUtil.isEmpty(containerCode)) { - TaskDto vehicle_dto = taskService.findByContainer(containerCode); - if (vehicle_dto != null) { - throw new WDKException("已存在该容器号的任务!"); - } - } + if (start_point_code.indexOf("-") > 0) { + String str[] = start_point_code.split("-"); + start_device_code = str[0]; + } else { + start_device_code = start_point_code; + } - JSONObject jo = new JSONObject(); - jo.put("task_code", taskCode); - jo.put("start_point_code", start_point_code); - jo.put("next_point_code", next_point_code); - jo.put("start_parent_code", start_point_code); - jo.put("next_parent_code", next_point_code); - jo.put("start_device_code", start_device_code); - jo.put("next_device_code", next_device_code); - jo.put("priority", priority); - jo.put("vehicle_code", containerCode); - jo.put("vehicle_type", containerType); - jo.put("create_time", taskCreateDatetime); - jo.put("task_type", taskType); - TaskDto task_dto = (TaskDto) JSONObject.toBean(jo, TaskDto.class); - try { - taskService.create(task_dto); - } catch (Exception e) { - e.printStackTrace(); - JSONObject json = new JSONObject(); - json.put("task_code", taskCode); - json.put("message", e.getMessage()); - errArr.add(json); - } + if (next_point_code.indexOf("-") > 0) { + String str[] = next_point_code.split("-"); + next_device_code = str[0]; + } else { + next_device_code = next_point_code; + } - if (ObjectUtil.isEmpty(errArr)) { - resultJson.put("responseCode", 0); - resultJson.put("responseMessage", "操作成功"); - } else { - resultJson.put("responseCode", 400); - resultJson.put("responseMessage", "操作失败"); + //查询wcs传过来的起点终点路由 + List list = routeLineService.getShortPathLines(start_device_code, next_device_code, "normal"); + if (ObjectUtil.isEmpty(list)) { + map.put("responseCode", 1); + map.put("responseMessage", "路由不通!"); + return map; + } + //查询任务编码是否重复 + TaskDto taskDto = taskService.findByCodeFromCache(taskCode); + if (taskDto != null) { + map.put("responseCode", 1); + map.put("responseMessage", "不能存在相同的任务号!"); + return map; + } + //判断载具编码是否相同 + if (!StrUtil.isEmpty(containerCode)) { + TaskDto vehicle_dto = taskService.findByContainer(containerCode); + if (vehicle_dto != null) { + map.put("responseCode", 1); + map.put("responseMessage", "已存在该容器号的任务!"); + return map; } - resultJson.put("parameters", errArr); - log.info("taskCreate--------------:输出参数:" + resultJson.toString()); + } + JSONObject jo = new JSONObject(); + jo.put("task_code", taskCode); + jo.put("start_point_code", start_point_code); + jo.put("next_point_code", next_point_code); + jo.put("start_parent_code", start_point_code); + jo.put("next_parent_code", next_point_code); + jo.put("start_device_code", start_device_code); + jo.put("next_device_code", next_device_code); + jo.put("priority", priority); + jo.put("vehicle_code", containerCode); + jo.put("vehicle_type", containerType); + jo.put("create_time", taskCreateDatetime); + jo.put("task_type", taskType); + TaskDto task_dto = (TaskDto) JSONObject.toBean(jo, TaskDto.class); + try { + taskService.create(task_dto); } catch (Exception e) { - resultJson.put("responseCode", 400); - resultJson.put("parameters", e.getMessage()); - resultJson.put("responseMessage", "操作失败"); - log.info("taskCreate--------------:输出参数:" + resultJson.toString()); + e.printStackTrace(); + map.put("responseCode", 1); + map.put("responseMessage", e.getMessage()); + return map; } - return resultJson; + map.put("responseCode", 0); + map.put("responseMessage", "创建任务成功!"); + map.put("parameters", new HashMap<>()); + return map; } @Override - public Map taskFeedback(Map whereJson){ + public Map taskFeedback(Map whereJson) { log.info("taskFeedback-----请求参数{}", whereJson.toString()); - String taskCode = (String) whereJson.get("task_code"); - String vehicle_code = (String) whereJson.get("carId"); + String taskCode = MapUtil.getStr(whereJson, "taskCode"); + String carId = MapUtil.getStr(whereJson, "carId"); HttpResponse result = null; AddressDto addressDto = addressService.findByCode("taskFeedback"); String wcsurl = acsConfigService.findConfigFromCache().get(AcsConfig.WCSURL); @@ -189,47 +183,22 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { .header("Authorization", token).body(String.valueOf(whereJson)) .execute(); } catch (Exception e) { - String msg = e.getMessage(); - //网络不通 - System.out.println(msg); - logServer.log(taskCode, "taskFeedback", "error", whereJson.toString(), msg, String.valueOf(result.getStatus()), url, vehicle_code); - log.info("taskFeedback-----异常输出参数{}", msg); - } - String type = ""; - if(!ObjectUtil.isEmpty(result)){ - if (result.getStatus() == 0) { - type = "info"; - } else { - type = "error"; - } - } else { - type = "error"; + logServer.log(taskCode, "taskFeedback", "error", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, carId); + Map map = new HashMap<>(); + map.put("responseCode", 1); + map.put("responseMessage", e.getMessage()); + map.put("parameters", new HashMap<>()); + return map; } - - logServer.log(taskCode, "taskFeedback", type, whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, vehicle_code); + logServer.log(taskCode, "taskFeedback", "success", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, carId); JSONObject jo = JSONObject.fromObject(result.body()); - log.info("taskFeedback-----输出参数{}", jo.toString()); return jo; } @Override - public Map taskDeprecate(Map whereJson) throws Exception { - InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class); + public Map taskDeprecate(Map whereJson) { log.info("taskDeprecate--------------:输入参数" + whereJson.toString()); - String taskCode = MapUtil.getStr(whereJson,"task_code"); - String houseCode =MapUtil.getStr(whereJson,"taskhouseCode_code"); - Object parameters = whereJson.get("parameters"); - String systemCode = MapUtil.getStr(whereJson,"systemCode"); - String reason = MapUtil.getStr(whereJson,"reason"); - if(ObjectUtil.isEmpty(taskCode)){ - throw new BadRequestException("任务编号不能为空"); - } - JSONObject map = new JSONObject(); - map.put("houseCode",houseCode); - map.put("systemCode",systemCode); - map.put("parameters",parameters); - map.put("taskCode",taskCode); - map.put("reason",reason); + String taskCode = MapUtil.getStr(whereJson, "task_code"); HttpResponse result = null; AddressDto addressDto = addressService.findByCode("deprecateTask"); String wcsurl = acsConfigService.findConfigFromCache().get(AcsConfig.WCSURL); @@ -240,50 +209,57 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { .header("Authorization", token).body(String.valueOf(whereJson)) .execute(); } catch (Exception e) { - String msg = e.getMessage(); - //网络不通 - System.out.println(msg); - logServer.log(taskCode, "taskFeedback", "error", whereJson.toString(), msg, String.valueOf(result.getStatus()), url, ""); - log.info("taskFeedback-----异常输出参数{}", msg); - } - String type = ""; - if(!ObjectUtil.isEmpty(result)){ - if (result.getStatus() == 0) { - type = "info"; - } else { - type = "error"; - } - } else { - type = "error"; + e.printStackTrace(); + logServer.log(taskCode, "taskFeedback", "error", whereJson.toString(), e.getMessage(), String.valueOf(result.getStatus()), url, ""); + Map map = new HashMap<>(); + map.put("responseCode", 1); + map.put("responseMessage", e.getMessage()); + return map; } - - logServer.log(taskCode, "taskDeprecate", type, whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, ""); + logServer.log(taskCode, "taskDeprecate", "success", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, ""); JSONObject jo = JSONObject.fromObject(result.body()); log.info("taskDeprecate-----输出参数{}", jo.toString()); return jo; } @Override - public HttpResponse deviceStatusQuery(JSONObject whereJson) throws Exception { - String wmsUrl = acsConfigService.findConfigFromCache().get(AcsConfig.WMSURL); - - AddressDto addressDto = addressService.findByCode("deviceStatusQuery"); - String methods_url = addressDto.getMethods_url(); - String url = wmsUrl + methods_url; - HttpResponse result = null; - log.info("feedWeighing----请求参数{}", whereJson); + public Map checkDeviceStatus(Map whereJson) throws Exception { + Map map = new HashMap<>(); + String systemCode = MapUtil.getStr(whereJson, "systemCode"); + String houseCode = MapUtil.getStr(whereJson, "houseCode"); + String parameters = MapUtil.getStr(whereJson, "parameters"); + String deviceCode = MapUtil.getStr(whereJson, "deviceCode"); + if (StrUtil.isEmpty(deviceCode)) { + map.put("responseCode", 1); + map.put("responseMessage", "请求设备号不能为空!"); + map.put("parameters", new HashMap<>()); + return map; + } + Device device = deviceAppService.findDeviceByCode(deviceCode); + StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; + int status = 0; + Boolean hasGoods = false; + String statusDescription = "正常"; + if (device.getDeviceDriver() instanceof StandardConveyorLineDeviceDriver) { + standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver(); + status = standardConveyorLineDeviceDriver.getError(); + int move = standardConveyorLineDeviceDriver.getMove(); + if (status != 0) { + statusDescription = "异常"; + } + if (move == 1) { + hasGoods = true; + } + } else if (1 == 1) { - try { - result = HttpRequest.post(url) - .body(String.valueOf(whereJson)) - .execute(); - System.out.println(result); - log.info("feedWeighing----返回参数{}", result); - } catch (Exception e) { - String msg = e.getMessage(); - //网络不通 - System.out.println(msg); } - return result; + map.put("responseCode", 0); + map.put("responseMessage", "响应成功!"); + map.put("parameters", new HashMap<>()); + map.put("status", status); + map.put("statusDescription", statusDescription); + map.put("hasGoods", hasGoods); + return map; } + } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java index d6cf2a4..066793c 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java @@ -34,7 +34,6 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { @Override public Map waitpointRequest(JSONObject param) { - // TODO 待定 String inst_code = param.getString("task_code"); String address = param.getString("address"); StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; @@ -44,7 +43,6 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { map.put("status", 400); map.put("message", "请求失败,指令为空!"); logServer.log("", "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", ""); -// return map; throw new BadRequestException("请求失败,指令为空!"); } String task_code = instructionDto.getTask_code(); @@ -156,7 +154,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); throw new BadRequestException("请求失败,终点位置无货!"); } else { - standardConveyorLineDeviceDriver.writing(1, 2); + standardConveyorLineDeviceDriver.writing(1, 3); feedMap.put("feedbackStatus", "putFinish"); Map feedback = acsToWmsZDService.taskFeedback(feedMap); int responseCode = (int) feedback.get("responseCode"); @@ -182,6 +180,5 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { map.put("message", "请求失败,IN OUT 站点错误!"); logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); throw new BadRequestException("请求失败,终点位置无货!"); - //return map; } } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java b/hd/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java index b6dec60..eccd936 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java @@ -108,6 +108,14 @@ public class InstructionController { return new ResponseEntity<>(HttpStatus.OK); } + @Log("强制取消指令") + @ApiOperation("强制取消指令") + @PostMapping(value = "/forceCancel/{id}") + public ResponseEntity forceCancel(@RequestBody String id) throws Exception { + instructionService.cancelNOSendAgv(id); + return new ResponseEntity<>(HttpStatus.OK); + } + @Log("导出指令") @ApiOperation("导出指令") @GetMapping(value = "/download") diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index b570692..e9ddead 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -774,7 +774,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { JSONObject map = new JSONObject(); map.put("task_code",entity.getTask_code()); - // map.put("reason",entity.getTask_code()); + map.put("reason","acs手动取消!"); acsToWmsZDService.taskDeprecate(map); } List shortPathsList = routeLineService.getShortPathLines(entity.getStart_device_code(), entity.getNext_device_code(), entity.getRoute_plan_code()); diff --git a/hd/nladmin-system/src/main/resources/config/application-dev.yml b/hd/nladmin-system/src/main/resources/config/application-dev.yml index 4ecb24d..6818eda 100644 --- a/hd/nladmin-system/src/main/resources/config/application-dev.yml +++ b/hd/nladmin-system/src/main/resources/config/application-dev.yml @@ -60,7 +60,7 @@ spring: multi-statement-alagvslow: true redis: #数据库索引 - database: ${REDIS_DB:0} + database: ${REDIS_DB:11} host: ${REDIS_HOST:127.0.0.1} port: ${REDIS_PORT:6379} password: ${REDIS_PWD:} diff --git a/hd/nladmin-system/src/main/resources/config/application.yml b/hd/nladmin-system/src/main/resources/config/application.yml index 2e814bc..1733121 100644 --- a/hd/nladmin-system/src/main/resources/config/application.yml +++ b/hd/nladmin-system/src/main/resources/config/application.yml @@ -2,7 +2,7 @@ spring: freemarker: check-template-location: false profiles: - active: prod + active: dev jackson: time-zone: GMT+8 data: diff --git a/qd/src/views/acs/instruction/index.vue b/qd/src/views/acs/instruction/index.vue index 5dd70a2..145fbdb 100644 --- a/qd/src/views/acs/instruction/index.vue +++ b/qd/src/views/acs/instruction/index.vue @@ -159,6 +159,7 @@ 完成 取消 + 强制取消 @@ -290,6 +291,14 @@ export default { console.log(err.response.data.message) }) }, + forceCancel(index, row) { + crudInstruction.forceCancel(row.instruction_id).then(res => { + this.crud.toQuery() + this.crud.notify('强制取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS) + }).catch(err => { + console.log(err.response.data.message) + }) + }, reload() { crudInstruction.reload().then(res => { this.crud.toQuery() @@ -313,6 +322,9 @@ export default { case 'b':// 取消 this.cancel(command.index, command.row) break + case 'c':// 强制取消 + this.forceCancel(command.index, command.row) + break } } diff --git a/qd/src/views/acs/route/routeLine/index.vue b/qd/src/views/acs/route/routeLine/index.vue index 7495a75..acf906b 100644 --- a/qd/src/views/acs/route/routeLine/index.vue +++ b/qd/src/views/acs/route/routeLine/index.vue @@ -315,6 +315,13 @@ export default { this.form.next_device_code = Array.of(data.form.next_device_code.split('').join('')) return true }, + [CRUD.HOOK.beforeSubmit](data) { + if (this.crud.status.edit === 1) { + this.form.device_code = data.form.device_code.join('') + this.form.next_device_code = data.form.next_device_code.join('') + } + return true + }, // 改变状态 changeEnabled(data) { var msg = '停用'