From 0a7d8fffd267bf4574ee724f7eea3bc875fd11d0 Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Sat, 29 Jun 2024 14:34:15 +0800 Subject: [PATCH] =?UTF-8?q?.=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 2 +- src/api/infoApi.js | 45 +++------- src/views/Data.vue | 220 +++++++++++++++++++++++++-------------------- vite.config.js | 4 +- 4 files changed, 141 insertions(+), 130 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57352f2..171ae4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5209,7 +5209,7 @@ }, "node_modules/postcss-pxtorem": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-pxtorem/-/postcss-pxtorem-6.1.0.tgz", + "resolved": "https://registry.npmmirror.com/postcss-pxtorem/-/postcss-pxtorem-6.1.0.tgz", "integrity": "sha512-ROODSNci9ADal3zUcPHOF/K83TiCgNSPXQFSbwyPHNV8ioHIE4SaC+FPOufd8jsr5jV2uIz29v1Uqy1c4ov42g==", "dev": true, "peerDependencies": { diff --git a/src/api/infoApi.js b/src/api/infoApi.js index 45eba25..9f46bc4 100644 --- a/src/api/infoApi.js +++ b/src/api/infoApi.js @@ -164,37 +164,18 @@ const infoApi = { getCom(params) { return postPBRequest("/info", null, 51001, params.name); }, - // // 获取上报列表 - // getSc(params) { - // return getRequest('/sb/list', params) - // }, - // // 获取上报驱动 - // getQuDong(params) { - // return getRequest('/sb/support', params) - // }, - // // 新增上报 - // saveTx(params) { - // return postJsonRequest("/sb", params); - // }, - // // 编辑通讯 - // updateTx(params) { - // return putRequest('/sb', params); - // }, - // // 上报启停 - // stopSc(params) { - // return putRequest("/sc", params); - // }, - // // 删除上报 - // delSc(params) { - // return deleteRequest("/sb", params); - // }, - // // 规则查询 - // getRules(params) { - // return getRequest('/rule', params); - // }, - // // 规则操作 - // postRules(params) { - // return postJsonRequest('/rule', params) - // }, + // 实时数据 + // 获取驱动数据 + getDriverData(params) { + return postPBRequest("/data", null, 55000); + }, + // 获取驱动下设备数据 + getDeviceData(params) { + return postPBRequest("/data", params, 55001); + }, + // 获取设备下的点位 + getPointData(params) { + return postPBRequest("/data", params, 55002); + } }; export default infoApi; \ No newline at end of file diff --git a/src/views/Data.vue b/src/views/Data.vue index 684fe26..7ff325e 100644 --- a/src/views/Data.vue +++ b/src/views/Data.vue @@ -1,43 +1,39 @@