add: 开发
This commit is contained in:
@@ -103,6 +103,7 @@ import conveyor_ssx_barcode from '@/views/acs/device/driver/lnsh/conveyor_ssx_ba
|
||||
import conveyor_press_station from '@/views/acs/device/driver/lnsh/conveyor_press_station'
|
||||
import agv_ndc_one from '@/views/acs/device/driver/agv/agv_ndc_one'
|
||||
import agv_ndc_two from '@/views/acs/device/driver/agv/agv_ndc_two'
|
||||
import agv_conveyor from '@/views/acs/device/driver/agv/agv_conveyor'
|
||||
import package_site from './driver/lnsh/package_site.vue'
|
||||
import nl4_station from '@/views/acs/device/driver/nl4/nl4_station.vue'
|
||||
|
||||
@@ -113,7 +114,7 @@ export default {
|
||||
standard_conveyor_control, standard_conveyor_monitor, lnsh_mixing_mill, lnsh_press, lnsh_palletizing_manipulator, lnsh_fold_disc_site, lnsh_kiln_lane, lnsh_kiln_truss,
|
||||
lnsh_package_line, lnsh_out_kiln_truss, lnsh_package_pallet_manipulator, lnsh_pallet_storage, lnsh_labeling_machine, lnsh_split_manipulator, lnsh_rgv,
|
||||
lnsh_station, lnsh_Laminating_machine, lnsh_package_site, lnsh_crusher, lnsh_palletizing_manipulator_site, conveyor_ssx_barcode, conveyor_press_station,
|
||||
agv_ndc_one, agv_ndc_two, package_site, nl4_station },
|
||||
agv_ndc_one, agv_ndc_two, package_site, nl4_station,agv_conveyor },
|
||||
dicts: ['device_type'],
|
||||
mixins: [crud],
|
||||
data() {
|
||||
|
||||
102
acs/nladmin-ui/src/views/acs/device/driver/agv/agv_conveyor.vue
Normal file
102
acs/nladmin-ui/src/views/acs/device/driver/agv/agv_conveyor.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!--AGV上料下料-->
|
||||
<div>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">指令相关:</span>
|
||||
</div>
|
||||
<el-form ref="form" :inline="true" :model="form" size="small" label-width="95px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ip地址" prop="ip_address">
|
||||
<el-input
|
||||
v-model="form.ip_address"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span" />
|
||||
<el-button
|
||||
:loading="false"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
style="float: right; padding: 6px 9px"
|
||||
type="primary"
|
||||
@click="doSubmit"
|
||||
>保存
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
queryDriverConfig,
|
||||
updateConfig
|
||||
} from '@/api/acs/device/driverConfig'
|
||||
import crud from '@/mixins/crud'
|
||||
|
||||
export default {
|
||||
name: 'StandardConveyorControl',
|
||||
mixins: [crud],
|
||||
props: {
|
||||
parentForm: {
|
||||
type: Object,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
ip_address: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
// 从父表单获取设备编码
|
||||
this.device_id = this.$props.parentForm.device_id
|
||||
this.device_code = this.$props.parentForm.device_code
|
||||
queryDriverConfig(this.device_id, this.$props.parentForm.driver_code).then(data => {
|
||||
// 给表单赋值,并且属性不能为空
|
||||
if (data.form) {
|
||||
const arr = Object.keys(data.form)
|
||||
// 不为空
|
||||
if (arr.length > 0) {
|
||||
this.form = data.form
|
||||
}
|
||||
}
|
||||
this.sliceItem()
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.configLoading = true
|
||||
// 根据驱动类型判断是否为路由设备
|
||||
const parentForm = this.parentForm
|
||||
parentForm.is_route = true
|
||||
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
|
||||
this.notify('保存成功', 'success')
|
||||
this.configLoading = false
|
||||
}).catch(err => {
|
||||
this.configLoading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user