|
@ -14,9 +14,9 @@ |
|
|
class="filter-item" |
|
|
class="filter-item" |
|
|
@keyup.enter.native="crud.toQuery" |
|
|
@keyup.enter.native="crud.toQuery" |
|
|
/> |
|
|
/> |
|
|
<rrOperation/> |
|
|
<rrOperation /> |
|
|
</div> |
|
|
</div> |
|
|
<crudOperation :permission="permission"/> |
|
|
<crudOperation :permission="permission" /> |
|
|
<!--表单组件--> |
|
|
<!--表单组件--> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
@ -27,35 +27,35 @@ |
|
|
> |
|
|
> |
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
|
|
<el-form-item label="OPC编码" prop="opc_code"> |
|
|
<el-form-item label="OPC编码" prop="opc_code"> |
|
|
<el-input v-model="form.opc_code" style="width: 370px;"/> |
|
|
<el-input v-model="form.opc_code" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="OPC名称" prop="opc_name"> |
|
|
<el-form-item label="OPC名称" prop="opc_name"> |
|
|
<el-input v-model="form.opc_name" style="width: 370px;"/> |
|
|
<el-input v-model="form.opc_name" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="OPC地址"> |
|
|
<el-form-item label="OPC地址"> |
|
|
<el-input v-model="form.opc_host" style="width: 370px;"/> |
|
|
<el-input v-model="form.opc_host" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="订阅主题"> |
|
|
<el-form-item label="订阅主题"> |
|
|
<el-input v-model="form.topic" style="width: 370px;"/> |
|
|
<el-input v-model="form.topic" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="用户名"> |
|
|
<el-form-item label="用户名"> |
|
|
<el-input v-model="form.user" style="width: 370px;"/> |
|
|
<el-input v-model="form.user" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="密码" prop="password"> |
|
|
<el-form-item label="密码" prop="password"> |
|
|
<el-input v-model="form.password" style="width: 370px;" type="password"/> |
|
|
<el-input v-model="form.password" style="width: 370px;" type="password" /> |
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="getDetail()">详情</el-button> |
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="getDetail()">详情</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="程序ID"> |
|
|
<el-form-item label="程序ID"> |
|
|
<el-input v-model="form.prog_id" style="width: 370px;"/> |
|
|
<el-input v-model="form.prog_id" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="注册表ID"> |
|
|
<el-form-item label="注册表ID"> |
|
|
<el-input v-model="form.cls_id" style="width: 370px;"/> |
|
|
<el-input v-model="form.cls_id" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="domain"> |
|
|
<el-form-item label="domain"> |
|
|
<el-input v-model="form.domain" style="width: 370px;"/> |
|
|
<el-input v-model="form.domain" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="备注" prop="remark"> |
|
|
<el-form-item label="备注" prop="remark"> |
|
|
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea"/> |
|
|
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
@ -66,18 +66,18 @@ |
|
|
|
|
|
|
|
|
<el-dialog title="PLC管理" :visible.sync="dialogPlcFormVisible" width="550px"> |
|
|
<el-dialog title="PLC管理" :visible.sync="dialogPlcFormVisible" width="550px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
|
|
<el-input v-model="form.opc_server_id" type="hidden" prop="opc_server_id"/> |
|
|
<el-input v-model="form.opc_server_id" type="hidden" prop="opc_server_id" /> |
|
|
<el-form-item label="PLC编码" prop="plc_code"> |
|
|
<el-form-item label="PLC编码" prop="plc_code"> |
|
|
<el-input v-model="form.plc_code" style="width: 370px;"/> |
|
|
<el-input v-model="form.plc_code" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="OPC名称" prop="plc_opc_name"> |
|
|
<el-form-item label="OPC名称" prop="plc_opc_name"> |
|
|
<el-input v-model="form.plc_opc_name" style="width: 370px;" disabled/> |
|
|
<el-input v-model="form.plc_opc_name" style="width: 370px;" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="PLC名称" prop="plc_name"> |
|
|
<el-form-item label="PLC名称" prop="plc_name"> |
|
|
<el-input v-model="form.plc_name" style="width: 370px;"/> |
|
|
<el-input v-model="form.plc_name" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="PLC地址" prop="plc_host"> |
|
|
<el-form-item label="PLC地址" prop="plc_host"> |
|
|
<el-input v-model="form.plc_host" style="width: 370px;"/> |
|
|
<el-input v-model="form.plc_host" style="width: 370px;" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
@ -100,19 +100,19 @@ |
|
|
@select-all="crud.selectAllChange" |
|
|
@select-all="crud.selectAllChange" |
|
|
@selection-change="crud.selectionChangeHandler" |
|
|
@selection-change="crud.selectionChangeHandler" |
|
|
> |
|
|
> |
|
|
<el-table-column type="selection" width="55"/> |
|
|
<el-table-column type="selection" width="55" /> |
|
|
<el-table-column prop="opc_code" label="OPC编码" width="100"/> |
|
|
<el-table-column prop="opc_code" label="OPC编码" width="100" /> |
|
|
<el-table-column prop="opc_name" label="OPC名称"/> |
|
|
<el-table-column prop="opc_name" label="OPC名称" /> |
|
|
<el-table-column prop="opc_host" label="OPC地址" min-width="130"/> |
|
|
<el-table-column prop="opc_host" label="OPC地址" min-width="130" /> |
|
|
<el-table-column prop="topic" label="订阅主题" min-width="130"/> |
|
|
<el-table-column prop="topic" label="订阅主题" min-width="130" /> |
|
|
<el-table-column prop="type" label="类型"/> |
|
|
<el-table-column prop="type" label="类型" /> |
|
|
<el-table-column prop="user" label="用户名" min-width="100"/> |
|
|
<el-table-column prop="user" label="用户名" min-width="100" /> |
|
|
<el-table-column prop="password" label="密码"/> |
|
|
<el-table-column prop="password" label="密码" /> |
|
|
<el-table-column prop="prog_id" label="程序ID" min-width="150"/> |
|
|
<el-table-column prop="prog_id" label="程序ID" min-width="150" /> |
|
|
<el-table-column prop="cls_id" label="注册表ID" min-width="150"/> |
|
|
<el-table-column prop="cls_id" label="注册表ID" min-width="150" /> |
|
|
<el-table-column prop="domain" label="domain"/> |
|
|
<el-table-column prop="domain" label="domain" /> |
|
|
<el-table-column prop="remark" label="备注" min-width="100"/> |
|
|
<el-table-column prop="remark" label="备注" min-width="100" /> |
|
|
<el-table-column prop="createtime" label="创建时间"/> |
|
|
<el-table-column prop="createtime" label="创建时间" /> |
|
|
<el-table-column label="操作" width="200px" align="center" fixed="right"> |
|
|
<el-table-column label="操作" width="200px" align="center" fixed="right"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button type="text" size="small" @click="handleClick(scope.row,'1')">修改</el-button> |
|
|
<el-button type="text" size="small" @click="handleClick(scope.row,'1')">修改</el-button> |
|
@ -124,14 +124,14 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<!--分页组件--> |
|
|
<!--分页组件--> |
|
|
<pagination/> |
|
|
<pagination /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import crudOpc from '@/api/acs/device/opc' |
|
|
import crudOpc from '@/api/acs/device/opc' |
|
|
import CRUD, {crud, form, header, presenter} from '@crud/crud' |
|
|
import CRUD, { crud, form, header, presenter } from '@crud/crud' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
@ -163,11 +163,11 @@ const defaultForm = { |
|
|
} |
|
|
} |
|
|
export default { |
|
|
export default { |
|
|
name: 'Opc', |
|
|
name: 'Opc', |
|
|
components: {pagination, crudOperation, rrOperation}, |
|
|
components: { pagination, crudOperation, rrOperation }, |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
cruds() { |
|
|
cruds() { |
|
|
return CRUD({ |
|
|
return CRUD({ |
|
|
title: 'opc', url: 'api/opc', idField: 'opc_id', sort: 'opc_id,desc', crudMethod: {...crudOpc}, |
|
|
title: 'opc', url: 'api/opc', idField: 'opc_id', sort: 'opc_id,desc', crudMethod: { ...crudOpc }, |
|
|
optShow: { |
|
|
optShow: { |
|
|
add: true, |
|
|
add: true, |
|
|
edit: false, |
|
|
edit: false, |
|
@ -187,28 +187,28 @@ export default { |
|
|
}, |
|
|
}, |
|
|
rules: { |
|
|
rules: { |
|
|
opc_id: [ |
|
|
opc_id: [ |
|
|
{required: true, message: 'OPC标识不能为空', trigger: 'blur'} |
|
|
{ required: true, message: 'OPC标识不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
opc_code: [ |
|
|
opc_code: [ |
|
|
{required: true, message: 'OPC编码不能为空', trigger: 'blur'} |
|
|
{ required: true, message: 'OPC编码不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
opc_name: [ |
|
|
opc_name: [ |
|
|
{required: true, message: 'OPC名称不能为空', trigger: 'blur'} |
|
|
{ required: true, message: 'OPC名称不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
password: [ |
|
|
password: [ |
|
|
{required: true, message: '密码不能为空', trigger: 'blur'} |
|
|
{ required: true, message: '密码不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
is_active: [ |
|
|
is_active: [ |
|
|
{required: true, message: '是否启用不能为空', trigger: 'blur'} |
|
|
{ required: true, message: '是否启用不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
is_delete: [ |
|
|
is_delete: [ |
|
|
{required: true, message: '是否删除不能为空', trigger: 'blur'} |
|
|
{ required: true, message: '是否删除不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
create_by: [ |
|
|
create_by: [ |
|
|
{required: true, message: '创建者不能为空', trigger: 'blur'} |
|
|
{ required: true, message: '创建者不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
create_time: [ |
|
|
create_time: [ |
|
|
{required: true, message: '创建时间不能为空', trigger: 'blur'} |
|
|
{ required: true, message: '创建时间不能为空', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -269,7 +269,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getDetail() { |
|
|
getDetail() { |
|
|
const _this = this |
|
|
const _this = this |
|
|
this.crud.crudMethod.getmeteal(this.form).then(function (response) { |
|
|
this.crud.crudMethod.getmeteal(this.form).then(function(response) { |
|
|
_this.form.cls_id = response.classId |
|
|
_this.form.cls_id = response.classId |
|
|
_this.form.prog_id = response.progId |
|
|
_this.form.prog_id = response.progId |
|
|
_this.form.remark = response.description |
|
|
_this.form.remark = response.description |
|
|