Merge branch 'master' of http://git.umayle.com:2023/chengdandan/InternetCompetition
This commit is contained in:
commit
00ec366527
|
@ -0,0 +1,301 @@
|
||||||
|
<!-- 斥候数据采集——有线网关配置 -->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="gateway">
|
||||||
|
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
||||||
|
<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="请选择" 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="请选择" 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>
|
||||||
|
<div slot="footer" class="dialog-footer-outer">
|
||||||
|
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-dialog title="系统提示" :visible.sync="innerVisible" append-to-body width="382px">
|
||||||
|
<p class="inner_content">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</p>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="saveGate">确定</el-button>
|
||||||
|
<el-button @click="innerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestChiGate",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: true,
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
options1: [
|
||||||
|
{
|
||||||
|
value: "有线区网关2",
|
||||||
|
label: "有线区网关2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "无线区网关2",
|
||||||
|
label: "无线区网关2",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options2: [
|
||||||
|
{
|
||||||
|
value: "LAN-BOX2",
|
||||||
|
label: "LAN-BOX2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "WLAN-BOX2",
|
||||||
|
label: "WLAN-BOX2",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
formData: {
|
||||||
|
ippz_wllx: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_wg: "",
|
||||||
|
ippz_dns: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_kzqxy: "",
|
||||||
|
sbpz_ip: "",
|
||||||
|
sbpz_port: "",
|
||||||
|
sbpz_czdz: "",
|
||||||
|
sbpz_lxzq: "",
|
||||||
|
sbpz_qyhmcj: "",
|
||||||
|
sbpz_qyplcj: "",
|
||||||
|
sbpz_zdplcjs: "",
|
||||||
|
sbpz_cjcgsj: "",
|
||||||
|
sbpz_zqsbonchange: "",
|
||||||
|
sbpz_txsjjg: "",
|
||||||
|
sbpz_xqjcqxr: "",
|
||||||
|
sbpz_bcjcqxr: "",
|
||||||
|
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_scms: "",
|
||||||
|
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_keepalive: "",
|
||||||
|
mqtt_tls: "",
|
||||||
|
mqtt_clearsession: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
innerVisible: false,
|
||||||
|
outerVisible: true,
|
||||||
|
labelPosition: "left",
|
||||||
|
formLabelWidth: "96px",
|
||||||
|
count: 0,
|
||||||
|
isShow: true,
|
||||||
|
rules: {
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请输入网关ID", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请输入网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.isShow = false;
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.GetUserAnswer();
|
||||||
|
// this.isShow = true;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 登陆时进行校验
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async saveGate() {
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "CHGYWG_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.$router.push(
|
||||||
|
`/configuration?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// console.log(res);
|
||||||
|
},
|
||||||
|
async GetUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let { data } = await GetUserAnswer({
|
||||||
|
mark: "CHGYWG_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
if (data.data && data.state) {
|
||||||
|
if (data.data.step == 1) {
|
||||||
|
this.$router.push(`/configuration?user_id=${this.user_id}`);
|
||||||
|
} else if (data.data.step == 2) {
|
||||||
|
this.$router.push(`/collectionpoint?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
this.isShow = true;
|
||||||
|
console.log(JSON.parse(data.data.mark_value));
|
||||||
|
let obj = JSON.parse(data.data.mark_value);
|
||||||
|
if (obj.wgpz_wgid) {
|
||||||
|
this.formData.wgpz_wgid = obj.wgpz_wgid;
|
||||||
|
this.formData.wgpz_wgmc = obj.wgpz_wgmc;
|
||||||
|
|
||||||
|
this.formData.ippz_wllx = obj.ippz_wllx;
|
||||||
|
this.formData.ippz_ip = obj.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = obj.ippz_zwym;
|
||||||
|
this.formData.ippz_wg = obj.ippz_wg;
|
||||||
|
this.formData.ippz_dns = obj.ippz_dns;
|
||||||
|
this.formData.ippz_dns_by = obj.ippz_dns_by;
|
||||||
|
|
||||||
|
this.formData.sbpz_sbmc = obj.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_kzqxy = obj.sbpz_kzqxy;
|
||||||
|
this.formData.sbpz_ip = obj.sbpz_ip;
|
||||||
|
this.formData.sbpz_port = obj.sbpz_port;
|
||||||
|
this.formData.sbpz_czdz = obj.sbpz_czdz;
|
||||||
|
this.formData.sbpz_lxzq = obj.sbpz_lxzq;
|
||||||
|
this.formData.sbpz_qyhmcj = obj.sbpz_qyhmcj;
|
||||||
|
this.formData.sbpz_qyplcj = obj.sbpz_qyplcj;
|
||||||
|
this.formData.sbpz_zdplcjs = obj.sbpz_zdplcjs;
|
||||||
|
this.formData.sbpz_cjcgsj = obj.sbpz_cjcgsj;
|
||||||
|
this.formData.sbpz_zqsbonchange = obj.sbpz_zqsbonchange;
|
||||||
|
this.formData.sbpz_txsjjg = obj.sbpz_txsjjg;
|
||||||
|
this.formData.sbpz_xqjcqxr = obj.sbpz_xqjcqxr;
|
||||||
|
this.formData.sbpz_bcjcqxr = obj.sbpz_bcjcqxr;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = obj.mqtt_cjd_tagid;
|
||||||
|
this.formData.cjdpz_mc = obj.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = obj.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = obj.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_cjsjlx = obj.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_dxsx = obj.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_scms = obj.cjdpz_scms;
|
||||||
|
|
||||||
|
this.formData.mqtt_ip = obj.mqtt_ip;
|
||||||
|
this.formData.mqtt_wgsn = obj.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_port = obj.mqtt_port;
|
||||||
|
this.formData.mqtt_keepalive = obj.mqtt_keepalive;
|
||||||
|
this.formData.mqtt_tls = obj.mqtt_tls;
|
||||||
|
this.formData.mqtt_clearsession = obj.mqtt_clearsession;
|
||||||
|
this.formData.mqtt_sssjfbzt = obj.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = obj.mqtt_qos;
|
||||||
|
|
||||||
|
this.formData.mqtt_cjd_sbmc = obj.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = obj.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() { },
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/deep/ .gateway {
|
||||||
|
// position: absolute;
|
||||||
|
// left: 694px;
|
||||||
|
// top: 188px;
|
||||||
|
// width: 382px;
|
||||||
|
// height: 309px;
|
||||||
|
// line-height: 20px;
|
||||||
|
// // background-color: rgba(255, 255, 255, 1);
|
||||||
|
// background: url(../assets/image/bg.png);
|
||||||
|
// background-size: 100% 100%;
|
||||||
|
// text-align: center;
|
||||||
|
// border: 1px solid rgba(187, 187, 187, 1);
|
||||||
|
.el-divider--horizontal {
|
||||||
|
margin: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin: 13px 11px 0px 21px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.title_l {
|
||||||
|
width: 72px;
|
||||||
|
height: 26px;
|
||||||
|
color: rgba(16, 16, 16, 1);
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title_r {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
// color: rgba(111, 103, 103, 1);
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin-left: 50px;
|
||||||
|
margin-right: 50px;
|
||||||
|
|
||||||
|
.el-input__inner {
|
||||||
|
width: 200px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .footer {
|
||||||
|
.el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,349 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,349 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,349 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,349 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,349 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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="请选择"
|
||||||
|
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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,306 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" 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="请选择" 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="请选择" 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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,306 @@
|
||||||
|
<template>
|
||||||
|
<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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
|
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" 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="请选择" 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="请选择" 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">
|
||||||
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
|
</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="saveInfo">保存</el-button>
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { SaveUserAnswer, GetUserAnswer, GetTree } from "@/api/user";
|
||||||
|
export default {
|
||||||
|
name: "TestDataAcquisition",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
user_id: "",
|
||||||
|
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: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "3C:2D:50:20:30:3D",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
cjdpz_tagid: "",
|
||||||
|
cjdpz_mc: "",
|
||||||
|
cjdpz_sjq: "",
|
||||||
|
cjdpz_jcqdz: "",
|
||||||
|
cjdpz_cjsjlx: "",
|
||||||
|
cjdpz_zjx: "",
|
||||||
|
cjdpz_dxsx: "",
|
||||||
|
cjdpz_beilv: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
wgpz_wgmc: [
|
||||||
|
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wgid: [
|
||||||
|
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||||
|
],
|
||||||
|
wgpz_wglx: [
|
||||||
|
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
outerVisible: true,
|
||||||
|
innerVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveInfo() {
|
||||||
|
this.$refs["formData"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// console.log('submit!');
|
||||||
|
this.innerVisible = true;
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async innerConfirm() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
|
// console.log(JSON.parse(datas));
|
||||||
|
// datas = { ...JSON.parse(datas), ...this.formData };
|
||||||
|
// console.log(datas);
|
||||||
|
let res = await SaveUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
mark_value: JSON.stringify(this.formData),
|
||||||
|
step: "1",
|
||||||
|
});
|
||||||
|
if (res.data.state) {
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
|
||||||
|
this.$router.push(
|
||||||
|
`/channelconfig?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
// console.log(JSON.parse(res.data.data.mark_value));
|
||||||
|
},
|
||||||
|
async getUserAnswer() {
|
||||||
|
this.loading = true;
|
||||||
|
let res2 = await GetUserAnswer({
|
||||||
|
mark: "DB-IotLite_yx",
|
||||||
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301114011710",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
console.log(res2);
|
||||||
|
console.log(res2.data.data.step);
|
||||||
|
if (res2.data.data && res2.data.state) {
|
||||||
|
if (res2.data.data.step == 1) {
|
||||||
|
this.$router.replace(`/channelconfig?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 2) {
|
||||||
|
this.$router.replace(`/dbcollectdevice?user_id=${this.user_id}`);
|
||||||
|
} else if (res2.data.data.step == 3) {
|
||||||
|
this.$router.replace(`/dbcollect?user_id=${this.user_id}`);
|
||||||
|
} else {
|
||||||
|
console.log(res2.data.data.mark_value);
|
||||||
|
let res3 = JSON.parse(res2.data.data.mark_value);
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.user_id = window.location.href.split("?")[1];
|
||||||
|
this.getUserAnswer();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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";
|
||||||
|
}
|
||||||
|
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -743,6 +743,7 @@ export default {
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
// user_id:"USER202307301114011710",
|
// user_id:"USER202307301114011710",
|
||||||
mark_value: JSON.stringify(datas),
|
mark_value: JSON.stringify(datas),
|
||||||
|
step:"3",
|
||||||
});
|
});
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|
|
@ -4,15 +4,8 @@
|
||||||
<!-- <div v-click-outside="closeMenu"> -->
|
<!-- <div v-click-outside="closeMenu"> -->
|
||||||
<!-- <el-button type="info" plain @click="dialogVisible = !dialogVisible">MQTT云</el-button> -->
|
<!-- <el-button type="info" plain @click="dialogVisible = !dialogVisible">MQTT云</el-button> -->
|
||||||
<div v-show="dialogVisible" class="tree_menu">
|
<div v-show="dialogVisible" class="tree_menu">
|
||||||
<el-tree
|
<el-tree :data="trees" node-key="id" :props="defaultProps" default-expand-all @node-contextmenu="rightClick"
|
||||||
:data="trees"
|
@node-click="treeNodeClick" ref="tree">
|
||||||
node-key="id"
|
|
||||||
:props="defaultProps"
|
|
||||||
default-expand-all
|
|
||||||
@node-contextmenu="rightClick"
|
|
||||||
@node-click="treeNodeClick"
|
|
||||||
ref="tree"
|
|
||||||
>
|
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
@ -23,12 +16,7 @@
|
||||||
MQTT Client
|
MQTT Client
|
||||||
</h3>
|
</h3>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-form
|
<el-form :model="formData" :label-position="labelPosition" :rules="rules" ref="formData">
|
||||||
:model="formData"
|
|
||||||
:label-position="labelPosition"
|
|
||||||
:rules="rules"
|
|
||||||
ref="formData"
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -38,50 +26,30 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="serveip">
|
<el-row class="serveip">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="服务器IP:" :label-width="formLabelWidth" prop="mqtt_ip">
|
||||||
label="服务器IP:"
|
|
||||||
:label-width="formLabelWidth"
|
|
||||||
prop="mqtt_ip"
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item prop="mqtt_ip1">
|
<el-form-item prop="mqtt_ip1">
|
||||||
<el-input
|
<el-input v-model="mqtt_ip1" style="width: 43px; height: 30px" maxlength="3">
|
||||||
v-model="mqtt_ip1"
|
|
||||||
style="width: 43px; height: 30px"
|
|
||||||
maxlength="3"
|
|
||||||
>
|
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1">. </el-col>
|
<el-col :span="1">. </el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item prop="mqtt_ip2">
|
<el-form-item prop="mqtt_ip2">
|
||||||
<el-input
|
<el-input v-model="mqtt_ip2" style="width: 43px; height: 30px" maxlength="3"></el-input>
|
||||||
v-model="mqtt_ip2"
|
|
||||||
style="width: 43px; height: 30px"
|
|
||||||
maxlength="3"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1">.</el-col>
|
<el-col :span="1">.</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item prop="mqtt_ip3">
|
<el-form-item prop="mqtt_ip3">
|
||||||
<el-input
|
<el-input v-model="mqtt_ip3" style="width: 43px; height: 30px" maxlength="3"></el-input>
|
||||||
v-model="mqtt_ip3"
|
|
||||||
style="width: 43px; height: 30px"
|
|
||||||
maxlength="3"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1">.</el-col>
|
<el-col :span="1">.</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item prop="mqtt_ip4">
|
<el-form-item prop="mqtt_ip4">
|
||||||
<el-input
|
<el-input v-model="mqtt_ip4" style="width: 43px; height: 30px" maxlength="3"></el-input>
|
||||||
v-model="mqtt_ip4"
|
|
||||||
style="width: 43px; height: 30px"
|
|
||||||
maxlength="3"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -90,63 +58,29 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item
|
<el-form-item label="端口号:" :label-width="formLabelWidth" prop="mqtt_port">
|
||||||
label="端口号:"
|
<el-input v-model="formData.mqtt_port" placeholder="" style="width: 200px; height: 30px"></el-input>
|
||||||
:label-width="formLabelWidth"
|
|
||||||
prop="mqtt_port"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="formData.mqtt_port"
|
|
||||||
placeholder=""
|
|
||||||
style="width: 200px; height: 30px"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item
|
<el-form-item label="网关SN号:" :label-width="formLabelWidth" prop="mqtt_wgsn">
|
||||||
label="网关SN号:"
|
<el-input v-model="formData.mqtt_wgsn" placeholder="" style="width: 200px; height: 30px"></el-input>
|
||||||
:label-width="formLabelWidth"
|
|
||||||
prop="mqtt_wgsn"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="formData.mqtt_wgsn"
|
|
||||||
placeholder=""
|
|
||||||
style="width: 200px; height: 30px"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-row class="theme">
|
<el-row class="theme">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实时数据发布的主题" style="display: block" label-width="168px" prop="mqtt_sssjfbzt">
|
||||||
label="实时数据发布的主题"
|
|
||||||
style="display: block"
|
|
||||||
label-width="168px"
|
|
||||||
prop="mqtt_sssjfbzt"
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-input
|
<el-input v-model="formData.mqtt_sssjfbzt" placeholder="" style="width: 200px"></el-input>
|
||||||
v-model="formData.mqtt_sssjfbzt"
|
|
||||||
placeholder=""
|
|
||||||
style="width: 200px"
|
|
||||||
></el-input>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-select
|
<el-select v-model="formData.mqtt_qos" placeholder="请选择" style="width: 99px">
|
||||||
v-model="formData.mqtt_qos"
|
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 99px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in options1"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -154,58 +88,29 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="retained:" :label-width="formLabelWidth" prop="mqtt_retained">
|
||||||
label="retained:"
|
|
||||||
:label-width="formLabelWidth"
|
|
||||||
prop="mqtt_retained"
|
|
||||||
>
|
|
||||||
<el-switch v-model="formData.mqtt_retained"></el-switch>
|
<el-switch v-model="formData.mqtt_retained"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="上传模式:" :label-width="formLabelWidth" prop="mqtt_scms">
|
||||||
label="上传模式:"
|
<el-select v-model="formData.mqtt_scms" placeholder="请选择" style="width: 99px">
|
||||||
:label-width="formLabelWidth"
|
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
||||||
prop="mqtt_scms"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="formData.mqtt_scms"
|
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 99px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in options2"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="上传周期(s):" label-width="108px" prop="mqtt_sczq">
|
||||||
label="上传周期(s):"
|
<el-input v-model="formData.mqtt_sczq" placeholder="" style="width: 200px; height: 30px"></el-input>
|
||||||
label-width="108px"
|
|
||||||
prop="mqtt_sczq"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="formData.mqtt_sczq"
|
|
||||||
placeholder=""
|
|
||||||
style="width: 200px; height: 30px"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item
|
<el-form-item label="数据过滤:" :label-width="formLabelWidth" prop="mqtt_sjgl">
|
||||||
label="数据过滤:"
|
|
||||||
:label-width="formLabelWidth"
|
|
||||||
prop="mqtt_sjgl"
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-checkbox-group v-model="formData.mqtt_sjgl">
|
<el-checkbox-group v-model="formData.mqtt_sjgl">
|
||||||
|
@ -242,24 +147,16 @@
|
||||||
<el-table-column property="mqtt_cjd_sbmc" label="设备名称">
|
<el-table-column property="mqtt_cjd_sbmc" label="设备名称">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.mqtt_cjd_sbmc" placeholder="">
|
<el-select v-model="scope.row.mqtt_cjd_sbmc" placeholder="">
|
||||||
<el-option
|
<el-option v-for="(option, index) in options2" :key="index" :label="option.label"
|
||||||
v-for="(option, index) in options2"
|
:value="option.value"></el-option>
|
||||||
:key="index"
|
|
||||||
:label="option.label"
|
|
||||||
:value="option.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column property="mqtt_cjd_tagid" label="TagID">
|
<el-table-column property="mqtt_cjd_tagid" label="TagID">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.mqtt_cjd_tagid" placeholder="">
|
<el-select v-model="scope.row.mqtt_cjd_tagid" placeholder="">
|
||||||
<el-option
|
<el-option v-for="(option, index) in options3" :key="index" :label="option.label"
|
||||||
v-for="(option, index) in options3"
|
:value="option.value"></el-option>
|
||||||
:key="index"
|
|
||||||
:label="option.label"
|
|
||||||
:value="option.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -270,14 +167,8 @@
|
||||||
<!-- 添加按钮下显示出来的弹框信息 -->
|
<!-- 添加按钮下显示出来的弹框信息 -->
|
||||||
<div>
|
<div>
|
||||||
<el-dialog title="选择点" :visible.sync="choose_point" width="30%">
|
<el-dialog title="选择点" :visible.sync="choose_point" width="30%">
|
||||||
<el-tree
|
<el-tree :data="points" show-checkbox node-key="id" :default-expanded-keys="[1, 2]"
|
||||||
:data="points"
|
:default-checked-keys="[3, 4, 5, 6]" :props="defaultProps">
|
||||||
show-checkbox
|
|
||||||
node-key="id"
|
|
||||||
:default-expanded-keys="[1, 2]"
|
|
||||||
:default-checked-keys="[3, 4, 5, 6]"
|
|
||||||
:props="defaultProps"
|
|
||||||
>
|
|
||||||
</el-tree>
|
</el-tree>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="savePoint">保 存</el-button>
|
<el-button type="primary" @click="savePoint">保 存</el-button>
|
||||||
|
@ -288,55 +179,22 @@
|
||||||
|
|
||||||
<div class="gateway">
|
<div class="gateway">
|
||||||
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
||||||
<el-form
|
<el-form :model="formData" :rules="rulesGate" ref="gateWay" label-width="85px" class="demo-ruleForm">
|
||||||
:model="formData"
|
|
||||||
:rules="rulesGate"
|
|
||||||
ref="gateWay"
|
|
||||||
label-width="85px"
|
|
||||||
class="demo-ruleForm"
|
|
||||||
>
|
|
||||||
<el-form-item label="网关名称:" prop="wgpz_wgmc">
|
<el-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
<el-select
|
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" style="width: 200px">
|
||||||
v-model="formData.wgpz_wgmc"
|
<el-option v-for="item in opts1" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in opts1"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
||||||
<el-select
|
<el-select v-model="formData.wgpz_wgid" placeholder="请选择" style="width: 200px">
|
||||||
v-model="formData.wgpz_wgid"
|
<el-option v-for="item in opts2" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in opts2"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网关类型:" prop="wgpz_wglx">
|
<el-form-item label="网关类型:" prop="wgpz_wglx">
|
||||||
<el-select
|
<el-select v-model="formData.wgpz_wglx" placeholder="请选择" style="width: 200px">
|
||||||
v-model="formData.wgpz_wglx"
|
<el-option v-for="item in opts3" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in opts3"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -777,24 +635,24 @@ export default {
|
||||||
validateIp(rule, value, callback) {
|
validateIp(rule, value, callback) {
|
||||||
if (
|
if (
|
||||||
this.mqtt_ip1 +
|
this.mqtt_ip1 +
|
||||||
"." +
|
"." +
|
||||||
this.mqtt_ip2 +
|
this.mqtt_ip2 +
|
||||||
"." +
|
"." +
|
||||||
this.mqtt_ip3 +
|
this.mqtt_ip3 +
|
||||||
"." +
|
"." +
|
||||||
this.mqtt_ip4 ===
|
this.mqtt_ip4 ===
|
||||||
"..."
|
"..."
|
||||||
) {
|
) {
|
||||||
callback(new Error("请输入IP地址"));
|
callback(new Error("请输入IP地址"));
|
||||||
} else if (
|
} else if (
|
||||||
!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
||||||
this.mqtt_ip1 +
|
this.mqtt_ip1 +
|
||||||
"." +
|
"." +
|
||||||
this.mqtt_ip2 +
|
this.mqtt_ip2 +
|
||||||
"." +
|
"." +
|
||||||
this.mqtt_ip3 +
|
this.mqtt_ip3 +
|
||||||
"." +
|
"." +
|
||||||
this.mqtt_ip4
|
this.mqtt_ip4
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
callback(new Error("请输入有效的IP地址"));
|
callback(new Error("请输入有效的IP地址"));
|
||||||
|
@ -866,6 +724,7 @@ export default {
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
// user_id:"USER202307301114011710",
|
// user_id:"USER202307301114011710",
|
||||||
mark_value: JSON.stringify(datas),
|
mark_value: JSON.stringify(datas),
|
||||||
|
step: "3",
|
||||||
});
|
});
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|
|
@ -203,35 +203,6 @@ export default {
|
||||||
nodekey: "",
|
nodekey: "",
|
||||||
tableData: [
|
tableData: [
|
||||||
{
|
{
|
||||||
ippz_wangkou: "",
|
|
||||||
ippz_zwym: "",
|
|
||||||
ippz_mrwg: "",
|
|
||||||
ippz_dns_sx: "",
|
|
||||||
ippz_dns_by: "",
|
|
||||||
ippz_ip: "",
|
|
||||||
ippz_mac: "",
|
|
||||||
wgpz_wgmc: "",
|
|
||||||
wgpz_wgid: "",
|
|
||||||
wgpz_wglx: "",
|
|
||||||
tdpz_tdmc: "",
|
|
||||||
tdpz_td: "",
|
|
||||||
tdpz_qdmc: "",
|
|
||||||
tdpz_ip: "",
|
|
||||||
tdpz_port: "",
|
|
||||||
tdpz_cssj: "",
|
|
||||||
tdpz_jgsj: "",
|
|
||||||
tdpz_lxsj: "",
|
|
||||||
tdpz_cfcs: "",
|
|
||||||
tdpz_watchtime: "",
|
|
||||||
tdpz_cjsylxdz: "",
|
|
||||||
tdpz_dxzkb: "",
|
|
||||||
tdpz_050F: "",
|
|
||||||
tdpz_0610: "",
|
|
||||||
sbpz_sbid: "",
|
|
||||||
sbpz_sbmc: "",
|
|
||||||
sbpz_mac: "",
|
|
||||||
sbpz_jysb: "",
|
|
||||||
sbpz_jdzxz: "",
|
|
||||||
cjdpz_tagid: "",
|
cjdpz_tagid: "",
|
||||||
cjdpz_mc: "",
|
cjdpz_mc: "",
|
||||||
cjdpz_sjq: "",
|
cjdpz_sjq: "",
|
||||||
|
@ -240,19 +211,50 @@ export default {
|
||||||
cjdpz_zjx: "",
|
cjdpz_zjx: "",
|
||||||
cjdpz_dxsx: "",
|
cjdpz_dxsx: "",
|
||||||
cjdpz_beilv: "",
|
cjdpz_beilv: "",
|
||||||
mqtt_qiyong: "",
|
|
||||||
mqtt_ip: "",
|
|
||||||
mqtt_port: "",
|
|
||||||
mqtt_wgsn: "",
|
|
||||||
mqtt_sssjfbzt: "",
|
|
||||||
mqtt_qos: "",
|
|
||||||
mqtt_scms: "",
|
|
||||||
mqtt_sczq: "",
|
|
||||||
mqtt_sjgl: "",
|
|
||||||
mqtt_cjd_sbmc: "",
|
|
||||||
mqtt_cjd_tagid: "",
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
formData: {
|
||||||
|
ippz_wangkou: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_sx: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_mac: "",
|
||||||
|
wgpz_wgmc: "",
|
||||||
|
wgpz_wgid: "",
|
||||||
|
wgpz_wglx: "",
|
||||||
|
tdpz_tdmc: "",
|
||||||
|
tdpz_td: "",
|
||||||
|
tdpz_qdmc: "",
|
||||||
|
tdpz_ip: "",
|
||||||
|
tdpz_port: "",
|
||||||
|
tdpz_cssj: "",
|
||||||
|
tdpz_jgsj: "",
|
||||||
|
tdpz_lxsj: "",
|
||||||
|
tdpz_cfcs: "",
|
||||||
|
tdpz_watchtime: "",
|
||||||
|
tdpz_cjsylxdz: "",
|
||||||
|
tdpz_dxzkb: "",
|
||||||
|
tdpz_050F: "",
|
||||||
|
tdpz_0610: "",
|
||||||
|
sbpz_sbid: "",
|
||||||
|
sbpz_sbmc: "",
|
||||||
|
sbpz_mac: "",
|
||||||
|
sbpz_jysb: "",
|
||||||
|
sbpz_jdzxz: "",
|
||||||
|
mqtt_qiyong: "",
|
||||||
|
mqtt_ip: "",
|
||||||
|
mqtt_port: "",
|
||||||
|
mqtt_wgsn: "",
|
||||||
|
mqtt_sssjfbzt: "",
|
||||||
|
mqtt_qos: "",
|
||||||
|
mqtt_scms: "",
|
||||||
|
mqtt_sczq: "",
|
||||||
|
mqtt_sjgl: "",
|
||||||
|
mqtt_cjd_sbmc: "",
|
||||||
|
mqtt_cjd_tagid: "",
|
||||||
|
},
|
||||||
options1: [
|
options1: [
|
||||||
{
|
{
|
||||||
value: "MachinePamHID909",
|
value: "MachinePamHID909",
|
||||||
|
@ -867,11 +869,61 @@ export default {
|
||||||
// console.log(this.tableData);
|
// console.log(this.tableData);
|
||||||
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
// let datas = sessionStorage.getItem("DB-IotLite_yx");
|
||||||
// this.tableData = { ...JSON.parse(datas), ...this.tableData[0] };
|
// this.tableData = { ...JSON.parse(datas), ...this.tableData[0] };
|
||||||
|
let obj = {
|
||||||
|
ippz_wangkou: this.formData.ippz_wangkou,
|
||||||
|
ippz_zwym: this.formData.ippz_zwym,
|
||||||
|
ippz_mrwg: this.formData.ippz_mrwg,
|
||||||
|
ippz_dns_sx: this.formData.ippz_dns_sx,
|
||||||
|
ippz_dns_by: this.formData.ippz_dns_by,
|
||||||
|
ippz_ip: this.formData.ippz_ip,
|
||||||
|
ippz_mac: this.formData.ippz_mac,
|
||||||
|
wgpz_wgmc: this.formData.wgpz_wgmc,
|
||||||
|
wgpz_wgid: this.formData.wgpz_wgid,
|
||||||
|
wgpz_wglx: this.formData.wgpz_wglx,
|
||||||
|
tdpz_tdmc: this.formData.tdpz_tdmc,
|
||||||
|
tdpz_td: this.formData.tdpz_td,
|
||||||
|
tdpz_qdmc: this.formData.tdpz_qdmc,
|
||||||
|
tdpz_ip: this.formData.tdpz_ip,
|
||||||
|
tdpz_port: this.formData.tdpz_port,
|
||||||
|
tdpz_cssj: this.formData.tdpz_cssj,
|
||||||
|
tdpz_jgsj: this.formData.tdpz_jgsj,
|
||||||
|
tdpz_lxsj: this.formData.tdpz_lxsj,
|
||||||
|
tdpz_cfcs: this.formData.tdpz_cfcs,
|
||||||
|
tdpz_watchtime: this.formData.tdpz_watchtime,
|
||||||
|
tdpz_cjsylxdz: this.formData.tdpz_cjsylxdz,
|
||||||
|
tdpz_dxzkb: this.formData.tdpz_dxzkb,
|
||||||
|
tdpz_050F: this.formData.tdpz_050F,
|
||||||
|
tdpz_0610: this.formData.tdpz_0610,
|
||||||
|
sbpz_sbid: this.formData.sbpz_sbid,
|
||||||
|
sbpz_sbmc: this.formData.sbpz_sbmc,
|
||||||
|
sbpz_mac: this.formData.sbpz_mac,
|
||||||
|
sbpz_jysb: this.formData.sbpz_jysb,
|
||||||
|
sbpz_jdzxz: this.formData.sbpz_jdzxz,
|
||||||
|
mqtt_qiyong: this.formData.mqtt_qiyong,
|
||||||
|
mqtt_ip: this.formData.mqtt_ip,
|
||||||
|
mqtt_port: this.formData.mqtt_port,
|
||||||
|
mqtt_wgsn: this.formData.mqtt_wgsn,
|
||||||
|
mqtt_sssjfbzt: this.formData.mqtt_sssjfbzt,
|
||||||
|
mqtt_qos: this.formData.mqtt_qos,
|
||||||
|
mqtt_scms: this.formData.mqtt_scms,
|
||||||
|
mqtt_sczq: this.formData.mqtt_sczq,
|
||||||
|
mqtt_sjgl: this.formData.mqtt_sjgl,
|
||||||
|
mqtt_cjd_sbmc: this.formData.mqtt_cjd_sbmc,
|
||||||
|
mqtt_cjd_tagid: this.formData.mqtt_cjd_tagid,
|
||||||
|
cjdpz_tagid: this.tableData[0].cjdpz_tagid,
|
||||||
|
cjdpz_mc: this.tableData[0].cjdpz_mc,
|
||||||
|
cjdpz_sjq: this.tableData[0].cjdpz_sjq,
|
||||||
|
cjdpz_jcqdz: this.tableData[0].cjdpz_jcqdz,
|
||||||
|
cjdpz_cjsjlx: this.tableData[0].cjdpz_cjsjlx,
|
||||||
|
cjdpz_zjx: this.tableData[0].cjdpz_zjx,
|
||||||
|
cjdpz_dxsx: this.tableData[0].cjdpz_dxsx,
|
||||||
|
cjdpz_beilv: this.tableData[0].cjdpz_beilv,
|
||||||
|
}
|
||||||
let res = await SaveUserAnswer({
|
let res = await SaveUserAnswer({
|
||||||
mark: "DB-IotLite_yx",
|
mark: "DB-IotLite_yx",
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301114011710",
|
// user_id: "USER202307301114011710",
|
||||||
mark_value: JSON.stringify(this.tableData[0]),
|
mark_value: JSON.stringify(obj),
|
||||||
});
|
});
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
@ -881,7 +933,7 @@ export default {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
sessionStorage.setItem(
|
sessionStorage.setItem(
|
||||||
"DB-IotLite_yx",
|
"DB-IotLite_yx",
|
||||||
JSON.stringify(this.tableData[0])
|
JSON.stringify(obj)
|
||||||
);
|
);
|
||||||
// console.log(this.tableData);
|
// console.log(this.tableData);
|
||||||
} else {
|
} else {
|
||||||
|
@ -916,45 +968,45 @@ export default {
|
||||||
this.tableData[0].cjdpz_dxsx = obj.cjdpz_dxsx;
|
this.tableData[0].cjdpz_dxsx = obj.cjdpz_dxsx;
|
||||||
this.tableData[0].cjdpz_beilv = obj.cjdpz_beilv;
|
this.tableData[0].cjdpz_beilv = obj.cjdpz_beilv;
|
||||||
}
|
}
|
||||||
this.tableData[0].ippz_wangkou = obj.ippz_wangkou;
|
this.formData.ippz_wangkou = obj.ippz_wangkou;
|
||||||
this.tableData[0].ippz_mrwg = obj.ippz_mrwg;
|
this.formData.ippz_mrwg = obj.ippz_mrwg;
|
||||||
this.tableData[0].ippz_ip = obj.ippz_ip;
|
this.formData.ippz_ip = obj.ippz_ip;
|
||||||
this.tableData[0].ippz_zwym = obj.ippz_zwym;
|
this.formData.ippz_zwym = obj.ippz_zwym;
|
||||||
this.tableData[0].ippz_dns_sx = obj.ippz_dns_sx;
|
this.formData.ippz_dns_sx = obj.ippz_dns_sx;
|
||||||
this.tableData[0].ippz_dns_by = obj.ippz_dns_by;
|
this.formData.ippz_dns_by = obj.ippz_dns_by;
|
||||||
this.tableData[0].wgpz_wgmc = obj.wgpz_wgmc;
|
this.formData.wgpz_wgmc = obj.wgpz_wgmc;
|
||||||
this.tableData[0].wgpz_wgid = obj.wgpz_wgid;
|
this.formData.wgpz_wgid = obj.wgpz_wgid;
|
||||||
this.tableData[0].wgpz_wglx = obj.wgpz_wglx;
|
this.formData.wgpz_wglx = obj.wgpz_wglx;
|
||||||
this.tableData[0].tdpz_tdmc = obj.tdpz_tdmc;
|
this.formData.tdpz_tdmc = obj.tdpz_tdmc;
|
||||||
this.tableData[0].tdpz_td = obj.tdpz_td;
|
this.formData.tdpz_td = obj.tdpz_td;
|
||||||
this.tableData[0].tdpz_qdmc = obj.tdpz_qdmc;
|
this.formData.tdpz_qdmc = obj.tdpz_qdmc;
|
||||||
this.tableData[0].tdpz_ip = obj.tdpz_ip;
|
this.formData.tdpz_ip = obj.tdpz_ip;
|
||||||
this.tableData[0].tdpz_port = obj.tdpz_port;
|
this.formData.tdpz_port = obj.tdpz_port;
|
||||||
this.tableData[0].tdpz_cssj = obj.tdpz_cssj;
|
this.formData.tdpz_cssj = obj.tdpz_cssj;
|
||||||
this.tableData[0].tdpz_jgsj = obj.tdpz_jgsj;
|
this.formData.tdpz_jgsj = obj.tdpz_jgsj;
|
||||||
this.tableData[0].tdpz_lxsj = obj.tdpz_lxsj;
|
this.formData.tdpz_lxsj = obj.tdpz_lxsj;
|
||||||
this.tableData[0].tdpz_cfcs = obj.tdpz_cfcs;
|
this.formData.tdpz_cfcs = obj.tdpz_cfcs;
|
||||||
this.tableData[0].tdpz_watchtime = obj.tdpz_watchtime;
|
this.formData.tdpz_watchtime = obj.tdpz_watchtime;
|
||||||
this.tableData[0].tdpz_cjsylxdz = obj.tdpz_cjsylxdz;
|
this.formData.tdpz_cjsylxdz = obj.tdpz_cjsylxdz;
|
||||||
this.tableData[0].tdpz_dxzkb = obj.tdpz_dxzkb;
|
this.formData.tdpz_dxzkb = obj.tdpz_dxzkb;
|
||||||
this.tableData[0].tdpz_050F = obj.tdpz_050F;
|
this.formData.tdpz_050F = obj.tdpz_050F;
|
||||||
this.tableData[0].tdpz_0610 = obj.tdpz_0610;
|
this.formData.tdpz_0610 = obj.tdpz_0610;
|
||||||
this.tableData[0].sbpz_sbid = obj.sbpz_sbid;
|
this.formData.sbpz_sbid = obj.sbpz_sbid;
|
||||||
this.tableData[0].sbpz_sbmc = obj.sbpz_sbmc;
|
this.formData.sbpz_sbmc = obj.sbpz_sbmc;
|
||||||
this.tableData[0].sbpz_mac = obj.sbpz_mac;
|
this.formData.sbpz_mac = obj.sbpz_mac;
|
||||||
this.tableData[0].sbpz_jysb = Boolean(Number(obj.sbpz_jysb));
|
this.formData.sbpz_jysb = Boolean(Number(obj.sbpz_jysb));
|
||||||
this.tableData[0].sbpz_jdzxz = Boolean(Number(obj.sbpz_jdzxz));
|
this.formData.sbpz_jdzxz = Boolean(Number(obj.sbpz_jdzxz));
|
||||||
this.tableData[0].mqtt_qiyong = obj.mqtt_qiyong;
|
this.formData.mqtt_qiyong = obj.mqtt_qiyong;
|
||||||
this.tableData[0].mqtt_ip = obj.mqtt_ip;
|
this.formData.mqtt_ip = obj.mqtt_ip;
|
||||||
this.tableData[0].mqtt_port = obj.mqtt_port;
|
this.formData.mqtt_port = obj.mqtt_port;
|
||||||
this.tableData[0].mqtt_wgsn = obj.mqtt_wgsn;
|
this.formData.mqtt_wgsn = obj.mqtt_wgsn;
|
||||||
this.tableData[0].mqtt_sssjfbzt = obj.mqtt_sssjfbzt;
|
this.formData.mqtt_sssjfbzt = obj.mqtt_sssjfbzt;
|
||||||
this.tableData[0].mqtt_qos = obj.mqtt_qos;
|
this.formData.mqtt_qos = obj.mqtt_qos;
|
||||||
this.tableData[0].mqtt_scms = obj.mqtt_scms;
|
this.formData.mqtt_scms = obj.mqtt_scms;
|
||||||
this.tableData[0].mqtt_sczq = obj.mqtt_sczq;
|
this.formData.mqtt_sczq = obj.mqtt_sczq;
|
||||||
this.tableData[0].mqtt_sjgl = obj.mqtt_sjgl;
|
this.formData.mqtt_sjgl = obj.mqtt_sjgl;
|
||||||
this.tableData[0].mqtt_cjd_sbmc = obj.mqtt_cjd_sbmc;
|
this.formData.mqtt_cjd_sbmc = obj.mqtt_cjd_sbmc;
|
||||||
this.tableData[0].mqtt_cjd_tagid = obj.mqtt_cjd_tagid;
|
this.formData.mqtt_cjd_tagid = obj.mqtt_cjd_tagid;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async sendTree() {
|
async sendTree() {
|
||||||
|
|
|
@ -1,71 +1,28 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px" v-loading="loading">
|
||||||
title="新建网关"
|
<el-form :model="formData" :rules="rules" ref="formData" label-width="85px" class="demo-ruleForm">
|
||||||
: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-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
<el-select
|
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" style="width: 200px">
|
||||||
v-model="formData.wgpz_wgmc"
|
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in options1"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
||||||
<el-select
|
<el-select v-model="formData.wgpz_wgid" placeholder="请选择" style="width: 200px">
|
||||||
v-model="formData.wgpz_wgid"
|
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in options2"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网关类型:" prop="wgpz_wglx">
|
<el-form-item label="网关类型:" prop="wgpz_wglx">
|
||||||
<el-select
|
<el-select v-model="formData.wgpz_wglx" placeholder="请选择" style="width: 200px">
|
||||||
v-model="formData.wgpz_wglx"
|
<el-option v-for="item in options3" :key="item.value" :label="item.label" :value="item.value">
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in options3"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-dialog
|
<el-dialog width="382px" title="系统提示" :visible.sync="innerVisible" append-to-body>
|
||||||
width="382px"
|
|
||||||
title="系统提示"
|
|
||||||
:visible.sync="innerVisible"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<p class="inner_content" style="color: #fff !important">
|
<p class="inner_content" style="color: #fff !important">
|
||||||
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
</p>
|
</p>
|
||||||
|
@ -275,52 +232,52 @@ export default {
|
||||||
this.formData.wgpz_wglx = res3.wgpz_wglx;
|
this.formData.wgpz_wglx = res3.wgpz_wglx;
|
||||||
}
|
}
|
||||||
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
this.formData.ippz_wangkou = res3.ippz_wangkou;
|
||||||
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
this.formData.ippz_mrwg = res3.ippz_mrwg;
|
||||||
this.formData.ippz_ip = res3.ippz_ip;
|
this.formData.ippz_ip = res3.ippz_ip;
|
||||||
this.formData.ippz_zwym = res3.ippz_zwym;
|
this.formData.ippz_zwym = res3.ippz_zwym;
|
||||||
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
this.formData.ippz_dns_sx = res3.ippz_dns_sx;
|
||||||
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
this.formData.ippz_dns_by = res3.ippz_dns_by;
|
||||||
this.formData.ippz_mac = res3.ippz_mac;
|
this.formData.ippz_mac = res3.ippz_mac;
|
||||||
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
|
||||||
this.formData.tdpz_td = res3.tdpz_td;
|
this.formData.tdpz_td = res3.tdpz_td;
|
||||||
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
|
||||||
this.formData.tdpz_ip = res3.tdpz_ip;
|
this.formData.tdpz_ip = res3.tdpz_ip;
|
||||||
this.formData.tdpz_port = res3.tdpz_port;
|
this.formData.tdpz_port = res3.tdpz_port;
|
||||||
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
this.formData.tdpz_cssj = res3.tdpz_cssj;
|
||||||
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
this.formData.tdpz_jgsj = res3.tdpz_jgsj;
|
||||||
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
this.formData.tdpz_lxsj = res3.tdpz_lxsj;
|
||||||
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
this.formData.tdpz_cfcs = res3.tdpz_cfcs;
|
||||||
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
this.formData.tdpz_watchtime = res3.tdpz_watchtime;
|
||||||
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
this.formData.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
|
||||||
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
this.formData.tdpz_dxzkb = res3.tdpz_dxzkb;
|
||||||
this.formData.tdpz_050F = res3.tdpz_050F;
|
this.formData.tdpz_050F = res3.tdpz_050F;
|
||||||
this.formData.tdpz_0610 = res3.tdpz_0610;
|
this.formData.tdpz_0610 = res3.tdpz_0610;
|
||||||
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
this.formData.sbpz_sbid = res3.sbpz_sbid;
|
||||||
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
this.formData.sbpz_sbmc = res3.sbpz_sbmc;
|
||||||
this.formData.sbpz_mac = res3.sbpz_mac;
|
this.formData.sbpz_mac = res3.sbpz_mac;
|
||||||
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
this.formData.sbpz_jysb = res3.sbpz_jysb;
|
||||||
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
this.formData.sbpz_jdzxz = res3.sbpz_jdzxz;
|
||||||
|
|
||||||
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
this.formData.cjdpz_tagid = res3.cjdpz_tagid;
|
||||||
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
this.formData.cjdpz_mc = res3.cjdpz_mc;
|
||||||
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
this.formData.cjdpz_sjq = res3.cjdpz_sjq;
|
||||||
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
this.formData.cjdpz_jcqdz = res3.cjdpz_jcqdz;
|
||||||
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
this.formData.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
|
||||||
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
this.formData.cjdpz_zjx = res3.cjdpz_zjx;
|
||||||
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
this.formData.cjdpz_dxsx = res3.cjdpz_dxsx;
|
||||||
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
this.formData.cjdpz_beilv = res3.cjdpz_beilv;
|
||||||
|
|
||||||
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
this.formData.mqtt_qiyong = res3.mqtt_qiyong;
|
||||||
this.formData.mqtt_ip = res3.mqtt_ip;
|
this.formData.mqtt_ip = res3.mqtt_ip;
|
||||||
this.formData.mqtt_port = res3.mqtt_port;
|
this.formData.mqtt_port = res3.mqtt_port;
|
||||||
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
this.formData.mqtt_wgsn = res3.mqtt_wgsn;
|
||||||
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
this.formData.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
|
||||||
this.formData.mqtt_qos = res3.mqtt_qos;
|
this.formData.mqtt_qos = res3.mqtt_qos;
|
||||||
this.formData.mqtt_scms = res3.mqtt_scms;
|
this.formData.mqtt_scms = res3.mqtt_scms;
|
||||||
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
this.formData.mqtt_sczq = res3.mqtt_sczq;
|
||||||
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
this.formData.mqtt_sjgl = res3.mqtt_sjgl;
|
||||||
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
this.formData.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
|
||||||
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
this.formData.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue