heyujie
2021-07-07 6767862ab5981408ed7a2b2d74bb5d8ead561eee
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
@@ -130,6 +130,7 @@
                </div>
                <div
                  class="self-dot"
                  :class="getColor(item.text)"
                  :style="{
                    left: (item.offset / maxSecond) * 100 + '%',
                  }"
@@ -594,6 +595,18 @@
        _this.labelOptions = res.data;
      });
    },
    getColor(text){
      if (text.indexOf('进出站')>-1) {
        return 'yellow'
      }
      if (text.indexOf('信号机')>-1) {
        return 'purple'
      }
      if (text.indexOf('过分相')>-1) {
        return 'blue'
      }
      return ''
    },
    refreshCurVideoLabel(video) {
      let arr = [video]
      this.videoArrs = arr.concat(this.allCurVideos.filter(v => {
@@ -649,9 +662,13 @@
    submitLabelChecked() {
      let _this = this;
      let tempArr = [];
      let isAdd  = false
      tempArr = this.videoArrs.map((video) => video.id);
      let desc = this.labelCheckedList.map((lableId) => {
        for (let label of this.labelOptions) {
          if (label.Name=='未手比') {
            isAdd=true
          }
          if (label.ID == lableId) {
            return label.Name;
          }
@@ -684,6 +701,11 @@
          // 标注
          _this.setMarks(_this.curVideo);
          _this.$parent.$parent.filterSearchData();
          if (isAdd) {
            let num = sessionStorage.getItem("shoubiNum")
          sessionStorage.setItem("shoubiNum", num?+num+1:1 )
          }
        } else {
          _this.$message.warning(rsp.msg);
        }
@@ -873,6 +895,18 @@
              -webkit-transform: translateX(-50%);
              transform: translateX(-50%);
            }
            .yellow{
              background-color: yellow;
            }
            .purple{
              background-color: purple;
            }
            .blue{
              background-color: blue;
            }
            .label-dot {
              position: absolute;
              height: 8px;