diff --git a/.history/src/api/user_20231110083255.js b/.history/src/api/user_20231110083255.js new file mode 100644 index 0000000..404523b --- /dev/null +++ b/.history/src/api/user_20231110083255.js @@ -0,0 +1,37 @@ +import axios from "axios"; +export const GetDbwirldList = () => { + return axios.get( + "http://111.229.30.246:10013/Handler/Config.ashx?action=queryanswer&mark=DB-IotLite_yx" + ); +}; +export const SaveUserAnswer = (data) => { + return axios.post( + `http://111.229.30.246:10013/Handler/Config.ashx?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}` + ); +}; +export const GetUserAnswer = (data) => { + return axios.get( + `http://111.229.30.246:10013/Handler/Config.ashx?action=querycache&mark=${data.mark}&user_id=${data.user_id}` + ); +}; +export const GetTree = (data) => { + return axios.get( + `http://111.229.30.246:10013/Handler/Config.ashx?action=queryacquisition&user_id=${data.user_id}&type=${data.type}` + ); +}; +export const SendTree = (data) => { + return axios.get( + `http://111.229.30.246:10013/Handler/Config.ashx?action=updateacquisition&user_id=${data.user_id}&data=${data.data}&type=${data.type}` + ); +}; +//最新拿缓存请求接口 +// export let GetUserAnswer = (data) => { +// return axios.get( +// `/Handler/Config.ashx?action=querycache&mark=${data.mark}&user_id=${data.user_id}` +// ); +// }; + +//避免考生中途换电脑的解决方案 在每次拿取考试缓存数据的时候本地存储一份 +// function(mark,data) { +// sessionStorage.setItem(`${mark}`,JSON.stringify(data)) +// } diff --git a/.history/vue.config_20231110083239.js b/.history/vue.config_20231110083239.js new file mode 100644 index 0000000..1ce924d --- /dev/null +++ b/.history/vue.config_20231110083239.js @@ -0,0 +1,16 @@ +const { defineConfig } = require("@vue/cli-service"); + +module.exports = defineConfig({ + transpileDependencies: true, + lintOnSave: false, + devServer: { + proxy: { + "/Handler": { + target: "http://111.229.30.246:10013", + pathRewrite: { "^/Handler": "" }, + secure: false, + changeOrigin: true, + }, + }, + }, +}); diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..167ecf9 Binary files /dev/null and b/dist.zip differ diff --git a/src/api/user.js b/src/api/user.js index 3b17e63..404523b 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -1,27 +1,29 @@ import axios from "axios"; export const GetDbwirldList = () => { - return axios.get("/Handler/Config.ashx?action=queryanswer&mark=DB-IotLite_yx"); + return axios.get( + "http://111.229.30.246:10013/Handler/Config.ashx?action=queryanswer&mark=DB-IotLite_yx" + ); }; export const SaveUserAnswer = (data) => { return axios.post( - `/Handler/Config.ashx?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}` + `http://111.229.30.246:10013/Handler/Config.ashx?action=updatecache&mark=${data.mark}&user_id=${data.user_id}&mark_value=${data.mark_value}` ); }; export const GetUserAnswer = (data) => { return axios.get( - `/Handler/Config.ashx?action=querycache&mark=${data.mark}&user_id=${data.user_id}` + `http://111.229.30.246:10013/Handler/Config.ashx?action=querycache&mark=${data.mark}&user_id=${data.user_id}` ); }; export const GetTree = (data) => { return axios.get( - `/Handler/Config.ashx?action=queryacquisition&user_id=${data.user_id}&type=${data.type}` - ) -} + `http://111.229.30.246:10013/Handler/Config.ashx?action=queryacquisition&user_id=${data.user_id}&type=${data.type}` + ); +}; export const SendTree = (data) => { return axios.get( - `/Handler/Config.ashx?action=updateacquisition&user_id=${data.user_id}&data=${data.data}&type=${data.type}` - ) -} + `http://111.229.30.246:10013/Handler/Config.ashx?action=updateacquisition&user_id=${data.user_id}&data=${data.data}&type=${data.type}` + ); +}; //最新拿缓存请求接口 // export let GetUserAnswer = (data) => { // return axios.get( diff --git a/src/components/GatewayMaintenance.vue b/src/components/GatewayMaintenance.vue index 0437f03..06b9310 100644 --- a/src/components/GatewayMaintenance.vue +++ b/src/components/GatewayMaintenance.vue @@ -361,10 +361,12 @@ export default { /deep/.red .el-form-item__label { color: red; } + .xqbox { p { margin: 5px; display: flex; + .s1 { width: 70px; color: #0275ff; diff --git a/src/components/NetworkConfiguration.vue b/src/components/NetworkConfiguration.vue index 895e3f2..b92f17c 100644 --- a/src/components/NetworkConfiguration.vue +++ b/src/components/NetworkConfiguration.vue @@ -108,7 +108,6 @@ export default { }, //拿缓存 async GetUserAnswer() { - this.loading = true; let res = await GetUserAnswer({ mark: "CKFWQ_wx", user_id: `${this.user_id}`, @@ -119,7 +118,6 @@ export default { this.ruleForm.kqwk = obj.kqwk; this.ruleForm.wkgzfs = obj.wkgzfs; this.ruleForm.wkms = obj.wkms; - this.loading = false; } }, }, diff --git a/src/components/TreeView.vue b/src/components/TreeView.vue index 64a53c8..c231cc8 100644 --- a/src/components/TreeView.vue +++ b/src/components/TreeView.vue @@ -4,24 +4,48 @@
- +
- + 新建通道 @@ -33,13 +57,36 @@
- - + + - - - + + + @@ -47,21 +94,46 @@ - - - + + + - + - + - ... + ... @@ -69,22 +141,38 @@ - + - + . - + . - + . - + @@ -92,32 +180,72 @@ - - + + - - + + - - + + - - + + - - + + @@ -127,29 +255,47 @@
- - 收起 + " + > + 收起
- + - watch time(s) - + watch time(s) + - 采集使用连续地址 + 采集使用连续地址 @@ -158,11 +304,17 @@ - + : - + @@ -172,18 +324,42 @@ - auto - 05 - 0F + auto + 05 + 0F - auto - 06 - 10 + auto + 06 + 10 @@ -202,7 +378,12 @@
- +
@@ -217,8 +398,8 @@ export default { return { loading: false, flag: false, - gateway:"", - user_id:"", + gateway: "", + user_id: "", FormData: { tdpz_tdmc: "有线区Channel1", tdpz_td: "网口", @@ -509,10 +690,13 @@ export default { console.log(res); // console.log(res.data.data.mark_value); // this.$nextTick(() => { - this.$refs["tree"].append({ - id: this.nodekey + 1000, - label: this.FormData.tdpz_tdmc - }, this.nodekey); + this.$refs["tree"].append( + { + id: this.nodekey + 1000, + label: this.FormData.tdpz_tdmc, + }, + this.nodekey + ); // console.log(this.trees); this.sendTree(); this.$router.push(`/dbcollectdevice?user_id=${this.user_id}`); @@ -575,13 +759,13 @@ export default { user_id: this.user_id, data: JSON.stringify(this.trees), type: "1", - }) + }); console.log(result); }, }, created() { console.log(this.$route.query.user_id); - this.user_id=this.$route.query.user_id; + this.user_id = this.$route.query.user_id; GetTree({ user_id: this.user_id, type: "1", @@ -589,7 +773,7 @@ export default { console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - }) + }); this.loading = true; this.GetUserAnswer(); this.loading = false; diff --git a/src/components/netConfiguration.vue b/src/components/netConfiguration.vue index d64430f..af7876f 100644 --- a/src/components/netConfiguration.vue +++ b/src/components/netConfiguration.vue @@ -214,9 +214,10 @@ export default { mark: "CKFWQ_wx", user_id: `${this.user_id}`, }); - let obj = JSON.parse(answers.data.data.mark_value); console.log(answers); if (answers.data.data && answers.data.state) { + let obj = JSON.parse(answers.data.data.mark_value); + this.ruleForm.ckcssz_btl = obj.ckcssz_btl; this.ruleForm.ckcssz_jyw = obj.ckcssz_jyw; this.ruleForm.ckcssz_lk = obj.ckcssz_lk; diff --git a/vue.config.js b/vue.config.js index 46b3a7b..1ce924d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,19 +4,9 @@ module.exports = defineConfig({ transpileDependencies: true, lintOnSave: false, devServer: { - baseUrl: "./", proxy: { - // "/wangguan": { - // target: "http://111.229.30.246:10013/Handler/Config.ashx", - // pathRewrite: { "^/wangguan": "" }, - // secure: false, - // // 开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据, - // //并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题 - // // 必须设置该项 - // changeOrigin: true, - // }, "/Handler": { - target: "http://111.229.30.246:10015", + target: "http://111.229.30.246:10013", pathRewrite: { "^/Handler": "" }, secure: false, changeOrigin: true,