From 02409bfbe15f22fc3b5dccadabfd860a660a49d9 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 11 Oct 2025 10:37:14 +0800
Subject: [PATCH] feat: 名称修改

---
 src/views/device/airport.vue |  187 ++++++++++++++++++++++++++++------------------
 1 files changed, 113 insertions(+), 74 deletions(-)

diff --git a/src/views/device/airport.vue b/src/views/device/airport.vue
index ad58710..f3178d6 100644
--- a/src/views/device/airport.vue
+++ b/src/views/device/airport.vue
@@ -57,7 +57,7 @@
       </template>
       <template #menu="scope">
         <el-dropdown>
-              <el-button type="primary" text icon="el-icon-more" v-if="permission.oss_set">更 多</el-button>
+              <el-button type="primary" text icon="el-icon-folder-opened" v-if="permission.oss_set">更 多</el-button>
               <template #dropdown v-if="scope.row.domain == 3">
                 <el-dropdown-menu teleported>
                   <el-dropdown-item command="a">
@@ -281,6 +281,7 @@
         tree: true,
 
         dialogWidth: 1050,
+        searchGutter: 30,
         tip: false,
         searchShow: true,
         searchMenuSpan: 6,
@@ -309,7 +310,7 @@
             search: false,
             slot: true,
             searchSpan: 4,
-            labelWidth: 130,
+            labelWidth: 145,
             width: 120,
             // formatter: (row) => row.domain == 3 ? '机巢' : '无人机'
             // rules: [
@@ -323,21 +324,22 @@
           {
             label: '设备类型',
             prop: 'domainTxt',
-            editDisabled: true,
+            // editDisabled: true,
             editDisplay: false, //编辑显示
             viewDisplay: true, //查看显示
-            labelWidth: 130,
+            labelWidth: 145,
             width: 120,
             hide: true
           },
           {
             label: '设备型号',
             prop: 'device_name',
-            editDisabled: true,
+            // editDisabled: true,
+            editDisplay: false, //编辑显示
             viewDisplay: true, //查看显示
             search: false,
             searchSpan: 4,
-            labelWidth: 130,
+            labelWidth: 145,
             width: 120,
             // rules: [
             //   {
@@ -350,11 +352,12 @@
           {
             label: '设备SN',
             prop: 'device_sn',
-            labelWidth: 130,
+            labelWidth: 145,
             width: 120,
             overHidden: true,
             searchSpan: 4,
-            editDisabled: true,
+            // editDisabled: true,
+            editDisplay: false, //编辑显示
             // rules: [
             //   {
             //     required: true,
@@ -366,7 +369,7 @@
           // {
           //   label: '机巢编号',
           //   prop: 'machine_nest_sn',
-          //   labelWidth: 130,
+          //   labelWidth: 145,
           //   editDisabled: true,
           //   rules: [
           //     {
@@ -377,48 +380,32 @@
           //   ],
           // },
           {
-            label: '设备名称',
-            prop: 'nickname',
-            labelWidth: 130,
-            width: 160,
-            searchSpan: 4,
-            search: true,
-            overHidden: true,
-            editDisplay: true, //编辑显示
-            rules: [
-              {
-                required: true,
-                message: '请输入设备名称',
-                trigger: 'blur',
-              },
-            ],
-          },
-          {
             label: '设备位置',// '行政区划',
             prop: 'area_name',
             // hide: true,
             overHidden: true,
             editDisplay: false, //编辑显示
             viewDisplay: false, //查看显示
-            labelWidth: 130,
+            labelWidth: 145,
             width: 200,
           },
           {
             label: '设备位置',
             prop: 'area_code',
             type: 'cascader',
-            labelWidth: 130,
+            labelWidth: 145,
             searchSpan: 4,
             hide: true,
             search: true,
             // overHidden: true,
             editDisplay: true,
             viewDisplay: true,
+            checkStrictly: true,
+
             props: {
               label: 'title',
               value: 'value',
               emitPath: false,
-              checkStrictly: true,
               multiple: false,
               expandTrigger: 'hover',
             },
@@ -464,10 +451,28 @@
               }
             },
           },
+          {
+            label: '设备名称',
+            prop: 'nickname',
+            labelWidth: 145,
+            width: 160,
+            searchSpan: 4,
+            search: true,
+            overHidden: true,
+            editDisplay: true, //编辑显示
+            rules: [
+              {
+                required: true,
+                message: '请输入设备名称',
+                trigger: 'blur',
+              },
+            ],
+          },
+          
           // {
           //   label: '设备位置',
           //   prop: 'address',
-          //   labelWidth: 130,
+          //   labelWidth: 145,
           //   width: 100,
           //   overHidden: true,
           //   rules: [
@@ -482,10 +487,11 @@
           {
             label: '负载设备',
             prop: 'payload_str',
-            labelWidth: 130,
+            labelWidth: 145,
             width: 160,
             overHidden: true,
-            editDisabled: true,
+            editDisplay: false, //编辑显示
+            // editDisabled: true,
             // rules: [
             //   {
             //     required: true,
@@ -494,10 +500,29 @@
             //   },
             // ],
           },
+          {
+            // hide: true,
+            label: '保险有效期',
+            prop: 'duration_of_insurance',
+            labelWidth: 145,
+            width: 200,
+            type: 'daterange',
+            format: 'YYYY-MM-DD',
+            valueFormat: 'YYYY-MM-DD HH:mm:ss',
+            startPlaceholder: '保险开始日期',
+            endPlaceholder: '保险结束日期',
+            rules: [
+              {
+                required: true,
+                message: '请选择保险有效期',
+                trigger: 'blur',
+              },
+            ],
+          },
           // {
           //   label: '保险有效期',
           //   prop: 'insureExpiredTime',
-          //   labelWidth: 130,
+          //   labelWidth: 145,
           //   width: 110,
           //   rules: [
           //     {
@@ -510,9 +535,10 @@
           {
             label: '流量剩余',
             prop: 'traffic_remaining',
-            labelWidth: 130,
+            labelWidth: 145,
             width: 100,
-            editDisabled: true,
+            // editDisabled: true,
+            editDisplay: false, //编辑显示
             // rules: [
             //   {
             //     required: true,
@@ -524,11 +550,12 @@
           {
             label: '流量到期时间',
             prop: 'traffic_expire_time',
-            labelWidth: 130,
+            labelWidth: 145,
             width: 120,
             type: 'date',
             format: 'YYYY-MM-DD',
-            editDisabled: true,
+            editDisplay: false, //编辑显示
+            // editDisabled: true,
             // rules: [
             //   {
             //     required: true,
@@ -540,9 +567,10 @@
           {
             label: '固件版本',
             prop: 'firmware_version',
-            labelWidth: 130,
+            labelWidth: 145,
             width: 110,
-            editDisabled: true,
+            editDisplay: false, //编辑显示
+            // editDisabled: true,
             // rules: [
             //   {
             //     required: true,
@@ -554,12 +582,13 @@
           {
             label: '固件升级',
             prop: 'firmware_status',
-            labelWidth: 130,
+            labelWidth: 145,
             width: 100,
             hide: true,
             viewDisabled: true,
             addDisabled: true,
-            editDisabled: true,
+            editDisplay: false, //编辑显示
+            // editDisabled: true,
             addDisplay: false,
             editDisplay: false,
             viewDisplay: false,
@@ -577,7 +606,7 @@
             addDisplay: false,
             editDisplay: false,
             viewDisplay: false,
-            labelWidth: 130,
+            labelWidth: 145,
             width: 180,
             rules: [
               {
@@ -595,7 +624,7 @@
             defaultExpandAll: true,
             search: true,
             searchSpan: 4,
-            labelWidth: 130,
+            labelWidth: 145,
             dicUrl: '/blade-system/dept/getTree',
             props: {
               label: 'name',
@@ -615,7 +644,7 @@
           //   addDisplay: false,
           //   editDisplay: false,
           //   type: 'date',
-          //   labelWidth: 130,
+          //   labelWidth: 145,
           //   width: 160,
           //   format: 'YYYY-MM-DD HH:mm:ss',
           //   // valueFormat: 'YYYY-MM-DD HH:mm:ss',
@@ -629,35 +658,18 @@
           // },
 
 
-          {
-            // hide: true,
-            label: '保险有效期',
-            prop: 'duration_of_insurance',
-            labelWidth: 130,
-            width: 200,
-            type: 'daterange',
-            format: 'YYYY-MM-DD',
-            valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            startPlaceholder: '保险开始日期',
-            endPlaceholder: '保险结束日期',
-            rules: [
-              {
-                required: true,
-                message: '请选择保险有效期',
-                trigger: 'blur',
-              },
-            ],
-          },
+          
 
           {
             label: '在线时间',
+            hide: true,
             prop: 'login_time',
             type: 'date',
-            editDisplay: true, //编辑显示
-            editDisabled: true,
-            viewDisplay: true, //查看显示
+            editDisplay: false, //编辑显示
+            // editDisabled: true,
+            viewDisplay: false, //查看显示
             addDisplay: true,
-            labelWidth: 130,
+            labelWidth: 145,
             width: 160,
             overHidden: true,
             format: 'YYYY-MM-DD HH:mm:ss',
@@ -672,15 +684,26 @@
             // ],
           },
           {
+            label: '设备最新在线时间',
+            hide: true,
+            prop: 'login_time',
+            type: 'date',
+            viewDisplay: true, //查看显示
+            labelWidth: 145,
+            overHidden: true,
+            format: 'YYYY-MM-DD HH:mm:ss',
+          },
+          {
             label: '注册时间',
             prop: 'create_time',
             type: 'date',
-            editDisplay: true, //编辑显示
-            editDisabled: true,
-            viewDisplay: true, //查看显示
+            hide: true,
+            editDisplay: false, //编辑显示
+            // editDisabled: true,
+            viewDisplay: false, //查看显示
             addDisplay: true,
             overHidden: true,
-            labelWidth: 130,
+            labelWidth: 145,
             width: 160,
             format: 'YYYY-MM-DD HH:mm:ss',
             // valueFormat: 'YYYY-MM-DD HH:mm:ss',
@@ -694,13 +717,24 @@
             // ],
           },
           {
+            label: '设备注册时间',
+            prop: 'create_time',
+            type: 'date',
+            hide: true,
+            viewDisplay: true, //查看显示
+            overHidden: true,
+            labelWidth: 145,
+            width: 160,
+            format: 'YYYY-MM-DD HH:mm:ss',
+          },
+          {
             label: '设备状态',
             prop: 'cnstatus',
             hide: true,
             addDisplay: false,
             editDisplay: false,
             viewDisplay: false,
-            labelWidth: 130,
+            labelWidth: 145,
           },
           {
             label: '设备状态',
@@ -730,7 +764,7 @@
             addDisplay: false,
             editDisplay: false,
             viewDisplay: true,
-            labelWidth: 130,
+            labelWidth: 145,
             width: 110,
           },
           {
@@ -739,7 +773,7 @@
             addDisplay: false,
             editDisplay: false,
             viewDisplay: false,
-            labelWidth: 130,
+            labelWidth: 145,
             searchSpan: 4,
             search: true,
             type: 'select',
@@ -1244,6 +1278,8 @@
         area_code: row.area_code.split(',').pop(),
         insure_start_time: row.duration_of_insurance[0],
         insure_expired_time: row.duration_of_insurance[1],
+        deptId: row.dept_id,
+        areaCode: row.area_code.split(',').pop(),
       }
       if (submitData.traffic_expire_time === '') {
         delete submitData.traffic_expire_time
@@ -1384,6 +1420,9 @@
         values.releaseTimeRange = null
       }
       values['type'] = 1
+      if (values.area_code) {
+          values['area_code'] = values.area_code.split(',').pop()
+      }
       this.loading = true
       getList(page.currentPage, page.pageSize, values).then(res => {
         const data = res.data.data

--
Gitblit v1.9.3