zyh
This commit is contained in:
commit
7f3c696dd4
|
|
@ -0,0 +1,284 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Alert } from "element-ui";
|
||||
import { queryallanswer } from "./api/answer";
|
||||
export default {
|
||||
name: "App",
|
||||
data() {
|
||||
return {
|
||||
grade: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryallanswer();
|
||||
},
|
||||
methods: {
|
||||
//请求正确答案
|
||||
// async queryallanswer() {
|
||||
// let { data } = await queryallanswer();
|
||||
// let arr = [];
|
||||
// arr = data.data;
|
||||
// arr.forEach((item) => {
|
||||
// item.answer = JSON.parse(item.answer);
|
||||
// });
|
||||
// console.log(arr);
|
||||
// let obj = {
|
||||
// cjdpz_beilv: "2",
|
||||
// cjdpz_cjsjlx: "uint16",
|
||||
// cjdpz_dxsx: "只读131111",
|
||||
// cjdpz_jcqdz: "8195",
|
||||
// cjdpz_mc: "产量",
|
||||
// cjdpz_sjq: "4X (Holding Register)",
|
||||
// cjdpz_tagid: "MachinePamHID910",
|
||||
// cjdpz_zjx: "Null",
|
||||
// ippz_dns_by: "114.114.114.114",
|
||||
// ippz_dns_sx: "8.8.8.8",
|
||||
// ippz_ip: "192.168.32.3",
|
||||
// ippz_mac: "3C:2D:50:20:30:3D",
|
||||
// ippz_mrwg: "192.168.32.1",
|
||||
// ippz_wangkou: "ETH1",
|
||||
// ippz_zwym: "255.255.255.192",
|
||||
// mqtt_cjd_sbmc: "有线区精雕1",
|
||||
// mqtt_cjd_tagid: "MachinePamHID910",
|
||||
// mqtt_ip: "124.70.210.118",
|
||||
// mqtt_port: "1883",
|
||||
// mqtt_qiyong: "1",
|
||||
// mqtt_qos: "qos1",
|
||||
// mqtt_retained: "0",
|
||||
// mqtt_scms: "周期上传",
|
||||
// mqtt_sczq: "5",
|
||||
// mqtt_sjgl: "采集成功",
|
||||
// mqtt_sssjfbzt: "dbzn/gateway/iotlite/2000808010",
|
||||
// mqtt_wgsn: "2000808010",
|
||||
// sbpz_jdzxz: "1",
|
||||
// sbpz_jysb: "0",
|
||||
// sbpz_mac: "3C:2D:50:20:30:3D",
|
||||
// sbpz_sbid: "有线区加工设备1",
|
||||
// sbpz_sbmc: "有线区精雕1",
|
||||
// tdpz_050F: "auto",
|
||||
// tdpz_0610: "auto",
|
||||
// tdpz_cfcs: "3",
|
||||
// tdpz_cjsylxdz: "1",
|
||||
// tdpz_cssj: "500",
|
||||
// tdpz_dxzkb: "1:1",
|
||||
// tdpz_ip: "192.168.32.2",
|
||||
// tdpz_jgsj: "500",
|
||||
// tdpz_lxsj: "0",
|
||||
// tdpz_port: "502",
|
||||
// tdpz_qdmc: "ModbusTCPClient",
|
||||
// tdpz_td: "网口",
|
||||
// tdpz_tdmc: "有线区Channel1",
|
||||
// tdpz_watchtime: "1",
|
||||
// wgpz_wgid: "LAN-BOX1",
|
||||
// wgpz_wglx: "MODBUS网关",
|
||||
// wgpz_wgmc: "有线区网关1",
|
||||
// };
|
||||
// let newArr = [
|
||||
// {
|
||||
// cskey: "MachinePamHID917",
|
||||
// csname: "主轴转速",
|
||||
// pcz: "100",
|
||||
// sdz: "2000",
|
||||
// sfbjbz: "是",
|
||||
// sfyxbz: "是",
|
||||
// sswg: "lan-box2",
|
||||
// xsws: "0",
|
||||
// },
|
||||
// {
|
||||
// cskey: "MachinePamHID910",
|
||||
// csname: "产量",
|
||||
// pcz: "5",
|
||||
// sdz: "20",
|
||||
// sfbjbz: "是",
|
||||
// sfyxbz: "是",
|
||||
// sswg: "lan-box1",
|
||||
// xsws: "0",
|
||||
// },
|
||||
// {
|
||||
// cskey: "MachinePamHID909",
|
||||
// csname: "急停状态",
|
||||
// pcz: "0",
|
||||
// sdz: "1",
|
||||
// sfbjbz: "是",
|
||||
// sfyxbz: "是",
|
||||
// sswg: "wlan-box1",
|
||||
// xsws: "0",
|
||||
// },
|
||||
// {
|
||||
// cskey: "MachinePamHID928",
|
||||
// csname: "切削速度",
|
||||
// pcz: "50",
|
||||
// sdz: "500",
|
||||
// sfbjbz: "是",
|
||||
// sfyxbz: "是",
|
||||
// sswg: "wlan-box2",
|
||||
// xsws: "0",
|
||||
// },
|
||||
// ];
|
||||
// // console.log(this.getAllGrades(arr[0].answer, obj, arr[0].r1));
|
||||
// console.log(this.getAllGrades(newArr, newArr, arr[9].r1));
|
||||
// // this.getAllGrades(arr[9].answer, newArr, arr[9].r1);
|
||||
// },
|
||||
//obj1:答案对象 obj:用户对象 r1 模块分数
|
||||
// getAllGrades(obj1, obj2, r1) {
|
||||
// var arr = [];
|
||||
// let grade = 0;
|
||||
// if (!Array.isArray(obj1)) {
|
||||
// const keys = Object.keys(obj1);
|
||||
// for (let key of keys) {
|
||||
// if (obj1[key] !== obj2[key]) {
|
||||
// arr.push({
|
||||
// [key]: {
|
||||
// answer: obj1[key],
|
||||
// user: obj2[key],
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// if (arr.length > 0) {
|
||||
// grade = 0;
|
||||
// } else {
|
||||
// grade = r1;
|
||||
// }
|
||||
// } else {
|
||||
// if (obj1.length !== obj2.length) {
|
||||
// return false;
|
||||
// }
|
||||
// let flagArr = [];
|
||||
// for (let i = 0; i < obj1.length; i++) {
|
||||
// for (let j = 0; j < obj2.length; j++) {
|
||||
// let flag = this.isArrEqual(
|
||||
// Object.values(obj1[i]),
|
||||
// Object.values(obj2[j])
|
||||
// );
|
||||
// flagArr.push(flag);
|
||||
// }
|
||||
// }
|
||||
// let counter = 0;
|
||||
// let target = true;
|
||||
// for (let a of flagArr) {
|
||||
// if (a == target) {
|
||||
// counter++;
|
||||
// }
|
||||
// }
|
||||
// if (counter == obj1.length) {
|
||||
// grade = r1;
|
||||
// console.log(grade);
|
||||
// } else {
|
||||
// grade = 0;
|
||||
// }
|
||||
// }
|
||||
// // 返回此模块分数以及错误的字段;
|
||||
// return {
|
||||
// arr,
|
||||
// grade: Number(grade),
|
||||
// };
|
||||
// },
|
||||
// isArrEqual(arr1, arr2) {
|
||||
// return (
|
||||
// arr1.length === arr2.length && arr1.every((ele) => arr2.includes(ele))
|
||||
// );
|
||||
// },
|
||||
},
|
||||
mounted() { },
|
||||
components: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
/* background-color: white !important; */
|
||||
}
|
||||
|
||||
.v-modal {
|
||||
position: static;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.el-dialog__header,
|
||||
.el-table {
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
/* border-top: 0 !important; */
|
||||
/* background-color: rgba(19, 31, 59, 0); */
|
||||
color: #FFFFFF;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
text-align: center;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.el-form-item label {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.el-dialog,
|
||||
.el-pager li,
|
||||
.tree_menu {
|
||||
color: #ffffff;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
/* //将el-dialog__header、el-dialog__body、el-dialog__footer背景设置为透明 */
|
||||
.el-dialog__header .el-dialog__title,
|
||||
.el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
color: #FFFFFF;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
color: #ffffff;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
text-align: center;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.el-form-item label {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* .el-tree-node__content:hover {
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
.el-tree-node:focus>.el-tree-node__content {
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: cover;
|
||||
} */
|
||||
|
||||
/* 弹窗 */
|
||||
</style>
|
||||
|
|
@ -0,0 +1,527 @@
|
|||
<!-- 设备配置----网口设备 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- 设置树形控件 -->
|
||||
<!-- <div v-click-outside="closeMenu"> -->
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<span slot="title">新建设备</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<span slot="title">删 除</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" style="font-size: 12px;">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- 网口设备 -->
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :model="formdata" :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备ID:" :label-width="formLabelWidth" prop="sbpz_sbid">
|
||||
<el-select v-model="formdata.sbpz_sbid" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="(item, index) in options1" :key="index" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备名称:" :label-width="formLabelWidth" prop="sbpz_sbmc">
|
||||
<el-select v-model="formdata.sbpz_sbmc" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="(item, index) in options2" :key="index" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="MAC地址:" :label-width="formLabelWidth" prop="sbpz_sbdz">
|
||||
<el-input v-model="formdata.sbpz_sbdz" placeholder=""
|
||||
style="width: 200px;height:30px"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<!-- 需要修改的地方 -->
|
||||
<el-checkbox v-model="formdata.sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="formdata.sbpz_jdzxz">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click=saveDevice>保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网口设备 -->
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form
|
||||
:model="formdata"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备ID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbid"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.sbpz_sbid"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options1"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbmc"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.sbpz_sbmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbdz"
|
||||
>
|
||||
<el-input
|
||||
v-model="formdata.sbpz_sbdz"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="formdata.sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="formdata.sbpz_jdzxz"> </el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveDevice">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "DeviceView",
|
||||
|
||||
<<<<<<< HEAD
|
||||
data() {
|
||||
return {
|
||||
formdata: {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "",
|
||||
sbpz_jysb: false,
|
||||
sbpz_jdzxz: false,
|
||||
},
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1"
|
||||
}, {
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1"
|
||||
}],
|
||||
options2: [{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
}, {
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
}],
|
||||
datas: [{
|
||||
label: 'Gateway',
|
||||
children: [{
|
||||
label: '数据采集',
|
||||
children: [{
|
||||
label: 'I/O点'
|
||||
},
|
||||
{
|
||||
label: '用户点',
|
||||
},
|
||||
{
|
||||
label: '计算点',
|
||||
},
|
||||
{
|
||||
label: '系统点',
|
||||
},
|
||||
]
|
||||
=======
|
||||
data() {
|
||||
return {
|
||||
formdata: {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "",
|
||||
sbpz_jysb: false,
|
||||
sbpz_jdzxz: false,
|
||||
},
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [
|
||||
{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1",
|
||||
},
|
||||
{
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
},
|
||||
{
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
},
|
||||
],
|
||||
datas: [
|
||||
{
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
>>>>>>> 61c96050f80dde1e5a3df49d08bf8243612e8ed2
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
sbpz_sbid: [
|
||||
{ required: true, message: "请输入设备ID", trigger: "blur" },
|
||||
],
|
||||
sbpz_sbmc: [
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
],
|
||||
sbpz_sbdz: [
|
||||
{ required: true, message: "请输入设备地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
closeMenu(ev) {
|
||||
console.log({ ev });
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
async saveDevice() {
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
console.log(datas);
|
||||
this.formdata.sbpz_jdzxz = Number(this.formdata.sbpz_jdzxz);
|
||||
this.formdata.sbpz_jysb = Number(this.formdata.sbpz_jysb);
|
||||
this.formdata = { ...this.formdata, ...JSON.parse(datas) };
|
||||
this.add_passage = false;
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.mark_value));
|
||||
this.$router.push("/dbcollect");
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
"click-outside": {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log("el", el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
if (!(el == event.target || el.contains(event.target))) {
|
||||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == "function") {
|
||||
vnode.context[binding.expression](event);
|
||||
}
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener("click", el.event, true);
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener("click", el.event, true);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 5px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,475 @@
|
|||
<!-- 设备配置----网口设备 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- 设置树形控件 -->
|
||||
<!-- <div v-click-outside="closeMenu"> -->
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<span slot="title">新建设备</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<span slot="title">删 除</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" style="font-size: 12px;">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- 网口设备 -->
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :model="formdata" :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备ID:" :label-width="formLabelWidth" prop="sbpz_sbid">
|
||||
<el-select v-model="formdata.sbpz_sbid" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="(item, index) in options1" :key="index" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备名称:" :label-width="formLabelWidth" prop="sbpz_sbmc">
|
||||
<el-select v-model="formdata.sbpz_sbmc" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="(item, index) in options2" :key="index" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="MAC地址:" :label-width="formLabelWidth" prop="sbpz_sbdz">
|
||||
<el-input v-model="formdata.sbpz_sbdz" placeholder=""
|
||||
style="width: 200px;height:30px"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<!-- 需要修改的地方 -->
|
||||
<el-checkbox v-model="formdata.sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="formdata.sbpz_jdzxz">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click=saveDevice>保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- 网口设备 -->
|
||||
<!-- <div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form
|
||||
:model="formdata"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备ID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbid"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.sbpz_sbid"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options1"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbmc"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.sbpz_sbmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbdz"
|
||||
>
|
||||
<el-input
|
||||
v-model="formdata.sbpz_sbdz"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="formdata.sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="formdata.sbpz_jdzxz"> </el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveDevice">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "DeviceView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
formdata: {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "",
|
||||
sbpz_jysb: false,
|
||||
sbpz_jdzxz: false,
|
||||
},
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1"
|
||||
}, {
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1"
|
||||
}],
|
||||
options2: [{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
}, {
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
}],
|
||||
datas: [{
|
||||
label: 'Gateway',
|
||||
children: [{
|
||||
label: '数据采集',
|
||||
children: [{
|
||||
label: 'I/O点'
|
||||
},
|
||||
{
|
||||
label: '用户点',
|
||||
},
|
||||
{
|
||||
label: '计算点',
|
||||
},
|
||||
{
|
||||
label: '系统点',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
sbpz_sbid: [
|
||||
{ required: true, message: "请输入设备ID", trigger: "blur" },
|
||||
],
|
||||
sbpz_sbmc: [
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
],
|
||||
sbpz_sbdz: [
|
||||
{ required: true, message: "请输入设备地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
closeMenu(ev) {
|
||||
console.log({ ev });
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
async saveDevice() {
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
console.log(datas);
|
||||
this.formdata.sbpz_jdzxz = Number(this.formdata.sbpz_jdzxz);
|
||||
this.formdata.sbpz_jysb = Number(this.formdata.sbpz_jysb);
|
||||
this.formdata = { ...this.formdata, ...JSON.parse(datas) };
|
||||
this.add_passage = false;
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.mark_value));
|
||||
this.$router.push("/dbcollect");
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
"click-outside": {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log("el", el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
if (!(el == event.target || el.contains(event.target))) {
|
||||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == "function") {
|
||||
vnode.context[binding.expression](event);
|
||||
}
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener("click", el.event, true);
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener("click", el.event, true);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 5px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,451 @@
|
|||
<!-- 设备设置------串口设备设置 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div v-click-outside="closeMenu"> -->
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<span slot="title">新建设备</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<span slot="title">删 除</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" style="font-size: 12px;">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备ID:" :label-width="formLabelWidth" prop="sbpz_sbid">
|
||||
<el-select v-model="sbpz_sbid" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="item in options1" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备名称:" :label-width="formLabelWidth" prop="dev_name">
|
||||
<el-select v-model="sbpz_sbmc" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="item in options2" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备地址:" :label-width="formLabelWidth" prop="dev_address">
|
||||
<el-input v-model="sbpz_sbdz" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="sbpz_jdzxz" :active-value="value1">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="add_passage = false">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备ID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbid"
|
||||
>
|
||||
<el-select
|
||||
v-model="sbpz_sbid"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="dev_name"
|
||||
>
|
||||
<el-select
|
||||
v-model="sbpz_sbmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="dev_address"
|
||||
>
|
||||
<el-input
|
||||
v-model="sbpz_sbdz"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="sbpz_jdzxz" :active-value="value1">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="add_passage = false"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DeviceView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "1",
|
||||
sbpz_jysb: "",
|
||||
sbpz_jdzxz: false,
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [
|
||||
{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1",
|
||||
},
|
||||
{
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
},
|
||||
{
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
},
|
||||
],
|
||||
datas: [
|
||||
{
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
dev_id: [{ required: true, message: "请输入设备ID", trigger: "blur" }],
|
||||
dev_name: [
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
{ min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
|
||||
],
|
||||
dev_address: [
|
||||
{ required: true, message: "请输入设备地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
closeMenu(ev) {
|
||||
console.log({ ev });
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
saveDevice() {
|
||||
this.add_passage = false;
|
||||
this.$router.push("/dbcollect");
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
"click-outside": {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log("el", el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
if (!(el == event.target || el.contains(event.target))) {
|
||||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == "function") {
|
||||
vnode.context[binding.expression](event);
|
||||
}
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener("click", el.event, true);
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener("click", el.event, true);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 5px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,451 @@
|
|||
<!-- 设备设置------串口设备设置 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div v-click-outside="closeMenu"> -->
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<span slot="title">新建设备</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<span slot="title">删 除</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" style="font-size: 12px;">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备ID:" :label-width="formLabelWidth" prop="sbpz_sbid">
|
||||
<el-select v-model="sbpz_sbid" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="item in options1" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备名称:" :label-width="formLabelWidth" prop="dev_name">
|
||||
<el-select v-model="sbpz_sbmc" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="item in options2" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备地址:" :label-width="formLabelWidth" prop="dev_address">
|
||||
<el-input v-model="sbpz_sbdz" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="sbpz_jdzxz" :active-value="value1">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="add_passage = false">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备ID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbid"
|
||||
>
|
||||
<el-select
|
||||
v-model="sbpz_sbid"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="dev_name"
|
||||
>
|
||||
<el-select
|
||||
v-model="sbpz_sbmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="dev_address"
|
||||
>
|
||||
<el-input
|
||||
v-model="sbpz_sbdz"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="sbpz_jdzxz" :active-value="value1">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="add_passage = false"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DeviceView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "1",
|
||||
sbpz_jysb: "",
|
||||
sbpz_jdzxz: false,
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [
|
||||
{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1",
|
||||
},
|
||||
{
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
},
|
||||
{
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
},
|
||||
],
|
||||
datas: [
|
||||
{
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
dev_id: [{ required: true, message: "请输入设备ID", trigger: "blur" }],
|
||||
dev_name: [
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
{ min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
|
||||
],
|
||||
dev_address: [
|
||||
{ required: true, message: "请输入设备地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
closeMenu(ev) {
|
||||
console.log({ ev });
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
saveDevice() {
|
||||
this.add_passage = false;
|
||||
this.$router.push("/dbcollect");
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
"click-outside": {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log("el", el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
if (!(el == event.target || el.contains(event.target))) {
|
||||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == "function") {
|
||||
vnode.context[binding.expression](event);
|
||||
}
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener("click", el.event, true);
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener("click", el.event, true);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 5px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,511 @@
|
|||
<!-- 有线网关设置 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div> <el-button type="info" plain @click="dialogFormVisible = true">IP设置</el-button></div> -->
|
||||
<el-dialog
|
||||
title="IP设置"
|
||||
:visible.sync="dialogFormVisible"
|
||||
:append-to-body="true"
|
||||
width="894px"
|
||||
>
|
||||
<div class="form_content">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
label-width="80px"
|
||||
:rules="rules_ippz_wirle"
|
||||
ref="reform"
|
||||
>
|
||||
<div class="wired">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="网口:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_wangkou"
|
||||
>
|
||||
<el-select
|
||||
v-model="ippz_wangkou"
|
||||
placeholder="ETHO"
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option label="ETH0" value="ETH0"></el-option>
|
||||
<el-option label="ETH1" value="ETH1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="默认网关:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mrwg"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg1"></el-input></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg2"></el-input></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg3"></el-input></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg4"></el-input></el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="子网掩码:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_zwym"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_zwym1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_zwym2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_zwym3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_zwym4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip1" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip2" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip3" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip4" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="首选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_sx"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="备选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_by"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mac"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24" class="mac">
|
||||
<el-input
|
||||
style="width: 200px; height: 30px"
|
||||
v-model="ippz_mac"
|
||||
></el-input
|
||||
><el-button v-copy="ippz_mac" @click="CopyText"
|
||||
>复制</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer footer">
|
||||
<el-button type="primary" @click="saveAll">保 存</el-button>
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "../api/user";
|
||||
export default {
|
||||
name: "DataView",
|
||||
data() {
|
||||
return {
|
||||
disabled: true,
|
||||
// 判断是否保存过
|
||||
|
||||
//
|
||||
formdata: {
|
||||
ippz_wangkou: "",
|
||||
ippz_zwym: "2",
|
||||
ippz_mrwg: "3",
|
||||
ippz_dns_sx: "4",
|
||||
ippz_dns_by: "5",
|
||||
ippz_ip: "6",
|
||||
ippz_mac: "7",
|
||||
},
|
||||
ippz_wangkou: "ETH0",
|
||||
labelPosition: "left",
|
||||
ippz_zwym: "",
|
||||
ippz_zwym1: "255",
|
||||
ippz_zwym2: "255",
|
||||
ippz_zwym3: "255",
|
||||
ippz_zwym4: "0",
|
||||
ippz_ip: "",
|
||||
ippz_ip1: "",
|
||||
ippz_ip2: "",
|
||||
ippz_ip3: "",
|
||||
ippz_ip4: "",
|
||||
ippz_mrwg: "",
|
||||
ippz_mrwg1: "192",
|
||||
ippz_mrwg2: "168",
|
||||
ippz_mrwg3: "1",
|
||||
ippz_mrwg4: "1",
|
||||
ippz_dns_sx: "",
|
||||
ippz_dns_sx1: "8",
|
||||
ippz_dns_sx2: "8",
|
||||
ippz_dns_sx3: "8",
|
||||
ippz_dns_sx4: "8",
|
||||
ippz_dns_by: "",
|
||||
ippz_dns_by1: "8",
|
||||
ippz_dns_by2: "8",
|
||||
ippz_dns_by3: "8",
|
||||
ippz_dns_by4: "8",
|
||||
ippz_mac: "3C:2D:50:20:30:3D",
|
||||
// 无线的数据
|
||||
ippz_wifi_ssid: "1+X",
|
||||
ippz_wifi_mm: "",
|
||||
ippz_lwfs: "1",
|
||||
dialogFormVisible: true,
|
||||
formLabelWidth: "100px",
|
||||
// 有线的规则校验
|
||||
rules_ippz_wirle: {
|
||||
ippz_wangkou: [
|
||||
{ required: true, message: "请输入网口", trigger: "change" },
|
||||
],
|
||||
ippz_zwym: [
|
||||
{ required: true, message: '请输入子网掩码', trigger: 'blur' },
|
||||
{ type: 'number', message: '子网掩码必须为数字值'}
|
||||
],
|
||||
ippz_ip: [
|
||||
{ required: true, message: '请输入IP地址', trigger: 'blur' },
|
||||
{ type: 'number', message: '子网掩码必须为数字值'}
|
||||
],
|
||||
ippz_ip: [{ required: true, message: "请输入IP地址", trigger: "blur" }],
|
||||
ippz_mrwg: [
|
||||
{ required: true, message: '请输入默认网关', trigger: 'blur' },
|
||||
{ type: 'number', message: '默认网关必须为数字值'}
|
||||
],
|
||||
ippz_dns_sx: [
|
||||
{ required: true, message: '请输入首选DNS', trigger: 'blur' },
|
||||
{ type: 'number', message: '首选DNS必须为数字值'}
|
||||
],
|
||||
ippz_dns_by: [
|
||||
{ required: true, message: '请输入备选DNS', trigger: 'blur' },
|
||||
{ type: 'number', message: '备选DNS必须为数字值'}
|
||||
],
|
||||
ippz_mac: [
|
||||
{ required: true, message: '请输入MAC地址', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
rules_ippz_wifi: {
|
||||
ippz_wifi_ssid: [
|
||||
{ required: true, message: "请输入SSID", trigger: "blur" },
|
||||
],
|
||||
ippz_wifi_mm: [
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
],
|
||||
ippz_dns_sx: [
|
||||
{ required: true, message: "请输入首选DNS", trigger: "blur" },
|
||||
],
|
||||
ippz_dns_by: [
|
||||
{ required: true, message: "请输入备选DNS", trigger: "blur" },
|
||||
],
|
||||
ippz_mac: [
|
||||
{ required: true, message: '请输入MAC地址', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isSaveButtonDisabled() {
|
||||
return (
|
||||
!this.$refs.rules_ippz_wirle ||
|
||||
this.$refs.rules_ippz_wirle.validateSync().length > 0
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 封装合并输入框的数据
|
||||
Merge(value, value1, value2, value3, value4) {
|
||||
value = value1 + "." + value2 + "." + value3 + "." + value4;
|
||||
return value;
|
||||
},
|
||||
SliceData(value) {
|
||||
let res = value.split(".");
|
||||
console.log(res);
|
||||
return res;
|
||||
},
|
||||
// 保存数据,发送请求
|
||||
async saveAll() {
|
||||
this.dialogFormVisible = false;
|
||||
this.isSaveAnswer = true;
|
||||
this.formdata.ippz_wangkou = this.ippz_wangkou;
|
||||
this.formdata.ippz_ip = this.Merge(
|
||||
this.ippz_ip,
|
||||
this.ippz_ip1,
|
||||
this.ippz_ip2,
|
||||
this.ippz_ip3,
|
||||
this.ippz_ip4
|
||||
);
|
||||
this.formdata.ippz_zwym = this.Merge(
|
||||
this.ippz_zwym,
|
||||
this.ippz_zwym1,
|
||||
this.ippz_zwym2,
|
||||
this.ippz_zwym3,
|
||||
this.ippz_zwym4
|
||||
);
|
||||
this.formdata.ippz_mrwg = this.Merge(
|
||||
this.ippz_mrwg,
|
||||
this.ippz_mrwg1,
|
||||
this.ippz_mrwg2,
|
||||
this.ippz_mrwg3,
|
||||
this.ippz_mrwg4
|
||||
);
|
||||
this.formdata.ippz_dns_sx = this.Merge(
|
||||
this.ippz_dns_sx,
|
||||
this.ippz_dns_sx1,
|
||||
this.ippz_dns_sx2,
|
||||
this.ippz_dns_sx3,
|
||||
this.ippz_dns_sx4
|
||||
);
|
||||
this.formdata.ippz_dns_by = this.Merge(
|
||||
this.ippz_dns_by,
|
||||
this.ippz_dns_by1,
|
||||
this.ippz_dns_by2,
|
||||
this.ippz_dns_by3,
|
||||
this.ippz_dns_by4
|
||||
);
|
||||
this.formdata.ippz_mac = this.ippz_mac;
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.formdata));
|
||||
let data = {
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
};
|
||||
let res1 = await SaveUserAnswer(data);
|
||||
console.log(res1);
|
||||
},
|
||||
CopyText() {
|
||||
this.$message({
|
||||
message: "复制成功",
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
console.log(res2);
|
||||
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||
console.log(res3);
|
||||
this.ippz_wangkou = res3.ippz_wangkou;
|
||||
this.ippz_mrwg = res3.ippz_mrwg;
|
||||
this.ippz_ip = res3.ippz_ip;
|
||||
this.ippz_zwym = res3.ippz_zwym;
|
||||
this.ippz_dns_sx = res3.ippz_dns_sx;
|
||||
this.ippz_dns_by = res3.ippz_dns_by;
|
||||
this.ippz_mac = this.ippz_mac;
|
||||
this.ippz_mrwg1 = this.SliceData(this.ippz_mrwg)[0];
|
||||
this.ippz_mrwg2 = this.SliceData(this.ippz_mrwg)[1];
|
||||
this.ippz_mrwg3 = this.SliceData(this.ippz_mrwg)[2];
|
||||
this.ippz_mrwg4 = this.SliceData(this.ippz_mrwg)[3];
|
||||
this.ippz_ip1 = this.SliceData(this.ippz_ip)[0];
|
||||
this.ippz_ip2 = this.SliceData(this.ippz_ip)[1];
|
||||
this.ippz_ip3 = this.SliceData(this.ippz_ip)[2];
|
||||
this.ippz_ip4 = this.SliceData(this.ippz_ip)[3];
|
||||
this.ippz_zwym1 = this.SliceData(this.ippz_zwym)[0];
|
||||
this.ippz_zwym2 = this.SliceData(this.ippz_zwym)[1];
|
||||
this.ippz_zwym3 = this.SliceData(this.ippz_zwym)[2];
|
||||
this.ippz_zwym4 = this.SliceData(this.ippz_zwym)[3];
|
||||
this.ippz_dns_sx1 = this.SliceData(this.ippz_dns_sx)[0];
|
||||
this.ippz_dns_sx2 = this.SliceData(this.ippz_dns_sx)[1];
|
||||
this.ippz_dns_sx3 = this.SliceData(this.ippz_dns_sx)[2];
|
||||
this.ippz_dns_sx4 = this.SliceData(this.ippz_dns_sx)[3];
|
||||
this.ippz_dns_by1 = this.SliceData(this.ippz_dns_by)[0];
|
||||
this.ippz_dns_by2 = this.SliceData(this.ippz_dns_by)[1];
|
||||
this.ippz_dns_by3 = this.SliceData(this.ippz_dns_by)[2];
|
||||
this.ippz_dns_by4 = this.SliceData(this.ippz_dns_by)[3];
|
||||
},
|
||||
mounted() {},
|
||||
directives: {
|
||||
copy: {
|
||||
bind(el, { value }) {
|
||||
// 给元素赋值一个$value值,即指令绑定的值
|
||||
el.$value = value;
|
||||
el.handler = () => {
|
||||
// 如果可复制的值为空的时候,给出提示;
|
||||
if (!el.$value) {
|
||||
console.log("无复制内容");
|
||||
return;
|
||||
}
|
||||
// 动态创建 textarea 标签
|
||||
const textarea = document.createElement("textarea");
|
||||
// 将该 textarea 设为 readonly 防止 IOS 下自动唤起键盘,同时将 textarea 移除可视区域
|
||||
textarea.readOnly = "readonly";
|
||||
textarea.style.position = "absolute";
|
||||
textarea.style.left = "-9999px";
|
||||
// 将要copy的值赋值给textarea 标签的value属性
|
||||
textarea.value = el.$value;
|
||||
// 将textarea 插入到body中
|
||||
document.body.appendChild(textarea);
|
||||
// 选中值并复制
|
||||
textarea.select();
|
||||
const result = document.execCommand("Copy");
|
||||
if (result) {
|
||||
console.log("复制成功");
|
||||
}
|
||||
document.body.removeChild(textarea);
|
||||
};
|
||||
// 绑定点击事件,点击的时候copy值
|
||||
el.addEventListener("click", el.handler);
|
||||
},
|
||||
// 当传递进来的值更新的时候触发
|
||||
componentUpdated(el, { value }) {
|
||||
el.$value = value;
|
||||
},
|
||||
// 指令与元素解绑的时候,移除事件绑定
|
||||
unbind(el) {
|
||||
el.removeEventListener("click", el.handler);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/deep/ .wired,
|
||||
/deep/ .wifi {
|
||||
.el-row {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 120px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 118px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.mac {
|
||||
// display: flex;
|
||||
align-items: center;
|
||||
|
||||
.el-button {
|
||||
position: absolute;
|
||||
left: 200px;
|
||||
bottom: 5px;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
line-height: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.netWay {
|
||||
margin-bottom: 20px;
|
||||
width: 80px;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
left: 360px;
|
||||
bottom: 2px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,858 @@
|
|||
<!-- 网关通道 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- v-click-outside="closeMenu" -->
|
||||
<div>
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<<<<<<< HEAD
|
||||
<el-tree :data="datas" :props="defaultProps" default-expand-all @node-contextmenu="rightClick"
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
=======
|
||||
<el-tree
|
||||
:data="datas"
|
||||
:props="defaultProps"
|
||||
@node-contextmenu="rightClick"
|
||||
@node-click="treeNodeClick"
|
||||
:default-expand-all="true"
|
||||
></el-tree>
|
||||
>>>>>>> 61c96050f80dde1e5a3df49d08bf8243612e8ed2
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
<el-menu
|
||||
class="el-menu-vertical-demo"
|
||||
@select="selectMenuNode"
|
||||
default-active="#0078FE"
|
||||
>
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px">
|
||||
<span slot="title">新建通道</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="通道参数设置" :visible.sync="add_passage" width="765px">
|
||||
<el-form
|
||||
:model="FormData"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="通道名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_tdmc"
|
||||
>
|
||||
<el-select
|
||||
v-model="FormData.tdpz_tdmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options1"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="通道:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_td"
|
||||
>
|
||||
<el-select
|
||||
v-model="FormData.tdpz_td"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="驱动名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_qdmc"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-input
|
||||
v-model="FormData.tdpz_qdmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button
|
||||
style="width: 50px; height: 30px"
|
||||
@click="getDriveName"
|
||||
>...</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip1"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip2"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip3"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip4"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="端口号:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_port"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_port"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="超过时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_cssj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_cssj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="间隔时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_jgsj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_jgsj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="轮询时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_lxsj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_lxsj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="重复次数:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_cfcs"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_cfcs"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="super_parmams">
|
||||
<h3>高级参数</h3>
|
||||
<div>
|
||||
<i class="el-icon-caret-bottom" v-if="is_retract"></i>
|
||||
<i class="el-icon-caret-top" v-else="is_retract"></i>
|
||||
<el-button
|
||||
type="text"
|
||||
plain
|
||||
@click="getRetract"
|
||||
style="
|
||||
width: 28px;
|
||||
border: none;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
"
|
||||
>
|
||||
收起</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="super_con" v-show="is_retract">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="FormData.tdpz_watchtime"
|
||||
>watch time(s)</el-checkbox
|
||||
>
|
||||
<el-input
|
||||
v-model="input1"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
:disabled="isdisabled"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="FormData.tdpz_cjsylxdz"
|
||||
>采集使用连续地址</el-checkbox
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="读写占空比:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input
|
||||
v-model="FormData.tdpz_dxzkb1"
|
||||
style="width: 91px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">: </el-col>
|
||||
<el-col :span="10">
|
||||
<el-input
|
||||
v-model="FormData.tdpz_dxzkb2"
|
||||
style="width: 91px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="05/0F:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="auto"
|
||||
>auto</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="05"
|
||||
>05</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="0F"
|
||||
>0F</el-radio
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="06/10:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="auto"
|
||||
>auto</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="06"
|
||||
>06</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="10"
|
||||
>10</el-radio
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveGate">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div class="drvieName_All" v-show="diag_drive">
|
||||
<div class="title">
|
||||
<p class="title_l">协议选择</p>
|
||||
<i class="el-icon-close title_r" @click="diag_drive = false"></i>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-tree :data="datas2" :props="defaultProps" @node-click="handleDetailClick" default-expand-all></el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "TestTreeView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
FormData: {
|
||||
tdpz_tdmc: "有线区Channel1",
|
||||
tdpz_td: "网口",
|
||||
tdpz_qdmc: "ModbusTCPClient",
|
||||
tdpz_watchtime: true,
|
||||
tdpz_cjsylxdz: false,
|
||||
tdpz_dxzkb: "",
|
||||
tdpz_dxzkb1: "1",
|
||||
tdpz_dxzkb2: "1",
|
||||
tdpz_050F: "auto",
|
||||
tdpz_0610: "auto",
|
||||
},
|
||||
tdpz_ip1: "",
|
||||
tdpz_ip2: "",
|
||||
tdpz_ip3: "",
|
||||
tdpz_ip4: "",
|
||||
options1: [
|
||||
{
|
||||
value: "有线区Channel1",
|
||||
label: "有线区Channel1",
|
||||
},
|
||||
{
|
||||
value: "无线区Channel1",
|
||||
label: "无线区Channel1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "网口",
|
||||
label: "网口",
|
||||
},
|
||||
{
|
||||
value: "串口",
|
||||
label: "串口",
|
||||
},
|
||||
],
|
||||
value1: "有线区Channel1",
|
||||
value2: "网口",
|
||||
diag_drive: false,
|
||||
isdisabled: true,
|
||||
radio: "1",
|
||||
is_retract: true,
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
datas: [
|
||||
{
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
datas2: [
|
||||
{
|
||||
label: "通用标准",
|
||||
children: [
|
||||
{
|
||||
label: "ModbusTCPClient",
|
||||
},
|
||||
{
|
||||
label: "ModbusRTU_over_TCP",
|
||||
},
|
||||
{
|
||||
label: "OPCUAClient",
|
||||
},
|
||||
{
|
||||
label: "OPCDAClient",
|
||||
},
|
||||
{
|
||||
label: "MQTTClient",
|
||||
},
|
||||
{
|
||||
label: "OPCXMLDAClient",
|
||||
},
|
||||
{
|
||||
label: "环保212协议网口监听",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "PLC",
|
||||
children: [
|
||||
{
|
||||
label: "Slemens S7-200 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-300 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-400 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1200 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1500 Network",
|
||||
},
|
||||
{
|
||||
label: "EtherNet/IP CIP协议(AB OMR ON)",
|
||||
},
|
||||
{
|
||||
label: "MC_Qna-3E(三菱 基恩士 松下)",
|
||||
},
|
||||
{
|
||||
label: "MC_A-1E_Binary",
|
||||
},
|
||||
{
|
||||
label: "OMRON-FINS",
|
||||
},
|
||||
{
|
||||
label: "横河PLC",
|
||||
},
|
||||
{
|
||||
label: "西门子FetchWirte",
|
||||
},
|
||||
{
|
||||
label: "富机 FUJI_SPH_NET",
|
||||
},
|
||||
{
|
||||
label: "基恩士上位链路通讯",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "智能建筑",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "厂家定制",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "电力行业标准",
|
||||
children: [
|
||||
{
|
||||
label: "IEC104",
|
||||
},
|
||||
{
|
||||
label: "DLT645_over_TCP",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "CNC数控",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "私有协议",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
tdpz_tdmc: [
|
||||
{ required: true, message: "请输入通道名称", trigger: "change" },
|
||||
],
|
||||
tdpz_td: [{ required: true, message: "请输入通道", trigger: "change" }],
|
||||
tdpz_qdmc: [
|
||||
{ required: true, message: "请输入驱动名称", trigger: "change" },
|
||||
],
|
||||
tdpz_ip: [{ required: true, message: "请输入ip地址", trigger: "blur" }],
|
||||
tdpz_port: [
|
||||
{ required: true, message: "请输入端口号", trigger: "blur" },
|
||||
],
|
||||
tdpz_cssj: [
|
||||
{ required: true, message: "请输入超出时间", trigger: "blur" },
|
||||
],
|
||||
tdpz_jgsj: [
|
||||
{ required: true, message: "请输入间隔时间", trigger: "blur" },
|
||||
],
|
||||
tdpz_lxsj: [
|
||||
{ required: true, message: "请输入轮询时间", trigger: "blur" },
|
||||
],
|
||||
tdpz_cfcs: [
|
||||
{ required: true, message: "请输入重复次数", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增网关
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
// 收起点击事件的判断
|
||||
getRetract() {
|
||||
if (this.is_retract == true) {
|
||||
this.is_retract = false;
|
||||
} else {
|
||||
this.is_retract = true;
|
||||
}
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
Merge(value, value1, value2, value3, value4) {
|
||||
value = value1 + "." + value2 + "." + value3 + "." + value4;
|
||||
return value;
|
||||
},
|
||||
async saveGate() {
|
||||
this.add_passage = false;
|
||||
this.FormData.tdpz_watchtime = Number(this.FormData.tdpz_watchtime);
|
||||
this.FormData.tdpz_cjsylxdz = Number(this.FormData.tdpz_cjsylxdz);
|
||||
this.FormData.tdpz_ip = this.Merge(
|
||||
this.FormData.tdpz_ip,
|
||||
this.tdpz_ip1,
|
||||
this.tdpz_ip2,
|
||||
this.tdpz_ip3,
|
||||
this.tdpz_ip4
|
||||
);
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
this.FormData = { ...this.FormData, ...JSON.parse(datas) };
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.FormData),
|
||||
});
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.FormData));
|
||||
console.log(res);
|
||||
console.log(res.data.data.mark_value);
|
||||
this.$router.push("/dbcollectdevice");
|
||||
},
|
||||
handleDetailClick(data,node,value){
|
||||
console.log(data.label);
|
||||
this.FormData.tdpz_qdmc=data.label;
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
let res2 = GetUserAnswer()
|
||||
},
|
||||
watch: {
|
||||
tdpz_watchtime: {
|
||||
handler(old) {
|
||||
if (old) {
|
||||
this.isdisabled = false;
|
||||
} else {
|
||||
this.isdisabled = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
clickoutside: {
|
||||
bind: function (el, binding, vnode) {
|
||||
function documentHandler(e) {
|
||||
if (el.contains(e.target)) {
|
||||
return false;
|
||||
}
|
||||
if (binding.expression) {
|
||||
binding.value(e);
|
||||
}
|
||||
}
|
||||
el._vueClickOutside_ = documentHandler;
|
||||
document.addEventListener("click", documentHandler);
|
||||
},
|
||||
unbind: function (el, binding) {
|
||||
document.removeEventListener("click", el._vueClickOutside_);
|
||||
delete el._vueClickOutside_;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 38px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 6px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 18px 1.25rem 50px;
|
||||
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 20px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
/deep/ .drvieName_All {
|
||||
position: absolute;
|
||||
left: 1408px;
|
||||
top: 140px;
|
||||
width: 435px;
|
||||
max-height: 720px;
|
||||
z-index: 10000;
|
||||
border: 1px solid #f5f5f5;
|
||||
|
||||
.title {
|
||||
background-color: #fff;
|
||||
padding: 5px 6px 5px 25px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title_l {
|
||||
width: 103px;
|
||||
height: 26px;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title_r {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
color: rgba(111, 103, 103, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// h3 {
|
||||
// padding-bottom: 10px;
|
||||
// background-color: #fff;
|
||||
// }
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,848 @@
|
|||
<!-- 网关通道 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- v-click-outside="closeMenu" -->
|
||||
<div>
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" default-expand-all @node-contextmenu="rightClick"
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
<el-menu
|
||||
class="el-menu-vertical-demo"
|
||||
@select="selectMenuNode"
|
||||
default-active="#0078FE"
|
||||
>
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px">
|
||||
<span slot="title">新建通道</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="通道参数设置" :visible.sync="add_passage" width="765px">
|
||||
<el-form
|
||||
:model="FormData"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="通道名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_tdmc"
|
||||
>
|
||||
<el-select
|
||||
v-model="FormData.tdpz_tdmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options1"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="通道:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_td"
|
||||
>
|
||||
<el-select
|
||||
v-model="FormData.tdpz_td"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="驱动名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_qdmc"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-input
|
||||
v-model="FormData.tdpz_qdmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button
|
||||
style="width: 50px; height: 30px"
|
||||
@click="getDriveName"
|
||||
>...</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip1"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip2"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip3"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="tdpz_ip4"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="端口号:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_port"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_port"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="超过时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_cssj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_cssj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="间隔时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_jgsj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_jgsj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="轮询时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_lxsj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_lxsj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="重复次数:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_cfcs"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_cfcs"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="super_parmams">
|
||||
<h3>高级参数</h3>
|
||||
<div>
|
||||
<i class="el-icon-caret-bottom" v-if="is_retract"></i>
|
||||
<i class="el-icon-caret-top" v-else="is_retract"></i>
|
||||
<el-button
|
||||
type="text"
|
||||
plain
|
||||
@click="getRetract"
|
||||
style="
|
||||
width: 28px;
|
||||
border: none;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
"
|
||||
>
|
||||
收起</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="super_con" v-show="is_retract">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="FormData.tdpz_watchtime"
|
||||
>watch time(s)</el-checkbox
|
||||
>
|
||||
<el-input
|
||||
v-model="input1"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
:disabled="isdisabled"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="FormData.tdpz_cjsylxdz"
|
||||
>采集使用连续地址</el-checkbox
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="读写占空比:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input
|
||||
v-model="FormData.tdpz_dxzkb1"
|
||||
style="width: 91px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">: </el-col>
|
||||
<el-col :span="10">
|
||||
<el-input
|
||||
v-model="FormData.tdpz_dxzkb2"
|
||||
style="width: 91px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="05/0F:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="auto"
|
||||
>auto</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="05"
|
||||
>05</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="0F"
|
||||
>0F</el-radio
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="06/10:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="auto"
|
||||
>auto</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="06"
|
||||
>06</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="10"
|
||||
>10</el-radio
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveGate">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div class="drvieName_All" v-show="diag_drive">
|
||||
<div class="title">
|
||||
<p class="title_l">协议选择</p>
|
||||
<i class="el-icon-close title_r" @click="diag_drive = false"></i>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-tree :data="datas2" :props="defaultProps" @node-click="handleDetailClick" default-expand-all></el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "TestTreeView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
FormData: {
|
||||
tdpz_tdmc: "有线区Channel1",
|
||||
tdpz_td: "网口",
|
||||
tdpz_qdmc: "ModbusTCPClient",
|
||||
tdpz_watchtime: true,
|
||||
tdpz_cjsylxdz: false,
|
||||
tdpz_dxzkb: "",
|
||||
tdpz_dxzkb1: "1",
|
||||
tdpz_dxzkb2: "1",
|
||||
tdpz_050F: "auto",
|
||||
tdpz_0610: "auto",
|
||||
},
|
||||
tdpz_ip1: "",
|
||||
tdpz_ip2: "",
|
||||
tdpz_ip3: "",
|
||||
tdpz_ip4: "",
|
||||
options1: [
|
||||
{
|
||||
value: "有线区Channel1",
|
||||
label: "有线区Channel1",
|
||||
},
|
||||
{
|
||||
value: "无线区Channel1",
|
||||
label: "无线区Channel1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "网口",
|
||||
label: "网口",
|
||||
},
|
||||
{
|
||||
value: "串口",
|
||||
label: "串口",
|
||||
},
|
||||
],
|
||||
value1: "有线区Channel1",
|
||||
value2: "网口",
|
||||
diag_drive: false,
|
||||
isdisabled: true,
|
||||
radio: "1",
|
||||
is_retract: true,
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
datas: [
|
||||
{
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
datas2: [
|
||||
{
|
||||
label: "通用标准",
|
||||
children: [
|
||||
{
|
||||
label: "ModbusTCPClient",
|
||||
},
|
||||
{
|
||||
label: "ModbusRTU_over_TCP",
|
||||
},
|
||||
{
|
||||
label: "OPCUAClient",
|
||||
},
|
||||
{
|
||||
label: "OPCDAClient",
|
||||
},
|
||||
{
|
||||
label: "MQTTClient",
|
||||
},
|
||||
{
|
||||
label: "OPCXMLDAClient",
|
||||
},
|
||||
{
|
||||
label: "环保212协议网口监听",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "PLC",
|
||||
children: [
|
||||
{
|
||||
label: "Slemens S7-200 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-300 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-400 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1200 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1500 Network",
|
||||
},
|
||||
{
|
||||
label: "EtherNet/IP CIP协议(AB OMR ON)",
|
||||
},
|
||||
{
|
||||
label: "MC_Qna-3E(三菱 基恩士 松下)",
|
||||
},
|
||||
{
|
||||
label: "MC_A-1E_Binary",
|
||||
},
|
||||
{
|
||||
label: "OMRON-FINS",
|
||||
},
|
||||
{
|
||||
label: "横河PLC",
|
||||
},
|
||||
{
|
||||
label: "西门子FetchWirte",
|
||||
},
|
||||
{
|
||||
label: "富机 FUJI_SPH_NET",
|
||||
},
|
||||
{
|
||||
label: "基恩士上位链路通讯",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "智能建筑",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "厂家定制",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "电力行业标准",
|
||||
children: [
|
||||
{
|
||||
label: "IEC104",
|
||||
},
|
||||
{
|
||||
label: "DLT645_over_TCP",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "CNC数控",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "私有协议",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
tdpz_tdmc: [
|
||||
{ required: true, message: "请输入通道名称", trigger: "change" },
|
||||
],
|
||||
tdpz_td: [{ required: true, message: "请输入通道", trigger: "change" }],
|
||||
tdpz_qdmc: [
|
||||
{ required: true, message: "请输入驱动名称", trigger: "change" },
|
||||
],
|
||||
tdpz_ip: [{ required: true, message: "请输入ip地址", trigger: "blur" }],
|
||||
tdpz_port: [
|
||||
{ required: true, message: "请输入端口号", trigger: "blur" },
|
||||
],
|
||||
tdpz_cssj: [
|
||||
{ required: true, message: "请输入超出时间", trigger: "blur" },
|
||||
],
|
||||
tdpz_jgsj: [
|
||||
{ required: true, message: "请输入间隔时间", trigger: "blur" },
|
||||
],
|
||||
tdpz_lxsj: [
|
||||
{ required: true, message: "请输入轮询时间", trigger: "blur" },
|
||||
],
|
||||
tdpz_cfcs: [
|
||||
{ required: true, message: "请输入重复次数", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增网关
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
// 收起点击事件的判断
|
||||
getRetract() {
|
||||
if (this.is_retract == true) {
|
||||
this.is_retract = false;
|
||||
} else {
|
||||
this.is_retract = true;
|
||||
}
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
Merge(value, value1, value2, value3, value4) {
|
||||
value = value1 + "." + value2 + "." + value3 + "." + value4;
|
||||
return value;
|
||||
},
|
||||
async saveGate() {
|
||||
this.add_passage = false;
|
||||
this.FormData.tdpz_watchtime = Number(this.FormData.tdpz_watchtime);
|
||||
this.FormData.tdpz_cjsylxdz = Number(this.FormData.tdpz_cjsylxdz);
|
||||
this.FormData.tdpz_ip = this.Merge(
|
||||
this.FormData.tdpz_ip,
|
||||
this.tdpz_ip1,
|
||||
this.tdpz_ip2,
|
||||
this.tdpz_ip3,
|
||||
this.tdpz_ip4
|
||||
);
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
this.FormData = { ...this.FormData, ...JSON.parse(datas) };
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.FormData),
|
||||
});
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.FormData));
|
||||
console.log(res);
|
||||
console.log(res.data.data.mark_value);
|
||||
this.$router.push("/dbcollectdevice");
|
||||
},
|
||||
handleDetailClick(data,node,value){
|
||||
console.log(data.label);
|
||||
this.FormData.tdpz_qdmc=data.label;
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
let res2 = GetUserAnswer()
|
||||
},
|
||||
watch: {
|
||||
tdpz_watchtime: {
|
||||
handler(old) {
|
||||
if (old) {
|
||||
this.isdisabled = false;
|
||||
} else {
|
||||
this.isdisabled = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
clickoutside: {
|
||||
bind: function (el, binding, vnode) {
|
||||
function documentHandler(e) {
|
||||
if (el.contains(e.target)) {
|
||||
return false;
|
||||
}
|
||||
if (binding.expression) {
|
||||
binding.value(e);
|
||||
}
|
||||
}
|
||||
el._vueClickOutside_ = documentHandler;
|
||||
document.addEventListener("click", documentHandler);
|
||||
},
|
||||
unbind: function (el, binding) {
|
||||
document.removeEventListener("click", el._vueClickOutside_);
|
||||
delete el._vueClickOutside_;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 38px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 6px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 18px 1.25rem 50px;
|
||||
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 20px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
/deep/ .drvieName_All {
|
||||
position: absolute;
|
||||
left: 1408px;
|
||||
top: 140px;
|
||||
width: 435px;
|
||||
max-height: 720px;
|
||||
z-index: 10000;
|
||||
border: 1px solid #f5f5f5;
|
||||
|
||||
.title {
|
||||
background-color: #fff;
|
||||
padding: 5px 6px 5px 25px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title_l {
|
||||
width: 103px;
|
||||
height: 26px;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title_r {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
color: rgba(111, 103, 103, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// h3 {
|
||||
// padding-bottom: 10px;
|
||||
// background-color: #fff;
|
||||
// }
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -190,7 +190,7 @@ export default {
|
|||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="less">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,160 +1,212 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <div class="data_acquire">
|
||||
<div>
|
||||
<!-- <div class="data_acquire">
|
||||
<el-button type="info" plain @click="outerVisible = true">数据采集设备</el-button>
|
||||
</div> -->
|
||||
<div>
|
||||
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
||||
<el-form :model="formdata" :rules="rules" ref="ruleForm" label-width="85px" class="demo-ruleForm">
|
||||
<el-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||
<el-select v-model="formdata.wgpz_wgmc" placeholder="有线区网关1" style="width: 200px;">
|
||||
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
||||
<el-select v-model="formdata.wgpz_wgid" placeholder="LAN-BOX1" style="width: 200px;">
|
||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="网关类型:" prop="wgpz_wglx">
|
||||
<el-select v-model="formdata.wgpz_wglx" placeholder="lot Life 网关" style="width: 200px;">
|
||||
<el-option v-for="item in options3" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog width="382px" title="系统提示" :visible.sync="innerVisible" append-to-body>
|
||||
<p class="inner_content">请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关</p>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="innerConfirm">确定</el-button>
|
||||
<el-button @click="innerVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div slot="footer" class="dialog-footer-outer">
|
||||
<el-button type="primary" @click="innerVisible = true">保存</el-button>
|
||||
<el-button @click="outerVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div>
|
||||
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
||||
<el-form
|
||||
:model="formdata"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="85px"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||
<el-select
|
||||
v-model="formdata.wgpz_wgmc"
|
||||
placeholder="有线区网关1"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
||||
<el-select
|
||||
v-model="formdata.wgpz_wgid"
|
||||
placeholder="LAN-BOX1"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="网关类型:" prop="wgpz_wglx">
|
||||
<el-select
|
||||
v-model="formdata.wgpz_wglx"
|
||||
placeholder="lot Life 网关"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options3"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
width="382px"
|
||||
title="系统提示"
|
||||
:visible.sync="innerVisible"
|
||||
append-to-body
|
||||
>
|
||||
<p class="inner_content" style="color: #fff">
|
||||
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||
</p>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="innerConfirm">确定</el-button>
|
||||
<el-button @click="innerVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div slot="footer" class="dialog-footer-outer">
|
||||
<el-button type="primary" @click="innerVisible = true"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="outerVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
export default {
|
||||
name: 'TestDataAcquisition',
|
||||
name: "TestDataAcquisition",
|
||||
|
||||
data() {
|
||||
return {
|
||||
options1: [{
|
||||
value: "有线区网关1",
|
||||
label: "有线区网关1",
|
||||
}, {
|
||||
value: "无线区网关1",
|
||||
label: "无线区网关1",
|
||||
}],
|
||||
options2: [{
|
||||
value: "LAN-BOX1",
|
||||
label: "LAN-BOX1",
|
||||
}, {
|
||||
value: "WLAN-BOX1",
|
||||
label: "WLAN-BOX1",
|
||||
}],
|
||||
options3: [{
|
||||
value: 'loT Lite网关',
|
||||
label: 'loT Lite网关'
|
||||
}, {
|
||||
value: 'MODBUS网关',
|
||||
label: 'MODBUS网关'
|
||||
}, {
|
||||
value: 'BACNET网关',
|
||||
label: 'BACNET网关'
|
||||
}, {
|
||||
value: 'OPC UA网关',
|
||||
label: 'OPC UA网关'
|
||||
}, {
|
||||
value: 'OPC DA网关',
|
||||
label: 'OPC DA网关'
|
||||
},
|
||||
{
|
||||
value: 'loT网关',
|
||||
label: 'loT网关'
|
||||
}],
|
||||
value: '',
|
||||
formdata: {
|
||||
wgpz_wgmc: "有线区网关1",
|
||||
wgpz_wgid: "LAN-BOX1",
|
||||
wgpz_wglx: "loT网关"
|
||||
},
|
||||
rules: {
|
||||
wgpz_wgmc: [
|
||||
{ required: true, message: '请选择网关名称', trigger: 'change' },
|
||||
],
|
||||
wgpz_wgid: [
|
||||
{ required: true, message: '请选择网关id', trigger: 'change' },
|
||||
],
|
||||
wgpz_wglx: [
|
||||
{ required: true, message: '请选择网关类型', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
outerVisible: true,
|
||||
innerVisible: false,
|
||||
};
|
||||
data() {
|
||||
return {
|
||||
options1: [
|
||||
{
|
||||
value: "有线区网关1",
|
||||
label: "有线区网关1",
|
||||
},
|
||||
{
|
||||
value: "无线区网关1",
|
||||
label: "无线区网关1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "LAN-BOX1",
|
||||
label: "LAN-BOX1",
|
||||
},
|
||||
{
|
||||
value: "WLAN-BOX1",
|
||||
label: "WLAN-BOX1",
|
||||
},
|
||||
],
|
||||
options3: [
|
||||
{
|
||||
value: "loT Lite网关",
|
||||
label: "loT Lite网关",
|
||||
},
|
||||
{
|
||||
value: "MODBUS网关",
|
||||
label: "MODBUS网关",
|
||||
},
|
||||
{
|
||||
value: "BACNET网关",
|
||||
label: "BACNET网关",
|
||||
},
|
||||
{
|
||||
value: "OPC UA网关",
|
||||
label: "OPC UA网关",
|
||||
},
|
||||
{
|
||||
value: "OPC DA网关",
|
||||
label: "OPC DA网关",
|
||||
},
|
||||
{
|
||||
value: "loT网关",
|
||||
label: "loT网关",
|
||||
},
|
||||
],
|
||||
value: "",
|
||||
formdata: {
|
||||
wgpz_wgmc: "有线区网关1",
|
||||
wgpz_wgid: "LAN-BOX1",
|
||||
wgpz_wglx: "loT网关",
|
||||
},
|
||||
rules: {
|
||||
wgpz_wgmc: [
|
||||
{ required: true, message: "请选择网关名称", trigger: "change" },
|
||||
],
|
||||
wgpz_wgid: [
|
||||
{ required: true, message: "请选择网关id", trigger: "change" },
|
||||
],
|
||||
wgpz_wglx: [
|
||||
{ required: true, message: "请选择网关类型", trigger: "change" },
|
||||
],
|
||||
},
|
||||
outerVisible: true,
|
||||
innerVisible: false,
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
async innerConfirm() {
|
||||
this.outerVisible = false;
|
||||
this.innerVisible = false;
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
console.log(JSON.parse(datas));
|
||||
this.formdata = { ...this.formdata, ...JSON.parse(datas) };
|
||||
console.log(this.formdata);
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
});
|
||||
console.log(JSON.parse(res.data.data.mark_value));
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.formdata));
|
||||
this.$router.replace("/channelconfig");
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
async innerConfirm() {
|
||||
this.outerVisible = false;
|
||||
this.innerVisible = false;
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
console.log(JSON.parse(datas));
|
||||
this.formdata = { ...this.formdata, ...JSON.parse(datas) };
|
||||
console.log(this.formdata);
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
})
|
||||
console.log(JSON.parse(res.data.data.mark_value));
|
||||
sessionStorage.setItem('answer', JSON.stringify(this.formdata))
|
||||
this.$router.replace("/channelconfig");
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
console.log(res2);
|
||||
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||
console.log(res3);
|
||||
console.log(res3.wgpz_wgid);
|
||||
this.formdata.wgpz_wgid = res3.wgpz_wgid;
|
||||
console.log(this.formdata.wgpz_wgid);
|
||||
this.formdata.wgpz_wgmc = res3.wgpz_wgmc;
|
||||
this.formdata.wgpz_wglx = res3.wgpz_wglx;
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
console.log(res2);
|
||||
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||
console.log(res3);
|
||||
console.log(res3.wgpz_wgid);
|
||||
this.formdata.wgpz_wgid = res3.wgpz_wgid;
|
||||
console.log(this.formdata.wgpz_wgid);
|
||||
this.formdata.wgpz_wgmc = res3.wgpz_wgmc;
|
||||
this.formdata.wgpz_wglx = res3.wgpz_wglx;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.data_acquire {
|
||||
font-size: 14px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.inner_content {
|
||||
margin-left: 30px;
|
||||
width: 280px;
|
||||
height: 40px;
|
||||
// color: rgba(255, 255, 255, 0);
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
font-family: SourceHanSansSC-regular;
|
||||
margin-left: 30px;
|
||||
width: 280px;
|
||||
height: 40px;
|
||||
// color: rgba(255, 255, 255, 0);
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
font-family: "SourceHanSansSC-regular";
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,12 @@
|
|||
<div>
|
||||
<!-- <div> <el-button type="info" plain @click="dialogFormVisible = true">IP设置</el-button></div> -->
|
||||
<!-- 无线网关 -->
|
||||
<el-dialog title="IP设置" :visible.sync="dialogFormVisible" :append-to-body="true" width="894px">
|
||||
<el-dialog
|
||||
title="IP设置"
|
||||
:visible.sync="dialogFormVisible"
|
||||
:append-to-body="true"
|
||||
width="894px"
|
||||
>
|
||||
<div class="form_content">
|
||||
<div>
|
||||
<p class="netWay">网络方式</p>
|
||||
|
|
@ -14,19 +19,36 @@
|
|||
<!-- v-if="ippz_lwfs == 1 ? true : false" -->
|
||||
<div>
|
||||
<h2>有线</h2>
|
||||
<el-form :label-position="labelPosition" label-width="80px" :rules="rules_ippz_wirle" ref="reform">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
label-width="80px"
|
||||
:rules="rules_ippz_wirle"
|
||||
ref="reform"
|
||||
>
|
||||
<div class="wired">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="网口:" :label-width="formLabelWidth" prop="ippz_wangkou">
|
||||
<el-select v-model="ippz_wangkou" placeholder="ETHO" style="width: 200px; height: 30px">
|
||||
<el-form-item
|
||||
label="网口:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_wangkou"
|
||||
>
|
||||
<el-select
|
||||
v-model="ippz_wangkou"
|
||||
placeholder="ETHO"
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option label="ETH0" value="ETH0"></el-option>
|
||||
<el-option label="ETH1" value="ETH1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认网关:" :label-width="formLabelWidth" prop="ippz_mrwg">
|
||||
<el-form-item
|
||||
label="默认网关:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mrwg"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_mrwg1"></el-input>
|
||||
|
|
@ -49,7 +71,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="子网掩码:" :label-width="formLabelWidth" prop="ippz_zwym">
|
||||
<el-form-item
|
||||
label="子网掩码:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_zwym"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_zwym1"></el-input>
|
||||
|
|
@ -70,7 +96,11 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="IP地址:" :label-width="formLabelWidth" prop="ippz_ip">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip1"></el-input>
|
||||
|
|
@ -93,7 +123,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="首选DNS:" :label-width="formLabelWidth" prop="ippz_dns_sx">
|
||||
<el-form-item
|
||||
label="首选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_sx"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx1"></el-input>
|
||||
|
|
@ -114,7 +148,11 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备选DNS:" :label-width="formLabelWidth" prop="ippz_dns_by">
|
||||
<el-form-item
|
||||
label="备选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_by"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by1"></el-input>
|
||||
|
|
@ -137,11 +175,20 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="MAC地址:" :label-width="formLabelWidth" prop="ippz_mac">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mac"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24" class="mac">
|
||||
<el-input style="width: 200px; height: 30px" v-model="ippz_mac"></el-input><el-button
|
||||
v-copy="ippz_mac" @click="CopyText">复制</el-button>
|
||||
<el-input
|
||||
style="width: 200px; height: 30px"
|
||||
v-model="ippz_mac"
|
||||
></el-input
|
||||
><el-button v-copy="ippz_mac" @click="CopyText"
|
||||
>复制</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -153,17 +200,37 @@
|
|||
<!-- v-if="ippz_lwfs == 2 ? true : false" -->
|
||||
<div>
|
||||
<h2>WIFI</h2>
|
||||
<el-form :label-position="labelPosition" label-width="80px" :rules="rules_ippz_wifi" ref="reform">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
label-width="80px"
|
||||
:rules="rules_ippz_wifi"
|
||||
ref="reform"
|
||||
>
|
||||
<div class="wifi">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="SSID:" :label-width="formLabelWidth" prop="ippz_wifi_ssid">
|
||||
<el-input v-model="ippz_wifi_ssid" placeholder="请输入SSID"></el-input>
|
||||
<el-form-item
|
||||
label="SSID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_wifi_ssid"
|
||||
>
|
||||
<el-input
|
||||
v-model="ippz_wifi_ssid"
|
||||
placeholder="请输入SSID"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="密码:" :label-width="formLabelWidth" prop="ippz_wifi_mm">
|
||||
<el-input v-model="ippz_wifi_mm" placeholder="" style="width: 200px; height: 30px"></el-input>
|
||||
<el-form-item
|
||||
label="密码:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_wifi_mm"
|
||||
>
|
||||
<el-input
|
||||
v-model="ippz_wifi_mm"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -234,7 +301,11 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="首选DNS:" :label-width="formLabelWidth" prop="ippz_dns_sx">
|
||||
<el-form-item
|
||||
label="首选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_sx"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx1"></el-input>
|
||||
|
|
@ -257,7 +328,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备选DNS:" :label-width="formLabelWidth" prop="ippz_dns_by">
|
||||
<el-form-item
|
||||
label="备选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_by"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by1"></el-input>
|
||||
|
|
@ -278,11 +353,17 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="MAC地址:" :label-width="formLabelWidth" prop="ippz_mac">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mac"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24" class="mac">
|
||||
<el-input style="width: 200px" v-model="ippz_mac" /><el-button
|
||||
v-copy="formdata.ippz_mac">复制</el-button>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
v-model="ippz_mac"
|
||||
/><el-button v-copy="formdata.ippz_mac">复制</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -451,17 +532,17 @@ export default {
|
|||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_wx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata)
|
||||
})
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
});
|
||||
console.log(res);
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.formdata));
|
||||
},
|
||||
CopyText() {
|
||||
this.$message({
|
||||
message: '复制成功',
|
||||
type: 'success'
|
||||
message: "复制成功",
|
||||
type: "success",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let res2 = await GetUserAnswer({
|
||||
|
|
@ -501,7 +582,7 @@ export default {
|
|||
this.ippz_dns_by3 = this.SliceData(this.ippz_dns_by)[2];
|
||||
this.ippz_dns_by4 = this.SliceData(this.ippz_dns_by)[3];
|
||||
},
|
||||
mounted() { },
|
||||
mounted() {},
|
||||
directives: {
|
||||
copy: {
|
||||
bind(el, { value }) {
|
||||
|
|
|
|||
|
|
@ -2,29 +2,29 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- 设置树形控件 -->
|
||||
<div v-click-outside="closeMenu">
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
<!-- <div v-click-outside="closeMenu"> -->
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<span slot="title">新建设备</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<span slot="title">删 除</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" style="font-size: 12px;">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<span slot="title">新建设备</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<span slot="title">删 除</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" style="font-size: 12px;">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- 网口设备 -->
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
|
|
@ -85,16 +85,109 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- 网口设备 -->
|
||||
<!-- <div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form
|
||||
:model="formdata"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备ID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbid"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.sbpz_sbid"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options1"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbmc"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.sbpz_sbmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbdz"
|
||||
>
|
||||
<el-input
|
||||
v-model="formdata.sbpz_sbdz"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="formdata.sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="formdata.sbpz_jdzxz"> </el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveDevice">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer } from '@/api/user';
|
||||
import { SaveUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: 'DeviceView',
|
||||
name: "DeviceView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
formdata: {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
|
|
@ -142,67 +235,75 @@ export default {
|
|||
]
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [{
|
||||
label: "Modbus"
|
||||
}]
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client"
|
||||
},
|
||||
{
|
||||
label: "Alink"
|
||||
},
|
||||
{
|
||||
label: "Tlink"
|
||||
},
|
||||
{
|
||||
label: "loTDDC"
|
||||
},
|
||||
{
|
||||
label: "Ulink"
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}],
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
sbpz_sbid: [
|
||||
{ required: true, message: '请输入设备ID', trigger: 'blur' },
|
||||
{ required: true, message: "请输入设备ID", trigger: "blur" },
|
||||
],
|
||||
sbpz_sbmc: [
|
||||
{ required: true, message: '请输入设备名称', trigger: 'blur' },
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
],
|
||||
sbpz_sbdz: [
|
||||
{ required: true, message: '请输入设备地址', trigger: 'blur' },
|
||||
{ required: true, message: "请输入设备地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
mounted() { },
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false
|
||||
this.menuShow = true
|
||||
e.preventDefault() //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + 'px', left: e.pageX + 'px' }
|
||||
document.addEventListener('click', (ev) => {
|
||||
ev.stopImmediatePropagation()
|
||||
if (ev.target !== document.querySelector('.el-menu-item.is-active')) {
|
||||
this.foo()
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
|
|
@ -213,11 +314,11 @@ export default {
|
|||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false
|
||||
document.removeEventListener('click', this.foo) // 关掉监听,
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo()
|
||||
this.foo();
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
|
|
@ -241,12 +342,12 @@ export default {
|
|||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.mark_value));
|
||||
this.$router.push("/dbcollect");
|
||||
}
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
'click-outside': {
|
||||
"click-outside": {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log('el', el);
|
||||
console.log("el", el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
|
|
@ -254,18 +355,18 @@ export default {
|
|||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == 'function') {
|
||||
vnode.context[binding.expression](event)
|
||||
if (typeof vnode.context[binding.expression] == "function") {
|
||||
vnode.context[binding.expression](event);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener('click', el.event, true)
|
||||
document.body.addEventListener("click", el.event, true);
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener('click', el.event, true)
|
||||
document.body.removeEventListener("click", el.event, true);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -354,7 +455,6 @@ export default {
|
|||
}
|
||||
|
||||
.el-input__inner {
|
||||
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
|
@ -372,4 +472,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!-- 设备设置------串口设备设置 -->
|
||||
<template>
|
||||
<div>
|
||||
<div v-click-outside="closeMenu">
|
||||
<!-- <div v-click-outside="closeMenu"> -->
|
||||
<!-- <el-button type="info" plain @click="dialogVisible = true">设备设置</el-button> -->
|
||||
<div class="tree_menu" v-show="dialogVisible">
|
||||
<el-tree :data="datas" :props="defaultProps" @node-contextmenu="rightClick" default-expand-all
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
</el-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
|
|
@ -78,277 +78,374 @@
|
|||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="设备属性" :visible.sync="add_passage" width="382px">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备ID:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="sbpz_sbid"
|
||||
>
|
||||
<el-select
|
||||
v-model="sbpz_sbid"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="dev_name"
|
||||
>
|
||||
<el-select
|
||||
v-model="sbpz_sbmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="设备地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="dev_address"
|
||||
>
|
||||
<el-input
|
||||
v-model="sbpz_sbdz"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="sbpz_jysb">禁用地址</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基地址选择:">
|
||||
<el-switch v-model="sbpz_jdzxz" :active-value="value1">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="add_passage = false"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DeviceView',
|
||||
name: "DeviceView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "1",
|
||||
sbpz_jysb: "",
|
||||
sbpz_jdzxz: "0",
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1"
|
||||
}, {
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1"
|
||||
}],
|
||||
options2: [{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
}, {
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
}],
|
||||
datas: [{
|
||||
label: 'Gateway',
|
||||
children: [{
|
||||
label: '数据采集',
|
||||
children: [{
|
||||
label: 'I/O点'
|
||||
},
|
||||
{
|
||||
label: '用户点',
|
||||
},
|
||||
{
|
||||
label: '计算点',
|
||||
},
|
||||
{
|
||||
label: '系统点',
|
||||
},
|
||||
]
|
||||
data() {
|
||||
return {
|
||||
sbpz_sbid: "有线区加工设备1",
|
||||
sbpz_sbmc: "有线区精雕1",
|
||||
sbpz_sbdz: "1",
|
||||
sbpz_jysb: "",
|
||||
sbpz_jdzxz: false,
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
input1: 192,
|
||||
add_passage: false,
|
||||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
options1: [
|
||||
{
|
||||
value: "有线区加工设备1",
|
||||
label: "有线区加工设备1",
|
||||
},
|
||||
{
|
||||
value: "无线区加工设备1",
|
||||
label: "无线区加工设备1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "有线区精雕1",
|
||||
label: "有线区精雕1",
|
||||
},
|
||||
{
|
||||
value: "无线区精雕1",
|
||||
label: "无线区精雕1",
|
||||
},
|
||||
],
|
||||
datas: [
|
||||
{
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
},
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [{
|
||||
label: "Modbus"
|
||||
}]
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client"
|
||||
},
|
||||
{
|
||||
label: "Alink"
|
||||
},
|
||||
{
|
||||
label: "Tlink"
|
||||
},
|
||||
{
|
||||
label: "loTDDC"
|
||||
},
|
||||
{
|
||||
label: "Ulink"
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
rules: {
|
||||
dev_id: [
|
||||
{ required: true, message: '请输入设备ID', trigger: 'blur' },
|
||||
],
|
||||
dev_name: [
|
||||
{ required: true, message: '请输入设备名称', trigger: 'blur' },
|
||||
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
||||
],
|
||||
dev_address: [
|
||||
{ required: true, message: '请输入设备地址', trigger: 'blur' },
|
||||
],
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
dev_id: [{ required: true, message: "请输入设备ID", trigger: "blur" }],
|
||||
dev_name: [
|
||||
{ required: true, message: "请输入设备名称", trigger: "blur" },
|
||||
{ min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
|
||||
],
|
||||
dev_address: [
|
||||
{ required: true, message: "请输入设备地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
mounted() {},
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false
|
||||
this.menuShow = true
|
||||
e.preventDefault() //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + 'px', left: e.pageX + 'px' }
|
||||
document.addEventListener('click', (ev) => {
|
||||
ev.stopImmediatePropagation()
|
||||
if (ev.target !== document.querySelector('.el-menu-item.is-active')) {
|
||||
this.foo()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false
|
||||
document.removeEventListener('click', this.foo) // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo()
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
closeMenu(ev) {
|
||||
console.log({ ev });
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
saveDevice() {
|
||||
this.add_passage = false;
|
||||
this.$router.push("/dbcollect");
|
||||
methods: {
|
||||
rightClick(e, data, node) {
|
||||
this.menuShow = false;
|
||||
this.menuShow = true;
|
||||
e.preventDefault(); //关闭浏览器右键默认事件
|
||||
this.rightMenu = { top: e.pageY + "px", left: e.pageX + "px" };
|
||||
document.addEventListener("click", (ev) => {
|
||||
ev.stopImmediatePropagation();
|
||||
if (ev.target !== document.querySelector(".el-menu-item.is-active")) {
|
||||
this.foo();
|
||||
}
|
||||
});
|
||||
},
|
||||
directives: {
|
||||
'click-outside': {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log('el', el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
if (!(el == event.target || el.contains(event.target))) {
|
||||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == 'function') {
|
||||
vnode.context[binding.expression](event)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener('click', el.event, true)
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener('click', el.event, true)
|
||||
},
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
}
|
||||
},
|
||||
foo() {
|
||||
// 取消鼠标监听事件 菜单栏
|
||||
this.menuShow = false;
|
||||
document.removeEventListener("click", this.foo); // 关掉监听,
|
||||
},
|
||||
treeNodeClick() {
|
||||
this.foo();
|
||||
},
|
||||
getDriveName() {
|
||||
this.diag_drive = true;
|
||||
},
|
||||
closeMenu(ev) {
|
||||
console.log({ ev });
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
saveDevice() {
|
||||
this.add_passage = false;
|
||||
this.$router.push("/dbcollect");
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
"click-outside": {
|
||||
bind: function (el, binding, vnode) {
|
||||
console.log("el", el);
|
||||
console.log("binding", binding);
|
||||
el.event = function (event) {
|
||||
// 检查点击是否发生在节点之内(包括子节点)
|
||||
if (!(el == event.target || el.contains(event.target))) {
|
||||
// 如果没有,则触发调用
|
||||
// 若绑定值为函数,则执行
|
||||
// 这里我们可以通过钩子函数中的 vnode.context,来获取当前组件的作用域
|
||||
if (typeof vnode.context[binding.expression] == "function") {
|
||||
vnode.context[binding.expression](event);
|
||||
}
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为true,代表在DOM树中,注册了该listener的元素,会先于它下方的任何事件目标,接收到该事件。
|
||||
document.body.addEventListener("click", el.event, true);
|
||||
},
|
||||
unbind: function (el) {
|
||||
// 解绑事件
|
||||
document.body.removeEventListener("click", el.event, true);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
.tree_rightmenu {
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
width: 120px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.super_parmams {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 668px;
|
||||
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
i {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .pas_params {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
.el-col-12:last-child {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: left;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 5px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
.el-col-6 {
|
||||
height: 40px;
|
||||
top: 5px;
|
||||
left: 77px;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.super_con {
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
.el-col-12:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,43 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <div> <el-button type="info" plain @click="dialogFormVisible = true">IP设置</el-button></div> -->
|
||||
<el-dialog title="IP设置" :visible.sync="dialogFormVisible" :append-to-body="true" width="894px">
|
||||
<el-dialog
|
||||
title="IP设置"
|
||||
:visible.sync="dialogFormVisible"
|
||||
:append-to-body="true"
|
||||
width="894px"
|
||||
>
|
||||
<div class="form_content">
|
||||
|
||||
<el-form :label-position="labelPosition" label-width="80px" :rules="rules_ippz_wirle" ref="reform">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
label-width="80px"
|
||||
:rules="rules_ippz_wirle"
|
||||
ref="reform"
|
||||
>
|
||||
<div class="wired">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="网口:" :label-width="formLabelWidth" prop="ippz_wangkou">
|
||||
<el-select v-model="ippz_wangkou" placeholder="ETHO" style="width: 200px;height:30px">
|
||||
<el-form-item
|
||||
label="网口:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_wangkou"
|
||||
>
|
||||
<el-select
|
||||
v-model="ippz_wangkou"
|
||||
placeholder="ETHO"
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option label="ETH0" value="ETH0"></el-option>
|
||||
<el-option label="ETH1" value="ETH1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认网关:" :label-width="formLabelWidth" prop="ippz_mrwg">
|
||||
<el-form-item
|
||||
label="默认网关:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mrwg"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg1"></el-input></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
|
|
@ -32,7 +53,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="子网掩码:" :label-width="formLabelWidth" prop="ippz_zwym">
|
||||
<el-form-item
|
||||
label="子网掩码:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_zwym"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_zwym1"></el-input>
|
||||
|
|
@ -53,23 +78,26 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="IP地址:" :label-width="formLabelWidth" prop="ippz_ip">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.
|
||||
<el-input v-model="ippz_ip1" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip2"></el-input>
|
||||
<el-input v-model="ippz_ip2" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip3"></el-input>
|
||||
<el-input v-model="ippz_ip3" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip4"></el-input>
|
||||
<el-input v-model="ippz_ip4" maxlength="3"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -77,7 +105,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="首选DNS:" :label-width="formLabelWidth" prop="ippz_dns_sx">
|
||||
<el-form-item
|
||||
label="首选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_sx"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_sx1"></el-input>
|
||||
|
|
@ -98,13 +130,16 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备选DNS:" :label-width="formLabelWidth" prop="ippz_dns_by">
|
||||
<el-form-item
|
||||
label="备选DNS:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_dns_by"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by2"></el-input>
|
||||
</el-col>
|
||||
|
|
@ -122,11 +157,20 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="MAC地址:" :label-width="formLabelWidth" prop="ippz_mac">
|
||||
<el-form-item
|
||||
label="MAC地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_mac"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24" class="mac">
|
||||
<el-input style="width: 200px;height:30px" v-model="ippz_mac"></el-input><el-button
|
||||
v-copy="ippz_mac" @click="CopyText">复制</el-button>
|
||||
<el-input
|
||||
style="width: 200px; height: 30px"
|
||||
v-model="ippz_mac"
|
||||
></el-input
|
||||
><el-button v-copy="ippz_mac" @click="CopyText"
|
||||
>复制</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -138,7 +182,6 @@
|
|||
<div slot="footer" class="dialog-footer footer">
|
||||
<el-button type="primary" @click="saveAll">保 存</el-button>
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -148,12 +191,13 @@
|
|||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "../api/user";
|
||||
export default {
|
||||
name: 'DataView',
|
||||
name: "DataView",
|
||||
data() {
|
||||
return {
|
||||
disabled: true,
|
||||
// 判断是否保存过
|
||||
isSaveAnswer: false,
|
||||
//
|
||||
|
||||
//
|
||||
formdata: {
|
||||
ippz_wangkou: "",
|
||||
ippz_zwym: "2",
|
||||
|
|
@ -196,11 +240,11 @@ export default {
|
|||
ippz_wifi_mm: "",
|
||||
ippz_lwfs: "1",
|
||||
dialogFormVisible: true,
|
||||
formLabelWidth: '100px',
|
||||
formLabelWidth: "100px",
|
||||
// 有线的规则校验
|
||||
rules_ippz_wirle: {
|
||||
ippz_wangkou: [
|
||||
{ required: true, message: '请输入网口', trigger: 'change' },
|
||||
{ required: true, message: "请输入网口", trigger: "change" },
|
||||
],
|
||||
ippz_zwym: [
|
||||
{ required: true, message: '请输入子网掩码', trigger: 'blur' },
|
||||
|
|
@ -210,6 +254,7 @@ export default {
|
|||
{ required: true, message: '请输入IP地址', trigger: 'blur' },
|
||||
{ type: 'number', message: '子网掩码必须为数字值'}
|
||||
],
|
||||
ippz_ip: [{ required: true, message: "请输入IP地址", trigger: "blur" }],
|
||||
ippz_mrwg: [
|
||||
{ required: true, message: '请输入默认网关', trigger: 'blur' },
|
||||
{ type: 'number', message: '默认网关必须为数字值'}
|
||||
|
|
@ -228,22 +273,30 @@ export default {
|
|||
},
|
||||
rules_ippz_wifi: {
|
||||
ippz_wifi_ssid: [
|
||||
{ required: true, message: '请输入SSID', trigger: 'blur' },
|
||||
{ required: true, message: "请输入SSID", trigger: "blur" },
|
||||
],
|
||||
ippz_wifi_mm: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
],
|
||||
ippz_dns_sx: [
|
||||
{ required: true, message: '请输入首选DNS', trigger: 'blur' },
|
||||
{ required: true, message: "请输入首选DNS", trigger: "blur" },
|
||||
],
|
||||
ippz_dns_by: [
|
||||
{ required: true, message: '请输入备选DNS', trigger: 'blur' },
|
||||
{ required: true, message: "请输入备选DNS", trigger: "blur" },
|
||||
],
|
||||
ippz_mac: [
|
||||
{ required: true, message: '请输入MAC地址', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isSaveButtonDisabled() {
|
||||
return (
|
||||
!this.$refs.rules_ippz_wirle ||
|
||||
this.$refs.rules_ippz_wirle.validateSync().length > 0
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 封装合并输入框的数据
|
||||
|
|
@ -261,27 +314,57 @@ export default {
|
|||
this.dialogFormVisible = false;
|
||||
this.isSaveAnswer = true;
|
||||
this.formdata.ippz_wangkou = this.ippz_wangkou;
|
||||
this.formdata.ippz_ip = this.Merge(this.ippz_ip, this.ippz_ip1, this.ippz_ip2, this.ippz_ip3, this.ippz_ip4);
|
||||
this.formdata.ippz_zwym = this.Merge(this.ippz_zwym, this.ippz_zwym1, this.ippz_zwym2, this.ippz_zwym3, this.ippz_zwym4);
|
||||
this.formdata.ippz_mrwg = this.Merge(this.ippz_mrwg, this.ippz_mrwg1, this.ippz_mrwg2, this.ippz_mrwg3, this.ippz_mrwg4);
|
||||
this.formdata.ippz_dns_sx = this.Merge(this.ippz_dns_sx, this.ippz_dns_sx1, this.ippz_dns_sx2, this.ippz_dns_sx3, this.ippz_dns_sx4);
|
||||
this.formdata.ippz_dns_by = this.Merge(this.ippz_dns_by, this.ippz_dns_by1, this.ippz_dns_by2, this.ippz_dns_by3, this.ippz_dns_by4);
|
||||
this.formdata.ippz_ip = this.Merge(
|
||||
this.ippz_ip,
|
||||
this.ippz_ip1,
|
||||
this.ippz_ip2,
|
||||
this.ippz_ip3,
|
||||
this.ippz_ip4
|
||||
);
|
||||
this.formdata.ippz_zwym = this.Merge(
|
||||
this.ippz_zwym,
|
||||
this.ippz_zwym1,
|
||||
this.ippz_zwym2,
|
||||
this.ippz_zwym3,
|
||||
this.ippz_zwym4
|
||||
);
|
||||
this.formdata.ippz_mrwg = this.Merge(
|
||||
this.ippz_mrwg,
|
||||
this.ippz_mrwg1,
|
||||
this.ippz_mrwg2,
|
||||
this.ippz_mrwg3,
|
||||
this.ippz_mrwg4
|
||||
);
|
||||
this.formdata.ippz_dns_sx = this.Merge(
|
||||
this.ippz_dns_sx,
|
||||
this.ippz_dns_sx1,
|
||||
this.ippz_dns_sx2,
|
||||
this.ippz_dns_sx3,
|
||||
this.ippz_dns_sx4
|
||||
);
|
||||
this.formdata.ippz_dns_by = this.Merge(
|
||||
this.ippz_dns_by,
|
||||
this.ippz_dns_by1,
|
||||
this.ippz_dns_by2,
|
||||
this.ippz_dns_by3,
|
||||
this.ippz_dns_by4
|
||||
);
|
||||
this.formdata.ippz_mac = this.ippz_mac;
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.formdata));
|
||||
let data = {
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata)
|
||||
}
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
};
|
||||
let res1 = await SaveUserAnswer(data);
|
||||
console.log(res1);
|
||||
},
|
||||
CopyText() {
|
||||
this.$message({
|
||||
message: '复制成功',
|
||||
type: 'success'
|
||||
message: "复制成功",
|
||||
type: "success",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let res2 = await GetUserAnswer({
|
||||
|
|
@ -319,40 +402,38 @@ export default {
|
|||
this.ippz_dns_by3 = this.SliceData(this.ippz_dns_by)[2];
|
||||
this.ippz_dns_by4 = this.SliceData(this.ippz_dns_by)[3];
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
directives: {
|
||||
copy: {
|
||||
bind(el, { value }) {
|
||||
// 给元素赋值一个$value值,即指令绑定的值
|
||||
el.$value = value
|
||||
el.$value = value;
|
||||
el.handler = () => {
|
||||
// 如果可复制的值为空的时候,给出提示;
|
||||
if (!el.$value) {
|
||||
console.log('无复制内容')
|
||||
return
|
||||
console.log("无复制内容");
|
||||
return;
|
||||
}
|
||||
// 动态创建 textarea 标签
|
||||
const textarea = document.createElement('textarea');
|
||||
const textarea = document.createElement("textarea");
|
||||
// 将该 textarea 设为 readonly 防止 IOS 下自动唤起键盘,同时将 textarea 移除可视区域
|
||||
textarea.readOnly = 'readonly';
|
||||
textarea.style.position = 'absolute';
|
||||
textarea.style.left = '-9999px';
|
||||
textarea.readOnly = "readonly";
|
||||
textarea.style.position = "absolute";
|
||||
textarea.style.left = "-9999px";
|
||||
// 将要copy的值赋值给textarea 标签的value属性
|
||||
textarea.value = el.$value;
|
||||
// 将textarea 插入到body中
|
||||
document.body.appendChild(textarea);
|
||||
// 选中值并复制
|
||||
textarea.select()
|
||||
const result = document.execCommand('Copy');
|
||||
textarea.select();
|
||||
const result = document.execCommand("Copy");
|
||||
if (result) {
|
||||
console.log('复制成功');
|
||||
console.log("复制成功");
|
||||
}
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
};
|
||||
// 绑定点击事件,点击的时候copy值
|
||||
el.addEventListener('click', el.handler);
|
||||
el.addEventListener("click", el.handler);
|
||||
},
|
||||
// 当传递进来的值更新的时候触发
|
||||
componentUpdated(el, { value }) {
|
||||
|
|
@ -360,11 +441,11 @@ export default {
|
|||
},
|
||||
// 指令与元素解绑的时候,移除事件绑定
|
||||
unbind(el) {
|
||||
el.removeEventListener('click', el.handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
el.removeEventListener("click", el.handler);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
|
|
@ -12,40 +12,59 @@
|
|||
<el-button>筛选</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="wgpz" border style="margin-top: 10px" tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange" :cell-style="cellStyle">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="wgpz"
|
||||
border
|
||||
style="margin-top: 10px; width: 100%"
|
||||
tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange"
|
||||
:cell-style="cellStyle"
|
||||
>
|
||||
<el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column prop="wgid" label="网关ID" > </el-table-column>
|
||||
<el-table-column prop="wgid" label="网关ID"> </el-table-column>
|
||||
<el-table-column prop="wgbh" label="网关编号"> </el-table-column>
|
||||
<el-table-column prop="wgmc" label="网关名称"> </el-table-column>
|
||||
<el-table-column prop="wglx" label="网关类型"> </el-table-column>
|
||||
<el-table-column prop="whr" label="维护人"> </el-table-column>
|
||||
<el-table-column prop="whsj" label="维护时间"> </el-table-column>
|
||||
<el-table-column prop="wgzt" label="网关状态"> </el-table-column>
|
||||
<el-table-column prop="zxxtsj" label="最新心跳时间"> </el-table-column>
|
||||
<el-table-column label="修改">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="详细">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small">查看</el-button>
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="参数配置">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small">参数配置</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="$router.push('/ntmaintenance')"
|
||||
>参数配置</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="新建网关" :visible.sync="flag" width="30%">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="网关类型:" prop="wglx">
|
||||
<el-col :span="12">
|
||||
<el-select v-model="ruleForm.wglx">
|
||||
|
|
@ -141,7 +160,9 @@ export default {
|
|||
wglx: [
|
||||
{ required: true, trigger: "change", message: "请选择一个选项" },
|
||||
],
|
||||
wgid: [{ required: true, trigger: "change", message: "请选择一个选项" }],
|
||||
wgid: [
|
||||
{ required: true, trigger: "change", message: "请选择一个选项" },
|
||||
],
|
||||
wgbh: [
|
||||
{ required: true, trigger: "change", message: "请选择一个选项" },
|
||||
],
|
||||
|
|
@ -152,7 +173,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange() { },
|
||||
handleSelectionChange() {},
|
||||
cellStyle({ row, column }) {
|
||||
if (column.property === "status") {
|
||||
if (row.status === "离线") {
|
||||
|
|
@ -168,20 +189,20 @@ export default {
|
|||
if (this.FormData.length < 4) {
|
||||
this.FormData.push(this.ruleForm);
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
message: "添加成功",
|
||||
type: "success",
|
||||
});
|
||||
console.log(this.FormData);
|
||||
} else {
|
||||
this.$message({
|
||||
message: '抱歉,只能添加四条数据',
|
||||
type: 'error'
|
||||
message: "抱歉,只能添加四条数据",
|
||||
type: "error",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.title {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">网关维护</el-button> -->
|
||||
<el-dialog title="网关维护" :visible.sync="dialogVisible" :append-to-body="true">
|
||||
<el-dialog
|
||||
title="网关维护"
|
||||
:visible.sync="dialogVisible"
|
||||
:append-to-body="true"
|
||||
>
|
||||
<div class="title">
|
||||
<div class="left">
|
||||
<el-button @click="flag = true">新增参数</el-button>
|
||||
|
|
@ -12,44 +16,56 @@
|
|||
<el-button>筛选</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="tableData" border style="margin-top: 10px" tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange" :cell-style="cellStyle">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
style="margin-top: 10px"
|
||||
tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange"
|
||||
:cell-style="cellStyle"
|
||||
>
|
||||
<el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column prop="wgsn" label="网关SN" > </el-table-column>
|
||||
<el-table-column prop="wgsn" label="网关SN"> </el-table-column>
|
||||
<el-table-column prop="wgbh" label="网关编号"> </el-table-column>
|
||||
<el-table-column prop="wgmc" label="网关名称"> </el-table-column>
|
||||
<el-table-column prop="cskey" label="参数Key"> </el-table-column>
|
||||
<el-table-column prop="csmc" label="参数名称"> </el-table-column>
|
||||
<el-table-column prop="xsws" label="小数位数"> </el-table-column>
|
||||
<el-table-column prop="sdz" label="设定值"> </el-table-column>
|
||||
<el-table-column prop="pcz" label="偏差值">
|
||||
</el-table-column>
|
||||
<el-table-column prop="pcz" label="偏差值"> </el-table-column>
|
||||
<el-table-column prop="whr" label="维护人"> </el-table-column>
|
||||
<el-table-column prop="whsj" label="维护时间"> </el-table-column>
|
||||
<el-table-column prop="sfyxbz" label="是否运行标识">
|
||||
</el-table-column>
|
||||
<el-table-column prop="sfbjbz" label="是否报警标识">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="修改">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="详细">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small">查看</el-button>
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="新增参数" :visible.sync="flag" width="30%">
|
||||
<el-col :span="12">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-form-item label="所属网关:" prop="sswg" class="red">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="所属网关:" prop="sswg">
|
||||
<el-select v-model="ruleForm.sswg">
|
||||
<el-option label="lan-box1" value="lan-box1"></el-option>
|
||||
<el-option label="lan-box2" value="lan-box2"></el-option>
|
||||
|
|
@ -65,7 +81,7 @@
|
|||
></el-option> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数名称:" prop="csname" class="red">
|
||||
<el-form-item label="参数名称:" prop="csname">
|
||||
<el-select v-model="ruleForm.csname">
|
||||
<el-option label="产量" value="产量"></el-option>
|
||||
<el-option label="主轴转速" value="主轴转速"></el-option>
|
||||
|
|
@ -75,26 +91,39 @@
|
|||
<el-option label="额定电流" value="额定电流"></el-option> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否运行标识:" prop="sfyxbs">
|
||||
<el-select v-model="ruleForm.sfyxbs">
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设定值:" prop="sdz">
|
||||
<el-input v-model="ruleForm.sdz"> </el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-form-item label="参数key:" prop="cskey" class="red">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="参数key:" prop="cskey">
|
||||
<el-select v-model="ruleForm.cskey">
|
||||
<el-option label="MachinePamHID910" value="MachinePamHID910"></el-option>
|
||||
<el-option label="MachinePamHID917" value="MachinePamHID917"></el-option>
|
||||
<el-option label="MachinePamHID909" value="MachinePamHID909"></el-option>
|
||||
<el-option label="MachinePamHID928" value="MachinePamHID928"></el-option>
|
||||
<el-option
|
||||
label="MachinePamHID910"
|
||||
value="MachinePamHID910"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="MachinePamHID917"
|
||||
value="MachinePamHID917"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="MachinePamHID909"
|
||||
value="MachinePamHID909"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="MachinePamHID928"
|
||||
value="MachinePamHID928"
|
||||
></el-option>
|
||||
<!-- <el-option
|
||||
label="MachinePamHID923"
|
||||
value="MachinePamHID923"
|
||||
|
|
@ -108,12 +137,6 @@
|
|||
<el-form-item label="小数位数:" prop="xsws">
|
||||
<el-input v-model="ruleForm.xsws"> </el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否报警标识:" prop="sfbjbz">
|
||||
<el-select v-model="ruleForm.sfbjbz">
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="偏差值:" prop="pcz">
|
||||
<el-input v-model="ruleForm.pcz"> </el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -145,8 +168,6 @@ export default {
|
|||
pcz: "",
|
||||
whr: "",
|
||||
whsj: "",
|
||||
sfyxbz: "",
|
||||
sfbjbz: "",
|
||||
},
|
||||
],
|
||||
ruleForm: {
|
||||
|
|
@ -156,7 +177,6 @@ export default {
|
|||
sdz: "",
|
||||
cskey: "",
|
||||
xsws: "",
|
||||
sfbjbz: "",
|
||||
pcz: "",
|
||||
},
|
||||
FormData: [],
|
||||
|
|
@ -170,23 +190,21 @@ export default {
|
|||
sfyxbz: [
|
||||
{ required: true, trigger: "change", message: "请选择一个选项" },
|
||||
],
|
||||
sdz: [
|
||||
{ required: true, trigger: "blur", message: "设定值是必填参数" },
|
||||
sdz: [{ required: true, trigger: "blur", message: "设定值是必填参数" }],
|
||||
cskey: [
|
||||
{ required: true, trigger: "change", message: "请选择一个选项" },
|
||||
],
|
||||
cskey: [{ required: true, trigger: "change", message: "请选择一个选项" }],
|
||||
xsws: [
|
||||
{ required: true, trigger: "blur", message: "小数位数是必填参数" },
|
||||
],
|
||||
sfbjbz: [{ required: true, trigger: "change", message: "请选择一个选项" }],
|
||||
pcz: [
|
||||
{ required: true, trigger: "blur", message: "偏差值是必填参数" },
|
||||
],
|
||||
|
||||
pcz: [{ required: true, trigger: "blur", message: "偏差值是必填参数" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() { },
|
||||
created() {},
|
||||
methods: {
|
||||
handleSelectionChange() { },
|
||||
handleSelectionChange() {},
|
||||
cellStyle({ row, column }) {
|
||||
if (column.property === "open") {
|
||||
if (row.open === "是") {
|
||||
|
|
@ -208,14 +226,14 @@ export default {
|
|||
if (this.FormData.length < 4) {
|
||||
this.FormData.push(this.ruleForm);
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
message: "添加成功",
|
||||
type: "success",
|
||||
});
|
||||
console.log(this.FormData);
|
||||
} else {
|
||||
this.$message({
|
||||
message: '抱歉,只能添加四条数据',
|
||||
type: 'error'
|
||||
message: "抱歉,只能添加四条数据",
|
||||
type: "error",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,20 @@
|
|||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">ip配置</el-button> -->
|
||||
<el-dialog title="IP配置" :visible.sync="dialogVisible" width="30%">
|
||||
<p class="txt">本页面涉及排错,请检查修改默认值</p>
|
||||
<div class="ip_setting">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="140px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="IP获取方式" prop="ippz_ip_hqfs">
|
||||
<el-select v-model="ruleForm.ippz_ip_hqfs" style="width:200px">
|
||||
<el-select v-model="ruleForm.ippz_ip_hqfs" style="width: 200px">
|
||||
<el-option label="Static IP" value="Static IP"></el-option>
|
||||
<el-option label="DHCP" value="DHCP"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -19,7 +26,10 @@
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="DNS获取方式" prop="ippz_dns_hqfs">
|
||||
<el-select v-model="ruleForm.ippz_dns_hqfs" style="width:200px">
|
||||
<el-select
|
||||
v-model="ruleForm.ippz_dns_hqfs"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option label="自动获取" value="自动获取"></el-option>
|
||||
<el-option label="手动设定" value="手动设定"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -144,7 +154,9 @@
|
|||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false">保存</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
|
@ -327,8 +339,17 @@ export default {
|
|||
}
|
||||
|
||||
.el-col-24 {
|
||||
padding-right: 152px
|
||||
padding-right: 152px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-dialog {
|
||||
position: relative;
|
||||
}
|
||||
.txt {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
left: 100px;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,24 @@
|
|||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">网络管理</el-button> -->
|
||||
|
||||
<el-dialog title="网络管理" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">
|
||||
<el-dialog
|
||||
title="网络管理"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<h3>内网网卡</h3>
|
||||
<el-divider></el-divider>
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column prop="wlgl_nw_name" label="网卡名称">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.wlgl_nw_name" placeholder="">
|
||||
<el-option v-for="item in options1" :key="item" :label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
|
|
@ -57,8 +67,8 @@
|
|||
<el-input v-model="wlgl_nw_zwym4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template></el-table-column>
|
||||
</div> </template
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
<h3>外网网卡</h3>
|
||||
<el-divider></el-divider>
|
||||
|
|
@ -66,7 +76,12 @@
|
|||
<el-table-column prop="wlgl_ww_name" label="网卡名称">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.wlgl_ww_name" placeholder="">
|
||||
<el-option v-for="item in options1" :key="item" :label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
|
|
@ -119,7 +134,9 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false">保存</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
|
@ -129,22 +146,22 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
wlgl_nw_ip1:"192",
|
||||
wlgl_nw_ip2:"168",
|
||||
wlgl_nw_ip3:"1",
|
||||
wlgl_nw_ip4:"1",
|
||||
wlgl_nw_zwym1:'255',
|
||||
wlgl_nw_zwym2:"255",
|
||||
wlgl_nw_zwym3:"255",
|
||||
wlgl_nw_zwym4:"0",
|
||||
wlgl_ww_ip1:'',
|
||||
wlgl_ww_ip2:'',
|
||||
wlgl_ww_ip3:'',
|
||||
wlgl_ww_ip4:'',
|
||||
wlgl_ww_zwym1:"",
|
||||
wlgl_ww_zwym2:"",
|
||||
wlgl_ww_zwym3:"",
|
||||
wlgl_ww_zwym4:"",
|
||||
wlgl_nw_ip1: "192",
|
||||
wlgl_nw_ip2: "168",
|
||||
wlgl_nw_ip3: "1",
|
||||
wlgl_nw_ip4: "1",
|
||||
wlgl_nw_zwym1: "255",
|
||||
wlgl_nw_zwym2: "255",
|
||||
wlgl_nw_zwym3: "255",
|
||||
wlgl_nw_zwym4: "0",
|
||||
wlgl_ww_ip1: "",
|
||||
wlgl_ww_ip2: "",
|
||||
wlgl_ww_ip3: "",
|
||||
wlgl_ww_ip4: "",
|
||||
wlgl_ww_zwym1: "",
|
||||
wlgl_ww_zwym2: "",
|
||||
wlgl_ww_zwym3: "",
|
||||
wlgl_ww_zwym4: "",
|
||||
options1: [
|
||||
{
|
||||
label: "有线区网闸(内网)",
|
||||
|
|
@ -206,7 +223,7 @@ export default {
|
|||
}
|
||||
|
||||
.el-col-24 {
|
||||
padding-right: 152px
|
||||
padding-right: 152px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">对象管理</el-button> -->
|
||||
<el-dialog title="对象管理" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
|
||||
<el-dialog
|
||||
title="对象管理"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="title">
|
||||
<el-button style="margin-bottom: 10px" @click="dialogVisible1 = true"
|
||||
>新增对象</el-button
|
||||
>
|
||||
<p v-if="dxgl.length == 2">只能添加两条数据</p>
|
||||
</div>
|
||||
|
||||
<el-button style="margin-bottom: 10px" @click="dialogVisible1 = true">新增对象</el-button>
|
||||
<el-table :data="dxgl" style="width: 100%" border>
|
||||
<el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -14,31 +24,50 @@
|
|||
<el-table-column prop="address" label="IP地址信息"> </el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
|
||||
<el-button @click="handleClick(scope.row)" type="text" size="small"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="新增对象" :visible.sync="dialogVisible1" width="30%" :before-close="handleClose">
|
||||
<el-dialog
|
||||
title="新增对象"
|
||||
:visible.sync="dialogVisible1"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="ip_address">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="IP类型:" prop="iplx">
|
||||
<el-col :span="10">
|
||||
<el-select v-model="ruleForm.iplx" style="width:200px">
|
||||
<el-select v-model="ruleForm.iplx" style="width: 200px">
|
||||
<el-option label="IP4" value="IP4"></el-option>
|
||||
<el-option label="IP6" value="IP6"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="对象名称:" prop="dx_name">
|
||||
<el-form-item label="对象名称:" prop="dxmc">
|
||||
<el-col :span="10">
|
||||
<el-select v-model="ruleForm.dx_name" style="width:200px">
|
||||
<el-option label="有线区交换机" value="有线区交换机"></el-option>
|
||||
<el-option label="无线区路由器" value="无线区路由器"></el-option>
|
||||
<el-select v-model="ruleForm.dxmc" style="width: 200px">
|
||||
<el-option
|
||||
label="有线区交换机"
|
||||
value="有线区交换机"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="无线区路由器"
|
||||
value="无线区路由器"
|
||||
></el-option>
|
||||
<el-option label="数采服务器" value="数采服务器"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -70,12 +99,12 @@
|
|||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible1 = false">保存</el-button>
|
||||
<el-button type="primary" @click="dialogVisible1 = false"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -86,27 +115,29 @@ export default {
|
|||
dialogVisible1: false,
|
||||
labelPosition: "left",
|
||||
dxgl: [
|
||||
{
|
||||
dx_name: "",
|
||||
ip: "",
|
||||
},
|
||||
{
|
||||
dx_name: "",
|
||||
ip: "",
|
||||
},
|
||||
// {
|
||||
// dx_name: "",
|
||||
// ip: "",
|
||||
// },
|
||||
// {
|
||||
// dx_name: "",
|
||||
// ip: "",
|
||||
// },
|
||||
],
|
||||
ruleForm: {
|
||||
iplx: "IP4",
|
||||
dxmc: "有线区交换机",
|
||||
ip: "",
|
||||
},
|
||||
rules: {
|
||||
iplx: [{ required: true, trigger: "change" }],
|
||||
dxmc: [{ required: true, trigger: "blur" }],
|
||||
ip: [{ required: true, trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleClick() { },
|
||||
handleClick() {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -136,8 +167,19 @@ export default {
|
|||
}
|
||||
|
||||
.el-col-24 {
|
||||
padding-right: 152px
|
||||
padding-right: 152px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-table--enable-row-hover .el-table__body tr:hover > td {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-left: 20px;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@
|
|||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">策略管理</el-button> -->
|
||||
<el-dialog title="策略管理" :visible.sync="dialogVisible" width="50%">
|
||||
<el-button style="margin-bottom: 10px" @click="addPolicy"
|
||||
>新增策略</el-button
|
||||
>
|
||||
<div class="title">
|
||||
<el-button style="margin-bottom: 10px" @click="addPolicy"
|
||||
>新增策略</el-button
|
||||
>
|
||||
<p v-if="tableData.length == 2">只能添加两条数据</p>
|
||||
</div>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -187,22 +191,22 @@ export default {
|
|||
dialogVisible: true,
|
||||
labelPosition: "left",
|
||||
tableData: [
|
||||
{
|
||||
clgl_name: "",
|
||||
cmdlist_qsdz: "",
|
||||
clgl_xy: "",
|
||||
clgl_gzms: "",
|
||||
clgl_ydx: "",
|
||||
clgl_ydk: "",
|
||||
clgl_rkwk: "",
|
||||
clgl_rkip: "",
|
||||
clgl_rkwg: "",
|
||||
clgl_ckwk: "",
|
||||
clgl_ckip: "",
|
||||
clgl_ckwg: "",
|
||||
clgl_mddx: "",
|
||||
clgl_mddk: "",
|
||||
},
|
||||
// {
|
||||
// clgl_name: "",
|
||||
// cmdlist_qsdz: "",
|
||||
// clgl_xy: "",
|
||||
// clgl_gzms: "",
|
||||
// clgl_ydx: "",
|
||||
// clgl_ydk: "",
|
||||
// clgl_rkwk: "",
|
||||
// clgl_rkip: "",
|
||||
// clgl_rkwg: "",
|
||||
// clgl_ckwk: "",
|
||||
// clgl_ckip: "",
|
||||
// clgl_ckwg: "",
|
||||
// clgl_mddx: "",
|
||||
// clgl_mddk: "",
|
||||
// },
|
||||
],
|
||||
tableData1: [
|
||||
{
|
||||
|
|
@ -312,4 +316,12 @@ export default {
|
|||
height: 30px;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-left: 10px;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@
|
|||
@node-click="treeNodeClick"></el-tree>
|
||||
<!-- 树形控件右键组件 -->
|
||||
<div v-show="menuShow" class="tree_rightmenu" :style="{ ...rightMenu }">
|
||||
|
||||
<el-menu class="el-menu-vertical-demo" @select="selectMenuNode" default-active="#0078FE">
|
||||
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px;">
|
||||
<el-menu
|
||||
class="el-menu-vertical-demo"
|
||||
@select="selectMenuNode"
|
||||
default-active="#0078FE"
|
||||
>
|
||||
<el-menu-item id="menuitem" index="1" style="font-size: 12px">
|
||||
<span slot="title">新建通道</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" style="font-size: 12px;">
|
||||
<el-menu-item index="2" style="font-size: 12px">
|
||||
<span slot="title">取 消</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
|
@ -23,12 +25,30 @@
|
|||
</div>
|
||||
<div class="pas_params">
|
||||
<el-dialog title="通道参数设置" :visible.sync="add_passage" width="765px">
|
||||
<el-form :model="FormData" :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-form
|
||||
:model="FormData"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通道名称:" :label-width="formLabelWidth" prop="tdpz_tdmc">
|
||||
<el-select v-model="FormData.tdpz_tdmc" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="(item, index) in options1" :key="index" :label="item.label" :value="item.value">
|
||||
<el-form-item
|
||||
label="通道名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_tdmc"
|
||||
>
|
||||
<el-select
|
||||
v-model="FormData.tdpz_tdmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options1"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -36,22 +56,46 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通道:" :label-width="formLabelWidth" prop="tdpz_td">
|
||||
<el-select v-model="FormData.tdpz_td" placeholder="" style="width: 200px;height:30px">
|
||||
<el-option v-for="(item, index) in options2" :key="index" :label="item.label" :value="item.value">
|
||||
<el-form-item
|
||||
label="通道:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_td"
|
||||
>
|
||||
<el-select
|
||||
v-model="FormData.tdpz_td"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="驱动名称:" :label-width="formLabelWidth" prop="tdpz_qdmc">
|
||||
<el-form-item
|
||||
label="驱动名称:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_qdmc"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="FormData.tdpz_qdmc" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_qdmc"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button style="width: 50px; height: 30px;" @click="getDriveName">...</el-button>
|
||||
<el-button
|
||||
style="width: 50px; height: 30px"
|
||||
@click="getDriveName"
|
||||
>...</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -59,23 +103,38 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="IP地址:" :label-width="formLabelWidth" prop="tdpz_ip">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="tdpz_ip1" style="width: 43px;height:30px"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.
|
||||
<el-input
|
||||
v-model="tdpz_ip1"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="tdpz_ip2" style="width: 43px;height:30px"></el-input>
|
||||
<el-input
|
||||
v-model="tdpz_ip2"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="tdpz_ip3" style="width: 43px;height:30px"></el-input>
|
||||
<el-input
|
||||
v-model="tdpz_ip3"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="tdpz_ip4" style="width: 43px;height:30px"></el-input>
|
||||
<el-input
|
||||
v-model="tdpz_ip4"
|
||||
style="width: 43px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -83,32 +142,72 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="端口号:" :label-width="formLabelWidth" prop="tdpz_port">
|
||||
<el-input v-model="FormData.tdpz_port" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
<el-form-item
|
||||
label="端口号:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_port"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_port"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="超过时间(ms):" :label-width="formLabelWidth" prop="tdpz_cssj">
|
||||
<el-input v-model="FormData.tdpz_cssj" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
<el-form-item
|
||||
label="超过时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_cssj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_cssj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="间隔时间(ms):" :label-width="formLabelWidth" prop="tdpz_jgsj">
|
||||
<el-input v-model="FormData.tdpz_jgsj" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
<el-form-item
|
||||
label="间隔时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_jgsj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_jgsj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="轮询时间(ms):" :label-width="formLabelWidth" prop="tdpz_lxsj">
|
||||
<el-input v-model="FormData.tdpz_lxsj" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
<el-form-item
|
||||
label="轮询时间(ms):"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_lxsj"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_lxsj"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="重复次数:" :label-width="formLabelWidth" prop="tdpz_cfcs">
|
||||
<el-input v-model="FormData.tdpz_cfcs" placeholder="" style="width: 200px;height:30px"></el-input>
|
||||
<el-form-item
|
||||
label="重复次数:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="tdpz_cfcs"
|
||||
>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_cfcs"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -118,24 +217,47 @@
|
|||
<div>
|
||||
<i class="el-icon-caret-bottom" v-if="is_retract"></i>
|
||||
<i class="el-icon-caret-top" v-else="is_retract"></i>
|
||||
<el-button type="text" plain @click="getRetract" style="width: 28px;
|
||||
border:none;color: rgba(16, 16, 16, 1);font-size: 14px;text-align: left;">
|
||||
收起</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
plain
|
||||
@click="getRetract"
|
||||
style="
|
||||
width: 28px;
|
||||
border: none;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
"
|
||||
>
|
||||
收起</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="super_con" v-show="is_retract">
|
||||
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-form
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="FormData.tdpz_watchtime">watch time(s)</el-checkbox>
|
||||
<el-input v-model="input1" placeholder="" style="width: 200px;height:30px"
|
||||
:disabled="isdisabled"></el-input>
|
||||
<el-checkbox v-model="FormData.tdpz_watchtime"
|
||||
>watch time(s)</el-checkbox
|
||||
>
|
||||
<el-input
|
||||
v-model="input1"
|
||||
placeholder=""
|
||||
style="width: 200px; height: 30px"
|
||||
:disabled="isdisabled"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="FormData.tdpz_cjsylxdz">采集使用连续地址</el-checkbox>
|
||||
<el-checkbox v-model="FormData.tdpz_cjsylxdz"
|
||||
>采集使用连续地址</el-checkbox
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -144,12 +266,17 @@
|
|||
<el-form-item label="读写占空比:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="FormData.tdpz_dxzkb1" style="width: 91px;height:30px"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">:
|
||||
<el-input
|
||||
v-model="FormData.tdpz_dxzkb1"
|
||||
style="width: 91px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">: </el-col>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="FormData.tdpz_dxzkb2" style="width: 91px;height:30px"></el-input>
|
||||
<el-input
|
||||
v-model="FormData.tdpz_dxzkb2"
|
||||
style="width: 91px; height: 30px"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -159,18 +286,42 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item label="05/0F:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="8"><el-radio v-model="FormData.tdpz_050F" label="auto">auto</el-radio></el-col>
|
||||
<el-col :span="8"><el-radio v-model="FormData.tdpz_050F" label="05">05</el-radio></el-col>
|
||||
<el-col :span="8"><el-radio v-model="FormData.tdpz_050F" label="0F">0F</el-radio></el-col>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="auto"
|
||||
>auto</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="05"
|
||||
>05</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_050F" label="0F"
|
||||
>0F</el-radio
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="06/10:" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-col :span="8"><el-radio v-model="FormData.tdpz_0610" label="auto">auto</el-radio></el-col>
|
||||
<el-col :span="8"><el-radio v-model="FormData.tdpz_0610" label="06">06</el-radio></el-col>
|
||||
<el-col :span="8"><el-radio v-model="FormData.tdpz_0610" label="10">10</el-radio></el-col>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="auto"
|
||||
>auto</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="06"
|
||||
>06</el-radio
|
||||
></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><el-radio v-model="FormData.tdpz_0610" label="10"
|
||||
>10</el-radio
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -180,7 +331,6 @@
|
|||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveGate">保 存</el-button>
|
||||
<el-button @click="add_passage = false">取 消</el-button>
|
||||
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
|
@ -196,7 +346,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from '@/api/user';
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "TestTreeView",
|
||||
|
|
@ -219,21 +369,27 @@ export default {
|
|||
tdpz_ip2: "",
|
||||
tdpz_ip3: "",
|
||||
tdpz_ip4: "",
|
||||
options1: [{
|
||||
value: "有线区Channel1",
|
||||
label: "有线区Channel1",
|
||||
}, {
|
||||
value: "无线区Channel1",
|
||||
label: "无线区Channel1",
|
||||
}],
|
||||
options2: [{
|
||||
value: "网口",
|
||||
label: "网口",
|
||||
}, {
|
||||
value: "串口",
|
||||
label: "串口",
|
||||
}],
|
||||
value1: '有线区Channel1',
|
||||
options1: [
|
||||
{
|
||||
value: "有线区Channel1",
|
||||
label: "有线区Channel1",
|
||||
},
|
||||
{
|
||||
value: "无线区Channel1",
|
||||
label: "无线区Channel1",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "网口",
|
||||
label: "网口",
|
||||
},
|
||||
{
|
||||
value: "串口",
|
||||
label: "串口",
|
||||
},
|
||||
],
|
||||
value1: "有线区Channel1",
|
||||
value2: "网口",
|
||||
diag_drive: false,
|
||||
isdisabled: true,
|
||||
|
|
@ -246,165 +402,170 @@ export default {
|
|||
rightMenu: "",
|
||||
dialogVisible: true,
|
||||
menuShow: false,
|
||||
datas: [{
|
||||
label: 'Gateway',
|
||||
children: [{
|
||||
label: '数据采集',
|
||||
children: [{
|
||||
label: 'I/O点'
|
||||
},
|
||||
{
|
||||
label: '用户点',
|
||||
},
|
||||
{
|
||||
label: '计算点',
|
||||
},
|
||||
{
|
||||
label: '系统点',
|
||||
},
|
||||
]
|
||||
},
|
||||
datas: [
|
||||
{
|
||||
label: "数据服务",
|
||||
children: [{
|
||||
label: "Modbus"
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: "IOT",
|
||||
label: "Gateway",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client"
|
||||
label: "数据采集",
|
||||
children: [
|
||||
{
|
||||
label: "I/O点",
|
||||
},
|
||||
{
|
||||
label: "用户点",
|
||||
},
|
||||
{
|
||||
label: "计算点",
|
||||
},
|
||||
{
|
||||
label: "系统点",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Alink"
|
||||
label: "数据服务",
|
||||
children: [
|
||||
{
|
||||
label: "Modbus",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Tlink"
|
||||
label: "IOT",
|
||||
children: [
|
||||
{
|
||||
label: "Mqtt Client",
|
||||
},
|
||||
{
|
||||
label: "Alink",
|
||||
},
|
||||
{
|
||||
label: "Tlink",
|
||||
},
|
||||
{
|
||||
label: "loTDDC",
|
||||
},
|
||||
{
|
||||
label: "Ulink",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
datas2: [
|
||||
{
|
||||
label: "通用标准",
|
||||
children: [
|
||||
{
|
||||
label: "ModbusTCPClient",
|
||||
},
|
||||
{
|
||||
label: "loTDDC"
|
||||
label: "ModbusRTU_over_TCP",
|
||||
},
|
||||
{
|
||||
label: "Ulink"
|
||||
label: "OPCUAClient",
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}],
|
||||
datas2: [{
|
||||
label: '通用标准',
|
||||
children: [
|
||||
{
|
||||
label: 'ModbusTCPClient',
|
||||
},
|
||||
{
|
||||
label: 'ModbusRTU_over_TCP',
|
||||
},
|
||||
{
|
||||
label: 'OPCUAClient',
|
||||
},
|
||||
{
|
||||
label: 'OPCDAClient',
|
||||
},
|
||||
{
|
||||
label: 'MQTTClient',
|
||||
},
|
||||
{
|
||||
label: "OPCXMLDAClient",
|
||||
},
|
||||
{
|
||||
label: "环保212协议网口监听",
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "PLC",
|
||||
children: [
|
||||
{
|
||||
label: "Slemens S7-200 Network"
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-300 Network"
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-400 Network"
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1200 Network"
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1500 Network"
|
||||
},
|
||||
{
|
||||
label: "EtherNet/IP CIP协议(AB OMR ON)"
|
||||
},
|
||||
{
|
||||
label: "MC_Qna-3E(三菱 基恩士 松下)"
|
||||
},
|
||||
{
|
||||
label: "MC_A-1E_Binary"
|
||||
},
|
||||
{
|
||||
label: "OMRON-FINS"
|
||||
},
|
||||
{
|
||||
label: "横河PLC"
|
||||
},
|
||||
{
|
||||
label: "西门子FetchWirte"
|
||||
},
|
||||
{
|
||||
label: "富机 FUJI_SPH_NET"
|
||||
},
|
||||
{
|
||||
label: "基恩士上位链路通讯"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "智能建筑",
|
||||
children: []
|
||||
},
|
||||
{
|
||||
label: "厂家定制",
|
||||
children: []
|
||||
},
|
||||
{
|
||||
label: "电力行业标准",
|
||||
children: [
|
||||
{
|
||||
label: "IEC104",
|
||||
},
|
||||
{
|
||||
label: "DLT645_over_TCP"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "CNC数控",
|
||||
children: []
|
||||
}, {
|
||||
label: "私有协议",
|
||||
children: []
|
||||
}],
|
||||
{
|
||||
label: "OPCDAClient",
|
||||
},
|
||||
{
|
||||
label: "MQTTClient",
|
||||
},
|
||||
{
|
||||
label: "OPCXMLDAClient",
|
||||
},
|
||||
{
|
||||
label: "环保212协议网口监听",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "PLC",
|
||||
children: [
|
||||
{
|
||||
label: "Slemens S7-200 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-300 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-400 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1200 Network",
|
||||
},
|
||||
{
|
||||
label: "Slemens S7-1500 Network",
|
||||
},
|
||||
{
|
||||
label: "EtherNet/IP CIP协议(AB OMR ON)",
|
||||
},
|
||||
{
|
||||
label: "MC_Qna-3E(三菱 基恩士 松下)",
|
||||
},
|
||||
{
|
||||
label: "MC_A-1E_Binary",
|
||||
},
|
||||
{
|
||||
label: "OMRON-FINS",
|
||||
},
|
||||
{
|
||||
label: "横河PLC",
|
||||
},
|
||||
{
|
||||
label: "西门子FetchWirte",
|
||||
},
|
||||
{
|
||||
label: "富机 FUJI_SPH_NET",
|
||||
},
|
||||
{
|
||||
label: "基恩士上位链路通讯",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "智能建筑",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "厂家定制",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "电力行业标准",
|
||||
children: [
|
||||
{
|
||||
label: "IEC104",
|
||||
},
|
||||
{
|
||||
label: "DLT645_over_TCP",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "CNC数控",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
label: "私有协议",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
rules: {
|
||||
tdpz_tdmc: [
|
||||
{ required: true, message: "请输入通道名称", trigger: "change" },
|
||||
],
|
||||
tdpz_td: [
|
||||
{ required: true, message: "请输入通道", trigger: "change" }
|
||||
],
|
||||
tdpz_td: [{ required: true, message: "请输入通道", trigger: "change" }],
|
||||
tdpz_qdmc: [
|
||||
{ required: true, message: "请输入驱动名称", trigger: "change" },
|
||||
],
|
||||
tdpz_ip: [
|
||||
{ required: true, message: "请输入ip地址", trigger: "blur" },
|
||||
],
|
||||
tdpz_ip: [{ required: true, message: "请输入ip地址", trigger: "blur" }],
|
||||
tdpz_port: [
|
||||
{ required: true, message: "请输入端口号", trigger: "blur" },
|
||||
],
|
||||
|
|
@ -420,7 +581,7 @@ export default {
|
|||
tdpz_cfcs: [
|
||||
{ required: true, message: "请输入重复次数", trigger: "blur" },
|
||||
],
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -470,7 +631,13 @@ export default {
|
|||
this.add_passage = false;
|
||||
this.FormData.tdpz_watchtime = Number(this.FormData.tdpz_watchtime);
|
||||
this.FormData.tdpz_cjsylxdz = Number(this.FormData.tdpz_cjsylxdz);
|
||||
this.FormData.tdpz_ip = this.Merge(this.FormData.tdpz_ip, this.tdpz_ip1, this.tdpz_ip2, this.tdpz_ip3, this.tdpz_ip4)
|
||||
this.FormData.tdpz_ip = this.Merge(
|
||||
this.FormData.tdpz_ip,
|
||||
this.tdpz_ip1,
|
||||
this.tdpz_ip2,
|
||||
this.tdpz_ip3,
|
||||
this.tdpz_ip4
|
||||
);
|
||||
let datas = sessionStorage.getItem("answer");
|
||||
this.FormData = { ...this.FormData, ...JSON.parse(datas) };
|
||||
let res = await SaveUserAnswer({
|
||||
|
|
@ -478,7 +645,7 @@ export default {
|
|||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.FormData),
|
||||
});
|
||||
sessionStorage.setItem('answer', JSON.stringify(this.FormData));
|
||||
sessionStorage.setItem("answer", JSON.stringify(this.FormData));
|
||||
console.log(res);
|
||||
console.log(res.data.data.mark_value);
|
||||
this.$router.push("/dbcollectdevice");
|
||||
|
|
@ -529,7 +696,6 @@ export default {
|
|||
.tree_menu {
|
||||
position: absolute;
|
||||
width: 286px;
|
||||
height: 753px;
|
||||
left: 64px;
|
||||
top: 104px;
|
||||
width: 286px;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,20 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">无线设置</el-button> -->
|
||||
<el-dialog title="无线设置" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-dialog
|
||||
title="无线设置"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="工作模式:" prop="wxpz_gzms">
|
||||
<el-col :span="10">
|
||||
<el-select v-model="ruleForm.wxpz_gzms">
|
||||
|
|
@ -15,8 +26,8 @@
|
|||
<el-form-item label="网络名称:" prop="wxpz_wlmc">
|
||||
<el-col :span="10">
|
||||
<el-select v-model="ruleForm.wxpz_wlmc" placeholder="无线网名称">
|
||||
<el-option label="区域一" value="shanghai"></el-option>
|
||||
<el-option label="区域二" value="beijing"></el-option>
|
||||
<el-option label="无线区无限网" value="shanghai"></el-option>
|
||||
<!-- <el-option label="区域二" value="beijing"></el-option> -->
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -51,7 +62,9 @@
|
|||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false">保存</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
|
@ -65,7 +78,7 @@ export default {
|
|||
labelPosition: "left",
|
||||
ruleForm: {
|
||||
wxpz_gzms: "STA模式",
|
||||
wxpz_wlmc: "",
|
||||
wxpz_wlmc: "无线区无限网",
|
||||
wxpz_mac: "",
|
||||
wxpz_jmms: "WPA2PSK",
|
||||
wxpz_jmsf: "AES",
|
||||
|
|
|
|||
|
|
@ -35,9 +35,18 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="检验位:" prop="ckcssz_jyw">
|
||||
<el-select v-model="ruleForm.ckcssz_jyw" placeholder="请选择检验位">
|
||||
<el-option label="无校验(none)" value="无校验(none)"></el-option>
|
||||
<el-option label="无校验(none)" value="无校验(none)"></el-option>
|
||||
<el-option label="无校验(none)" value="无校验(none)"></el-option>
|
||||
<el-option
|
||||
label="无校验(none)"
|
||||
value="无校验(none)"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="无校验(none)"
|
||||
value="无校验(none)"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="无校验(none)"
|
||||
value="无校验(none)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="流控:" prop="ckcssz_lk">
|
||||
|
|
@ -47,7 +56,10 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="自适应波特率(类RFC2117):" prop="ckcssz_zdybtl">
|
||||
<el-select v-model="ruleForm.ckcssz_zdybtl" placeholder="请选择自适应波特率">
|
||||
<el-select
|
||||
v-model="ruleForm.ckcssz_zdybtl"
|
||||
placeholder="请选择自适应波特率"
|
||||
>
|
||||
<el-option label="开启" value="开启"></el-option>
|
||||
<el-option label="关闭" value="关闭"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -73,7 +85,10 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="485功能:" prop="ckcssz_485">
|
||||
<el-select v-model="ruleForm.ckcssz_485" placeholder="请选择485功能">
|
||||
<el-select
|
||||
v-model="ruleForm.ckcssz_485"
|
||||
placeholder="请选择485功能"
|
||||
>
|
||||
<el-option label="开启" value="开启"></el-option>
|
||||
<el-option label="关闭" value="关闭"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -87,7 +102,7 @@
|
|||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
label-width="200px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
|
|
@ -117,8 +132,10 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
注意:开启后,模块主动向服务器发送注册包,此功能用于辨识设备。
|
||||
first:模块建议时发送注册包,every:每次发送数据时发送注册包
|
||||
<p>
|
||||
注意:开启后,模块主动向服务器发送注册包,此功能用于辨识设备。
|
||||
first:模块建议时发送注册包,every:每次发送数据时发送注册包
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
|
@ -170,6 +187,14 @@ export default {
|
|||
.formOne {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
p {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.demo-ruleForm {
|
||||
width: 50%;
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ const routes = [
|
|||
name: "dbcollectiongate",
|
||||
component: () => import("../views/DbCollectiongate.vue"),
|
||||
},
|
||||
//db网关-数据采集配置-无线网关配置
|
||||
{
|
||||
path: "/dbcollectionwifi",
|
||||
name: "dbcollectionwifi",
|
||||
component: () => import("../views/DbCollectionwifi.vue"),
|
||||
},
|
||||
//db网关-数据采集配置-无线网关配置
|
||||
{
|
||||
path: "/dbcollectionwifi",
|
||||
name: "dbcollectionwifi",
|
||||
component: () => import("../views/DbCollectionwifi.vue"),
|
||||
},
|
||||
// db网关-数据采集配置-网口配置
|
||||
{
|
||||
path: "/channelconfig",
|
||||
|
|
@ -73,7 +73,7 @@ const routes = [
|
|||
name: "dbcollect",
|
||||
component: () => import("../views/DbCollection.vue"),
|
||||
},
|
||||
// db网关-无线-数据采集配置-采集点配置
|
||||
// db网关-无线-数据采集配置-采集点配置
|
||||
{
|
||||
path: "/dbwificollect",
|
||||
name: "dbWificollect",
|
||||
|
|
@ -103,25 +103,25 @@ const routes = [
|
|||
name: "chwiredgatewayip",
|
||||
component: () => import("../views/ChWiredGatewayIP.vue"),
|
||||
},
|
||||
//斥候工业网关-数据采集配置-无线网关配置
|
||||
{
|
||||
path: "/chiwifigate",
|
||||
name: "chiwifigate",
|
||||
component:()=>import("../views/ChWifigate.vue")
|
||||
},
|
||||
|
||||
//斥候工业网关-数据采集配置-无线网关配置
|
||||
{
|
||||
path: "/chiwifigate",
|
||||
name: "chiwifigate",
|
||||
component: () => import("../views/ChWifigate.vue"),
|
||||
},
|
||||
|
||||
//斥候工业网关-数据采集配置-有线网关配置
|
||||
{
|
||||
path: "/gatewayconfiguration",
|
||||
name: "gatewayconfiguration",
|
||||
component: () => import("../views/GatewayConfiguration.vue"),
|
||||
},
|
||||
//斥候无线工业网关-数据采集配置-设备配置
|
||||
{
|
||||
path: "/chiwifidevice",
|
||||
name: "chiwifidevice",
|
||||
component: () => import("../views/ChiWifidevice.vue"),
|
||||
},
|
||||
//斥候无线工业网关-数据采集配置-设备配置
|
||||
{
|
||||
path: "/chiwifidevice",
|
||||
name: "chiwifidevice",
|
||||
component: () => import("../views/ChiWifidevice.vue"),
|
||||
},
|
||||
//斥候有线工业网关-数据采集配置-设备配置
|
||||
{
|
||||
path: "/configuration",
|
||||
|
|
@ -129,24 +129,24 @@ const routes = [
|
|||
component: () => import("../views/Configuration.vue"),
|
||||
},
|
||||
// ChiWificollect
|
||||
//斥候工业有线网关-数据采集配置-采集点配置
|
||||
{
|
||||
path: "/chiwificollect",
|
||||
name: "chiwificollect",
|
||||
component: () => import("../views/ChiWificollect.vue"),
|
||||
},
|
||||
//斥候工业有线网关-数据采集配置-采集点配置
|
||||
{
|
||||
path: "/chiwificollect",
|
||||
name: "chiwificollect",
|
||||
component: () => import("../views/ChiWificollect.vue"),
|
||||
},
|
||||
//斥候工业有线网关-数据采集配置-采集点配置
|
||||
{
|
||||
path: "/collectionpoint",
|
||||
name: "collectionpoint",
|
||||
component: () => import("../views/CollectionPoint.vue"),
|
||||
},
|
||||
//斥候无线工业网关-数据上云配置-MQTT上云
|
||||
{
|
||||
path: "/chiwifimqtt",
|
||||
name: "chiwifimqtt",
|
||||
component: () => import("../views/ChiWifimqtt.vue"),
|
||||
},
|
||||
//斥候无线工业网关-数据上云配置-MQTT上云
|
||||
{
|
||||
path: "/chiwifimqtt",
|
||||
name: "chiwifimqtt",
|
||||
component: () => import("../views/ChiWifimqtt.vue"),
|
||||
},
|
||||
//斥候有线工业网关-数据上云配置-MQTT上云
|
||||
{
|
||||
path: "/chmqtt",
|
||||
|
|
|
|||
|
|
@ -6,42 +6,86 @@
|
|||
<router-link to="/cockpit">驾驶舱</router-link>
|
||||
<!-- <router-link to="/ipsetting">IP设置</router-link> -->
|
||||
<router-link to="/wiredgatewayip">db网关-ip配置-有线网关</router-link>
|
||||
<router-link to="/dbcollectiongate">db有线网关-数据采集配置-有线网关配置</router-link>
|
||||
<router-link to="/channelconfig">db有线网关-数据采集配置-网口通道配置</router-link>
|
||||
<router-link to="/dbcollectdevice">db有线网关-数据采集配置-网口设备配置</router-link>
|
||||
<router-link to="/dbcollect">db有线网关-数据采集配置-网口采集点配置</router-link>
|
||||
<router-link to="/mqttconfig">db有线网关-MQTT上云-网口MQTT1配置</router-link>
|
||||
<router-link to="/dbcollectiongate"
|
||||
>db有线网关-数据采集配置-有线网关配置</router-link
|
||||
>
|
||||
<router-link to="/channelconfig"
|
||||
>db有线网关-数据采集配置-网口通道配置</router-link
|
||||
>
|
||||
<router-link to="/dbcollectdevice"
|
||||
>db有线网关-数据采集配置-网口设备配置</router-link
|
||||
>
|
||||
<router-link to="/dbcollect"
|
||||
>db有线网关-数据采集配置-网口采集点配置</router-link
|
||||
>
|
||||
<router-link to="/mqttconfig"
|
||||
>db有线网关-MQTT上云-网口MQTT1配置</router-link
|
||||
>
|
||||
<!--db无线网关配置 -->
|
||||
<router-link to="/wirelessgatewayip">db网关-ip配置-无线网关</router-link>
|
||||
<router-link to="/dbcollectionwifi">db无线网关-数据采集配置-网关配置配置</router-link>
|
||||
<router-link to="/dbcollectserial">db无线网关-数据采集配置-串口通道配置</router-link>
|
||||
<router-link to="/dbserialdevice">db无线网关-数据采集配置-串口设备配置</router-link>
|
||||
<router-link to="/dbwificollect">db无线网关-数据采集配置-网口采集点配置</router-link>
|
||||
<router-link to="/mqttconfigwifi">db无线网关-MQTT上云-网口MQTT1配置</router-link>
|
||||
<router-link to="/dbcollectionwifi"
|
||||
>db无线网关-数据采集配置-网关配置配置</router-link
|
||||
>
|
||||
<router-link to="/dbcollectserial"
|
||||
>db无线网关-数据采集配置-串口通道配置</router-link
|
||||
>
|
||||
<router-link to="/dbserialdevice"
|
||||
>db无线网关-数据采集配置-串口设备配置</router-link
|
||||
>
|
||||
<router-link to="/dbwificollect"
|
||||
>db无线网关-数据采集配置-网口采集点配置</router-link
|
||||
>
|
||||
<router-link to="/mqttconfigwifi"
|
||||
>db无线网关-MQTT上云-网口MQTT1配置</router-link
|
||||
>
|
||||
</div>
|
||||
<div class="chihou" style="background-color: aqua; height: 100px">
|
||||
<router-link to="/chwiredgatewayip">斥候工业网关-ip配置-有线网关</router-link>
|
||||
<router-link to="/gatewayconfiguration">斥候有线工业网关-数据采集配置-网关配置</router-link>
|
||||
<router-link to="/configuration">斥候有线工业网关-数据采集配置-设备配置</router-link>
|
||||
<router-link to="/collectionpoint">斥候有线工业网关-数据采集配置-采集点配置</router-link>
|
||||
<router-link to="/chmqtt">斥候有线工业网关-数据上云配置-MQTT上云</router-link>
|
||||
|
||||
<router-link to="/chwirelessgatewayip">斥候工业网关-ip配置-无线网关</router-link>
|
||||
<router-link to="/chiwifigate">斥候无线工业网关-数据采集配置-网关配置</router-link>
|
||||
<router-link to="/chiwifidevice">斥候无线工业网关-数据采集配置-设备配置</router-link>
|
||||
<router-link to="/collectionpoint">斥候无线工业网关-数据采集配置-采集点配置</router-link>
|
||||
<router-link to="/chiwifimqtt">斥候无线工业网关-数据上云配置-MQTT上云</router-link>
|
||||
<router-link to="/chwiredgatewayip"
|
||||
>斥候工业网关-ip配置-有线网关</router-link
|
||||
>
|
||||
<router-link to="/gatewayconfiguration"
|
||||
>斥候有线工业网关-数据采集配置-网关配置</router-link
|
||||
>
|
||||
<router-link to="/configuration"
|
||||
>斥候有线工业网关-数据采集配置-设备配置</router-link
|
||||
>
|
||||
<router-link to="/collectionpoint"
|
||||
>斥候有线工业网关-数据采集配置-采集点配置</router-link
|
||||
>
|
||||
<router-link to="/chmqtt"
|
||||
>斥候有线工业网关-数据上云配置-MQTT上云</router-link
|
||||
>
|
||||
|
||||
<router-link to="/chwirelessgatewayip"
|
||||
>斥候工业网关-ip配置-无线网关</router-link
|
||||
>
|
||||
<router-link to="/chiwifigate"
|
||||
>斥候无线工业网关-数据采集配置-网关配置</router-link
|
||||
>
|
||||
<router-link to="/chiwifidevice"
|
||||
>斥候无线工业网关-数据采集配置-设备配置</router-link
|
||||
>
|
||||
<router-link to="/collectionpoint"
|
||||
>斥候无线工业网关-数据采集配置-采集点配置</router-link
|
||||
>
|
||||
<router-link to="/chiwifimqtt"
|
||||
>斥候无线工业网关-数据上云配置-MQTT上云</router-link
|
||||
>
|
||||
</div>
|
||||
<div class="serial" style="background-color: aqua; height: 100px">
|
||||
<router-link to="/ckipconfig">串口服务器-Ip配置</router-link>
|
||||
<router-link to="/ckportconfig">串口服务器-端口配置</router-link>
|
||||
<router-link to="/towifi">串口服务器-485towifi-串口及网络协议设置</router-link>
|
||||
<router-link to="/towifi"
|
||||
>串口服务器-485towifi-串口及网络协议设置</router-link
|
||||
>
|
||||
<router-link to="/cknet">串口服务器-485towifi-网口配置</router-link>
|
||||
<router-link to="/ckwireless">串口服务器-485towifi-无线配置</router-link>
|
||||
<router-link to="/networkmanagement">工业网闸配置-网络管理</router-link>
|
||||
<router-link to="/objmanagement">工业网闸配置-对象管理</router-link>
|
||||
<router-link to="/strategyManagement">工业网闸配置-策略管理</router-link>
|
||||
<router-link to="/addstrategy">工业网闸配置-策略管理-添加策略</router-link>
|
||||
<router-link to="/addstrategy"
|
||||
>工业网闸配置-策略管理-添加策略</router-link
|
||||
>
|
||||
<router-link to="/ntconfig">网络优化-网关配置</router-link>
|
||||
<router-link to="/ntmaintenance">网络优化-网关维护</router-link>
|
||||
</div>
|
||||
|
|
@ -68,7 +112,7 @@ export default {
|
|||
#app {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #2b2d38;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.db_lite,
|
||||
|
|
|
|||
Loading…
Reference in New Issue