Przeglądaj źródła

feat(前端):油站信息、油品信息修改及新增后刷新页面;油机连接FCC端口改为在油枪处配置

Zhenghanjv 6 miesięcy temu
rodzic
commit
d11f6a929c
22 zmienionych plików z 111 dodań i 96 usunięć
  1. 2 2
      Edge.Core/Domain/FccNozzleInfo/FccNozzleInfo.cs
  2. 8 8
      Edge.Core/Domain/FccNozzleInfo/Input/UploadNozzleInfoInput.cs
  3. 3 3
      Edge.Core/Domain/FccNozzleInfo/Output/DetailsNozzleInfoOutput.cs
  4. 0 5
      Edge.Core/Domain/FccStationInfo/FccStationInfo.cs
  5. 1 7
      Edge.Core/Domain/FccStationInfo/Input/StationInfoInput.cs
  6. 1 2
      Edge.Core/Domain/FccStationInfo/Output/StationInfoOutput.cs
  7. 6 0
      Edge.Core/Processor/Communicator/IClinet.cs
  8. 5 0
      Edge.Core/Processor/Communicator/TcpServerCommunicator.cs
  9. 1 1
      Edge.Core/Processor/GenericDeviceProcessor.cs
  10. 2 2
      Edge.Core/Processor/IDeviceHandler.cs
  11. 14 11
      HengshanPaymentTerminal/HengshanPayTermHandler.cs
  12. 1 1
      src/FccLife.Web/Repositories/FccNozzleInfo/NozzleInfoReposity.cs
  13. 0 1
      src/FccLife.Web/Repositories/FccStationInfo/StationRepository.cs
  14. 1 1
      src/FccLife.Web/Services/FccNozzleInfo/NozzleInfoServiceImpl.cs
  15. 1 14
      src/FccLife.Web/Services/FccStaionInfo/StationServiceImpl.cs
  16. 3 0
      src/FccWeb/admin.ui.plus-master/.vite/deps_temp_44f6c146/package.json
  17. 1 1
      src/FccWeb/admin.ui.plus-master/src/api/FormValidation.ts
  18. 21 8
      src/FccWeb/admin.ui.plus-master/src/views/admin/components/addStation.vue
  19. 15 17
      src/FccWeb/admin.ui.plus-master/src/views/admin/components/editOilGun.vue
  20. 3 3
      src/FccWeb/admin.ui.plus-master/src/views/admin/components/oilcanDetail.vue
  21. 15 3
      src/FccWeb/admin.ui.plus-master/src/views/admin/oil/oil.vue
  22. 7 6
      src/FccWeb/admin.ui.plus-master/src/views/admin/station/station.vue

+ 2 - 2
Edge.Core/Domain/FccNozzleInfo/FccNozzleInfo.cs

@@ -14,9 +14,9 @@ namespace Edge.Core.Domain.FccNozzleInfo
         public long Id { get; set; }
 
         /// <summary>
-        /// 油机ip
+        /// 油机连接FCC端口
         /// </summary>
-        public string MachineIp { get; set; }
+        public int Port { get; set; }
 
         /// <summary>
         /// 加油点

+ 8 - 8
Edge.Core/Domain/FccNozzleInfo/Input/UploadNozzleInfoInput.cs

@@ -8,9 +8,9 @@
         public long? Id { get; set; }
 
         /// <summary>
-        /// 油机ip
+        /// 油机连接FCC端口
         /// </summary>
-        public string Ip { get; set; }
+        public int Port { get; set; }
 
         /// <summary>
         /// 加油点
@@ -41,12 +41,12 @@
         {
             return new FccNozzleInfo()
             {
-                MachineIp = Ip,
-                FuelPoint = FuelPoint,
-                InternalNum = InternalNum,
-                ExternalNum = NozzleNum,
-                TankId = TankId,
-                TankNum = TankNum
+                Port = this.Port,
+                FuelPoint = this.FuelPoint,
+                InternalNum = this.InternalNum,
+                ExternalNum = this.NozzleNum,
+                TankId = this.TankId,
+                TankNum = this.TankNum
             };
         }
     }

+ 3 - 3
Edge.Core/Domain/FccNozzleInfo/Output/DetailsNozzleInfoOutput.cs

@@ -8,9 +8,9 @@
         public long? Id { get; set; }
 
         /// <summary>
-        /// 油机ip
+        /// 油机连接FCC端口
         /// </summary>
-        public string Ip { get; set; }
+        public int Port { get; set; }
 
         /// <summary>
         /// 加油点
@@ -47,7 +47,7 @@
         public DetailsNozzleInfoOutput(FccNozzleInfo fccNozzleInfo)
         {
             this.Id = fccNozzleInfo.Id;
-            this.Ip = fccNozzleInfo.MachineIp;
+            this.Port = fccNozzleInfo.Port;
             this.FuelPoint = fccNozzleInfo.FuelPoint;
             this.InternalNum = fccNozzleInfo.InternalNum;
             this.NozzleNum = fccNozzleInfo.ExternalNum;

+ 0 - 5
Edge.Core/Domain/FccStationInfo/FccStationInfo.cs

@@ -64,11 +64,6 @@ namespace Edge.Core.Domain.FccStationInfo
         /// </summary>
         public string IcardService { get; set; }
 
-        /// <summary>
-        /// 本地 fcc 与油机 socket 通讯端口
-        /// </summary>
-        public string ServicePort { get; set; }
-
         /// <summary>
         /// 本地 fcc 与 fcc 页面 webSocket 端口
         /// </summary>

+ 1 - 7
Edge.Core/Domain/FccStationInfo/Input/StationInfoInput.cs

@@ -59,11 +59,6 @@ namespace Edge.Core.Domain.FccStationInfo.Input
         /// </summary>
         public string? IcardService { get; set; }
 
-        /// <summary>
-        /// 本地 fcc 与油机 socket 通讯端口
-        /// </summary>
-        public string? ServicePort { get; set; }
-
         /// <summary>
         /// 本地 fcc 与 fcc 页面 webSocket 端口
         /// </summary>
@@ -85,7 +80,6 @@ namespace Edge.Core.Domain.FccStationInfo.Input
                 CloudService = this.CloudService,
                 MqttService = this.MqttService,
                 IcardService = this.IcardService != null ? this.IcardService : "",
-                ServicePort = this.ServicePort,
                 WebSocketPort = this.WebSocketPort
             };
         }
@@ -93,7 +87,7 @@ namespace Edge.Core.Domain.FccStationInfo.Input
         public bool IsNotNorm()
         {
             return string.IsNullOrEmpty(BuildId) || !Longitude.HasValue || !Latitude.HasValue || string.IsNullOrEmpty(SmallProgram) || string.IsNullOrEmpty(CloudService)
-                || string.IsNullOrEmpty(MqttService) || string.IsNullOrEmpty(ServicePort) || string.IsNullOrEmpty(WebSocketPort);
+                || string.IsNullOrEmpty(MqttService) || string.IsNullOrEmpty(WebSocketPort);
         }
     }
 }

+ 1 - 2
Edge.Core/Domain/FccStationInfo/Output/StationInfoOutput.cs

@@ -20,7 +20,7 @@ namespace Edge.Core.Domain.FccStationInfo.Output
 
     public class StationInfo
     {
-        public StationInfo() { }
+        //public StationInfo() { }
 
         public StationInfo(FccStationInfo fccStationInfo)
         {
@@ -35,7 +35,6 @@ namespace Edge.Core.Domain.FccStationInfo.Output
             this.CloudService = fccStationInfo.CloudService;
             this.MqttService = fccStationInfo.MqttService;
             this.IcardService = fccStationInfo.IcardService;
-            this.ServicePort = fccStationInfo.ServicePort;
             this.WebSocketPort = fccStationInfo.WebSocketPort;
         }
         /// <summary>

+ 6 - 0
Edge.Core/Processor/Communicator/IClinet.cs

@@ -14,5 +14,11 @@ namespace Edge.Core.Processor.Communicator
         /// </summary>
         /// <returns></returns>
         TcpClient? GetTcpClient();
+
+        /// <summary>
+        /// 获取连接的服务端端口
+        /// </summary>
+        /// <returns></returns>
+        int GetServerPort();
     }
 }

+ 5 - 0
Edge.Core/Processor/Communicator/TcpServerCommunicator.cs

@@ -356,5 +356,10 @@ namespace Edge.Core.Processor.Communicator
         {
             return this.exclusiveTcpClient;
         }
+
+        public int GetServerPort()
+        {
+            return this.localTcpServerListeningPort;
+        }
     }
 }

+ 1 - 1
Edge.Core/Processor/GenericDeviceProcessor.cs

@@ -107,7 +107,7 @@ namespace Edge.Core.Processor
                 if(communicator is IClinet)
                 {
                     IClinet clinet = (IClinet)communicator;
-                    handler.SetTcpClient(clinet?.GetTcpClient());
+                    handler.SetTcpClient(clinet?.GetTcpClient(),clinet?.GetServerPort());
                     handler.SendQRCodeAsync();
                 }
             };

+ 2 - 2
Edge.Core/Processor/IDeviceHandler.cs

@@ -45,9 +45,9 @@ namespace Edge.Core.Processor
         void SendActuallyPaid(FccOrderInfo orderInfo) { }
 
         /// <summary>
-        /// 设置tcp连接客户端
+        /// 设置tcp连接客户端,所连接的服务端端口
         /// </summary>
-        void SetTcpClient(TcpClient? client) { }
+        void SetTcpClient(TcpClient? client,int? serverPort) { }
     }
 
     public abstract class TestableActivePollingDeviceHandler<TRaw, TMessage> : IDeviceHandler<TRaw, TMessage> where TMessage : MessageBase

+ 14 - 11
HengshanPaymentTerminal/HengshanPayTermHandler.cs

@@ -79,6 +79,8 @@ namespace HengshanPaymentTerminal
 
         public TcpClient? client { get; set; }
 
+        public int? serverPort { get; set; }
+
         private readonly ConcurrentDictionary<string,TaskCompletionSource<CommonMessage>> _tcsDictionary = new ConcurrentDictionary<string, TaskCompletionSource<CommonMessage>>();
 
         private byte frame = 0x00;
@@ -718,16 +720,16 @@ namespace HengshanPaymentTerminal
                 logger.Info($"can not get smallProgram link");
                 return;
             }
-            System.Net.EndPoint? remoteEndPoint = this.client?.Client.RemoteEndPoint;
-            if (remoteEndPoint == null)
-            {
-                logger.Info($"can not get client");
-                return;
-            }
-            string[] remoteAddr = remoteEndPoint.ToString().Split(":");
-            string ip = remoteAddr[0];
-
-            List<DetailsNozzleInfoOutput> nozzles = nozzleInfoList.FindAll(nozzle => nozzle.Ip == ip);
+            //System.Net.EndPoint? remoteEndPoint = this.client?.Client.RemoteEndPoint;
+            //if (remoteEndPoint == null)
+            //{
+            //    logger.Info($"can not get client");
+            //    return;
+            //}
+            //string[] remoteAddr = remoteEndPoint.ToString().Split(":");
+            //string ip = remoteAddr[0];
+
+            List<DetailsNozzleInfoOutput> nozzles = nozzleInfoList.FindAll(nozzle => nozzle.Port == serverPort);
             foreach (var item in nozzles)
             {
                 List<Byte> list = new List<Byte>();
@@ -795,9 +797,10 @@ namespace HengshanPaymentTerminal
             return await SendRequestToMachine("发送取消授权请求", BitConverter.ToString(commandAndNozzle).Replace("-", ""), sendBytes);
         }
 
-        public void SetTcpClinet(TcpClient? tcpClient)
+        public void SetTcpClient(TcpClient? tcpClient, int? serverPort)
         {
             this.client = tcpClient;
+            this.serverPort = serverPort;
         }
 
         /// <summary>

+ 1 - 1
src/FccLife.Web/Repositories/FccNozzleInfo/NozzleInfoReposity.cs

@@ -40,7 +40,7 @@ namespace FccLite.Web.Repositories.FccNozzleInfo
                     Logger.Info($"find nozzle info with id : {uploadNozzleInfoInput.Id} for update, result is null");
                     return 0;
                 }
-                fccNozzleInfo.MachineIp = uploadNozzleInfoInput.Ip;
+                fccNozzleInfo.Port = uploadNozzleInfoInput.Port;
                 fccNozzleInfo.FuelPoint = uploadNozzleInfoInput.FuelPoint;
                 fccNozzleInfo.InternalNum = uploadNozzleInfoInput.InternalNum;
                 fccNozzleInfo.ExternalNum = uploadNozzleInfoInput.NozzleNum;

+ 0 - 1
src/FccLife.Web/Repositories/FccStationInfo/StationRepository.cs

@@ -85,7 +85,6 @@ namespace FccLite.Web.Repositories.FccStationInfo
                 station.CloudService = stationInfoInput.CloudService;
                 station.MqttService = stationInfoInput.MqttService;
                 station.IcardService = stationInfoInput.IcardService != null ? stationInfoInput.IcardService : "";
-                station.ServicePort = stationInfoInput.ServicePort;
                 station.WebSocketPort = stationInfoInput.WebSocketPort;
                 _dbContext.SaveChanges();
                 return station;

+ 1 - 1
src/FccLife.Web/Services/FccNozzleInfo/NozzleInfoServiceImpl.cs

@@ -101,7 +101,7 @@ namespace FccLite.Web.Services.FccNozzleInfo
             {
                 Id = fccNozzleInfo.Id,
                 NozzleNum = fccNozzleInfo.ExternalNum,
-                Ip = fccNozzleInfo.MachineIp,
+                Port = fccNozzleInfo.Port,
                 FuelPoint = fccNozzleInfo.FuelPoint,
                 InternalNum = fccNozzleInfo.InternalNum,
                 TankId = fccNozzleInfo.TankId,

+ 1 - 14
src/FccLife.Web/Services/FccStaionInfo/StationServiceImpl.cs

@@ -33,20 +33,7 @@ namespace FccLite.Web.Services.FccStaionInfo
             IEnumerable<FccStationInfo> enumerable = await _stationRepository.GetPage(page, size, id, name, longitude, latitude);
             
             List<StationInfo> fccStationInfos = enumerable.Select(stationInfo =>
-                new StationInfo()
-                {
-                    Id = stationInfo.Id,
-                    BuildId = stationInfo.BuildId,
-                    Name = stationInfo.Name,
-                    Longitude = stationInfo.Longitude,
-                    Latitude = stationInfo.Latitude,
-                    SmallProgram = stationInfo.SmallProgram,
-                    CloudService = stationInfo.CloudService,
-                    MqttService = stationInfo.MqttService,
-                    IcardService = stationInfo.IcardService,
-                    ServicePort = stationInfo.ServicePort,
-                    WebSocketPort = stationInfo.WebSocketPort
-                }
+                new StationInfo(stationInfo)
             ).ToList();
             Logger.Info($"get staion info,count is {fccStationInfos.Count}");
             return new StationInfoOutput()

+ 3 - 0
src/FccWeb/admin.ui.plus-master/.vite/deps_temp_44f6c146/package.json

@@ -0,0 +1,3 @@
+{
+  "type": "module"
+}

+ 1 - 1
src/FccWeb/admin.ui.plus-master/src/api/FormValidation.ts

@@ -33,7 +33,7 @@ const addStationRules = reactive({
   // 验证规则 - 编辑油枪
   const editOilGunRules = reactive({
     nozzleNum: [{ required: true, message: '请输入油枪号', trigger: 'blur', }],
-    ip: [{ required: true, message: '请输入油机主板', trigger: 'blur', }],
+    port: [{ required: true, message: '请输入连接FCC端口', trigger: 'blur', }],
     fuelPoint: [{ required: true, message: '请输入加油点', trigger: 'blur', }],
     internalNum: [{ required: true, message: '请输入内部油枪号', trigger: 'blur', }],
     tankId: [{ required: true, message: '请输入关联油罐ID', trigger: 'blur', }],

+ 21 - 8
src/FccWeb/admin.ui.plus-master/src/views/admin/components/addStation.vue

@@ -12,11 +12,11 @@
                         <el-input v-model="dataList.name" placeholder="请输入站点名称" clearable />
                     </el-form-item>
                 </el-col>
-                <!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                     <el-form-item label="站点ID" :required="true" prop="buildId">
                         <el-input v-model="dataList.buildId" placeholder="请输入站点ID" clearable />
                     </el-form-item>
-                </el-col> -->
+                </el-col>
                 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                     <el-form-item label="经度" :required="true" prop="longitude">
                         <el-input v-model="dataList.longitude" type="number" placeholder="请输入经度" clearable />
@@ -34,8 +34,14 @@
                 </el-col>
 
                 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-                    <el-form-item label="油机连接端口" :required="true" prop="servicePort">
-                        <el-input v-model="dataList.servicePort" placeholder="请输入油机连接端口" clearable />
+                    <el-form-item label="客户端id" :required="true" prop="secretId">
+                        <el-input v-model="dataList.secretId" placeholder="请输入客户端id" clearable />
+                    </el-form-item>
+                </el-col>
+
+                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+                    <el-form-item label="云端密钥" :required="true" prop="acessKey">
+                        <el-input v-model="dataList.acessKey" placeholder="请输入云端密钥" clearable />
                     </el-form-item>
                 </el-col>
 
@@ -87,7 +93,11 @@ let dataList = ref({
     /** 云端服务地址 */
     cloudService: '',
     /** 开放给油机连接的的端口 */
-    servicePort: null,
+    // servicePort: null,
+    /** 客户端id */
+    secretId:'',
+    /** 云端通讯密钥 */
+    acessKey:'',
     /** 小程序地址 */
     smallProgram: '',
     /** 站点id */
@@ -118,9 +128,8 @@ const submit = async () => {
         await addStation(dataList.value).then((res) => {
             console.log(res)
             isDisplay.loading = false
-
             if (res?.result) {
-                eventBus.emit('refreshView')
+                eventBus.emit('refreshViewStation')
                 isDisplay.isShowDialog = false
             }
         })
@@ -137,9 +146,13 @@ const openDialog = (val: any) => {
     if (val) {
         dataList.value = val
     } else {
+        const array = new Uint8Array(16);
+        crypto.getRandomValues(array);
+        var secret = Array.from(array, byte => byte.toString(16).padStart(2, '0')).join('');
         dataList.value = {
             cloudService: '',
-            servicePort: null,
+            secretId: secret,
+            acessKey: '',
             smallProgram: '',
             buildId: null,
             webSocketPort: '',

+ 15 - 17
src/FccWeb/admin.ui.plus-master/src/views/admin/components/editOilGun.vue

@@ -12,23 +12,23 @@
                     </el-form-item>
                 </el-col> -->
                 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-                    <el-form-item label="油枪号" :required="true" prop="nozzleNum">
-                        <el-input v-model="dataList.nozzleNum" placeholder="请输入油枪号" clearable />
+                    <el-form-item label="加油点" prop="fuelPoint">
+                        <el-input v-model="dataList.fuelPoint" placeholder="请输入加油点" clearable />
                     </el-form-item>
                 </el-col>
                 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-                    <el-form-item label="主板ip" prop="ip">
-                        <el-input v-model="dataList.ip" placeholder="请输入主板ip" clearable />
+                    <el-form-item label="内部枪号" prop="internalNum">
+                        <el-input v-model="dataList.internalNum" placeholder="请输入内部油枪号" clearable />
                     </el-form-item>
                 </el-col>
                 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-                    <el-form-item label="加油点" prop="fuelPoint">
-                        <el-input v-model="dataList.fuelPoint" placeholder="请输入加油点" clearable />
+                    <el-form-item label="油枪号" :required="true" prop="nozzleNum">
+                        <el-input v-model="dataList.nozzleNum" placeholder="请输入油枪号" clearable />
                     </el-form-item>
                 </el-col>
                 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-                    <el-form-item label="内部油枪号" prop="internalNum">
-                        <el-input v-model="dataList.internalNum" placeholder="请输入内部油枪号" clearable />
+                    <el-form-item label="连接FCC端口" prop="port">
+                        <el-input v-model="dataList.port" placeholder="请输入主板连接FCC端口" clearable />
                     </el-form-item>
                 </el-col>
             </el-row>
@@ -56,8 +56,8 @@ let dataList = reactive({
     id: null,
     /** 油枪号 */
     nozzleNum: null,
-    /** 油机主板 */
-    ip: '',
+    /** 油机主板连接FCC端口 */
+    port: null,
     /** 加油点 */
     fuelPoint: null,
     /** 内部油枪号 */
@@ -79,11 +79,9 @@ const submit = async () => {
         await uploadNozzleInfo(dataList).then((res) => {
             console.log(res)
             isDisplay.loading = false
-
-            if (res?.result) {
-                eventBus.emit('refreshView')
-                isDisplay.isShowDialog = false
-            }
+            eventBus.emit('refreshViewNozzle')
+            isDisplay.isShowDialog = false
+            
         })
     })
 }
@@ -92,7 +90,7 @@ const openDialog = async (data: any) => {
     if (data.flag == 0) {
         title.value = '新增油枪'
         dataList.id = null
-        dataList.ip = ''
+        dataList.port = null
         dataList.nozzleNum = null
         dataList.fuelPoint = null
         dataList.internalNum = null
@@ -104,7 +102,7 @@ const openDialog = async (data: any) => {
             console.log(res)
             dataList.id = res.id
             dataList.nozzleNum = res.nozzleNum
-            dataList.ip = res.ip
+            dataList.port = res.port
             dataList.fuelPoint = res.fuelPoint
             dataList.internalNum = res.internalNum
             dataList.tankId = res.tankId

+ 3 - 3
src/FccWeb/admin.ui.plus-master/src/views/admin/components/oilcanDetail.vue

@@ -80,14 +80,14 @@ const removeKey = ref(0)
 
 // 挂载前
 onBeforeMount(() => {
-    eventBus.off('refreshView')
+    eventBus.off('refreshViewNozzle')
 })
 
 // 挂载时
 onMounted(async () => {
     await getInfo()
-    eventBus.off('refreshView')
-    eventBus.on('refreshView', async () => {
+    eventBus.off('refreshViewNozzle')
+    eventBus.on('refreshViewNozzle', async () => {
         await getInfo()
     })
 })

+ 15 - 3
src/FccWeb/admin.ui.plus-master/src/views/admin/oil/oil.vue

@@ -48,8 +48,10 @@
 </template>
 
 <script setup lang="ts">
-import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
-import { getOilInfo, deleteOilInfo } from '/@/api/api'
+import { defineAsyncComponent, onBeforeMount, onMounted, reactive, ref } from 'vue';
+import { getOilInfo, deleteOilInfo } from '/@/api/api';
+import eventBus from "/@/utils/mitt";
+
 /**引入组件*/
 const EditDialog = defineAsyncComponent(() => import('/@/views/admin/components/editOil.vue'))
 const editDialogRef = ref()
@@ -80,6 +82,14 @@ const getData = async () => {
 
 onMounted(() => {
     getData()
+    eventBus.off('refreshView')
+    eventBus.on('refreshView', async () => {
+        await getData()
+    })
+})
+
+onBeforeMount(() => {
+    eventBus.off('refreshView')
 })
 
 // 修改油品
@@ -89,11 +99,13 @@ const uploadData = (row: any) => {
 }
 
 // 删除油品
-const deliteOil = (id: number) => {
+const deliteOil = async (id: number) => {
     deleteOilInfo({ 'id': id }).then((res) => {
         console.log(res)
         removeKey.value = Math.random()
+        return getData();
     })
+    
 }
 
 /**

+ 7 - 6
src/FccWeb/admin.ui.plus-master/src/views/admin/station/station.vue

@@ -75,7 +75,8 @@ const data = reactive([
     { prop: 'latitude', label: '纬度' },
     { prop: 'smallProgram', label: '小程序链接' },
     { prop: 'cloudService', label: '云端地址' },
-    { prop: 'servicePort', label: '油机通讯端口' },
+    { prop: 'secretId', label: '客户端id' },
+    { prop: 'acessKey', label: '云端通讯密钥' },
     { prop: 'webSocketPort', label: 'WebSokcet端口' },
     { prop: 'buildId', label: '站点id' }])
 
@@ -112,14 +113,14 @@ const getData = async () => {
 
 // 挂载前
 onBeforeMount(() => {
-    eventBus.off('refreshView')
+    eventBus.off('refreshViewStation')
 })
 
 // 挂载时
-onMounted(async () => {
-    await getData()
-    eventBus.off('refreshView')
-    eventBus.on('refreshView', async () => {
+onMounted(() => {
+    getData()
+    eventBus.off('refreshViewStation')
+    eventBus.on('refreshViewStation', async () => {
         await getData()
     })
 })