浏览代码

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

jeff 1 年之前
父节点
当前提交
83e60b2ff9

+ 7 - 0
TEAMModelOS/ClientApp/src/components/student-web/ClassRecord/RecordView.vue

@@ -708,6 +708,13 @@ export default {
                             break
                     }
                 })
+                for (let i = 1; i < page.pageData.length; i++) {
+                    // 星光大评分会操作几次就返回几条数据,所以需要去重只显示第一条
+                    if(page.pageData[i - 1].Event === 'RatingStart' && page.pageData[i].Event === 'RatingStart' && page.pageData[i].RatingType && page.pageData[i].RatingType === 'GrandRating' && page.pageData[i - 1].Pgid === page.pageData[i].Pgid) {
+                        page.pageData.splice(i, 1)
+                        i--
+                    }
+                }
                 this.pageList.push(page)
             })
             if(this.baseData) {

+ 62 - 3
TEAMModelOS/ClientApp/src/components/student-web/ClassRecord/SmartRating.vue

@@ -32,10 +32,26 @@
                         <p>{{ $t('cusMgt.rcd.avgScore') }}:{{ item.result }}</p>
                         <img v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork'" :src="item.material" @click="$hevueImgPreview(item.material)" />
                         <template v-else-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'IRS'">
-                            <audio v-if="smartRate.smartRateSummary.mutualSummary.materialDataType === 'Audio'" controls>
+                            <audio v-if="materialDataType === 'Audio' || (materialDataType === 'File' && item.fileType === 'audio')" controls>
                                 <source :src="item.material">
                                 {{ $t('teachContent.notAudio') }}
                             </audio>
+                            <img v-else-if="materialDataType === 'Image' || (materialDataType === 'File' && item.fileType === 'image')" :src="item.material" alt="">
+                            <div v-else-if="materialDataType === 'File'">
+                                <video v-if="item.fileType === 'video'" :src="item.material" width="870" controls="controls" style="max-height: 800px;"></video>
+                                <div v-else class="repair-link-wrap-item-box">
+                                    <div class="file-icon">
+                                        <img :src="$tools.getFileThum(item.fileType, item.fileName)"/>
+                                    </div>
+                                    <div class="file-info">
+                                        <p class="file-name">{{ item.fileName }}</p>
+                                        <div>
+                                            <span @click="onPreview(item)">{{ $t('ability.review.preview')}}</span>
+                                            <span @click="onDownload(item)">{{ $t('ability.review.download')}}</span>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
                             <p v-else v-html="item.material"></p>
                         </template>
                     </div>
@@ -117,6 +133,9 @@ export default {
         }
     },
     computed: {
+        materialDataType() {
+            return this.smartRate.smartRateSummary.mutualSummary?.materialDataType
+        },
         smartType() {
             let types = {
                 value: '',
@@ -206,6 +225,8 @@ export default {
                     let s = lists.find(item => {
                         return item.id === seatID
                     })
+                    s.fileName = ''
+                    s.fileType = ''
                     if(this.smartRate.smartRateSummary.mutualSummary.materialInfos.length) {
                         let materialInfos = this.smartRate.smartRateSummary.mutualSummary.materialInfos.find(info => {
                             return info.id === s.id
@@ -213,9 +234,15 @@ export default {
                         // IRS:文字题 StudentWork:图片
                         if(this.smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork') {
                             s.material = `${this.sas.url}/${this.sas.name}/records/${this.recordInfo.id}${materialInfos.material}?${this.sas.sas}`
+                            s.fileName = materialInfos.material.substr(materialInfos.material.lastIndexOf("/Ans/") + 5)
                         } else {
-                            if(this.smartRate.smartRateSummary.mutualSummary.materialDataType === 'Audio') {
+                            if(this.materialDataType != 'Text') {
                                 s.material = `${this.sas.url}/${this.sas.name}/records/${this.recordInfo.id}${materialInfos.material}?${this.sas.sas}`
+                                s.fileName = materialInfos.material.substr(materialInfos.material.lastIndexOf("/Ans/") + 5)
+                                if(this.materialDataType === 'File') {
+                                    let suffix = this.$tools.getSuffix(materialInfos.material)
+                                    item.fileType = ['jpg', 'png', 'gif'].includes(suffix) ? 'image' : ['mp4', 'webm'].includes(suffix) ? 'video' : ['mp3', 'wav'].includes(suffix) ? 'audio' : (['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'].includes(suffix) ? 'doc' : 'other')
+                                }
                             } else {
                                 s.material = materialInfos.material
                             }
@@ -227,6 +254,8 @@ export default {
                 } else {
                     lists = lists.map(item => {
                         item.material = ''
+                        item.fileName = ''
+                        item.fileType = ''
                         if(item.result === lists[0].result) {
                             item.king = true
                         }
@@ -237,9 +266,15 @@ export default {
                             // IRS:文字题 StudentWork:图片
                             if(this.smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork') {
                                 item.material = `${this.sas.url}/${this.sas.name}/records/${this.recordInfo.id}${materialInfos.material}?${this.sas.sas}`
+                                item.fileName = materialInfos.material.substr(materialInfos.material.lastIndexOf("/Ans/") + 5)
                             } else {
-                                if(this.smartRate.smartRateSummary.mutualSummary.materialDataType === 'Audio') {
+                                if(this.materialDataType != 'Text') {
                                     item.material = `${this.sas.url}/${this.sas.name}/records/${this.recordInfo.id}${materialInfos.material}?${this.sas.sas}`
+                                    item.fileName = materialInfos.material.substr(materialInfos.material.lastIndexOf("/Ans/") + 5)
+                                    if(this.materialDataType === 'File') {
+                                        let suffix = this.$tools.getSuffix(materialInfos.material)
+                                        item.fileType = ['jpg', 'png', 'gif'].includes(suffix) ? 'image' : ['mp4', 'webm'].includes(suffix) ? 'video' : ['mp3', 'wav'].includes(suffix) ? 'audio' : (['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'].includes(suffix) ? 'doc' : 'other')
+                                    }
                                 } else {
                                     item.material = materialInfos.material
                                 }
@@ -310,6 +345,25 @@ export default {
             }
             this.isComment = true
         },
+        /* 预览 */
+        async onPreview(item){
+            let url = item.material
+            if (this.$tools.getSuffix(item.fileName) === 'pdf') {
+                window.open('/web/viewer.html?file=' + encodeURIComponent(url));
+            } else if(item.fileType === 'doc') {
+                window.open('https://view.officeapps.live.com/op/view.aspx?src=' + escape(url));
+            } else if(item.fileType === 'image') {
+                this.$hevueImgPreview(url)
+            } else if(item.fileType === 'link') {
+				window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url)
+            } else {
+                this.$hevueImgPreview(url)
+            }
+        },
+        /* 下载 */
+        async onDownload(item){
+            this.$tools.doDownloadByUrl(item.material, item.fileName)
+        },
     },
 }
 </script>
@@ -365,4 +419,9 @@ export default {
         width: 300px;
     }
 }
+
+.smart-list svg {
+    width: 200px;
+    height: auto;
+}
 </style>

+ 0 - 3
TEAMModelOS/ClientApp/src/utils/evTools.js

@@ -180,7 +180,6 @@ export default {
 			jsonData.exercise.blob = fullPath
 			jsonData.exercise.code = tmdId
 			jsonData.exercise.option = jsonData.item[0].option
-			jsonData.exercise.useAutoScore = jsonData.item[0].useAutoScore || false
 			jsonData.exercise.id = jsonData.id
 			jsonData.exercise.scope = 'private'
 			jsonData.exercise.pid = jsonData.pid
@@ -262,7 +261,6 @@ export default {
 							// 调整渲染试题数据结构
 							jsonData.id = list[i].id
 							jsonData.exercise.question = jsonData.item[0].question
-							jsonData.exercise.useAutoScore = jsonData.item[0].useAutoScore || false
 							jsonData.exercise.createTime = list[i].createTime || 0
 							jsonData.exercise.blob = list[i].blob
 							jsonData.exercise.code = list[i].code
@@ -435,7 +433,6 @@ export default {
 						let jsonData = JSON.parse(await $tools.getFile(url))
 						// 调整渲染试题数据结构
 						jsonData.exercise.question = jsonData.item[0].question
-						jsonData.exercise.useAutoScore = jsonData.item[0].useAutoScore || false
 						jsonData.exercise.blob = url
 						jsonData.exercise.code = code
 						jsonData.exercise.option = jsonData.item[0].option

+ 1 - 1
TEAMModelOS/ClientApp/src/view/areaMgmt/AreaIndex.vue

@@ -13,7 +13,7 @@
 					<p :class="[item.classname === 'size' ? 'size-num' : '', 'right-top-num']">
 						{{ item.num }}<span v-if="item.classname === 'size'">{{ unit.oneself }} </span>
 					</p>
-					<p v-if="item.classname === 'size'" style="font-size:12px;position:absolute;bottom:32px;left:31%;color:red">使用率{{ sizeNums }}%</p>
+					<p v-if="item.classname === 'size'" style="font-size:12px;position:absolute;bottom:32px;left:29%;color:red">{{ $t("areaStatistics.size.use") }} {{ sizeNums }}%</p>
 					<div class="right-top-bottombox">
 						<p class="right-top-title">{{ item.title }}</p>
 						<!-- <div class="right-top-bottombox-comparison" v-if="item.classname === 'school' || item.classname === 'teach' || item.classname === 'datas' || item.classname === 'student'">

+ 83 - 4
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/SmartRating.vue

@@ -36,10 +36,26 @@
                         <p>{{ $t('cusMgt.rcd.avgScore') }}:{{ item.result }}</p>
                         <img v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork'" :src="item.material" @click="$hevueImgPreview(item.material)" />
                         <template v-else-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'IRS'">
-                            <audio v-if="smartRate.smartRateSummary.mutualSummary.materialDataType === 'Audio'" controls>
+                            <audio v-if="materialDataType === 'Audio' || (materialDataType === 'File' && item.fileType === 'audio')" controls>
                                 <source :src="item.material">
                                 {{ $t('teachContent.notAudio') }}
                             </audio>
+                            <img v-else-if="materialDataType === 'Image' || (materialDataType === 'File' && item.fileType === 'image')" :src="item.material" alt="">
+                            <div v-else-if="materialDataType === 'File'">
+                                <video v-if="item.fileType === 'video'" :src="item.material" width="870" controls="controls" style="max-height: 800px;"></video>
+                                <div v-else class="repair-link-wrap-item-box">
+                                    <div class="file-icon">
+                                        <img :src="$tools.getFileThum(item.fileType, item.fileName)"/>
+                                    </div>
+                                    <div class="file-info">
+                                        <p class="file-name">{{ item.fileName }}</p>
+                                        <div>
+                                            <span @click="onPreview(item)">{{ $t('ability.review.preview')}}</span>
+                                            <span @click="onDownload(item)">{{ $t('ability.review.download')}}</span>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
                             <p v-else v-html="item.material"></p>
                         </template>
                     </div>
@@ -126,6 +142,9 @@ export default {
         }
     },
     computed: {
+        materialDataType() {
+            return this.smartRate.smartRateSummary.mutualSummary?.materialDataType
+        },
         smartType() {
             let types = {
                 value: '',
@@ -200,6 +219,8 @@ export default {
                 }
                 lists = lists.map(item => {
                     item.material = ''
+                    item.fileName = ''
+                    item.fileType = ''
                     if(item.result === lists[0].result) {
                         item.king = true
                     }
@@ -207,16 +228,21 @@ export default {
                         let materialInfos = this.smartRate.smartRateSummary.mutualSummary.materialInfos.find(info => {
                             return info.id === item.id
                         })
-                        console.log(materialInfos);
                         // IRS:文字题 StudentWork:图片
                         if(this.smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork') {
                             // let blobInfo = this.recordInfo.scope === 'school' ? this.$store.state.user.schoolProfile : this.$store.state.user.userProfile
                             item.material = `${this.blobInfo.blob_uri}/records/${this.recordInfo.id}${materialInfos.material}${this.blobInfo.blob_sas}`
+                            item.fileName = materialInfos.material.substr(materialInfos.material.lastIndexOf("/Ans/") + 5)
                             item.obtained = materialInfos.obtained.comments
                             item.studentCom = materialInfos.obtained.comments
                         } else {
-                            if(this.smartRate.smartRateSummary.mutualSummary.materialDataType === 'Audio') {
+                            if(this.materialDataType != 'Text') {
                                 item.material = `${this.blobInfo.blob_uri}/records/${this.recordInfo.id}${materialInfos.material}${this.blobInfo.blob_sas}`
+                                item.fileName = materialInfos.material.substr(materialInfos.material.lastIndexOf("/Ans/") + 5)
+                                if(this.materialDataType === 'File') {
+                                    let suffix = this.$tools.getSuffix(materialInfos.material)
+                                    item.fileType = ['jpg', 'png', 'gif'].includes(suffix) ? 'image' : ['mp4', 'webm'].includes(suffix) ? 'video' : ['mp3', 'wav'].includes(suffix) ? 'audio' : (['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'].includes(suffix) ? 'doc' : 'other')
+                                }
                             } else {
                                 item.material = materialInfos.material
                             }
@@ -268,6 +294,25 @@ export default {
             }
             this.isComment = true
         },
+        /* 预览 */
+        async onPreview(item){
+            let url = item.material
+            if (this.$tools.getSuffix(item.fileName) === 'pdf') {
+                window.open('/web/viewer.html?file=' + encodeURIComponent(url));
+            } else if(item.fileType === 'doc') {
+                window.open('https://view.officeapps.live.com/op/view.aspx?src=' + escape(url));
+            } else if(item.fileType === 'image') {
+                this.$hevueImgPreview(url)
+            } else if(item.fileType === 'link') {
+				window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url)
+            } else {
+                this.$hevueImgPreview(url)
+            }
+        },
+        /* 下载 */
+        async onDownload(item){
+            this.$tools.doDownloadByUrl(item.material, item.fileName)
+        },
     },
 }
 </script>
@@ -293,6 +338,40 @@ export default {
         width: 200px;
         height: 200px;
     }
+    
+    .repair-link-wrap-item-box {
+        display: flex;
+        position: relative;
+        // background-color: #e3e3e3;
+        border-radius: 5px;
+        padding: 10px 0;
+        font-size: 14px;
+
+        &:hover {
+            background-color: #ebe9e9;
+        }
+
+        .file-icon {
+            img {
+                width: 45px !important;
+            }
+        }
+
+        .file-info {
+            margin-left: 10px;
+
+            .file-name {
+                font-weight: bold;
+                margin-bottom: 5px;
+            }
+
+            span {
+                color: #16a3b5;
+                margin-right: 15px;
+                cursor: pointer;
+            }
+        }
+    }
 }
 .smart-list {
     // width: 150px;
@@ -336,7 +415,7 @@ export default {
         height: 100%;
     }
 }
-.smart-list .smart-material svg {
+.smart-list svg {
     width: 200px;
     height: auto;
 }

+ 0 - 1
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/SubjectiveAns.vue

@@ -90,7 +90,6 @@ export default {
                                     let suffix = item.substr(item.lastIndexOf(".") + 1)
                                     let isImg = ['jpg', 'png', 'gif'].includes(suffix)
                                     let isDoc = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'].includes(suffix)
-                                    let isPdf = suffix === 'pdf'
                                     let isVideo = suffix === 'mp4' || suffix === 'webm'
                                     let isAudio = ['mp3', 'wav'].includes(suffix)
                                     url.type = isImg ? 'image' : isVideo ? 'video' : isAudio ? 'audio' : (isDoc ? 'doc' : 'other')

+ 7 - 6
TEAMModelOS/ClientApp/src/view/coursemgt/components/MemberTable.vue

@@ -42,12 +42,6 @@ export default {
             }
           },
         },
-        {
-          key: "irs",
-          title: this.$t('courseManage.classroom.studentTableC9'),
-          align: "center",
-          width: 120,
-        },
         {
           key: "no",
           title: this.$t("stuAccount.seatNo"),
@@ -62,6 +56,13 @@ export default {
             }
           },
         },
+        {
+          key: "irs",
+          title: this.$t('courseManage.classroom.studentTableC9'),
+          align: "center",
+          width: 120,
+        },
+        
         
       ],
       data: [],

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.vue

@@ -474,7 +474,7 @@ export default {
       console.log(paper);
       this.$Modal.confirm({
         title: this.$t('evaluation.newExercise.modalTip'),
-        content: `${this.$t('evaluation.paperList.copyTip1')}【${paper.name}】${this.$t('evaluation.paperList.copyTip2')}${this.$t('evaluation.paperList.copyTip3')}?`,
+        content: `${this.$t('evaluation.paperList.copyTip1')}【${paper.name}】${this.$t('evaluation.paperList.copyTip2')}?`,
         onOk: async () => {
           this.dataLoading = true
           try {

+ 5 - 2
TEAMModelOS/ClientApp/src/view/evaluation/types/BaseSubjective.vue

@@ -10,10 +10,10 @@
 			<IconText :text="$t('evaluation.newExercise.answerType.types')" :color="'#07ac88'" :icon="'md-chatbubbles'"></IconText>
 			<div class="types">
 				<span :class="['type-item', answerType === 'text' ? 'type-item-active' : '']" @click="answerType = 'text'">{{ $t("evaluation.newExercise.answerType.text") }}</span>
-				<span :class="['type-item', answerType === 'text_Image' ? 'type-item-active' : '']" @click="answerType = 'text_Image'">{{ $t("evaluation.newExercise.answerType.textImage") }}</span>
+				<!-- <span :class="['type-item', answerType === 'text_Image' ? 'type-item-active' : '']" @click="answerType = 'text_Image'">{{ $t("evaluation.newExercise.answerType.textImage") }}</span> -->
 				<span :class="['type-item', answerType === 'Image' ? 'type-item-active' : '']" @click="answerType = 'Image'">{{ $t("evaluation.newExercise.answerType.image") }}</span>
-				<span :class="['type-item', answerType === 'file' ? 'type-item-active' : '']" @click="answerType = 'file'">{{ $t("evaluation.newExercise.answerType.file") }}</span>
 				<span :class="['type-item', answerType === 'audio' ? 'type-item-active' : '']" @click="answerType = 'audio'">{{ $t("evaluation.newExercise.answerType.audio") }}</span>
+				<span :class="['type-item', answerType === 'file' ? 'type-item-active' : '']" @click="answerType = 'file'">{{ $t("evaluation.newExercise.answerType.file") }}</span>
 				<div style="display: inline-block;" v-if="answerType === 'audio'"> 
 					<span style="margin-right: 10px">{{ $t("evaluation.newExercise.answerType.autoScore") }}</span>
 					<i-switch v-model="useAutoScore" />
@@ -67,6 +67,9 @@
 		methods: {
 			doRender() {
 				this.stemContent = this.editInfo.question;
+				this.answerType = this.editInfo.answerType;
+				this.useAutoScore = this.editInfo.useAutoScore;
+				this.answerLang = this.editInfo.answerLang;
 				this.answerContent = this.editInfo.answer[0];
 				this.answerType = this.editInfo.answerType || "text";
 				this.stemEditor.txt.html(this.editInfo.question);

文件差异内容过多而无法显示
+ 749 - 465
TEAMModelOS/ClientApp/src/view/iot/schooliot.vue