Browse Source

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

CrazyIter_Bin 1 year ago
parent
commit
72354e9bcb

+ 8 - 8
TEAMModelOS/ClientApp/src/components/student-web/ClassRecord/ShowQues.vue

@@ -79,10 +79,10 @@
                     <span v-for="(ans, index) in ansData" :key="index" v-html="ans"></span>
                 </template>
             </div>
-            <p class="show-ques" v-else>{{ $t("studentWeb.hiteachNote.noanswer") }}</p>
+            <p class="show-ques" style="text-align: right;" v-else>{{ $t("studentWeb.hiteachNote.noanswer") }}</p>
             <div style="margin-right: 20px;" v-if="answer.length">
-                <Icon type="md-checkmark-circle" size="18" color="#00ad6c" v-show="isRight" />
-                <Icon type="md-close-circle" size="18" color="#ff5508" v-show="!isRight" />
+                <Icon type="md-checkmark-circle" size="18" color="#00ad6c" v-show="isRight === 2" />
+                <Icon type="md-close-circle" size="18" color="#ff5508" v-show="isRight === 1" />
             </div>
         </div>
         <div>
@@ -128,7 +128,7 @@ export default {
                 9: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'],
                 9: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I']
             },
-            isRight: false,
+            isRight: 0, //0不判断 1答错 2答对
         }
     },
     components: {
@@ -185,7 +185,7 @@ export default {
                         // 单选
                         if(n.question.exercise.type === 'single' || n.question.exercise.type === 'judge') {
                             if(this.answer.length) {
-                                this.isRight = this.answer[0] === answerData[0]
+                                this.isRight = this.answer[0] === answerData[0] ? 2 : 1
                             }
                         } else if(n.question.exercise.type === 'multiple') {
                             if(this.answer.length && answerData.length === this.answer.length) {
@@ -195,10 +195,10 @@ export default {
                                         num += (item === stu ? 1 : 0)
                                     })
                                 });
-                                this.isRight = this.answer.length === num
+                                this.isRight = this.answer.length === num ? 2 : 1
                             }
-                        } else if(n.question.exercise.type === 'complete') {
-
+                        } else {
+                            this.isRight = 0
                         }
                         this.ansData = answerData
                     // }

+ 5 - 3
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReportCharts/AudioRecorder.vue

@@ -56,7 +56,9 @@ export default {
     },
     async mounted () {
         let { scope, cntr } = this.getComposeData
+        // getSchoolSas有加?
         this.sasData = scope === 'school' ? await this.$tools.getSchoolSas(cntr) : await this.$api.blob.blobSasRCW({ name: cntr, role: 'teacher' })
+        this.sasData.sas = scope === 'school' ? this.sasData.sas : ('?' + this.sasData.sas)
         this.getAnsInfo()
     },
     computed: {
@@ -139,7 +141,7 @@ export default {
             
             let { scope, cntr, examId, subjectId, stuId } = this.getComposeData
             let sas = '?' + this.sasData.sas
-            let containerClient = new BlobTool(this.sasData.url, this.sasData.name, sas, scope)
+            let containerClient = new BlobTool(this.sasData.url, this.sasData.name, this.sasData.sas, scope)
             let path = `exam/${examId}/${subjectId}/${stuId}`
             let that = this
             containerClient.upload(fileBlob, {
@@ -148,14 +150,14 @@ export default {
             }).then(res => {
                 that.currentUrl = res.blob
                 let random = this.$jsFn.getBtwRandom(0, 1000000)
-                that.fileFullPath = res.url + that.sasData.sas + '&t=' + random
+                that.fileFullPath = res.url + this.sasData.sas + '&t=' + random
                 document.getElementById(`audioId${that.audioId}`).setAttribute('src', that.fileFullPath)
                 that.$emit("dataGet", that.currentUrl, that.index)
                 that.$Message.warning(that.$t('cusMgt.saveOk'))
             }).catch(err => {
                 console.log(err);
                 that.$Message.warning(that.$t('cusMgt.saveErr'))
-                that.fileFullPath = `${that.sasData.url}/${cntr}${that.currentUrl}${that.sasData.sas}`
+                that.fileFullPath = `${that.sasData.url}/${cntr}${that.currentUrl}${this.sasData.sas}`
             })
         },
     }

+ 25 - 7
TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue

@@ -9,9 +9,9 @@
         <div class="create-box light-iview-form">
             <Loading v-show="isLoading"></Loading>
             <Steps :current="current">
-                <Step :title="$t('activity.basicInfo')" content=""></Step>
+                <Step :title="$t('jyzx.offline.info')" content=""></Step>
                 <!-- <Step title="活动单位" content=""></Step> -->
-                <Step :title="$t('activity.basicInfo')" content=""></Step>
+                <Step :title="$t('train.create.advancedTitle')" content=""></Step>
                 <Step :title="$t('homework.publish')" content=""></Step>
             </Steps>
             <div style="height: 95%;">
@@ -175,7 +175,18 @@
                                                     <FormItem :label="$t('activity.timeList.upload')" prop="stime">
                                                         <DatePicker :value="actAllTime[2]" ref="workPicker" :editable="false" :options="beforeAct" @on-open-change="(type) => dateOpenChange(type, 2)" @on-change="(date, type) => setActTime(date, type, 2)" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('train.create.timeHolder')" style="width: 500px"></DatePicker>
                                                     </FormItem>
-                                                    <FormItem :label="$t('activity.workType')">
+                                                    <FormItem :label="$t('activity.workType')" prop="uploadType">
+                                                        <CheckboxGroup v-model="contestUpload.uploadType">
+                                                            <Checkbox label="file">{{ $t('studentWeb.courseContent.type.file') }}</Checkbox>
+                                                            <Checkbox label="sokrates">{{ $t('auth.attr2') }}</Checkbox>
+                                                            <!-- <Checkbox label="lesson">{{ $t('schoolStatistics.class.lessonTitle') }}</Checkbox> -->
+                                                            <span>
+                                                                <Icon type="md-alert" color="#ffad16" size="17" />
+                                                                勾选多个,教师将任选一种作品类型上传
+                                                            </span>
+                                                        </CheckboxGroup>
+                                                    </FormItem>
+                                                    <!-- <FormItem :label="$t('activity.workType')">
                                                         <RadioGroup v-model="contestUpload.type">
                                                             <Radio label="file">{{ $t('studentWeb.courseContent.type.file') }}</Radio>
                                                             <Radio label="sokrates" disabled>{{ $t('auth.attr2') }}</Radio>
@@ -185,8 +196,8 @@
                                                                 必须上传视频
                                                             </span>
                                                         </RadioGroup>
-                                                    </FormItem>
-                                                    <FormItem :label="$t('studentWeb.homework.table3')" v-if="contestUpload.type === 'file'" prop="fileType">
+                                                    </FormItem> -->
+                                                    <FormItem :label="$t('studentWeb.homework.table3')" v-if="contestUpload.uploadType.includes('file')" prop="fileType">
                                                         <!-- <CheckboxGroup v-model="contestUpload.fileType" class="tab-check"> -->
                                                         <div class="tab-check">
                                                             <div v-for="(item, index) in fileType" :key="index" class="file-box">
@@ -559,7 +570,10 @@ export default {
                 /* upload: {
                     stime: '',
                     etime: '',
-                    type: 'file', //file文件 sokrates苏格拉底作品 lesson课例
+                    uploadType: [], //可以上传类型 file文件 sokrates苏格拉底作品 lesson课例
+                    uploadTypeNecessary: [], //必须上传类型 file文件 sokrates苏格拉底作品 lesson课例
+                    limit: 0, //必须上传几种类型 0:随意类型 1-3:限制几种 必须>=uploadTypeNecessary.length
+                    //type: 'file', //file文件 sokrates苏格拉底作品 lesson课例(已废弃)
                     fileType: [],
                     desc: '',
                     captainUpload: 0, //0个人 1队长
@@ -579,10 +593,13 @@ export default {
             contestUpload: {
                 stime: '',
                 etime: '',
-                type: 'file', //file文件 sokrates苏格拉底作品
+                // type: 'file', //file文件 sokrates苏格拉底作品
                 fileType: [],
                 desc: '',
                 captainUpload: 0, //0个人 1队长
+                uploadType: [],
+                uploadTypeNecessary: [],
+                limit: 1,
             },
             formatType: [[], [], [], [], []],
             contestReview: {
@@ -645,6 +662,7 @@ export default {
             contestRuleUpload: {
                 stime: [{ required: true, type: 'number', message: this.$t('activity.message.field4'), trigger: 'blur' }],
                 fileType: [{ required: true, message: this.$t('activity.message.field6'), trigger: 'blur', validator: validateFileType }],
+                uploadType: [{ required: true, type: 'array', min: 1, message: this.$t('activity.message.field4'), trigger: 'blur' }],
             },
             contestRuleReview: {
                 stime: [{ required: true, type: 'number', message: this.$t('activity.message.field4'), trigger: 'blur' }],

+ 7 - 2
TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/editContest.vue

@@ -159,7 +159,7 @@ export default {
                             uploadEtime: this.contestInfo.upload.etime,
                             updateDesc: this.contestInfo.upload.desc,
                         }
-                        if(this.contestInfo.upload.type === 'file') {
+                        if(this.contestInfo.upload.uploadType.includes('file') || this.contestInfo.upload.type === 'file') {
                             this.uploadInfo.fileType = this._.cloneDeep(this.contestInfo.upload.fileType)
                             this.uploadInfo.fileType.forEach(item => {
                                 this.fileType.forEach((file, index) => {
@@ -204,6 +204,11 @@ export default {
             },
         },
     },
+    computed: {
+        isArea() {
+            return localStorage.getItem('platform') === 'area'
+        },
+    },
     methods: {
         dateOpenChange(dateType, type) {
             // 日历关闭时判断是否时间重叠
@@ -350,7 +355,7 @@ export default {
                 uploadEtime: this.uploadInfo.uploadEtime,
                 updateDesc: this.uploadInfo.updateDesc,
             }
-            if(this.contestInfo.upload.type === 'file') {
+            if(this.contestInfo.upload.uploadType.includes('file') || this.contestInfo.upload.type === 'file') {
                 params.contestUpdate.fileType = []
                 this.fileType.forEach((item, index) => {
                     if(item.isCheck) {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/skContent.vue

@@ -245,7 +245,7 @@
             <div v-if="teaSignInfo.upload" class="show-box">
                 <p>{{ $t('activity.uploadWork') }}</p>
                 <div v-if="teaSignInfo.upload.files.length">
-                    <div v-for="(item, index) in teaSignInfo.upload.files" :key="index" @click="onPreview(item)">
+                    <div v-for="(item, index) in teaSignInfo.upload.files" :key="index" @click="onPreview(item)" style="color: #004bb4; cursor: pointer;">
                         {{ item.name }}
                     </div>
                 </div>

+ 3 - 2
TEAMModelOS/ClientApp/src/view/signupActivity/infoReleased.vue

@@ -114,13 +114,14 @@
                                                 <span class="time-border">{{ '2023.08.06 - 2023.08.20' }}</span>
                                             </p> -->
                                             <p>{{ $t('activity.workType') }}:
-                                                <span v-if="contestInfo.upload.type === 'file'">
+                                                <span v-if="contestInfo.upload.uploadType.includes('sokrates') || contestInfo.upload.type === 'sokrates'" style="margin-right: 10px;">{{ $t('auth.attr2') }}</span>
+                                                <span v-if="contestInfo.upload.uploadType.includes('lesson') || contestInfo.upload.type === 'lesson'" style="margin-right: 10px;">{{ $t('schoolStatistics.class.lessonTitle') }}</span>
+                                                <span v-if="contestInfo.upload.uploadType.includes('file') || contestInfo.upload.type === 'file'">
                                                     <span style="margin-right: 10px;">{{ $t('studentWeb.courseContent.type.file') }}</span>
                                                     <span class="info-border" v-for="(item, index) in contestInfo.upload.fileType" :key="index">
                                                         {{ item }}
                                                     </span>
                                                 </span>
-                                                <span v-else>{{ $t('auth.attr2') }}</span>
                                             </p>
                                             <p>{{ $t('activity.workRequire') }}:{{ contestInfo.upload.desc || $t('assessment.no') }}</p>
                                             <p>{{ $t('activity.uploadType') }}:{{ contestInfo.upload.captainUpload ? $t('activity.prompt.field7') : $t('activity.prompt.field6') }}</p>