Browse Source

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

zhouj1203@hotmail.com 3 years ago
parent
commit
7cfadea944

+ 2 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js

@@ -81,7 +81,8 @@ export default {
         copyTitle: 'Copy Assessment',
         copyContent: 'Are you sure to copy the assessment?',
         copyContent1: 'Smarter Classroom Assessment cannot be copied.',
-        paperExam:'紙本測驗'
+        paperExam:'紙本測驗',
+        loadAll:'已加載所有數據'
     },
 
     //CreateEv

+ 4 - 2
TEAMModelOS/ClientApp/src/locale/lang/en-US/teachermgmt.js

@@ -276,7 +276,8 @@ export default {
     importTips7: '5. note: 教師備註信息,選填;',
     importTips8: '溫馨提示:如果導入教師醍摩豆ID,或者導入的手機或郵箱已註冊醍摩豆ID,系統會自動邀請老師加入學校。',
     importTips9: '點擊或者拖拽文件導入',
-    impText1: '導入總人數:',
+    impText:'無效數據(沒有名字):',
+    impText1: '有效導入數據:',
     impText2: '僅導入姓名:',
     impText3: '系統將自動邀請:',
     impText4: '重新導入',
@@ -293,5 +294,6 @@ export default {
     joinTips2: '綁定學校尚未加入的老師:',
     hasLeader: '當前老師已經是組長了',
     export: '導出名單',
-    teacherList: '教師名單'
+    teacherList: '教師名單',
+    noIpmtData:'暫無可導入數據'
 }

+ 2 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js

@@ -81,7 +81,8 @@ export default {
         copyTitle: '复制评测',
         copyContent: '确认复制当前评测吗?',
         copyContent1: '课中评测不能进行复制操作。',
-        paperExam:'纸本测验'
+        paperExam:'纸本测验',
+        loadAll:'已加载所有数据',
     },
 
     //CreateEv

+ 4 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachermgmt.js

@@ -275,7 +275,8 @@ export default {
     importTips7:'5. note: 教师备注信息,选填;',
     importTips8:'温馨提示:如果导入教师醍摩豆ID,或者导入的手机或邮箱已注册醍摩豆ID,系统会自动邀请老师加入学校。',
     importTips9:'点击或者拖拽文件导入',
-    impText1:'导入总人数:',
+    impText:'无效数据(没有名字):',
+    impText1:'有效导入数据:',
     impText2:'仅导入姓名:',
     impText3:'系统将自动邀请:',
     impText4:'重新导入',
@@ -292,5 +293,6 @@ export default {
     joinTips2:'绑定学校尚未加入的老师:',
     hasLeader:'当前老师已经是组长了',
     export:'导出名单',
-    teacherList:'教师名单'
+    teacherList:'教师名单',
+    noIpmtData:'暂无可导入数据'
 }

+ 2 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js

@@ -81,7 +81,8 @@ export default {
         copyTitle: '複製評量',
         copyContent: '確認複製當前評量嗎?',
         copyContent1: '課中評量不能進行複製操作。',
-        paperExam:'紙本測驗'
+        paperExam:'紙本測驗',
+        loadAll:'已加載所有數據',
     },
 
     //建立評量學校/個人

+ 4 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/teachermgmt.js

@@ -275,7 +275,8 @@ export default {
     importTips7:'5. note: 教師備註信息,選填;',
     importTips8:'溫馨提示:如果導入教師醍摩豆ID,或者導入的手機或郵箱已註冊醍摩豆ID,系統會自動邀請老師加入學校。',
     importTips9:'點擊或者拖拽文件導入',
-    impText1:'導入總人數:',
+    impText:'無效數據(沒有名字):',
+    impText1:'有效導入數據:',
     impText2:'僅導入姓名:',
     impText3:'系統將自動邀請:',
     impText4:'重新導入',
@@ -292,5 +293,6 @@ export default {
     joinTips2:'綁定學校尚未加入的老師:',
     hasLeader:'當前老師已經是組長了',
     export:'導出名單',
-    teacherList:'教師名單'
+    teacherList:'教師名單',
+    noIpmtData:'暫無可導入數據'
 }

+ 41 - 6
TEAMModelOS/ClientApp/src/view/assessment/Assessment.vue

@@ -12,21 +12,21 @@
 						</Option>
 					</Select>
 					<!-- 状态选择 -->
-					<Select v-model="curStatus" style="width:200px;margin-left: 15px;" @on-change="doFilter">
+					<Select v-model="curStatus" style="width:150px;margin-left: 15px;" @on-change="doFilter">
 						<Option v-for="(item,index) in statusList" :value="index" :key="index">
 							{{ item }} 
 							<span v-if="index > 0">( {{ getStatusCount(index - 2) }}人 )</span>
 						</Option>
 					</Select>
 					<!-- 特殊选择 -->
-					<Select v-model="curNoSubmit" style="width:200px;margin-left: 15px;" @on-change="doFilter" placeholder="选择更多条件" clearable>
+					<Select v-model="curNoSubmit" style="width:150px;margin-left: 15px;" @on-change="doFilter" placeholder="选择更多条件" clearable>
 						<Option v-for="(item,index) in noSubmitList" :value="index" :key="index">
 							{{ item }} 
 						</Option>
 					</Select>
 					<!-- 搜索框 -->
 					<Input v-special-char v-model="searchVal" suffix="ios-search" :placeholder="$t('ability.place1')"
-						style="width: auto;margin-left: 15px;" @on-click="doFilter" @on-enter="doFilter" />
+						style="width: 150px;margin-left: 15px;" @on-click="doFilter" @on-enter="doFilter" />
 					<!-- 人数统计 -->
 					<span style="margin-left: 10px;">
@@ -43,6 +43,10 @@
 					</span>
 				</div>
 				<div class="assessment-header-right">
+					<span class="tool-item" @click="onExportTable">
+						<Icon type="md-download"></Icon>
+						<span>导出</span>
+					</span>
 					<span class="tool-item">
 						<i-switch size="large" @on-change="onExpandAllChange">
 							<span slot="open">收起</span>
@@ -50,9 +54,12 @@
 						</i-switch>
 					</span>
 					<span class="tool-item">
-						<span>开启互评</span>
-						<i-switch v-model="isOpenAppraise" @on-change="onSwitchChange"
-							:before-change="beforeHpAppraiseChange" />
+						<span>互评</span>
+						<i-switch v-model="isOpenAppraise" size="large" @on-change="onSwitchChange"
+							:before-change="beforeHpAppraiseChange">
+							<span slot="open">开启</span>
+							<span slot="close">关闭</span>
+						</i-switch>	
 					</span>
 					<span class="tool-item" @click="doUploadProvince" v-if="hasAreaAccess">
 						<Icon type="ios-paper-plane" size="18"/> {{ `推送省平台` }}
@@ -301,6 +308,7 @@
 <script>
 	import Review from '@/view/ability/Review'
 	import VideoReview from '@/view/video/VideoReview'
+	import excel from '@/utils/excel.js'
 	export default {
 		components: {
 			Review,
@@ -619,6 +627,33 @@
 			this.getAssessmentList()
 		},
 		methods: {
+			/* 导出表格数据 */
+			onExportTable(){
+				console.log(this.assessmentList)
+				let header = ['姓名','总学时','线上研修学时','认证材料学时','校本研修学时','课堂实录学时','认证材料未提交数','作业未提交数','课堂实录是否提交']
+				let keys = ['name','totalTime','online','ability','offline','video','noAbilityCount','noHwCount','isSubmitVideo']
+				let datas = this.assessmentList.map(i => {
+					return {
+						name:i.userInfo.name,
+						totalTime:i.totalTime,
+						online:i.hoursArr[0],
+						ability:i.hoursArr[1],
+						offline:i.hoursArr[2],
+						video:i.hoursArr[3],
+						noAbilityCount:i.abilities.filter(i => i.zpscore === -1).length,
+						noHwCount:i.trains.filter(item => item.haswork && !item.url).length,
+						isSubmitVideo:i.video ? '已提交':'未提交'
+					}
+				})
+				console.error(datas)
+				const params = {
+					title: header,
+					key:keys,
+					data: datas,
+					filename: this.$store.state.user.schoolProfile.school_base.name + '研修情况统计表'
+				}
+				excel.export_array_to_excel(params)
+			},
 			/* 全部展开或收起 */
 			onExpandAllChange(val){
 				this.expandedArr = val ? this.assessmentList.map((i,index) => index) : []

+ 5 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/ExamMgt.less

@@ -34,7 +34,7 @@
 
     .evaluation-list-main {
         width: 100%;
-        height: ~"calc(100% - 45px)";
+        height: ~"calc(100% - 50px)";
 
         .evaluation-item {
             padding: 15px 10px 15px 15px;
@@ -176,4 +176,8 @@
     &:hover{
         color: #2db7f5;
     }
+}
+.ev-list-scroll{
+    width: 100%;
+    height: 100%;
 }

+ 158 - 136
TEAMModelOS/ClientApp/src/view/learnactivity/ExamMgt.vue

@@ -9,9 +9,9 @@
                         {{ scope == 'school' ? $t('learnActivity.mgtScEv.listLabel1') : $t('learnActivity.mgtScEv.listLabel2') }}
                     </b>
                     <div style="float:right" v-if="!isSearch">
-                        <Icon type="md-add" class=" to-create-icon" @click="goToCreate" :title="$t('learnActivity.mgtScEv.create')" v-if="$access.can('admin.*|schoolAc-upd')" />
+                        <Icon type="md-add" class=" to-create-icon" @click="goToCreate" :title="$t('learnActivity.mgtScEv.create')" v-if="evAuthStatus" />
                         <Icon type="md-copy" class=" to-create-icon" @click="copyEv" :title="$t('learnActivity.mgtScEv.copy')" />
-                        <Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" v-if="$access.can('admin.*|schoolAc-upd')" />
+                        <Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" v-if="evAuthStatus" />
                         <!-- <Icon type="md-create" v-show="evaListShow.length && evaListShow[curEvaIndex] && evaListShow[curEvaIndex].progress == 'pending'" class="to-create-icon" @click="editEvaluation" :title="$t('learnActivity.mgtScEv.edit')" v-if="$access.can('admin.*|schoolAc-upd')" /> -->
                         <!-- 筛选 -->
                         <Poptip style="float:right" trigger="click" :offset="-10" theme="light">
@@ -19,7 +19,7 @@
                             <div slot="content">
                                 <div class="filter-item">
                                     <span>{{$t('learnActivity.mgtScEv.ftStatus')}}</span>
-                                    <Select v-model="filter.status" style="width:100px" size="small" clearable @on-change="filterEv">
+                                    <Select v-model="filter.progress" style="width:100px" size="small" clearable @on-change="filterEv">
                                         <Option value="pending">{{$t('learnActivity.mgtScEv.pending')}}</Option>
                                         <Option value="going">{{$t('learnActivity.mgtScEv.going')}}</Option>
                                         <Option value="finish">{{$t('learnActivity.mgtScEv.finish')}}</Option>
@@ -27,50 +27,43 @@
                                 </div>
                                 <div class="filter-item">
                                     <span>{{$t('learnActivity.mgtScEv.ftMode')}}</span>
-                                    <Select v-model="filter.mode" style="width:100px" size="small" clearable @on-change="filterEv">
+                                    <Select v-model="filter.source" style="width:100px" size="small" clearable @on-change="filterEv">
                                         <Option v-for="(item,index) in $GLOBAL.EV_MODE()" :value="item.value" :key="index">{{ item.label }}</Option>
                                     </Select>
                                 </div>
-                                <!-- <div class="filter-item">
-                                    <span>{{$t('learnActivity.mgtScEv.ftType')}}</span>
-                                    <Select v-model="filter.type" style="width:100px" size="small" clearable @on-change="filterEv">
-                                        <Option v-for="(item,index) in $GLOBAL.EV_TYPE()" :value="item.value" :key="index">{{ item.label }}</Option>
-                                    </Select>
-                                </div> -->
                             </div>
                         </Poptip>
                         <Icon type="md-search" class="to-create-icon" @click="isSearch = !isSearch" :title="$t('learnActivity.mgtScEv.search')" />
                     </div>
                     <div v-else style="float:right;width:calc(100% - 150px);padding-right:10px;" class="light-iview-input">
-                        <Input v-special-char icon="ios-close" v-model="keyword" :placeholder="$t('schoolBaseInfo.codeSearchHolder')" autofocus style="width:100%" @on-click="closeKeySearch" @on-change="filterByName" />
+                        <Input v-special-char icon="ios-close" v-model="filter.name" :placeholder="$t('schoolBaseInfo.codeSearchHolder')" autofocus style="width:100%" @on-click="closeKeySearch" @on-change="$jsFn.debounce(filterEv,1000)()" />
                     </div>
                 </div>
-                <div class="evaluation-list-main">
-                    <vuescroll>
-                        <div v-for="(item,index) in evaListShow" @click.capture="selectEvaluation(index)" :class="['evaluation-item','block-bg',index == curEvaIndex ? 'block-bg-active':'']" :key="index">
-                            <p class="evaluation-name">
-                                {{item.name}}
-                                <!-- 修改评测名称 -->
-                                <Icon type="md-create" class="edit-end-time" @click="editEvName(index)" :title="$t('learnActivity.mgtScEv.edName')" />
-                            </p>
-                            <div class="all-tag-box">
-                                <div class="tags-wrap">
-                                    <!-- 活动进度状态 -->
-                                    <!-- <span class="evaluation-status-tag ev-tag-common" :style="{ background:item.progColor, color: item.progColor}">
+                <Scroll class="evaluation-list-main" :on-reach-bottom="handleReachBottom">
+                    <div v-for="(item,index) in evaListShow" @click.capture="selectEvaluation(index)" :class="['evaluation-item','block-bg',index == curEvaIndex ? 'block-bg-active':'']" :key="index">
+                        <p class="evaluation-name">
+                            {{item.name}}
+                            <!-- 修改评测名称 -->
+                            <Icon type="md-create" class="edit-end-time" @click="editEvName(index)" :title="$t('learnActivity.mgtScEv.edName')" />
+                        </p>
+                        <div class="all-tag-box">
+                            <div class="tags-wrap">
+                                <!-- 活动进度状态 -->
+                                <!-- <span class="evaluation-status-tag ev-tag-common" :style="{ background:item.progColor, color: item.progColor}">
                                     {{ item.progText }}
                                 </span> -->
-                                    <!-- 评测模式 -->
-                                    <span class="ev-info-tag ev-tag-common">{{getModeLabel(item.source)}}</span>
-                                    <span class="ev-info-tag ev-tag-common" v-if="item.examType && item.examType.name">
-                                        {{item.examType.name}}
-                                    </span>
-                                    <!-- <span class="ev-info-tag ev-tag-common">{{getTypeLabel(item.type)}}</span> -->
-                                    <!-- 活动评分状态 -->
-                                    <span class="evaluation-status-tag ev-tag-common" :style="{ color: item.scoreColor}">
-                                        {{ item.scoreText }}
-                                    </span>
-                                    <Icon class="exam-target" size="20" type="ios-people" @click="getExamTarget(item)" />
-                                    <!-- <Tooltip @on-popper-show="getExamTarget(item)">
+                                <!-- 评测模式 -->
+                                <span class="ev-info-tag ev-tag-common">{{getModeLabel(item.source,item.qamode)}}</span>
+                                <span class="ev-info-tag ev-tag-common" v-if="item.examType && item.examType.name">
+                                    {{item.examType.name}}
+                                </span>
+                                <!-- <span class="ev-info-tag ev-tag-common">{{getTypeLabel(item.type)}}</span> -->
+                                <!-- 活动评分状态 -->
+                                <span class="evaluation-status-tag ev-tag-common" :style="{ color: item.scoreColor}">
+                                    {{ item.scoreText }}
+                                </span>
+                                <Icon class="exam-target" size="20" type="ios-people" @click="getExamTarget(item)" />
+                                <!-- <Tooltip @on-popper-show="getExamTarget(item)">
                                         <Icon class="exam-target" size="20" type="ios-people" />
                                         <div slot="content" style="padding-left:15px;min-width:180px">
                                             <p style="margin-left:-15px">
@@ -83,36 +76,35 @@
                                             </ul>
                                         </div>
                                     </Tooltip> -->
-                                </div>
-                                <!-- 立即结束 和评测状态 按钮-->
-                                <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
-                                    {{$t('learnActivity.mgtScEv.stop')}}
-                                </span>
-                                <span v-else class="handle-end-tag ev-tag-common" :style="{ background:'#c0c0c0', color: item.progColor}">
-                                    {{ item.progText }}
-                                </span>
                             </div>
-
-                            <p class="evaluation-type" style="margin-top:10px">
-                                <Icon type="md-time" style="margin-right:5px;" size="16" />
-                                <span>{{$jsFn.timeFormat(item.startTime)}}</span>
-                                -
-                                <span>{{$jsFn.timeFormat(item.endTime)}}</span>
-                                <!-- 修改评测结束时间 -->
-                                <Icon type="md-create" class="edit-end-time" v-if="item.progress == 'going'" @click="editEvEndtime(index)" :title="$t('learnActivity.mgtScEv.editEndTime')" />
-                            </p>
-                            <!-- 二维码分享 -->
-                            <span class="ev-qr-tag" style="top:50%" @click="openQrcode(index)" v-show="item.source == '0' && item.progress == 'going'">
-                                <Icon size="20" custom="iconfont icon-qr-code" class="qr-code-icon" />
+                            <!-- 立即结束 和评测状态 按钮-->
+                            <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
+                                {{$t('learnActivity.mgtScEv.stop')}}
                             </span>
-                            <!-- 立即结束 图标-->
-                            <!-- <span class="ev-qr-tag" style="top:65%" @click="handleEnd(index)" :title="$t('learnActivity.mgtScEv.stop')">
+                            <span v-else class="handle-end-tag ev-tag-common" :style="{ background:'#c0c0c0', color: item.progColor}">
+                                {{ item.progText }}
+                            </span>
+                        </div>
+
+                        <p class="evaluation-type" style="margin-top:10px">
+                            <Icon type="md-time" style="margin-right:5px;" size="16" />
+                            <span>{{$jsFn.timeFormat(item.startTime)}}</span>
+                            -
+                            <span>{{$jsFn.timeFormat(item.endTime)}}</span>
+                            <!-- 修改评测结束时间 -->
+                            <Icon type="md-create" class="edit-end-time" v-if="item.progress == 'going'" @click="editEvEndtime(index)" :title="$t('learnActivity.mgtScEv.editEndTime')" />
+                        </p>
+                        <!-- 二维码分享 -->
+                        <span class="ev-qr-tag" style="top:50%" @click="openQrcode(index)" v-show="item.source == '0' && item.progress == 'going'">
+                            <Icon size="20" custom="iconfont icon-qr-code" class="qr-code-icon" />
+                        </span>
+                        <!-- 立即结束 图标-->
+                        <!-- <span class="ev-qr-tag" style="top:65%" @click="handleEnd(index)" :title="$t('learnActivity.mgtScEv.stop')">
                                 <Icon size="20" type="md-power" class="qr-code-icon" />
                             </span> -->
-                        </div>
-                        <EmptyData v-if="evaListShow.length == 0" style="margin-top:100px;" :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
-                    </vuescroll>
-                </div>
+                    </div>
+                    <EmptyData v-if="evaListShow.length == 0" style="margin-top:100px;" :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
+                </Scroll>
             </div>
             <div slot="right" class="evaluation-detail-wrap">
                 <!--顶部菜单-->
@@ -135,14 +127,14 @@
                     </span>
                 </div>
                 <!-- 评测数据 -->
-                <DataView v-show="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="evaluation-base-info"></DataView>
+                <DataView v-if="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="evaluation-base-info"></DataView>
                 <!-- 作答详情 -->
-                <AnswerTable v-show="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="evaluation-base-info"></AnswerTable>
+                <AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="evaluation-base-info"></AnswerTable>
                 <!-- 评测试卷 -->
-                <ExamPaper v-show="curBarIndex == 1" :examInfo="examDetaiInfo" class="evaluation-base-info"></ExamPaper>
+                <ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" class="evaluation-base-info"></ExamPaper>
                 <!-- 阅卷任务 -->
                 <!-- <ExamTask v-show="curBarIndex == 2" class="evaluation-base-info"></ExamTask> -->
-                <MarkSetting v-show="curBarIndex == 2" ref="markSetting" v-if="examDetaiInfo" :evInfo="examDetaiInfo" v-model="isSetting"></MarkSetting>
+                <MarkSetting v-else-if="curBarIndex == 2 && examDetaiInfo" ref="markSetting" :evInfo="examDetaiInfo" v-model="isSetting"></MarkSetting>
             </div>
         </Split>
         <!-- 修改评测名称 -->
@@ -187,6 +179,8 @@ export default {
     },
     data() {
         return {
+            ctnToken: '',
+            pageCount: 20,
             dataErr: false,
             isSetting: false,
             examTargets: [],
@@ -212,7 +206,6 @@ export default {
             curSubIndex: 0,
             curBarIndex: 0,
             curEvaIndex: 0,
-            evaluationList: [],
             evaListShow: [],
             examDetaiInfo: {},
             targetList: [],
@@ -220,9 +213,9 @@ export default {
             filterPeriod: undefined,
             curPdInfo: {},
             filter: {
-                status: '',
-                mode: '',
-                type: ''
+                progress: '',
+                source: '',
+                name: ''
             }
         }
     },
@@ -235,8 +228,25 @@ export default {
                     return d && d > date.valueOf() + 86400000
                 }
             }
+        },
+        evAuthStatus(){
+            if(this.scope == 'school'){
+                return this.$access.can('admin.*|schoolAc-upd')
+            }else{
+                return true
+            }
         }
     },
+    mounted() {
+        this.$EventBus.$off('onStatusChange')
+        this.$EventBus.$on('onStatusChange', () => {
+            if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].sStatus != 1) {
+                this.evaListShow[this.curEvaIndex].sStatus = 1
+                this.evaListShow[this.curEvaIndex].scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
+                this.evaListShow[this.curEvaIndex].scoreColor = '#515a6e'
+            }
+        })
+    },
     created() {
         if (this.$route.name === 'schoolExam') {
             this.scope = 'school'
@@ -246,6 +256,14 @@ export default {
         this.findEvaluation()
     },
     methods: {
+        handleReachBottom() {
+            return this.findEvaluation()
+        },
+        closeKeySearch() {
+            this.isSearch = false
+            this.filter.name = ''
+            this.filterEv()
+        },
         getExamTarget(data) {
             let ids = data.classes && data.classes.length ? data.classes : data.stuLists
             this.$api.common.getGroupListByIds({
@@ -331,7 +349,6 @@ export default {
             } else {
                 this.correctData = []
             }
-            console.log('错题率分析:', this.correctData)
         },
         //获取已结束评测简要数据分析
         findSimpleAna() {
@@ -412,46 +429,68 @@ export default {
             this.qrConfig.shareContent = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${soc}${socName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${this.$t('cusMgt.inviteInfo8')}${this.$store.state.userInfo.name}\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
             this.showQrStatus = true
         },
-        //查询评测列表
-        findEvaluation() {
-            this.isLoading = true
-            let requestData = {
-                code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
-            }
-            this.$api.learnActivity.FindExamList(requestData).then(
-                res => {
-                    if (!res.error) {
-                        res.examInfo = res.examInfo.sort((a, b) => {
-                            return a.createTime - b.createTime > 0 ? -1 : 1
-                        })
-                        res.examInfo.forEach(item => {
-                            let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
-                            item.progText = statusInfo.progText
-                            item.progColor = statusInfo.progColor
-                            item.scoreText = statusInfo.scoreText
-                            item.scoreColor = statusInfo.scoreColor
-                        })
-                        this.evaluationList = res.examInfo
-                        this.evaListShow = res.examInfo
-                        if (this.scope == 'school') {
-                            this.filterByPeriod()
-                        } else {
+        /**
+         * @param isFresh 是否清空当前列表 如果是筛选条件变化需要清空,如果是只是下拉刷新则不需要
+         */
+        findEvaluation(isFresh) {
+            // 下拉加载需要返回一个Promise
+            return new Promise((r, j) => {
+                if (isFresh) {
+                    this.evaListShow = []
+                    this.ctnToken = ''
+                }
+                let requestData = {
+                    code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
+                    count: this.pageCount
+                }
+                //判断是否加载完所有数据
+                if(this.ctnToken == 'end'){
+                    this.$Message.success(this.$t('learnActivity.mgtScEv.loadAll'))
+                    r()
+                    return
+                }
+                if(this.ctnToken) requestData.token = this.ctnToken
+                //校本评测根据学段查询
+                if (this.scope == 'school') requestData.period = this.filterPeriod
+                //添加其他查询条件
+                if (this.filter.progress) requestData.progress = this.filter.progress
+                if (this.filter.source) requestData.source = this.filter.source
+                if (this.filter.name) requestData.name = this.filter.name
+                this.isLoading = true
+                this.$api.learnActivity.FindExamList(requestData).then(
+                    res => {
+                        if (!res.error) {
+                            res.examInfo = res.examInfo.sort((a, b) => {
+                                return a.createTime - b.createTime > 0 ? -1 : 1
+                            })
+                            res.examInfo.forEach(item => {
+                                let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
+                                item.progText = statusInfo.progText
+                                item.progColor = statusInfo.progColor
+                                item.scoreText = statusInfo.scoreText
+                                item.scoreColor = statusInfo.scoreColor
+                            })
+                            this.evaListShow.push(...res.examInfo)
                             if (res.examInfo.length) {
                                 this.selectEvaluation(0)
                             } else {
                                 this.isLoading = false
                             }
+                            this.ctnToken = res.token || 'end' //返回token为null代表已经查完所有数据了
+                            r()
+                        } else {
+                            // this.$Message.error('API ERROR!')
+                            this.$Message.error(this.$t('learnActivity.mgtScEv.evListErr'))
+                            this.isLoading = false
+                            j()
                         }
-                    } else {
-                        // this.$Message.error('API ERROR!')
-                        this.$Message.error(this.$t('learnActivity.mgtScEv.evListErr'))
+                    },
+                    err => {
                         this.isLoading = false
+                        j()
                     }
-                },
-                err => {
-                    this.isLoading = false
-                }
-            )
+                )
+            })
         },
         getEvStatusInfo(progress, isScore) {
             let info = {}
@@ -465,30 +504,18 @@ export default {
                 info.progText = this.$t('learnActivity.mgtScEv.finish')
                 info.progColor = '#75787d'
             }
+            // 待评分
             if (isScore === 0) {
                 info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus')
                 info.scoreColor = '#ff9900'
-            } else if (isScore === 1) {
+            }
+            //已评分
+            else if (isScore === 1) {
                 info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
                 info.scoreColor = '#515a6e'
             }
             return info
         },
-        //根据学段筛选评测
-        filterByPeriod() {
-            this.curEvaIndex = 0
-            sessionStorage.setItem('evPeriod', this.filterPeriod)
-            if (this.filterPeriod) {
-                this.evaListShow = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
-            } else {
-                this.evaListShow = [...this.evaluationList]
-            }
-            if (this.evaListShow.length) {
-                this.selectEvaluation(0)
-            } else {
-                this.isLoading = false
-            }
-        },
         selectEvaluation(index) {
             this.checkScoreSave(this.toEvaluation, index)
         },
@@ -518,7 +545,7 @@ export default {
             this.$api.learnActivity.FindExamInfo(requestData).then(
                 async res => {
                     this.dataErr = false
-                    
+
                     if (!res.error) {
                         let resData = res.examInfo[0]
                         resData.score = 0
@@ -619,7 +646,6 @@ export default {
                     quNo: data
                 })
             })
-            console.log('评测所有题号信息:', this.paperQuInfo)
         },
         checkScoreSave(fn, index) {
             let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
@@ -726,22 +752,14 @@ export default {
         },
         //筛选评测
         filterEv() {
-            let curPdEv = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
-            this.evaListShow = curPdEv.filter(item => {
-                let status = !this.filter.status || (this.filter.status == item.progress)
-                let type = !this.filter.type || (this.filter.type == item.type)
-                let mode = !this.filter.mode || (this.filter.mode == item.source)
-                return status && type && mode
-            })
-        },
-        filterByName() {
-            let curPdEv = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
-            this.evaListShow = curPdEv.filter(item => {
-                return item.name.indexOf(this.keyword) > -1
-            })
+            this.ctnToken = ''
+            this.findEvaluation(true)
         },
         /**获取mode对应的label */
-        getModeLabel(code) {
+        getModeLabel(code, qamode) {
+            if (qamode == 1) {
+                return this.$t('learnActivity.mgtScEv.paperExam')
+            }
             for (let item of this.$GLOBAL.EV_MODE()) {
                 if (item.value == code) {
                     return item.label
@@ -843,8 +861,6 @@ export default {
             handler(n, o) {
                 if (n) {
                     this.filterPeriod = n.id
-                    this.curPdInfo = n
-                    if (this.scope == 'school') this.filterByPeriod()
                 }
             }
         }
@@ -856,4 +872,10 @@ export default {
 @import "./ExamMgt.less";
 </style>
 <style lang="less">
+.evaluation-list-main {
+    .ivu-scroll-container {
+        width: 100%;
+        height: 100% !important;
+    }
+}
 </style>

+ 11 - 5
TEAMModelOS/ClientApp/src/view/learnactivity/echarts/KngPoint.vue

@@ -1,13 +1,13 @@
 <template>
     <div class="recognize-perform-chart">
-        <div :id="'knowledge'+id" style="width: 306px; height: 300px;margin:auto" v-if="knowledge.kn.length"></div>
-        <div v-else class="no-kn-point">
+        <div v-if="!knowledge.kn || !knowledge.kn.length" class="no-kn-point">
             <p class="chart-title">{{$t('studentWeb.exam.chart.keyPointPerformance')}}</p>
             <img src="@/assets/image/none.png" alt="" class="tips-img">
             <p class="chart-text">
                 {{$t('learnActivity.simple.noKn')}}
             </p>
         </div>
+        <div :id="'knowledge'+id" style="width: 306px; height: 300px;margin:auto" v-else></div>
     </div>
 </template>
 
@@ -30,6 +30,7 @@ export default {
             id: '',
             categories: [],
             akps: [], //个人
+            myChart: undefined
         }
     },
     created() {
@@ -44,7 +45,7 @@ export default {
                     name: item
                 })
             })
-            let myChart = this.$echarts.init(document.getElementById("knowledge" + this.id), 'macarons')
+            if (!this.myChart) this.myChart = this.$echarts.init(document.getElementById("knowledge" + this.id), 'macarons')
             let option = {
                 title: {
                     text: this.$t('studentWeb.exam.chart.keyPointPerformance'),
@@ -76,7 +77,7 @@ export default {
                     }
                 ],
             }
-            myChart.setOption(option)
+            this.myChart.setOption(option)
         },
         getFiled() {
             let akps = []
@@ -103,6 +104,11 @@ export default {
                         this.getFiled()
                         this.setMap()
                     })
+                } else {
+                    if (this.myChart) {
+                        this.myChart.dispose()
+                        this.myChart = undefined
+                    }
                 }
             }
         }
@@ -125,7 +131,7 @@ export default {
         width: 120px;
         margin-top: 30px;
     }
-    .chart-text{
+    .chart-text {
         font-size: 12px;
         color: #808695;
     }

+ 3 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/tabs/AnswerTable.vue

@@ -433,7 +433,7 @@ export default {
                 this.schoolClassList = res.school_classes
             }
         )
-        if (this.$route.name == 'privateEvaluation') {
+        if (this.$route.name == 'privExam') {
             this.routerScope = 'private'
         } else {
             this.routerScope = 'school'
@@ -478,7 +478,8 @@ export default {
                 )
 
             },
-            deep: true
+            deep: true,
+            immediate:true
         },
         targetsData: {
             handler(n, o) {

+ 29 - 11
TEAMModelOS/ClientApp/src/view/teachermgmt/components/import/Import.vue

@@ -42,24 +42,35 @@
             </div>
             <div class="excel-data-wrap" v-else-if="viewStatus === 'review'">
                 <div class="import-info-wrap">
-                    <span>
+                    <!-- 无效数据 无Name -->
+                    <span style="color:#ed4014" v-show="allData.length - importData.length">
+                        {{$t('teachermgmt.impText')}}
+                    </span>
+                    <span class="count-value" style="color:#ed4014" v-show="allData.length - importData.length">
+                        {{allData.length - importData.length}}
+                    </span>
+                    <!-- 有效数据 -->
+                    <span style="color:#19be6b">
                         {{$t('teachermgmt.impText1')}}
                     </span>
-                    <span class="count-value">
-                        {{importData.length}}人
+                    <span class="count-value" style="color:#19be6b">
+                        {{importData.length}}
                     </span>
+                    <!-- 仅导入名字 -->
                     <span>
                         {{$t('teachermgmt.impText2')}}
                     </span>
                     <span class="count-value">
-                        {{onlyName.length}}
+                        {{onlyName.length}}
                     </span>
+                    <!-- 有ID 自动邀请 -->
                     <span>
                         {{$t('teachermgmt.impText3')}}
                     </span>
                     <span class="count-value">
-                        {{inviteData.length}}
+                        {{inviteData.length}}
                     </span>
+
                     <div class="imp-action-wrap">
                         <span @click="importAgain">
                             <Icon type="md-refresh" size="16" />
@@ -85,7 +96,7 @@
                     <Button type="primary" style="width:240px" size="large" @click="importAgain">
                         {{$t('teachermgmt.impText7')}}
                     </Button>
-                    <br/>
+                    <br />
                     <Button type="success" style="width:240px;margin-top:15px" size="large" @click="toMgt">
                         {{$t('teachermgmt.impText8')}}
                     </Button>
@@ -126,19 +137,24 @@ export default {
                     key: 'note'
                 }
             ],
-            importData: [],
+            importData: [],//可导入数据
+            allData: [],//所有数据
             onlyName: [],
             inviteData: [],
         }
     },
     methods: {
-        toMgt(){
+        toMgt() {
             this.$router.push({
-                name:'mgt'
+                name: 'mgt'
             })
         },
         //确认导入教师信息
         confirmImport() {
+            if(!this.importData.length){
+                this.$Message.warning(this.$t('teachermgmt.noIpmtData'))
+                return 
+            }
             let params = {
                 opt: 'upsert',
                 schoolId: this.$store.state.userInfo.schoolCode,
@@ -211,11 +227,12 @@ export default {
                 let flag = columns.includes('name') //name为必填
                 if (flag) {
                     // 处理表格导入数据类型
-                    results.forEach(item => {
+                    this.allData = results
+                    this.importData = this.allData.filter(item => !!item.name)
+                    this.importData.forEach(item => {
                         if (item.phone) item.phone = item.phone.toString()
                         if (item.tmdid) item.tmdid = item.tmdid.toString()
                     })
-                    this.importData = results
                     this.onlyName = this.importData.filter(item => !item.phone && !item.email && !item.id)
                     this.inviteData = this.importData.filter(item => item.phone || item.email || item.id)
                     this.$Message.info(this.$t('stuAccount.importTips11'))
@@ -291,6 +308,7 @@ export default {
 }
 .count-value {
     margin-right: 30px;
+    font-weight: 600;
 }
 .import-info-wrap {
     width: 100%;

+ 5 - 5
TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.vue

@@ -64,9 +64,9 @@
                             </span>
                         </template>
                         <template slot-scope="{ row }" slot="action" v-if="!activePanel">
-                            <icon v-show="!row.roles.includes('admin') && row.status == 'join'" icon="shield-alt" style="font-size: 13px; color: var(--normal-icon-color); margin-right: 20px; cursor: pointer;" @click="openPanel('single',row)" />
-                            <Icon v-show="!row.roles.includes('admin')" size="16" type="md-trash" style="color: var(--normal-icon-color); cursor: pointer" @click="removeUser(row)" />
-                            <Icon v-show="row.roles.includes('admin') && row.id == $store.state.userInfo.TEAMModelId && row.status == 'join'" type="md-repeat" style="color: var(--normal-icon-color); font-size: 14px; cursor: pointer" @click="transferAdmin(row)" />
+                            <icon v-show="row.roles && !row.roles.includes('admin') && row.status == 'join'" icon="shield-alt" style="font-size: 13px; color: var(--normal-icon-color); margin-right: 20px; cursor: pointer;" @click="openPanel('single',row)" />
+                            <Icon v-show="row.roles && !row.roles.includes('admin')" size="16" type="md-trash" style="color: var(--normal-icon-color); cursor: pointer" @click="removeUser(row)" />
+                            <Icon v-show="row.roles && row.roles.includes('admin') && row.id == $store.state.userInfo.TEAMModelId && row.status == 'join'" type="md-repeat" style="color: var(--normal-icon-color); font-size: 14px; cursor: pointer" @click="transferAdmin(row)" />
                         </template>
                         <!---手動輸入空間欄位-->
                         <template slot-scope="{ row }" slot="spaceShare">
@@ -1066,12 +1066,12 @@ export default {
                 this.$Modal.confirm({
                     title: this.$t('teachermgmt.model.delTeacher.title'),
                     // content: '<p>' + this.$t('teachermgmt.model.delTeacher.text1') + ' ' + val.name + '(' + val.id + ') ?</p>',
-                    content: `<p> ${this.$t('teachermgmt.model.delTeacher.text1')}  ${val.name} ${idText}?</p>`,
+                    content: `<p> ${this.$t('teachermgmt.model.delTeacher.text1')}  ${val.name || val.iname} ${idText}?</p>`,
                     onOk: () => {
                         this.$api.schoolUser.rmvSchoolUser({
                             school_code: this.$store.state.userInfo.schoolCode,
                             id: val.id || undefined,
-                            name: val.id ? undefined : val.name
+                            name: val.id ? undefined : val.iname || val.name
                         }).then(
                             res => {
                                 this.$store.commit('user/delTeacher', [val.id || val.name])

+ 2 - 3
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -466,8 +466,8 @@ namespace TEAMModelOS.Controllers
                     stringBuilder.Append($" and c.source = '{source}' ");
                 }
                 stringBuilder.Append("order by c.createTime desc");
-                string token = null;
-                //string token = default;
+                //string token = null;
+                string token = default;
                 //默认不指定返回大小
                 int? topcout = null;
                 if (requert.TryGetProperty("count", out JsonElement jcount))
@@ -486,7 +486,6 @@ namespace TEAMModelOS.Controllers
                 //如果指定了返回大小
                 if (requert.TryGetProperty("token", out JsonElement token_1))
                 {
-                    //指定了cancellationToken continuationSchool
                     if (!token_1.ValueKind.Equals(JsonValueKind.Null) && token_1.ValueKind.Equals(JsonValueKind.String))
                     {
                         token = token_1.GetString();