|
@@ -930,7 +930,7 @@
|
|
|
<AskStatic v-if="
|
|
|
worksStudent.length &&
|
|
|
worksStudent[toolIndex].length > 0
|
|
|
- " :askJSON="worksStudent[toolIndex][0].works" :checkJson="checkJson[toolIndex]"></AskStatic>
|
|
|
+ " :askJSON="tool" :checkJson="checkJson[toolIndex]"></AskStatic>
|
|
|
</div>
|
|
|
<div v-if="
|
|
|
tType &&
|
|
@@ -2121,6 +2121,7 @@ import Time from "./tools/time.vue";
|
|
|
import Mind from "./tools/jsmind.vue";
|
|
|
import Sunburst from "./tools/sunburst";
|
|
|
import SeeBoard from "./tools/seeBoard";
|
|
|
+import * as imageConversion from 'image-conversion'
|
|
|
export default {
|
|
|
components: { EditorBar, Time, pdf, AskStatic, Mind, Sunburst, SeeBoard, AnswerData2 },
|
|
|
data() {
|
|
@@ -3072,7 +3073,7 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
- beforeUpload1(event, type, i) {
|
|
|
+ async beforeUpload1(event, type, i) {
|
|
|
// this.$message.success('进入上传')
|
|
|
|
|
|
var file = event.target.files[0];
|
|
@@ -3102,6 +3103,7 @@ export default {
|
|
|
"PPSM",
|
|
|
];
|
|
|
var excelA = ['XLSX', 'XLXB', 'XLS', 'XLSM']
|
|
|
+ var photoA = ["BMP", "GIF", "PNG", "JPGE", "JPG", "TIF", "PCX", "TGA", "EXIF", "FPX", "SVG", "APNG"];
|
|
|
if (
|
|
|
b.indexOf(
|
|
|
file.name
|
|
@@ -3123,6 +3125,16 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (photoA.indexOf(
|
|
|
+ file.name
|
|
|
+ .split(".")
|
|
|
+ [file.name.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) != -1) {
|
|
|
+ // const blob = await imageConversion.compress(file, 0.8)
|
|
|
+ const blob = await imageConversion.compressAccurately(file, 32)
|
|
|
+ file = new File([blob], file.name, {type: file.type})
|
|
|
+ }
|
|
|
_this.progress = 0;
|
|
|
_this.proVisible = true;
|
|
|
|
|
@@ -6552,7 +6564,7 @@ export default {
|
|
|
align-items: flex-end;
|
|
|
}
|
|
|
|
|
|
-.buttonA{
|
|
|
+.buttonA {
|
|
|
margin-left: 10px;
|
|
|
padding: 0;
|
|
|
}
|