rev 驱动配置
This commit is contained in:
@@ -1223,7 +1223,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
"false".equalsIgnoreCase(json.getString("extra_value"))) {
|
"false".equalsIgnoreCase(json.getString("extra_value"))) {
|
||||||
extraObj.put(json.getString("extra_code"), json.getBoolean("extra_value"));
|
extraObj.put(json.getString("extra_code"), json.getBoolean("extra_value"));
|
||||||
} else {
|
} else {
|
||||||
extraObj.put(json.getString("extra_code"), json.get("extra_value"));
|
boolean endsWith = json.getString("extra_value").endsWith("]");
|
||||||
|
boolean startsWith = json.getString("extra_value").startsWith("[");
|
||||||
|
if (endsWith && startsWith){
|
||||||
|
JSONArray extraValue = JSONArray.parseArray(json.getString("extra_value"));
|
||||||
|
extraObj.put(json.getString("extra_code"), extraValue);
|
||||||
|
} else {
|
||||||
|
extraObj.put(json.getString("extra_code"), json.get("extra_value"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public enum RequestMethodEnum {
|
|||||||
|
|
||||||
feedback_device_status(16, "feedback_device_status", "反馈设备状态","1"),
|
feedback_device_status(16, "feedback_device_status", "反馈设备状态","1"),
|
||||||
|
|
||||||
apply_feedback_weight(16, "apply_feedback_weight", "反馈压机残留重量","0");
|
apply_feedback_weight(16, "apply_feedback_weight", "反馈压机残留重量","1");
|
||||||
|
|
||||||
|
|
||||||
//驱动索引
|
//驱动索引
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
|
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
|
||||||
List<String> getDeviceCodeList = this.getExtraDeviceCodes("get_station");
|
List<String> getDeviceCodeList = this.getExtraDeviceCodes("get_station");
|
||||||
List<String> putDeviceCodeList = this.getExtraDeviceCodes("put_station");
|
List<String> putDeviceCodeList = this.getExtraDeviceCodes("put_station");
|
||||||
request.setGet_station(getDeviceCodeList.get(get_station));
|
request.setGet_station(getDeviceCodeList.get(0));
|
||||||
request.setPut_station(putDeviceCodeList.get(put_station));
|
request.setPut_station(putDeviceCodeList.get(put_station));
|
||||||
request.setLaser_marking_code(laser_marking_code);
|
request.setLaser_marking_code(laser_marking_code);
|
||||||
request.setGrinding_number(grinding_number);
|
request.setGrinding_number(grinding_number);
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class StandardEmptyPalletSiteDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
if (number == max_emptypalletnum && !requireSucess && move > 0) {
|
if (number == max_emptypalletnum && !requireSucess && move > 0) {
|
||||||
//判断逻辑
|
//判断逻辑
|
||||||
//需要检查关联的另一设备也满足数量后才能入库
|
//需要检查关联的另一设备也满足数量后才能入库
|
||||||
Object[] linkobj = (Object[]) this.getDevice().getExtraValue().get("link_device_code");
|
Object[] linkobj = (Object[]) this.getDevice().getExtraValue().get("device_code");
|
||||||
for (int i = 0; i < linkobj.length; i++) {
|
for (int i = 0; i < linkobj.length; i++) {
|
||||||
String linkDevice = linkobj[i].toString();
|
String linkDevice = linkobj[i].toString();
|
||||||
Device device = appService.findDeviceByCode(linkDevice);
|
Device device = appService.findDeviceByCode(linkDevice);
|
||||||
|
|||||||
@@ -199,27 +199,27 @@
|
|||||||
<span class="role-span">交互相关:</span>
|
<span class="role-span">交互相关:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left" />
|
<slot name="left" />
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="insertdtl()"
|
@click="insertdtl()"
|
||||||
>
|
>
|
||||||
新增一行
|
新增一行
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-table :data="modeform.tableData" border fit highlight-current-row style="width: 100%;" class="tb-edit">
|
<el-table :data="modeform.tableData" border fit highlight-current-row style="width: 100%;" class="tb-edit">
|
||||||
<el-table-column label="mode" prop="模式" width="180">
|
<el-table-column label="mode" prop="模式" width="180">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input-number value="3" :min="3" v-model="scope.row.mode" size="mini" />
|
<el-input-number v-model="scope.row.mode" value="3" :min="3" size="mini" />
|
||||||
<span v-show="scope.row.edit">{{ scope.row.mode }}</span>
|
<span v-show="scope.row.edit">{{ scope.row.mode }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="170" >
|
<el-table-column align="center" label="操作" width="170">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -389,7 +389,6 @@ export default {
|
|||||||
configLoading: false,
|
configLoading: false,
|
||||||
dataOpcservers: [],
|
dataOpcservers: [],
|
||||||
dataOpcPlcs: [],
|
dataOpcPlcs: [],
|
||||||
deviceList: [],
|
|
||||||
data1: [],
|
data1: [],
|
||||||
data2: [],
|
data2: [],
|
||||||
requestMethodList: [],
|
requestMethodList: [],
|
||||||
@@ -453,11 +452,14 @@ export default {
|
|||||||
link_three_lamp: '',
|
link_three_lamp: '',
|
||||||
manual_create_task: true,
|
manual_create_task: true,
|
||||||
is_pickup: true,
|
is_pickup: true,
|
||||||
is_release: true,
|
is_release: true
|
||||||
link_device_code: [],
|
// link_device_code: [],
|
||||||
link_three_lamp: []
|
// link_three_lamp: [],
|
||||||
|
// link_get_station: [],
|
||||||
|
// link_put_station: []
|
||||||
},
|
},
|
||||||
rules: {}
|
rules: {},
|
||||||
|
deviceList: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -505,13 +507,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
insertdtl() {
|
|
||||||
this.modeform.tableData.push({mode: '', request: '' })
|
|
||||||
},
|
|
||||||
deleteRow(index, rows) {
|
|
||||||
debugger
|
|
||||||
rows.splice(index, 1)
|
|
||||||
},
|
|
||||||
finishReadEdit(data) {
|
finishReadEdit(data) {
|
||||||
// 编辑的是code列,并且值包含mode
|
// 编辑的是code列,并且值包含mode
|
||||||
if (data.code.indexOf('mode') !== -1) {
|
if (data.code.indexOf('mode') !== -1) {
|
||||||
@@ -624,7 +619,7 @@ export default {
|
|||||||
parentForm.is_route = true
|
parentForm.is_route = true
|
||||||
parentForm.plc_id = this.plc_id
|
parentForm.plc_id = this.plc_id
|
||||||
parentForm.opc_id = this.opc_id
|
parentForm.opc_id = this.opc_id
|
||||||
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
|
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
|
||||||
this.notify('保存成功', 'success')
|
this.notify('保存成功', 'success')
|
||||||
this.configLoading = false
|
this.configLoading = false
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
@@ -159,27 +159,27 @@
|
|||||||
<span class="role-span">交互相关:</span>
|
<span class="role-span">交互相关:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left" />
|
<slot name="left" />
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="insertdtl()"
|
@click="insertdtl()"
|
||||||
>
|
>
|
||||||
新增一行
|
新增一行
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-table :data="modeform.tableData" border fit highlight-current-row style="width: 100%;" class="tb-edit">
|
<el-table :data="modeform.tableData" border fit highlight-current-row style="width: 100%;" class="tb-edit">
|
||||||
<el-table-column label="mode" prop="模式" width="180">
|
<el-table-column label="mode" prop="模式" width="180">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input-number value="3" :min="3" v-model="scope.row.mode" size="mini" />
|
<el-input-number v-model="scope.row.mode" value="3" :min="3" size="mini" />
|
||||||
<span v-show="scope.row.edit">{{ scope.row.mode }}</span>
|
<span v-show="scope.row.edit">{{ scope.row.mode }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="170" >
|
<el-table-column align="center" label="操作" width="170">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -216,7 +216,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
<el-card class="box-card" shadow="never">
|
<el-card class="box-card" shadow="never">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span class="role-span">PLC读取字段:</span>
|
<span class="role-span">PLC读取字段:</span>
|
||||||
@@ -409,7 +408,8 @@ export default {
|
|||||||
is_pickup: true,
|
is_pickup: true,
|
||||||
is_release: true
|
is_release: true
|
||||||
},
|
},
|
||||||
rules: {}
|
rules: {},
|
||||||
|
deviceList: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -464,13 +464,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
insertdtl() {
|
|
||||||
this.modeform.tableData.push({mode: '', request: '' })
|
|
||||||
},
|
|
||||||
deleteRow(index, rows) {
|
|
||||||
debugger
|
|
||||||
rows.splice(index, 1)
|
|
||||||
},
|
|
||||||
finishReadEdit(data) {
|
finishReadEdit(data) {
|
||||||
// 编辑的是code列,并且值包含mode
|
// 编辑的是code列,并且值包含mode
|
||||||
if (data.code.indexOf('mode') !== -1) {
|
if (data.code.indexOf('mode') !== -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user