zyh
This commit is contained in:
commit
e120cf419c
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,180 @@
|
|||
<!-- Db网关配置-无线网关配置 -->
|
||||
<template>
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
export default {
|
||||
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,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async innerConfirm() {
|
||||
this.outerVisible = false;
|
||||
this.innerVisible = false;
|
||||
let datas = sessionStorage.getItem("answer1");
|
||||
console.log(JSON.parse(datas));
|
||||
this.formdata = { ...JSON.parse(datas), ...this.formdata };
|
||||
console.log(this.formdata);
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "DB-IotLite_wx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formdata),
|
||||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.mark_value));
|
||||
sessionStorage.setItem("answer1", JSON.stringify(this.formdata));
|
||||
// let res2 = await GetUserAnswer({
|
||||
// mark: "DB-IotLite_wx",
|
||||
// user_id: "USER202307301109254198",
|
||||
// });
|
||||
// console.log(res2);
|
||||
this.$router.replace("/dbcollectserial");
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_wx",
|
||||
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;
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.data_acquire {
|
||||
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";
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
43
src/App.vue
43
src/App.vue
|
|
@ -12,6 +12,16 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
grade: 0,
|
||||
DB_IotLite_yx: [],
|
||||
CHGYWG_yx: [],
|
||||
CHGYWG_wx: [],
|
||||
DB_IotLite_wx: [],
|
||||
CKFWQ_yx: [],
|
||||
CKFWQ_wx: [],
|
||||
GYWZ_yx: [],
|
||||
GYWZ_wx: [],
|
||||
YDPZYM_wgpz: [],
|
||||
YDPZYM_wgwh: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -25,7 +35,36 @@ export default {
|
|||
let arr = [];
|
||||
arr = data.data;
|
||||
arr.forEach((item) => {
|
||||
item.answer = JSON.parse(item.answer);
|
||||
if (item.mark == "DB-IotLite_yx") {
|
||||
this.DB_IotLite_yx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "CHGYWG_yx") {
|
||||
this.CHGYWG_yx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "CHGYWG_wx") {
|
||||
this.CHGYWG_wx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "DB_IotLite_wx") {
|
||||
this.DB_IotLite_wx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "CKFWQ_yx") {
|
||||
this.CKFWQ_yx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "CKFWQ_wx") {
|
||||
this.CKFWQ_wx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "GYWZ_yx") {
|
||||
this.GYWZ_yx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "GYWZ_wx") {
|
||||
this.GYWZ_wx = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "YDPZYM_wgpz") {
|
||||
this.YDPZYM_wgpz = JSON.parse(item.answer);
|
||||
}
|
||||
if (item.mark == "YDPZYM_wgwh") {
|
||||
this.YDPZYM_wgwh = JSON.parse(item.answer);
|
||||
}
|
||||
});
|
||||
},
|
||||
// console.log(arr);
|
||||
|
|
@ -216,7 +255,7 @@ export default {
|
|||
}
|
||||
|
||||
.el-dialog__body {
|
||||
color: #FFFFFF !important;
|
||||
color: #ffffff !important;
|
||||
background-image: url(./assets/image/bg.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,34 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-dialog title="添加策略" :visible.sync="dialogVisible1" width="82%">
|
||||
<el-form :model="ruleForm1" :rules="rules1" ref="ruleForm1" label-width="150px" class="demo-ruleForm1"
|
||||
:label-position="labelPosition">
|
||||
<el-dialog
|
||||
title="添加策略"
|
||||
:visible.sync="dialogVisible1"
|
||||
width="82%"
|
||||
:center="true"
|
||||
>
|
||||
<el-form
|
||||
:model="ruleForm1"
|
||||
:rules="rules1"
|
||||
ref="ruleForm1"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm1"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-row :justify="center">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="名称:" prop="clgl_name">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_name" placeholder="选择对象">
|
||||
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
v-model="ruleForm1.clgl_name"
|
||||
placeholder="选择对象"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -17,8 +36,16 @@
|
|||
|
||||
<el-form-item label="源对象:" prop="clgl_ydx" style="color: red">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_ydx" placeholder="选择对象">
|
||||
<el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
v-model="ruleForm1.clgl_ydx"
|
||||
placeholder="选择对象"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options4"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -27,7 +54,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="入口网关:" prop="clgl_rkwg1">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkwg1" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -35,7 +65,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkwg2">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkwg2" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -43,7 +76,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkwg3">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkwg3" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -51,7 +87,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkwg4">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkwg4" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -61,7 +100,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="出口网关:" prop="clgl_ckwg1">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckwg1" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -69,7 +111,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckwg2">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckwg2" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -77,7 +122,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckwg3">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckwg3" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -85,7 +133,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckwg4">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckwg4" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -95,8 +146,17 @@
|
|||
<el-col :span="6">
|
||||
<el-form-item label="协议:" prop="clgl_xy">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_xy" multiple placeholder="请选择">
|
||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
v-model="ruleForm1.clgl_xy"
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -108,24 +168,46 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="入口网卡:" prop="clgl_rkwk">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_rkwk" placeholder="选择配置的内网网卡">
|
||||
<el-option v-for="item in options8" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
v-model="ruleForm1.clgl_rkwk"
|
||||
placeholder="选择配置的内网网卡"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options8"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="出口网卡:" prop="clgl_ckwk">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_ckwk" placeholder="选择配置的外网网卡">
|
||||
<el-option v-for="item in options9" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
v-model="ruleForm1.clgl_ckwk"
|
||||
placeholder="选择配置的外网网卡"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options9"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select> </el-col></el-form-item>
|
||||
</el-select> </el-col
|
||||
></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="工作模式:" prop="clgl_gzms">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_gzms" placeholder="请选择">
|
||||
<el-option v-for="item in options3" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in options3"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -139,7 +221,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="入口IP:" prop="clgl_rkip1">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkip1" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -147,7 +232,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkip2">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkip2" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -155,7 +243,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkip3">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkip3" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -163,7 +254,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkip4">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_rkip4" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -173,7 +267,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="出口IP:" prop="clgl_ckip1">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckip1" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -181,7 +278,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckip2">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckip2" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -189,7 +289,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckip3">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckip3" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -197,7 +300,10 @@
|
|||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckip4">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ruleForm1.clgl_ckip4" :maxlength="3"></el-input>
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -218,8 +324,16 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="未定义命令:" prop="clgl_wdyml">
|
||||
<el-col :span="19">
|
||||
<el-select v-model="ruleForm1.clgl_wdyml" placeholder="请选择">
|
||||
<el-option v-for="item in options5" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-select
|
||||
v-model="ruleForm1.clgl_wdyml"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options5"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -229,11 +343,14 @@
|
|||
</el-form>
|
||||
<span style="color: #fff">记录日志:</span>
|
||||
<el-switch style="margin-left: 6%" v-model="switchvalue"> </el-switch>
|
||||
<div class="title" style="
|
||||
<div
|
||||
class="title"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
">
|
||||
"
|
||||
>
|
||||
<h3 style="margin-top: 10px; margin-bottom: 3px; color: #fff4">
|
||||
命令列表
|
||||
</h3>
|
||||
|
|
@ -244,7 +361,8 @@
|
|||
<el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template></el-table-column>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column prop="cmdlist_ml" label="命令(功能码)">
|
||||
</el-table-column>
|
||||
<el-table-column prop="cmdlist_qsdz" label="起始地址">
|
||||
|
|
@ -255,7 +373,12 @@
|
|||
<el-table-column prop="cmdlist_dz" label="动作"> </el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<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>
|
||||
|
|
@ -267,14 +390,31 @@
|
|||
</el-dialog>
|
||||
</div>
|
||||
<div>
|
||||
<el-dialog title="新增命令" :visible.sync="flag" width="30%" :before-close="handleClose">
|
||||
<el-form center :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-width="150px" class="demo-ruleForm2"
|
||||
:label-position="labelPosition">
|
||||
<el-dialog
|
||||
title="新增命令"
|
||||
:visible.sync="flag"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
center
|
||||
:model="ruleForm2"
|
||||
:rules="rules2"
|
||||
ref="ruleForm2"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm2"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="命令:" prop="cmdlist_ml">
|
||||
<el-col :span="6">
|
||||
<el-select v-model="ruleForm2.cmdlist_ml" style="width: 200px">
|
||||
<el-option v-for="(item, index) in options6" :key="index" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
<el-option
|
||||
v-for="item in options6"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
|
@ -282,7 +422,12 @@
|
|||
<el-form-item label="设备ID:" prop="cmdlist_sbid" style="color: red">
|
||||
<el-col :span="6">
|
||||
<el-select v-model="ruleForm2.cmdlist_sbid" style="width: 200px">
|
||||
<el-option v-for="(item, index) in options7" :key="index" :label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in options7"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -301,14 +446,21 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="描述:" prop="cmdlist_ms">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="ruleForm2.cmdlist_ms" style="width: 200px">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-input
|
||||
v-model="ruleForm2.cmdlist_ms"
|
||||
style="width: 200px"
|
||||
></el-input
|
||||
></el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="动作:" prop="cmdlist_dz">
|
||||
<el-col :span="6">
|
||||
<el-select v-model="ruleForm2.cmdlist_dz" style="width: 200px">
|
||||
<el-option v-for="item in options5" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in options5"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
|
@ -715,7 +867,7 @@ export default {
|
|||
created() {
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
mounted() { },
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
//保存
|
||||
|
|
@ -882,7 +1034,7 @@ export default {
|
|||
<style lang="less" scoped>
|
||||
.el-col-1 {
|
||||
padding: 0px 4px;
|
||||
// line-height: 62px;
|
||||
line-height: 62px;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -895,13 +1047,17 @@ export default {
|
|||
width: 43px;
|
||||
height: 30px;
|
||||
}
|
||||
/deep/.el-dialog__header {
|
||||
text-align: left; /* 标题左对齐 */
|
||||
}
|
||||
|
||||
/deep/ .demo-ruleForm1 {
|
||||
.el-col-1 {
|
||||
padding: 0px 4px;
|
||||
// line-height: 62px;
|
||||
line-height: 62px;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.el-col-5 {
|
||||
|
|
|
|||
|
|
@ -1,349 +1,384 @@
|
|||
<!-- 斥候有线网关页面 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-button type="info" plain @click="getShow">斥候有线网关</el-button> -->
|
||||
<div class="gateway" v-show="isShow">
|
||||
<div class="title">
|
||||
<p class="title_l">IP配置</p>
|
||||
<p class="title_center">本页面涉及排错,请检查修改默认值</p>
|
||||
<i class="el-icon-close title_r" @click="isShow = false"></i>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="content">
|
||||
<div class="lan">
|
||||
<el-form :model="formData" :label-position="labelPosition" :rules="rules" ref="ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="网络类型:" :label-width="formLabelWidth" prop="type">
|
||||
<el-select v-model="formData.ippz_wllx" placeholder="静态IP" style="width: 200px;">
|
||||
<el-option label="静态IP" value="静态IP"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="IP地址:" :label-width="formLabelWidth" prop="ip">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="子网掩码:" :label-width="formLabelWidth">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="网关:" :label-width="formLabelWidth" prop="ip">
|
||||
<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="24">
|
||||
<el-form-item label="DNS:" :label-width="formLabelWidth">
|
||||
<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-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button type="primary" @click="saveAll">保 存</el-button>
|
||||
<el-button @click="isShow = false">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<!-- <el-button type="info" plain @click="getShow">斥候有线网关</el-button> -->
|
||||
<div class="gateway" v-show="isShow">
|
||||
<div class="title">
|
||||
<p class="title_l">IP配置</p>
|
||||
<p class="title_center">本页面涉及排错,请检查修改默认值</p>
|
||||
<i class="el-icon-close title_r" @click="isShow = false"></i>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="content">
|
||||
<div class="lan">
|
||||
<el-form
|
||||
:model="formData"
|
||||
:label-position="labelPosition"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="网络类型:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="type"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.ippz_wllx"
|
||||
placeholder="静态IP"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option label="静态IP" value="静态IP"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="IP地址:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ip"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_ip4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="子网掩码:" :label-width="formLabelWidth">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="网关:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ip"
|
||||
>
|
||||
<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="24">
|
||||
<el-form-item label="DNS:" :label-width="formLabelWidth">
|
||||
<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-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button type="primary" @click="saveAll">保 存</el-button>
|
||||
<el-button @click="isShow = false">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer } from '@/api/user';
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
export default {
|
||||
name: 'TestChiGate',
|
||||
name: "TestChiGate",
|
||||
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
ippz_wllx: "静态IP",
|
||||
ippz_ip: "",
|
||||
ippz_zwym: "",
|
||||
ippz_mrwg: "",
|
||||
ippz_dns_sx: "",
|
||||
ippz_dns_by: "",
|
||||
},
|
||||
ippz_ip1: "192",
|
||||
ippz_ip2: "168",
|
||||
ippz_ip3: "1",
|
||||
ippz_ip4: "1",
|
||||
ippz_zwym1: "255",
|
||||
ippz_zwym2: "255",
|
||||
ippz_zwym3: "255",
|
||||
ippz_zwym4: "0",
|
||||
ippz_mrwg1: "192",
|
||||
ippz_mrwg2: "168",
|
||||
ippz_mrwg3: "1",
|
||||
ippz_mrwg4: "1",
|
||||
ippz_dns_sx1: "8",
|
||||
ippz_dns_sx2: "8",
|
||||
ippz_dns_sx3: "8",
|
||||
ippz_dns_sx4: "8",
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
ippz_wllx: "静态IP",
|
||||
ippz_ip: "",
|
||||
ippz_zwym: "",
|
||||
ippz_mrwg: "",
|
||||
ippz_dns_sx: "",
|
||||
ippz_dns_by: "",
|
||||
},
|
||||
ippz_ip1: "192",
|
||||
ippz_ip2: "168",
|
||||
ippz_ip3: "1",
|
||||
ippz_ip4: "1",
|
||||
ippz_zwym1: "255",
|
||||
ippz_zwym2: "255",
|
||||
ippz_zwym3: "255",
|
||||
ippz_zwym4: "0",
|
||||
ippz_mrwg1: "192",
|
||||
ippz_mrwg2: "168",
|
||||
ippz_mrwg3: "1",
|
||||
ippz_mrwg4: "1",
|
||||
ippz_dns_sx1: "8",
|
||||
ippz_dns_sx2: "8",
|
||||
ippz_dns_sx3: "8",
|
||||
ippz_dns_sx4: "8",
|
||||
|
||||
ippz_dns_by1: "8",
|
||||
ippz_dns_by2: "8",
|
||||
ippz_dns_by3: "8",
|
||||
ippz_dns_by4: "8",
|
||||
radio: "1",
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
count: 0,
|
||||
isShow: true,
|
||||
rules: {
|
||||
ip: [
|
||||
{ required: true, message: '请输入IP地址', trigger: 'blur' },
|
||||
],
|
||||
mask: [
|
||||
{ required: true, message: '请输入子网掩码', trigger: 'blur' },
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请输入网络类型', trigger: 'blur' },
|
||||
],
|
||||
// client_id: [
|
||||
// { required: true, message: '请输入客户端SSID', trigger: 'blur' },
|
||||
// ],
|
||||
// passage: [
|
||||
// { required: true, message: '请输入通道', trigger: 'blur' },
|
||||
// ],
|
||||
},
|
||||
};
|
||||
ippz_dns_by1: "8",
|
||||
ippz_dns_by2: "8",
|
||||
ippz_dns_by3: "8",
|
||||
ippz_dns_by4: "8",
|
||||
radio: "1",
|
||||
labelPosition: "left",
|
||||
formLabelWidth: "116px",
|
||||
count: 0,
|
||||
isShow: true,
|
||||
rules: {
|
||||
ip: [{ required: true, message: "请输入IP地址", trigger: "blur" }],
|
||||
mask: [{ required: true, message: "请输入子网掩码", trigger: "blur" }],
|
||||
type: [{ required: true, message: "请输入网络类型", trigger: "blur" }],
|
||||
// client_id: [
|
||||
// { required: true, message: '请输入客户端SSID', trigger: 'blur' },
|
||||
// ],
|
||||
// passage: [
|
||||
// { required: true, message: '请输入通道', trigger: 'blur' },
|
||||
// ],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
Merge(value, value1, value2, value3, value4) {
|
||||
value = value1 + "." + value2 + "." + value3 + "." + value4;
|
||||
return value;
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
SliceData(value) {
|
||||
let res = value.split(".");
|
||||
// console.log(res);
|
||||
return res;
|
||||
},
|
||||
|
||||
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.isShow=false;
|
||||
this.formData.ippz_ip = this.Merge(
|
||||
this.formData.ippz_ip,
|
||||
this.ippz_ip1,
|
||||
this.ippz_ip2,
|
||||
this.ippz_ip3,
|
||||
this.ippz_ip4
|
||||
);
|
||||
this.formData.ippz_zwym = this.Merge(
|
||||
this.formData.ippz_zwym,
|
||||
this.ippz_zwym1,
|
||||
this.ippz_zwym2,
|
||||
this.ippz_zwym3,
|
||||
this.ippz_zwym4
|
||||
);
|
||||
this.formData.ippz_mrwg = this.Merge(
|
||||
this.formData.ippz_mrwg,
|
||||
this.ippz_mrwg1,
|
||||
this.ippz_mrwg2,
|
||||
this.ippz_mrwg3,
|
||||
this.ippz_mrwg4
|
||||
);
|
||||
this.formData.ippz_dns_sx = this.Merge(
|
||||
this.formData.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.formData.ippz_dns_by,
|
||||
this.ippz_dns_by1,
|
||||
this.ippz_dns_by2,
|
||||
this.ippz_dns_by3,
|
||||
this.ippz_dns_by4
|
||||
);
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "CHGYWG_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formData),
|
||||
});
|
||||
console.log(res);
|
||||
sessionStorage.setItem("answer2", JSON.stringify(this.formData));
|
||||
},
|
||||
// 保存数据,发送请求
|
||||
async saveAll() {
|
||||
// this.dialogFormVisible = false;
|
||||
this.isShow = false;
|
||||
this.formData.ippz_ip = this.Merge(
|
||||
this.formData.ippz_ip,
|
||||
this.ippz_ip1,
|
||||
this.ippz_ip2,
|
||||
this.ippz_ip3,
|
||||
this.ippz_ip4
|
||||
);
|
||||
this.formData.ippz_zwym = this.Merge(
|
||||
this.formData.ippz_zwym,
|
||||
this.ippz_zwym1,
|
||||
this.ippz_zwym2,
|
||||
this.ippz_zwym3,
|
||||
this.ippz_zwym4
|
||||
);
|
||||
this.formData.ippz_mrwg = this.Merge(
|
||||
this.formData.ippz_mrwg,
|
||||
this.ippz_mrwg1,
|
||||
this.ippz_mrwg2,
|
||||
this.ippz_mrwg3,
|
||||
this.ippz_mrwg4
|
||||
);
|
||||
this.formData.ippz_dns_sx = this.Merge(
|
||||
this.formData.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.formData.ippz_dns_by,
|
||||
this.ippz_dns_by1,
|
||||
this.ippz_dns_by2,
|
||||
this.ippz_dns_by3,
|
||||
this.ippz_dns_by4
|
||||
);
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "CHGYWG_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.formData),
|
||||
});
|
||||
console.log(res);
|
||||
sessionStorage.setItem("answer2", JSON.stringify(this.formData));
|
||||
},
|
||||
//读取缓存
|
||||
async GetUserAnswer() {
|
||||
let { data } = await GetUserAnswer({
|
||||
mark: "CHGYWG_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
console.log(JSON.parse(data.data.mark_value));
|
||||
let obj = JSON.parse(data.data.mark_value);
|
||||
this.formData.ippz_wllx = obj.ippz_wllx;
|
||||
if (obj.ippz_ip) {
|
||||
this.ippz_ip1 = obj.ippz_ip.split(".")[0];
|
||||
this.ippz_ip2 = obj.ippz_ip.split(".")[1];
|
||||
this.ippz_ip3 = obj.ippz_ip.split(".")[2];
|
||||
this.ippz_ip4 = obj.ippz_ip.split(".")[3];
|
||||
this.ippz_zwym1 = obj.ippz_zwym.split(".")[0];
|
||||
this.ippz_zwym2 = obj.ippz_zwym.split(".")[1];
|
||||
this.ippz_zwym3 = obj.ippz_zwym.split(".")[2];
|
||||
this.ippz_zwym4 = obj.ippz_zwym.split(".")[3];
|
||||
this.ippz_mrwg1 = obj.ippz_mrwg.split(".")[0];
|
||||
this.ippz_mrwg2 = obj.ippz_mrwg.split(".")[1];
|
||||
this.ippz_mrwg3 = obj.ippz_mrwg.split(".")[2];
|
||||
this.ippz_mrwg4 = obj.ippz_mrwg.split(".")[3];
|
||||
this.ippz_dns_sx1 = obj.ippz_dns_sx.split(".")[0];
|
||||
this.ippz_dns_sx2 = obj.ippz_dns_sx.split(".")[1];
|
||||
this.ippz_dns_sx3 = obj.ippz_dns_sx.split(".")[2];
|
||||
this.ippz_dns_sx4 = obj.ippz_dns_sx.split(".")[3];
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.gateway {
|
||||
position: absolute;
|
||||
top: 145px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 470px;
|
||||
// height:358px;
|
||||
height: 458px;
|
||||
// height: 725px;
|
||||
line-height: 20px;
|
||||
// background-color: rgba(255, 255, 255, 1);
|
||||
// text-align: center;
|
||||
background: url(../assets/image/bg.png);
|
||||
background-size: 100% 100%;
|
||||
border: 1px solid rgba(187, 187, 187, 1);
|
||||
|
||||
.title {
|
||||
margin: 13px 6px 0px 25px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title_l {
|
||||
width: 53px;
|
||||
height: 26px;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title_center {
|
||||
width: 288px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
color: rgba(189, 49, 36, 1);
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title_r {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
color: rgba(111, 103, 103, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0px 53px 0px 56px;
|
||||
|
||||
/deep/.lan {
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
padding-left: 2px;
|
||||
color: black;
|
||||
text-align: left;
|
||||
line-height: 15px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-24 {
|
||||
padding-right: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .footer {
|
||||
position: absolute;
|
||||
top: 145px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 470px;
|
||||
// height:358px;
|
||||
height: 458px;
|
||||
// height: 725px;
|
||||
line-height: 20px;
|
||||
// background-color: rgba(255, 255, 255, 1);
|
||||
// text-align: center;
|
||||
background: url(../assets/image/bg.png);
|
||||
background-size: 100% 100%;
|
||||
border: 1px solid rgba(187, 187, 187, 1);
|
||||
|
||||
.title {
|
||||
margin: 13px 6px 0px 25px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title_l {
|
||||
width: 53px;
|
||||
height: 26px;
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title_center {
|
||||
width: 288px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
color: rgba(189, 49, 36, 1);
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title_r {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
color: rgba(111, 103, 103, 1);
|
||||
}
|
||||
.el-button {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
line-height: 0.5;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0px 53px 0px 56px;
|
||||
|
||||
/deep/.lan {
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
padding-left: 2px;
|
||||
color: black;
|
||||
text-align: left;
|
||||
line-height: 15px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.el-col-24 {
|
||||
padding-right: 32px
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .footer {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
.el-button {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
line-height: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,41 +1,85 @@
|
|||
<template>
|
||||
<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" v-loading="loading">
|
||||
<el-form :model="formdata" :rules="rules" ref="formdata" label-width="85px" class="demo-ruleForm">
|
||||
<el-dialog
|
||||
title="新建网关"
|
||||
:visible.sync="outerVisible"
|
||||
width="382px"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-form
|
||||
:model="formdata"
|
||||
:rules="rules"
|
||||
ref="formdata"
|
||||
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-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-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-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!important">
|
||||
<el-dialog
|
||||
width="382px"
|
||||
title="系统提示"
|
||||
:visible.sync="innerVisible"
|
||||
append-to-body
|
||||
>
|
||||
<p class="inner_content" style="color: #fff !important">
|
||||
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||
</p>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="innerConfirm('formdata')">确定</el-button>
|
||||
<el-button type="primary" @click="innerConfirm('formdata')"
|
||||
>确定</el-button
|
||||
>
|
||||
<el-button @click="innerVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div slot="footer" class="dialog-footer-outer">
|
||||
<el-button type="primary" @click="saveInfo('formdata')">保存</el-button>
|
||||
<el-button type="primary" @click="saveInfo('formdata')"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="outerVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -50,7 +94,7 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
loading:false,
|
||||
loading: false,
|
||||
options1: [
|
||||
{
|
||||
value: "有线区网关1",
|
||||
|
|
@ -119,7 +163,7 @@ export default {
|
|||
};
|
||||
},
|
||||
|
||||
mounted() { },
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
saveInfo(formName) {
|
||||
|
|
@ -128,11 +172,10 @@ export default {
|
|||
// alert('submit!');
|
||||
this.innerVisible = true;
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
async innerConfirm() {
|
||||
this.outerVisible = false;
|
||||
|
|
@ -158,12 +201,12 @@ export default {
|
|||
},
|
||||
},
|
||||
async created() {
|
||||
this.loading=true;
|
||||
this.loading = true;
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
this.loading=false;
|
||||
this.loading = false;
|
||||
console.log(res2);
|
||||
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||
// console.log(res3);
|
||||
|
|
|
|||
|
|
@ -1,380 +1,429 @@
|
|||
<!-- 设备配置----网口设备 -->
|
||||
<template>
|
||||
<div>
|
||||
<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 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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SaveUserAnswer } from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "DeviceView",
|
||||
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();
|
||||
}
|
||||
});
|
||||
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",
|
||||
},
|
||||
// 点击时候的判断,判断是否为新增设备
|
||||
selectMenuNode(index, indexPath) {
|
||||
console.log(index);
|
||||
if (index == 1) {
|
||||
this.add_passage = true;
|
||||
{
|
||||
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 = String(Number(this.formdata.sbpz_jdzxz));
|
||||
this.formdata.sbpz_jysb = String(Number(this.formdata.sbpz_jysb));
|
||||
this.formdata = { ...JSON.parse(datas), ...this.formdata };
|
||||
this.add_passage = false;
|
||||
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(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);
|
||||
}
|
||||
},
|
||||
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 = String(Number(this.formdata.sbpz_jdzxz));
|
||||
this.formdata.sbpz_jysb = String(Number(this.formdata.sbpz_jysb));
|
||||
this.formdata = { ...JSON.parse(datas), ...this.formdata };
|
||||
this.add_passage = false;
|
||||
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(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);
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
// 绑定事件
|
||||
// 设置为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:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
.el-col-12:first-child {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
.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-4 {
|
||||
padding-left: 5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
line-height: 4px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,37 +2,72 @@
|
|||
<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" v-loading="loading">
|
||||
<el-dialog
|
||||
title="IP设置"
|
||||
:visible.sync="dialogFormVisible"
|
||||
:append-to-body="true"
|
||||
width="894px"
|
||||
v-loading="loading"
|
||||
>
|
||||
<div class="form_content">
|
||||
<el-form :model="formdata" :label-position="labelPosition" label-width="80px" :rules="rules_ippz_wirle"
|
||||
ref="formdata">
|
||||
<el-form
|
||||
:model="formdata"
|
||||
:label-position="labelPosition"
|
||||
label-width="80px"
|
||||
:rules="rules_ippz_wirle"
|
||||
ref="formdata"
|
||||
>
|
||||
<div class="wired">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="网口:" :label-width="formLabelWidth" prop="ippz_wangkou">
|
||||
<el-select v-model="formdata.ippz_wangkou" placeholder="ETHO" style="width: 200px; height: 30px">
|
||||
<el-form-item
|
||||
label="网口:"
|
||||
:label-width="formLabelWidth"
|
||||
prop="ippz_wangkou"
|
||||
>
|
||||
<el-select
|
||||
v-model="formdata.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" maxlength="3"></el-input></el-col>
|
||||
<el-col :span="5"
|
||||
><el-input v-model="ippz_mrwg1" maxlength="3"></el-input
|
||||
></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg2" maxlength="3"></el-input></el-col>
|
||||
<el-col :span="5"
|
||||
><el-input v-model="ippz_mrwg2" maxlength="3"></el-input
|
||||
></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg3" maxlength="3"></el-input></el-col>
|
||||
<el-col :span="5"
|
||||
><el-input v-model="ippz_mrwg3" maxlength="3"></el-input
|
||||
></el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5"><el-input v-model="ippz_mrwg4" maxlength="3"></el-input></el-col>
|
||||
<el-col :span="5"
|
||||
><el-input v-model="ippz_mrwg4" 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="子网掩码:" :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" maxlength="3"></el-input>
|
||||
|
|
@ -53,7 +88,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" maxlength="3"></el-input>
|
||||
|
|
@ -76,7 +115,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" maxlength="3"></el-input>
|
||||
|
|
@ -97,7 +140,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" maxlength="3"></el-input>
|
||||
|
|
@ -112,7 +159,11 @@
|
|||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input v-model="ippz_dns_by4" maxlength="3" type="number"></el-input>
|
||||
<el-input
|
||||
v-model="ippz_dns_by4"
|
||||
maxlength="3"
|
||||
type="number"
|
||||
></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -120,11 +171,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="formdata.ippz_mac"></el-input><el-button
|
||||
v-copy="ippz_mac" @click="CopyText">复制</el-button>
|
||||
<el-input
|
||||
style="width: 200px; height: 30px"
|
||||
v-model="formdata.ippz_mac"
|
||||
></el-input
|
||||
><el-button v-copy="ippz_mac" @click="CopyText"
|
||||
>复制</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
|
@ -150,7 +210,7 @@ export default {
|
|||
return {
|
||||
disabled: true,
|
||||
// 判断是否保存过
|
||||
loading:false,
|
||||
loading: false,
|
||||
formdata: {
|
||||
ippz_wangkou: "ETH0",
|
||||
ippz_zwym: "2",
|
||||
|
|
@ -201,28 +261,28 @@ export default {
|
|||
{ required: true, message: "请输入网口", trigger: "change" },
|
||||
],
|
||||
ippz_zwym: [
|
||||
{ required: true, message: '请输入子网掩码', trigger: 'blur' },
|
||||
{ type: 'number', message: '子网掩码必须为数字值' }
|
||||
{ required: true, message: "请输入子网掩码", trigger: "blur" },
|
||||
{ type: "number", message: "子网掩码必须为数字值" },
|
||||
],
|
||||
ippz_ip: [
|
||||
{ required: true, message: '请输入IP地址', trigger: 'blur' },
|
||||
{ type: 'number', message: '子网掩码必须为数字值' }
|
||||
{ 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: '默认网关必须为数字值' }
|
||||
{ required: true, message: "请输入默认网关", trigger: "blur" },
|
||||
{ type: "number", message: "默认网关必须为数字值" },
|
||||
],
|
||||
ippz_dns_sx: [
|
||||
{ required: true, message: '请输入首选DNS', trigger: 'blur' },
|
||||
{ type: 'number', message: '首选DNS必须为数字值' }
|
||||
{ required: true, message: "请输入首选DNS", trigger: "blur" },
|
||||
{ type: "number", message: "首选DNS必须为数字值" },
|
||||
],
|
||||
ippz_dns_by: [
|
||||
{ required: true, message: '请输入备选DNS', trigger: 'blur' },
|
||||
{ type: 'number', message: '备选DNS必须为数字值' }
|
||||
{ required: true, message: "请输入备选DNS", trigger: "blur" },
|
||||
{ type: "number", message: "备选DNS必须为数字值" },
|
||||
],
|
||||
ippz_mac: [
|
||||
{ required: true, message: '请输入MAC地址', trigger: 'blur' },
|
||||
{ required: true, message: "请输入MAC地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -278,7 +338,6 @@ export default {
|
|||
|
||||
// 保存数据, 发送请求
|
||||
async saveAll() {
|
||||
|
||||
this.dialogFormVisible = false;
|
||||
this.isSaveAnswer = true;
|
||||
this.formdata.ippz_wangkou = this.ippz_wangkou;
|
||||
|
|
@ -338,46 +397,47 @@ export default {
|
|||
type: "success",
|
||||
});
|
||||
},
|
||||
async GetUserAnswer() {
|
||||
this.loading = true;
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
this.loading = false;
|
||||
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];
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.loading=true;
|
||||
let res2 = await GetUserAnswer({
|
||||
mark: "DB-IotLite_yx",
|
||||
user_id: "USER202307301109254198",
|
||||
});
|
||||
this.loading=false;
|
||||
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() { },
|
||||
async created() {},
|
||||
mounted() {},
|
||||
directives: {
|
||||
copy: {
|
||||
bind(el, { value }) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">网络管理</el-button> -->
|
||||
|
||||
<el-dialog
|
||||
title="网络管理"
|
||||
:visible.sync="dialogVisible"
|
||||
|
|
|
|||
|
|
@ -197,35 +197,35 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
/deep/ .ip_address {
|
||||
.el-input__inner {
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
// /deep/ .ip_address {
|
||||
// .el-input__inner {
|
||||
// height: 30px;
|
||||
// text-align: center;
|
||||
// padding: 0;
|
||||
// }
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
// .el-row {
|
||||
// display: flex;
|
||||
// align-items: flex-end;
|
||||
|
||||
.el-col-1 {
|
||||
padding: 0px 2px;
|
||||
color: black;
|
||||
text-align: left;
|
||||
line-height: 32px;
|
||||
height: 20px;
|
||||
}
|
||||
// .el-col-1 {
|
||||
// padding: 0px 2px;
|
||||
// color: black;
|
||||
// text-align: left;
|
||||
// line-height: 32px;
|
||||
// height: 20px;
|
||||
// }
|
||||
|
||||
.el-col-5 {
|
||||
width: 43px;
|
||||
height: 30px;
|
||||
}
|
||||
// .el-col-5 {
|
||||
// width: 43px;
|
||||
// height: 30px;
|
||||
// }
|
||||
|
||||
.el-col-24 {
|
||||
padding-right: 152px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// .el-col-24 {
|
||||
// padding-right: 152px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
.el-table--enable-row-hover .el-table__body tr:hover > td {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue