|
@@ -1009,11 +1009,7 @@ export default {
|
|
this.noneBtnImg = _tmp.length >= 1;
|
|
this.noneBtnImg = _tmp.length >= 1;
|
|
},
|
|
},
|
|
beforeUpload1(event, type) {
|
|
beforeUpload1(event, type) {
|
|
- if (type == 100) {
|
|
|
|
- var file = event;
|
|
|
|
- } else {
|
|
|
|
- var file = event.target.files[0];
|
|
|
|
- }
|
|
|
|
|
|
+ var file = event.target.files[0];
|
|
var credentials = {
|
|
var credentials = {
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
@@ -1074,13 +1070,6 @@ export default {
|
|
uid: file.uid,
|
|
uid: file.uid,
|
|
});
|
|
});
|
|
_this.imgChange(null, null, type);
|
|
_this.imgChange(null, null, type);
|
|
- } else if (type == 100) {
|
|
|
|
- _this.imgFileUp.push({
|
|
|
|
- name: file.name,
|
|
|
|
- url: data.Location,
|
|
|
|
- uid: file.uid,
|
|
|
|
- });
|
|
|
|
- _this.imgChange(null, null, type);
|
|
|
|
}
|
|
}
|
|
console.log(data.Location);
|
|
console.log(data.Location);
|
|
}
|
|
}
|
|
@@ -1177,17 +1166,22 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
uid: this.userid,
|
|
uid: this.userid,
|
|
cid: this.cid,
|
|
cid: this.cid,
|
|
- upload: JSON.stringify(this.upload),
|
|
|
|
|
|
+ // upload: JSON.stringify(this.upload),
|
|
|
|
+ upload: JSON.stringify(this.imgFileUp),
|
|
};
|
|
};
|
|
this.ajax
|
|
this.ajax
|
|
.get(this.$store.state.api + "insertSWork", params)
|
|
.get(this.$store.state.api + "insertSWork", params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- this.isNoHomeWork = true;
|
|
|
|
|
|
+ // this.isNoHomeWork = true;
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
- this.selectSWork(); // this.upload = res.data[0][0].upload;
|
|
|
|
|
|
+ // this.selectSWork(); // this.upload = res.data[0][0].upload;
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "截图上传成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
- this.$message.error("提交失败");
|
|
|
|
|
|
+ this.$message.error("截图上传失败");
|
|
console.error(err);
|
|
console.error(err);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -1218,7 +1212,7 @@ export default {
|
|
} else if (this.toolsList[0].tools[this.howTools] == 7) {
|
|
} else if (this.toolsList[0].tools[this.howTools] == 7) {
|
|
iframeHtml = this.$refs.grid;
|
|
iframeHtml = this.$refs.grid;
|
|
}
|
|
}
|
|
- iframeBody = iframeHtml.contentWindow.docunment.body;
|
|
|
|
|
|
+ iframeBody = iframeHtml.contentWindow.document.body;
|
|
// 第一个参数是需要生成截图的元素,第二个是自己需要配置的参数,宽高等
|
|
// 第一个参数是需要生成截图的元素,第二个是自己需要配置的参数,宽高等
|
|
html2canvas(iframeBody, {
|
|
html2canvas(iframeBody, {
|
|
backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
|
|
backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
|
|
@@ -1236,6 +1230,7 @@ export default {
|
|
let file = this.dataURLtoFile(url, "作业");
|
|
let file = this.dataURLtoFile(url, "作业");
|
|
this.imgFile = file;
|
|
this.imgFile = file;
|
|
this.beforeUpload2(this.imgFile);
|
|
this.beforeUpload2(this.imgFile);
|
|
|
|
+ this.addSWork();
|
|
console.log(this.imgFile);
|
|
console.log(this.imgFile);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -1318,7 +1313,7 @@ export default {
|
|
this.timer = null;
|
|
this.timer = null;
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.selectSWork();
|
|
|
|
|
|
+ // this.selectSWork();
|
|
let _this = this;
|
|
let _this = this;
|
|
this.timer = setInterval(() => {
|
|
this.timer = setInterval(() => {
|
|
_this.setPage();
|
|
_this.setPage();
|