|
@@ -10734,17 +10734,17 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
|
// loading.close();
|
|
|
return;
|
|
|
}
|
|
|
- if (
|
|
|
- ['DOC'].indexOf(
|
|
|
- file.name
|
|
|
- .split(".")
|
|
|
- [file.name.split(".").length - 1].toLocaleUpperCase()
|
|
|
- ) !== -1
|
|
|
- ) {
|
|
|
- this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
|
|
|
- this.inputShow = true;
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // ['DOC'].indexOf(
|
|
|
+ // file.name
|
|
|
+ // .split(".")
|
|
|
+ // [file.name.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ // ) !== -1
|
|
|
+ // ) {
|
|
|
+ // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
|
|
|
+ // this.inputShow = true;
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
if (type == 3) {
|
|
|
var b = [
|
|
@@ -10840,75 +10840,75 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
|
_this.infoisAllSize = event.target.files.length;
|
|
|
// _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
|
|
|
}
|
|
|
- if (
|
|
|
- ['DOC'].indexOf(
|
|
|
- file.name
|
|
|
- .split(".")
|
|
|
- [file.name.split(".").length - 1].toLocaleUpperCase()
|
|
|
- ) !== -1
|
|
|
- ) {
|
|
|
- // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
|
|
|
- // this.inputShow = true;
|
|
|
- let params = convertApi.createParams()
|
|
|
- params.add('file', file)
|
|
|
- try {
|
|
|
- let result = await convertApi.convert('doc', 'docx', params);
|
|
|
- // Get result file URL
|
|
|
- file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
|
|
|
- return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
|
|
|
- });
|
|
|
- console.log(result)
|
|
|
- console.log(file)
|
|
|
- } catch (error) {
|
|
|
- cfindex2++;
|
|
|
- if(type == 14){
|
|
|
- _this.teacherinfoisFinishSize = cfindex2;
|
|
|
- }else if(type == 16){
|
|
|
- _this.mubiaoinfoisFinishSize = cfindex2;
|
|
|
- }else if(type == 17){
|
|
|
- _this.xuanzeinfoisFinishSize = cfindex2;
|
|
|
- }else if(type == 18){
|
|
|
- _this.pingjiainfoisFinishSize[tindex] = cfindex2;
|
|
|
- }else if(type == 19){
|
|
|
- _this.knowinfoisFinishSize = cfindex2;
|
|
|
- }else if(type == 20){
|
|
|
- _this.knowinfoisFinishSize2 = cfindex2;
|
|
|
- }else {
|
|
|
- _this.infoisFinishSize = cfindex2;
|
|
|
- }
|
|
|
- setTimeout(() => {
|
|
|
- if (
|
|
|
- cfindex2 == event.target.files.length ||
|
|
|
- cfindex2 > event.target.files.length
|
|
|
- ) {
|
|
|
- if(type == 14){
|
|
|
- _this.teacherinfoproVisible = false;
|
|
|
- }else if(type == 16){
|
|
|
- _this.mubiaoinfoproVisible = false;
|
|
|
- }else if(type == 17){
|
|
|
- _this.xuanzeinfoproVisible = false;
|
|
|
- }else if(type == 18){
|
|
|
- _this.pingjiainfoproVisible[tindex] = false;
|
|
|
- }else if(type == 19){
|
|
|
- _this.knowinfoproVisible = false;
|
|
|
- }else if(type == 20){
|
|
|
- _this.knowinfoproVisible2 = false;
|
|
|
- }else{
|
|
|
- _this.infoproVisible = false;
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // ['DOC'].indexOf(
|
|
|
+ // file.name
|
|
|
+ // .split(".")
|
|
|
+ // [file.name.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ // ) !== -1
|
|
|
+ // ) {
|
|
|
+ // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
|
|
|
+ // // this.inputShow = true;
|
|
|
+ // let params = convertApi.createParams()
|
|
|
+ // params.add('file', file)
|
|
|
+ // try {
|
|
|
+ // let result = await convertApi.convert('doc', 'docx', params);
|
|
|
+ // // Get result file URL
|
|
|
+ // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
|
|
|
+ // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
|
|
|
+ // });
|
|
|
+ // console.log(result)
|
|
|
+ // console.log(file)
|
|
|
+ // } catch (error) {
|
|
|
+ // cfindex2++;
|
|
|
+ // if(type == 14){
|
|
|
+ // _this.teacherinfoisFinishSize = cfindex2;
|
|
|
+ // }else if(type == 16){
|
|
|
+ // _this.mubiaoinfoisFinishSize = cfindex2;
|
|
|
+ // }else if(type == 17){
|
|
|
+ // _this.xuanzeinfoisFinishSize = cfindex2;
|
|
|
+ // }else if(type == 18){
|
|
|
+ // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
|
|
|
+ // }else if(type == 19){
|
|
|
+ // _this.knowinfoisFinishSize = cfindex2;
|
|
|
+ // }else if(type == 20){
|
|
|
+ // _this.knowinfoisFinishSize2 = cfindex2;
|
|
|
+ // }else {
|
|
|
+ // _this.infoisFinishSize = cfindex2;
|
|
|
+ // }
|
|
|
+ // setTimeout(() => {
|
|
|
+ // if (
|
|
|
+ // cfindex2 == event.target.files.length ||
|
|
|
+ // cfindex2 > event.target.files.length
|
|
|
+ // ) {
|
|
|
+ // if(type == 14){
|
|
|
+ // _this.teacherinfoproVisible = false;
|
|
|
+ // }else if(type == 16){
|
|
|
+ // _this.mubiaoinfoproVisible = false;
|
|
|
+ // }else if(type == 17){
|
|
|
+ // _this.xuanzeinfoproVisible = false;
|
|
|
+ // }else if(type == 18){
|
|
|
+ // _this.pingjiainfoproVisible[tindex] = false;
|
|
|
+ // }else if(type == 19){
|
|
|
+ // _this.knowinfoproVisible = false;
|
|
|
+ // }else if(type == 20){
|
|
|
+ // _this.knowinfoproVisible2 = false;
|
|
|
+ // }else{
|
|
|
+ // _this.infoproVisible = false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
- _this.$forceUpdate();
|
|
|
- }, 1000);
|
|
|
- _this.inputShow = true;
|
|
|
- _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
|
|
|
- // 捕捉到这个convertApi.convert报错就不要往下走了
|
|
|
- return; // 直接返回,不继续执行后续代码
|
|
|
- }
|
|
|
+ // _this.$forceUpdate();
|
|
|
+ // }, 1000);
|
|
|
+ // _this.inputShow = true;
|
|
|
+ // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
|
|
|
+ // // 捕捉到这个convertApi.convert报错就不要往下走了
|
|
|
+ // return; // 直接返回,不继续执行后续代码
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
- // return;
|
|
|
- }
|
|
|
+ // // return;
|
|
|
+ // }
|
|
|
|
|
|
_this.$forceUpdate();
|
|
|
if (file) {
|