| | |
| | | this.stackFilesSize = 5; |
| | | this.stackId = n; |
| | | if (this.stackId) { |
| | | console.log('getStackFiles') |
| | | // console.log('getStackFiles') |
| | | this.swipercanvasData = []; |
| | | this.getStackFiles() |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | prevClick () { |
| | | console.log(this.swiperIndex) |
| | | console.log(this.$refs.swiper.swiper.activeIndex) |
| | | // console.log(this.swiperIndex) |
| | | // console.log(this.$refs.swiper.swiper.activeIndex) |
| | | if (this.swiperIndex == 0) { |
| | | console.log('本次分页的第一条') |
| | | // console.log('本次分页的第一条') |
| | | //请求上一页 |
| | | if (this.stackFilesPage > 1) { |
| | | this.stackFilesPage--; |
| | | this.getStackFiles(); |
| | | this.getStackFiles(true); |
| | | } else { |
| | | this.$message({ |
| | | type: 'info', |
| | |
| | | } |
| | | }, |
| | | nextClick () { |
| | | console.log(this.swiperIndex) |
| | | console.log(this.$refs.swiper.swiper.activeIndex) |
| | | if (this.swiperIndex == this.swipercanvasData.length - 1) { |
| | | console.log('最后一张,加载更多') |
| | | // console.log('最后一张,加载更多') |
| | | //请求下一页 |
| | | this.stackFilesPage++; |
| | | this.getStackFiles(); |
| | | this.getStackFiles(true); |
| | | } |
| | | }, |
| | | getStackFiles () { |
| | | getStackFiles(onClick = false) { |
| | | this.getStackFileLoading = true; |
| | | let _this = this; |
| | | findAllFileByStackId({ name: '', stackId: this.stackId, page: this.stackFilesPage, size: this.stackFilesSize, type: 0 }).then(res => { |
| | |
| | | loading: false |
| | | } |
| | | }); |
| | | console.log(_this.swipercanvasData) |
| | | console.log(this.swipercanvasData) |
| | | this.swiperIndex = 0; |
| | | this.$refs.swiper.swiper.activeIndex = 0; |
| | | |
| | | } else { |
| | | console.log(this.swipercanvasData) |
| | | if (onClick) { |
| | | this.$message({ |
| | | type: 'info', |
| | | type: 'warning', |
| | | message: '已无更多数据!' |
| | | }); |
| | | } |
| | | } |
| | | } else { |
| | | console.log(this.swipercanvasData) |
| | | // console.log(this.swipercanvasData) |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '数据请求失败,请稍后重试!' |
| | |
| | | } |
| | | this.getStackFileLoading = false; |
| | | }).catch(e => { |
| | | console.log(e); |
| | | // console.log(e); |
| | | this.getStackFileLoading = false; |
| | | }); |
| | | }, |
| | |
| | | }, 3000) |
| | | }, |
| | | drawBaseImg () { |
| | | if (Array.isArray(this.$refs.canvas)) { |
| | | if (this.$refs.canvas.length > 0) { |
| | | this.$refs.canvas[0].showModal(); |
| | | } |
| | | } else { |
| | | this.$refs.canvas.showModal(); |
| | | } |
| | | }, |
| | | getCanvasData (data) { |
| | | let polyon = { ...data }; |
| | |
| | | } |
| | | } |
| | | .el-loading-spinner { |
| | | background: url('/images/cameraAccess/loading.gif') no-repeat; |
| | | background: url("/images/cameraAccess/loading.gif") no-repeat; |
| | | top: 50%; |
| | | margin-top: -21px; |
| | | width: calc(100% - 260px) !important; |