hanbaoshan
2020-10-13 1fbade862552c9387809f7e50dd75d6b019086f1
src/pages/cameraAccess/components/SeparateRules.vue
@@ -144,7 +144,7 @@
                ></polygon-canvas>
              </template>
              <template v-else>
                <div style="width:100%" v-loading='getStackFileLoading'>
                <div style="width:100%" v-loading="getStackFileLoading">
                  <swiper
                    ref="swiper"
                    :auto-update="true"
@@ -182,12 +182,20 @@
                      </div>
                    </swiper-slide>
                  </swiper>
                  <div class="swiper-local-prev" v-show="swipercanvasData.length>1" @click="prevClick">
                  <div
                    class="swiper-local-prev"
                    v-show="swipercanvasData.length>1"
                    @click="prevClick"
                  >
                    <div class="icon-btn" slot="button-prev">
                      <i class="iconfont iconzuo"></i>
                    </div>
                  </div>
                  <div class="swiper-local-next" v-show="swipercanvasData.length>1" @click="nextClick">
                  <div
                    class="swiper-local-next"
                    v-show="swipercanvasData.length>1"
                    @click="nextClick"
                  >
                    <div class="icon-btn" slot="button-next">
                      <i class="iconfont iconyou1"></i>
                    </div>
@@ -327,6 +335,7 @@
            this.stackFilesSize = 5;
            this.stackId = n;
            if(this.stackId){
              console.log('getStackFiles')
              this.swipercanvasData = [];
              this.getStackFiles()
            }
@@ -366,6 +375,7 @@
    },
    getStackFiles () {
      this.getStackFileLoading = true;
      let _this = this;
      findAllFileByStackId({ name: '', stackId: this.stackId, page: this.stackFilesPage, size: this.stackFilesSize, type: 0 }).then(res => {
        if (res && res.success ) {
          if(res.data.dataList.length > 0){
@@ -374,12 +384,14 @@
              return {
                name: item.name,
                stackId: item.stack_id,
                baseImg: item.type == 2 ? `/files/${item.identifier}.jpg` : item.snapshot_url,
                baseImg: item.type == 2 ? `/files/${item.path.substr(item.path.lastIndexOf('/') + 1)}` : item.snapshot_url,
                type: item.type,
                id: item.id,
                loading: false
              }
            });
            console.log(_this.swipercanvasData)
            console.log(this.swipercanvasData)
            this.swiperIndex = 0;
            this.$refs.swiper.swiper.activeIndex = 0;
            
@@ -454,7 +466,7 @@
        this.loading = false;
        this.Camera.cameraId = id;
        await this.Camera.update();
        debugger
      }
      this.$refs.timeSlider.activeTab = this.VideoManageData.TimeRules[0].id;
@@ -480,7 +492,7 @@
            message: "策略保存成功!"
          });
          //刷新左侧树
          debugger
          _this.$root.$children[0].$children[0].querySearchAsync('camera')
        }