This commit is contained in:
USER-20220102CG\noblelift
2023-03-28 11:27:41 +08:00
parent d5c5c9bbf6
commit 3c187dfa80
10 changed files with 204 additions and 17 deletions

View File

@@ -133,7 +133,6 @@ export default {
this.device_code = this.$route.params.device_code
this.$nextTick(() => {
get(this.device_code).then(data => {
debugger
this.form = data.device
// 默认是普通站点
// this.currentComponent = 'standard_ordinary_site'

View File

@@ -172,6 +172,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="dbr_value2">
<template slot="header">
<el-link type="primary" :underline="false" @click.native="test_read2()">测试读</el-link>
</template>
<template slot-scope="scope">
<el-input v-model="data2[scope.$index].dbr_value" size="mini" class="edit-input" />
</template>
</el-table-column>
<el-table-column prop="dbw_value">
<template slot="header">
<el-link type="primary" :underline="false" @click.native="test_write1()">测试写</el-link>
@@ -212,8 +220,8 @@ import {
import { selectOpcList } from '@/api/acs/device/opc'
import { selectPlcList } from '@/api/acs/device/opcPlc'
import { selectListByOpcID } from '@/api/acs/device/opcPlc'
import crud from '@/mixins/crud'
import deviceCrud from '@/api/acs/device/device'
export default {
name: 'StandardAutodoor',
@@ -285,6 +293,9 @@ export default {
this.dataOpcservers = data
this.opc_id = this.$props.parentForm.opc_server_id
})
deviceCrud.selectDeviceList().then(data => {
this.deviceList = data
})
})
},
methods: {
@@ -346,6 +357,15 @@ export default {
console.log(err.response.data.message)
})
},
test_read2() {
testRead(this.data2, this.opc_id).then(data => {
this.data2 = data
console.log(this.data2)
this.notify('操作成功!', 'success')
}).catch(err => {
console.log(err.response.data.message)
})
},
test_write1() {
testwrite(this.data2, this.opc_id).then(data => {
this.notify('操作成功!', 'success')