高德地图——轨迹回放和电子围栏

news2024/9/22 21:28:00

image.png

功能点

  • 地图的初始化
  • 显示电子围栏(先初始化在调接口显示电子围栏)
  • 显示定位
  • 显示轨迹
  • 轨迹回放 (回放速度无法控制是因为高德地图的版本问题,不要设置版本,使用默认的即可生效)
  • 获取当前城市及天气情况
  • 设置地图样式
  • 坐标拾取器

重点

  • 默认当前城市

1710834347993.png

  • 地图加载完成的生命周期
 this.map.on('complete', () => {})
  • 清除地图上所有图形(若不想清除电子围栏,可以全部清除后重新显示电子围栏)
this.map.clearMap();
  • 自动适配到合适视野范围(无参数,默认包括所有覆盖物的情况)
this.map.setFitView();
  • 设置地图中心点
  • 下拉框和时间选择框样式的修改

image.png

image.png

this.map.setCenter([point.longitude, point.latitude]); 
<template>
  <div class="w100 h100 white relative">
    <!-- 地图区域 -->
    <div id="container" class="w100 h100"></div>
    <!-- 搜索框 -->
    <div class="absolute" style="left: .2rem; top: .5rem;z-index: 9; ">
      <div class="bg-com white pdRem-20 sizeRem-30">
        <div class="bold w100">
          <div class="item pdRem-20">正在监测人员:共{{ olderArr.length }}</div>
          <div class="item pdRem-20">
            护理院
            <el-select v-model="info.orgId" class="w100 mtRem-20" @change="changeOrgId" :popper-append-to-body="false"
              :teleported="false">
              <el-option v-for="item in roomArr" :key="item.id" :label="item.label" :value="item.id"></el-option>
            </el-select>
          </div>
          <div class="item pdRem-20">
            老人姓名
            <el-select v-model="info.syncUserId" class="w100 mtRem-20" filterable :filter-method="remoteMethod"
              :popper-append-to-body="false" :teleported="false">
              <el-option v-for="item in olderArr" :key="item.syncUserId" :label="item.userName"
                :value="item.syncUserId"></el-option>
            </el-select>
          </div>
          <div class="item pdRem-20">
            <div class="mbRem-20">开始时间</div>
            <el-date-picker v-model="info.dateRange" @change="handleDateRange" style="width: 100%;" type="datetimerange"
              range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" align="right"
              popper-class="popperClass-my" class="picker" :popper-append-to-body="false">
            </el-date-picker>
          </div>
          <div class="item pdRem-20">
            <el-tag class="btn-time" @click="getTime(0)">当天</el-tag>
            <el-tag class="btn-time mlrRem-20" @click="getTime(3)">3</el-tag>
            <el-tag class="btn-time" @click="getTime(7)">7</el-tag>
          </div>
        </div>
        <!-- 按钮 -->
        <div class="center mtRem-80">
          <el-button size="medium" class="block btn-bg" @click="submit(1)">实时定位</el-button>
          <el-button size="medium" class="block mlRem-40 btn-bg" @click="submit(2)">轨迹回放</el-button>
        </div>
      </div>
    </div>
    <!-- 告警 -->
    <div class="absolute" style="right: 1.5rem; top: .5rem;z-index: 9; ">
      <div v-for="(alarmInfo, index) in alarmList" :key="index" class="item-bg pdRem-30 sizeRem-26">
        <div class="flex_r"><el-tag type="warning" effect="dark" size="mini">{{ alarmInfo.alarmLevelName }}</el-tag>
        </div>
        <div class="flex1">
          <div style="width: 90%;">
            <div class="">{{ alarmInfo.alarmContent }}</div>
          </div>
          <div style="width:10%">
            <img :src="require('./components/img/alarm-icon.png')" alt="" style="width:0.4rem;height: 0.4rem;">
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { selectCompanyList, userInfoList, fenceList, userLocation, trajectory } from './components/js/api'

import AMapLoader from '@amap/amap-jsapi-loader';
import redIcon from "./components/img/point-red1.png";
import originIcon from "./components/img/origin.png";
import endIcon from "./components/img/end.png";
import olderManIcon from "./components/img/olderMan.png";
window._AMapSecurityConfig = {
  securityJsCode: "bc0077d71423eedb1d25df186610f740",
};
export default {
  props: ['alarmList'], //告警列表
  data() {
    return {
      isOrgId: true, //true是卫健委账号  fase机构账号
      map: null,
      trackLineArr: [],
      fenceArr: [], //电子围栏数据
      // 搜索框
      num: 0,
      info: {
        orgId: '',
        syncUserId: '',
        dateRange: [],
      },
      roomArr: [],//护理院-下拉
      olderArr: [],//老人-下拉
      olderArrCopy: [],//老人-下拉
    }
  },
  watch: {
    "info.dateRange"(newVal) {
      if (newVal == null) {
        this.info.dateRange = [];
      }
    },
  },

  mounted() {
    console.log('mounted', 33333333333)
    this.isOrgId = localStorage.getItem("isOrgId") == 'true' ? true : false;
    this.initAMap();
  },
  beforeDestroy() {
    this.map.destroy();
  },
  methods: {
    // 机构改变
    changeOrgId() {
      console.log('changeOrgId', this.info.orgId)

      // 老人下拉
      userInfoList({
        orgId: this.info.orgId
      }).then(res => {
        this.olderArr = res.data;
        this.olderArrCopy = res.data;
        this.$set(this.info, 'syncUserId', res.data.length ? res.data[0].syncUserId : '')
      })
      // 电子围栏
      fenceList({
        orgId: this.info.orgId
      }).then(res => {
        console.log('电子围栏', res.rows)
        this.fenceArr = res.rows;
        this.getFenceInfoList(res.rows)
      })
    },
    remoteMethod(query) {
      if (query) {
        console.log('query', query)
        this.olderArr = this.olderArrCopy.filter(item => {
          console.log(item.userNamePingYin.includes(query), '999', item.userNamePingYin);
          return item.userNamePingYin.toLowerCase().includes(query.toLowerCase()) || item.userName.includes(query);
        });
      } else {
        this.olderArr = this.olderArrCopy;
      }
    },
    formatDate(date) {
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      const hours = String(date.getHours()).padStart(2, '0');
      const minutes = String(date.getMinutes()).padStart(2, '0');
      const seconds = String(date.getSeconds()).padStart(2, '0');
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
    getTime(day) {
      this.info.dateRange = ['', '']
      const now = new Date();
      const startOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate())
      this.info.dateRange[1] = now;
      this.info.dateRange[0] = day == 0 ? startOfDay : new Date(now.getTime() - day * 24 * 60 * 60 * 1000);
    },
    // 时间段筛选
    handleDateRange() {
      if (this.info.dateRange) {
        const minDate = new Date(this.info.dateRange[0]).getTime();
        const maxDate = new Date(this.info.dateRange[1]).getTime();
        if (maxDate - minDate > 7 * 24 * 60 * 60 * 1000) {
          this.msgError("选择的时间范围不能超过7天");
          // 清空日期范围选择器
          this.info.dateRange = [];
        }
      } else {
        this.info.dateRange = [];
      }
    },
    submit(type) {
      //1实时定位 2轨迹回放
      console.log(type, this.info, 999);
      if (type == 1) {
        if (!this.info.syncUserId) {
          this.msgError('请选择老人');
        } else {
          userLocation({
            syncUserId: this.info.syncUserId,
          }).then(res => {
            this.createMarker(res.data)
          })
        }
      } else {
        if (!this.info.syncUserId) {
          this.msgError('请选择老人');
        } else if (this.info.dateRange.length == 0) {
          this.msgError('请选择时间');
        } else {
          trajectory({
            syncUserId: this.info.syncUserId,
            startTime: this.formatDate(this.info.dateRange[0]),
            endTime: this.formatDate(this.info.dateRange[1]),
          }).then(res => {
            if (res.data.length == 0) {
              this.msgError('未查询到轨迹数据');
            } else {
              this.handleTrack(2, res)
              // setTimeout(() => {
              //   this.handleTrack(2, res)
              // }, 2000)
            }
          })
        }
      }
    },

    // 地图
    initAMap() {
      AMapLoader.load({
        key: "d3e34dd987d36d98958ea35f97303089", // 申请好的Web端开发者Key,首次调用 load 时必填
        // version: "v1.4.15", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
        plugins: ["AMap.ControlBar",
          "AMap.ToolBar",
          'AMap.Weather',
          'AMap.CitySearch',
          'AMap.Marker',

          "AMap.MouseTool",
          "AMap.PolyEditor",
          "AMap.Driving",
          "AMap.Polyline",
          "AMap.Geolocation",
          "AMap.GraspRoad",
          "AMap.Geocoder",
          "AMap.GeometryUtil.ringArea",
          "AMap.DistrictSearch",
          "AMap.MoveAnimation",
        ], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
      })
        .then((AMap) => {
          this.map = new AMap.Map("container", {
            // 设置地图容器id
            rotateEnable: true,
            pitchEnable: true,
            zoom: 17,
            pitch: 50,
            rotation: -15,
            viewMode: '3D', //开启3D视图,默认为关闭
            zooms: [2, 20],
            center: [116.930096, 34.758164],
            mapStyle: "amap://styles/blue", //设置地图的显示样式
          });

          // 工具条
          var controlBar = new AMap.ControlBar({
            position: {
              right: '10px',
              top: '10px'
            }
          });
          this.map.addControl(controlBar)

          // var toolBar = new AMap.ToolBar({
          //   position: {
          //     right: '40px',
          //     top: '110px'
          //   }
          // });
          // this.map.addControl(toolBar)

          this.map.on('complete', () => {
            let idObj = JSON.parse(localStorage.getItem('formJx'))
            // 机构下拉
            selectCompanyList({
              orgId: this.isOrgId ? '-1' : idObj.orgId,
              groupId: idObj.groupId,
            }).then(res => {
              this.roomArr = res.data;
              this.$set(this.info, 'orgId', res.data[0].id)
              this.changeOrgId()
            })
          })
        })
        .catch((e) => {
          console.log(e);
        });
    },
    // 获取当前定位城市——获取天气
    getWeather() {
      const city = new AMap.CitySearch()
      city.getLocalCity((status, result) => {
        if (status === 'complete' && result.info === 'OK') {
          console.log('当前城市:', result.city);
          // 天气
          // 创建天气实例
          const weather = new AMap.Weather();
          // 获取指定城市(例如:北京)的实时天气
          weather.getLive(result.city, (error, data) => {
            if (error) {
              console.error('获取天气失败:', error);
            } else {
              console.log('实时天气数据:', data, `天气${data.weather} 温度${data.temperature}℃ 风向${data.windDirection}`);
              this.$emit('getWeather', `天气${data.weather} 温度${data.temperature}℃ 风向${data.windDirection}`)
              // 数据结构中通常包含如下信息
              // data.city: 城市名称
              // data.weather: 天气状况描述
              // data.temperature: 温度
              // data.windDirection: 风向
              // data.windPower: 风力等级等其他气象参数
            }
          });
        } else {
          console.error('获取当前城市失败:', result.info);
        }
      });
    },

    // 创建两个点标记
    createMarker(arr = []) {
      if (arr.length != 0) {
        // 清除地图上所有图形
        this.map.clearMap();
        this.getFenceInfoList(this.fenceArr)
        arr.map((item) => {
          var marker = new AMap.Marker({
            position: new AMap.LngLat(item.longitude, item.latitude),
            icon: new AMap.Icon({
              image: redIcon,
              imageSize: new AMap.Size(28, 28),
            }),
            // offset: new AMap.Pixel(-13, -30),
            // label: {
            //   content: "<div class='infos'>张三</div>",
            //   direction: 'bottom' //文本标注方位 可选值:'top'|'right'|'bottom'|'left'|'center',默认值: 'right'
            // }
          });
          this.map.add(marker);
        });
        //自动适配到合适视野范围
        //无参数,默认包括所有覆盖物的情况
        this.map.setFitView();
      } else {
        this.msgError('未有相关定位消息');
      }
    },
    //获取接口返回的电子围栏数据
    getFenceInfoList(arr = []) {
      if (arr.length == 0) {
        // 清除地图上所有图形
        this.map.clearMap();
        // 使用 setCenter 方法将地图中心移动到新的位置
        let point = this.roomArr.filter(item => item.id == this.info.orgId)[0]
        console.log(point, this.roomArr, 99999999999)
        // 设置地图中心点
        this.map.setCenter([point.longitude, point.latitude]);
        return;
      }
      let arr1 = [];
      for (let i = 0; i < arr.length; i++) {
        if (arr[i].fenceType == 0) {
          if (arr[i].useFence) {
            arr1.push({
              radius: arr[i].radius,
              center: arr[i].point,
              fillColor: "#16d46b",
              fillOpacity: 0.35,
              strokeColor: "#16d46b",
              strokeOpacity: 0.8,
              strokeStyle: "solid",
              zIndex: 10,
            });
          } else {
            arr1.push({
              radius: arr[i].radius,
              center: arr[i].point,
              fillColor: "#1791fc",
              fillOpacity: 0.5,
              strokeStyle: "solid",
              strokeColor: "#FF33FF",
              strokeOpacity: 0.8,
              zIndex: 10,
            });
          }
        } else if (arr[i].fenceType == 1) {
          if (arr[i].useFence) {
            arr1.push({
              path: arr[i].optimal,
              fillColor: "#16d46b",
              fillOpacity: 0.35,
              strokeColor: "#16d46b",
              strokeOpacity: 0.8,
              strokeStyle: "solid",
              zIndex: 10,
            });
          } else {
            arr1.push({
              path: arr[i].optimal,
              fillColor: "#1791fc",
              fillOpacity: 0.5,
              strokeColor: "#FF33FF",
              strokeOpacity: 0.8,
              strokeStyle: "solid",
              zIndex: 10,
            });
          }
        } else {
          for (let j = 0; j < arr[i].optimal.length; j++) {
            if (arr[i].useFence) {
              arr1.push({
                path: arr[i].optimal[j],
                fillColor: "#16d46b",
                fillOpacity: 0.35,
                strokeColor: "#16d46b",
                strokeOpacity: 0.8,
                strokeStyle: "solid",
                zIndex: 10,
              });
            } else {
              arr1.push({
                path: arr[i].optimal[j],
                fillColor: "#1791fc",
                fillOpacity: 0.5,
                strokeColor: "#FF33FF",
                strokeOpacity: 0.8,
                strokeStyle: "solid",
                zIndex: 10,
              });
            }
          }
        }
      }
      this.handleDrawPolygon(arr1);
    },
    // 获取接口返回的绘制图形
    handleDrawPolygon(data) {
      for (let i = 0; i < data.length; i++) {
        let polygon = null;
        if (data[i].radius) {
          polygon = new AMap.Circle(data[i]);
        } else {
          polygon = new AMap.Polygon(data[i]);
        }
        this.map.add(polygon);
        // 定位到绘制图形的位置
        this.map.setFitView();
      }
    },

    // type 1查询轨迹 2轨迹播放
    handleTrack(type, res) {
      // 清除地图上所有图形
      this.map.clearMap();
      this.getFenceInfoList(this.fenceArr)
      this.trackLineArr = res.data.map(item => {
        return {
          x: parseFloat(item.longitude),
          y: parseFloat(item.latitude),
          createTime: item.createTime,
          address: item.address,
          sp: 0,
          ag: 0,
          tm: 6
        }
      });
      // console.log(444, '接口获取的数据', this.trackLineArr)
      let lineArr = res.data.map(item => [item.longitude, item.latitude])
      this.handleGraspRoad(lineArr, type)
    },
    // 轨迹纠偏(因为最多只能纠偏500个点,所以只能采用循环方式进行处理)
    handleGraspRoad(graspArr, type) {
      // 起点
      let marker1 = null;
      marker1 = new AMap.Marker({
        map: this.map,
        position: graspArr[0],
        icon: new AMap.Icon({
          image: originIcon,
          size: new AMap.Size(48, 48), //图标大小
          imageSize: new AMap.Size(32, 32),
        }),
        offset: new AMap.Pixel(-13, -26),
      });
      marker1.setMap(this.map);
      // 终点
      let marker2 = null;
      marker2 = new AMap.Marker({
        map: this.map,
        position: graspArr[graspArr.length - 1],
        icon: new AMap.Icon({
          image: endIcon,
          size: new AMap.Size(48, 48), //图标大小
          imageSize: new AMap.Size(32, 32),
        }),
        offset: new AMap.Pixel(-13, -26),
      });
      // 定位到指定位置
      this.map.setFitView();
      marker2.setMap(this.map);


      //查询轨迹
      if (type == 1) {
        console.log(666, '轨迹的坐标点', graspArr)
        // 绘制轨迹(轨迹纠偏)
        const polyline = new AMap.Polyline({
          map: this.map,
          path: graspArr,
          showDir: true,
          strokeColor: "red", //线颜色
          // strokeOpacity: 1,     //线透明度
          strokeWeight: 6, //线宽
        });
      } else {
        //轨迹播放
        var markerSign = new AMap.Marker({
          map: this.map,
          position: graspArr[0],
          icon: new AMap.Icon({
            image: olderManIcon,
            size: new AMap.Size(48, 48), //图标大小
            imageSize: new AMap.Size(44, 44),
          }),
          // icon: "https://webapi.amap.com/images/car.png",
          offset: new AMap.Pixel(-13, -26),
          autoRotation: true,
          angle: -90,
        });
        // 绘制轨迹(轨迹纠偏)
        const polyline = new AMap.Polyline({
          map: this.map,
          path: graspArr,
          showDir: true,
          strokeColor: "#28F", //线颜色
          strokeOpacity: 1,     //线透明度
          strokeWeight: 6, //线宽
        });
        // 轨迹路线样式
        const passedPolyline = new AMap.Polyline({
          map: this.map,
          strokeColor: "#68d068", //线颜色
          strokeOpacity: 1,     //线透明度
          strokeWeight: 6, //线宽
          strokeStyle: "solid"  //线样式
        });


        markerSign.on("moving", function (e) {
          passedPolyline.setPath(e.passedPath);
          // this.map.setCenter(e.target.getPosition(), true);
        });
        this.map.setFitView();
        setTimeout(() => {
          markerSign.moveAlong(graspArr, 300);
        }, 1000);

        // markerSign.moveAlong(graspArr, {
        //   // 每一段的时长
        //   duration: 200, //可根据实际采集时间间隔设置
        //   // JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
        //   // autoRotation: true,
        // });
      }
    },

  },
}
</script>
<style lang="scss">
// 修改时间选择框的样式,不能加scoped
.popperClass-my {

  border: 1px solid #66729b;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;

  .el-date-range-picker__content.is-left,
  .el-picker-panel__content .el-date-range-picker__content .is-left,
  .el-picker-panel__content .el-date-range-picker__content .is-right,
  .el-date-range-picker__time-header,
  .el-date-range-picker__time-picker-wrap,
  .el-input__inner,
  .el-picker-panel__footer,
  .el-time-panel .el-popper,
  .el-button,
  .el-time-spinner,
  .el-time-spinner__item,
  .el-time-panel .el-popper {
    border: 0;
  }

  .el-time-spinner,

  .el-picker-panel__footer,
  .el-time-spinner__item {
    background: rgba(0, 0, 0, 0.7);
    // border: 0;
    // color: white;
  }

  .is-disabled .el-input__inner {
    background: rgba(0, 20, 38, 1);
    color: white;
  }

  .el-input__inner {
    background: rgba(0, 20, 38, 1);
    color: white;
    // 点日期-时间框

  }

  .el-time-panel__footer {
    background: rgba(0, 20, 38, 1);
    border: 0;
  }

  ul.el-scrollbar_view.el-time-spinner_list::before {
    background: rgba(0, 20, 38, 1);

  }

  // 选中日期
  .available.in-range div {
    background-color: black;
    color: white;
  }

  .available.in-range div:hover {
    background-color: black;
    color: white;
  }


  .el-button,
  .el-button.is-plain:hover {
    color: white;
    background: rgba(0, 20, 38, 1);
    border: 0;
  }


  .el-time-spinner__item:hover:not(.disabled) {
    //二级下拉框
    background: rgba(0, 0, 0, 0.7);
    font-size: medium;
    color: white;
  }

}
</style>


<style scoped lang="scss">
@import "./components/css/rem.scss";

// 下拉框样式的修改
::v-deep .el-input,
::v-deep .el-input__inner,
::v-deep .btn-bg,
::v-deep .el-range-editor--medium .el-range-input {
  background: url("./components/img/search1.png") no-repeat center center;
  background-size: 100% 100%;
  color: #fff;
  border: 0px;
  text-align: center;
}

::v-deep .el-select-dropdown,
::v-deep .popperClass .el-date-picker .el-range-input {
  border: 0;
  background-image: url("./components/img/search-bg.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;

  .el-select-dropdown__item {
    color: #fff;
  }
}

.btn-time {
  background: url("./components/img/search1.png") no-repeat center center;
  background-size: 100% 100%;
  color: white;
  border: 0;
}

.picker .el-date-range-picker {
  background-color: transparent !important;
  //   border: 0;
  // background-image: url("./components/img/search-bg.png");
  // background-position: center;
  // background-repeat: no-repeat;
  // background-size: 100% 100%;

}



::v-deep .amap-marker-label {
  background-color: transparent !important;

  color: #ffcd09;
  border: 0px solid #00f;
  white-space: nowrap;
  font-size: 16px;
  transform: translateX(-50%);
  font-weight: 700;
}

.bg-com {
  width: 18vw;
  padding: .375rem;
  background: url('./components/img/bg-2.png') no-repeat center center;
  background-size: 100% 100%;

  z-index: 10;

  .item {
    max-width: 26vw;
  }
}

.item-bg {
  width: 4.125rem;
  background: url('./components/img/alarm-bg.png') no-repeat center center;
  background-size: 100% 100%;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1536646.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【机器学习300问】43、回归模型预测效果明明很好,为什么均方根误差很大?

一、案例描述 假设我们正在构建一个房地产价格预测模型&#xff0c;目标是预测某个城市各类住宅的售价。模型基于大量房屋的各种特征&#xff08;如面积、地段、房龄、楼层等&#xff09;进行训练。 回归模型在大部分情况下对于住宅价格预测非常精准&#xff0c;用户反…

Deep Graph Representation Learning and Optimization for Influence Maximization

Abstract 影响力最大化&#xff08;IM&#xff09;被表述为从社交网络中选择一组初始用户&#xff0c;以最大化受影响用户的预期数量。研究人员在设计各种传统方法方面取得了巨大进展&#xff0c;其理论设计和性能增益已接近极限。在过去的几年里&#xff0c;基于学习的IM方法的…

面试算法-81-旋转链表

题目 给你一个链表的头节点 head &#xff0c;旋转链表&#xff0c;将链表每个节点向右移动 k 个位置。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5], k 2 输出&#xff1a;[4,5,1,2,3] 解 class Solution {public ListNode rotateRight(ListNode head, int …

语音神经科学—05. Human cortical encoding of pitch in tonal and non-tonal languages

Human cortical encoding of pitch in tonal and non-tonal languages&#xff08;在音调语音和非音调语言中人类大脑皮层的音高编码&#xff09; 专业术语 tonal language 音调语言 pitch 音高 lexical tone 词汇音调 anatomical properties 解刨学特性 temporal lobe 颞叶 s…

【蓝桥杯】第15届蓝桥杯青少组stema选拔赛C++中高级真题答案(20240310)

一、选择题 第 1 题 第 2 题 表达式1000/3的结果是( A )。 A.333 B.333.3 C.334 D.333.0 第 3 题 下列选项中&#xff0c;判断a等于1并且b等于1正确的表达式是( B )。 A.!((a!1)&&(b!1)) B.!((a!1)||(b!1)) C.!(a1)&&(b1) D.(a1)&&(b1) 【解析】 A…

论文笔记:Contrastive Multi-Modal Knowledge GraphRepresentation Learning

论文来源&#xff1a;IEEE Transactions on Knowledge and Data Engineering 2023 论文地址&#xff1a;Contrastive Multi-Modal Knowledge Graph Representation Learning | IEEE Journals & Magazine | IEEE Xplorehttps://ieeexplore.ieee.org/abstract/document/9942…

上海晋名室外暂存柜助力新技术皮革制品生产行业安全

本周上海晋名又有一台室外危化品暂存柜项目通过验收&#xff0c;此次项目主要用于新技术皮革制品生产行业油桶、化学品等物资的室外暂存安全。 用户单位创立于2004年&#xff0c;是一家从事新技术皮革制品加工、生产的外资企业。 上海晋名作为一家专注工业安全防护领域&#…

mysql索引(explain 执行计划)

关键词 执行计划 EXPLAIN 语句查看mysql 优化后的语句 show warnings;EXPLAIN 执行后&#xff0c;各列的含义 要点&#xff1a; select_type 如何查询 表type 如何查询 行key 如何使用 索引key_len 索引 使用多少rows 行 预计使用多少extra 表 的额外信息 1.id id列的编…

20240316-1-向量化搜索

向量化搜索 在高维空间内快速搜索最近邻&#xff08;Approximate Nearest Neighbor&#xff09;。召回中&#xff0c;Embedding向量的搜索。 FAISS、kd-tree、局部敏感哈希、【Amnoy、HNSW】 FAISS faiss是Facebook的AI团队开源的一套用于做聚类或者相似性搜索的软件库&…

【JSON2WEB】10 基于 Amis 做个登录页面login.html

【JSON2WEB】01 WEB管理信息系统架构设计 【JSON2WEB】02 JSON2WEB初步UI设计 【JSON2WEB】03 go的模板包html/template的使用 【JSON2WEB】04 amis低代码前端框架介绍 【JSON2WEB】05 前端开发三件套 HTML CSS JavaScript 速成 【JSON2WEB】06 JSON2WEB前端框架搭建 【J…

linux系统----------MySQL索引浅探索

目录 一、数据库索引介绍 二、索引的作用 索引的副作用 (缺点) 三、创建索引的原则依据 四、索引的分类和创建 4.1普通索引 4.1.1直接创建索引 4.1.2修改表方式创建 4.1.3创建表的时候指定索引 4.2唯一索引 4.2.1直接创建唯一索引 4.2.2修改表方式创建 4.2.3创建表…

Linux——du, df命令查看磁盘空间使用情况

一、实现原理&#xff1a; df 命令的全称是Disk Free &#xff0c;显而易见它是统计磁盘中空闲的空间&#xff0c;也即空闲的磁盘块数。它是通过文件系统磁盘块分配图进行计算出的。 du 命令的全称是 Disk Used &#xff0c;统计磁盘有已经使用的空间。它是直接统计各文件各目…

Qt QGraphicsView移动、缩放

原链接 首先需要明白&#xff0c;view在整个视图框架中的角色是用于显示scene的&#xff0c;所以决定了如何展示scene&#xff0c;包括scale()函数&#xff0c;用于放大缩小所展示的scene&#xff1b;centerOn()函数&#xff0c;决定scene的中心在何方。所有的操作&#xff0c…

移动app测试的好处简析,有必要选择第三方软件测试机构吗?

移动app测试是指对移动应用程序进行全面、系统和深入的检查和验证&#xff0c;以确保其功能、性能和稳定性达到预期要求。在移动应用市场日益竞争激烈的今天&#xff0c;进行移动app测试是至关重要的。 一、移动app测试的好处&#xff1a;   1、具有确保应用质量的作用。通过…

集简云新增“AI图像生成与识别”功能:实现智能图像识别与理解场景

自OpenAI发布GPT-4V以来&#xff0c;也掀起了各大企业对于多模态大模型的研究热潮。和以往的生图模型相比&#xff0c;多模态模型已突破文本限制&#xff0c;图像理解和识别能力尤为突出。 本周&#xff0c;集简云上线AI图像识别与问答功能&#xff0c;集成OpenAI和Anthropic两…

复制浏览器请求到Postman

目录 1.复制链接 2.导入到Postman 1.复制链接 F12打开开发者模式 2.导入到Postman 如上图所示&#xff0c;参数及cookie等信息都被导入进来。

VUE自己项目做的时候遇到的疑惑问题

晚上还在疑惑为什么下面还有一个一模一样的 早上起来&#xff0c;神清气爽&#xff0c;想了一下。原来是我用了两个路由出口

C语言复杂度(个人笔记)

时间复杂度主要衡量一个算法的运行快慢. 空间复杂度主要衡量一个算法运行所需要的额外空间. 时间复杂度 算法中的基本操作的执行次数&#xff0c;为算法的时间复杂度. 只需要大概执行次数&#xff0c;我们使用大O的渐进表示法。(看谁对数学表达式的影响最大) 空间复杂度 是…

学习C++是否有必要学习Boost库?

C作为一门强大且灵活的编程语言&#xff0c;在软件开发领域有着广泛的应用。而在C的学习过程中&#xff0c;Boost库是一个经常被提及的重要资源。那么&#xff0c;对于C的学习者而言&#xff0c;是否有必要投入精力去学习Boost库呢&#xff1f;本文将就此问题展开详尽讨论。 一…

LVGL:拓展部件——键盘 lv_keyboard

一、概述 此控件特点&#xff1a; 特殊Button矩阵&#xff1a;lv_keyboard 本质上是一个经过定制的按钮矩阵控件。每个按钮都可以独立触发事件或响应。预定义的键映射&#xff1a;lv_keyboard 自带了一套预设的按键布局和对应的字符映射表&#xff0c;开发者可以根据需要选择…