diff --git a/src/components/ChiGateway.vue b/src/components/ChiGateway.vue index 71f25e3..1466c7c 100644 --- a/src/components/ChiGateway.vue +++ b/src/components/ChiGateway.vue @@ -243,10 +243,6 @@ export default { } }); }, - getParameter(data) { - console.log(data); - this.user_id = data; - }, async saveGate() { let res = await SaveUserAnswer({ mark: "CHGYWG_yx", diff --git a/src/components/ChiWireld.vue b/src/components/ChiWireld.vue index 51eb3a4..4928005 100644 --- a/src/components/ChiWireld.vue +++ b/src/components/ChiWireld.vue @@ -425,10 +425,6 @@ export default { } }); }, - getParameter(data) { - console.log(data); - this.user_id = data; - }, Merge(value, value1, value2, value3, value4) { value = value1 + "." + value2 + "." + value3 + "." + value4; return value; diff --git a/src/components/CloneView.vue b/src/components/CloneView.vue index 0b4df12..a8ef3d9 100644 --- a/src/components/CloneView.vue +++ b/src/components/CloneView.vue @@ -4,8 +4,15 @@
- +
@@ -16,7 +23,12 @@ MQTT Client - + @@ -26,30 +38,50 @@ - + - + . - + . - + . - + @@ -58,29 +90,63 @@ - - + + - - + + - + - + - - + + @@ -95,22 +161,47 @@ - - - + + + - - + + - + @@ -131,7 +222,9 @@
-

MQTT Client采集点

+

+ MQTT Client采集点 +

- + 保 存 @@ -177,22 +284,55 @@
- + - - + + - - + + - - + + @@ -534,7 +674,7 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], @@ -625,24 +765,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地址")); @@ -745,8 +885,8 @@ export default { let datas = { ...this.formData, ...obj }; 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(datas), }); if (res.data.state) { @@ -774,8 +914,8 @@ export default { async GetUserAnswer() { let answer = await GetUserAnswer({ mark: "DB-IotLite_yx", - // user_id: this.user_id, - user_id:"USER202307301114011710" + user_id: this.user_id, + // user_id: "USER202307301114011710", }); // console.log(answer); if (answer.data.data && answer.data.state) { @@ -843,8 +983,8 @@ export default { }, async sendTree() { let result = await SendTree({ - // user_id: this.user_id, - usr_id:"USER202307301114011710", + user_id: this.user_id, + // usr_id: "USER202307301114011710", data: JSON.stringify(this.trees), type: "1", }); @@ -852,7 +992,7 @@ export default { }, async getTree() { console.log("12341"); - let res = await GetTree({ user_id: 'USER202307301114011710', type: "1" }); + let res = await GetTree({ user_id: this.user_id, type: "1" }); // console.log(res); // console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); @@ -878,8 +1018,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), }); if (res.data.state) { @@ -897,7 +1037,7 @@ export default { }); } console.log(res); - } + }, }, created() { this.user_id = window.location.href.split("?")[1]; diff --git a/src/components/CloneWifi.vue b/src/components/CloneWifi.vue index 90367e4..884cbfc 100644 --- a/src/components/CloneWifi.vue +++ b/src/components/CloneWifi.vue @@ -4,8 +4,15 @@
- +
@@ -16,7 +23,12 @@ MQTT Client - + @@ -26,30 +38,50 @@ - + - + . - + . - + . - + @@ -58,29 +90,63 @@ - - + + - - + + - + - + - - + + @@ -88,29 +154,58 @@ - + - - - + + + - - + + - + @@ -131,7 +226,9 @@
-

MQTT Client采集点

+

+ MQTT Client采集点 +

- + 保 存 @@ -177,22 +288,55 @@
- + - - + + - - + + - - + + @@ -542,7 +686,7 @@ export default { required: true, message: "", validator: this.validateIp, - trigger: "blur" + trigger: "blur", }, ], mqtt_port: [{ required: true, message: "请输入端口", trigger: "blur" }], @@ -633,24 +777,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地址")); @@ -681,7 +825,7 @@ export default { this.GetUserAnswer(); } }, - + treeNodeClick() { this.add_passage = true; }, @@ -719,8 +863,8 @@ export default { let datas = { ...this.formData, ...obj }; let res = await SaveUserAnswer({ mark: "DB-IotLite_wx", - // user_id: this.user_id, - user_id:"USER202307301114011710", + user_id: this.user_id, + // user_id:"USER202307301114011710", mark_value: JSON.stringify(datas), }); if (res.data.state) { @@ -748,8 +892,8 @@ export default { async GetUserAnswer() { let answer = await GetUserAnswer({ mark: "DB-IotLite_wx", - // user_id: this.user_id, - user_id:"USER202307301114011710" + user_id: this.user_id, + // user_id: "USER202307301114011710", }); // console.log(answer); if (answer.data.data && answer.data.state) { @@ -824,8 +968,8 @@ export default { }, async sendTree() { let result = await SendTree({ - // user_id: this.user_id, - user_id:"USER202307301114011710", + user_id: this.user_id, + // user_id: "USER202307301114011710", data: JSON.stringify(this.trees), type: "2", }); @@ -833,7 +977,7 @@ export default { }, async getTree() { console.log("12341"); - let res = await GetTree({ user_id: 'USER202307301114011710', type: "2" }); + let res = await GetTree({ user_id: this.user_id, type: "2" }); // console.log(res); // console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); @@ -859,8 +1003,8 @@ export default { // console.log(datas); let res = await SaveUserAnswer({ mark: "DB-IotLite_wx", - // user_id: this.user_id, - user_id: "USER202307301114011710", + user_id: this.user_id, + // user_id: "USER202307301114011710", mark_value: JSON.stringify(this.formData), }); if (res.data.state) { @@ -878,7 +1022,7 @@ export default { }); } console.log(res); - } + }, }, created() { this.user_id = window.location.href.split("?")[1]; diff --git a/src/components/CollectionView.vue b/src/components/CollectionView.vue index a67953e..5072f2c 100644 --- a/src/components/CollectionView.vue +++ b/src/components/CollectionView.vue @@ -1,1181 +1,1369 @@ \ No newline at end of file + diff --git a/src/components/CollectionWifi.vue b/src/components/CollectionWifi.vue index 5a96c85..958703e 100644 --- a/src/components/CollectionWifi.vue +++ b/src/components/CollectionWifi.vue @@ -1,1197 +1,1381 @@ \ No newline at end of file + diff --git a/src/components/DataAcquire.vue b/src/components/DataAcquire.vue index 4d277e8..fe84832 100644 --- a/src/components/DataAcquire.vue +++ b/src/components/DataAcquire.vue @@ -1,38 +1,85 @@