This commit is contained in:
unknown 2023-11-13 17:29:01 +08:00
parent 6f632d9ff1
commit 40110d017a
10 changed files with 339 additions and 69 deletions

View File

@ -177,21 +177,21 @@
<div class="gateway">
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
<el-form :model="gateWay" :rules="rulesGate" ref="gateWay" label-width="85px" class="demo-ruleForm">
<el-form :model="formData" :rules="rulesGate" ref="gateWay" label-width="85px" class="demo-ruleForm">
<el-form-item label="网关名称:" prop="wgpz_wgmc">
<el-select v-model="gateWay.wgpz_wgmc" placeholder="请选择" style="width: 200px">
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" style="width: 200px">
<el-option v-for="item in opts1" :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="gateWay.wgpz_wgid" placeholder="请选择" style="width: 200px">
<el-select v-model="formData.wgpz_wgid" placeholder="请选择" style="width: 200px">
<el-option v-for="item in opts2" :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="gateWay.wgpz_wglx" placeholder="请选择" style="width: 200px">
<el-select v-model="formData.wgpz_wglx" placeholder="请选择" style="width: 200px">
<el-option v-for="item in opts3" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@ -708,17 +708,17 @@ export default {
// return false
// }
// },
async handleSelect() {
let datas = sessionStorage.getItem("answer");
this.tableData = { ...JSON.parse(datas), ...this.tableData[0] };
let res = await SaveUserAnswer({
mark: "DB-IotLite_yx",
user_id: this.user_id,
mark_value: JSON.stringify(this.tableData),
});
// console.log(res);
sessionStorage.setItem("answer", JSON.stringify(this.tableData));
},
// async handleSelect() {
// let datas = sessionStorage.getItem("answer");
// this.tableData = { ...JSON.parse(datas), ...this.tableData[0] };
// let res = await SaveUserAnswer({
// mark: "DB-IotLite_yx",
// user_id: this.user_id,
// mark_value: JSON.stringify(this.tableData),
// });
// // console.log(res);
// sessionStorage.setItem("answer", JSON.stringify(this.tableData));
// },
closeMenu(ev) {
// console.log({ ev });
this.dialogVisible = false;
@ -746,7 +746,7 @@ export default {
};
// console.log("1231");
// console.log(JSON.parse(datas));
let datas = { ...formData, ...obj };
let datas = { ...this.formData, ...obj };
let res = await SaveUserAnswer({
mark: "DB-IotLite_yx",
user_id: this.user_id,
@ -875,8 +875,8 @@ export default {
this.outerVisible = false;
// this.innerVisible = false;
// console.log(JSON.parse(datas));
// let datas = { ...this.f, ...this.gateWay };
console.log(datas);
// let datas = { ...this.f, ...this.gateWay };
// console.log(datas);
let res = await SaveUserAnswer({
mark: "DB-IotLite_yx",
user_id: this.user_id,
@ -888,9 +888,9 @@ export default {
message: "修改成功",
type: "success",
});
this.trees[0].label = this.gateWay.wgpz_wgid;
this.trees[0].label = this.formData.wgpz_wgid;
this.sendTree();
sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.gateWay));
sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
} else {
this.$message({
message: `保存失败,原因是${res.data.message}`,

View File

@ -747,7 +747,7 @@ export default {
// this.gateWay.wgpz_wglx = obj.wgpz_wglx;
// }
}
if (node.level == 4) {
if (node.level == 5) {
this.menuShow = false;
this.menuShow = true;
this.nodekey = data.id;
@ -1016,7 +1016,7 @@ export default {
user_id: this.user_id,
// user_id: "USER202307301114011710",
mark_value: JSON.stringify(this.tableData[0]),
step: "3",
// step: "3",
});
if (res.data.state) {
this.$message({

View File

@ -97,9 +97,60 @@ export default {
],
value: "",
formData: {
ippz_lwfs: "",
ippz_wangkou: "",
ippz_zwym: "",
ippz_mrwg: "",
ippz_dns_sx: "",
ippz_dns_by: "",
ippz_ip: "",
ippz_mac: "",
ippz_wifi_ssid: "",
ippz_wifi_mm: "",
wgpz_wgmc: "",
wgpz_wgid: "",
wgpz_wglx: "",
tdpz_tdmc: "",
tdpz_td: "",
tdpz_qdmc: "",
tdpz_chuankou: "",
tdpz_btl: "",
tdpz_sjw: "",
tdpz_tzw: "",
tdpz_jojy: "",
tdpz_cgsj: "",
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: [
@ -135,14 +186,14 @@ export default {
async innerConfirm() {
this.outerVisible = false;
this.innerVisible = false;
let datas = sessionStorage.getItem("DB-IotLite_wx");
console.log(JSON.parse(datas));
this.formdata = { ...JSON.parse(datas), ...this.formdata };
// let datas = sessionStorage.getItem("DB-IotLite_wx");
// console.log(JSON.parse(datas));
// this.formdata = { ...JSON.parse(datas), ...this.formdata };
// console.log(this.formdata);
let res = await SaveUserAnswer({
mark: "DB-IotLite_wx",
user_id: this.user_id,
mark_value: JSON.stringify(this.formdata),
mark_value: JSON.stringify(this.formData),
step: "1",
});
if (res.data.state) {
@ -150,7 +201,7 @@ export default {
message: "保存成功",
type: "success",
});
sessionStorage.setItem("DB-IotLite_wx", JSON.stringify(this.formdata));
sessionStorage.setItem("DB-IotLite_wx", JSON.stringify(this.formData));
this.$router.replace(`/dbcollectserial?user_id=${this.user_id}`);
} else {
this.$message({
@ -164,7 +215,7 @@ export default {
async getUserAnswer() {
this.loading = true;
let res2 = await GetUserAnswer({
mark: "DB-IotLite_yx",
mark: "DB-IotLite_wx",
user_id: this.user_id,
});
this.loading = false;
@ -184,6 +235,60 @@ export default {
this.formData.wgpz_wgmc = res3.wgpz_wgmc;
this.formData.wgpz_wglx = res3.wgpz_wglx;
}
this.formData.ippz_wangkou = res3.ippz_wangkou;
this.formData.ippz_lwfs = res3.ippz_lwfs;
this.formData.ippz_zwym = res3.ippz_zwym;
this.formData.ippz_mrwg = res3.ippz_mrwg;
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.ippz_wifi_ssid = res3.ippz_wifi_ssid;
this.formData.ippz_wifi_mm = res3.ippz_wifi_mm;
this.formData.tdpz_tdmc = res3.tdpz_tdmc;
this.formData.tdpz_td = res3.tdpz_td;
this.formData.tdpz_qdmc = res3.tdpz_qdmc;
this.formData.tdpz_chuankou = res3.tdpz_chuankou;
this.formData.tdpz_btl = res3.tdpz_btl;
this.formData.tdpz_sjw = res3.tdpz_sjw;
this.formData.tdpz_tzw = res3.tdpz_tzw;
this.formData.tdpz_jojy = res3.tdpz_jojy;
this.formData.tdpz_cgsj = res3.tdpz_cgsj;
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;
}
}
},

View File

@ -186,8 +186,8 @@ export default {
// console.log(datas);
let res = await SaveUserAnswer({
mark: "DB-IotLite_yx",
// user_id: this.user_id,
user_id: "USER202307301114011710",
user_id: this.user_id,
// user_id: "USER202307301114011710",
mark_value: JSON.stringify(this.formData),
step: "1",
});
@ -211,13 +211,12 @@ export default {
this.loading = true;
let res2 = await GetUserAnswer({
mark: "DB-IotLite_yx",
// user_id: this.user_id,
user_id: "USER202307301114011710",
user_id: this.user_id,
// user_id: "USER202307301114011710",
});
this.loading = false;
console.log(res2);
// console.log(res2.data.data.step);
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}`)

View File

@ -6,8 +6,8 @@
<div class="form_content">
<div>
<p class="netWay">网络方式</p>
<el-radio v-model="ruleForm.ippz_lwfs" label="1" style="color:white;">有线</el-radio>
<el-radio v-model="ruleForm.ippz_lwfs" label="2" style="color:white;">WIFI</el-radio>
<el-radio v-model="ruleForm.ippz_lwfs" label="有线" style="color:white;">有线</el-radio>
<el-radio v-model="ruleForm.ippz_lwfs" label="无线" style="color:white;">WIFI</el-radio>
<el-divider></el-divider>
</div>
<!-- v-if="ippz_lwfs == 1 ? true : false" -->
@ -310,16 +310,60 @@ export default {
return {
user_id: "",
ruleForm: {
ippz_lwfs: "2",
ippz_lwfs: "无线",
ippz_wangkou: "",
ippz_zwym: "2",
ippz_mrwg: "3",
ippz_dns_sx: "4",
ippz_dns_by: "5",
ippz_zwym: "",
ippz_mrwg: "",
ippz_dns_sx: "",
ippz_dns_by: "",
ippz_ip: "6",
ippz_mac: "3C:2D:50:20:30:3D",
ippz_wifi_ssid: "",
ippz_wifi_mm: "",
wgpz_wgmc: "",
wgpz_wgid: "",
wgpz_wglx: "",
tdpz_tdmc: "",
tdpz_td: "",
tdpz_qdmc: "",
tdpz_chuankou: "",
tdpz_btl: "",
tdpz_sjw: "",
tdpz_tzw: "",
tdpz_jojy: "",
tdpz_cgsj: "",
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: "",
},
labelPosition: "left",
@ -619,10 +663,11 @@ export default {
ippz_wifi_ssid: this.ruleForm.ippz_wifi_ssid,
ippz_wifi_mm: this.ruleForm.ippz_wifi_mm,
}
let datas = { ...this.ruleForm, ...obj };
let res = await SaveUserAnswer({
mark: "DB-IotLite_wx",
user_id: this.user_id,
mark_value: JSON.stringify(obj),
mark_value: JSON.stringify(datas),
});
if (res.data.state) {
this.$message({
@ -636,7 +681,7 @@ export default {
});
}
console.log(res);
sessionStorage.setItem("DB-IotLite_wx", JSON.stringify(obj));
sessionStorage.setItem("DB-IotLite_wx", JSON.stringify(datas));
},
CopyText() {
this.$message({
@ -656,8 +701,6 @@ export default {
let res3 = JSON.parse(res2.data.data.mark_value);
console.log(res3);
if (res3.ippz_mrwg) {
this.ruleForm.ippz_wangkou = res3.ippz_wangkou;
this.ruleForm.ippz_lwfs = res3.ippz_lwfs;
this.ippz_ip1 = res3.ippz_ip.split(".")[0];
this.ippz_ip2 = res3.ippz_ip.split(".")[1];
this.ippz_ip3 = res3.ippz_ip.split(".")[2];
@ -678,10 +721,62 @@ export default {
this.ippz_dns_by2 = res3.ippz_dns_by.split(".")[1];
this.ippz_dns_by3 = res3.ippz_dns_by.split(".")[2];
this.ippz_dns_by4 = res3.ippz_dns_by.split(".")[3];
this.ruleForm.ippz_wangkou = res3.ippz_wangkou;
this.ruleForm.ippz_lwfs = res3.ippz_lwfs;
this.ruleForm.ippz_zwym = res3.ippz_zwym;
this.ruleForm.ippz_mrwg = res3.ippz_mrwg;
this.ruleForm.ippz_dns_sx = res3.ippz_dns_sx;
this.ruleForm.ippz_dns_by = res3.ippz_dns_by;
this.ruleForm.ippz_mac = res3.ippz_mac;
this.ruleForm.ippz_wifi_ssid = res3.ippz_wifi_ssid;
this.ruleForm.ippz_wifi_mm = res3.ippz_wifi_mm;
}
this.ruleForm.wgpz_wgmc = res3.wgpz_wgmc;
this.ruleForm.wgpz_wgid = res3.wgpz_wgid;
this.ruleForm.wgpz_wglx = res3.wgpz_wglx;
this.ruleForm.tdpz_tdmc = res3.tdpz_tdmc;
this.ruleForm.tdpz_td = res3.tdpz_td;
this.ruleForm.tdpz_qdmc = res3.tdpz_qdmc;
this.ruleForm.tdpz_chuankou = res3.tdpz_chuankou;
this.ruleForm.tdpz_btl = res3.tdpz_btl;
this.ruleForm.tdpz_sjw = res3.tdpz_sjw;
this.ruleForm.tdpz_tzw = res3.tdpz_tzw;
this.ruleForm.tdpz_jojy = res3.tdpz_jojy;
this.ruleForm.tdpz_cgsj = res3.tdpz_cgsj;
this.ruleForm.tdpz_jgsj = res3.tdpz_jgsj;
this.ruleForm.tdpz_lxsj = res3.tdpz_lxsj;
this.ruleForm.tdpz_cfcs = res3.tdpz_cfcs;
this.ruleForm.tdpz_watchtime = res3.tdpz_watchtime;
this.ruleForm.tdpz_cjsylxdz = res3.tdpz_cjsylxdz;
this.ruleForm.tdpz_dxzkb = res3.tdpz_dxzkb;
this.ruleForm.tdpz_050F = res3.tdpz_050F;
this.ruleForm.tdpz_0610 = res3.tdpz_0610;
this.ruleForm.sbpz_sbid = res3.sbpz_sbid;
this.ruleForm.sbpz_sbmc = res3.sbpz_sbmc;
this.ruleForm.sbpz_mac = res3.sbpz_mac;
this.ruleForm.sbpz_jysb = res3.sbpz_jysb;
this.ruleForm.sbpz_jdzxz = res3.sbpz_jdzxz;
this.ruleForm.cjdpz_tagid = res3.cjdpz_tagid;
this.ruleForm.cjdpz_mc = res3.cjdpz_mc;
this.ruleForm.cjdpz_sjq = res3.cjdpz_sjq;
this.ruleForm.cjdpz_jcqdz = res3.cjdpz_jcqdz;
this.ruleForm.cjdpz_cjsjlx = res3.cjdpz_cjsjlx;
this.ruleForm.cjdpz_zjx = res3.cjdpz_zjx;
this.ruleForm.cjdpz_dxsx = res3.cjdpz_dxsx;
this.ruleForm.cjdpz_beilv = res3.cjdpz_beilv;
this.ruleForm.mqtt_qiyong = res3.mqtt_qiyong;
this.ruleForm.mqtt_ip = res3.mqtt_ip;
this.ruleForm.mqtt_port = res3.mqtt_port;
this.ruleForm.mqtt_wgsn = res3.mqtt_wgsn;
this.ruleForm.mqtt_sssjfbzt = res3.mqtt_sssjfbzt;
this.ruleForm.mqtt_qos = res3.mqtt_qos;
this.ruleForm.mqtt_scms = res3.mqtt_scms;
this.ruleForm.mqtt_sczq = res3.mqtt_sczq;
this.ruleForm.mqtt_sjgl = res3.mqtt_sjgl;
this.ruleForm.mqtt_cjd_sbmc = res3.mqtt_cjd_sbmc;
this.ruleForm.mqtt_cjd_tagid = res3.mqtt_cjd_tagid;
}
}
},

View File

@ -560,7 +560,7 @@ export default {
user_id: this.user_id,
// user_id: "USER202307301114011710",
mark_value: JSON.stringify(this.formdata),
step: "2",
// step: "2",
});
if (res.data.state) {
this.$message({

View File

@ -270,11 +270,6 @@ export default {
},
//
outerVisible: false,
gateWay: {
wgpz_wgmc: "",
wgpz_wgid: "",
wgpz_wglx: "",
},
rulesGate: {
wgpz_wgmc: [
{ required: true, message: "请选择网关名称", trigger: "blur" },

View File

@ -494,8 +494,8 @@ export default {
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(this.formData));
let data = {
mark: "DB-IotLite_yx",
// user_id: this.user_id,
user_id: "USER202307301114011710",
user_id: this.user_id,
// user_id: "USER202307301114011710",
mark_value: JSON.stringify(this.formData),
};
let res = await SaveUserAnswer(data);
@ -523,8 +523,8 @@ export default {
this.loading = true;
let res2 = await GetUserAnswer({
mark: "DB-IotLite_yx",
// user_id: this.user_id,
user_id: "USER202307301114011710",
user_id: this.user_id,
// user_id: "USER202307301114011710",
});
this.loading = false;
console.log(res2);

View File

@ -237,21 +237,21 @@
<!-- 网关 -->
<div class="gateway">
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
<el-form :model="gateWay" :rules="rulesGate" ref="gateWay" label-width="85px" class="demo-ruleForm">
<el-form :model="formData" :rules="rulesGate" ref="gateWay" label-width="85px" class="demo-ruleForm">
<el-form-item label="网关名称:" prop="wgpz_wgmc">
<el-select v-model="gateWay.wgpz_wgmc" placeholder="请选择" style="width: 200px">
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" style="width: 200px">
<el-option v-for="item in opts1" :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="gateWay.wgpz_wgid" placeholder="请选择" style="width: 200px">
<el-select v-model="formData.wgpz_wgid" placeholder="请选择" style="width: 200px">
<el-option v-for="item in opts2" :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="gateWay.wgpz_wglx" placeholder="请选择" style="width: 200px">
<el-select v-model="formData.wgpz_wglx" placeholder="请选择" style="width: 200px">
<el-option v-for="item in opts3" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@ -279,6 +279,19 @@ export default {
nodekey: "",
trees: [],
formData: {
ippz_lwfs: "",
ippz_wangkou: "",
ippz_zwym: "",
ippz_mrwg: "",
ippz_dns_sx: "",
ippz_dns_by: "",
ippz_ip: "",
ippz_mac: "",
ippz_wifi_ssid: "",
ippz_wifi_mm: "",
wgpz_wgmc: "",
wgpz_wgid: "",
wgpz_wglx: "",
tdpz_tdmc: "",
tdpz_td: "",
tdpz_qdmc: "",
@ -296,6 +309,30 @@ export default {
tdpz_dxzkb: "",
tdpz_050F: "1",
tdpz_0610: "1",
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: "",
},
tdpz_dxzkb1: "1",
tdpz_dxzkb2: "1",
@ -930,6 +967,7 @@ export default {
this.diag_drive = false;
}
},
//
async saveGate() {
var obj = {
tdpz_tdmc: this.formData.tdpz_tdmc,
@ -952,9 +990,8 @@ export default {
tdpz_0610: this.formData.tdpz_0610,
};
this.add_passage = false;
let datas = sessionStorage.getItem("DB-IotLite_wx");
// console.log(this.formData);
datas = { ...JSON.parse(datas), ...obj };
let datas = { ...this.formData, ...obj };
let res = await SaveUserAnswer({
mark: "DB-IotLite_wx",
user_id: this.user_id,
@ -986,7 +1023,6 @@ export default {
});
}
},
//
async GetUserAnswer() {
this.loading = true;
let answer = await GetUserAnswer({
@ -1021,6 +1057,45 @@ export default {
this.formData.tdpz_watchtime = Boolean(Number(obj.tdpz_watchtime));
this.formData.tdpz_cjsylxdz = Boolean(Number(obj.tdpz_cjsylxdz));
}
this.formData.wgpz_wgid = obj.wgpz_wgid;
console.log(this.formData.wgpz_wgid);
this.formData.wgpz_wgmc = obj.wgpz_wgmc;
this.formData.wgpz_wglx = obj.wgpz_wglx;
this.formData.ippz_wangkou = obj.ippz_wangkou;
this.formData.ippz_lwfs = obj.ippz_lwfs;
this.formData.ippz_zwym = obj.ippz_zwym;
this.formData.ippz_mrwg = obj.ippz_mrwg;
this.formData.ippz_dns_sx = obj.ippz_dns_sx;
this.formData.ippz_dns_by = obj.ippz_dns_by;
this.formData.ippz_mac = obj.ippz_mac;
this.formData.ippz_wifi_ssid = obj.ippz_wifi_ssid;
this.formData.ippz_wifi_mm = obj.ippz_wifi_mm;
this.formData.sbpz_sbid = obj.sbpz_sbid;
this.formData.sbpz_sbmc = obj.sbpz_sbmc;
this.formData.sbpz_mac = obj.sbpz_mac;
this.formData.sbpz_jysb = obj.sbpz_jysb;
this.formData.sbpz_jdzxz = obj.sbpz_jdzxz;
this.formData.cjdpz_tagid = obj.cjdpz_tagid;
this.formData.cjdpz_mc = obj.cjdpz_mc;
this.formData.cjdpz_sjq = obj.cjdpz_sjq;
this.formData.cjdpz_jcqdz = obj.cjdpz_jcqdz;
this.formData.cjdpz_cjsjlx = obj.cjdpz_cjsjlx;
this.formData.cjdpz_zjx = obj.cjdpz_zjx;
this.formData.cjdpz_dxsx = obj.cjdpz_dxsx;
this.formData.cjdpz_beilv = obj.cjdpz_beilv;
this.formData.mqtt_qiyong = obj.mqtt_qiyong;
this.formData.mqtt_ip = obj.mqtt_ip;
this.formData.mqtt_port = obj.mqtt_port;
this.formData.mqtt_wgsn = obj.mqtt_wgsn;
this.formData.mqtt_sssjfbzt = obj.mqtt_sssjfbzt;
this.formData.mqtt_qos = obj.mqtt_qos;
this.formData.mqtt_scms = obj.mqtt_scms;
this.formData.mqtt_sczq = obj.mqtt_sczq;
this.formData.mqtt_sjgl = obj.mqtt_sjgl;
this.formData.mqtt_cjd_sbmc = obj.mqtt_cjd_sbmc;
this.formData.mqtt_cjd_tagid = obj.mqtt_cjd_tagid;
}
},
async sendTree() {
@ -1048,24 +1123,24 @@ export default {
async saveGates() {
this.outerVisible = false;
// this.innerVisible = false;
let datas = sessionStorage.getItem("DB-IotLite_wx");
// let datas = sessionStorage.getItem("DB-IotLite_wx");
// console.log(JSON.parse(datas));
datas = { ...JSON.parse(datas), ...this.gateWay };
console.log(datas);
// datas = { ...JSON.parse(datas), ...this.gateWay };
// console.log(datas);
let res = await SaveUserAnswer({
mark: "DB-IotLite_wx",
user_id: this.user_id,
// user_id: "USER202307301114011710",
mark_value: JSON.stringify(datas),
mark_value: JSON.stringify(this.formData),
});
if (res.data.state) {
this.$message({
message: "修改成功",
type: "success",
});
this.trees[0].label = this.gateWay.wgpz_wgid;
this.trees[0].label = this.formData.wgpz_wgid;
this.sendTree();
sessionStorage.setItem("DB-IotLite_wx", JSON.stringify(this.gateWay));
// sessionStorage.setItem("DB-IotLite_wx", JSON.stringify(this.gateWay));
} else {
this.$message({
message: `保存失败,原因是${res.data.message}`,

View File

@ -686,6 +686,7 @@ export default {
message: "保存成功",
type: "success",
});
console.log(res.data.data.step);
// sessionStorage.setItem("DB-IotLite_yx", JSON.stringify(datas));
this.add_passage = false;
@ -826,7 +827,7 @@ export default {
user_id: this.user_id,
// user_id: "USER202307301114011710",
mark_value: JSON.stringify(this.FormData),
step: "1",
// step: "1",
});
if (res.data.state) {
this.$message({