diff --git a/.history/src/api/user_20231109141302.js b/.history/src/api/user_20231109141302.js new file mode 100644 index 0000000..edabdc9 --- /dev/null +++ b/.history/src/api/user_20231109141302.js @@ -0,0 +1,21 @@ +import axios from "axios"; +export const GetDbwirldList = () => { + return axios.get("/wangguan?action=queryanswer&mark=DB-IotLite_yx"); +}; +export const SaveUserAnswer = (data) => { + return axios.post( + `/wangguan?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}` + ); +}; +export const GetUserAnswer = (data) => { + return axios.get( + `/wangguan?action=querycache&mark=${data.mark}&user_id=${data.user_id}` + ); +}; + +//最新拿缓存请求接口 +// export let GetUserAnswer = (data) => { +// return axios.get( +// `/Handler/Config.ash?action=querycache&mark=${data.mark}&user_id=${data.user_id}` +// ); +// }; diff --git a/src/api/user.js b/src/api/user.js index 385a61b..edabdc9 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -4,7 +4,7 @@ export const GetDbwirldList = () => { }; export const SaveUserAnswer = (data) => { return axios.post( - `/wangguan?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}`, + `/wangguan?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}` ); }; export const GetUserAnswer = (data) => { @@ -12,14 +12,10 @@ export const GetUserAnswer = (data) => { `/wangguan?action=querycache&mark=${data.mark}&user_id=${data.user_id}` ); }; -export const GetTree = (user_id) =>{ - return axios.get( - `/wangguan?action=queryacquisition&user_id=${user_id}` - ) -} + //最新拿缓存请求接口 // export let GetUserAnswer = (data) => { // return axios.get( -// `/wangguan?action=queryanswercache&mark=${data.mark}&user_id=${data.user_id}` +// `/Handler/Config.ash?action=querycache&mark=${data.mark}&user_id=${data.user_id}` // ); // }; diff --git a/src/components/AddPolicy.vue b/src/components/AddPolicy.vue index 7333b3d..8072bf4 100644 --- a/src/components/AddPolicy.vue +++ b/src/components/AddPolicy.vue @@ -1,15 +1,34 @@ @@ -255,7 +373,12 @@ @@ -267,13 +390,30 @@
- - + + - + @@ -282,7 +422,12 @@ - + @@ -301,12 +446,21 @@ - + - + @@ -713,7 +867,7 @@ export default { created() { this.GetUserAnswer(); }, - mounted() { }, + mounted() {}, methods: { //保存 diff --git a/src/components/ChiWireld.vue b/src/components/ChiWireld.vue index e4039b9..a8dc221 100644 --- a/src/components/ChiWireld.vue +++ b/src/components/ChiWireld.vue @@ -11,11 +11,25 @@
- + - - + + @@ -23,7 +37,11 @@ - + @@ -69,7 +87,11 @@ - + @@ -182,7 +204,7 @@ export default { created() { this.GetUserAnswer(); }, - mounted() { }, + mounted() {}, methods: { Merge(value, value1, value2, value3, value4) { @@ -240,8 +262,8 @@ export default { }); if (res.status == 200) { this.$message({ - message: '保存成功', - type: 'success' + message: "保存成功", + type: "success", }); } console.log(res); @@ -255,10 +277,10 @@ export default { user_id: "USER202307301114011710", }); this.loading = false; - console.log(JSON.parse(data.data.mark_value)); - let obj = JSON.parse(data.data.mark_value); - this.formData.ippz_wllx = obj.ippz_wllx; - if (obj.ippz_ip) { + console.log(data); + if (data.data && data.state) { + var obj = JSON.parse(data.data.mark_value); + this.formData.ippz_wllx = obj.ippz_wllx; this.ippz_ip1 = obj.ippz_ip.split(".")[0]; this.ippz_ip2 = obj.ippz_ip.split(".")[1]; this.ippz_ip3 = obj.ippz_ip.split(".")[2]; diff --git a/src/components/GateWay.vue b/src/components/GateWay.vue index 6f48755..33e16d9 100644 --- a/src/components/GateWay.vue +++ b/src/components/GateWay.vue @@ -2,37 +2,71 @@