无人机管理后台前端(已迁走)
张含笑
2025-12-09 5808f76456ca0d40de5074f132b73a5a488e3e13
src/views/device/addDevice.vue
@@ -72,10 +72,10 @@
                dialogWidth: 1050,
                searchGutter: 30,
                searchMenuPosition: 'left',
                searchMenuSpan: 4,
                tip: false,
                searchShow: true,
                searchMenuPosition: 'right',
                searchMenuSpan: 10,
                border: true,
                index: true,
                indexLabel: '序号',
@@ -98,8 +98,7 @@
                        editDisplay: false,
                        labelWidth: 130,
                        search: true,
                        // searchSpan: 4,
                        labelWidth: 130,
                        searchSpan: 4,
                        rules: [
                            {
                                required: true,
@@ -289,9 +288,9 @@
                            },
                        ],
                    },
                ],
            },
@@ -394,7 +393,7 @@
                console.error('获取行政区划数据失败:', error);
                return [];
            }
        },
        },
        findNodeById(tree, id) {
            if (tree.id === id) {
                return tree;
@@ -412,11 +411,11 @@
            try {
                const response = await this.getFullAreaCode(areaCode);
                const codes = response.split(',');
                // 获取区域树数据
                const xzqhData = await this.getRegionTreeList(codes[0]);
                if (!xzqhData) return '/';
                const names = [];
                for (const code of codes) {
                    const node = this.findNodeById(xzqhData, code);
@@ -435,7 +434,7 @@
        copyInfo (row, index) {
          const ipAddress = import.meta.env.VITE_APP_DEVICE_IP
          let params = `
            host: tcp://${ipAddress}
            网关地址: tcp://${ipAddress}
            账号:drone
            密码:drone@123
            组织id:${row.bing_id}
@@ -611,7 +610,7 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { releaseTimeRange } = this.query
            let values = {
                ...params,
@@ -630,7 +629,7 @@
            if (values.area_code) {
                values['area_code'] = values.area_code.split(',').pop()
            }
            this.loading = true
            getList(page.currentPage, page.pageSize, values).then(async res => {
                const data = res.data.data
@@ -650,7 +649,7 @@
                this.loading = false
                this.selectionClear()
            })
        },
        treeLoad (tree, treeNode, resolve) {
            var params = {