Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -108,6 +108,8 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
int qty = 0;
|
||||
int last_qty = 0;
|
||||
|
||||
int out_finish = 0;
|
||||
|
||||
|
||||
//下发命令
|
||||
int to_command = 0;
|
||||
@@ -241,7 +243,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
case 3:
|
||||
log.info("运行中");
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
if (move == 1 && !requireSucess && task > 0 && task1 > 0) {
|
||||
//申请套管校验
|
||||
// apply_for_casing_inspection(material1, material2);
|
||||
@@ -400,7 +402,36 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
} else if (this.getMode() == 4) {
|
||||
mode = "套管完成";
|
||||
}
|
||||
if(this.getMove() ==0){
|
||||
move = "无货";
|
||||
}else if(this.getMove() == 1){
|
||||
move = "有托盘";
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||
jo.put("move", move);
|
||||
jo.put("inventory_qty", qty);
|
||||
jo.put("out_finish", out_finish);
|
||||
jo.put("material", material1);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -117,11 +117,11 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB101.W4"));
|
||||
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB101.W6"));
|
||||
list.add(new ItemDto(item_error, "报警", "DB101.W8"));
|
||||
list.add(new ItemDto(item_task, "任务号1", "DB101.DW116"));
|
||||
list.add(new ItemDto(item_task1, "任务号2", "DB101.DW118"));
|
||||
list.add(new ItemDto(item_material1, "物料1", "DB101.STRING10.50"));
|
||||
list.add(new ItemDto(item_material2, "物料2", "DB101.STRING62.50"));
|
||||
list.add(new ItemDto(item_qty, "数量", "DB101.W114"));
|
||||
list.add(new ItemDto(item_task, "纸管库任务号", "DB101.D116"));
|
||||
list.add(new ItemDto(item_task1, "行架任务号", "DB101.D120"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||
@@ -49,7 +50,7 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver {
|
||||
public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
protected org.nl.acs.device_driver.basedriver.indoor_manipulator.ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
@@ -647,6 +648,76 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
return taskDtos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "脱机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "待机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 2) {
|
||||
action = "反馈气胀轴尺寸";
|
||||
} else if (this.getAction() == 3) {
|
||||
action = "申请放货点";
|
||||
} else if (this.getAction() == 4) {
|
||||
action = "申请新取货点";
|
||||
} else if (this.getAction() == 5) {
|
||||
action = "申请二次放货点";
|
||||
} else if (this.getAction() == 6) {
|
||||
action = "缓存库取货完成";
|
||||
} else if (this.getAction() == 7) {
|
||||
action = "缓存线放货完成";
|
||||
} else if (this.getAction() == 8) {
|
||||
action = "任务完成";
|
||||
}
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("task", task);
|
||||
jo.put("walk_y", String.valueOf(this.walk_y));
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", this.getMessage());
|
||||
jo.put("is_click", true);
|
||||
jo.put("x", x_position);
|
||||
jo.put("y", y_position);
|
||||
jo.put("inflatable_shaft_size", this.inflatable_shaft_size);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.requireSucess = false;
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void writing(String param, String value) {
|
||||
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
|
||||
@@ -688,6 +688,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
@@ -696,16 +697,22 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "入库中";
|
||||
mode = "运行中";
|
||||
} else if (this.getMode() == 4) {
|
||||
mode = "出库中";
|
||||
mode = "申请出纸管";
|
||||
}
|
||||
if(this.getMove() == 0){
|
||||
move = "无货";
|
||||
}else if(this.getMove() == 1){
|
||||
move = "有托盘";
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||
jo.put("inventory_qty", inventory_qty);
|
||||
jo.put("inventory_qty", item_qty1);
|
||||
jo.put("move", move);
|
||||
jo.put("out_finish", out_finish);
|
||||
jo.put("material", material);
|
||||
jo.put("material", item_material1);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
|
||||
return jo;
|
||||
|
||||
@@ -308,7 +308,6 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String action = "";
|
||||
String move = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
@@ -318,6 +317,8 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
} else if (this.getMode() == 4) {
|
||||
mode = "套轴申请";
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
@@ -335,6 +336,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
|
||||
jo.put("move", move);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", this.getMessage());
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
return this.device;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
String message = null;
|
||||
try {
|
||||
@@ -108,6 +109,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
qty2 = this.itemProtocol.getQty2();
|
||||
task = this.itemProtocol.getTask();
|
||||
|
||||
|
||||
if (mode != last_mode) {
|
||||
this.requireSucess = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
||||
@@ -259,6 +261,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
} else if (this.getMode() == 4) {
|
||||
mode = "反馈重量";
|
||||
}
|
||||
|
||||
if (this.getMove1() == 0 && this.getMove2() == 0) {
|
||||
@@ -274,6 +278,9 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
jo.put("move2", move2);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("qty1", this.getQty1());
|
||||
jo.put("qty2", this.getQty2());
|
||||
jo.put("message", this.getMessage());
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,15 +80,15 @@
|
||||
<!-- </el-button>-->
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="formDia" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="formDia" :title="crud.status.title" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px" :inline="true">
|
||||
<el-form-item v-if="false" label="任务标识" prop="task_id">
|
||||
<el-input v-model="form.task_id" style="width: 370px;" />
|
||||
<el-input v-model="form.task_id" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类型">
|
||||
<el-select
|
||||
v-model="form.material"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -104,7 +104,7 @@
|
||||
<el-form-item label="任务类型">
|
||||
<el-select
|
||||
v-model="form.task_type"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -120,7 +120,7 @@
|
||||
<el-form-item v-if="form.task_type == '7'" label="立库任务类型">
|
||||
<el-select
|
||||
v-model="form.storage_task_type"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -136,7 +136,7 @@
|
||||
<el-form-item label="agv系统">
|
||||
<el-select
|
||||
v-model="form.agv_system_type"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
@@ -153,7 +153,7 @@
|
||||
<el-form-item label="路由方案">
|
||||
<el-select
|
||||
v-model="form.route_plan_code"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
default-first-option
|
||||
@@ -170,7 +170,7 @@
|
||||
<el-form-item label="起点" prop="start_point_code">
|
||||
<el-select
|
||||
v-model="form.start_point_code"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="showStartStorage"
|
||||
@@ -186,7 +186,7 @@
|
||||
<el-form-item v-show="start_flag" label="起点-列" prop="from_y">
|
||||
<el-select
|
||||
v-model="form.from_y"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -202,7 +202,7 @@
|
||||
<el-form-item v-show="start_flag" label="起点-层" prop="from_z">
|
||||
<el-select
|
||||
v-model="form.from_z"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -218,7 +218,7 @@
|
||||
<el-form-item label="终点" prop="next_point_code">
|
||||
<el-select
|
||||
v-model="form.next_point_code"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="showEndStorage"
|
||||
@@ -234,7 +234,7 @@
|
||||
<el-form-item v-show="end_flag" label="终点-列" prop="to_y">
|
||||
<el-select
|
||||
v-model="form.to_y"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -250,7 +250,7 @@
|
||||
<el-form-item v-show="end_flag" label="终点-层" prop="to_z">
|
||||
<el-select
|
||||
v-model="form.to_z"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
@@ -267,7 +267,7 @@
|
||||
<el-form-item label="起点2" prop="start_point_code2">
|
||||
<el-select
|
||||
v-model="form.start_point_code2"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
>
|
||||
@@ -282,7 +282,7 @@
|
||||
<el-form-item label="终点2" prop="next_point_code2">
|
||||
<el-select
|
||||
v-model="form.next_point_code2"
|
||||
style="width: 370px;"
|
||||
style="width: 240px;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
>
|
||||
@@ -295,17 +295,113 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优先级">
|
||||
<el-input v-model="form.priority" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-input v-model="form.priority" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="载具号">
|
||||
<el-input v-model="form.vehicle_code" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-input v-model="form.vehicle_code" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.task_type === '4'" label="取货高度" prop="start_height">
|
||||
<el-input v-model="form.start_height" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-input v-model="form.start_height" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.task_type === '4'" label="放货高度" prop="next_height">
|
||||
<el-input v-model="form.next_height" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-input v-model="form.next_height" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行架任务类型">
|
||||
<el-input v-model="form.truss_type" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="气胀轴代数">
|
||||
<el-input v-model="form.version" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="套管数量">
|
||||
<el-input v-model="form.bushing_num" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否套轴">
|
||||
<el-input v-model="form.is_bushing" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<!-- 页面中的表单项 -->
|
||||
<el-form-item label="纸管数组">
|
||||
<el-button v-if="showAddRowButton" @click="addNewRow">添加新行</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form :model="form">
|
||||
<el-table
|
||||
style="width: 100%;"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
:data="form.paperArray"
|
||||
stripe
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" label="序号" min-width="50" />
|
||||
<el-table-column label="设备编码" prop="device_code" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.device_code"
|
||||
style="width: 100%;"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
@change="isDisabled=false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.device_code"
|
||||
:label="item.device_code"
|
||||
:value="item.device_code"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" prop="material_code" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.material_code" style="width: 100%" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="qty" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
:prop="'paperArray.'+ scope.$index + '.qty'"
|
||||
:rules="[
|
||||
{ required: true, message: '数量不能为空!', trigger: 'blur' }
|
||||
]"
|
||||
>
|
||||
<el-input-number v-model="scope.row.qty" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger" icon="el-icon-minus" circle @click="deleteField(scope.$index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-for="(item, index) in form.paperArray" :key="index" label="纸管数组">
|
||||
<el-input v-model="item.device_code" placeholder="设备编码" />
|
||||
<el-input v-model="item.material_code" placeholder="物料编码" />
|
||||
<el-input v-model="item.qty" placeholder="数量" />
|
||||
<el-button v-if="showAddRowButton" @click="addNewRow">添加新行</el-button>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item v-for="(group, groupIndex) in paperArrays" :key="groupIndex">
|
||||
<div>
|
||||
<h3>纸管数组 {{ groupIndex + 1 }}</h3>
|
||||
<el-form-item v-for="(item, index) in group" :key="index" :label="'纸管 ' + (index + 1)">
|
||||
<el-input v-model="item.device_code" placeholder="设备编码" />
|
||||
<el-input v-model="item.material_code" placeholder="物料编码" />
|
||||
<el-input v-model="item.qty" placeholder="数量" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button> -->
|
||||
<!-- <el-button type="primary" @click="addItem">添加一行</el-button>
|
||||
<el-form ref="gridFieldFrom" :model="gridFieldFrom">
|
||||
<el-table
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
class="mt-10"
|
||||
:data="gridFieldFrom.gridFieldData"
|
||||
stripe
|
||||
border
|
||||
/>
|
||||
</el-form> -->
|
||||
<el-form-item label="描述信息" prop="description">
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
@@ -479,6 +575,7 @@ export default {
|
||||
edit: ['admin', 'task:edit'],
|
||||
del: ['admin', 'task:del']
|
||||
},
|
||||
showAddRowButton: true,
|
||||
form: {
|
||||
task_id: null,
|
||||
vehicle_code: null,
|
||||
@@ -505,7 +602,22 @@ export default {
|
||||
to_z: null,
|
||||
agv_system_type: '',
|
||||
next_height: '0',
|
||||
start_height: '0'
|
||||
start_height: '0',
|
||||
truss_type: null,
|
||||
version: null,
|
||||
bushing_num: null,
|
||||
is_bushing: null,
|
||||
paperArray: [{
|
||||
device_code: '',
|
||||
material_code: '',
|
||||
qty: ''
|
||||
}/* ,
|
||||
{
|
||||
device_code: '',
|
||||
material_code: '',
|
||||
qty: ''
|
||||
} */
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
start_height: [
|
||||
@@ -558,10 +670,24 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
addNewRow() {
|
||||
this.form.paperArray.push({
|
||||
device_code: '',
|
||||
material_code: '',
|
||||
qty: ''
|
||||
})
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
deleteField(index) { // 添加字段的时候删除一条数据
|
||||
console.log(index)
|
||||
if (this.form.paperArray.length > 1) {
|
||||
this.form.paperArray.splice(index, 1)
|
||||
}
|
||||
console.log(this.form.paperArray)
|
||||
},
|
||||
finish(index, row) {
|
||||
crudTask.finish(row.task_id).then(res => {
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -634,6 +634,15 @@ export default {
|
||||
} else if (val === 'task_id') {
|
||||
const obj = { name: '任务号', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'inflatable_shaft_size') {
|
||||
const obj = { name: '任务号', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'qty1') {
|
||||
const obj = { name: '任务号', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
} else if (val === 'qty2') {
|
||||
const obj = { name: '任务号', value: data[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user