CzRger vor 1 Jahr
Ursprung
Commit
346c8aebd4
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 1 1
      src/views/gis/layout/index.vue
  2. 2 2
      src/views/gis/layout/v2-table.vue

+ 1 - 1
src/views/gis/layout/index.vue

@@ -140,7 +140,7 @@
       </div>
       <div class="sb-item">
         <div class="sb-item-label">状态:</div>
-        <div class="sb-item-value">{{qyParams.sbInfo?.online === '0' ? '在线' : '离线'}}</div>
+        <div class="sb-item-value">{{qyParams.sbInfo?.online == '1' ? '在线' : '离线'}}</div>
       </div>
       <div class="play-button __hover" @click="showVideo = true">视频调阅</div>
     </div>

+ 2 - 2
src/views/gis/layout/v2-table.vue

@@ -52,14 +52,14 @@ export default defineComponent({
       {width: 1, title: '序号', align: 'center', cellRenderer: ({ rowIndex }) => `${rowIndex + 1}`},
       {width: 1, title: '名称', dataKey: 'name'},
       {width: 1, title: '状态', align: 'center', cellRenderer: ({rowData}) => (
-          <span style={rowData.online === '1' ? "color: #4CFFFF;" : ""}>{rowData.online === '1' ? '在线' : '离线'}</span>
+          <span style={rowData.online == '1' ? "color: #4CFFFF;" : ""}>{rowData.online === '1' ? '在线' : '离线'}</span>
         )},
       {width: 1, title: '类型', align: 'center', dataKey: 'type'},
       {width: 1, title: '距离', align: 'right', cellRenderer: ({rowData}) => {
           // const start = props.feat.getGeometry().getCoordinates()
           // const end = that.$easyMap.formatPosition.wptTcpt(rowData.wkt)
           const end = [Number(rowData.longitude), Number(rowData.latitude)]
-          return turf.distance(props.center, end, {units: 'kilometers'}).toFixed(1) + 'km';
+          return turf.distance(props.center, end, {units: 'kilometers'}).toFixed(2) + 'km';
         }
       },
     ]