fix 指令多次生成和用户管理功能
This commit is contained in:
@@ -159,68 +159,6 @@
|
||||
</el-form>
|
||||
</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">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">PLC读取字段:</span>
|
||||
@@ -356,61 +294,8 @@ export default {
|
||||
dataOpcservers: [],
|
||||
dataOpcPlcs: [],
|
||||
deviceList: [],
|
||||
requestMethodList: [],
|
||||
data1: [],
|
||||
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: {
|
||||
inspect_in_stocck: true,
|
||||
ignore_pickup_check: true,
|
||||
@@ -451,13 +336,6 @@ export default {
|
||||
}
|
||||
this.data1 = data.rs
|
||||
this.data2 = data.ws
|
||||
if (data.modeform) {
|
||||
const arr = Object.keys(data.modeform)
|
||||
// 不为空
|
||||
if (arr.length > 0) {
|
||||
this.modeform.tableData = data.modeform
|
||||
}
|
||||
}
|
||||
this.sliceItem()
|
||||
})
|
||||
selectPlcList().then(data => {
|
||||
@@ -471,19 +349,9 @@ export default {
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
})
|
||||
deviceCrud.selectRequestMethodList().then(data => {
|
||||
this.requestMethodList = data
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
insertdtl() {
|
||||
this.modeform.tableData.push({mode: '', request: '' })
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
debugger
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
finishReadEdit(data) {
|
||||
// 编辑的是code列,并且值包含mode
|
||||
if (data.code.indexOf('mode') !== -1) {
|
||||
@@ -572,53 +440,20 @@ export default {
|
||||
if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
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) {
|
||||
this.data2[val].db = beforeStr + '.W216'
|
||||
this.data2[val].db = beforeStr + '.W108'
|
||||
}
|
||||
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) {
|
||||
this.data2[val].db = beforeStr + '.W220'
|
||||
this.data2[val].db = beforeStr + '.W112'
|
||||
}
|
||||
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) {
|
||||
this.data2[val].db = beforeStr + '.W224'
|
||||
}
|
||||
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'
|
||||
this.data2[val].db = beforeStr + '.W116'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -683,7 +518,7 @@ export default {
|
||||
parentForm.is_route = true
|
||||
parentForm.plc_id = this.plc_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.configLoading = false
|
||||
}).catch(err => {
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
@@ -79,7 +79,7 @@
|
||||
@click="reload"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
@@ -77,7 +77,7 @@
|
||||
@click="reload"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="formDia" :title="crud.status.title" width="500px">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
|
||||
<el-table-column prop="operate" width="50" label="操作" />
|
||||
<el-table-column prop="device_code" label="设备号" min-width="130" show-overflow-tooltip />
|
||||
<!-- <el-table-column prop="trace_id" label="链路追踪" /> -->
|
||||
<el-table-column prop="trace_id" label="链路追踪" />
|
||||
<el-table-column prop="task_code" label="任务编号" />
|
||||
<el-table-column prop="instruct_code" label="指令编号" />
|
||||
<el-table-column prop="method" label="方法" />
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
<el-radio label="女">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input v-model="form.password" style="width: 200px;" show-password auto-complete="new-password" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.enabled" :disabled="form.id === user.id">
|
||||
<el-radio
|
||||
@@ -256,7 +259,7 @@ export default {
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.crud.msg.add = '新增成功,默认密码:123456'
|
||||
this.crud.msg.add = '新增成功'
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
|
||||
Reference in New Issue
Block a user