|
@@ -10,15 +10,16 @@
|
|
|
<template
|
|
|
v-if="
|
|
|
curQue.Bookanswer.file_name.indexOf('png') != -1 ||
|
|
|
- curQue.Bookanswer.file_name.indexOf('jpg') != -1 ||
|
|
|
- curQue.Bookanswer.file_name.indexOf('jpeg') != -1
|
|
|
+ curQue.Bookanswer.file_name.indexOf('jpg') != -1 ||
|
|
|
+ curQue.Bookanswer.file_name.indexOf('jpeg') != -1
|
|
|
"
|
|
|
>
|
|
|
- <el-image
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- :src="curQue.Bookanswer.file_url"
|
|
|
- :fit="'contain'"
|
|
|
- :preview-src-list="[curQue.Bookanswer.file_url]">
|
|
|
+ <el-image
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ :src="curQue.Bookanswer.file_url"
|
|
|
+ :fit="'contain'"
|
|
|
+ :preview-src-list="[curQue.Bookanswer.file_url]"
|
|
|
+ >
|
|
|
</el-image>
|
|
|
<!-- <img :src="curQue.Bookanswer.file_url" alt="" /> -->
|
|
|
</template>
|
|
@@ -47,15 +48,16 @@
|
|
|
<template
|
|
|
v-if="
|
|
|
curQue.data.file_name.indexOf('png') != -1 ||
|
|
|
- curQue.data.file_name.indexOf('jpg') != -1 ||
|
|
|
- curQue.data.file_name.indexOf('jpeg') != -1
|
|
|
+ curQue.data.file_name.indexOf('jpg') != -1 ||
|
|
|
+ curQue.data.file_name.indexOf('jpeg') != -1
|
|
|
"
|
|
|
>
|
|
|
- <el-image
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- :src="curQue.data.id"
|
|
|
- :fit="'contain'"
|
|
|
- :preview-src-list="[curQue.data.id]">
|
|
|
+ <el-image
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ :src="curQue.data.id"
|
|
|
+ :fit="'contain'"
|
|
|
+ :preview-src-list="[curQue.data.id]"
|
|
|
+ >
|
|
|
</el-image>
|
|
|
<!-- <img :src="curQue.data.id" alt="" /> -->
|
|
|
</template>
|
|
@@ -117,26 +119,28 @@
|
|
|
<div
|
|
|
v-if="type == 'upload_control_chs'"
|
|
|
class="remove zoom-in"
|
|
|
- @click="showIframe=true"
|
|
|
+ @click="showIframe = true"
|
|
|
>
|
|
|
<i class="el-icon-zoom-in"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
- :visible.sync="showIframe"
|
|
|
- :show-close="true"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :modal-append-to-body="false"
|
|
|
- width="1000px"
|
|
|
- class="login-dialog"
|
|
|
- v-if="showIframe">
|
|
|
- <iframe
|
|
|
- :src="curQue.Bookanswer.newpath"
|
|
|
- id="ifms"
|
|
|
- width="100%"
|
|
|
- height="600px"
|
|
|
- ></iframe>
|
|
|
+ :visible.sync="showIframe"
|
|
|
+ :show-close="true"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="true"
|
|
|
+ :append-to-body="true"
|
|
|
+ width="1000px"
|
|
|
+ class="login-dialog"
|
|
|
+ v-if="showIframe"
|
|
|
+ >
|
|
|
+ <iframe
|
|
|
+ :src="curQue.Bookanswer.newpath"
|
|
|
+ id="ifms"
|
|
|
+ width="100%"
|
|
|
+ height="600px"
|
|
|
+ ></iframe>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -150,7 +154,7 @@ const Base64 = require("js-base64").Base64;
|
|
|
export default {
|
|
|
components: {
|
|
|
UploadView,
|
|
|
- pdf,
|
|
|
+ pdf
|
|
|
},
|
|
|
props: ["curQue", "fn_data", "type", "TaskModel"],
|
|
|
data() {
|
|
@@ -168,9 +172,9 @@ export default {
|
|
|
{
|
|
|
number: "",
|
|
|
con: "",
|
|
|
- answer: "",
|
|
|
- },
|
|
|
- ],
|
|
|
+ answer: ""
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
loading: false,
|
|
|
file_preview_url: "",
|
|
@@ -197,7 +201,7 @@ export default {
|
|
|
SessionID,
|
|
|
UserCode,
|
|
|
UserType,
|
|
|
- FileID,
|
|
|
+ FileID
|
|
|
};
|
|
|
location.href =
|
|
|
process.env.VUE_APP_BASE_API +
|
|
@@ -229,9 +233,14 @@ export default {
|
|
|
// process.env.VUE_APP_BASE_API +
|
|
|
// this.curQue.Bookanswer.file_relative_path;
|
|
|
// this.getNumPages();
|
|
|
- }else{
|
|
|
- let path = `${this.file_preview_url}/onlinePreview?url=` +
|
|
|
- Base64.encode(this.curQue.data.id?this.curQue.data.id:this.curQue.Bookanswer.file_url);
|
|
|
+ } else {
|
|
|
+ let path =
|
|
|
+ `${this.file_preview_url}/onlinePreview?url=` +
|
|
|
+ Base64.encode(
|
|
|
+ this.curQue.data.id
|
|
|
+ ? this.curQue.data.id
|
|
|
+ : this.curQue.Bookanswer.file_url
|
|
|
+ );
|
|
|
this.curQue.Bookanswer.newpath = path;
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
@@ -243,12 +252,12 @@ export default {
|
|
|
_this.curQue.Bookanswer.fileRelativePath
|
|
|
);
|
|
|
loadingTask.promise
|
|
|
- .then((pdff) => {
|
|
|
+ .then(pdff => {
|
|
|
_this.numPages = pdff.numPages;
|
|
|
_this.curQue.Bookanswer.numPages = pdff.numPages;
|
|
|
this.$forceUpdate();
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
console.error("pdf 加载失败", err);
|
|
|
});
|
|
|
},
|
|
@@ -261,7 +270,7 @@ export default {
|
|
|
let single = null;
|
|
|
if (this.curQue.data) {
|
|
|
let path =
|
|
|
- `${this.file_preview_url}/onlinePreview?url=` +
|
|
|
+ `${this.file_preview_url}/onlinePreview?url=` +
|
|
|
Base64.encode(this.curQue.data.file_url);
|
|
|
this.curQue.data.newpath = path;
|
|
|
single = JSON.parse(JSON.stringify(this.curQue.data));
|
|
@@ -272,7 +281,7 @@ export default {
|
|
|
if (!this.curQue.Bookanswer) {
|
|
|
this.$set(this.curQue, "Bookanswer", single);
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -288,10 +297,10 @@ export default {
|
|
|
updated() {}, //生命周期 - 更新之后
|
|
|
beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
destroyed() {}, //生命周期 - 销毁完成
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
.Big-Book-prev-Textdes {
|
|
|
width: 100%;
|