Browse Source

Merge branch 'liqk/develop' into develop

liqk 2 years ago
parent
commit
59b58681f2

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -6019,7 +6019,7 @@ const LANG_EN_US = {
 
         // ExamList.vue
         newest: 'Newest Exams',
-        more: 'View More',
+        more: 'View Report',
 
         // index.vue
         module1: 'Score Analysis',

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -6023,7 +6023,7 @@ const LANG_ZH_CN = {
 
         // ExamList.vue
         newest: '最新测验',
-        more: '查看更多',
+        more: '查看报告',
 
         // index.vue
         module1: '成绩分析',

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -6024,7 +6024,7 @@ const LANG_ZH_TW = {
 
         // ExamList.vue
         newest: '最新評量',
-        more: '查看更多',
+        more: '查看報告',
 
         // index.vue
         module1: '成績分析',

+ 0 - 3
TEAMModelOS/ClientApp/src/api/schoolSetting.js

@@ -6,9 +6,6 @@ export default {
     findSchoolSystem: function (data) {
         return post('/school/init/find', data)
     },
-    findClassInfo: function (data) {
-        return post('/school/classroom/find', data)
-    },
     findSchoolBase: function(schoolCode) {
         let format = {
             "school_code": schoolCode

+ 1 - 1
TEAMModelOS/ClientApp/src/view/auth/Serial.vue

@@ -553,7 +553,7 @@ export default {
                     item.es = 2
                 }
                 //可使用
-                else if (item.expireStatus == "S" || item.expireStatus == "A") {
+                else if (item.endDate != 0 && (item.expireStatus == "S" || item.expireStatus == "A")) {
                     item.es = 3
                 }
                 //永久授權

+ 9 - 3
TEAMModelOS/ClientApp/src/view/classrecord/ClassRecord.less

@@ -180,12 +180,12 @@
 
 .interaction-record-wrap {
     width: 100%;
-    box-shadow: 5px 5px 500px #f0f0f0 inset;
+    // box-shadow: 5px 5px 500px #f0f0f0 inset;
     border-radius: 4px;
     border: 1px solid #f0f0f0;
     margin-bottom: 10px;
     position: relative;
-    background: #f9f9f9;
+    background: #fcfcfc;
     min-height: 300px;
 }
 
@@ -285,7 +285,7 @@
     font-size: 14px;
     width: 110px;
     padding: 3px 10px;
-    border-radius: 4px;
+    border-radius: 3px;
     cursor: pointer;
     height: fit-content;
     transition: background 0.3s;
@@ -469,4 +469,10 @@
 
 .custom-next {
     right: 10px;
+}
+.class-time{
+    color: #a5a5a5;
+}
+.class-time-value{
+    font-size: 13px;
 }

+ 33 - 0
TEAMModelOS/ClientApp/src/view/classrecord/ClassRecord.vue

@@ -100,6 +100,10 @@
                                         </span>
                                         <!-- 课件缩略图 -->
                                         <img class="page-mini-img" @click="openViewer(item.img)" :src="item.img" />
+                                        <p class="class-time">
+                                            <!-- <Icon size="16" type="md-time" /> -->
+                                            <span class="class-time-value">{{item.time}}</span>
+                                        </p>
                                         <!-- <Timeline style="margin-top:10px;margin-left:-5px">
                                             <TimelineItem v-for="(rtItem, rtIndex) in item.pageData" :key="rtIndex +''+index">
                                                 <Icon type="md-arrow-dropright" slot="dot" />
@@ -330,6 +334,31 @@ export default {
             this.curPage = event.pageIndex + 1
             this.$refs.videoPlayer.player.currentTime(event.Time)
         },
+        /**
+         * 处理TimeLine的异常
+         * 页面重复的IRS作答
+         */
+        fixEventData() {
+            this.pageEvents = this.pageEvents.filter((item, index) => {
+                if (item.Event == 'PopQuesLoad') {
+                    let firstIndex = this.pageEvents.findIndex(i => i.Pgid == item.Pgid && item.Event == i.Event)
+                    return firstIndex == index
+                } else {
+                    return true
+                }
+            })
+        },
+        //小于10 补0
+        fullZero(n) {
+            return n < 10 ? `0${n}` : `${n}`
+        },
+        formatTime(time) {
+            let h = Math.floor(time / (60 * 60))
+            time = time % (60 * 60)
+            let m = Math.floor(time / 60)
+            let s = Math.floor(time % 60)
+            return `${this.fullZero(h)}:${this.fullZero(m)}:${this.fullZero(s)}`
+        },
         //根据SokratesRecords.json处理page数据
         async getPageList() {
             this.pageList = []
@@ -344,6 +373,7 @@ export default {
                 this.sokratesRecords = JSON.parse(res)
                 this.pageIds = this.sokratesRecords.PgIdList || []
                 this.pageEvents = this.sokratesRecords.events || []
+                this.fixEventData()
             } catch (e) {
                 hasTimeLine = false
             }
@@ -357,6 +387,8 @@ export default {
                     let pageidEvent = resJson.find(item => item.Event == 'PgidList')
                     this.pageIds = pageidEvent && pageidEvent.PgIdList ? pageidEvent.PgIdList : []
                     this.pageEvents = resJson.filter(item => this.events.includes(item.Event))
+                    this.fixEventData()
+
                     this.sokratesRecords = {
                         events: this.pageEvents,
                         PgIdList: this.pageIds
@@ -425,6 +457,7 @@ export default {
                 page.page = index + 1
                 //当前页面对应的功能事件
                 page.pageData = this.pageEvents.filter(record => record.Pgid === item && this.fnEvents.includes(record.Event))
+                page.time = this.formatTime(page.pageData[0]?.Time)
                 page.pageData.forEach(e => {
                     e.pageIndex = index
                     e.eventName = this.hiTeachEvent[e.Event]?.text

+ 31 - 5
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/Exam.vue

@@ -9,12 +9,14 @@
             <Icon type="md-podium" style="margin-right:5px" />
             {{$t('cusMgt.rcd.evt2')}}
         </div>
-        <div v-else class="exam-chart-wrap">
-            <ExamGrade :pieData="scoreSegment" style="margin-right:50px"></ExamGrade>
-            <ExamQu :quData="correctData[0] ? correctData[0].data : []" style="margin-right:50px"></ExamQu>
-            <ExamTable :examInfo="examDetaiInfo" :recordInfo="recordInfo"></ExamTable>
+        <div v-else>
+            <h3 @click="toEvDetail" class="exam-title">{{examDetaiInfo.name}}</h3>
+            <div class="exam-chart-wrap">
+                <ExamTable class="exam-chart-item" :examInfo="examDetaiInfo" :recordInfo="recordInfo"></ExamTable>
+                <ExamGrade class="exam-chart-item" :pieData="scoreSegment"></ExamGrade>
+                <ExamQu class="exam-chart-item" :quData="correctData[0] ? correctData[0].data : []"></ExamQu>
+            </div>
         </div>
-
     </div>
 </template>
 <script>
@@ -49,6 +51,15 @@ export default {
         }
     },
     methods: {
+        toEvDetail() {
+            this.$router.push({
+                path: '/home/evDetail',
+                query: {
+                    examId: this.examDetaiInfo.id,
+                    code: `Exam-${this.$store.state.userInfo.TEAMModelId}`
+                }
+            })
+        },
         //获取评测简要数据分析
         findSimpleAna() {
             this.simpleData = {}
@@ -300,6 +311,21 @@ export default {
 }
 </script>
 <style lang="less" scoped>
+.exam-title{
+    display: block;
+    // width: 600px;
+    // text-align: center;
+    margin-bottom: 10px;
+    color: #2b85e4;
+    cursor: pointer;
+    &:hover{
+        text-decoration: underline;
+    }
+}
+.exam-chart-item {
+    margin-bottom: 15px;
+    margin-right: 15px;
+}
 .exam-wrap {
     display: flex;
 }

+ 6 - 5
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/ExamGrade.vue

@@ -48,15 +48,15 @@ export default {
                             formatter: '{b} : {c}' + this.$t('unit.text7')
                         },
                         grid: {
-                            left: 24,
+                            left: 34,
                             right: 20,
-                            top: 25,
-                            bottom: 20
+                            top: 35,
+                            bottom: 30
                         },
                         title: {
                             "text": `${this.isTotal ? this.$t('learnActivity.simple.total') : ''}${this.$t('learnActivity.simple.scoreMat')}`,
                             "left": "center",
-                            "top": 0,
+                            "top": 8,
                             "textStyle": {
                                 // "color": "#303030",
                                 fontSize: 12
@@ -110,7 +110,8 @@ export default {
 <style scoped lang="less">
 .ev-score-matrix {
     width: 260px;
-    height: 150px;
+    height: 155px;
+    box-shadow: 0px 2px 5px #e9e9e9;
 }
 </style>
 <style>

+ 7 - 6
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/ExamQu.vue

@@ -48,15 +48,15 @@ export default {
                             formatter: '{b} : {c}' + this.$t('unit.text7')
                         },
                         grid: {
-                            left: 30,
+                            left: 35,
                             right: 20,
-                            top: 25,
-                            bottom: 50
+                            top: 35,
+                            bottom: 30
                         },
                         title: {
                             "text": this.$t('learnActivity.simple.quCorrectRate'),
                             "left": "center",
-                            "top": 0,
+                            "top": 10,
                             "textStyle": {
                                 fontSize: 12
                             }
@@ -145,7 +145,7 @@ export default {
                     this.option.xAxis.data = this.quData.map(item => item.quLabel)
                     // if (this.quData.length) this.option.yAxis.max = this.quData[0].correct + this.quData[0].wrong
                     if (this.quData.length) this.option.yAxis.max = 100 //计算比例不算人数
-                    if (this.quData.length > 8) {
+                    if (this.quData.length > 10) {
                         this.option.dataZoom = [
                             {
                                 show: true,
@@ -200,8 +200,9 @@ export default {
 </script>
 <style scoped lang="less">
 .qu-score-count {
-    width: 260px;
+    width: 575px;
     height: 180px;
+    box-shadow: 0px 2px 5px #e9e9e9;
 }
 </style>
 <style>

+ 1 - 34
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/ExamTable.vue

@@ -54,38 +54,6 @@
                 {{ $t("totalAnalysis.more") }}
             </p>
         </div>
-        <Modal v-model="viewTableStatus" className="ed-name-modal" footer-hide :width="1000">
-            <div slot="header" class="modal-header">
-                详细作答数据
-            </div>
-            <div class="edit-name-content" style="padding-bottom:50px">
-                <Table ref="score-table" class="score-box" border :columns="tableColumn" :data="tableData" :no-data-text="$t('learnActivity.score.classNoStu')">
-                    <template slot-scope="{ row,index }" :slot="'qu'+qIndex" v-for="(item,qIndex) in quCount">
-                        <div :key="'qu'+qIndex" @click="getStuScore(row,qIndex)" style="cursor:pointer;">
-                            <span v-if="row.data[qIndex] == -1 && row.status == 1">- -</span>
-                            <Icon size="20" type="ios-create-outline" color="#2db7f5" v-else-if="row.data[qIndex] == -1 && row.status !== 1" />
-                            <span style="color:#2db7f5;" v-else>{{row.data[qIndex]}}</span>
-                        </div>
-                    </template>
-                    <template slot-scope="{ row }" slot="total">
-                        <span style="color:#2db7f5;">{{ row.total }}</span>
-                    </template>
-                    <template slot-scope="{ row }" slot="name">
-                        <span style="color:#2db7f5;cursor: pointer;" :title="row.id">{{ row.name}}</span>
-                    </template>
-                    <!-- 1: 未作答 2:未评分 3:已评分 4:缺考 5:补考中 -->
-                    <template slot-scope="{ row,index }" slot="status">
-                        <span class="stu-status-tag" :style="{'background':row.statusColor}">
-                            {{row.statusText}}
-                        </span>
-                    </template>
-                    <Loading slot="loading" :top="-50"></Loading>
-                </Table>
-                <div class="page-wrap">
-                    <Page show-total size="small" :current="currentPage" :total="studentScore.length" :page-size="pageSize" :page-size-opts="pageSizeOpts" @on-change="pageChange" @on-page-size-change="pageSizeChange" show-sizer />
-                </div>
-            </div>
-        </Modal>
     </div>
 </template>
 <script>
@@ -109,7 +77,6 @@ export default {
             currentPage: 1,
             pageSize: 10,
             pageSizeOpts: [5, 10, 20, 30, 40],
-            viewTableStatus: false,
             dataLoading: true,
             overviewInfo: {
                 total: 0,
@@ -158,7 +125,7 @@ export default {
                     examId: this.examInfo.id,
                     code: `Exam-${this.$store.state.userInfo.TEAMModelId}`
                 }
-            })  
+            })
         },
         getStatusInfo(answer, score, status) {
             //评测设置学生可以补考