Ver Fonte

Merge branch 'develop3.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0-tmd

zhouj1203@hotmail.com há 4 anos atrás
pai
commit
31eebbfdf2

+ 74 - 3
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testpop.css

@@ -60,6 +60,9 @@
     padding: 2px 5px;
     /*background-color: #ececec;*/
 }
+.select-item{
+    background-color:#00ac60 !important;
+} 
 .lesson-test-pop .testTitle {
     background-color: #ffffff;
     color: #24b880;
@@ -77,21 +80,31 @@
 .compose-box {
     background-color: #24b880;
     color: white;
-    width: 75%;
+    width: 85%;
     border-radius: 6px;
 }
 .compose-item {
     display: flex;
     margin-left: 10px;
-    max-height: 400px;
+    max-height: 350px;
     overflow-y: scroll;
 }
 .compose-content {
     margin-top:30px;
-    width: 75%;
+    width: 85%;
     height: 200px;
     z-index: 0;
 }
+.que-content {
+    display:flex;
+    margin-top:20px;
+    width:85%;
+}
+.que-item{
+    width:100%;
+    max-height:400px;
+    overflow-y:scroll;
+}
 .lesson-test-pop .warmMessage {
     z-index: 999;
 }
@@ -472,6 +485,7 @@
   .lesson-test-pop .md-ansSheetGroup {
     display: none;
   }
+
 }
 @media screen and (min-width: 992px) {
   .lesson-test-pop .sm-ansSheetGroup {
@@ -506,6 +520,63 @@
     .lesson-test-pop .myTestProgressNumEn {
         display: none;
     }
+
+    .lesson-test-pop .checkAnswer {
+        margin-top: 30px;
+        min-height: 300px;
+    }
+    .complete-content {
+        width: 35%;
+        margin-top: 50px;
+    }
+    .compose-box {
+        background-color: #24b880;
+        color: white;
+        width: 95%;
+        border-radius: 6px;
+    }
+    .compose-item {
+        display: flex;
+        margin-left: 10px;
+        max-height: 200px;
+        overflow-y: scroll;
+    }
+    .compose-content {
+        margin-top: 30px;
+        width: 95%;
+        height: 200px;
+        margin-bottom:30px;
+        z-index: 0;
+    }
+    .que-content {
+        display: flex;
+        margin-top: 20px;
+        width: 95%;
+    }
+
+    .que-item {
+        width: 100%;
+        max-height: 200px;
+        overflow-y: scroll;
+    }
+    .lesson-test-pop .questionContent {
+        padding: 20px 20px;
+    }
+    .lesson-test-pop .questionArea {
+        position: relative;
+        display: block;
+        overflow: auto;
+        height: 95vh;
+        background-color: #ffffff;
+        left: 0px;
+    }
+    .lesson-test-pop .pageCtl2 {
+        position: relative;
+        float: right;
+        display: inline-flex;
+        width: 100%;
+        font-weight: 900;
+    }
 }
 @media screen and (max-width: 991px) {
     .lesson-test-pop .testTitle .ques-filter {

Diff do ficheiro suprimidas por serem muito extensas
+ 42 - 47
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestPop.vue


+ 8 - 8
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/composePaper.vue

@@ -36,12 +36,14 @@
             }
         },
         methods: {
-            getInfo() {
-                this.initEditor()
+            async getInfo() {
                 this.examInfo = []
+                await this.initEditor()
+                //console.log('87978978978978978978978998')
+                //console.log(this.$store.getters.getExamInfo)
                 if (this.textData.length > 0) {
                     this.examInfo = [...this.textData]
-                        this.editor.txt.html(this.examInfo[0])
+                    this.editor.txt.html(this.examInfo[0])
                 }
             },
             initEditor() {
@@ -66,7 +68,7 @@
                 //    return true; // 返回 true 表示校验成功
                 //};
                 this.editor.config.placeholder = '请输入作答结果'
-                this.editor.config.height = 300
+                this.editor.config.height = 200
                 this.editor.config.showLinkImg = false;
                 this.editor.config.uploadImgShowBase64 = true; // 使用 base64 保存图片不建议使用这种,我只是图个方便
                 // editor.customConfig.uploadImgServer = '/upload'  // 上传图片到服务器
@@ -86,12 +88,10 @@
             index() {
                 this.getInfo()
                 deep: true;
-                immediate:true
+                //immediate:true
             },
             editorContent() {
-                if (this.editorContent !== "") {
-                    this.$emit("dataGet", this.editorContent, this.index)
-                }
+                this.$emit("dataGet", this.editorContent, this.index)
             }
         }
 	}

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

@@ -311,6 +311,56 @@ export default {
 			}
 		})
 	},
+	/* 获取完整的试卷数据 */
+	getComposeItem(paper) {
+		return new Promise(async (r, j) => {
+			let blobHost = JSON.parse(decodeURIComponent(localStorage.student_profile, "utf-8")).blob_uri
+			let splitHost = blobHost.split('/')
+			// 根据试卷的Blob地址 去读取JSON文件
+			let sasString = paper.scope === 'school' ? await $tools.getSchoolSas(paper.code) : await $tools.getPrivateSas(paper.code)
+			try {
+				let jsonInfo = await $tools.getFile(sasString.url + '/' + paper.code + paper.blob + '/index.json' + sasString.sas)
+				let jsonData = JSON.parse(jsonInfo)
+				console.log('2354563215135131')
+				console.log(jsonData)
+				// 获取试卷包含的试题数据并包装好
+				if (jsonData.slides && jsonData.slides.length) {
+					jsonData.item = []
+					const path = sasString.url + '/' + paper.code + paper.blob
+					let promiseArr = []
+
+					//jsonData.slides.forEach((item, index) => {
+					//	promiseArr.push(new Promise(async (resolve, reject) => {
+					//		// 获取题目JSON并且包装成完整试题对象
+					//		let itemJson = JSON.parse(await $tools.getFile(path + '/' + item.url + sasString.sas))
+					//		itemJson.exercise.question = itemJson.item[0].question
+					//		itemJson.exercise.option = itemJson.item[0].option
+					//		itemJson.exercise.id = itemJson.id
+					//		itemJson.exercise.pid = itemJson.pid
+					//		itemJson.exercise.score = item.scoring ? item.scoring.score : 0,
+					//			// jsonData.item.push(itemJson.exercise)
+					//			resolve(itemJson.exercise)
+					//	}))
+					//})
+
+					//Promise.all(promiseArr).then(res => {
+					//	res.forEach((resItem, resIndex) => {
+					//		resItem.children = []
+					//		if (resItem.pid) {
+					//			let pItem = res.filter(i => i.id === resItem.pid)[0]
+					//			pItem.children.push(resItem)
+					//			pItem.score = pItem.score + resItem.score
+					//		}
+					//	})
+					//	jsonData.item = res.filter(i => !i.pid)
+					//	r(jsonData)
+					//})
+				}
+			} catch (e) {
+				j(e)
+			}
+		})
+	},
 	
 	/* 提取富文本内容中的文本 */
 	getSimpleText(html) {