From 15f13085577002c1f4c4abaaa4d62d1d746deb20 Mon Sep 17 00:00:00 2001
From: sjl <1716605279@qq.com>
Date: Mon, 10 Feb 2025 16:35:14 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/.env.development | 2 +-
frontend/src/api/device/device/index.ts | 2 +-
frontend/src/api/device/interface/device.ts | 2 +-
frontend/src/views/home/components/table.vue | 2 ++
.../machine/device/components/devicePopup.vue | 31 +++----------------
5 files changed, 9 insertions(+), 30 deletions(-)
diff --git a/frontend/.env.development b/frontend/.env.development
index ca3d07d..8f13788 100644
--- a/frontend/.env.development
+++ b/frontend/.env.development
@@ -19,6 +19,6 @@ VITE_API_URL=/api
# 开发环境跨域代理,支持配置多个
-VITE_PROXY=[["/api","http://192.168.1.127:18092/"]]
+VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
#VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
diff --git a/frontend/src/api/device/device/index.ts b/frontend/src/api/device/device/index.ts
index 53a061d..2140ee9 100644
--- a/frontend/src/api/device/device/index.ts
+++ b/frontend/src/api/device/device/index.ts
@@ -54,7 +54,7 @@ export const importCNDev = (params: Device.ReqPqDevParams) => {
}
//根据设备类型决定(电源、icd、模板、通道数、额定电压、额定电流);
export const getPqDev = () => {
- return http.post(`/devType/list`)
+ return http.post(`/devType/listAll`)
}
//被检设备归档
diff --git a/frontend/src/api/device/interface/device.ts b/frontend/src/api/device/interface/device.ts
index cbc53aa..186c6aa 100644
--- a/frontend/src/api/device/interface/device.ts
+++ b/frontend/src/api/device/interface/device.ts
@@ -65,7 +65,7 @@ export namespace Device {
updateBy?: string| null; //更新用户
updateTime?: string| null; //更新时间
icdId: string| null;
- power: string| null;
+ power: string| null;//工作电源
preinvestmentPlan: string| null;
}
diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue
index 4a5dddd..5543bb6 100644
--- a/frontend/src/views/home/components/table.vue
+++ b/frontend/src/views/home/components/table.vue
@@ -635,8 +635,10 @@ const handleSelectionChange = (selection: any[]) => {
channelsSelection.value = selection
devNum = selection.length
devChannelsNum = 0
+
for (let i = 0; i < selection.length; i++) {
devChannelsNum += selection[i].dev_Chns
+
}
devTestedNum = selection.filter((item) => item.checkState === 2).length
diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue
index e2a74f5..a4e85a2 100644
--- a/frontend/src/views/machine/device/components/devicePopup.vue
+++ b/frontend/src/views/machine/device/components/devicePopup.vue
@@ -67,34 +67,13 @@
参数信息
-
-
-
+
-
-
-
+
-
-
-
+
@@ -171,7 +150,7 @@ import IPAddress from '@/components/IpAddress/index.vue'
import { dialogBig } from '@/utils/elementBind'
import { type Device } from '@/api/device/interface/device'
import { ElMessage, type FormItemRule } from 'element-plus'
-import { addPqDev, updatePqDev,getPqDev } from '@/api/device/device'
+import { addPqDev, updatePqDev } from '@/api/device/device'
import { computed, reactive, type Ref, ref } from 'vue'
import { useDictStore } from '@/stores/modules/dict'
import { CirclePlus, Delete, EditPen } from '@element-plus/icons-vue'
@@ -386,8 +365,6 @@ const rules = computed(() => {
// 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, data: Device.ResPqDev,currentMode: string,currentScene: string,devType:Device.ResDev[] ) => {
-
- console.log('open', dictStore.getDictData('app_scene'))
devTypeOptions.value = devType
mode.value = currentMode
scene.value = currentScene