Compare commits
	
		
			14 Commits
		
	
	
		
			main
			...
			permission
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								 | 
						d5fb0c5cfa | |
| 
							
							
								 | 
						7aa474db25 | |
| 
							
							
								 | 
						d4d7b467ae | |
| 
							
							
								 | 
						999ac04b25 | |
| 
							
							
								 | 
						d244e9ef72 | |
| 
							
							
								 | 
						a3e921b9d6 | |
| 
							
							
								 | 
						5878fb97b3 | |
| 
							
							
								 | 
						9cb3ad6b60 | |
| 
							
							
								 | 
						b4f8356eb5 | |
| 
							
							
								 | 
						4457c08192 | |
| 
							
							
								 | 
						d057a5df47 | |
| 
							
							
								 | 
						fd809d18dc | |
| 
							
							
								
								 | 
						e5c11edfa8 | |
| 
							
							
								 | 
						16cc80d4ce | 
| 
						 | 
					@ -121,6 +121,7 @@ body {
 | 
				
			||||||
        align-items: center;
 | 
					        align-items: center;
 | 
				
			||||||
        margin-right: 40px;
 | 
					        margin-right: 40px;
 | 
				
			||||||
        margin-top: 10px;
 | 
					        margin-top: 10px;
 | 
				
			||||||
 | 
					        z-index: 10;
 | 
				
			||||||
        .menuItem {
 | 
					        .menuItem {
 | 
				
			||||||
          width: 305px;
 | 
					          width: 305px;
 | 
				
			||||||
          display: flex;
 | 
					          display: flex;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,15 @@
 | 
				
			||||||
        :rules="detail ? false : item.rules"
 | 
					        :rules="detail ? false : item.rules"
 | 
				
			||||||
        v-show="item.show === undefined ? true : item.show"
 | 
					        v-show="item.show === undefined ? true : item.show"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
 | 
					        <template #label>
 | 
				
			||||||
 | 
					          <span v-if="item.label && typeof item.label === 'string'">
 | 
				
			||||||
 | 
					            <span v-if="item.label.includes('*')">
 | 
				
			||||||
 | 
					              <span style="color: #f56c6c"> * </span>
 | 
				
			||||||
 | 
					              {{ item.label.replace("*", "") }}
 | 
				
			||||||
 | 
					            </span>
 | 
				
			||||||
 | 
					            <span v-else>{{ item.label }}</span>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
        <!-- 输入框 -->
 | 
					        <!-- 输入框 -->
 | 
				
			||||||
        <template v-if="item.type === 'input'">
 | 
					        <template v-if="item.type === 'input'">
 | 
				
			||||||
          <el-input
 | 
					          <el-input
 | 
				
			||||||
| 
						 | 
					@ -423,7 +432,8 @@ export default {
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          if (newVal.geojson === undefined) {
 | 
					          if (newVal.geojson === undefined) {
 | 
				
			||||||
            if (this.$refs.myMarsmap !== undefined) {
 | 
					            if (this.$refs.myMarsmap !== undefined) {
 | 
				
			||||||
              this.$refs.myMarsmap[0].clearDraw();
 | 
					              console.log(111122223333);
 | 
				
			||||||
 | 
					              // this.$refs.myMarsmap[0].clearDraw();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -536,37 +546,90 @@ export default {
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
          if (this.$refs.myMarsmap) {
 | 
					          if (this.$refs.myMarsmap) {
 | 
				
			||||||
            let toJson = this.$refs.myMarsmap[0].toGeoJSON();
 | 
					            let toJson = this.$refs.myMarsmap[0].toGeoJSON();
 | 
				
			||||||
 | 
					            if (toJson.features.length !== 0) {
 | 
				
			||||||
 | 
					              console.log(toJson, "toJson");
 | 
				
			||||||
              // 多边形 首尾相同
 | 
					              // 多边形 首尾相同
 | 
				
			||||||
              geojson.coordinates = toJson.features.map((item) => {
 | 
					              geojson.coordinates = toJson.features.map((item) => {
 | 
				
			||||||
                if (item.properties.type === "polygon") {
 | 
					                if (item.properties.type === "polygon") {
 | 
				
			||||||
                item.geometry.coordinates[0][
 | 
					                  // 确保 coordinates 是有效的多边形坐标(三维数组)
 | 
				
			||||||
                  item.geometry.coordinates[0].length
 | 
					                  if (
 | 
				
			||||||
                ] = item.geometry.coordinates[0][0];
 | 
					                    Array.isArray(item.geometry.coordinates) &&
 | 
				
			||||||
 | 
					                    Array.isArray(item.geometry.coordinates[0]) &&
 | 
				
			||||||
 | 
					                    Array.isArray(item.geometry.coordinates[0][0])
 | 
				
			||||||
 | 
					                  ) {
 | 
				
			||||||
 | 
					                    let coords = item.geometry.coordinates[0];
 | 
				
			||||||
 | 
					                    if (coords.length > 1) {
 | 
				
			||||||
 | 
					                      let firstCoord = coords[0];
 | 
				
			||||||
 | 
					                      let lastCoord = coords[coords.length - 1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                      // 清理重复的尾坐标
 | 
				
			||||||
 | 
					                      while (
 | 
				
			||||||
 | 
					                        coords.length > 1 &&
 | 
				
			||||||
 | 
					                        lastCoord[0] === firstCoord[0] &&
 | 
				
			||||||
 | 
					                        lastCoord[1] === firstCoord[1]
 | 
				
			||||||
 | 
					                      ) {
 | 
				
			||||||
 | 
					                        coords.pop();
 | 
				
			||||||
 | 
					                        // 更新 lastCoord
 | 
				
			||||||
 | 
					                        if (coords.length > 1) {
 | 
				
			||||||
 | 
					                          lastCoord = coords[coords.length - 1];
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                      // 检查首尾坐标是否相同
 | 
				
			||||||
 | 
					                      if (
 | 
				
			||||||
 | 
					                        coords.length > 1 &&
 | 
				
			||||||
 | 
					                        (firstCoord[0] !== lastCoord[0] ||
 | 
				
			||||||
 | 
					                          firstCoord[1] !== lastCoord[1])
 | 
				
			||||||
 | 
					                      ) {
 | 
				
			||||||
 | 
					                        // 如果不同,将首坐标添加到尾部
 | 
				
			||||||
 | 
					                        item.geometry.coordinates[0].push(firstCoord);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
                } else if (item.properties.type === "pointP") {
 | 
					                } else if (item.properties.type === "pointP") {
 | 
				
			||||||
                console.log(item.geometry.coordinates);
 | 
					                  console.log(item.geometry.coordinates, "112233");
 | 
				
			||||||
                } else if (item.properties.type === "circle") {
 | 
					                } else if (item.properties.type === "circle") {
 | 
				
			||||||
                // eslint-disable-next-line no-undef
 | 
					 | 
				
			||||||
                  const positions = mars3d.PolyUtil.getEllipseOuterPositions({
 | 
					                  const positions = mars3d.PolyUtil.getEllipseOuterPositions({
 | 
				
			||||||
                    position: item.geometry.coordinates,
 | 
					                    position: item.geometry.coordinates,
 | 
				
			||||||
                    radius: item.properties.style.radius
 | 
					                    radius: item.properties.style.radius
 | 
				
			||||||
                  });
 | 
					                  });
 | 
				
			||||||
                  item.geometry.coordinates = [[]];
 | 
					                  item.geometry.coordinates = [[]];
 | 
				
			||||||
                  positions.forEach((el) => {
 | 
					                  positions.forEach((el) => {
 | 
				
			||||||
                  // eslint-disable-next-line no-undef
 | 
					 | 
				
			||||||
                  mars3d.LngLatPoint.fromCartesian(el).toArray(),
 | 
					 | 
				
			||||||
                    item.geometry.coordinates[0].push(
 | 
					                    item.geometry.coordinates[0].push(
 | 
				
			||||||
                      // eslint-disable-next-line no-undef
 | 
					 | 
				
			||||||
                      mars3d.LngLatPoint.fromCartesian(el).toArray()
 | 
					                      mars3d.LngLatPoint.fromCartesian(el).toArray()
 | 
				
			||||||
                    );
 | 
					                    );
 | 
				
			||||||
                  });
 | 
					                  });
 | 
				
			||||||
                  console.log(item.geometry.coordinates);
 | 
					                  console.log(item.geometry.coordinates);
 | 
				
			||||||
 | 
					                  // 为圆添加首坐标到尾部以闭合
 | 
				
			||||||
 | 
					                  if (item.geometry.coordinates[0].length > 0) {
 | 
				
			||||||
                    item.geometry.coordinates[0].push(
 | 
					                    item.geometry.coordinates[0].push(
 | 
				
			||||||
                      item.geometry.coordinates[0][0]
 | 
					                      item.geometry.coordinates[0][0]
 | 
				
			||||||
                    );
 | 
					                    );
 | 
				
			||||||
                // console.log(item.geometry.coordinates);
 | 
					                  }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                return item.geometry.coordinates;
 | 
					                return item.geometry.coordinates;
 | 
				
			||||||
              });
 | 
					              });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              // 清理 geojson.coordinates,只保留第一个有效元素
 | 
				
			||||||
 | 
					              if (
 | 
				
			||||||
 | 
					                Array.isArray(geojson.coordinates) &&
 | 
				
			||||||
 | 
					                geojson.coordinates.length > 1
 | 
				
			||||||
 | 
					              ) {
 | 
				
			||||||
 | 
					                // 寻找第一个有效元素(点、多边形或圆)
 | 
				
			||||||
 | 
					                const firstValidItem = geojson.coordinates.find(
 | 
				
			||||||
 | 
					                  (item) =>
 | 
				
			||||||
 | 
					                    Array.isArray(item) &&
 | 
				
			||||||
 | 
					                    // 点坐标:[lng, lat]
 | 
				
			||||||
 | 
					                    ((item.length === 2 &&
 | 
				
			||||||
 | 
					                      typeof item[0] === "number" &&
 | 
				
			||||||
 | 
					                      typeof item[1] === "number") ||
 | 
				
			||||||
 | 
					                      // 多边形或圆坐标:三维数组
 | 
				
			||||||
 | 
					                      (Array.isArray(item[0]) && Array.isArray(item[0][0])))
 | 
				
			||||||
 | 
					                );
 | 
				
			||||||
 | 
					                // 如果找到有效元素,只保留它;否则置为空数组
 | 
				
			||||||
 | 
					                geojson.coordinates = firstValidItem ? [firstValidItem] : [];
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            this.ruleForm.geoJson = geojson;
 | 
					            this.ruleForm.geoJson = geojson;
 | 
				
			||||||
            this.ruleForm.center = [
 | 
					            this.ruleForm.center = [
 | 
				
			||||||
              this.$refs.myMarsmap[0].lonData,
 | 
					              this.$refs.myMarsmap[0].lonData,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,6 +12,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
"use script";
 | 
					"use script";
 | 
				
			||||||
 | 
					import moment from "moment";
 | 
				
			||||||
 | 
					import { Homeview } from "@/api/home.js";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "myMars",
 | 
					  name: "myMars",
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
| 
						 | 
					@ -24,7 +26,9 @@ export default {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      inputs: "",
 | 
					      inputs: "",
 | 
				
			||||||
      checkInterval: null,
 | 
					      checkInterval: null,
 | 
				
			||||||
      time: null
 | 
					      time: null,
 | 
				
			||||||
 | 
					      matchedNames: [],
 | 
				
			||||||
 | 
					      historyData: {}
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {},
 | 
					  components: {},
 | 
				
			||||||
| 
						 | 
					@ -32,9 +36,11 @@ export default {
 | 
				
			||||||
    historyList: {
 | 
					    historyList: {
 | 
				
			||||||
      handler(val) {
 | 
					      handler(val) {
 | 
				
			||||||
        let value = JSON.parse(JSON.stringify(val));
 | 
					        let value = JSON.parse(JSON.stringify(val));
 | 
				
			||||||
 | 
					        console.log(value, "value");
 | 
				
			||||||
        if (value) {
 | 
					        if (value) {
 | 
				
			||||||
          this.startCheckTimer(value);
 | 
					          this.startCheckTimer(value[1]);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        this.historyData = value;
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      deep: true,
 | 
					      deep: true,
 | 
				
			||||||
      immediate: true
 | 
					      immediate: true
 | 
				
			||||||
| 
						 | 
					@ -98,6 +104,17 @@ export default {
 | 
				
			||||||
      }, 100);
 | 
					      }, 100);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    onProcessTraceability(mapList) {
 | 
					    onProcessTraceability(mapList) {
 | 
				
			||||||
 | 
					      let newMapList = (mapList = mapList.filter(
 | 
				
			||||||
 | 
					        (item) => Number(item.lon) !== 0 && Number(item.lat) !== 0
 | 
				
			||||||
 | 
					      ));
 | 
				
			||||||
 | 
					      // if (newMapList.length === 0) {
 | 
				
			||||||
 | 
					      //   this.clearDraw();
 | 
				
			||||||
 | 
					      //   this.$message({
 | 
				
			||||||
 | 
					      //     message: "暂无数据",
 | 
				
			||||||
 | 
					      //     type: "warning"
 | 
				
			||||||
 | 
					      //   });
 | 
				
			||||||
 | 
					      //   return;
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
      // eslint-disable-next-line no-undef
 | 
					      // eslint-disable-next-line no-undef
 | 
				
			||||||
      const property = new Cesium.SampledPositionProperty();
 | 
					      const property = new Cesium.SampledPositionProperty();
 | 
				
			||||||
      // eslint-disable-next-line no-undef
 | 
					      // eslint-disable-next-line no-undef
 | 
				
			||||||
| 
						 | 
					@ -109,24 +126,40 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      let start;
 | 
					      let start;
 | 
				
			||||||
      let stop;
 | 
					      let stop;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // 如果数据只有一条,复制并调整时间
 | 
				
			||||||
 | 
					      if (newMapList.length === 1) {
 | 
				
			||||||
 | 
					        const firstItem = newMapList[0];
 | 
				
			||||||
 | 
					        const secondItem = { ...firstItem };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 增加1秒到 createTime
 | 
				
			||||||
 | 
					        const firstTime = moment(firstItem.createTime); // 使用 moment.js 来处理时间
 | 
				
			||||||
 | 
					        secondItem.createTime = firstTime
 | 
				
			||||||
 | 
					          .add(1, "seconds")
 | 
				
			||||||
 | 
					          .format("YYYY-MM-DD HH:mm:ss");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        newMapList.push(secondItem); // 将新的第二条数据加入到列表
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      for (let i = 0, len = mapList.length; i < len; i++) {
 | 
					      for (let i = 0, len = mapList.length; i < len; i++) {
 | 
				
			||||||
        const item = mapList[i];
 | 
					        const item = mapList[i];
 | 
				
			||||||
        const lng = Number(item.lon); // 经度
 | 
					        const lng = Number(item.lon); // 经度
 | 
				
			||||||
        const lat = Number(item.lat); // 纬度
 | 
					        const lat = Number(item.lat); // 纬度
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const app_lng = Number(item.app_lon); // 经度
 | 
					        const app_lng = Number(item.app_lon); // 经度
 | 
				
			||||||
        const app_lat = Number(item.app_lat); // 纬度
 | 
					        const app_lat = Number(item.app_lat); // 纬度
 | 
				
			||||||
        const height = item.alt || 5; // 高度5 是避免与geojson高度冲突
 | 
					        const height = item.alt || 5; // 高度5 是避免与 geojson 高度冲突
 | 
				
			||||||
        const outputDate = item.createTime.replace(" ", "T");
 | 
					        const outputDate = item.createTime.replace(" ", "T");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const time = outputDate; // 时间
 | 
					        const time = outputDate; // 时间
 | 
				
			||||||
        let position = null;
 | 
					        let position = null;
 | 
				
			||||||
        let app_position = null;
 | 
					        let app_position = null;
 | 
				
			||||||
        if (lng !== 0 && lat !== 0) {
 | 
					 | 
				
			||||||
        if (lng && lat) {
 | 
					        if (lng && lat) {
 | 
				
			||||||
          // eslint-disable-next-line no-undef
 | 
					          // eslint-disable-next-line no-undef
 | 
				
			||||||
          position = Cesium.Cartesian3.fromDegrees(lng, lat, height);
 | 
					          position = Cesium.Cartesian3.fromDegrees(lng, lat, height);
 | 
				
			||||||
          app_position = Cesium.Cartesian3.fromDegrees(app_lng, app_lat, 0);
 | 
					          app_position = Cesium.Cartesian3.fromDegrees(app_lng, app_lat, 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let juliaDate = null;
 | 
					        let juliaDate = null;
 | 
				
			||||||
        if (time) {
 | 
					        if (time) {
 | 
				
			||||||
          // eslint-disable-next-line no-undef
 | 
					          // eslint-disable-next-line no-undef
 | 
				
			||||||
| 
						 | 
					@ -144,9 +177,6 @@ export default {
 | 
				
			||||||
        } else if (i === len - 1) {
 | 
					        } else if (i === len - 1) {
 | 
				
			||||||
          stop = juliaDate;
 | 
					          stop = juliaDate;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          console.log("经纬度为0,忽略该数据");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // 设置时钟属性
 | 
					      // 设置时钟属性
 | 
				
			||||||
      if (stop === undefined) {
 | 
					      if (stop === undefined) {
 | 
				
			||||||
| 
						 | 
					@ -170,6 +200,7 @@ export default {
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      this.clearDraw();
 | 
					      this.clearDraw();
 | 
				
			||||||
      // 创建无人机对象
 | 
					      // 创建无人机对象
 | 
				
			||||||
 | 
					      console.log(property, "property");
 | 
				
			||||||
      let pathEntity = this.graphicLayer.getGraphicById("pathIdsss");
 | 
					      let pathEntity = this.graphicLayer.getGraphicById("pathIdsss");
 | 
				
			||||||
      if (!pathEntity) {
 | 
					      if (!pathEntity) {
 | 
				
			||||||
        pathEntity = new mars3d.graphic.ModelEntity({
 | 
					        pathEntity = new mars3d.graphic.ModelEntity({
 | 
				
			||||||
| 
						 | 
					@ -225,10 +256,85 @@ export default {
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        this.graphicLayer.addGraphic(app_pathEntity);
 | 
					        this.graphicLayer.addGraphic(app_pathEntity);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      Homeview().then((res) => {
 | 
				
			||||||
 | 
					        console.log(res.data.positions, "res.data.positions");
 | 
				
			||||||
 | 
					        this.matchedNames = res.data.positions.filter((m) =>
 | 
				
			||||||
 | 
					          this.historyData[0].positionId.includes(m.id)
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        console.log(this.matchedNames, "this.matchedNames");
 | 
				
			||||||
 | 
					        if (this.matchedNames.length > 0) {
 | 
				
			||||||
 | 
					          let item = this.matchedNames[0];
 | 
				
			||||||
 | 
					          let graphiczhendi = this.mapMars.getLayerById("zhendi");
 | 
				
			||||||
 | 
					          if (!graphiczhendi) {
 | 
				
			||||||
 | 
					            graphiczhendi = new mars3d.layer.GeoJsonLayer({
 | 
				
			||||||
 | 
					              id: "zhendi",
 | 
				
			||||||
 | 
					              name: "zhendi",
 | 
				
			||||||
 | 
					              data: {
 | 
				
			||||||
 | 
					                type: "FeatureCollection",
 | 
				
			||||||
 | 
					                features: [
 | 
				
			||||||
 | 
					                  {
 | 
				
			||||||
 | 
					                    type: "Feature",
 | 
				
			||||||
 | 
					                    properties: {},
 | 
				
			||||||
 | 
					                    geometry: JSON.parse(item.regionJson)
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                ]
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              symbol: {
 | 
				
			||||||
 | 
					                styleOptions: {
 | 
				
			||||||
 | 
					                  fill: true,
 | 
				
			||||||
 | 
					                  color: "#3388cc",
 | 
				
			||||||
 | 
					                  opacity: 0.5,
 | 
				
			||||||
 | 
					                  outline: true,
 | 
				
			||||||
 | 
					                  outlineStyle: {
 | 
				
			||||||
 | 
					                    width: 2,
 | 
				
			||||||
 | 
					                    opacity: 0.1
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            this.mapMars.addLayer(graphiczhendi);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          item.devices.forEach((deviceItem) => {
 | 
				
			||||||
 | 
					            // 设备
 | 
				
			||||||
 | 
					            let graphic = this.graphicLayer.getGraphicById(
 | 
				
			||||||
 | 
					              deviceItem.id + "shebei"
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
 | 
					            if (!graphic) {
 | 
				
			||||||
 | 
					              graphic = new mars3d.graphic.BillboardEntity({
 | 
				
			||||||
 | 
					                id: deviceItem.id + "shebei",
 | 
				
			||||||
 | 
					                name: "设备",
 | 
				
			||||||
 | 
					                position: new mars3d.LngLatPoint(
 | 
				
			||||||
 | 
					                  deviceItem.lon,
 | 
				
			||||||
 | 
					                  deviceItem.lat,
 | 
				
			||||||
 | 
					                  0
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                style: {
 | 
				
			||||||
 | 
					                  image: require(`@/assets/img/device/deviceIcon/${deviceItem.icon}.png`),
 | 
				
			||||||
 | 
					                  scale: 1,
 | 
				
			||||||
 | 
					                  horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
 | 
				
			||||||
 | 
					                  verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
 | 
				
			||||||
 | 
					                  clampToGround: true,
 | 
				
			||||||
 | 
					                  scaleByDistance: true,
 | 
				
			||||||
 | 
					                  scaleByDistance_near: 100,
 | 
				
			||||||
 | 
					                  scaleByDistance_nearValue: 0.5
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					              console.log(graphic, "graphic");
 | 
				
			||||||
 | 
					              this.graphicLayer.addGraphic(graphic);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    clearDraw() {
 | 
					    clearDraw() {
 | 
				
			||||||
      if (this.graphics) {
 | 
					      // if (this.graphics) {
 | 
				
			||||||
        this.mapMars.removeLayer(this.graphics);
 | 
					      //   this.mapMars.removeLayer(this.graphics);
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
 | 
					      let graphiczhendi = this.mapMars.getLayerById("zhendi");
 | 
				
			||||||
 | 
					      console.log(graphiczhendi, "layer");
 | 
				
			||||||
 | 
					      if (graphiczhendi !== undefined) {
 | 
				
			||||||
 | 
					        this.mapMars.removeLayer(graphiczhendi);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (this.graphicLayer) {
 | 
					      if (this.graphicLayer) {
 | 
				
			||||||
        this.graphicLayer.clear();
 | 
					        this.graphicLayer.clear();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					myMarsmap
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="ditu">
 | 
					  <div class="ditu">
 | 
				
			||||||
    <div id="marsContainer-map" ref="marsMaps" class="mars3d-container"></div>
 | 
					    <div id="marsContainer-map" ref="marsMaps" class="mars3d-container"></div>
 | 
				
			||||||
| 
						 | 
					@ -99,15 +100,14 @@ export default {
 | 
				
			||||||
      deep: true,
 | 
					      deep: true,
 | 
				
			||||||
      immediate: true,
 | 
					      immediate: true,
 | 
				
			||||||
      handler(newVal) {
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        console.log("newVal1111", newVal);
 | 
				
			||||||
        if (newVal) {
 | 
					        if (newVal) {
 | 
				
			||||||
          this.jsonData = JSON.parse(newVal);
 | 
					          this.jsonData = JSON.parse(newVal);
 | 
				
			||||||
          if (this.jsonData) {
 | 
					          if (this.jsonData) {
 | 
				
			||||||
            if (newVal) {
 | 
					 | 
				
			||||||
            this.showRegion(this.jsonData, "geojson");
 | 
					            this.showRegion(this.jsonData, "geojson");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mapData: {
 | 
					    mapData: {
 | 
				
			||||||
      deep: true,
 | 
					      deep: true,
 | 
				
			||||||
| 
						 | 
					@ -121,9 +121,9 @@ export default {
 | 
				
			||||||
            this.lonData = "";
 | 
					            this.lonData = "";
 | 
				
			||||||
            this.latData = "";
 | 
					            this.latData = "";
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          console.log("mapData发生变化", newVal);
 | 
					 | 
				
			||||||
          if (this.lonData && this.latData) {
 | 
					          if (this.lonData && this.latData) {
 | 
				
			||||||
            if (this.lonData && this.latData) {
 | 
					            if (this.lonData && this.latData) {
 | 
				
			||||||
 | 
					              this.isinputDisabled = true;
 | 
				
			||||||
              this.deviceDrid(this.lonData, this.latData);
 | 
					              this.deviceDrid(this.lonData, this.latData);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
| 
						 | 
					@ -217,6 +217,7 @@ export default {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (this.lonData && this.latData) {
 | 
					      if (this.lonData && this.latData) {
 | 
				
			||||||
        this.deviceDrid(this.lonData, this.latData);
 | 
					        this.deviceDrid(this.lonData, this.latData);
 | 
				
			||||||
 | 
					        this.isinputDisabled = true;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    lineClicks(val) {
 | 
					    lineClicks(val) {
 | 
				
			||||||
| 
						 | 
					@ -334,7 +335,6 @@ export default {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    toGeoJSON() {
 | 
					    toGeoJSON() {
 | 
				
			||||||
      console.log(this.graphicLayer, this.typeOf, "this.graphicLayer");
 | 
					 | 
				
			||||||
      if (this.typeOf === "pointP") {
 | 
					      if (this.typeOf === "pointP") {
 | 
				
			||||||
        return this.graphicLayer.toGeoJSON({ noAlt: true });
 | 
					        return this.graphicLayer.toGeoJSON({ noAlt: true });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
| 
						 | 
					@ -347,6 +347,7 @@ export default {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showRegion(value, type) {
 | 
					    showRegion(value, type) {
 | 
				
			||||||
 | 
					      this.clearDraw();
 | 
				
			||||||
      let geojson = {};
 | 
					      let geojson = {};
 | 
				
			||||||
      if (type === "uploadGeojson") {
 | 
					      if (type === "uploadGeojson") {
 | 
				
			||||||
        if (this.graphicLayer._graphicList.length === 0) {
 | 
					        if (this.graphicLayer._graphicList.length === 0) {
 | 
				
			||||||
| 
						 | 
					@ -387,7 +388,6 @@ export default {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    deviceDrid(lon, lat) {
 | 
					    deviceDrid(lon, lat) {
 | 
				
			||||||
      // this.clearDraw();
 | 
					 | 
				
			||||||
      console.log(this.graphicLayer, "this.graphicLayer");
 | 
					      console.log(this.graphicLayer, "this.graphicLayer");
 | 
				
			||||||
      if (this.graphicLayer) {
 | 
					      if (this.graphicLayer) {
 | 
				
			||||||
        this.graphicLayer.eachGraphic((item) => {
 | 
					        this.graphicLayer.eachGraphic((item) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,8 @@
 | 
				
			||||||
      :border="border"
 | 
					      :border="border"
 | 
				
			||||||
      @selection-change="handleSelectionChange"
 | 
					      @selection-change="handleSelectionChange"
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
 | 
					      <el-table-column label="序号" type="index" align="center" width="50">
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column type="expand" v-if="isShowExpand">
 | 
					      <el-table-column type="expand" v-if="isShowExpand">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <slot name="expand" :rowData="scope"></slot>
 | 
					          <slot name="expand" :rowData="scope"></slot>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="left-sidebar" :class="{ contracted: isContracted }">
 | 
					  <div class="left-sidebar" :class="{ contracted: isContracted }">
 | 
				
			||||||
 | 
					    <div class="alarm-border warningAnimatBox" v-if="iswarning"></div>
 | 
				
			||||||
    <div class="stats">
 | 
					    <div class="stats">
 | 
				
			||||||
      <div class="stat-item" v-for="(item, index) in warningDay" :key="index">
 | 
					      <div class="stat-item" v-for="(item, index) in warningDay" :key="index">
 | 
				
			||||||
        <div class="stat-name">{{ item.name }}</div>
 | 
					        <div class="stat-name">{{ item.name }}</div>
 | 
				
			||||||
| 
						 | 
					@ -309,6 +310,28 @@ export default {
 | 
				
			||||||
.left-sidebar.contracted {
 | 
					.left-sidebar.contracted {
 | 
				
			||||||
  transform: translateX(-90%);
 | 
					  transform: translateX(-90%);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.alarm-border {
 | 
				
			||||||
 | 
					  position: fixed;
 | 
				
			||||||
 | 
					  top: 0;
 | 
				
			||||||
 | 
					  left: 0;
 | 
				
			||||||
 | 
					  right: 0;
 | 
				
			||||||
 | 
					  bottom: 0;
 | 
				
			||||||
 | 
					  border: 1px solid transparent;
 | 
				
			||||||
 | 
					  pointer-events: none; /* Prevent interaction with the border */
 | 
				
			||||||
 | 
					  z-index: 9999; /* Ensure it appears above other elements */
 | 
				
			||||||
 | 
					  &.warningAnimatBox {
 | 
				
			||||||
 | 
					    animation: greenanimated-shadow 2s infinite;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@keyframes greenanimated-shadow {
 | 
				
			||||||
 | 
					  0% {
 | 
				
			||||||
 | 
					    box-shadow: 0 0 0 0 #ff0000 inset;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  85% {
 | 
				
			||||||
 | 
					    box-shadow: 0px 0px 100px 0px #ff0000 inset;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.audio-prompt {
 | 
					.audio-prompt {
 | 
				
			||||||
  position: fixed;
 | 
					  position: fixed;
 | 
				
			||||||
  top: 0;
 | 
					  top: 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,6 +54,7 @@
 | 
				
			||||||
        <el-dropdown trigger="click">
 | 
					        <el-dropdown trigger="click">
 | 
				
			||||||
          <img :size="30" src="@/assets/img/menu/iconUser.png" />
 | 
					          <img :size="30" src="@/assets/img/menu/iconUser.png" />
 | 
				
			||||||
          <el-dropdown-menu slot="dropdown">
 | 
					          <el-dropdown-menu slot="dropdown">
 | 
				
			||||||
 | 
					            <el-dropdown-item>{{ userName }}</el-dropdown-item>
 | 
				
			||||||
            <el-dropdown-item @click.native="passClick">
 | 
					            <el-dropdown-item @click.native="passClick">
 | 
				
			||||||
              修改密码
 | 
					              修改密码
 | 
				
			||||||
            </el-dropdown-item>
 | 
					            </el-dropdown-item>
 | 
				
			||||||
| 
						 | 
					@ -222,7 +223,8 @@ export default {
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      fromItem: {},
 | 
					      fromItem: {},
 | 
				
			||||||
      dialog: false,
 | 
					      dialog: false,
 | 
				
			||||||
      isAdmins: false
 | 
					      isAdmins: false,
 | 
				
			||||||
 | 
					      userName: ""
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {},
 | 
					  created() {},
 | 
				
			||||||
| 
						 | 
					@ -238,6 +240,7 @@ export default {
 | 
				
			||||||
    this.isAdmins = JSON.parse(localStorage.getItem("isAdmin"));
 | 
					    this.isAdmins = JSON.parse(localStorage.getItem("isAdmin"));
 | 
				
			||||||
    this.updateTime();
 | 
					    this.updateTime();
 | 
				
			||||||
    setInterval(this.updateTime, 1000); // 每秒更新一次时间
 | 
					    setInterval(this.updateTime, 1000); // 每秒更新一次时间
 | 
				
			||||||
 | 
					    this.userName = localStorage.getItem("userName");
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    updateTime() {
 | 
					    updateTime() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -156,7 +156,7 @@ export function allDevices(options, type, show) {
 | 
				
			||||||
                  : require(`@/assets/img/device/deviceIcon/${deviceItem.icon}-offline.png`)
 | 
					                  : require(`@/assets/img/device/deviceIcon/${deviceItem.icon}-offline.png`)
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            if (deviceItem.icon === "9") {
 | 
					            if (deviceItem.isMove) {
 | 
				
			||||||
              graphic.setOptions({
 | 
					              graphic.setOptions({
 | 
				
			||||||
                position: new mars3d.LngLatPoint(
 | 
					                position: new mars3d.LngLatPoint(
 | 
				
			||||||
                  deviceItem.lon,
 | 
					                  deviceItem.lon,
 | 
				
			||||||
| 
						 | 
					@ -205,7 +205,7 @@ export function allDevices(options, type, show) {
 | 
				
			||||||
              : require(`@/assets/img/device/deviceIcon/${item.icon}-offline.png`)
 | 
					              : require(`@/assets/img/device/deviceIcon/${item.icon}-offline.png`)
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        if (deviceItem.icon === "9") {
 | 
					        if (deviceItem.isMove) {
 | 
				
			||||||
          graphic.setOptions({
 | 
					          graphic.setOptions({
 | 
				
			||||||
            position: new mars3d.LngLatPoint(deviceItem.lon, deviceItem.lat, 0)
 | 
					            position: new mars3d.LngLatPoint(deviceItem.lon, deviceItem.lat, 0)
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
| 
						 | 
					@ -318,21 +318,21 @@ function bindLayerPopup(graphicLayer, graphic) {
 | 
				
			||||||
          }" /></div>
 | 
					          }" /></div>
 | 
				
			||||||
          <div class="device-type">
 | 
					          <div class="device-type">
 | 
				
			||||||
            <div class="txt">
 | 
					            <div class="txt">
 | 
				
			||||||
              <p class="p1">经度</p>
 | 
					              <p class="p1">序列号</p>
 | 
				
			||||||
              <p class="p2">${attr.lon}</p>
 | 
					              <p class="p2">${attr.deviceSN}</p>
 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <div class="txt">
 | 
					 | 
				
			||||||
              <p class="p1">IP</p>
 | 
					 | 
				
			||||||
              <p class="p2">${attr.ip}</p>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            <div class="txt">
 | 
					 | 
				
			||||||
              <p class="p1">纬度</p>
 | 
					 | 
				
			||||||
              <p class="p2">${attr.lat}</p>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="txt">
 | 
					            <div class="txt">
 | 
				
			||||||
              <p class="p1">状态</p>
 | 
					              <p class="p1">状态</p>
 | 
				
			||||||
              <p class="p2">${attr.isOnline ? "在线" : "离线"}</p>
 | 
					              <p class="p2">${attr.isOnline ? "在线" : "离线"}</p>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="txt">
 | 
				
			||||||
 | 
					              <p class="p1">位置</p>
 | 
				
			||||||
 | 
					              <p class="p2">${attr.lon}</p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="txt">
 | 
				
			||||||
 | 
					              <p class="p1">纬度</p>
 | 
				
			||||||
 | 
					              <p class="p2">${attr.lat}</p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      `,
 | 
					      `,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,6 +34,26 @@ export default {
 | 
				
			||||||
    this.timeInterval = setInterval(() => {
 | 
					    this.timeInterval = setInterval(() => {
 | 
				
			||||||
      this.initHomeData();
 | 
					      this.initHomeData();
 | 
				
			||||||
    }, 2000);
 | 
					    }, 2000);
 | 
				
			||||||
 | 
					    // setInterval(() => {
 | 
				
			||||||
 | 
					    //   this.signaData = [
 | 
				
			||||||
 | 
					    //     {
 | 
				
			||||||
 | 
					    //       serial_number: "123456",
 | 
				
			||||||
 | 
					    //       times: "2023-01-01 00:00:00",
 | 
				
			||||||
 | 
					    //       DeviceName: "无人机1",
 | 
				
			||||||
 | 
					    //       freq: "24GHz",
 | 
				
			||||||
 | 
					    //       device_type: "无人机",
 | 
				
			||||||
 | 
					    //       drone_lat: 39.9042,
 | 
				
			||||||
 | 
					    //       drone_lon: 116.4074,
 | 
				
			||||||
 | 
					    //       height: 100,
 | 
				
			||||||
 | 
					    //       speed: 10,
 | 
				
			||||||
 | 
					    //       heading: 90,
 | 
				
			||||||
 | 
					    //       battery: 80,
 | 
				
			||||||
 | 
					    //       online: true,
 | 
				
			||||||
 | 
					    //       BatchId: "123456",
 | 
				
			||||||
 | 
					    //       alarmLevel: 1
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   ];
 | 
				
			||||||
 | 
					    // }, 1000);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    initHomeData() {
 | 
					    initHomeData() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,6 +85,7 @@ export default {
 | 
				
			||||||
            localStorage.setItem("expires", res.data.expires); // 登录到期时间
 | 
					            localStorage.setItem("expires", res.data.expires); // 登录到期时间
 | 
				
			||||||
            localStorage.setItem("userId", res.data.userid); // 登录id
 | 
					            localStorage.setItem("userId", res.data.userid); // 登录id
 | 
				
			||||||
            localStorage.setItem("isAdmin", res.data.isAdmin); // 权限
 | 
					            localStorage.setItem("isAdmin", res.data.isAdmin); // 权限
 | 
				
			||||||
 | 
					            localStorage.setItem("positionID", res.data.positionIds); // 权限
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // 注意:Vue 2 中 Pinia 的用法需要调整
 | 
					            // 注意:Vue 2 中 Pinia 的用法需要调整
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,8 +145,8 @@ export default {
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      coloumData: [
 | 
					      coloumData: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "防区名称",
 | 
					          label: "事件类型",
 | 
				
			||||||
          prop: "positionName",
 | 
					          prop: "flyStatus",
 | 
				
			||||||
          align: "center"
 | 
					          align: "center"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -154,21 +154,21 @@ export default {
 | 
				
			||||||
          prop: "duration",
 | 
					          prop: "duration",
 | 
				
			||||||
          align: "center"
 | 
					          align: "center"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: "机型",
 | 
					        //   label: "机型",
 | 
				
			||||||
          prop: "model",
 | 
					        //   prop: "model",
 | 
				
			||||||
          align: "center"
 | 
					        //   align: "center"
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "SN码",
 | 
					          label: "SN码",
 | 
				
			||||||
          prop: "sn",
 | 
					          prop: "sn",
 | 
				
			||||||
          align: "center"
 | 
					          align: "center"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: "频段",
 | 
					        //   label: "频段",
 | 
				
			||||||
          prop: "frequency",
 | 
					        //   prop: "frequency",
 | 
				
			||||||
          align: "center"
 | 
					        //   align: "center"
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "开始时间",
 | 
					          label: "开始时间",
 | 
				
			||||||
          prop: "startTime",
 | 
					          prop: "startTime",
 | 
				
			||||||
| 
						 | 
					@ -236,21 +236,41 @@ export default {
 | 
				
			||||||
        alarmList(params).then((res) => {
 | 
					        alarmList(params).then((res) => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            this.tableData = res.data.items.map((item) => {
 | 
					            this.tableData = res.data.items.map((item) => {
 | 
				
			||||||
              const { isWhitelist, duration, frequency, ...rest } = item;
 | 
					              const {
 | 
				
			||||||
 | 
					                isWhitelist,
 | 
				
			||||||
 | 
					                duration,
 | 
				
			||||||
 | 
					                frequency,
 | 
				
			||||||
 | 
					                model,
 | 
				
			||||||
 | 
					                alarmLevel,
 | 
				
			||||||
 | 
					                ...rest
 | 
				
			||||||
 | 
					              } = JSON.parse(JSON.stringify(item));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              let flyStatus = "";
 | 
				
			||||||
 | 
					              if (isWhitelist) {
 | 
				
			||||||
 | 
					                flyStatus = "白飞";
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                flyStatus = alarmLevel === 0 ? "防区外" : "入侵";
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              if (model === "O4") {
 | 
				
			||||||
 | 
					                flyStatus = "入侵";
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
              return {
 | 
					              return {
 | 
				
			||||||
                ...rest,
 | 
					                ...rest,
 | 
				
			||||||
                isattacked: item.isattacked ? "是" : "否",
 | 
					                model: model,
 | 
				
			||||||
 | 
					                isattacked: item.isattacked ? "是" : "否", // 保留你原本的逻辑
 | 
				
			||||||
                duration: String(item.duration),
 | 
					                duration: String(item.duration),
 | 
				
			||||||
                frequency: String(item.frequency)
 | 
					                frequency: String(item.frequency),
 | 
				
			||||||
 | 
					                flyStatus // 新增字段
 | 
				
			||||||
              };
 | 
					              };
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.paginationParam.total = res.data.total;
 | 
					            this.paginationParam.total = res.data.total;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      console.log(value);
 | 
					      console.log(value);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 停用 编辑 删除
 | 
					    // 轨迹回放
 | 
				
			||||||
    handleClick(value, type) {
 | 
					    handleClick(value, type) {
 | 
				
			||||||
      let params = { batchid: value.batchId };
 | 
					      let params = { batchid: value.batchId };
 | 
				
			||||||
      if (type === "playback") {
 | 
					      if (type === "playback") {
 | 
				
			||||||
| 
						 | 
					@ -258,51 +278,7 @@ export default {
 | 
				
			||||||
        alarmDetail(params).then((res) => {
 | 
					        alarmDetail(params).then((res) => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            console.log(res.data, "res.data");
 | 
					            console.log(res.data, "res.data");
 | 
				
			||||||
            this.historyList = res.data;
 | 
					            this.historyList = [value, res.data];
 | 
				
			||||||
            // this.historyList = [
 | 
					 | 
				
			||||||
            //   {
 | 
					 | 
				
			||||||
            //     lon: 109.056198,
 | 
					 | 
				
			||||||
            //     lat: 38.674443,
 | 
					 | 
				
			||||||
            //     alt: 0,
 | 
					 | 
				
			||||||
            //     createTime: "2025-03-30 03:44:21",
 | 
					 | 
				
			||||||
            //     alarmLevel: 0
 | 
					 | 
				
			||||||
            //   },
 | 
					 | 
				
			||||||
            //   {
 | 
					 | 
				
			||||||
            //     lon: 109.081454,
 | 
					 | 
				
			||||||
            //     lat: 38.664766,
 | 
					 | 
				
			||||||
            //     alt: 0,
 | 
					 | 
				
			||||||
            //     createTime: "2025-03-30 03:44:22",
 | 
					 | 
				
			||||||
            //     alarmLevel: 0
 | 
					 | 
				
			||||||
            //   },
 | 
					 | 
				
			||||||
            //   {
 | 
					 | 
				
			||||||
            //     lon: 109.101687,
 | 
					 | 
				
			||||||
            //     lat: 38.632524,
 | 
					 | 
				
			||||||
            //     alt: 0,
 | 
					 | 
				
			||||||
            //     createTime: "2025-03-30 03:44:25",
 | 
					 | 
				
			||||||
            //     alarmLevel: 0
 | 
					 | 
				
			||||||
            //   },
 | 
					 | 
				
			||||||
            //   {
 | 
					 | 
				
			||||||
            //     lon: 109.063063,
 | 
					 | 
				
			||||||
            //     lat: 38.622878,
 | 
					 | 
				
			||||||
            //     alt: 0,
 | 
					 | 
				
			||||||
            //     createTime: "2025-03-30 03:44:30",
 | 
					 | 
				
			||||||
            //     alarmLevel: 0
 | 
					 | 
				
			||||||
            //   },
 | 
					 | 
				
			||||||
            //   {
 | 
					 | 
				
			||||||
            //     lon: 109.016034,
 | 
					 | 
				
			||||||
            //     lat: 38.635138,
 | 
					 | 
				
			||||||
            //     alt: 0,
 | 
					 | 
				
			||||||
            //     createTime: "2025-03-30 03:44:35",
 | 
					 | 
				
			||||||
            //     alarmLevel: 0
 | 
					 | 
				
			||||||
            //   },
 | 
					 | 
				
			||||||
            //   {
 | 
					 | 
				
			||||||
            //     lon: 108.991419,
 | 
					 | 
				
			||||||
            //     lat: 38.659515,
 | 
					 | 
				
			||||||
            //     alt: 0,
 | 
					 | 
				
			||||||
            //     createTime: "2025-03-30 03:44:38",
 | 
					 | 
				
			||||||
            //     alarmLevel: 0
 | 
					 | 
				
			||||||
            //   }
 | 
					 | 
				
			||||||
            // ];
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        this.title = "轨迹回放";
 | 
					        this.title = "轨迹回放";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -69,8 +69,8 @@ export default {
 | 
				
			||||||
              return item;
 | 
					              return item;
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            res.data.model.map((item) => {
 | 
					            res.data.model.map((item) => {
 | 
				
			||||||
              item.name = item.model.slice(0, 10); // 截断 model 字段的值,使其不超过 10 个字符
 | 
					              item.name = item.model.slice(0, 20); // 截断 model 字段的值,使其不超过 10 个字符
 | 
				
			||||||
              if (item.model.length > 10) {
 | 
					              if (item.model.length > 20) {
 | 
				
			||||||
                item.name += "..."; // 如果原始 model 字段的值超过了 10 个字符,则在末尾添加省略号
 | 
					                item.name += "..."; // 如果原始 model 字段的值超过了 10 个字符,则在末尾添加省略号
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
              item.value = item.count;
 | 
					              item.value = item.count;
 | 
				
			||||||
| 
						 | 
					@ -93,8 +93,10 @@ export default {
 | 
				
			||||||
            const seriesData = sortedDateData.map((item) => item.count);
 | 
					            const seriesData = sortedDateData.map((item) => item.count);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const sortedDateData1 = res.data.time.sort(
 | 
					            const sortedDateData1 = res.data.time.sort(
 | 
				
			||||||
              (a, b) => new Date(a.key) - new Date(b.key)
 | 
					              (a, b) => Number(a.key) - Number(b.key)
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            console.log(sortedDateData1, "sortedDateData1");
 | 
				
			||||||
            const xAxisData1 = sortedDateData1.map((item) => item.key);
 | 
					            const xAxisData1 = sortedDateData1.map((item) => item.key);
 | 
				
			||||||
            const seriesData1 = sortedDateData1.map((item) => item.count);
 | 
					            const seriesData1 = sortedDateData1.map((item) => item.count);
 | 
				
			||||||
            this.chartData = res.data;
 | 
					            this.chartData = res.data;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -144,7 +144,7 @@ export default {
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "icon",
 | 
					          label: "设备类型",
 | 
				
			||||||
          type: "selectImg",
 | 
					          type: "selectImg",
 | 
				
			||||||
          model: "icon",
 | 
					          model: "icon",
 | 
				
			||||||
          options: [
 | 
					          options: [
 | 
				
			||||||
| 
						 | 
					@ -219,11 +219,11 @@ export default {
 | 
				
			||||||
          model: "ip",
 | 
					          model: "ip",
 | 
				
			||||||
          rules: [{ required: true, message: "请输入设备名称" }]
 | 
					          rules: [{ required: true, message: "请输入设备名称" }]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: "机型",
 | 
					        //   label: "机型",
 | 
				
			||||||
          type: "input",
 | 
					        //   type: "input",
 | 
				
			||||||
          model: "model"
 | 
					        //   model: "model"
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "账号",
 | 
					          label: "账号",
 | 
				
			||||||
          type: "input",
 | 
					          type: "input",
 | 
				
			||||||
| 
						 | 
					@ -270,16 +270,21 @@ export default {
 | 
				
			||||||
          label: "设备SN",
 | 
					          label: "设备SN",
 | 
				
			||||||
          prop: "deviceSN"
 | 
					          prop: "deviceSN"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          type: "text",
 | 
					        //   type: "text",
 | 
				
			||||||
          label: "ip",
 | 
					        //   label: "ip",
 | 
				
			||||||
          prop: "ip"
 | 
					        //   prop: "ip"
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: "text",
 | 
					          type: "text",
 | 
				
			||||||
          label: "关联防区",
 | 
					          label: "关联防区",
 | 
				
			||||||
          prop: "positionName"
 | 
					          prop: "positionName"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "设备状态",
 | 
				
			||||||
 | 
					          prop: "online"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: "text",
 | 
					          type: "text",
 | 
				
			||||||
          label: "安装地址",
 | 
					          label: "安装地址",
 | 
				
			||||||
| 
						 | 
					@ -462,7 +467,10 @@ export default {
 | 
				
			||||||
        params.pageSize = this.paginationParam.size;
 | 
					        params.pageSize = this.paginationParam.size;
 | 
				
			||||||
        deviceList(params).then((res) => {
 | 
					        deviceList(params).then((res) => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            this.tableData = res.data.items;
 | 
					            this.tableData = res.data.items.map((item) => {
 | 
				
			||||||
 | 
					              item.online = item.online === true ? "在线" : "离线";
 | 
				
			||||||
 | 
					              return item;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
            this.paginationParam.total = res.data.total;
 | 
					            this.paginationParam.total = res.data.total;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -80,8 +80,9 @@
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
"use script";
 | 
					 | 
				
			||||||
import { userList, userAdd, userUpdate, userDelete } from "@/api/user.js";
 | 
					import { userList, userAdd, userUpdate, userDelete } from "@/api/user.js";
 | 
				
			||||||
 | 
					import { devPositionList } from "@/api/position.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "webDevice",
 | 
					  name: "webDevice",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
| 
						 | 
					@ -126,6 +127,14 @@ export default {
 | 
				
			||||||
              key: false
 | 
					              key: false
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          label: "防区",
 | 
				
			||||||
 | 
					          type: "select",
 | 
				
			||||||
 | 
					          model: "positionId",
 | 
				
			||||||
 | 
					          options: [],
 | 
				
			||||||
 | 
					          multiple: true,
 | 
				
			||||||
 | 
					          rules: [{ required: true, message: "请选择防区", trigger: "change" }]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
| 
						 | 
					@ -137,7 +146,7 @@ export default {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "是否管理员",
 | 
					          label: "是否管理员",
 | 
				
			||||||
          prop: "isAdmin",
 | 
					          prop: "isAdminDisplay", // 使用显示用的字段
 | 
				
			||||||
          align: "center"
 | 
					          align: "center"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -165,20 +174,33 @@ export default {
 | 
				
			||||||
    this.headdenForm({}, "search");
 | 
					    this.headdenForm({}, "search");
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    initPosition() {
 | 
				
			||||||
 | 
					      devPositionList().then((res) => {
 | 
				
			||||||
 | 
					        if (res.code === 0) {
 | 
				
			||||||
 | 
					          this.PositionList = res.data.items;
 | 
				
			||||||
 | 
					          this.formDrawerList.forEach((item) => {
 | 
				
			||||||
 | 
					            if (item.label === "防区") {
 | 
				
			||||||
 | 
					              item.options = res.data.items.map((item) => {
 | 
				
			||||||
 | 
					                item.label = item.name;
 | 
				
			||||||
 | 
					                item.key = item.id;
 | 
				
			||||||
 | 
					                return item;
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    getStatusStyle(value) {
 | 
					    getStatusStyle(value) {
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        color: value == 0 ? "green" : "red"
 | 
					        color: value == 0 ? "green" : "red"
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 最大健康值 默认显示
 | 
					 | 
				
			||||||
    onMountedForm() {
 | 
					    onMountedForm() {
 | 
				
			||||||
      this.$forceUpdate();
 | 
					      this.$forceUpdate();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 关闭抽屉
 | 
					 | 
				
			||||||
    handleClose() {
 | 
					    handleClose() {
 | 
				
			||||||
      this.drawer = false;
 | 
					      this.drawer = false;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 新增 搜索
 | 
					 | 
				
			||||||
    headdenForm(value, type) {
 | 
					    headdenForm(value, type) {
 | 
				
			||||||
      let params = {};
 | 
					      let params = {};
 | 
				
			||||||
      if (type === "add") {
 | 
					      if (type === "add") {
 | 
				
			||||||
| 
						 | 
					@ -188,6 +210,7 @@ export default {
 | 
				
			||||||
        this.formDrawerList[0].disabled = false;
 | 
					        this.formDrawerList[0].disabled = false;
 | 
				
			||||||
        this.formDrawerList[1].disabled = false;
 | 
					        this.formDrawerList[1].disabled = false;
 | 
				
			||||||
        this.formDrawerList[1].show = true;
 | 
					        this.formDrawerList[1].show = true;
 | 
				
			||||||
 | 
					        this.initPosition();
 | 
				
			||||||
        this.drawer = true;
 | 
					        this.drawer = true;
 | 
				
			||||||
      } else if (type === "search") {
 | 
					      } else if (type === "search") {
 | 
				
			||||||
        params = JSON.parse(JSON.stringify(this.$refs.myForm.ruleForm));
 | 
					        params = JSON.parse(JSON.stringify(this.$refs.myForm.ruleForm));
 | 
				
			||||||
| 
						 | 
					@ -195,25 +218,30 @@ export default {
 | 
				
			||||||
        params.pageSize = this.paginationParam.size;
 | 
					        params.pageSize = this.paginationParam.size;
 | 
				
			||||||
        userList(params).then((res) => {
 | 
					        userList(params).then((res) => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            this.tableData = res.data.items.map((item) => {
 | 
					            let items = JSON.parse(JSON.stringify(res.data.items));
 | 
				
			||||||
 | 
					            this.tableData = items.map((item) => {
 | 
				
			||||||
              const { ...rest } = item;
 | 
					              const { ...rest } = item;
 | 
				
			||||||
              return {
 | 
					              return {
 | 
				
			||||||
                ...rest,
 | 
					                ...rest,
 | 
				
			||||||
                isAdmin: item.isAdmin ? "是" : "否"
 | 
					                isAdminDisplay: item.isAdmin ? "是" : "否", // 用于显示
 | 
				
			||||||
 | 
					                isAdmin: item.isAdmin // 保留原始布尔值
 | 
				
			||||||
              };
 | 
					              };
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            this.paginationParam.total = res.data.total;
 | 
					            this.paginationParam.total = res.data.total;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      console.log(value);
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 停用 编辑 删除
 | 
					 | 
				
			||||||
    handleClick(value, type) {
 | 
					    handleClick(value, type) {
 | 
				
			||||||
      if (type === "edit") {
 | 
					      if (type === "edit") {
 | 
				
			||||||
        this.isType = "edit";
 | 
					        this.isType = "edit";
 | 
				
			||||||
        this.title = "编辑人员";
 | 
					        this.title = "编辑人员";
 | 
				
			||||||
        this.fromItem = value;
 | 
					        this.fromItem = JSON.parse(JSON.stringify(value));
 | 
				
			||||||
 | 
					        // 确保 isAdmin 是布尔值
 | 
				
			||||||
 | 
					        console.log(this.fromItem, "value");
 | 
				
			||||||
 | 
					        this.fromItem.isAdmin = value.isAdmin; // 使用原始布尔值
 | 
				
			||||||
 | 
					        this.fromItem.positionId = value.positionId.map((item) => String(item));
 | 
				
			||||||
 | 
					        this.initPosition();
 | 
				
			||||||
        this.formDrawerList[0].disabled = true;
 | 
					        this.formDrawerList[0].disabled = true;
 | 
				
			||||||
        this.formDrawerList[1].disabled = true;
 | 
					        this.formDrawerList[1].disabled = true;
 | 
				
			||||||
        this.formDrawerList[1].show = false;
 | 
					        this.formDrawerList[1].show = false;
 | 
				
			||||||
| 
						 | 
					@ -240,23 +268,17 @@ export default {
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 确定按钮
 | 
					 | 
				
			||||||
    determine(value) {
 | 
					    determine(value) {
 | 
				
			||||||
      let params = {};
 | 
					      let params = JSON.parse(JSON.stringify(value));
 | 
				
			||||||
      params = value;
 | 
					 | 
				
			||||||
      params.isAdmin = JSON.parse(params.isAdmin);
 | 
					 | 
				
			||||||
      console.log(params, "params");
 | 
					      console.log(params, "params");
 | 
				
			||||||
 | 
					      // 确保 isAdmin 是布尔值
 | 
				
			||||||
 | 
					      params.isAdmin = params.isAdmin === true || params.isAdmin === "true";
 | 
				
			||||||
      if (this.isType === "add") {
 | 
					      if (this.isType === "add") {
 | 
				
			||||||
        //   console.log("新增");
 | 
					        userAdd(params).then((res) => {
 | 
				
			||||||
        userAdd(params)
 | 
					 | 
				
			||||||
          .then((res) => {
 | 
					 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            this.$message.success("新增成功");
 | 
					            this.$message.success("新增成功");
 | 
				
			||||||
            this.headdenForm({}, "search");
 | 
					            this.headdenForm({}, "search");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
          .catch((err) => {
 | 
					 | 
				
			||||||
            console.log(err);
 | 
					 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else if (this.isType === "edit") {
 | 
					      } else if (this.isType === "edit") {
 | 
				
			||||||
        userUpdate(params).then((res) => {
 | 
					        userUpdate(params).then((res) => {
 | 
				
			||||||
| 
						 | 
					@ -269,18 +291,17 @@ export default {
 | 
				
			||||||
      this.drawer = false;
 | 
					      this.drawer = false;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSizeChange(value) {
 | 
					    handleSizeChange(value) {
 | 
				
			||||||
      console.log(value);
 | 
					 | 
				
			||||||
      this.paginationParam.size = value;
 | 
					      this.paginationParam.size = value;
 | 
				
			||||||
      this.headdenForm({}, "search");
 | 
					      this.headdenForm({}, "search");
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handlePageChange(value) {
 | 
					    handlePageChange(value) {
 | 
				
			||||||
      console.log(value);
 | 
					 | 
				
			||||||
      this.paginationParam.currentPage = value;
 | 
					      this.paginationParam.currentPage = value;
 | 
				
			||||||
      this.headdenForm({}, "search");
 | 
					      this.headdenForm({}, "search");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
.user {
 | 
					.user {
 | 
				
			||||||
  width: 95%;
 | 
					  width: 95%;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -123,7 +123,7 @@ export default {
 | 
				
			||||||
          model: "address"
 | 
					          model: "address"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "防区",
 | 
					          label: "* 防区",
 | 
				
			||||||
          type: "marsMapmap",
 | 
					          type: "marsMapmap",
 | 
				
			||||||
          model: "polygon"
 | 
					          model: "polygon"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					@ -216,9 +216,9 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 确定按钮
 | 
					    // 确定按钮
 | 
				
			||||||
    determine(value) {
 | 
					    determine(value) {
 | 
				
			||||||
      let params = {};
 | 
					      let params = { ...value };
 | 
				
			||||||
      params = value;
 | 
					 | 
				
			||||||
      console.log(params, "params");
 | 
					      console.log(params, "params");
 | 
				
			||||||
 | 
					      if (params.geoJson.coordinates.length !== 0) {
 | 
				
			||||||
        params.regionJson = JSON.stringify(params.geoJson);
 | 
					        params.regionJson = JSON.stringify(params.geoJson);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        params.lon = params.center[0];
 | 
					        params.lon = params.center[0];
 | 
				
			||||||
| 
						 | 
					@ -234,6 +234,8 @@ export default {
 | 
				
			||||||
                if (res.code === 0) {
 | 
					                if (res.code === 0) {
 | 
				
			||||||
                  this.$message.success("新增成功");
 | 
					                  this.$message.success("新增成功");
 | 
				
			||||||
                  this.headdenForm({}, "search");
 | 
					                  this.headdenForm({}, "search");
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                  this.$message.error(res.msg);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              })
 | 
					              })
 | 
				
			||||||
              .catch((err) => {
 | 
					              .catch((err) => {
 | 
				
			||||||
| 
						 | 
					@ -244,6 +246,8 @@ export default {
 | 
				
			||||||
              if (res.code === 0) {
 | 
					              if (res.code === 0) {
 | 
				
			||||||
                this.$message.success("编辑成功");
 | 
					                this.$message.success("编辑成功");
 | 
				
			||||||
                this.headdenForm({}, "search");
 | 
					                this.headdenForm({}, "search");
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(res.msg);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
| 
						 | 
					@ -251,6 +255,9 @@ export default {
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$message.error("请选择地图上的经纬度");
 | 
					          this.$message.error("请选择地图上的经纬度");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.$message.error("请绘制地图上的防区");
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 新增 搜索
 | 
					    // 新增 搜索
 | 
				
			||||||
    headdenForm(value, type) {
 | 
					    headdenForm(value, type) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,6 +36,9 @@
 | 
				
			||||||
        @changePage="handlePageChange"
 | 
					        @changePage="handlePageChange"
 | 
				
			||||||
        @selectionChange="handleSelectionChange"
 | 
					        @selectionChange="handleSelectionChange"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
 | 
					        <template #whitTime="{ data }">
 | 
				
			||||||
 | 
					          {{ data.createTime }} - {{ data.endTime }}
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
        <template #operate="{ data }">
 | 
					        <template #operate="{ data }">
 | 
				
			||||||
          <el-link
 | 
					          <el-link
 | 
				
			||||||
            type="primary"
 | 
					            type="primary"
 | 
				
			||||||
| 
						 | 
					@ -52,6 +55,9 @@
 | 
				
			||||||
            删除
 | 
					            删除
 | 
				
			||||||
          </el-link>
 | 
					          </el-link>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
 | 
					        <template #mark="{ data }">
 | 
				
			||||||
 | 
					          {{ data.mark }}
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
      </my-table>
 | 
					      </my-table>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <el-drawer
 | 
					    <el-drawer
 | 
				
			||||||
| 
						 | 
					@ -103,34 +109,60 @@ export default {
 | 
				
			||||||
      coloumData: [
 | 
					      coloumData: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: "text",
 | 
					          type: "text",
 | 
				
			||||||
          label: "sn",
 | 
					          label: "型号",
 | 
				
			||||||
          prop: "sn"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "text",
 | 
					 | 
				
			||||||
          label: "是否全天",
 | 
					 | 
				
			||||||
          prop: "allDay"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "text",
 | 
					 | 
				
			||||||
          label: "所属单位",
 | 
					 | 
				
			||||||
          prop: "company"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "text",
 | 
					 | 
				
			||||||
          label: "机型",
 | 
					 | 
				
			||||||
          prop: "model"
 | 
					          prop: "model"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: "text",
 | 
					          type: "text",
 | 
				
			||||||
          label: "备注",
 | 
					          label: "序列号",
 | 
				
			||||||
          prop: "mark"
 | 
					          prop: "sn"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "开放防区",
 | 
				
			||||||
 | 
					          prop: "positionName"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "开始时间",
 | 
				
			||||||
 | 
					          prop: "startTime"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "结束时间",
 | 
				
			||||||
 | 
					          prop: "endTime"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "创建时间",
 | 
				
			||||||
 | 
					          prop: "createTime"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "创建人",
 | 
				
			||||||
 | 
					          prop: "createBy"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "text",
 | 
				
			||||||
 | 
					        //   label: "是否全天",
 | 
				
			||||||
 | 
					        //   prop: "allDay"
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   slot: "whitTime",
 | 
				
			||||||
 | 
					        //   label: "白名单生效的起止日期"
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "text",
 | 
				
			||||||
 | 
					          label: "状态",
 | 
				
			||||||
 | 
					          prop: "status"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          slot: "operate",
 | 
					          slot: "operate",
 | 
				
			||||||
          label: "操作",
 | 
					          label: "操作"
 | 
				
			||||||
          width: 250,
 | 
					        },
 | 
				
			||||||
          fixed: "right"
 | 
					        {
 | 
				
			||||||
 | 
					          slot: "mark",
 | 
				
			||||||
 | 
					          label: "备注"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      paginationParam: {
 | 
					      paginationParam: {
 | 
				
			||||||
| 
						 | 
					@ -152,17 +184,24 @@ export default {
 | 
				
			||||||
          model: "model",
 | 
					          model: "model",
 | 
				
			||||||
          rules: [{ required: true, message: "请输入机型" }]
 | 
					          rules: [{ required: true, message: "请输入机型" }]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   label: "是否全天",
 | 
				
			||||||
 | 
					        //   type: "select",
 | 
				
			||||||
 | 
					        //   model: "allDay",
 | 
				
			||||||
 | 
					        //   options: [
 | 
				
			||||||
 | 
					        //     { label: "是", key: "0" },
 | 
				
			||||||
 | 
					        //     { label: "否", key: "1" }
 | 
				
			||||||
 | 
					        //   ],
 | 
				
			||||||
 | 
					        //   rules: [
 | 
				
			||||||
 | 
					        //     { required: true, message: "请选择是否全天", trigger: "change" }
 | 
				
			||||||
 | 
					        //   ]
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "是否全天",
 | 
					          label: "时间日期",
 | 
				
			||||||
          type: "select",
 | 
					          type: "datetimerange",
 | 
				
			||||||
          model: "allDay",
 | 
					          model: "date",
 | 
				
			||||||
          options: [
 | 
					          format: "yyyy-MM-dd HH:mm:ss",
 | 
				
			||||||
            { label: "是", key: "0" },
 | 
					          rules: [{ required: true, message: "请选择时间日期" }]
 | 
				
			||||||
            { label: "否", key: "1" }
 | 
					 | 
				
			||||||
          ],
 | 
					 | 
				
			||||||
          rules: [
 | 
					 | 
				
			||||||
            { required: true, message: "请选择是否全天", trigger: "change" }
 | 
					 | 
				
			||||||
          ]
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "关联防区",
 | 
					          label: "关联防区",
 | 
				
			||||||
| 
						 | 
					@ -178,7 +217,8 @@ export default {
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "所属单位",
 | 
					          label: "所属单位",
 | 
				
			||||||
          type: "input",
 | 
					          type: "input",
 | 
				
			||||||
          model: "company"
 | 
					          model: "company",
 | 
				
			||||||
 | 
					          rules: [{ required: true, message: "请输入所属单位" }]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: "备注",
 | 
					          label: "备注",
 | 
				
			||||||
| 
						 | 
					@ -187,12 +227,6 @@ export default {
 | 
				
			||||||
          rowsHeight: 15,
 | 
					          rowsHeight: 15,
 | 
				
			||||||
          placeholder: "请输入内容",
 | 
					          placeholder: "请输入内容",
 | 
				
			||||||
          model: "mark"
 | 
					          model: "mark"
 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "时间日期",
 | 
					 | 
				
			||||||
          type: "datetimerange",
 | 
					 | 
				
			||||||
          model: "date",
 | 
					 | 
				
			||||||
          format: "yyyy-MM-dd HH:mm:ss"
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      drawer: false,
 | 
					      drawer: false,
 | 
				
			||||||
| 
						 | 
					@ -254,6 +288,7 @@ export default {
 | 
				
			||||||
      let params = {};
 | 
					      let params = {};
 | 
				
			||||||
      if (type === "search") {
 | 
					      if (type === "search") {
 | 
				
			||||||
        params = JSON.parse(JSON.stringify(this.$refs.myForm.ruleForm));
 | 
					        params = JSON.parse(JSON.stringify(this.$refs.myForm.ruleForm));
 | 
				
			||||||
 | 
					        this.initPosition();
 | 
				
			||||||
        if (params.dateRange) {
 | 
					        if (params.dateRange) {
 | 
				
			||||||
          params.startTime = params.dateRange[0];
 | 
					          params.startTime = params.dateRange[0];
 | 
				
			||||||
          params.endTime = params.dateRange[1];
 | 
					          params.endTime = params.dateRange[1];
 | 
				
			||||||
| 
						 | 
					@ -268,10 +303,46 @@ export default {
 | 
				
			||||||
        whitListList(params).then((res) => {
 | 
					        whitListList(params).then((res) => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            this.tableData = res.data.items.map((item) => {
 | 
					            this.tableData = res.data.items.map((item) => {
 | 
				
			||||||
              return item.allDay
 | 
					              let status = "待生效";
 | 
				
			||||||
                ? { ...item, allDay: "是" }
 | 
					
 | 
				
			||||||
                : { ...item, allDay: "否" };
 | 
					              if (item.allDay) {
 | 
				
			||||||
 | 
					                // 全天候直接生效
 | 
				
			||||||
 | 
					                status = "生效中";
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                const now = new Date();
 | 
				
			||||||
 | 
					                const startTime = item.startTime
 | 
				
			||||||
 | 
					                  ? new Date(item.startTime)
 | 
				
			||||||
 | 
					                  : null;
 | 
				
			||||||
 | 
					                const endTime = item.endTime ? new Date(item.endTime) : null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (startTime && endTime) {
 | 
				
			||||||
 | 
					                  if (now < startTime) {
 | 
				
			||||||
 | 
					                    status = "待生效";
 | 
				
			||||||
 | 
					                  } else if (now >= startTime && now <= endTime) {
 | 
				
			||||||
 | 
					                    status = "生效中";
 | 
				
			||||||
 | 
					                  } else if (now > endTime) {
 | 
				
			||||||
 | 
					                    status = "失效";
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              // 匹配 positionName
 | 
				
			||||||
 | 
					              let matchedNames = [];
 | 
				
			||||||
 | 
					              if (item.positionIds && item.positionIds.length > 0) {
 | 
				
			||||||
 | 
					                matchedNames = this.PositionList.filter((m) =>
 | 
				
			||||||
 | 
					                  item.positionIds.includes(m.id)
 | 
				
			||||||
 | 
					                ).map((m) => m.name);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              return {
 | 
				
			||||||
 | 
					                ...item,
 | 
				
			||||||
 | 
					                allDay: item.allDay ? "是" : "否",
 | 
				
			||||||
 | 
					                status,
 | 
				
			||||||
 | 
					                positionName:
 | 
				
			||||||
 | 
					                  matchedNames.length > 0 ? matchedNames.join("、") : ""
 | 
				
			||||||
 | 
					              };
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.paginationParam.total = res.data.total;
 | 
					            this.paginationParam.total = res.data.total;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
| 
						 | 
					@ -280,7 +351,7 @@ export default {
 | 
				
			||||||
        this.title = "新增白名单";
 | 
					        this.title = "新增白名单";
 | 
				
			||||||
        this.initPosition();
 | 
					        this.initPosition();
 | 
				
			||||||
        this.fromItem = {};
 | 
					        this.fromItem = {};
 | 
				
			||||||
        this.formDrawerList = this.getDefaultFormDrawerList();
 | 
					        // this.formDrawerList = this.getDefaultFormDrawerList();
 | 
				
			||||||
        this.isEditFlag = false;
 | 
					        this.isEditFlag = false;
 | 
				
			||||||
        this.drawer = true;
 | 
					        this.drawer = true;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					@ -297,12 +368,12 @@ export default {
 | 
				
			||||||
      // params.positionName = position ? position.name : "";
 | 
					      // params.positionName = position ? position.name : "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 处理 allDay 和时间
 | 
					      // 处理 allDay 和时间
 | 
				
			||||||
      if (params.allDay === "0") {
 | 
					      // if (params.allDay === "0") {
 | 
				
			||||||
        params.allDay = true;
 | 
					      //   params.allDay = true;
 | 
				
			||||||
        params.startTime = "";
 | 
					      //   params.startTime = "";
 | 
				
			||||||
        params.endTime = "";
 | 
					      //   params.endTime = "";
 | 
				
			||||||
      } else {
 | 
					      // } else {
 | 
				
			||||||
        params.allDay = false;
 | 
					      //   params.allDay = false;
 | 
				
			||||||
      if (Array.isArray(params.date) && params.date.length === 2) {
 | 
					      if (Array.isArray(params.date) && params.date.length === 2) {
 | 
				
			||||||
        params.startTime = params.date[0];
 | 
					        params.startTime = params.date[0];
 | 
				
			||||||
        params.endTime = params.date[1];
 | 
					        params.endTime = params.date[1];
 | 
				
			||||||
| 
						 | 
					@ -310,7 +381,9 @@ export default {
 | 
				
			||||||
        params.startTime = "";
 | 
					        params.startTime = "";
 | 
				
			||||||
        params.endTime = "";
 | 
					        params.endTime = "";
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      }
 | 
					      // }
 | 
				
			||||||
 | 
					      params.allDay = false;
 | 
				
			||||||
 | 
					      params.createBy = localStorage.getItem("userName");
 | 
				
			||||||
      delete params.date; // 移除 date 字段
 | 
					      delete params.date; // 移除 date 字段
 | 
				
			||||||
      const apiCall = this.isType === "add" ? whitListAdd : whitListUpdate;
 | 
					      const apiCall = this.isType === "add" ? whitListAdd : whitListUpdate;
 | 
				
			||||||
      apiCall(params)
 | 
					      apiCall(params)
 | 
				
			||||||
| 
						 | 
					@ -340,11 +413,12 @@ export default {
 | 
				
			||||||
        this.isType = "edit";
 | 
					        this.isType = "edit";
 | 
				
			||||||
        this.title = "编辑白名单";
 | 
					        this.title = "编辑白名单";
 | 
				
			||||||
        this.isEditFlag = false;
 | 
					        this.isEditFlag = false;
 | 
				
			||||||
        this.fromItem = { ...value };
 | 
					        this.fromItem = JSON.parse(JSON.stringify(value));
 | 
				
			||||||
        this.fromItem.positionId = value.positionIds;
 | 
					        this.fromItem.positionId = this.fromItem.positionIds;
 | 
				
			||||||
        this.formDrawerList = this.getDefaultFormDrawerList();
 | 
					        // this.formDrawerList = this.getDefaultFormDrawerList();
 | 
				
			||||||
        value.allDay = value.allDay ? "0" : "1";
 | 
					        // this.fromItem.allDay = this.fromItem.allDay ? "0" : "1";
 | 
				
			||||||
        this.changeSelect(value.allDay); // 根据 allDay 调整时间日期字段
 | 
					        this.fromItem.date = [this.fromItem.startTime, this.fromItem.endTime];
 | 
				
			||||||
 | 
					        // this.changeSelect(this.fromItem.allDay); // 根据 allDay 调整时间日期字段
 | 
				
			||||||
        this.initPosition();
 | 
					        this.initPosition();
 | 
				
			||||||
        this.drawer = true;
 | 
					        this.drawer = true;
 | 
				
			||||||
      } else if (type === "delete") {
 | 
					      } else if (type === "delete") {
 | 
				
			||||||
| 
						 | 
					@ -390,64 +464,6 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSelectionChange(value) {
 | 
					    handleSelectionChange(value) {
 | 
				
			||||||
      console.log(value);
 | 
					      console.log(value);
 | 
				
			||||||
    }, // 初始化 formDrawerList 的公共方法
 | 
					 | 
				
			||||||
    getDefaultFormDrawerList() {
 | 
					 | 
				
			||||||
      return [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "sn",
 | 
					 | 
				
			||||||
          type: "input",
 | 
					 | 
				
			||||||
          model: "sn",
 | 
					 | 
				
			||||||
          rules: [{ required: true, message: "请输入sn" }]
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "机型",
 | 
					 | 
				
			||||||
          type: "input",
 | 
					 | 
				
			||||||
          model: "model",
 | 
					 | 
				
			||||||
          rules: [{ required: true, message: "请输入机型" }]
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "是否全天",
 | 
					 | 
				
			||||||
          type: "select",
 | 
					 | 
				
			||||||
          model: "allDay",
 | 
					 | 
				
			||||||
          options: [
 | 
					 | 
				
			||||||
            { label: "是", key: "0" },
 | 
					 | 
				
			||||||
            { label: "否", key: "1" }
 | 
					 | 
				
			||||||
          ],
 | 
					 | 
				
			||||||
          rules: [
 | 
					 | 
				
			||||||
            { required: true, message: "请选择是否全天", trigger: "change" }
 | 
					 | 
				
			||||||
          ]
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "关联防区",
 | 
					 | 
				
			||||||
          type: "select",
 | 
					 | 
				
			||||||
          model: "positionId",
 | 
					 | 
				
			||||||
          options: [],
 | 
					 | 
				
			||||||
          disabled: false,
 | 
					 | 
				
			||||||
          multiple: true,
 | 
					 | 
				
			||||||
          rules: [
 | 
					 | 
				
			||||||
            { required: true, message: "请选择关联防区", trigger: "change" }
 | 
					 | 
				
			||||||
          ]
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "所属单位",
 | 
					 | 
				
			||||||
          type: "input",
 | 
					 | 
				
			||||||
          model: "company"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "备注",
 | 
					 | 
				
			||||||
          type: "textarea",
 | 
					 | 
				
			||||||
          maxLenght: 100,
 | 
					 | 
				
			||||||
          rowsHeight: 15,
 | 
					 | 
				
			||||||
          placeholder: "请输入内容",
 | 
					 | 
				
			||||||
          model: "mark"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: "时间日期",
 | 
					 | 
				
			||||||
          type: "datetimerange",
 | 
					 | 
				
			||||||
          model: "date",
 | 
					 | 
				
			||||||
          format: "yyyy-MM-dd HH:mm:ss"
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      ];
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue