Browse Source

epcc的小学,可以上传图片

Michael Wang 6 years ago
parent
commit
2b7166613b
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/features/OnlineExam/Examing/TextQuestionView.vue

+ 12 - 2
src/features/OnlineExam/Examing/TextQuestionView.vue

@@ -10,7 +10,7 @@
     <div class="option">
       <!-- <textarea v-model="studentAnswer" maxlength="5000" type="text" /> -->
 
-      <div v-if="examQuestion.answerType !== 'SINGLE_AUDIO'">
+      <div v-if="!isAudioAnswerType">
         <div class="menu">
           <i-button type="info" class="text-ops" size="small" @click="textCopy">
             复制
@@ -99,7 +99,7 @@
       </div>
 
       <!-- FIXME -->
-      <div v-if="this.$store.state.user.schoolDomain === 'csu.ecs.qmth.com.cn'">
+      <div v-if="canAttachPhotos">
         <UploadPhotos
           :defaultList="
             photoAnswers.map(v => {
@@ -299,6 +299,16 @@ export default {
     rightAnswerTransform() {
       return this.question.rightAnswer.join("");
     },
+    isAudioAnswerType() {
+      return this.examQuestion.answerType === "SINGLE_AUDIO";
+    },
+    canAttachPhotos() {
+      return (
+        this.$store.state.user.schoolDomain === "csu.ecs.qmth.com.cn" ||
+        (this.$store.state.user.schoolDomain === "iepcc-ps.ecs.qmth.com.cn" &&
+          !this.isAudioAnswerType)
+      );
+    },
     photoAnswers: {
       get() {
         if (!this.studentAnswer) return [];