|  | @@ -6,7 +6,7 @@
 | 
	
		
			
				|  |  |        :style="{ display: type == 'upload_control_chs' ? 'flex' : 'block' }"
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  |        <div class="content">
 | 
	
		
			
				|  |  | -        <template v-if="curQue.Bookanswer&&type == 'upload_control_chs'">
 | 
	
		
			
				|  |  | +        <template v-if="curQue.Bookanswer && type == 'upload_control_chs'">
 | 
	
		
			
				|  |  |            <template
 | 
	
		
			
				|  |  |              v-if="
 | 
	
		
			
				|  |  |                curQue.Bookanswer.file_name.indexOf('png') != -1 ||
 | 
	
	
		
			
				|  | @@ -16,18 +16,28 @@
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |              <img :src="curQue.Bookanswer.file_url" alt="" />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  | -          <template v-else-if="curQue.Bookanswer.file_name.indexOf('pdf') != -1">
 | 
	
		
			
				|  |  | -            <pdf
 | 
	
		
			
				|  |  | +          <template
 | 
	
		
			
				|  |  | +            v-else-if="curQue.Bookanswer.file_name.indexOf('pdf') != -1"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <iframe
 | 
	
		
			
				|  |  | +              :src="curQue.Bookanswer.newpath"
 | 
	
		
			
				|  |  | +              id="ifm"
 | 
	
		
			
				|  |  | +              width="100%"
 | 
	
		
			
				|  |  | +              height="100%"
 | 
	
		
			
				|  |  | +            ></iframe>
 | 
	
		
			
				|  |  | +            <!-- <pdf
 | 
	
		
			
				|  |  |                ref="pdf"
 | 
	
		
			
				|  |  |                :src="curQue.Bookanswer.fileRelativePath"
 | 
	
		
			
				|  |  |                v-for="i in curQue.Bookanswer.numPages"
 | 
	
		
			
				|  |  |                :key="i"
 | 
	
		
			
				|  |  |                :page="i"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  | -            </pdf>
 | 
	
		
			
				|  |  | +            </pdf> -->
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  | -        <template v-else-if="curQue.data&&type == 'upload_control_preview_chs'">
 | 
	
		
			
				|  |  | +        <template
 | 
	
		
			
				|  |  | +          v-else-if="curQue.data && type == 'upload_control_preview_chs'"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  |            <template
 | 
	
		
			
				|  |  |              v-if="
 | 
	
		
			
				|  |  |                curQue.data.file_name.indexOf('png') != -1 ||
 | 
	
	
		
			
				|  | @@ -37,21 +47,29 @@
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |              <img :src="curQue.data.file_url" alt="" />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  | -          <template v-else-if="curQue.Bookanswer.file_name.indexOf('pdf') != -1">
 | 
	
		
			
				|  |  | -            <pdf
 | 
	
		
			
				|  |  | +          <template
 | 
	
		
			
				|  |  | +            v-else-if="curQue.Bookanswer.file_name.indexOf('pdf') != -1"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <iframe
 | 
	
		
			
				|  |  | +              :src="curQue.Bookanswer.newpath"
 | 
	
		
			
				|  |  | +              id="ifm"
 | 
	
		
			
				|  |  | +              width="100%"
 | 
	
		
			
				|  |  | +              height="100%"
 | 
	
		
			
				|  |  | +            ></iframe>
 | 
	
		
			
				|  |  | +            <!-- <pdf
 | 
	
		
			
				|  |  |                ref="pdf"
 | 
	
		
			
				|  |  |                :src="curQue.Bookanswer.fileRelativePath"
 | 
	
		
			
				|  |  |                v-for="i in curQue.Bookanswer.numPages"
 | 
	
		
			
				|  |  |                :key="i"
 | 
	
		
			
				|  |  |                :page="i"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  | -            </pdf>
 | 
	
		
			
				|  |  | +            </pdf> -->
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template v-else>
 | 
	
		
			
				|  |  |            <div
 | 
	
		
			
				|  |  |              style="display: flex; height: 40px"
 | 
	
		
			
				|  |  | -            v-if="type == 'upload_control_chs'&&TaskModel!='ANSWER'"
 | 
	
		
			
				|  |  | +            v-if="type == 'upload_control_chs' && TaskModel != 'ANSWER'"
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |              <UploadView
 | 
	
		
			
				|  |  |                :changeFillId="changeFillId"
 | 
	
	
		
			
				|  | @@ -76,7 +94,12 @@
 | 
	
		
			
				|  |  |          下载
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="dv" v-if="curQue.Bookanswer">
 | 
	
		
			
				|  |  | -        <div v-if="type == 'upload_control_chs'" class="remove" :class="[TaskModel == 'ANSWER'?'notAllow':'']" @click="remove">
 | 
	
		
			
				|  |  | +        <div
 | 
	
		
			
				|  |  | +          v-if="type == 'upload_control_chs'"
 | 
	
		
			
				|  |  | +          class="remove"
 | 
	
		
			
				|  |  | +          :class="[TaskModel == 'ANSWER' ? 'notAllow' : '']"
 | 
	
		
			
				|  |  | +          @click="remove"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  |            <img src="../../../assets/adult/red_remove.png" alt="" />
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
	
		
			
				|  | @@ -88,6 +111,7 @@
 | 
	
		
			
				|  |  |  import UploadView from "../common/UploadView.vue";
 | 
	
		
			
				|  |  |  import pdf from "vue-pdf";
 | 
	
		
			
				|  |  |  import { getToken } from "../../../utils/auth";
 | 
	
		
			
				|  |  | +const Base64 = require("js-base64").Base64;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: {
 | 
	
	
		
			
				|  | @@ -144,15 +168,15 @@ export default {
 | 
	
		
			
				|  |  |          `/GCLSFileServer/WebFileDownload?UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}&FileID=${data.FileID}`;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      remove() {
 | 
	
		
			
				|  |  | -        if(!this.TaskModel||this.TaskModel!='ANSWER'){
 | 
	
		
			
				|  |  | -            if (this.curQue.Bookanswer) {
 | 
	
		
			
				|  |  | -                this.data = null;
 | 
	
		
			
				|  |  | -                this.curQue.Bookanswer = null;
 | 
	
		
			
				|  |  | -                this.curQue.fileList = [];
 | 
	
		
			
				|  |  | -                this.$message.success("删除成功");
 | 
	
		
			
				|  |  | -                this.$forceUpdate()
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +      if (!this.TaskModel || this.TaskModel != "ANSWER") {
 | 
	
		
			
				|  |  | +        if (this.curQue.Bookanswer) {
 | 
	
		
			
				|  |  | +          this.data = null;
 | 
	
		
			
				|  |  | +          this.curQue.Bookanswer = null;
 | 
	
		
			
				|  |  | +          this.curQue.fileList = [];
 | 
	
		
			
				|  |  | +          this.$message.success("删除成功");
 | 
	
		
			
				|  |  | +          this.$forceUpdate();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      changeFillId(fileList, item, index) {
 | 
	
		
			
				|  |  |        this.curQue.fileList = fileList;
 | 
	
	
		
			
				|  | @@ -161,9 +185,14 @@ export default {
 | 
	
		
			
				|  |  |        this.curQue.Bookanswer = fileList[0].response.file_info_list[0];
 | 
	
		
			
				|  |  |        if (this.curQue.Bookanswer.file_name.indexOf("pdf") != -1) {
 | 
	
		
			
				|  |  |          this.curQue.Bookanswer = fileList[0].response.file_info_list[0];
 | 
	
		
			
				|  |  | -        this.curQue.Bookanswer.fileRelativePath =
 | 
	
		
			
				|  |  | -          process.env.VUE_APP_BASE_API + this.curQue.Bookanswer.file_relative_path;
 | 
	
		
			
				|  |  | -        this.getNumPages();
 | 
	
		
			
				|  |  | +        let path =
 | 
	
		
			
				|  |  | +          `http://docpreview.utschool.cn/onlinePreview?url=` +
 | 
	
		
			
				|  |  | +          Base64.encode(this.curQue.Bookanswer.file_url);
 | 
	
		
			
				|  |  | +        this.curQue.Bookanswer.newpath = path;
 | 
	
		
			
				|  |  | +        // this.curQue.Bookanswer.fileRelativePath =
 | 
	
		
			
				|  |  | +        //   process.env.VUE_APP_BASE_API +
 | 
	
		
			
				|  |  | +        //   this.curQue.Bookanswer.file_relative_path;
 | 
	
		
			
				|  |  | +        // this.getNumPages();
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.$forceUpdate();
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -187,9 +216,28 @@ export default {
 | 
	
		
			
				|  |  |        let data = JSON.parse(JSON.stringify(this.data_structure));
 | 
	
		
			
				|  |  |        this.changeCurQue(data);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    handleData() {
 | 
	
		
			
				|  |  | +      let _this = this;
 | 
	
		
			
				|  |  | +      let single = null;
 | 
	
		
			
				|  |  | +      if (this.curQue.data) {
 | 
	
		
			
				|  |  | +        let path =
 | 
	
		
			
				|  |  | +          `http://docpreview.utschool.cn/onlinePreview?url=` +
 | 
	
		
			
				|  |  | +          Base64.encode(this.curQue.data.file_url);
 | 
	
		
			
				|  |  | +        this.curQue.data.newpath = path;
 | 
	
		
			
				|  |  | +        single = JSON.parse(JSON.stringify(this.curQue.data));
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        single = null;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      if (!this.curQue.Bookanswer) {
 | 
	
		
			
				|  |  | +        this.$set(this.curQue, "Bookanswer", single);
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    //生命周期 - 创建完成(可以访问当前this实例)
 | 
	
		
			
				|  |  | -  created() {},
 | 
	
		
			
				|  |  | +  created() {
 | 
	
		
			
				|  |  | +    this.handleData();
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |    //生命周期 - 挂载完成(可以访问DOM元素)
 | 
	
		
			
				|  |  |    mounted() {},
 | 
	
		
			
				|  |  |    beforeCreate() {}, //生命周期 - 创建之前
 | 
	
	
		
			
				|  | @@ -223,8 +271,8 @@ export default {
 | 
	
		
			
				|  |  |        justify-content: center;
 | 
	
		
			
				|  |  |        margin-left: 32px;
 | 
	
		
			
				|  |  |        cursor: pointer;
 | 
	
		
			
				|  |  | -      &.notAllow{
 | 
	
		
			
				|  |  | -          cursor: not-allowed;
 | 
	
		
			
				|  |  | +      &.notAllow {
 | 
	
		
			
				|  |  | +        cursor: not-allowed;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        img {
 | 
	
		
			
				|  |  |          width: 24px;
 | 
	
	
		
			
				|  | @@ -270,7 +318,7 @@ export default {
 | 
	
		
			
				|  |  |        border-radius: 4px;
 | 
	
		
			
				|  |  |        box-sizing: border-box;
 | 
	
		
			
				|  |  |        background: linear-gradient(0deg, #ebebeb, #ebebeb);
 | 
	
		
			
				|  |  | -      overflow-y: scroll;
 | 
	
		
			
				|  |  | +      // overflow-y: scroll;
 | 
	
		
			
				|  |  |        display: flex;
 | 
	
		
			
				|  |  |        justify-content: center;
 | 
	
		
			
				|  |  |        align-items: center;
 |