From c5ee7b915cb858f5899feb244e10d9e80919057c Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Wed, 23 Oct 2024 17:21:26 +0800 Subject: [PATCH] =?UTF-8?q?.=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infoApi.js | 4 + src/components/His.vue | 215 +++++++++++++++++++++----------------- src/components/PzSet.vue | 3 +- src/components/SetHis.vue | 114 ++++++++++++++++++++ src/views/Data.vue | 6 +- vite.config.js | 4 +- 6 files changed, 245 insertions(+), 101 deletions(-) create mode 100644 src/components/SetHis.vue diff --git a/src/api/infoApi.js b/src/api/infoApi.js index 31b926d..3165df1 100644 --- a/src/api/infoApi.js +++ b/src/api/infoApi.js @@ -175,6 +175,10 @@ const infoApi = { startHis(params) { return postPBRequest("/data", params, 56002); }, + // 禁用 + endHis(params) { + return postPBRequest("/data", params, 56003); + }, // 导出 exportHis(params) { return postPBRequest("/data", params, 56006); diff --git a/src/components/His.vue b/src/components/His.vue index c8a84be..8d43e0b 100644 --- a/src/components/His.vue +++ b/src/components/His.vue @@ -2,128 +2,153 @@
最大计数: {{ formData.history && formData.history.max }} - 状态: {{ formData.history && !formData.history.enable?"启用":"禁用" }} + 状态: {{ formData.history && formData.history.enable ? "启用" : "禁用" }}
- +
- - - - - + + + +
设定 - 启用 + 启用 + 禁用 导出 清空
+ +
diff --git a/src/components/PzSet.vue b/src/components/PzSet.vue index 62551f2..cea399b 100644 --- a/src/components/PzSet.vue +++ b/src/components/PzSet.vue @@ -54,7 +54,8 @@ 专属配置 - + + diff --git a/src/components/SetHis.vue b/src/components/SetHis.vue new file mode 100644 index 0000000..6e7b2e9 --- /dev/null +++ b/src/components/SetHis.vue @@ -0,0 +1,114 @@ + + + + \ No newline at end of file diff --git a/src/views/Data.vue b/src/views/Data.vue index 9f53c4a..1cad084 100644 --- a/src/views/Data.vue +++ b/src/views/Data.vue @@ -160,9 +160,9 @@ export default { onMounted(() => { getTxStatus(); getPointType(); - - state.intervalId = setInterval(() => - getDriverData(), 1000); + getDriverData() + // state.intervalId = setInterval(() => + // getDriverData(), 1000); }); onUnmounted(() => { diff --git a/vite.config.js b/vite.config.js index 717e473..9ae613f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -38,8 +38,8 @@ export default ({ mode }) => defineConfig({ // target: 'http://cdcm_test_api.shikicc.com:58909', // target: 'http://frp.shikicc.com:58951', // target: 'https://cdcm_api2.shikicc.com', - // target: 'https://cdcm_api.shikicc.com', - target: 'http://localhost:8088', + target: 'https://cdcm_api.shikicc.com', + // target: 'http://localhost:8088', changeOrigin: true, rewrite: path => path.replace(/^\/api/, '/api') }