|
@ -159,68 +159,6 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-card> |
|
|
</el-card> |
|
|
|
|
|
|
|
|
<el-card class="box-card" shadow="never"> |
|
|
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
|
|
<span class="role-span">交互相关:</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="crud-opts2" style="margin-bottom: 5px;"> |
|
|
|
|
|
<span class="crud-opts-right2"> |
|
|
|
|
|
<!--左侧插槽--> |
|
|
|
|
|
<slot name="left" /> |
|
|
|
|
|
<el-button |
|
|
|
|
|
slot="left" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
type="primary" |
|
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
@click="insertdtl()" |
|
|
|
|
|
> |
|
|
|
|
|
新增一行 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="app-container"> |
|
|
|
|
|
<el-table :data="modeform.tableData" border fit highlight-current-row style="width: 100%;" class="tb-edit"> |
|
|
|
|
|
<el-table-column label="mode" prop="模式" width="180"> |
|
|
|
|
|
<template scope="scope"> |
|
|
|
|
|
<el-input-number value="3" :min="3" v-model="scope.row.mode" size="mini" /> |
|
|
|
|
|
<span v-show="scope.row.edit">{{ scope.row.mode }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="request" prop="请求方法" width="500"> |
|
|
|
|
|
<template scope="scope"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="scope.row.request" |
|
|
|
|
|
filterable |
|
|
|
|
|
clearable |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
style="width: 450px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in requestMethodList" |
|
|
|
|
|
:key="item.code" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:value="item.code" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column align="center" label="操作" width="170" > |
|
|
|
|
|
<template scope="scope"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="danger" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
|
@click.native.prevent="deleteRow(scope.$index, modeform.tableData)" |
|
|
|
|
|
/> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
</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> |
|
@ -356,61 +294,8 @@ export default { |
|
|
dataOpcservers: [], |
|
|
dataOpcservers: [], |
|
|
dataOpcPlcs: [], |
|
|
dataOpcPlcs: [], |
|
|
deviceList: [], |
|
|
deviceList: [], |
|
|
requestMethodList: [], |
|
|
|
|
|
data1: [], |
|
|
data1: [], |
|
|
data2: [], |
|
|
data2: [], |
|
|
modeform: { |
|
|
|
|
|
tableData: [ |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '3', |
|
|
|
|
|
request: 'order_verify' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '4', |
|
|
|
|
|
request: 'order_finish' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '5', |
|
|
|
|
|
request: 'apply_put_full_vehicle' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '6', |
|
|
|
|
|
request: 'apply_put_empty_vehicle' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '7', |
|
|
|
|
|
request: 'apply_take_empty_vehicle' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '8', |
|
|
|
|
|
request: 'apply_take_full_vehicle' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '9', |
|
|
|
|
|
request: 'apply_force_take_full_vehicle' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '10', |
|
|
|
|
|
request: 'apply_force_take_full_vehicle_in_storage' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '11', |
|
|
|
|
|
request: 'barcode_success_apply' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '12', |
|
|
|
|
|
request: 'get_vehicle_info' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '13', |
|
|
|
|
|
request: 'force_no_package' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
mode: '14', |
|
|
|
|
|
request: 'apply_labelling' |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
form: { |
|
|
inspect_in_stocck: true, |
|
|
inspect_in_stocck: true, |
|
|
ignore_pickup_check: true, |
|
|
ignore_pickup_check: true, |
|
@ -451,13 +336,6 @@ export default { |
|
|
} |
|
|
} |
|
|
this.data1 = data.rs |
|
|
this.data1 = data.rs |
|
|
this.data2 = data.ws |
|
|
this.data2 = data.ws |
|
|
if (data.modeform) { |
|
|
|
|
|
const arr = Object.keys(data.modeform) |
|
|
|
|
|
// 不为空 |
|
|
|
|
|
if (arr.length > 0) { |
|
|
|
|
|
this.modeform.tableData = data.modeform |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.sliceItem() |
|
|
this.sliceItem() |
|
|
}) |
|
|
}) |
|
|
selectPlcList().then(data => { |
|
|
selectPlcList().then(data => { |
|
@ -471,19 +349,9 @@ export default { |
|
|
deviceCrud.selectDeviceList().then(data => { |
|
|
deviceCrud.selectDeviceList().then(data => { |
|
|
this.deviceList = data |
|
|
this.deviceList = data |
|
|
}) |
|
|
}) |
|
|
deviceCrud.selectRequestMethodList().then(data => { |
|
|
|
|
|
this.requestMethodList = data |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
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) { |
|
@ -572,53 +440,20 @@ export default { |
|
|
if (this.data2[val].code.indexOf('to_material_code') !== -1) { |
|
|
if (this.data2[val].code.indexOf('to_material_code') !== -1) { |
|
|
this.data2[val].db = beforeStr + '.STRING58.50' |
|
|
this.data2[val].db = beforeStr + '.STRING58.50' |
|
|
} |
|
|
} |
|
|
if (this.data2[val].code.indexOf('to_brick_code') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.STRING112.50' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_formula') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.STRING164.50' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_product_code') !== -1) { |
|
|
if (this.data2[val].code.indexOf('to_product_code') !== -1) { |
|
|
this.data2[val].db = beforeStr + '.W216' |
|
|
this.data2[val].db = beforeStr + '.W108' |
|
|
} |
|
|
} |
|
|
if (this.data2[val].code.indexOf('to_AlongSide') !== -1) { |
|
|
if (this.data2[val].code.indexOf('to_AlongSide') !== -1) { |
|
|
this.data2[val].db = beforeStr + '.W218' |
|
|
this.data2[val].db = beforeStr + '.W110' |
|
|
} |
|
|
} |
|
|
if (this.data2[val].code.indexOf('to_BshortSide') !== -1) { |
|
|
if (this.data2[val].code.indexOf('to_BshortSide') !== -1) { |
|
|
this.data2[val].db = beforeStr + '.W220' |
|
|
this.data2[val].db = beforeStr + '.W112' |
|
|
} |
|
|
} |
|
|
if (this.data2[val].code.indexOf('to_Htrapezoidal') !== -1) { |
|
|
if (this.data2[val].code.indexOf('to_Htrapezoidal') !== -1) { |
|
|
this.data2[val].db = beforeStr + '.W222' |
|
|
this.data2[val].db = beforeStr + '.W114' |
|
|
} |
|
|
} |
|
|
if (this.data2[val].code.indexOf('to_Wthickness') !== -1) { |
|
|
if (this.data2[val].code.indexOf('to_Wthickness') !== -1) { |
|
|
this.data2[val].db = beforeStr + '.W224' |
|
|
this.data2[val].db = beforeStr + '.W116' |
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_size_error') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL228' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_single_weight') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL232' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_drawing_address') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL236' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_standard_weight') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL240' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_detection_error') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL244' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_standard_size_height1') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL248' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_standard_size_height2') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL252' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_standard_size_height3') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL256' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.data2[val].code.indexOf('to_standard_size_height4') !== -1) { |
|
|
|
|
|
this.data2[val].db = beforeStr + '.REAL260' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -683,7 +518,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.data1, this.data2).then(res => { |
|
|
this.notify('保存成功', 'success') |
|
|
this.notify('保存成功', 'success') |
|
|
this.configLoading = false |
|
|
this.configLoading = false |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|