From aa107f0283a7043a5a0016e0797fffe10e3962d0 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 21 Jul 2025 14:05:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/device/addDevice.vue | 49 +++++++++++++++----------------------------------
1 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/src/views/device/addDevice.vue b/src/views/device/addDevice.vue
index 88a8a89..a1c4833 100644
--- a/src/views/device/addDevice.vue
+++ b/src/views/device/addDevice.vue
@@ -231,41 +231,22 @@
methods: {
copyInfo (row, index) {
- if (import.meta.env.VITE_APP_ENV === 'development') {
- // alert('地址'+import.meta.env.VITE_APP_ENV);
- let params = `
- host: tcp://139.196.74.78:1883
- 账号:drone
- 密码:123456
- 组织id:${row.bing_id}
- 设备码:${row.bind_code}
- 机场名称:${row.workspace_name}
- aircrattName:${row.workspace_desc}`
- $Clipboard({
- text: params,
- }).then(() => {
- this.$message.success("复制成功")
- }).catch(() => {
- this.$message.error("复制失败")
- })
- } else {
- // alert('地址'+import.meta.env.VITE_APP_ENV);
- let params = `
- host: tcp://101.132.85.201:1883
- 账号:drone
+ const ipAddress = import.meta.env.VITE_APP_DEVICE_IP
+ let params = `
+ host: tcp://${ipAddress}
+ 账号:drone
密码:drone@123
- 组织id:${row.bing_id}
- 设备码:${row.bind_code}
- 机场名称:${row.workspace_name}
+ 组织id:${row.bing_id}
+ 设备码:${row.bind_code}
+ 机场名称:${row.workspace_name}
aircrattName:${row.workspace_desc}`
- $Clipboard({
- text: params,
- }).then(() => {
- this.$message.success("复制成功")
- }).catch(() => {
- this.$message.error("复制失败")
- })
- }
+ $Clipboard({
+ text: params,
+ }).then(() => {
+ this.$message.success("复制成功")
+ }).catch(() => {
+ this.$message.error("复制失败")
+ })
},
init () {
this.onLoad(this.page)
@@ -443,4 +424,4 @@
border-color: #409eff;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3