|
@@ -4,22 +4,16 @@
|
|
|
<span :class="['toggle-left',isOpen?'toggle-arraw' : '']" @click="isOpen = !isOpen"><font-awesome-icon icon="angle-double-right" /></span>
|
|
|
<div class="q-pa-md">
|
|
|
<q-carousel animated v-model="slide" ref="carousel" thumbnails infinite :class="isOpen?'drawer' : ''">
|
|
|
- <q-carousel-slide v-for="(item,index) in imgArr" :key="item.id" :name="index+1" :img-src="item" style="display: none;">
|
|
|
- <!--<p v-if="boardImg['page'+(slide)+'']">{{boardImg['page'+(slide)+'']['num']}}</p>-->
|
|
|
- <!--<p v-if="boardImg['page'+(slide)+'']">{{boardImg['page'+(slide)+'']['src']}}</p>-->
|
|
|
- <!--<img v-if="boardImg" :src="boardImg['page'+(slide-1)+'']['src']" alt="">-->
|
|
|
- <!--<img v-if="boardImg" :src="boardImg['page1']" alt="">-->
|
|
|
- <!--<p v-if="boardImg">{{boardImg['page'+(index+1)+'']}}</p>-->
|
|
|
- <!--<img v-if="boardImg['page'+(slide)+'']" :src="boardImg['page'+(slide)+'']['src']" alt="">-->
|
|
|
+ <q-carousel-slide v-for="(item,index) in imgArr" :key="item.id" :name="index+1" :img-src="item" style="display:none">
|
|
|
+ <!--<p v-if="boardImg['page'+(slide)+'']">{{boardImg['page'+(slide)+'']['num']}}</p>
|
|
|
+ <p v-if="boardImg['page'+(slide)+'']">{{boardImg['page'+(slide)+'']['src']}}</p>
|
|
|
+ <img v-if="boardImg" :src="boardImg['page'+(slide-1)+'']['src']" alt="">
|
|
|
+ <img v-if="boardImg" :src="boardImg['page1']" alt="">
|
|
|
+ <p v-if="boardImg">{{boardImg['page'+(index+1)+'']}}</p>
|
|
|
+ <img v-if="boardImg['page'+(slide)+'']" :src="boardImg['page'+(slide)+'']['src']" alt="">-->
|
|
|
</q-carousel-slide>
|
|
|
</q-carousel>
|
|
|
</div>
|
|
|
- <!--<button @click="pdf(startNew+1)" style="position: fixed;z-index: 10;right:500px">点我</button>-->
|
|
|
- <!--<q-carousel-control position="bottom-right" :offset="[18, 18]" class="q-gutter-xs">-->
|
|
|
- <!--<q-btn round dense text-color="black" icon="arrow_left" @click="$refs.carousel.previous()"/>-->
|
|
|
- <!--<br>-->
|
|
|
- <!--<q-btn round dense text-color="black" icon="arrow_right" @click="$refs.carousel.next()"/>-->
|
|
|
- <!--</q-carousel-control>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -67,6 +61,8 @@
|
|
|
startNew: 1,
|
|
|
allPages: null,
|
|
|
whiteBG: require('../assets/img/white.jpg'),
|
|
|
+ visible:true,
|
|
|
+ showSimulatedReturnData:false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -101,7 +97,7 @@
|
|
|
return
|
|
|
}
|
|
|
//this.$emit('PdfLoding',1)
|
|
|
- that.$parent.$parent.beginPdfshowLoading(1)
|
|
|
+ //that.$parent.$parent.beginPdfshowLoading(1)
|
|
|
PDFJS.getDocument(url).then(function (pdf) {
|
|
|
getPage()
|
|
|
function getPage() {
|
|
@@ -126,18 +122,22 @@
|
|
|
that.startNew = currentPage
|
|
|
var newArr = []; var newArr2 = []
|
|
|
for (var i = 0; i < that.imgArr.length; i++) {
|
|
|
+ console.log(i, '缩略图的页数')
|
|
|
+ console.log(that.imgArr[i],'缩略图的内容')
|
|
|
newArr = newArr.concat(that.imgArr[i])
|
|
|
newArr2 = newArr.concat(that.imgArr[i])
|
|
|
}
|
|
|
that.$store.state.totalpage = that.allPages
|
|
|
that.$store.state.imgArr = newArr// 缩略图数组
|
|
|
+
|
|
|
that.$store.state.imgArrOld = newArr2// 缩略图数组
|
|
|
let ImgArrs = that.$store.state.imgArr.length
|
|
|
let imageData = []
|
|
|
let f = async function() {
|
|
|
for (let i = 0; i < ImgArrs; i++) {
|
|
|
- that.$parent.$parent.PdfshowLoading(1,i+1)
|
|
|
+ //that.$parent.$parent.PdfshowLoading(1,i+1)
|
|
|
await that.$parent.$parent.pen(i).then(res => {
|
|
|
+ console.log(i,'PDF加载的页数')
|
|
|
//that.$parent.$parent.LoadingPage(i)
|
|
|
if (res === 200) {
|
|
|
let stageImg = that.$parent.$parent.stage.toDataURL()// 画布截图
|
|
@@ -186,7 +186,7 @@
|
|
|
localStorage.removeItem('msgBody')
|
|
|
localStorage.removeItem('stageInfo')
|
|
|
//this.$parent.$parent.beginPdfshowLoading(0)
|
|
|
- this.$emit('PdfLoding', 0)
|
|
|
+ //this.$emit('PdfLoding', 0)
|
|
|
this.$parent.$parent.pen(0)
|
|
|
}
|
|
|
},
|
|
@@ -329,7 +329,6 @@
|
|
|
transition: 0.5s;
|
|
|
z-index: 999
|
|
|
}
|
|
|
-
|
|
|
.drawer.pages {
|
|
|
left: -280px;
|
|
|
}
|