无人机管理后台前端(已迁走)
张含笑
2025-07-21 3be2e099bbc05e902dfcfabc403ade0a2aba8ef4
src/views/device/addDevice.vue
@@ -80,7 +80,7 @@
                grid: false,
                height: 'auto',
                calcHeight: 0,
                calcHeight: 20,
                column: [
                    {
                        label: '工作空间名称',
@@ -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)
@@ -425,15 +406,6 @@
</script>
<style lang="scss" scoped>
:deep() {
    .avue-crud__body {
        .el-form {
            height: 745px;
            overflow: auto;
        }
    }
}
.firmware_status {
    background-color: aqua;
    border-radius: 4px;
@@ -452,4 +424,4 @@
        border-color: #409eff;
    }
}
</style>
</style>