Forráskód Böngészése

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

CrazyIter_Bin 4 éve
szülő
commit
5dc0389697

+ 3 - 3
TEAMModelOS/ClientApp/src/common/UploadModal.vue

@@ -1,7 +1,7 @@
 <template>
     <Modal v-model="uploadStatus" :ok-text="textLoading ? $t('updModal.uploading') : isComplete ? $t('updModal.complete'):$t('updModal.comfirmUpd')" :cancel-text="$t('updModal.cancelUpd')" :title="$t('teachContent.btnUpload')" class="upload-modal dark-iview-modal" width="660" :mask-closable="false" :closable="false" @on-ok="modalOk" @on-cancel="modalCancel" :loading="modalLoading">
         <div class="upload-file-box">
-            <Upload type="drag" action="" :show-upload-list="false" multiple :before-upload="customUpload" class="upload-wrap" :disabled="textLoading" >
+            <Upload type="drag" action="" :show-upload-list="false" multiple :before-upload="customUpload" class="upload-wrap" :disabled="textLoading">
                 <Icon class="upload-icon" custom="iconfont icon-upload" v-show="!uploadedList.length" />
                 <p class="upload-text" :style="{marginTop: uploadedList.length ? '25px':'0px'}">
                     <Icon size="24" style="font-size: 22px;vertical-align: baseline;margin-right: 5px;" custom="iconfont icon-upload" v-show="uploadedList.length" />
@@ -294,7 +294,7 @@ export default {
                                 scope: this.routerScope
                             }).then(
                                 parseRes => {
-                                    this.containerClient.deleteBlob(delBlob)
+                                    this.containerClient.deleteBlob(delBlob, res.size)
                                     this.uploadedList[index].blob = `/res/${res.name}/index.json`
                                     this.uploadedList[index].extension = 'HTEX'
                                     this.uploadedList[index].name = res.name.replace('pptx', 'HTEX').replace('PPTX', 'HTEX')
@@ -349,7 +349,7 @@ export default {
                 this.textLoading = false
                 this.isComplete = true
                 this.modalLoading = false
-                
+
             }
         },
         //处理图片缩略图

+ 6 - 0
TEAMModelOS/ClientApp/src/router/routes.js

@@ -267,6 +267,12 @@ export const routes = [
 				name: 'myCourse',
 				component: resolve => require(['@/view/newcourse/MyCourse.vue'], resolve)
 			},
+			//我的课程查看评测详细数据
+			{
+				path: 'EvDetail',
+				name: 'EvDetail',
+				component: resolve => require(['@/view/newcourse/EvDetail.vue'], resolve)
+			},
 			{
 				path: 'CourseTable',
 				name: 'CourseTable',

+ 0 - 11
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue

@@ -64,15 +64,6 @@
                     <span :class="curBarIndex == 1 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(1)">
                         {{$t('learnActivity.mgtScEv.tab2')}}
                     </span>
-                    <!-- <div style="float:right;" v-show="evaListShow[curEvaIndex] && evaListShow[curEvaIndex].progress == 'going'"> -->
-                    <!-- <div style="float:right;">
-                        <Tooltip :content="$t('learnActivity.mgtScEv.autoTips1')" :max-width="240">
-                            <Button type="success" size="small" :loading="answerLoading" class="mock-stu-answer" @click="mockAnswer">{{$t('learnActivity.mgtScEv.autoAnswer')}}</Button>
-                        </Tooltip>
-                        <Tooltip :content="$t('learnActivity.mgtScEv.autoTips2')" :max-width="240">
-                            <Button type="warning" size="small" :loading="scoreLoading" class="mock-tea-scoring" @click="mockScoring">{{$t('learnActivity.mgtScEv.autoScore')}}</Button>
-                        </Tooltip>
-                    </div> -->
                 </div>
                 <!--试卷信息-->
                 <div :class="curBarIndex == 1 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 1">
@@ -92,7 +83,6 @@
                 <div :class="curBarIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 0">
                     <Scoring :examInfo="examDetaiInfo" ref="score-box"></Scoring>
                 </div>
-
             </div>
         </Split>
     </div>
@@ -332,7 +322,6 @@ export default {
             var D = date.getDate() + ' '
             return Y + M + D;
         },
-
         //查询评测列表
         findEvaluation() {
             let requestData = {

+ 113 - 0
TEAMModelOS/ClientApp/src/view/newcourse/EvDetail.less

@@ -0,0 +1,113 @@
+@first-bgColor: #141414;
+@second-bgColor: #1b1b1b;
+@third-bgColor: #222222;
+@borderColor: #424242;
+@primary-textColor: #fff; //文本主颜色
+@second-textColor: #a5a5a5; //文本副级颜色
+@primary-fontSize: 14px;
+@second-fontSize: 16px;
+.evaluation-detail-wrap {
+    /*width: ~"calc(100% - 400px)";*/
+    width:100%;
+    height: 100%;
+    padding-left: 15px;
+}
+.evaluation-detail-wrap {
+
+    .evaluation-detail-bar {
+        width: 100%;
+        height: 45px;
+        line-height: 45px;
+        border-bottom: 1px solid @borderColor;
+        color: @second-textColor;
+
+        .edit-evaluation {
+            float: right;
+            margin-right: 45px;
+            display: inline-block;
+            cursor: pointer;
+            color: white;
+        }
+
+        .edit-evaluation:hover {
+            color: aqua;
+        }
+
+        .evalustion-bar-item {
+            margin-right: 30px;
+            display: inline-block;
+            cursor: pointer;
+            line-height: 38px;
+        }
+
+        .evalustion-bar-item-active {
+            color: white;
+            border-bottom: 2px solid white;
+        }
+    }
+
+    .evaluation-base-info {
+        width: 100%;
+        height: ~"calc(100% - 45px)";
+
+        .evalustion-base-attr {
+            width: 350px;
+            height: 100%;
+            border-right: 1px solid @borderColor;
+
+            .evalustion-base-attr-header {
+                height: 45px;
+                line-height: 45px;
+                color: @second-textColor;
+                border-bottom: 1px solid @borderColor;
+                margin-bottom: 25px;
+            }
+
+            .evaluation-attr-form {
+                margin-right: 15px;
+                /*color: white;*/
+            }
+        }
+
+        .evaluation-test-paper-header {
+            height: 45px;
+            line-height: 45px;
+            color: @second-textColor;
+            border-bottom: 1px solid @borderColor;
+            margin-bottom:15px;
+        }
+    }
+}
+.test-paper-detail {
+    width: 100%;
+    height: 100%;
+    color: white;
+}
+.test-paper-detail .back-to-top {
+    position: fixed;
+    right: 50px;
+    bottom: 30px;
+    height: 48px;
+    width: 50px;
+    background: #595959;
+    z-index: 99999;
+    cursor: pointer;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+
+.test-paper-detail .back-to-top:hover {
+    background: rgb(128,128,128);
+}
+
+.test-paper-detail .back-to-top .ivu-icon {
+    font-size: 26px;
+    color: white;
+}
+.back-to-cus{
+    float: right;
+    margin-right: 10px;
+    margin-top: 10px;
+}

+ 131 - 0
TEAMModelOS/ClientApp/src/view/newcourse/EvDetail.vue

@@ -0,0 +1,131 @@
+<template>
+    <div class="evaluation-detail-wrap">
+        <!--顶部菜单-->
+        <div class="evaluation-detail-bar">
+            <span :class="curBarIndex == 0 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="curBarIndex = 0">
+                {{$t('learnActivity.mgtScEv.tab1')}}
+            </span>
+            <span :class="curBarIndex == 1 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="curBarIndex = 1">
+                {{$t('learnActivity.mgtScEv.tab2')}}
+            </span>
+            <Button type="info" size="small" @click="goBack" class="back-to-cus">
+                <Icon custom="iconfont icon-arrow" size="12" style="vertical-align: baseline;" />
+                返回
+            </Button>
+        </div>
+        <!--试卷信息-->
+        <div :class="curBarIndex == 1 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 1">
+            <div class="test-paper-detail" style="margin-top:5px;">
+                <vuescroll ref="test-paper-detail" @handle-scroll="checkBackTop">
+                    <!--试卷题目信息-->
+                    <TestPaper v-if="examInfo && examInfo.papers" :paper="examInfo.papers[curSubIndex]" style="color:#515a6e;margin-top:-30px;" :isShowTools="false" isExamPaper></TestPaper>
+                    <EmptyData v-else style="margin-top:60px;"></EmptyData>
+                    <!--返回顶部-->
+                    <div class="back-to-top fl-col-center" :title="$t('learnActivity.mgtScEv.returnTop')" v-if="showBack" @click="handleBackToTop">
+                        <Icon type="ios-arrow-up" />
+                    </div>
+                </vuescroll>
+            </div>
+        </div>
+        <!-- 试卷评测打分 -->
+        <div :class="curBarIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 0">
+            <Scoring :examInfo="examInfo" ref="score-box"></Scoring>
+        </div>
+    </div>
+</template>
+<script>
+import TestPaper from '@/view/evaluation/index/TestPaper.vue'
+import Scoring from '@/view/learnactivity/Scoring.vue'
+export default {
+    components: {
+        TestPaper,
+        Scoring
+    },
+    data() {
+        return {
+            showBack: false,
+            curBarIndex: 0,
+            curSubIndex: 0,
+            isLoading: false,
+            examInfo: {}
+        }
+    },
+    methods: {
+        goBack() {
+            this.$router.push({
+                path: '/home/myCourse'
+            })
+        },
+        /**
+         * 判断是否显示回到顶部按钮
+         * @param vertical
+         * @param horizontal
+         * @param nativeEvent
+         */
+        checkBackTop(vertical, horizontal, nativeEvent) {
+            if (vertical.scrollTop > 100) {
+                this.showBack = true
+            } else {
+                this.showBack = false
+            }
+        },
+        /**vuescroll回到顶部 */
+        handleBackToTop() {
+            this.$refs['test-paper-detail'].scrollTo(
+                { y: '0' }, 300
+            )
+        },
+        //查询当前评测的完整信息
+        findExamInfo(examId, code) {
+            let requestData = {
+                id: examId,
+                code: code
+            }
+            this.isLoading = true
+            this.$api.learnActivity.FindExamInfos(requestData).then(
+                async res => {
+                    if (!res.error) {
+                        let resData = res.examInfo[0]
+                        resData.score = 0
+                        for (let index in resData.papers) {
+                            resData.score += resData.papers[index].point.reduce((total, item) => {
+                                return total + parseInt(item)
+                            }, 0)
+                            if (resData.papers[index].blob) {
+                                let blob = resData.papers[index].blob
+                                resData.papers[index].examScope = resData.scope
+                                resData.papers[index].examId = resData.id
+                                resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
+                                resData.papers[index].blob = blob
+                                resData.score += resData.papers[index].score
+                            }
+                        }
+                        this.examInfo = resData
+                    } else {
+                        this.$Message.error('API ERROR!')
+                    }
+                },
+                err => {
+                    this.$Message.error('API ERROR!')
+                }
+            ).finally(() => {
+                this.isLoading = false;
+            })
+        }
+    },
+    created() {
+        let examId = this.$route.query.examId
+        let code = this.$route.query.code
+        if (examId && code) {
+            this.findExamInfo(examId, code)
+        } else {
+            this.$Message.error('参数错误,无法查看当前评测数据')
+        }
+    }
+}
+</script>
+<style scoped lang="less">
+@import "./EvDetail.less";
+</style>
+<style lang="less">
+</style>

+ 17 - 0
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less

@@ -131,4 +131,21 @@
 .action-btn-wrap {
     margin-left:20px;
     cursor:pointer;
+}
+.evaluation-status-tag {
+    padding: 1px 2px;
+    border: 1px solid #1CC0F3;
+    margin-left: 2px;
+    border-radius: 2px;
+    font-size:12px;
+    vertical-align: text-bottom;
+}
+.ev-attr-wrap{
+    margin-right: 20px;
+    color: white;
+    margin-top: 5px;
+    display: inline-block;
+    .attr-label{
+        color: #a5a5a5;
+    }
 }

+ 173 - 3
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -35,7 +35,7 @@
                             <div v-for="(item,index) in courseListP" :key="index" @click="selectCourse(index)" :class="index === curCusIndex ? 'course-list-item block-bg block-bg-active':'course-list-item block-bg'">
                                 <p class="course-name">
                                     {{item.name}}
-                                    <Icon type="ios-information-circle-outline" @click="toggleCusInfo" :title="$t('cusMgt.cusInfo')"/>
+                                    <Icon type="ios-information-circle-outline" @click="toggleCusInfo" :title="$t('cusMgt.cusInfo')" />
                                 </p>
                                 <p class="course-code">
                                     <Icon type="md-pricetags" />
@@ -80,9 +80,11 @@
                 </div>
             </div>
             <div class="course-classroom-info" id="table-height">
-                <div class="course-classroom-info-header" style="padding-right:50px;">
+                <div class="course-classroom-info-header" style="padding-right:30px;">
                     <span @click="tabName = 'record'" :class="tabName == 'record' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label line-bottom'">课堂记录</span>
+                    <span @click="getActivityList()" :class="tabName == 'activity' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label line-bottom'">活动记录</span>
                     <span @click="tabName = 'stus'" :class="tabName == 'stus' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label line-bottom'">{{$t('courseManage.classroom.studentList')}}</span>
+
                     <div style="float:right;color:white;" v-if="(listType == 'private' && tabName == 'stus') || (listType == 'school' && tabName == 'stus' && classList[curClassIndex].openType == 2)">
                         <span class="action-btn-wrap" @click="delStudents">
                             <Icon type="md-trash" size="16" />
@@ -101,7 +103,16 @@
                             分组视图
                         </span>-->
                     </div>
+                    <div style="float:right;color:white;" v-if="tabName == 'activity'" class="dark-iview-select">
+                        <span class="action-btn-wrap" @click="delStudents">
+                            活动类型:
+                        </span>
+                        <Select v-model="curAcType" style="width:160px" size="small">
+                            <Option v-for="item in acTypeList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+                        </Select>
+                    </div>
                 </div>
+                <!-- 学生名单 -->
                 <div class="course-classroom-info-content dark-iview-table animated fadeIn" v-show="tabName == 'stus'">
                     <vuescroll style="height:100%;">
                         <Table :columns="studentColumn" :data="students" @on-selection-change="(selections)=>{delSelection = selections}" :height="tableHeight" class="system-classroom-table" :loading="stuLoading" no-data-text="暂无学生">
@@ -118,6 +129,7 @@
                         </Table>
                     </vuescroll>
                 </div>
+                <!-- 课堂记录 -->
                 <div v-show="tabName == 'record'" class="animated fadeIn class-record-wrap">
                     <vuescroll>
                         <List>
@@ -147,6 +159,47 @@
                         <p style="width:100%;text-align:center;color:#808080;margin-top:20px;">暂未对接HiTeach上传数据</p>
                     </vuescroll>
                 </div>
+                <!-- 活动记录 -->
+                <div v-show="tabName == 'activity'" class="animated fadeIn class-record-wrap">
+                    <vuescroll>
+                        <List>
+                            <ListItem v-for="(item,index) in evList" :key="index" style="border-color:#505050;cursor: pointer;">
+                                <ListItemMeta @click.native="toEvDetail(index)">
+                                    <p slot="title" class="record-name">
+                                        {{item.name}}
+                                        <span class="evaluation-status-tag" :style="{ borderColor: item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#ed4014', color: (item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#ed4014')}">
+                                            {{ item.progress == 'pending' ? $t('learnActivity.mgtScEv.pending') : item.progress == 'going' ? $t('learnActivity.mgtScEv.going') : $t('learnActivity.mgtScEv.finish') }}
+                                        </span>
+                                    </p>
+                                    <span slot="avatar" style="margin-top:12px;display: inline-block;margin-left:10px;">
+                                        <Icon custom="iconfont icon-test" size="30" color="white" />
+                                    </span>
+                                    <div slot="description">
+                                        <span class="ev-attr-wrap">
+                                            <span class="attr-label">
+                                                <Icon type="md-time" size="16" />
+                                                {{$t('learnActivity.mgtScEv.createTime')}}
+                                            </span>
+                                            <span class="attr-value">
+                                                {{dateFormat(item.startTime)}}
+                                            </span>
+                                        </span>
+                                        <span class="ev-attr-wrap">
+                                            <span class="attr-label">
+                                                <Icon type="ios-cube" size="14" />
+                                                {{$t('learnActivity.mgtScEv.evType')}}
+                                            </span>
+                                            <span class="attr-value">
+                                                {{getTypeLabel(item.type)}}
+                                            </span>
+                                        </span>
+                                    </div>
+                                </ListItemMeta>
+                            </ListItem>
+                        </List>
+                        <!-- <p style="width:100%;text-align:center;color:#808080;margin-top:20px;">暂未对接活动列表数据</p> -->
+                    </vuescroll>
+                </div>
             </div>
         </div>
         <Drawer :title="$t('cusMgt.cusInfo')" class-name="dark-iview-drawer" width="450" :closable="false" v-model="showCusInfo" @on-close="baseEditStatus = true">
@@ -241,6 +294,34 @@ export default {
             }
         }
         return {
+            acTypeList: [
+                {
+                    label: '评测',
+                    value: 'ev'
+                },
+                {
+                    label: '投票',
+                    value: 'vote'
+                },
+                {
+                    label: '问卷',
+                    value: 'qu'
+                },
+                {
+                    label: '作业',
+                    value: 'hw'
+                },
+                {
+                    label: '自主学习',
+                    value: 'sl'
+                }
+            ],
+            curAcType: 'ev',
+            evList: [],//评测列表
+            voteList: [],//投票列表
+            quList: [],//问卷列表
+            hwList: [],//作业列表
+            slList: [],//自主学习
             delSelection: [],
             selections: [],
             schoolClassList: [],
@@ -270,7 +351,7 @@ export default {
                     sortable: true
                 },
                 {
-                    title:this.$t('cusMgt.stuClassCol4'),
+                    title: this.$t('cusMgt.stuClassCol4'),
                     slot: 'groupId',
                     align: 'center',
                     sortable: true
@@ -323,6 +404,84 @@ export default {
         }
     },
     methods: {
+        /**获取type对应的label */
+        getTypeLabel(code) {
+            for (let item of this.$GLOBAL.EV_TYPE()) {
+                if (item.value == code) {
+                    return item.label
+                }
+            }
+        },
+        //时间戳转换
+        dateFormat(timestamp) {
+            var date = new Date(timestamp)
+            var Y = date.getFullYear() + '-'
+            var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+            var D = date.getDate() + ' '
+            return Y + M + D;
+        },
+        //获取活动列表
+        getActivityList() {
+            this.tabName = 'activity'
+            switch (this.curAcType) {
+                case 'ev':
+                    if (this.evList.length) break //首次(数组为空)访问数据
+                    this.getEvList()
+                    break
+                case 'vote':
+                    if (this.evList.length) break
+                    this.getVoteList()
+                    break
+                case 'qu':
+                    if (this.evList.length) break
+                    this.getQuList()
+                    break
+                case 'hw':
+                    if (this.evList.length) break
+                    this.getHwList()
+                    break
+                case 'sl':
+                    if (this.evList.length) break
+                    this.getSlList()
+                    break
+                default:
+                    break
+            }
+        },
+        //获取评测列表
+        getEvList() {
+            let requestData = {
+                code: this.$store.state.userInfo.TEAMModelId
+            }
+            this.$api.learnActivity.FindExamInfo(requestData).then(
+                res => {
+                    if (!res.error) {
+                        res.examInfo = res.examInfo.sort((a, b) => {
+                            return a.createTime - b.createTime > 0 ? -1 : 1
+                        })
+                        this.evList = res.examInfo
+                    } else {
+                        this$Message.error('API ERROR!')
+                    }
+                }
+            )
+        },
+        //获取投票列表
+        getVoteList() {
+
+        },
+        //获取问卷列表
+        getQuList() {
+
+        },
+        //获取作业列表
+        getHwList() {
+
+        },
+        //获取自主学习列表
+        getSlList() {
+
+        },
         getClassType(scope, openType) {
             if (this.listType == 'private') {
                 return {
@@ -742,12 +901,23 @@ export default {
                 this.findClassStu()
             }
         },
+        //查看课堂记录详情
         toClassRecoerd() {
             this.listLoading = true
             setTimeout(() => {
                 this.$router.push({ path: '/home/classRecord' })
             }, 500)
         },
+        // 查看评测详情
+        toEvDetail(index) {
+            this.$router.push({
+                path: '/home/evDetail',
+                query: {
+                    examId: this.evList[index].id,
+                    code: this.evList[index].code
+                }
+            })
+        },
         //删除个人课程
         delCourse() {
             this.$Modal.confirm({