psh 1 year ago
parent
commit
c4d496e1c6
  1. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/initial/ApplicationAutoInitialExecuter.java
  2. 16
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/AutoRunServiceImpl.java
  3. 3
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java
  4. 3
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  5. 6
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceAppServiceImpl.java
  6. 3
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceManageServiceImpl.java
  7. 212
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/OpcServerServiceImpl.java
  8. 4
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/route/service/impl/RouteLineServiceImpl.java
  9. 4
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  10. 16
      acs/nladmin-ui/src/views/acs/device/storageCell/index.vue
  11. 48
      acs/nladmin-ui/src/views/system/logicflow/editor/components/DiagramToolbar.vue
  12. 320
      acs/nladmin-ui/src/views/system/monitor/device/index.vue

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/initial/ApplicationAutoInitialExecuter.java

@ -10,6 +10,9 @@ import java.util.List;
@Component
public class ApplicationAutoInitialExecuter {
/**
* 获取所有实现ApplicationAutoInitial接口的bean对象
*/
@Autowired(required = false)
List<ApplicationAutoInitial> applicationAutoInitial;
//是否启动
@ -25,7 +28,7 @@ public class ApplicationAutoInitialExecuter {
while (it.hasNext()) {
ApplicationAutoInitial service = (ApplicationAutoInitial) it.next();
service.autoInitial();
service.autoInitial(); // 执行实现的autoInitial方法
}

16
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/AutoRunServiceImpl.java

@ -13,15 +13,18 @@ import org.springframework.stereotype.Service;
import java.util.*;
/**
* 初始化启动线程
*/
@Service
@Slf4j
public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitial {
@Autowired(required = false)
private List<AbstractAutoRunnable> abstractAutoRunnableList;
private List<String> autoRun_code_index = new ArrayList();
private List<Thread> threads = new ArrayList();
private List<AbstractAutoRunnable> thread_autoRun = new ArrayList();
private List<String> thread_code_index = new ArrayList();
private List<AbstractAutoRunnable> thread_autoRun = new ArrayList(); // 线程类
private List<String> autoRun_code_index = new ArrayList(); // key
private List<Thread> threads = new ArrayList(); // 运行线程
private List<String> thread_code_index = new ArrayList(); // key
@Override
public synchronized void startThread(String threadCode) {
@ -172,8 +175,13 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
: new LinkedList();
}
/**
* 自动初始化线程
* @throws Exception
*/
@Override
public void autoInitial() throws Exception {
// 获取所有的类型为AbstractAutoRunnable的bean
List<AbstractAutoRunnable> list = this.getAllAutoThread();
Iterator it = list.iterator();

3
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java

@ -1776,6 +1776,9 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
this.reload();
}
/**
* 加载货位信息
*/
@Override
public void reload() {
this.storageCells = queryAllStorageCell();

3
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java

@ -159,6 +159,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
}
}*/
/**
* 加载指令数据
*/
@Override
public void autoInitial() {
this.reload();

6
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceAppServiceImpl.java

@ -20,8 +20,8 @@ import java.util.*;
@Slf4j
@Service
public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoInitial {
private List<Device> devices = new ArrayList();
private List<String> code_indexs = new ArrayList();
private List<Device> devices = new ArrayList(); // 所有设备链表
private List<String> code_indexs = new ArrayList(); // 设备对应的下表
@Autowired
private DeviceManageService deviceManageService;
@Autowired
@ -315,7 +315,7 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn
}
public synchronized void reload() {
List<DeviceManageDto> deviceManageDtos = this.deviceManageService.queryAllWithExtra();
List<DeviceManageDto> deviceManageDtos = deviceManageService.queryAllWithExtra();
this.devices = new ArrayList();
Collections.synchronizedList(this.devices);
this.code_indexs = new ArrayList();

3
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceManageServiceImpl.java

@ -42,13 +42,16 @@ public class DeviceManageServiceImpl implements DeviceManageService {
@Override
public List<DeviceManageDto> queryAllWithExtra() {
// JSONArray arr = WQLObject.getWQLObject("acs_device").query().getResultJSONArray(0);
// 获取所有的设备
List<Device> deviceList= new LambdaQueryChainWrapper<>(deviceMapper).list();
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(deviceList));
// 获取列表扩展
// JSONArray extArr = WQLObject.getWQLObject("acs_device_extra").query().getResultJSONArray(0);
List<DeviceExtra> deviceExtraList= new LambdaQueryChainWrapper<>(deviceExtraMapper).list();
JSONArray extArr = JSONArray.parseArray(JSON.toJSONString(deviceExtraList));
// 设备+扩展DTO
List<DeviceExtraManageDto> extras = extArr.toJavaList(DeviceExtraManageDto.class);
// WQLObject runpointTab = WQLObject.getWQLObject("acs_device_runpoint");

212
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/OpcServerServiceImpl.java

@ -30,127 +30,131 @@ import java.util.Map;
@Service
public class OpcServerServiceImpl implements OpcServerService, ApplicationAutoInitial {
private static final Logger log = LoggerFactory.getLogger(OpcServerServiceImpl.class);
@Autowired OpcServerManageService opcServerManageService;
Map<String, OpcServerManageDto> opcServerManageDtos = new HashMap();
Map<String, Server> servers = Collections.synchronizedMap(new HashMap());
Map<String, Group> groups = Collections.synchronizedMap(new HashMap());
public OpcServerServiceImpl() {}
public void autoInitial() throws Exception {
this.reload();
if (OpcConfig.auto_start_opc) {
Thread t =
new Thread() {
public void run() {
Iterator var1 = OpcServerServiceImpl.this.opcServerManageDtos.values().iterator();
while (var1.hasNext()) {
OpcServerManageDto dto = (OpcServerManageDto) var1.next();
try {
OpcServerServiceImpl.this.getServer(dto.getOpc_code());
OpcServerServiceImpl.log.info("加载opc server {}", dto.getOpc_code());
} catch (Exception var4) {
OpcServerServiceImpl.log.warn("启动无法载入servers", var4);
}
}
}
};
t.start();
private static final Logger log = LoggerFactory.getLogger(OpcServerServiceImpl.class);
@Autowired
OpcServerManageService opcServerManageService;
Map<String, OpcServerManageDto> opcServerManageDtos = new HashMap();
Map<String, Server> servers = Collections.synchronizedMap(new HashMap());
Map<String, Group> groups = Collections.synchronizedMap(new HashMap());
public OpcServerServiceImpl() {
}
}
public synchronized void reload() {
this.opcServerManageDtos = this.opcServerManageService.queryAllServerMap();
this.opcServerManageDtos = Collections.synchronizedMap(this.opcServerManageDtos);
}
public synchronized Group getServer(String code) {
Group group = null;
group = (Group) this.groups.get(code);
if (group != null) {
try {
if (group.isActive()) {
return group;
/**
* 加载opc服务启动opc线程
* @throws Exception
*/
public void autoInitial() throws Exception {
this.reload(); // 加载opc服务
if (OpcConfig.auto_start_opc) {
Thread t =
new Thread(() -> {
Iterator var1 = OpcServerServiceImpl.this.opcServerManageDtos.values().iterator();
while (var1.hasNext()) {
OpcServerManageDto dto = (OpcServerManageDto) var1.next();
try {
OpcServerServiceImpl.this.getServer(dto.getOpc_code());
OpcServerServiceImpl.log.info("加载opc server {}", dto.getOpc_code());
} catch (Exception var4) {
OpcServerServiceImpl.log.warn("启动无法载入servers", var4);
}
}
});
t.start();
}
} catch (JIException var9) {
var9.printStackTrace();
}
}
Server server = (Server) this.servers.get(code);
boolean needcreate = false;
if (server == null) {
needcreate = true;
} else {
try {
group = server.findGroup(OpcConfig.opc_server_default_group);
} catch (UnknownHostException
| JIException
| UnknownGroupException
| NotConnectedException
| IllegalArgumentException var8) {
var8.printStackTrace();
needcreate = true;
}
public synchronized void reload() {
this.opcServerManageDtos = this.opcServerManageService.queryAllServerMap();
this.opcServerManageDtos = Collections.synchronizedMap(this.opcServerManageDtos);
}
if (needcreate) {
OpcServerManageDto dto = (OpcServerManageDto) this.opcServerManageDtos.get(code);
if (dto == null) {
throw new BadRequestException("code 不存在");
}
public synchronized Group getServer(String code) {
Group group = null;
group = (Group) this.groups.get(code);
if (group != null) {
try {
if (group.isActive()) {
return group;
}
} catch (JIException var9) {
var9.printStackTrace();
}
}
server = OpcServerUtl.getServerWithOutException(
dto.getOpc_host(),
dto.getCls_id(),
dto.getUser(),
dto.getPassword(),
dto.getDomain());
Server server = (Server) this.servers.get(code);
boolean needcreate = false;
if (server == null) {
needcreate = true;
} else {
try {
group = server.findGroup(OpcConfig.opc_server_default_group);
} catch (UnknownHostException
| JIException
| UnknownGroupException
| NotConnectedException
| IllegalArgumentException var8) {
var8.printStackTrace();
needcreate = true;
}
}
if (needcreate) {
OpcServerManageDto dto = (OpcServerManageDto) this.opcServerManageDtos.get(code);
if (dto == null) {
throw new BadRequestException("code 不存在");
}
server = OpcServerUtl.getServerWithOutException(
dto.getOpc_host(),
dto.getCls_id(),
dto.getUser(),
dto.getPassword(),
dto.getDomain());
// server = OpcServerUtl.getServerWithOutException(this.OpcServer.getOpc_host(), this.OpcServer.getCls_id(), this.OpcServer.getUser(), this.OpcServer.getPassword(), this.OpcServer.getDomain());
try {
group = server.addGroup(OpcConfig.opc_server_default_group);
} catch (Exception var7) {
throw new BadRequestException(var7.toString());
}
try {
group = server.addGroup(OpcConfig.opc_server_default_group);
} catch (Exception var7) {
throw new BadRequestException(var7.toString());
}
this.servers.put(code, server);
this.groups.put(code, group);
}
this.servers.put(code, server);
this.groups.put(code, group);
return group;
}
return group;
}
public synchronized void clearServer(String code) {
try {
Server server = (Server) this.servers.get(code);
if (server != null) {
server.disconnect();
}
public synchronized void clearServer(String code) {
try {
Server server = (Server) this.servers.get(code);
if (server!=null){
server.disconnect();
}
} catch (Exception e) {
e.printStackTrace();
log.error("清理server异常,", e.getMessage());
}
} catch (Exception e) {
e.printStackTrace();
log.error("清理server异常,",e.getMessage());
this.servers.remove(code);
this.groups.remove(code);
}
this.servers.remove(code);
this.groups.remove(code);
}
public void writeInteger(String code, ItemValue... values) {
try {
Group group = this.getServer(code);
OpcUtl.writeValue(group, values);
} catch (Exception var4) {
this.clearServer(code);
log.warn("写入出错opc server {} 重新加载", code, var4);
ThreadUtl.sleep(5000L);
throw var4;
public void writeInteger(String code, ItemValue... values) {
try {
Group group = this.getServer(code);
OpcUtl.writeValue(group, values);
} catch (Exception var4) {
this.clearServer(code);
log.warn("写入出错opc server {} 重新加载", code, var4);
ThreadUtl.sleep(5000L);
throw var4;
}
}
}
}

4
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/route/service/impl/RouteLineServiceImpl.java

@ -514,6 +514,10 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
return false;
}
/**
* 加载路由路线
* @throws SQLException
*/
@Override
public void reload() throws SQLException {
Object[] param = new Object[0];

4
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -246,6 +246,10 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
FileUtil.downloadExcel(list, response);
}*/
/**
* 获取未完成任务
* @throws Exception
*/
@Override
public void autoInitial() throws Exception {
Class var1 = TaskInstructionLock.class;

16
acs/nladmin-ui/src/views/acs/device/storageCell/index.vue

@ -12,6 +12,22 @@
style="width: 200px;"
class="filter-item"
/>
<el-input
v-model="query.parent_storage_code"
size="small"
clearable
placeholder="输入父级货位编码"
style="width: 200px;"
class="filter-item"
/>
<el-input
v-model="query.address"
size="small"
clearable
placeholder="输入agv站点"
style="width: 200px;"
class="filter-item"
/>
<rrOperation />
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->

48
acs/nladmin-ui/src/views/system/logicflow/editor/components/DiagramToolbar.vue

@ -24,40 +24,64 @@
<step-foward size="18" />
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_lock">锁定</el-button>
<el-tooltip class="item" effect="dark" content="锁定" placement="top">
<svg-icon class="toolbar-item" icon-class="lock" @click="$_lock"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_unlock">解锁</el-button>
<el-tooltip class="item" effect="dark" content="解锁" placement="top">
<svg-icon class="toolbar-item" icon-class="unlock" @click="$_unlock"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_verticalAlign">垂直居中</el-button>
<el-tooltip class="item" effect="dark" content="垂直对齐" placement="top">
<svg-icon class="toolbar-item" icon-class="verticalAlign" @click="$_verticalAlign"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_horizontalAlign">水平居中</el-button>
<el-tooltip class="item" effect="dark" content="水平对齐" placement="top">
<svg-icon class="toolbar-item" icon-class="horizontalAlign" @click="$_horizontalAlign"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_leftAlign">向左对齐</el-button>
<el-tooltip class="item" effect="dark" content="左边对齐" placement="top">
<svg-icon class="toolbar-item" icon-class="leftAlign" @click="$_leftAlign"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_rightAlign">向右对齐</el-button>
<el-tooltip class="item" effect="dark" content="右边对齐" placement="top">
<svg-icon class="toolbar-item" icon-class="rightAlign" @click="$_rightAlign"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_upAlign">向上对齐</el-button>
<el-tooltip class="item" effect="dark" content="顶部对齐" placement="top">
<svg-icon class="toolbar-item" icon-class="upAlign" @click="$_upAlign"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_downAlign">向下对齐</el-button>
<el-tooltip class="item" effect="dark" content="底部对齐" placement="top">
<svg-icon class="toolbar-item" icon-class="downAlign" @click="$_downAlign"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_horizontalDistribution">水平分布</el-button>
<el-tooltip class="item" effect="dark" content="水平分布" placement="top">
<svg-icon class="toolbar-item" icon-class="verticalDistribution" @click="$_horizontalDistribution"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_verticalDistribution">垂直分布</el-button>
<el-tooltip class="item" effect="dark" content="垂直分布" placement="top">
<svg-icon class="toolbar-item" icon-class="horizontalDistribution" @click="$_verticalDistribution"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_cleanGraph">清空画布</el-button>
<el-tooltip class="item" effect="dark" content="清空画布" placement="top">
<svg-icon class="toolbar-item" icon-class="clear" @click="$_cleanGraph"/>
</el-tooltip>
</div>
<div style="margin-right: 5px">
<el-button size="mini" type="primary" @click="$_saveGraph">保存</el-button>
<el-tooltip class="item" effect="dark" content="保存" placement="top">
<svg-icon class="toolbar-item" icon-class="save" @click="$_saveGraph"/>
</el-tooltip>
</div>
<div>
<el-select v-model="linetype" size="mini" @change="$_changeLineType" style="width: 80px">

320
acs/nladmin-ui/src/views/system/monitor/device/index.vue

@ -37,10 +37,10 @@
</el-form-item>
<el-form-item label="设备状态" label-width="80px">
<el-radio-group v-model="form.hasGoodStatus">
<el-radio-button :label="0">无货</el-radio-button>
<el-radio-button :label="1">有托盘</el-radio-button>
<el-radio-button :label="2">有托盘有货</el-radio-button>
<el-radio-group v-model="form.option">
<el-radio-button :label="0">禁止进出</el-radio-button>
<el-radio-button :label="1">允许进入</el-radio-button>
<el-radio-button :label="2">允许离开</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
@ -59,8 +59,8 @@
<el-form-item label="设备状态" label-width="80px">
<el-radio-group v-model="form.hasGoodStatus">
<el-radio-button :label="0">无货</el-radio-button>
<el-radio-button :label="1">空料斗</el-radio-button>
<el-radio-button :label="2">满料斗</el-radio-button>
<el-radio-button :label="1">有托盘</el-radio-button>
<el-radio-button :label="2">有托盘有货</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="物料编码" prop="material_type" label-width="80px">
@ -79,21 +79,84 @@
<el-form-item label="设备编号" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true" />
</el-form-item>
<el-form-item label="缺料请求成功" prop="requireSucess" label-width="120px">
<el-form-item label="禁用机械手" prop="is_disable" label-width="120px">
<el-radio-group v-model="form.is_disable">
<el-radio-button :label="0">正常</el-radio-button>
<el-radio-button :label="1">禁用</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="请求标记" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess">
<el-radio-button :label="0"></el-radio-button>
<el-radio-button :label="1"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="空想请求成功" prop="fullrequireSucess" label-width="120px">
<el-radio-group v-model="form.fullrequireSucess">
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible4 = false"> </el-button>
<el-button type="primary" @click="dialogSave"> </el-button>
</div>
</el-dialog>
<el-dialog title="设备设置" :visible.sync="dialogFormVisible5" width="35%">
<el-form :model="form" size="small">
<el-form-item label="设备编号" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true" />
</el-form-item>
<el-form-item label="请求标记" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess">
<el-radio-button :label="0"></el-radio-button>
<el-radio-button :label="1"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible4 = false"> </el-button>
<el-button @click="dialogFormVisible5 = false"> </el-button>
<el-button type="primary" @click="dialogSave"> </el-button>
</div>
</el-dialog>
<el-dialog title="设备设置" :visible.sync="dialogFormVisible7" width="35%">
<el-form :model="form" size="small">
<el-form-item label="设备编号" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true" />
</el-form-item>
<el-form-item label="条码" label-width="120px">
<el-input v-model="form.hand_barcode" :disabled="false" />
</el-form-item>
<el-form-item label="请求标记" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess">
<el-radio-button :label="0"></el-radio-button>
<el-radio-button :label="1"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible7 = false"> </el-button>
<el-button type="primary" @click="dialogSave"> </el-button>
</div>
</el-dialog>
<el-dialog title="设备设置" :visible.sync="dialogFormVisible6" width="35%">
<el-form :model="form" size="small">
<el-form-item label="设备编号" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true" />
</el-form-item>
<el-form-item label="申请指令标记" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess">
<el-radio-button :label="0"></el-radio-button>
<el-radio-button :label="1"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="请求任务标记" prop="applySucess" label-width="120px">
<el-radio-group v-model="form.applySucess">
<el-radio-button :label="0"></el-radio-button>
<el-radio-button :label="1"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible5 = false"> </el-button>
<el-button type="primary" @click="dialogSave"> </el-button>
</div>
</el-dialog>
@ -105,7 +168,7 @@
<el-input v-model="form.device_code" :disabled="true" />
</el-form-item>
<el-form-item label="条码" label-width="80px">
<el-form-item label="条码" prop="device_code" label-width="80px">
<el-input v-model="form.barcode" :disabled="false" />
</el-form-item>
</el-form>
@ -127,6 +190,7 @@ import '@logicflow/extension/lib/style/index.css'
import { LogicFlow } from '@logicflow/core'
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
let data = {}
let lf = ''
export default {
@ -145,14 +209,20 @@ export default {
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
dialogFormVisible6: false,
dialogFormVisible7: false,
form: {
device_code: '',
hasGoodStatus: null,
barcode: '',
hand_barcode: '',
suspended: null,
material_type: '',
requireSucess: '',
fullrequireSucess: ''
fullrequireSucess: '',
is_disable: '',
applySucess: ''
},
allDeviceMsg: [],
msgTop: '200px',
@ -274,12 +344,26 @@ export default {
if (clickObj.data.device_type === 'scanner') { //
this.dialogFormVisible1 = true
} else {
console.log(clickObj.data.driver_type)
if (clickObj.data.driver_type === 'standard_ordinary_site') {
this.dialogFormVisible3 = true
} else if (clickObj.data.driver_type === 'hailiang_packer_station') {
this.dialogFormVisible4 = true
} else if (clickObj.data.driver_type === 'hailiang_xj_plc_test') {
this.$refs.child1.setForm(clickObj)
} else if (clickObj.data.driver_type === 'slit_two_manipulator') {
this.dialogFormVisible4 = true
} else if (clickObj.data.driver_type === 'siemens_conveyor') {
// if (clickObj.data.device_name.includes('1016')) {
// this.dialogFormVisible7 = true
// } else {
// this.dialogFormVisible5 = true
// }
this.dialogFormVisible7 = true
} else if (clickObj.data.driver_type === 'siemens_conveyor_ckk') {
this.dialogFormVisible7 = true
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
this.dialogFormVisible6 = true
} else {
this.dialogFormVisible = true
}
@ -291,6 +375,10 @@ export default {
this.form.material_type = clickObj.data.material_type
this.form.requireSucess = clickObj.data.requireSucess
this.form.fullrequireSucess = clickObj.data.fullrequireSucess
this.form.is_disable = clickObj.data.is_disable1
this.form.applySucess = clickObj.data.applySucess
this.form.barcode = clickObj.data.barcode
this.form.hand_barcode = clickObj.data.hand_barcode
},
moveShow(nodeData) { // ----
let item = ''
@ -326,10 +414,10 @@ export default {
const obj = { name: '光电信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'mode') {
const obj = { name: '工作模式', value: data[val] }
const obj = { name: '模式', value: data[val] }
this.arr.push(obj)
} else if (val === 'error') {
const obj = { name: '故障代码', value: data[val] }
const obj = { name: '报警', value: data[val] }
this.arr.push(obj)
} else if (val === 'ip') {
const obj = { name: 'IP地址', value: data[val] }
@ -337,21 +425,33 @@ export default {
} else if (val === 'number') {
const obj = { name: '托盘数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'instruction_message') {
} else if (val === 'inst_message') {
const obj = { name: '指令信息', value: data[val] }
this.arr.push(obj)
} else if (val === 'last_instruction_message') {
} else if (val === 'message') {
const obj = { name: '备注信息', value: data[val] }
this.arr.push(obj)
} else if (val === 'inst_message') {
const obj = { name: '当前指令信息', value: data[val] }
this.arr.push(obj)
} else if (val === 'last_inst_message') {
const obj = { name: '上次指令信息', value: data[val] }
this.arr.push(obj)
} else if (val === 'container') {
} else if (val === 'barcode') {
const obj = { name: '载具号', value: data[val] }
this.arr.push(obj)
} else if (val === 'barcode_length') {
const obj = { name: '载具长度', value: data[val] }
this.arr.push(obj)
} else if (val === 'last_container') {
const obj = { name: '上次载具号', value: data[val] }
this.arr.push(obj)
} else if (val === 'instruction_code') {
const obj = { name: '指令号', value: data[val] }
this.arr.push(obj)
} else if (val === 'task_code') {
const obj = { name: '任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'last_instruction_code') {
const obj = { name: '上次指令号', value: data[val] }
this.arr.push(obj)
@ -373,140 +473,140 @@ export default {
} else if (val === 'applySucess') {
const obj = { name: '是否申请指令', value: data[val] }
this.arr.push(obj)
} else if (val === 'message') {
const obj = { name: '说明', value: data[val] }
} else if (val === 'requireApplyLabelingSuccess') {
const obj = { name: '是否申请贴标', value: data[val] }
this.arr.push(obj)
} else if (val === 'requireApplyLaStrangulationSuccess') {
const obj = { name: '是否申请捆扎', value: data[val] }
this.arr.push(obj)
} else if (val === 'status') {
const obj = { name: '设备状态', value: data[val] }
this.arr.push(obj)
} else if (val === 'open_time') {
const obj = { name: '开机时间', value: data[val] }
} else if (val === 'weight') {
const obj = { name: '重量', value: data[val] }
this.arr.push(obj)
} else if (val === 'close_time') {
const obj = { name: '关机时间', value: data[val] }
} else if (val === 'move_1') {
const obj = { name: '前工位光电信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'standby_time') {
const obj = { name: '待机时间', value: data[val] }
} else if (val === 'open') {
const obj = { name: '开到位', value: data[val] }
this.arr.push(obj)
} else if (val === 'production_time') {
const obj = { name: '生产时间', value: data[val] }
} else if (val === 'close') {
const obj = { name: '关到位', value: data[val] }
this.arr.push(obj)
} else if (val === 'error_time') {
const obj = { name: '故障时间', value: data[val] }
} else if (val === 'phase') {
const obj = { name: 'AGV交互阶段', value: data[val] }
this.arr.push(obj)
} else if (val === 'weight') {
const obj = { name: '生产重量', value: data[val] }
} else if (val === 'phase_name') {
const obj = { name: 'AGV交互阶段说明', value: data[val] }
this.arr.push(obj)
} else if (val === 'order_No') {
const obj = { name: '工单号', value: data[val] }
} else if (val === 'option') {
const obj = { name: 'AGV动作', value: data[val] }
this.arr.push(obj)
} else if (val === 'mix_num') {
const obj = { name: '碾次', value: data[val] }
} else if (val === 'agv_power') {
const obj = { name: 'AGV电量', value: data[val] }
this.arr.push(obj)
} else if (val === 'barcode') {
const obj = { name: '条码', value: data[val] }
this.arr.push(obj)
} else if (val === 'qualified') {
const obj = { name: '合格数量', value: data[val] }
} else if (val === 'move_2') {
const obj = { name: '后工位光电信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'unqualified') {
const obj = { name: '不合格数量', value: data[val] }
} else if (val === 'action_1') {
const obj = { name: '前工位动作信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'put_station') {
const obj = { name: '当前码盘工位', value: data[val] }
} else if (val === 'action_2') {
const obj = { name: '后工位动作信号', value: data[val] }
this.arr.push(obj)
} else if (val === 'encoder_qty') {
const obj = { name: '码盘数量', value: data[val] }
} else if (val === 'walk_y') {
const obj = { name: '行走列', value: data[val] }
this.arr.push(obj)
} else if (val === 'outKiln_move') {
const obj = { name: '出窑光电', value: data[val] }
} else if (val === 'task1') {
const obj = { name: '前工位任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'outKiln_barcode') {
const obj = { name: '出窑条码', value: data[val] }
} else if (val === 'task2') {
const obj = { name: '后工位任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'outKiln_device') {
const obj = { name: '出窑设备', value: data[val] }
} else if (val === 'task') {
const obj = { name: '任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'car_sum') {
const obj = { name: '窑车总数', value: data[val] }
} else if (val === 'is_disable') {
const obj = { name: '是否禁用', value: data[val] }
this.arr.push(obj)
} else if (val === 'nullCar_qty') {
const obj = { name: '空窑车数', value: data[val] }
} else if (val === 'temperature') {
const obj = { name: '当前温度', value: data[val] }
this.arr.push(obj)
} else if (val === 'burning_car_qty') {
const obj = { name: '在烧窑车数', value: data[val] }
} else if (val === 'finish') {
const obj = { name: '烘箱完成', value: data[val] }
this.arr.push(obj)
} else if (val === 'container_qty') {
const obj = { name: '托盘数', value: data[val] }
} else if (val === 'countdown_house') {
const obj = { name: '恒温倒计时(时)', value: data[val] }
this.arr.push(obj)
} else if (val === 'tray_crib_qty') {
const obj = { name: '托盘垛数', value: data[val] }
} else if (val === 'countdown_min') {
const obj = { name: '恒温倒计时(分)', value: data[val] }
this.arr.push(obj)
} else if (val === 'total_container') {
const obj = { name: '托盘总数量', value: data[val] }
} else if (val === 'countdown_sec') {
const obj = { name: '恒温倒计时(秒)', value: data[val] }
this.arr.push(obj)
} else if (val === 'total_split') {
const obj = { name: '累计拆垛数量', value: data[val] }
} else if (val === 'door') {
const obj = { name: '门状态', value: data[val] }
this.arr.push(obj)
} else if (val === 'getStation') {
const obj = { name: '当前抓取工位', value: data[val] }
} else if (val === 'notCreateTaskMessage') {
const obj = { name: '任务创建失败原因', value: data[val] }
this.arr.push(obj)
} else if (val === 'putStation') {
const obj = { name: '当前码盘工位', value: data[val] }
} else if (val === 'notCreateInstMessage') {
const obj = { name: '指令创建失败原因', value: data[val] }
this.arr.push(obj)
} else if (val === 'move_1') {
const obj = { name: '前工位光电信号', value: data[val] }
} else if (val === 'feedMessage') {
const obj = { name: '未反馈电气信号原因', value: data[val] }
this.arr.push(obj)
} else if (val === 'move_2') {
const obj = { name: '后工位光电信号', value: data[val] }
} else if (val === 'requireSucess') {
const obj = { name: '请求成功标记', value: data[val] }
this.arr.push(obj)
} else if (val === 'action_1') {
const obj = { name: '前工位动作信号', value: data[val] }
} else if (val === 'applySucess') {
const obj = { name: 'applySucess', value: data[val] }
this.arr.push(obj)
} else if (val === 'action_2') {
const obj = { name: '后工位动作信号', value: data[val] }
} else if (val === 'out_finish') {
const obj = { name: '出库完成', value: data[val] }
this.arr.push(obj)
} else if (val === 'walk_y') {
const obj = { name: '行走列', value: data[val] }
} else if (val === 'inventory_qty') {
const obj = { name: '库存数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'task1') {
const obj = { name: '前工位任务号', value: data[val] }
} else if (val === 'hand_barcode') {
const obj = { name: '手补条码', value: data[val] }
this.arr.push(obj)
} else if (val === 'task2') {
const obj = { name: '后工位任务号', value: data[val] }
} else if (val === 'x') {
const obj = { name: 'X坐标', value: data[val] }
this.arr.push(obj)
} else if (val === 'labeling_qty') {
const obj = { name: '贴标数量', value: data[val] }
} else if (val === 'y') {
const obj = { name: 'Y坐标', value: data[val] }
this.arr.push(obj)
} else if (val === 'container_type') {
const obj = { name: '托盘类型', value: data[val] }
} else if (val === 'angle') {
const obj = { name: '角度', value: data[val] }
this.arr.push(obj)
} else if (val === 'specifications') {
const obj = { name: '规格', value: data[val] }
} else if (val === 'electricity') {
const obj = { name: '电量', value: data[val] }
this.arr.push(obj)
} else if (val === 'onoff_status') {
const obj = { name: '开关机状态', value: data[val] }
} else if (val === 'status_name') {
const obj = { name: '状态', value: data[val] }
this.arr.push(obj)
} else if (val === 'task_qty') {
const obj = { name: '当前任务数量', value: data[val] }
} else if (val === 'fault') {
const obj = { name: '异常', value: data[val] }
this.arr.push(obj)
} else if (val === 'finishTask_qty') {
const obj = { name: '完成任务数量', value: data[val] }
} else if (val === 'map_id') {
const obj = { name: '楼层', value: data[val] }
this.arr.push(obj)
} else if (val === 'AlongSide') {
const obj = { name: 'A长边', value: data[val] }
} else if (val === 'power') {
const obj = { name: '电量', value: data[val] }
this.arr.push(obj)
} else if (val === 'BshortSide') {
const obj = { name: 'B短边', value: data[val] }
} else if (val === 'pallet') {
const obj = { name: '托盘', value: data[val] }
this.arr.push(obj)
} else if (val === 'Htrapezoidal') {
const obj = { name: 'H梯形高', value: data[val] }
} else if (val === 'load') {
const obj = { name: '有无货', value: data[val] }
this.arr.push(obj)
} else if (val === 'Wthickness') {
const obj = { name: 'W厚度', value: data[val] }
} else if (val === 'alarm') {
const obj = { name: '报警', value: data[val] }
this.arr.push(obj)
} else if (val === 'qty') {
const obj = { name: '数量', value: data[val] }
} else if (val === 'task_id') {
const obj = { name: '任务号', value: data[val] }
this.arr.push(obj)
}
}
@ -554,11 +654,16 @@ export default {
this.dialogFormVisible = false
this.dialogFormVisible3 = false
this.dialogFormVisible4 = false
this.dialogFormVisible5 = false
this.dialogFormVisible6 = false
this.dialogFormVisible7 = false
this.initStageData()
}).catch(err => {
this.dialogFormVisible = false
this.dialogFormVisible3 = false
this.dialogFormVisible4 = false
this.dialogFormVisible5 = false
this.dialogFormVisible7 = false
console.log(err.response.data.message)
})
},
@ -591,12 +696,15 @@ body {
background-color: #f8f9fa;
height: 100%;
}
.newDialog /deep/ .el-dialog__header {
padding: 1vh 1vw 0 1vw;
}
.newDialog /deep/ .el-dialog__body {
padding: 1vh 1vw;
}
.toolbar-sty {
position: absolute;
margin-top: 5px;

Loading…
Cancel
Save