章志文 4 달 전
부모
커밋
3bf56d561a

BIN
dist.zip


+ 1 - 1
src/utils/dateTime.ts

@@ -60,7 +60,7 @@ export function getTimeStamp(type) {
 			timestamp = Math.floor(now.getTime() );
 			break;
 		case 1:
-			// 获取30分钟之前的时间戳  
+			// 获取180分钟之前的时间戳  
 			now.setMinutes(now.getMinutes() - 180);
 			timestamp = Math.floor(now.getTime());
 			break;

+ 11 - 6
src/views/alarm/allData/index.vue

@@ -22,13 +22,13 @@
       </div>
       <!-- 表格主体 -->
       <el-table stripe ref="tableRef" :border="true" :data="processTableData"  size="small" @sort-change="handleSortChange"  style="white-space: nowrap;">
-        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true">
+        <el-table-column align="left" label="序号" width="45px" fixed  :show-overflow-tooltip="true">
           <template #default="scope">
             {{ (pageable.pageNum - 1) * pageable.pageSize + scope.$index + 1 }}
           </template>
         </el-table-column>
         <template v-for="item in columns" :key="item">
-          <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true">
+          <el-table-column v-bind="item" :fixed="item.fixed" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true">
             <template #default="scope">
               <template v-if="item.prop === 'data_time_i'">
                 {{formatDate(scope.row.data_time_i)}}
@@ -505,9 +505,9 @@ const changeSelected = (index) =>{
 
 const updateColumns = () => {
   const column = [
-    { prop: "as_name", label: "站名", width: 100 },
-    { prop: "as_code", label: "站号", width: 100 },
-    { prop: "data_time_i", label: "观测时间", width: 120, sortable: true }
+    { prop: "as_name", label: "站名", width: 100,fixed:true },
+    { prop: "as_code", label: "站号", width: 100,fixed:true },
+    { prop: "data_time_i", label: "观测时间", width: 145,fixed:true,sortable: true, }
   ];
 
   const newColumns = customizeColumns.value.map(item => ({
@@ -652,8 +652,13 @@ const renderHeader = ({ column }: { column: any }) => {
   const span = document.createElement('span');
   span.innerText = column.label;
   document.body.appendChild(span);
-  column.minWidth = span.getBoundingClientRect().width + 35;
+  column.minWidth = span.getBoundingClientRect().width+35;
   document.body.removeChild(span);
 };
 
 </script>
+<style scoped lang="scss">
+::v-deep .el-table-fixed-column--left {
+  border-right: 1px solid #80bdff !important;
+}
+</style>

+ 9 - 4
src/views/alarm/allWeather/index.vue

@@ -17,13 +17,13 @@
       </div>
       <!-- 表格主体 -->
       <el-table stripe ref="tableRef" :border="true" :data="processTableData"  size="small" @sort-change="handleSortChange">
-        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" >
+        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" fixed>
           <template #default="scope">
             {{ (pageable.pageNum - 1) * pageable.pageSize + scope.$index + 1 }}
           </template>
         </el-table-column>
         <template v-for="item in columns" :key="item">
-          <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true" >
+          <el-table-column v-bind="item" :fixed="item.fixed" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true" >
             <template #default="scope">
               <template v-if="item.prop === 'tact_state'">
                 {{findLabelByValue(tactStateList,scope.row.tact_state)}}
@@ -210,8 +210,8 @@ const processTableData = ref([]);
 
 // 表格配置项
 const columns = reactive<ColumnProps[]>([
-  { prop: "as_code", label: "站号" },
-  { prop: "as_name", label: "站名" },
+  { prop: "as_code", label: "站号",fixed:true },
+  { prop: "as_name", label: "站名",fixed:true },
   { prop: "tact_name", label: "策略名称" },
   { prop: "tact_state", label: "策略状态" },
   { prop: "tact_type", label: "告警类型" },
@@ -269,3 +269,8 @@ function formatDate(timestamp) {
 
 
 </script>
+<style scoped lang="scss">
+::v-deep .el-table-fixed-column--left {
+  border-right: 1px solid #80bdff !important;
+}
+</style>

+ 253 - 131
src/views/alarm/gis/index.vue

@@ -25,7 +25,7 @@
         <!-- 设备正常 -->
         <el-form-item>
           <el-dropdown placement="bottom" max-height="200">
-            <div class="lv-state" style="height: 40px;line-height: 40px;cursor: pointer;">台站正常{{ normalPlatforms ?
+            <div class="lv-state" style="height: 40px;line-height: 40px;cursor: pointer;">设备正常{{ normalPlatforms ?
               normalPlatforms.length : 0 }}</div>
 
             <template #dropdown>
@@ -41,7 +41,7 @@
         <!-- 设备故障 -->
         <el-form-item>
           <el-dropdown placement="bottom" max-height="200">
-            <div class="hong-state" style="height: 40px;line-height: 40px;cursor: pointer;">台站故障{{ errorPlatforms ?
+            <div class="hong-state" style="height: 40px;line-height: 40px;cursor: pointer;">设备故障{{ errorPlatforms ?
               errorPlatforms.length : 0}}</div>
 
             <template #dropdown>
@@ -58,9 +58,7 @@
         <!-- 危险天气 -->
         <el-form-item>
           <el-dropdown placement="bottom" max-height="200">
-            <div class="cheng-state" style="height: 40px;line-height: 40px;cursor: pointer;">危险天气{{
-              dangetWeatherNum.length }}
-            </div>
+            <div class="cheng-state" style="height: 40px;line-height: 40px;cursor: pointer;">危险天气{{ dangetWeatherNum.length }} </div>
             <template #dropdown>
               <el-dropdown-menu>
                 <!-- <el-dropdown-item v-for="item in dangetWeatherNum" :key="item">{{ item }}</el-dropdown-item> -->
@@ -73,7 +71,7 @@
           </el-dropdown>
         </el-form-item>
 
-        <!-- 基本信息 -->
+        <!-- 基本功能 -->
         <el-form-item>
           <el-popover v-model="visible" @show="handleShowChange" @hide="handleHideChange" placement="bottom"
             :width="200" trigger="click">
@@ -90,17 +88,87 @@
               <el-form-item>
                 <el-switch size="large" v-model="isstationCode" inline-prompt active-text="打开站号" inactive-text="关闭站号" />
               </el-form-item>
-              <!-- 街道地图 -->
-              <el-form-item>
-                <el-switch size="large" v-model="isstreet" inline-prompt active-text="街道地图" inactive-text="卫星地图"
-                  @change="toggleMapLayer" />
+
+              <!-- 街道地图 
+              <el-form-item>            
+                 <el-switch                  
+                 size="large" 
+                 v-model="isstreet"                 
+                 inline-prompt 
+                 active-text="街道地图" 
+                 inactive-text="卫星地图"
+                 @change="toggleMapLayer"
+                 />
+              </el-form-item>-->
+
+              <!--无卫星图层  -->
+                <el-form-item>            
+                 <el-switch                  
+                 size="large" 
+                 v-model="isstreet"                 
+                 inline-prompt 
+                 active-text="街道地图" 
+                 inactive-text="关闭"
+                 
+                 />
               </el-form-item>
+
+            
             </el-checkbox-group>
             <template #reference>
               <div :class="visible ? 'hei-state-primary' : 'hei-state'">基本功能</div>
             </template>
           </el-popover>
         </el-form-item>
+
+
+
+        <!-- 综合填图 -->
+        <!-- <el-form-item>
+          <el-popover v-model="visible_zonghe" @show="handleShowChange_jiben" @hide="handleHideChange_jiben" placement="bottom"
+            :width="200" trigger="click">
+            
+            <template #reference>
+              <div :class="visible_zonghe ? 'hei-state-primary' : 'hei-state'">综合填图</div>
+            </template>
+
+            -- 表格内容 -
+              <el-table :data="tableData" style="width: 100%" stripe>
+                <el-table-column label="序号" prop="index" width="80"></el-table-column>
+                <el-table-column label="数据项" prop="dataItem"></el-table-column>
+                <el-table-column label="数值" prop="value"></el-table-column>
+                <el-table-column label="单位" prop="unit"></el-table-column>
+              </el-table>
+
+          </el-popover>
+        </el-form-item> -->
+
+        <!-- <el-form-item>
+            <el-popover v-model="visible_zonghe" @show="handleShowChange_jiben" @hide="handleHideChange_jiben" placement="bottom" :width="400" trigger="click">
+              <template #reference>
+                <div :class="visible_zonghe ? 'hei-state-primary' : 'hei-state'">综合填图</div>
+              </template>      
+                  
+                 
+                      <div class="container-tag" style="overflow-y:auto; height:300px;">
+                        <template v-for="item in filteredElementList" :key="item.id">
+                          <div :class="item.isSelected ? 'item-tag-active' : 'item-tag'" @click="toggleSelection(item)">
+                            {{ item.data_name }}
+                          </div>
+                        </template>
+                      </div>
+                                 
+
+
+
+              
+            </el-popover>
+        </el-form-item>  -->
+
+
+
+
+
       </el-form>
 
       <!-- 右侧功能栏 -->
@@ -352,11 +420,72 @@ import { ResPage } from '@/api/interface';
 import { State } from "driver.js";
 import { Tile as TileLayerOl } from 'ol/layer';
 import { Options } from 'ol/source/XYZ'; // 引入 XYZOptions 类型
-
 import { toLonLat } from 'ol/proj.js';
 import { toStringHDMS } from 'ol/coordinate.js';
 
 
+
+
+
+
+
+// 存放所有要素的数据
+const allElementList = ref([
+  { id: 1, data_name: '气温', data_type: '温湿度', isSelected: false },
+  { id: 2, data_name: '相对湿度', data_type: '温湿度', isSelected: false },
+  { id: 3, data_name: '本站气压', data_type: '气压', isSelected: false },
+  { id: 4, data_name: '分钟风速', data_type: '风速', isSelected: false },
+  { id: 5, data_name: '2分钟风向', data_type: '风向', isSelected: false },
+  { id: 6, data_name: '云底高度', data_type: '气象', isSelected: false },
+  { id: 7, data_name: '分钟降水量(翻斗)', data_type: '降水', isSelected: false },
+  { id: 8, data_name: '1分钟平均能见度', data_type: '能见度', isSelected: false },
+  { id: 9, data_name: '视程障碍现象', data_type: '障碍', isSelected: false },
+  { id: 10, data_name: '风速', data_type: '风速', isSelected: false },
+  { id: 11, data_name: '降水量', data_type: '降水', isSelected: false },
+]);
+
+// 根据要求筛选显示的要素
+const filteredElementList = computed(() => {
+  return allElementList.value.filter(item =>
+    [
+      '气温',
+      '相对湿度',
+      '本站气压',
+      '分钟风速',
+      '2分钟风向',
+      '云底高度',
+      '分钟降水量(翻斗)',
+      '1分钟平均能见度',
+      '视程障碍现象',
+    ].includes(item.data_name)
+  );
+});
+
+// 模拟表格数据
+// const tableData = ref([
+//   { index: 1, dataItem: '温度', value: '30°C', unit: '°C' },
+//   { index: 2, dataItem: '湿度', value: '60%', unit: '%' },
+//   { index: 3, dataItem: '风速', value: '5 m/s', unit: 'm/s' },
+//   { index: 4, dataItem: '降水量', value: '0 mm', unit: 'mm' },
+// ]);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 const createPageable = () => {
   return {
     data_type: false, // 查询模式,默认非实时
@@ -534,28 +663,21 @@ const stationLayer = new VectorLayer({
 const value1 = ref<Date | null>(null); // 日期变量,设置为当前日期
 const value2 = ref(0);
 const maxValue = ref(0); // 滑块最大值默认为当前时间
-const visible = ref(false);
-const visible2 = ref(false);
+const visible = ref(false); // 基本功能
+const visible2 = ref(false); // 右侧功能
+const visible_zonghe = ref(false); // 右侧功能
 const checkList = ref(['Value selected and disabled', 'Value A']);
 const isPlay = ref(false);
 const isEagleEyeOn = ref(true); // 鹰眼开关状态 
 const isstationName = ref(false); // 站名开关状态 默认关闭  
 const isstationCode = ref(false); // 站号开关状态 默认打开  
-const isstreet = ref(true); // 街道地图开关状态  
+
 const isNineGrid = ref(false)
 
 const content = ref('');
 const popoverOverlay = ref<Overlay | null>(null);
 // let overlay: Overlay;
 
-// const overlay = new Overlay({
-//   element: document.getElementById('popover') as HTMLElement,
-//   positioning: 'bottom-center',
-//   offset: [0, -10],
-// });
-
-
-
 /** 底部时间轴 */
 const timeInterval = ref(2); // 默认时间间隔为2分钟
 const getCurrentTimestamp = (): number => {// 返回当前时间戳
@@ -932,12 +1054,12 @@ const handleForward = () => {
 const handleHideChange = () => { visible.value = false; };
 const handleShowChange = () => { visible.value = true; };
 const handleShowChange2 = () => { visible2.value = true; };
-const handleHideChange2 = () => { visible2.value = false; };
+const handleHideChange2 = () => { visible2.value = false; };  visible_zonghe.value
+const handleHideChange_jiben = () => { visible_zonghe.value = false; };
+const handleShowChange_jiben = () => { visible_zonghe.value = true; };
 
 
-
-
-// 图层配置数组
+// // 图层配置数组
 const layersConfig = [
   { layerName: 'basemap:boundary', minZoom: 0, maxZoom: 6, opacity: 1 },
   { layerName: 'basemap:province', minZoom: 1, maxZoom: 6 },
@@ -949,88 +1071,93 @@ const layersConfig = [
   { layerName: 'basemap:provinceName', minZoom: 1, maxZoom: 6 }
 ];
 
-// 添加街道图层的函数
-const createWMSLayer = ({ layerName, minZoom, maxZoom, opacity = 1 }) => {
-  return new TileLayer({
+// 创建 WMS 图层
+const createWMSLayer = ({ layerName, minZoom, maxZoom, opacity = 1 }) => 
+  new TileLayer({
     source: new TileWMS({
+      // url: `${import.meta.env.VITE_API_GIS_URL}/geoserver/wms`,
       url: import.meta.env.VITE_API_GIS_URL as string + '/geoserver/wms',
-      params: { 'LAYERS': layerName, 'TILED': true, 'FORMAT': 'image/png', 'TRANSPARENT': true, 'ENCODING': 'UTF-8' },
+      params: {
+        'LAYERS': layerName,
+        'TILED': true,
+        'FORMAT': 'image/png',
+        'TRANSPARENT': true,
+        'ENCODING': 'UTF-8'
+      },
       serverType: 'geoserver'
     }),
     opacity,
     minZoom,
     maxZoom
   });
-};
-
-
 
+// 创建卫星图层
+const createSatelliteLayer = () =>
+  new TileLayer({
+    source: new XYZ({
+      // url: import.meta.env.VITE_API_GIS_URL as string + '/geoserver/wms',
+      // url: 'http://192.168.196.204/v1.0/gr?x={x}&y={y}&z={z}&#39;',  //卫星地图
+      url: 'http://t1.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=49ea1deec0ffd88ef13a3f69987e9a63',
+      wrapX: false
+    })
+  });
 
-// let streetLayer: TileLayer<TileWMS>; // 街道图层
-// let satelliteLayer: TileLayer<XYZ>; // 卫星图层
-
-
-// // 创建街道图层
-// streetLayer = createWMSLayer({
-//   layerName: 'street_layer', // 街道地图的 WMS 图层名
-//   minZoom: 0,
-//   maxZoom: 18,
-//   opacity: 1
-// });
-
-// // 创建卫星图层
-// const createSatelliteLayer = () => {
-//   return new TileLayer({
-//     source: new XYZ({
-//       url: 'http://t1.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=49ea1deec0ffd88ef13a3f69987e9a63',
-//       wrapX: false
-//     }),
-//     visible: false // 默认卫星图层是隐藏的
-//   });
-// };
-// satelliteLayer = createSatelliteLayer();
+// 全局变量
+const isstreet = ref(true); // 街道地图开关状态
+let streetLayer : null; // 街道图层
+let satelliteLayer = createSatelliteLayer(); // 初始化卫星图层
+let map : any; // 地图实例
+let overlay: Overlay; // 定义为全局变量
+let overviewMapControl: OverviewMap;
 
-// // 切换地图图层的显示与隐藏
-// const toggleMapLayer = () => {
-//   if (map) {
-//     streetLayer.setVisible(isstreet.value);  // 根据 isstreet 状态控制街道图层的显示
-//     satelliteLayer.setVisible(!isstreet.value);  // 根据 isstreet 状态控制卫星图层的显示
-//   }
-// };
 
 
-// return {
-//   isstreet,    // 控制街道图层显示的状态
-//   toggleMapLayer  // 切换图层显示的函数
-// };
+// 切换图层的显示与隐藏
+const toggleMapLayer = () => {
+  if (map) {
+    // isstreet.value = !isstreet.value;
+    streetLayer.setVisible(isstreet.value);     // 切换街道图层可见性
+    satelliteLayer.setVisible(!isstreet.value); // 切换卫星图层可见性
 
+    map.layers = isstreet ? ['street'] : ['satellite'];
 
+    // 确保 stationLayer 始终在最上层
+    map.getLayers().remove(stationLayer);
+      map.addLayer(stationLayer);
+  }
+};
 
 
 
 
-let map: any; // 定义为全局变量
-let overlay: Overlay; // 定义为全局变量
-let overviewMapControl: OverviewMap;
-// 地图初始化
+// 初始化地图
 const initializeMap = () => {
   let view = new View({
     center: fromLonLat([104.1954, 35.8617]),
-    zoom: 4,
-      
-  })
+    zoom: 4
+  });
+
+  streetLayer = createWMSLayer(layersConfig[0]); // 街道图层
+
   map = new Map({
     target: 'map',
     layers: [
-      ...layersConfig.map(createWMSLayer),
-      stationLayer,  // 初始化时添加 stationLayer      
+      ...layersConfig.map(createWMSLayer), // 添加所有配置图层
+      satelliteLayer, // 添加卫星图层
+      stationLayer,  // 初始化时添加 stationLayer     
     ],
-    view: view,
-    // overlays: [overlay], // 将 Overlay 添加到地图中
+    view:view
   });
 
-  // 定义鹰眼视图层
-  const overviewMapLayer = new TileLayer({
+
+
+
+   // 设置卫星图层默认关闭
+   satelliteLayer.setVisible(false); // 卫星图层默认隐藏
+   streetLayer.setVisible(true); // 街道图层默认显示
+
+   // 定义鹰眼视图层
+   const overviewMapLayer = new TileLayer({
     source: new TileWMS({
       url: import.meta.env.VITE_API_GIS_URL as string + '/geoserver/wms',
       params: {
@@ -1058,28 +1185,22 @@ const initializeMap = () => {
   });
 
 
-  
-  
-  
-
 
-
-// 初始化 Overlay 弹出框
-const popupContainer = document.getElementById('popup')!;
+  // 初始化 Overlay 弹出框
+  const popupContainer = document.getElementById('popup');
   overlay = new Overlay({
     element: popupContainer,
     positioning: 'center-center',
-    stopEvent: false, // 允许事件继续传递到地图bottom-center
+    stopEvent: false
   });
   map.addOverlay(overlay);
 
   // 添加点击事件监听
   map.on('singleclick', (event) => {
-    const features = map.getFeaturesAtPixel(event.pixel); // 获取点击处的要素
+    const features = map!.getFeaturesAtPixel(event.pixel); // 获取点击处的要素
     if (features.length > 0) {
       const feature = features[0];
       console.log("feature11111111111",feature);
-
       
       const coordinates = feature.getGeometry().getCoordinates(); // 获取要素坐标
       // const content = feature.get('name'); // 获取自定义属性,如名称
@@ -1088,8 +1209,7 @@ const popupContainer = document.getElementById('popup')!;
     const stationName = feature.get('name') || '未知站名'; // 获取站名
     console.log("stationName",feature);
     
-    const stationCode = feature.get('code') || '未知站名'; // 获取站名
-         
+    const stationCode = feature.get('code') || '未知站名'; // 获取站名    
     
     const matchedData = platformList.value.find(item => item.as_code === stationCode);
     if (matchedData) {
@@ -1103,36 +1223,33 @@ const popupContainer = document.getElementById('popup')!;
     // // 获取返回的经纬度
     const latitude = matchedData.as_lat || '未知纬度';
     const longitude = matchedData.as_lon || '未知经度';
-
     
     console.log("stationCode",stationCode);    
     let autoStationStatus = searchData(feature.get('code')) ; // 根据code 获取 as_link 状态  
     let statusColor = 'black'; // 默认颜色为黑色
 
-
-
     
-    // 根据状态值设置状态文本和颜色
-if (autoStationStatus == 0) {
-  autoStationStatus = '未知';
-  statusColor = 'gray';
-} else if (autoStationStatus == 1) {
-  autoStationStatus = '在线';
-  statusColor = 'green';
-} else if (autoStationStatus == 2) {
-  autoStationStatus = '未连接';
-  statusColor = 'red';
-}
+      // 根据状态值设置状态文本和颜色
+    if (autoStationStatus == 0) {
+      autoStationStatus = '未知';
+      statusColor = 'gray';
+    } else if (autoStationStatus == 1) {
+      autoStationStatus = '在线';
+      statusColor = 'green';
+    } else if (autoStationStatus == 2) {
+      autoStationStatus = '未连接';
+      statusColor = 'red';
+    }
 
     
     // 拼接内容展示
     const content = 
     `
       <div style="text-align: left; font-size: 12px;">
-        状态<span style="color: ${statusColor};">${autoStationStatus}</span><br>        
-        站号${stationCode}<br>
-        站名${stationName}<br>
-        经纬度${longitude},${latitude}<br>
+        状态:<span style="color: ${statusColor};">${autoStationStatus}</span><br>        
+        站号:${stationCode}<br>
+        站名:${stationName}<br>
+        经纬度:${longitude},${latitude}<br>
         
       </div>
     `;
@@ -1147,7 +1264,6 @@ if (autoStationStatus == 0) {
     }
   });
 
-
 };
 
 // 监听 isEagleEyeOn 变化,触发折叠状态
@@ -1171,7 +1287,6 @@ const initializeOverviewMap = () => {
   })
 };
 
-
 // 查询所有人工要素字典表
 const elementList = ref<any>([])
 
@@ -1187,26 +1302,23 @@ const getAllRgDataList = async () => {
 
 };
 
-// 存放选中要素列表
-const copiedCustomizeColumns = ref<any>([]);
-// 要素的选中和取消  
-const toggleSelection = (item) => {
-  item.isSelected = !item.isSelected;
-
-  if (item.isSelected) {
-    // 添加选中的要素
-    copiedCustomizeColumns.value.push(item);
-  } else {
-    // 取消选中的要素
-    copiedCustomizeColumns.value = copiedCustomizeColumns.value.filter(column => column.data_id !== item.data_id);
-  }
-  //根据要素查询数据
-  pageable.value.data_items = copiedCustomizeColumns.value
-  getList()
-};
-
-
+  // 存放选中要素列表
+  const copiedCustomizeColumns = ref<any>([]);
+  // 要素的选中和取消  
+  const toggleSelection = (item) => {
+    item.isSelected = !item.isSelected;
 
+    if (item.isSelected) {
+      // 添加选中的要素
+      copiedCustomizeColumns.value.push(item);
+    } else {
+      // 取消选中的要素
+      copiedCustomizeColumns.value = copiedCustomizeColumns.value.filter(column => column.data_id !== item.data_id);
+    }
+    //根据要素查询数据
+    pageable.value.data_items = copiedCustomizeColumns.value
+    getList()
+  };
 
 
 // 在组件挂载时初始化地图 
@@ -1223,15 +1335,25 @@ onMounted(() => {
   getAllRgDataList(); // 存放人工选择的要素列表  
   initializeMap();
   getPlatforms();    
+  
 });
 
 
+// 暴露功能方法
+defineExpose({
+  toggleMapLayer
+});
+
 
 
 
 
+    
 
+   
+ 
 
+ 
 
 
 

+ 39 - 32
src/views/analysis/featureCurves/index.vue

@@ -264,6 +264,7 @@ const drop = (event, index) => {
 const handleDateRangeChange = (newVal) => {
   const [startDate, endDate] = newVal;
   if (endDate && isToday(endDate)) {
+
     // 获取当前时间的整点
     const currentHour = new Date().getHours();
     const roundedEndDate = new Date(endDate);
@@ -283,20 +284,20 @@ const handleDateChange = async (e) => {
     ElMessage.error("不得选择未来的时间");
   } else {
     if (!value1.value) {
-      // if (isWithinThirtyMinutes(e[0], e[1])) {
-      // 获取参数
-      getHistoryList()
+      if (isWithinThirtyMinutes(e[0], e[1])) {
+        // 获取参数
+        getHistoryList()
 
-      // } else {
-      // 	ElMessage.error("分钟模式下时间间隔不能大于3小时");
-      // }
+      } else {
+        ElMessage.error("分钟模式下时间间隔不能大于3小时");
+      }
     } else {
-      // if (isDateRangeWithinDays(e[0], e[1], 7)) {
-      await handleDateRangeChange(e)
-      getHistoryList()
-      // } else {
-      // 	ElMessage.error("正点模式下时间间隔不能大于7天");
-      // }
+      if (isDateRangeWithinDays(e[0], e[1], 7)) {
+        await handleDateRangeChange(e)
+        getHistoryList()
+      } else {
+        ElMessage.error("正点模式下时间间隔不能大于7天");
+      }
     }
   }
 }
@@ -391,6 +392,7 @@ const changeSelected = (index) => {
 
 // 要素的选中和取消
 const toggleSelection = (item) => {
+
   item.isSelected = !item.isSelected
   if (item.isSelected) {
     //添加
@@ -437,7 +439,6 @@ const toggleSelection = (item) => {
 
     }
   }
-
 }
 const handleSetting = () => {
   copiedCustomizeColumns.value = [...customizeColumns.value, ...historyColumns.value].reduce((acc, item) => {
@@ -460,13 +461,18 @@ const handleSetting = () => {
   dialog.visible = true;
 }
 const submitForm = () => {
+  if (copiedCustomizeColumns.value.length > 7) {
+    ElMessage.error("最多选择7个要素!");
+    return
+
+  }
   dialog.visible = false;
   customizeColumns.value = [...copiedCustomizeColumns.value]
   // updateColumns()
   // getList()
   // weatherInfo()
   getHistoryList()
-  saveCustomizeColumns()
+  // saveCustomizeColumns()
 }
 
 const cancel = () => {
@@ -570,31 +576,31 @@ const historyColumns = ref([
     isSelected: true
   },
   {
-    data_id: 1203,
-    data_r_table: "SHI_SHI_FU_SHE_SHU_JU",
-    data_type: "总辐射",
-    data_name: "总辐射曝辐量",
-    data_item: "ZONG_FU_SHE_BAO_FU_LIANG",
-    data_unit: "MJ/m²",
-    data_h_table: "LI_SHI_FU_SHE_SHU_JU",
+    data_type: "降水",
+    data_h_table: "LI_SHI_LIU_YAO_SU_SHU_JU",
+    data_r_table: "SHI_SHI_LIU_YAO_SU_SHU_JU",
+    data_id: 309,
+    data_name: "日降水量",
+    data_condition: 0,
     data_value: "",
+    data_unit: "mm",
+    data_item: "RI_JIANG_SHUI_LIANG",
     data_order: 0,
-    data_condition: 0,
     isSelected: true
   },
   {
-    data_id: 1202,
-    data_r_table: "SHI_SHI_FU_SHE_SHU_JU",
-    data_type: "总辐射",
-    data_name: "总辐射辐照度",
-    data_item: "ZONG_FU_SHE_FU_ZHAO_DU",
-    data_unit: "W/m²",
-    data_h_table: "LI_SHI_FU_SHE_SHU_JU",
-    data_value: "",
     data_order: 0,
+    data_item: "YI_FEN_ZHONG_PING_JUN_NENG_JIAN_DU",
+    data_unit: "m",
+    data_value: "",
     data_condition: 0,
+    data_name: "1分钟平均能见度",
+    data_id: 501,
+    data_r_table: "SHI_SHI_LIU_YAO_SU_SHU_JU",
+    data_h_table: "LI_SHI_LIU_YAO_SU_SHU_JU",
+    data_type: "能见度",
     isSelected: true
-  },
+}
 ])
 
 
@@ -695,6 +701,7 @@ const Access = () => {
         tooltip: {
           trigger: "axis",
         },
+
         // 数据
         series: [
           {
@@ -961,7 +968,7 @@ function loadCustomizeColumns() {
 
 
 onMounted(() => {
-  loadCustomizeColumns()
+  // loadCustomizeColumns()
 
   getPlatforms()
 

+ 15 - 14
src/views/analysis/rainfall/index.vue

@@ -27,8 +27,9 @@
 						<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD HH:mm"
 							:format="value1 === 1440 ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm'"
 							:type="value1 === 1440 ? 'daterange' : 'datetimerange'" range-separator="-"
-							start-placeholder="开始时间" end-placeholder="结束时间" :disabled-date="disabledDate" :editable="false"
-							@focus="handleFocus" @calendar-change="handleChange" @change="handleDateChange"
+							start-placeholder="开始时间" end-placeholder="结束时间" :disabled-date="disabledDate"
+							:editable="false" @focus="handleFocus" @calendar-change="handleChange"
+							@change="handleDateChange"
 							:default-time="[new Date(2000, 1, 1, 0, 0), new Date(2000, 1, 1, 0, 0)]"
 							style="width: 300px;"></el-date-picker>
 					</div>
@@ -70,7 +71,7 @@ import { Platform } from "@/api/interface";
 import { parseTime } from '@/utils/index';
 import { isToday, isWithinThirtyMinutes, getTimeStamp, getStamp, isWithin48Hours, isDateFuture, isDateRangeWithinDays } from "@/utils/dateTime";
 import { useUserStore } from "@/stores/modules/user";
-const buttonLoading=ref(false)
+const buttonLoading = ref(false)
 const value1 = ref(1440)
 const dateRange = ref<[any, any]>([parseTime(new Date(getTimeStamp(5)), '{y}-{m}-{d}') + ' 00:00', parseTime(new Date(), '{y}-{m}-{d}') + ' 00:00']);
 const changetype = (e) => {
@@ -261,7 +262,7 @@ const minArr = ref()
 const isFANDOU = ref(false)
 
 const getHistoryList = async () => {
-  buttonLoading.value=true
+	buttonLoading.value = true
 	if (isDateFuture(dateRange.value[0]) || isDateFuture(dateRange.value[1])) {
 		ElMessage.error("不得选择未来的时间");
 		return false;
@@ -305,9 +306,8 @@ const getHistoryList = async () => {
 
 	nextTick(() => {
 		showData()
-
 	})
-  buttonLoading.value=false
+	buttonLoading.value = false
 };
 
 
@@ -347,7 +347,7 @@ const showData = () => {
 			formatter: function (params) {
 
 				return [
-					"降水:" + [Number(params[0].value) ? Number(params[0].value) : "/"],
+					"降水:" + params[0].value,
 					'时间:' + params[0].name
 				].join("<br/>");
 			},
@@ -362,16 +362,16 @@ const showData = () => {
 		dataZoom: [
 			{
 				type: 'inside',
-			
-				
+				start: 0,
+				end: 50
 			},
 			{
 				type: 'slider',
-				
-					left: '100',
-					right:'100'
-				
-			
+
+				left: '100',
+				right: '100'
+
+
 			}
 		],
 
@@ -399,6 +399,7 @@ const showData = () => {
 				name: '降水量',
 				type: 'bar',
 				barWidth: '50%',
+				barMaxWidth: '100',
 				color: '#88c1ff',
 				data: value1.value === 1440 ? dayArr.value : value1.value === 60 ? hourArr1.value : minArr.value
 			}

+ 10 - 7
src/views/query/deviceHealth/index.vue

@@ -101,14 +101,14 @@
         </div>
       </div>
       <!-- 表格主体 -->
-      <el-table stripe ref="tableRef" :border="true" :data="processTableData"  size="small" @sort-change="handleSortChange">
-        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" >
+      <el-table stripe ref="tableRef"  :border="true" :data="processTableData"  size="small" @sort-change="handleSortChange">
+        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" fixed>
           <template #default="scope">
             {{ (pageable.pageNum - 1) * pageable.pageSize + scope.$index + 1 }}
           </template>
         </el-table-column>
         <template v-for="item in columns" :key="item">
-          <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true" >
+          <el-table-column v-bind="item" :fixed="item.fixed" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true" >
             <template #default="scope">
               <template v-if="item.prop === 'data_time_i'">
                 {{formatDate(scope.row.data_time_i)}}
@@ -674,9 +674,9 @@ const submitForm = () => {
 
 const updateColumns = () => {
   const column = [
-    { prop: "as_name", label: "站名", width: 100 },
-    { prop: "as_code", label: "站号", width: 100 },
-    { prop: "data_time_i", label: "观测时间", width: 120 }
+    { prop: "as_name", label: "站名", width: 100,fixed:true },
+    { prop: "as_code", label: "站号", width: 100,fixed:true },
+    { prop: "data_time_i", label: "观测时间", width: 140,fixed:true }
   ];
   const newColumns = customizeColumns.value.map(item => ({
     prop: item.se_type===0?'yclq_state':item.se_type,
@@ -887,8 +887,11 @@ function findLabelByValue(noticeTypeList, value) {
 }
 </script>
 
-<style>
+<style scoped lang="scss">
 .tpc .el-time-spinner__wrapper {
   width:100% !important;
 }
+::v-deep .el-table-fixed-column--left {
+  border-right: 1px solid #80bdff !important;
+}
 </style>

+ 9 - 4
src/views/query/hazardousWeather/index.vue

@@ -37,13 +37,13 @@
       </div>
       <!-- 表格主体 -->
       <el-table stripe ref="tableRef" :border="true" :data="processTableData"  size="small" @sort-change="handleSortChange">
-        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" >
+        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" fixed >
           <template #default="scope">
             {{ (pageable.pageNum - 1) * pageable.pageSize + scope.$index + 1 }}
           </template>
         </el-table-column>
         <template v-for="item in columns" :key="item">
-          <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true" >
+          <el-table-column v-bind="item" :fixed="item.fixed" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true" >
             <template #default="scope">
               <template v-if="item.prop === 'tact_state'">
                 {{findLabelByValue(tactStateList,scope.row.tact_state)}}
@@ -240,8 +240,8 @@ const processTableData = ref([]);
 
 // 表格配置项
 const columns = reactive<ColumnProps[]>([
-  { prop: "as_code", label: "站号" },
-  { prop: "as_name", label: "站名" },
+  { prop: "as_code", label: "站号",fixed:true },
+  { prop: "as_name", label: "站名",fixed:true },
   { prop: "tact_name", label: "策略名称" },
   { prop: "tact_state", label: "策略状态" },
   { prop: "tact_type", label: "告警类型" },
@@ -287,3 +287,8 @@ function formatDate(timestamp) {
 
 
 </script>
+<style scoped lang="scss">
+::v-deep .el-table-fixed-column--left {
+  border-right: 1px solid #80bdff !important;
+}
+</style>

+ 169 - 192
src/views/query/queryObservationData/index.vue

@@ -6,80 +6,40 @@
         <div class="header-button-lf">
           <el-form :model="pageable" label-width="auto" :inline="true">
             <el-form-item label="自动站:">
-              <el-checkbox v-model="isStand" @change="changeStand" label="多站"/>
-              <SelectItem v-show="isStand"   :select-data="selectedData" :select-list="platformList" :is-checkbox="false" @update:selectedItems="selectedItems" style="width: 200px;margin:0 10px"> </SelectItem>
+              <el-checkbox v-model="isStand" @change="changeStand" label="多站" />
+              <SelectItem v-show="isStand" :select-data="selectedData" :select-list="platformList" :is-checkbox="false"
+                @update:selectedItems="selectedItems" style="width: 200px;margin:0 10px"> </SelectItem>
               <el-form-item label="观测时间:" v-if="isStand">
-                <el-switch
-                  v-model="hot"
-                  inline-prompt
-                  active-text="正点"
-                  size="default"
-                  inactive-text="分钟"
-                  @change="changeHot"
-                />
-                <el-date-picker
-                  v-if="hot"
-                  v-model="multiTime"
-                  style="margin-left: 10px"
-                  type="datetime"
-                  popper-class="tpc"
-                  format="YYYY-MM-DD HH"
-                  placeholder="选择日期时间"
-                  @change="changeMultiTime"
-                >
+                <el-switch v-model="hot" inline-prompt active-text="正点" size="default" inactive-text="分钟"
+                  @change="changeHot" />
+                <el-date-picker v-if="hot" v-model="multiTime" style="margin-left: 10px" type="datetime"
+                  popper-class="tpc" format="YYYY-MM-DD HH" placeholder="选择日期时间" @change="changeMultiTime">
                 </el-date-picker>
 
-                <el-date-picker
-                  v-if="!hot"
-                  v-model="multiTime"
-                  style="margin-left: 10px"
-                  type="datetime"
-                  @change="changeMultiTime"
-                  format="YYYY-MM-DD HH:mm"
-                  placeholder="选择日期时间">
+                <el-date-picker v-if="!hot" v-model="multiTime" style="margin-left: 10px" type="datetime"
+                  @change="changeMultiTime" format="YYYY-MM-DD HH:mm" placeholder="选择日期时间">
                 </el-date-picker>
               </el-form-item>
 
               <!--单站选择-->
 
-              <SelectItem v-show="!isStand"  :select-data="selectedData" :select-list="platformList" :is-checkbox="true" @update:selectedItems="selectedItems2" style="width: 200px;margin:0 10px"> </SelectItem>
+              <SelectItem v-show="!isStand" :select-data="selectedData" :select-list="platformList" :is-checkbox="true"
+                @update:selectedItems="selectedItems2" style="width: 200px;margin:0 10px"> </SelectItem>
               <el-form-item label="观测时间:" v-if="!isStand">
-                <el-switch
-                  v-model="hot"
-                  inline-prompt
-                  active-text="正点"
-                  size="default"
-                  inactive-text="分钟"
-                  @change="changeHot"
-                />
+                <el-switch v-model="hot" inline-prompt active-text="正点" size="default" inactive-text="分钟"
+                  @change="changeHot" />
 
                 <span class="form-item__label">日界:</span>
-                <el-switch
-                  v-model="points"
-                  inline-prompt
-                  active-text="0点"
-                  size="default"
-                  inactive-text="18点"
-                  @change="changePoints"
-                />
-
-                <el-date-picker
-                  style="margin-left: 10px"
-                  v-model="singleTime"
-                  type="date"
-                  placeholder="请选择"
-                  @change="changeTime"
-                />
+                <el-switch v-model="points" inline-prompt active-text="0点" size="default" inactive-text="18点"
+                  @change="changePoints" />
+
+                <el-date-picker style="margin-left: 10px" v-model="singleTime" type="date" placeholder="请选择"
+                  @change="changeTime" />
               </el-form-item>
 
               <el-form-item v-if="!hot" label="数据密度:">
-                <el-select v-model="pageable.time_space" style="width: 240px"  filterable placeholder="请选择" clearable>
-                  <el-option
-                    v-for="item in timeSpaceList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="pageable.time_space" style="width: 240px" filterable placeholder="请选择" clearable>
+                  <el-option v-for="item in timeSpaceList" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
 
@@ -97,17 +57,19 @@
         </div>
       </div>
       <!-- 表格主体 -->
-      <el-table stripe ref="tableRef" :border="true" :data="processTableData"  size="small" @sort-change="handleSortChange">
-        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true">
+      <el-table stripe ref="tableRef" :border="true" :data="processTableData" size="small"
+        @sort-change="handleSortChange">
+        <el-table-column align="left" label="序号" width="45px" :show-overflow-tooltip="true" fixed >
           <template #default="scope">
             {{ (pageable.pageNum - 1) * pageable.pageSize + scope.$index + 1 }}
           </template>
         </el-table-column>
         <template v-for="item in columns" :key="item">
-          <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :sortable="item.sortable" :show-overflow-tooltip="true">
+          <el-table-column :fixed="item.fixed" v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'"
+            :sortable="item.sortable" :show-overflow-tooltip="true">
             <template #default="scope">
               <template v-if="item.prop === 'data_time_i'">
-                {{formatDate(scope.row.data_time_i)}}
+                {{ formatDate(scope.row.data_time_i) }}
               </template>
             </template>
           </el-table-column>
@@ -123,7 +85,8 @@
         </template>
       </el-table>
       <!-- 分页组件 -->
-      <Pagination :pageable="pageable" :handle-size-change="handleSizeChange" :handle-current-change="handleCurrentChange" />
+      <Pagination :pageable="pageable" :handle-size-change="handleSizeChange"
+        :handle-current-change="handleCurrentChange" />
     </div>
 
     <!-- 添加或修改岗位对话框 -->
@@ -132,106 +95,121 @@
         <el-tabs tab-position="left" class="demo-tabs" style="height: 100%;flex-grow: 1">
           <el-tab-pane label="风">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='风'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '风'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="温湿度">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='温湿度'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '温湿度'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="气压">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='气压'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '气压'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="降水">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='降水'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '降水'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="云">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='云'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '云'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="能见度">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='能见度'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '能见度'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="天气现象">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='天气现象'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '天气现象'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="积雪">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='积雪'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '积雪'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="地面温度">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='地面温度'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '地面温度'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="大气电场">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='大气电场'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '大气电场'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="闪电">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='闪电'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '闪电'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="日照">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='日照'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '日照'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="总辐射">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='总辐射'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '总辐射'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="光照度">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='光照度'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '光照度'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
           <el-tab-pane label="水文">
             <div class="container-tag">
-              <template v-for="item in elementList" :key="item.id"  >
-                <div v-if="item.data_type==='水文'"  :class="item.isSelected?'item-tag-active':'item-tag'" @click="toggleSelection(item)" >{{item.data_name}}</div>
+              <template v-for="item in elementList" :key="item.id">
+                <div v-if="item.data_type === '水文'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
+                  @click="toggleSelection(item)">{{ item.data_name }}</div>
               </template>
             </div>
           </el-tab-pane>
@@ -239,13 +217,10 @@
         <div class="selected-list-box">
           <div class="disposition-title" style="margin-top: 0px">已选要素</div>
           <div class="selected-list-c">
-            <template v-for="(item,index) in copiedCustomizeColumns" :key="item.id">
-              <div  :class="selectedItemIndex===index?'selected-item-tag-active':'selected-item-tag'" @click="changeSelected(index)"
-                    draggable="true"
-                    @dragstart="dragStart($event, index)"
-                    @dragover.prevent
-                    @drop="drop($event, index)"
-              >{{item.data_name}}</div>
+            <template v-for="(item, index) in copiedCustomizeColumns" :key="item.id">
+              <div :class="selectedItemIndex === index ? 'selected-item-tag-active' : 'selected-item-tag'"
+                @click="changeSelected(index)" draggable="true" @dragstart="dragStart($event, index)" @dragover.prevent
+                @drop="drop($event, index)">{{ item.data_name }}</div>
             </template>
           </div>
           <div class="button-container">
@@ -269,29 +244,29 @@
 <script setup lang="ts" name="useProTable">
 import SelectItem from "@/components/SelectItem/index.vue";
 import Pagination from "@/components/ProTable/components/Pagination.vue";
-import {ref, reactive, onMounted, onDeactivated, onActivated, computed} from "vue";
+import { ref, reactive, onMounted, onDeactivated, onActivated, computed } from "vue";
 import { ColumnProps } from "@/components/ProTable/interface";
-import {ElNotification, ElTable} from "element-plus";
-import {getDataItemList, getPlatformList, getRgDataList} from "@/api/modules/allData";
-import { Platform} from "@/api/interface";
-import {useUserStore} from "@/stores/modules/user";
+import { ElNotification, ElTable } from "element-plus";
+import { getDataItemList, getPlatformList, getRgDataList } from "@/api/modules/allData";
+import { Platform } from "@/api/interface";
+import { useUserStore } from "@/stores/modules/user";
 const userStore = useUserStore();
-const userForm  = computed(() => userStore.userInfo);
+const userForm = computed(() => userStore.userInfo);
 const tableRef = ref<InstanceType<typeof ElTable>>();
 const dialog = reactive<any>({
   visible: false,
   title: ''
 });
 
-const changeStand=()=>{
+const changeStand = () => {
   pageable.value = {
     data_type: false,
     time_order: 0,
-    time_space:60,
-    begin_time:undefined,
+    time_space: 60,
+    begin_time: undefined,
     end_time: undefined,
-    as_code_list:[],
-    data_items:[],
+    as_code_list: [],
+    data_items: [],
     pageNum: 1,
     pageSize: 20,
     total: 0
@@ -349,7 +324,7 @@ const handleSortChange = ({ column, prop, order }) => {
 };
 
 
-const timeSpaceList= [
+const timeSpaceList = [
   {
     value: 1,
     label: '1分钟',
@@ -364,13 +339,13 @@ const timeSpaceList= [
   }
 ]
 
-const sensorList =ref<any>([])
+const sensorList = ref<any>([])
 // 被选中当条数据下标
 const selectedItemIndex = ref(0)
 
 
-const changeMoveUp = () =>{
-//上移
+const changeMoveUp = () => {
+  //上移
   if (selectedItemIndex.value > 0) {
     const temp = copiedCustomizeColumns.value[selectedItemIndex.value - 1]
     copiedCustomizeColumns.value[selectedItemIndex.value - 1] = copiedCustomizeColumns.value[selectedItemIndex.value]
@@ -379,8 +354,8 @@ const changeMoveUp = () =>{
   }
 }
 
-const changeMoveDown = ()=>{
-//下移
+const changeMoveDown = () => {
+  //下移
   if (selectedItemIndex.value < copiedCustomizeColumns.value.length - 1) {
     const temp = copiedCustomizeColumns.value[selectedItemIndex.value + 1]
     copiedCustomizeColumns.value[selectedItemIndex.value + 1] = copiedCustomizeColumns.value[selectedItemIndex.value]
@@ -389,10 +364,10 @@ const changeMoveDown = ()=>{
   }
 }
 
-const changeRemove= ()=>{
+const changeRemove = () => {
   //删除数据
   if (copiedCustomizeColumns.value.length > 0) {
-    const custom=  copiedCustomizeColumns.value[selectedItemIndex.value];
+    const custom = copiedCustomizeColumns.value[selectedItemIndex.value];
     const data_id = custom.data_id
     for (let i = 0; i < elementList.value.length; i++) {
       if (elementList.value[i].data_id === data_id) {
@@ -407,7 +382,7 @@ const changeRemove= ()=>{
   }
 }
 
-const changeCleared=()=>{
+const changeCleared = () => {
   //清空所有数据
   selectedItemIndex.value = 0
   copiedCustomizeColumns.value = []
@@ -416,7 +391,7 @@ const changeCleared=()=>{
   }
 }
 
-const changeSelected = (index) =>{
+const changeSelected = (index) => {
   selectedItemIndex.value = index
 }
 
@@ -424,39 +399,39 @@ const changeSelected = (index) =>{
 const pageable = ref<any>({
   data_type: false,
   time_order: 0,
-  time_space:60,
-  begin_time:undefined,
+  time_space: 60,
+  begin_time: undefined,
   end_time: undefined,
-  as_code_list:[],
-  data_items:[],
+  as_code_list: [],
+  data_items: [],
   pageNum: 1,
   pageSize: 20,
   total: 0
 });
 
-const isStand =ref(true)
+const isStand = ref(true)
 const as_code_list = ref(undefined);
 const hot = ref(true);
-const points =ref(userForm.value.role_id==='预报员' ? false : true);
-const singleTime =ref(undefined)
-const multiTime =ref(undefined)
+const points = ref(userForm.value.role_id === '预报员' ? false : true);
+const singleTime = ref(undefined)
+const multiTime = ref(undefined)
 
 
-const changeHot =(row)=>{
+const changeHot = (row) => {
   console.log(row)
-  if(row){
+  if (row) {
     pageable.value.time_space = 60
-  }else {
+  } else {
     pageable.value.time_space = 1
   }
 }
 
-const changeMultiTime =(time)=>{
-  if(time){
+const changeMultiTime = (time) => {
+  if (time) {
     const timeStamp = new Date(time).getTime();
-    pageable.value.begin_time = timeStamp/1000
-    pageable.value.end_time = timeStamp/1000
-  }else {
+    pageable.value.begin_time = timeStamp / 1000
+    pageable.value.end_time = timeStamp / 1000
+  } else {
     pageable.value.begin_time = undefined
     pageable.value.end_time = undefined
   }
@@ -464,21 +439,21 @@ const changeMultiTime =(time)=>{
 }
 
 
-const changePoints=(row)=>{
-  singleTime.value =undefined
+const changePoints = (row) => {
+  singleTime.value = undefined
   pageable.value.begin_time = undefined
   pageable.value.end_time = undefined
 
 }
-const changeTime =(time)=>{
+const changeTime = (time) => {
   const timeStamp = new Date(time).getTime();
-  if(points.value){
+  if (points.value) {
     //0点
     const startTime = timeStamp + 60 * 1000; // 添加1分钟(60秒)
     const endTime = timeStamp + 24 * 60 * 60 * 1000; // 添加一天(24小时)
-    pageable.value.begin_time = startTime/1000
-    pageable.value.end_time = endTime/1000
-  }else {
+    pageable.value.begin_time = startTime / 1000
+    pageable.value.end_time = endTime / 1000
+  } else {
     //18点
     // 前一天的18:01:00
     const previousDay = new Date(time);
@@ -500,10 +475,10 @@ const changeTime =(time)=>{
 
 }
 
-const changeAslist =(row)=>{
-  if(row){
+const changeAslist = (row) => {
+  if (row) {
     pageable.value.as_code_list = [row]
-  }else {
+  } else {
     pageable.value.as_code_list = []
   }
 
@@ -512,21 +487,21 @@ const changeAslist =(row)=>{
 
 // 查询功能
 const handleQuery = () => {
-  if(isStand.value){
+  if (isStand.value) {
     //多站
     pageable.value.pageNum = 1;
     getList();
-  }else {
+  } else {
     //单站
-   if(!pageable.value.as_code_list){
-     ElNotification({
-       title: "错误",
-       message: "请选择台站",
-       type: "error",
-       duration: 3000
-     });
-     return
-   }
+    if (!pageable.value.as_code_list) {
+      ElNotification({
+        title: "错误",
+        message: "请选择台站",
+        type: "error",
+        duration: 3000
+      });
+      return
+    }
     pageable.value.pageNum = 1;
     getList();
   }
@@ -536,11 +511,11 @@ const handleQuery = () => {
 
 
 //搜索站号
-const selectedData= ref([])
-const selectedItems =(data)=>{
-  if(data.length>0){
+const selectedData = ref([])
+const selectedItems = (data) => {
+  if (data.length > 0) {
     pageable.value.as_code_list = data
-  }else {
+  } else {
     const allCodes = platformList.value.map(item => item.as_code);
     pageable.value.as_code_list = allCodes
   }
@@ -549,10 +524,10 @@ const selectedItems =(data)=>{
 
 
 //搜索站号
-const selectedItems2 =(data)=>{
-  if(data.length>0){
+const selectedItems2 = (data) => {
+  if (data.length > 0) {
     pageable.value.as_code_list = data
-  }else {
+  } else {
     const allCodes = platformList.value.map(item => item.as_code);
     pageable.value.as_code_list = allCodes
   }
@@ -568,16 +543,16 @@ const resetQuery = () => {
   isStand.value = true
   as_code_list.value = undefined;
   hot.value = true;
-  points.value = userForm.value.role_id==='预报员' ? false : true;
-  singleTime.value=undefined;
+  points.value = userForm.value.role_id === '预报员' ? false : true;
+  singleTime.value = undefined;
   multiTime.value = undefined;
   pageable.value.time_order = 0
-  pageable.value.time_space =60
-  pageable.value.begin_time =undefined
+  pageable.value.time_space = 60
+  pageable.value.begin_time = undefined
   pageable.value.end_time = undefined
   pageable.value.pageNum = 1
-  pageable.value.pageSize =20
-  pageable.value.total =0
+  pageable.value.pageSize = 20
+  pageable.value.total = 0
   pageable.value.data_items = [...customizeColumns.value];
   processTableData.value = []
   getList();
@@ -612,7 +587,7 @@ const processTableData = ref([]);
 let columns = reactive<ColumnProps[]>([]);
 
 //自定义部分表头
-let customizeColumns= ref<any>([
+let customizeColumns = ref<any>([
   {
     data_r_table: "SHI_SHI_LIU_YAO_SU_SHU_JU",
     data_id: 2,
@@ -720,7 +695,7 @@ let customizeColumns= ref<any>([
     data_value: "",
     data_order: 0,
     data_condition: 0
-  },{
+  }, {
     data_id: 207,
     data_r_table: "SHI_SHI_LIU_YAO_SU_SHU_JU",
     data_type: "气压",
@@ -749,14 +724,14 @@ let customizeColumns= ref<any>([
 
 const updateColumns = () => {
   const column = [
-    { prop: "as_name", label: "站名", width: 100 },
-    { prop: "as_code", label: "站号", width: 100 },
-    { prop: "data_time_i", label: "观测时间", width: 120,sortable: true }
+    { prop: "as_name", label: "站名", width: 100,fixed:true },
+    { prop: "as_code", label: "站号", width: 100,fixed:true },
+    { prop: "data_time_i", label: "观测时间", width: 140, sortable: true,fixed:true }
   ];
 
   const newColumns = customizeColumns.value.map(item => ({
     prop: item.data_id,
-    label: item.data_name +'('+item.data_unit+')',
+    label: item.data_name + '(' + item.data_unit + ')',
     sortable: true,
     // width: calculateTextLengthInPixels(item.data_name)
   }));
@@ -774,21 +749,21 @@ const copiedCustomizeColumns = ref<any>([...customizeColumns.value]);
 
 
 
-const platformList =ref<any>(computed(() => userStore.stations))
+const platformList = ref<any>(computed(() => userStore.stations))
 
 
 // 查询所有人工要素字典表
-const elementList =ref<any>([])
+const elementList = ref<any>([])
 const getAllRgDataList = async () => {
   const { data } = await getRgDataList();
   elementList.value = data.list
 };
 
 const getList = async () => {
-  if(pageable.value.as_code_list===undefined||pageable.value.as_code_list.length===0){
+  if (pageable.value.as_code_list === undefined || pageable.value.as_code_list.length === 0) {
     // 没有站不给数据
     processTableData.value = []
-    pageable.value.total=0
+    pageable.value.total = 0
     return;
   }
   const { data } = await getDataItemList(pageable.value);
@@ -797,14 +772,14 @@ const getList = async () => {
 };
 
 // 要素的选中和取消
-const toggleSelection=(item)=> {
-  item.isSelected=!item.isSelected
-  if(item.isSelected){
+const toggleSelection = (item) => {
+  item.isSelected = !item.isSelected
+  if (item.isSelected) {
     //添加
     copiedCustomizeColumns.value.push(item)
-  }else {
+  } else {
     //删除
-    copiedCustomizeColumns.value= copiedCustomizeColumns.value.filter(column => column.data_id !== item.data_id);
+    copiedCustomizeColumns.value = copiedCustomizeColumns.value.filter(column => column.data_id !== item.data_id);
   }
 
 }
@@ -833,7 +808,7 @@ const submitForm = () => {
 
 // 大概计算字符串长度
 function calculateTextLengthInPixels(text) {
-  return (text.length * 12)+100;
+  return (text.length * 12) + 100;
 }
 
 //时间戳转换为指定格式的日期字符串
@@ -878,9 +853,11 @@ const renderHeader = ({ column }: { column: any }) => {
 };
 
 </script>
-<style>
+<style lang="scss" scoped >
 .tpc .el-time-spinner__wrapper {
-  width:100% !important;
+  width: 100% !important;
+}
+::v-deep .el-table-fixed-column--left {
+  border-right: 1px solid #80bdff !important;
 }
 </style>
-