|
@@ -24,6 +24,9 @@
|
|
|
:disabled="loading"
|
|
|
@file-change="fileChange"
|
|
|
></select-file>
|
|
|
+ <p v-if="infos.errorMsg" class="tips-info tips-error">
|
|
|
+ {{ infos.errorMsg }}
|
|
|
+ </p>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="answerFileUrl">
|
|
|
<span
|
|
@@ -47,7 +50,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState } from "vuex";
|
|
|
+import { mapState, mapMutations } from "vuex";
|
|
|
import { examStructureUploadAnswer } from "../../api";
|
|
|
import SelectFile from "../SelectFile.vue";
|
|
|
import MarkStatus from "./MarkStatus.vue";
|
|
@@ -79,6 +82,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapMutations("markParam", ["setMarkParamInfos"]),
|
|
|
toViewAnswer() {
|
|
|
window.open(this.answerFileUrl);
|
|
|
},
|
|
@@ -110,6 +114,15 @@ export default {
|
|
|
this.loading = false;
|
|
|
if (!data) return;
|
|
|
|
|
|
+ const paperAnswer = JSON.stringify({
|
|
|
+ paperType: this.markParamInfos.basicPaperInfo.paperType,
|
|
|
+ answerUrl: data,
|
|
|
+ });
|
|
|
+ this.setMarkParamInfos({
|
|
|
+ basicPaperInfo: Object.assign({}, this.markParamInfos.basicPaperInfo, {
|
|
|
+ paperAnswer,
|
|
|
+ }),
|
|
|
+ });
|
|
|
this.$message.success("上传成功!");
|
|
|
this.$emit("confirm");
|
|
|
},
|