diff --git a/.history/src/components/ChiClone_20231111084821.vue b/.history/src/components/ChiClone_20231111084821.vue index 19f1c7d..49daa99 100644 --- a/.history/src/components/ChiClone_20231111084821.vue +++ b/.history/src/components/ChiClone_20231111084821.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,12 +727,12 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", }); - }else{ + } else { this.$message({ message: "保存失败", type: "error", @@ -678,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, diff --git a/.history/src/components/ChiClone_20231111092646.vue b/.history/src/components/ChiClone_20231111092646.vue index e706886..9615f38 100644 --- a/.history/src/components/ChiClone_20231111092646.vue +++ b/.history/src/components/ChiClone_20231111092646.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,20 +727,19 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", }); console.log(res); - sessionStorage.setItem("CHGYWG_yx", JSON.stringify(datas)); - }else{ + sessionStorage.setItem("CHGYWG_yx", JSON.stringify(datas)); + } else { this.$message({ message: "保存失败", type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, diff --git a/.history/src/components/ChiClone_20231111092654.vue b/.history/src/components/ChiClone_20231111092654.vue index 648d326..9615f38 100644 --- a/.history/src/components/ChiClone_20231111092654.vue +++ b/.history/src/components/ChiClone_20231111092654.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, diff --git a/.history/src/components/ChiClone_20231111093339.vue b/.history/src/components/ChiClone_20231111093339.vue index 9f9daf1..07987ad 100644 --- a/.history/src/components/ChiClone_20231111093339.vue +++ b/.history/src/components/ChiClone_20231111093339.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, diff --git a/.history/src/components/ChiClone_20231111093559.vue b/.history/src/components/ChiClone_20231111093559.vue index 3fecfb7..d3c7890 100644 --- a/.history/src/components/ChiClone_20231111093559.vue +++ b/.history/src/components/ChiClone_20231111093559.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, diff --git a/.history/src/components/ChiClone_20231111093805.vue b/.history/src/components/ChiClone_20231111093805.vue index 3e01caf..b39d182 100644 --- a/.history/src/components/ChiClone_20231111093805.vue +++ b/.history/src/components/ChiClone_20231111093805.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, diff --git a/.history/src/components/ChiClone_20231111094010.vue b/.history/src/components/ChiClone_20231111094010.vue index 18f11a6..21b8be2 100644 --- a/.history/src/components/ChiClone_20231111094010.vue +++ b/.history/src/components/ChiClone_20231111094010.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, @@ -754,8 +849,6 @@ export default { padding-right: 150px; } - ; - .el-row { height: 54px; display: flex; @@ -866,4 +959,5 @@ export default { padding-top: 0px !important; line-height: 0px !important; } -} +} + diff --git a/.history/src/components/ChiClone_20231111094013.vue b/.history/src/components/ChiClone_20231111094013.vue index 99a49ed..21b8be2 100644 --- a/.history/src/components/ChiClone_20231111094013.vue +++ b/.history/src/components/ChiClone_20231111094013.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, @@ -754,7 +849,6 @@ export default { padding-right: 150px; } - .el-row { height: 54px; display: flex; @@ -865,4 +959,5 @@ export default { padding-top: 0px !important; line-height: 0px !important; } -} +} + diff --git a/.history/src/components/ChiClone_20231111094055.vue b/.history/src/components/ChiClone_20231111094055.vue index e614028..d7bd378 100644 --- a/.history/src/components/ChiClone_20231111094055.vue +++ b/.history/src/components/ChiClone_20231111094055.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -162,16 +246,24 @@ @@ -182,8 +274,14 @@
- + 保 存 @@ -471,15 +569,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -503,7 +599,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -512,24 +608,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -631,7 +727,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -644,7 +740,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -679,7 +774,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, @@ -754,7 +849,6 @@ export default { padding-right: 348px; } - .el-row { height: 54px; display: flex; @@ -865,4 +959,5 @@ export default { padding-top: 0px !important; line-height: 0px !important; } -} +} + diff --git a/.history/src/components/ChiClone_20231111094441.vue b/.history/src/components/ChiClone_20231111094441.vue index 7f721c0..6135fec 100644 --- a/.history/src/components/ChiClone_20231111094441.vue +++ b/.history/src/components/ChiClone_20231111094441.vue @@ -5,15 +5,30 @@
- + @@ -28,7 +43,12 @@

标准 MQTT

- + @@ -38,22 +58,42 @@ - + - + . - + . - + . - + @@ -61,31 +101,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -111,9 +182,22 @@ - - - + + + @@ -150,7 +234,9 @@
-

标准MQTT采集点

+

+ 标准MQTT采集点 +

@@ -165,16 +251,24 @@ @@ -185,8 +279,14 @@
- + 保 存 @@ -474,15 +574,13 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_wgsn: [ { required: true, message: "请输入网关SN", trigger: "blur" }, ], - mqtt_port: [ - { required: true, message: "请输入端口", trigger: "blur" }, - ], + mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], mqtt_keepalive: [ { required: true, message: "请输入KeepAlive", trigger: "blur" }, ], @@ -506,7 +604,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); let that = this; window.getParameter = that.getParameter; }, @@ -515,24 +613,24 @@ export default { validateIp(rule, value, callback) { if ( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 === + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 === "..." ) { callback(new Error("请输入IP地址")); } 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( this.mqtt_ip1 + - "." + - this.mqtt_ip2 + - "." + - this.mqtt_ip3 + - "." + - this.mqtt_ip4 + "." + + this.mqtt_ip2 + + "." + + this.mqtt_ip3 + + "." + + this.mqtt_ip4 ) ) { callback(new Error("请输入有效的IP地址")); @@ -634,7 +732,7 @@ export default { user_id: this.user_id, mark_value: JSON.stringify(datas), }); - if (res.state) { + if (res.data.state) { this.$message({ message: "保存成功", type: "success", @@ -647,7 +745,6 @@ export default { type: "error", }); } - }, async GetUserAnswer() { this.loading = true; @@ -682,7 +779,7 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "3", - }) + }); console.log(result); }, }, @@ -757,7 +854,6 @@ export default { padding-right: 348px; } - .el-row { height: 54px; display: flex; diff --git a/src/components/IpConfiguration.vue b/src/components/IpConfiguration.vue index 55c2a38..5c083d4 100644 --- a/src/components/IpConfiguration.vue +++ b/src/components/IpConfiguration.vue @@ -311,12 +311,12 @@ export default { datas = { ...JSON.parse(datas), ...this.ruleForm }; let res = await SaveUserAnswer({ mark: "CKFWQ_yx", - user_id: `${this.user_id}`, + user_id: this.user_id, // user_id: "USER202307301109254198", mark_value: JSON.stringify(datas), }); console.log(res); - if (res.state) { + if (res.data.state) { sessionStorage.setItem("CKFWQ_yx", JSON.stringify(datas)); this.$message({ message: "保存成功", @@ -329,7 +329,7 @@ export default { async GetUserAnswer() { let answers = await GetUserAnswer({ mark: "CKFWQ_yx", - user_id: `${this.user_id}`, + user_id: this.user_id, // user_id: "USER202307301109254198", }); console.log(answers.data); diff --git a/src/components/NetworkConfiguration.vue b/src/components/NetworkConfiguration.vue index 2b2ef94..dd65df4 100644 --- a/src/components/NetworkConfiguration.vue +++ b/src/components/NetworkConfiguration.vue @@ -104,7 +104,7 @@ export default { mark_value: JSON.stringify(datas), }); console.log(res); - if (res.state) { + if (res.data.state) { sessionStorage.setItem( "CKFWQ_wx", JSON.stringify({ ...datas, ...this.ruleForm }) diff --git a/src/components/NetworkManagement.vue b/src/components/NetworkManagement.vue index 6d4d90e..05ad41c 100644 --- a/src/components/NetworkManagement.vue +++ b/src/components/NetworkManagement.vue @@ -1,5 +1,5 @@ diff --git a/src/components/netConfiguration.vue b/src/components/netConfiguration.vue index f84b183..1c0aab0 100644 --- a/src/components/netConfiguration.vue +++ b/src/components/netConfiguration.vue @@ -193,7 +193,7 @@ export default { mark_value: JSON.stringify(datas), }); console.log(res); - if (res.state) { + if (res.data.state) { sessionStorage.setItem("CKFWQ_wx", JSON.stringify(datas)); this.dialogVisible = false; this.$message({ @@ -248,7 +248,6 @@ export default { let that = this; window.getParameter = that.getParameter; this.GetUserAnswer(); - }, };