diff --git a/src/util/hapi.js b/src/util/hapi.js new file mode 100644 index 0000000..cd14e4a --- /dev/null +++ b/src/util/hapi.js @@ -0,0 +1,14 @@ +/** + * + * @exports {Object} + */ +const host = '/hapi' + +const nozzle = { + selectAllPoints: "/record/selectAllPoints" +} + +for (const item in nozzle) { + nozzle[item] = host + nozzle[item] +} +export default nozzle diff --git a/src/util/hapi.js b/src/util/hapi.js new file mode 100644 index 0000000..cd14e4a --- /dev/null +++ b/src/util/hapi.js @@ -0,0 +1,14 @@ +/** + * + * @exports {Object} + */ +const host = '/hapi' + +const nozzle = { + selectAllPoints: "/record/selectAllPoints" +} + +for (const item in nozzle) { + nozzle[item] = host + nozzle[item] +} +export default nozzle diff --git a/src/util/interface.js b/src/util/interface.js index 06727f1..e90c979 100644 --- a/src/util/interface.js +++ b/src/util/interface.js @@ -1,4 +1,5 @@ import department from './department' +import hapi from './hapi' // import dataSource from './apiField/dataSource'; const host = '/sysApi' @@ -16,5 +17,6 @@ } // nozzle = Object.assign(nozzle, project) nozzle = Object.assign(nozzle, department) +nozzle = Object.assign(nozzle, hapi) // nozzle = Object.assign(nozzle, dataSource); export default nozzle diff --git a/src/util/hapi.js b/src/util/hapi.js new file mode 100644 index 0000000..cd14e4a --- /dev/null +++ b/src/util/hapi.js @@ -0,0 +1,14 @@ +/** + * + * @exports {Object} + */ +const host = '/hapi' + +const nozzle = { + selectAllPoints: "/record/selectAllPoints" +} + +for (const item in nozzle) { + nozzle[item] = host + nozzle[item] +} +export default nozzle diff --git a/src/util/interface.js b/src/util/interface.js index 06727f1..e90c979 100644 --- a/src/util/interface.js +++ b/src/util/interface.js @@ -1,4 +1,5 @@ import department from './department' +import hapi from './hapi' // import dataSource from './apiField/dataSource'; const host = '/sysApi' @@ -16,5 +17,6 @@ } // nozzle = Object.assign(nozzle, project) nozzle = Object.assign(nozzle, department) +nozzle = Object.assign(nozzle, hapi) // nozzle = Object.assign(nozzle, dataSource); export default nozzle diff --git a/src/views/CesiumCom/CesiumVue.vue b/src/views/CesiumCom/CesiumVue.vue index 325cfd9..8d5ad69 100644 --- a/src/views/CesiumCom/CesiumVue.vue +++ b/src/views/CesiumCom/CesiumVue.vue @@ -146,12 +146,21 @@ return data.userName.indexOf(value) !== -1; }, loadTreeData() { - this.$http.post(this.nozzle.userTree, {}).then((result) => { - if (result.data.code == 200) { - this.data = result.data.data; - } - }); + this.$http + .post(this.nozzle.selectAllPoints, { data: { type: "" } }) + .then((result) => { + if (result.data.code == 200) { + this.data = result.data.data; + } + }); }, + // loadTreeData() { + // this.$http.post(this.nozzle.userTree, {}).then((result) => { + // if (result.data.code == 200) { + // this.data = result.data.data; + // } + // }); + // }, titleClick(index) { this.$nextTick(() => { diff --git a/src/util/hapi.js b/src/util/hapi.js new file mode 100644 index 0000000..cd14e4a --- /dev/null +++ b/src/util/hapi.js @@ -0,0 +1,14 @@ +/** + * + * @exports {Object} + */ +const host = '/hapi' + +const nozzle = { + selectAllPoints: "/record/selectAllPoints" +} + +for (const item in nozzle) { + nozzle[item] = host + nozzle[item] +} +export default nozzle diff --git a/src/util/interface.js b/src/util/interface.js index 06727f1..e90c979 100644 --- a/src/util/interface.js +++ b/src/util/interface.js @@ -1,4 +1,5 @@ import department from './department' +import hapi from './hapi' // import dataSource from './apiField/dataSource'; const host = '/sysApi' @@ -16,5 +17,6 @@ } // nozzle = Object.assign(nozzle, project) nozzle = Object.assign(nozzle, department) +nozzle = Object.assign(nozzle, hapi) // nozzle = Object.assign(nozzle, dataSource); export default nozzle diff --git a/src/views/CesiumCom/CesiumVue.vue b/src/views/CesiumCom/CesiumVue.vue index 325cfd9..8d5ad69 100644 --- a/src/views/CesiumCom/CesiumVue.vue +++ b/src/views/CesiumCom/CesiumVue.vue @@ -146,12 +146,21 @@ return data.userName.indexOf(value) !== -1; }, loadTreeData() { - this.$http.post(this.nozzle.userTree, {}).then((result) => { - if (result.data.code == 200) { - this.data = result.data.data; - } - }); + this.$http + .post(this.nozzle.selectAllPoints, { data: { type: "" } }) + .then((result) => { + if (result.data.code == 200) { + this.data = result.data.data; + } + }); }, + // loadTreeData() { + // this.$http.post(this.nozzle.userTree, {}).then((result) => { + // if (result.data.code == 200) { + // this.data = result.data.data; + // } + // }); + // }, titleClick(index) { this.$nextTick(() => { diff --git a/vue.config.js b/vue.config.js index bec1f1b..0e1d78e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -42,8 +42,8 @@ }, '/gltfUrl': { // 历史数据 - // target: 'http://192.168.101.84:6081', - target: 'http://192.168.31.15:6081', + target: 'https://36.133.215.233:9999', + // target: 'http://192.168.31.15:6081', //target: 'http://192.168.100.18:10001', // 接口域名 changeOrigin: true, //是否跨域 pathRewrite: { @@ -89,6 +89,14 @@ pathRewrite: { "^/sysApi": "" //需要rewrite重写的, } + }, + "/hapi": { + // target: "http://192.168.20.112:12000", + target: "http://192.168.1.107:12002", + changeOrigin: true, //是否跨域 + pathRewrite: { + "^/hapi": "" //需要rewrite重写的, + } }