Browse Source

統測架構測試(途中)

jeff 11 months ago
parent
commit
89f75495a1

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/School/ExamInfo.cs

@@ -130,7 +130,7 @@ namespace TEAMModelOS.SDK.Models
         //是否啟動cloudas計算 true:啟動
         public bool cloudas { get; set;}
         //統測ID [測試中]
-        //public string jointExamId { get; set; }
+        public string jointExamId { get; set; }
     }
     public class Custom {
         public string id { get; set; }

+ 16 - 15
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -3273,23 +3273,24 @@ const LANG_ZH_TW = {
             completeTask: '您已完成閱卷任務',
             // ProgPie.vue
             marking: '進行中'
-        },
-        //統測評量
-        jointexam: {
-            jointexam: '統測評量',
-            create: '新增',
-            delete: '刪除',
-            ftStatus: '狀態:',
-            ftMode: '模式:',
-            search: '搜尋',
-            pending: '待發布',
-            going: '公告中',
-            finish: '已公告',
-            filter: '篩選',
-            loadAll: '已載入所有數據',
-            evListErr: '査詢評量清單失敗'
         }
     },
+    //統測活動
+    jointevent: {
+        jointexam: '統測評量',
+        create: '新增',
+        delete: '刪除',
+        ftStatus: '狀態:',
+        ftMode: '模式:',
+        search: '搜尋',
+        pending: '待發布',
+        going: '公告中',
+        finish: '已公告',
+        filter: '篩選',
+        loadAll: '已載入所有數據',
+        getEventErr: '無法取得統測活動',
+        evListErr: '査詢評量清單失敗'
+    },
     // 时间计算相关
     time: {
         before: '前',

+ 2 - 0
TEAMModelOS/ClientApp/src/api/index.js

@@ -46,6 +46,7 @@ import iot from './iot'
 import areaActivity from './areaActivity'
 import schoolDashborad from './schoolDashborad'
 import appraise from './appraise'
+import jointEvent from './jointEvent'
 export default {
     accessToken,
     learnActivity,
@@ -92,6 +93,7 @@ export default {
     areaActivity,
     schoolDashborad,
     appraise,
+    jointEvent,
     // 获取登录跳转链接
     getLoginLink: function (data) {
         return post('api/login/login', data)

+ 0 - 4
TEAMModelOS/ClientApp/src/api/learnActivity.js

@@ -416,8 +416,4 @@ export default {
     getItemprops: function (data) {
 	    return post('/score/get-itemprops', data)
     },
-    /* 查詢統測評量 */
-    FindJointExamList: function (data) {
-        return post('/common/jointexam/find', data)
-    },
 }

+ 5 - 5
TEAMModelOS/ClientApp/src/router/routes.js

@@ -875,13 +875,13 @@ export const routes = [{
             activeName: 'personalVote'
         }
     },
-    //統測頁面[測試中]
+    //統測內容頁面[測試中]
     {
-        path: 'jointExam',
-        name: 'jointExam',
-        component: () => import('@/view/learnactivity/JointExamMgt.vue'),
+        path: 'jointEvent',
+        name: 'jointEvent',
+        component: () => import('@/view/learnactivity/JointEventSchedule.vue'),
         meta: {
-            activeName: 'jointExam'
+            activeName: 'jointEvent'
         }
     },
     //主页

+ 1 - 1
TEAMModelOS/ClientApp/src/store/module/config.js

@@ -102,7 +102,7 @@ export default {
             if (!stationSetting) {
                 stationSetting = {}
                 stationSetting.station = 'test'
-                stationSetting.srvAdr = 'Global'
+                stationSetting.srvAdr = 'China'
                 //这里异常如果本地为 null 本地测试会重复设置为null
                 // if (localStorage.getItem('srvAdr')) stationSetting.srvAdr = localStorage.getItem('srvAdr')
             }

+ 0 - 179
TEAMModelOS/ClientApp/src/view/learnactivity/JointExamMgt.less

@@ -1,179 +0,0 @@
-@main-bgColor: rgb(40,40,40); //主背景颜色
-@borderColor: var(--border-color);
-@primary-textColor: #fff; //文本主颜色
-@second-textColor: var(--second-text-color); //文本副级颜色
-@primary-fontSize: 14px;
-@second-fontSize: 16px;
-@borderColor: #424242;
-
-.jointexam-mgt-container {
-    width: 100%;
-    height: 100%;
-    display: flex;
-    flex-direction: row;
-
-    .jointexam-list-wrap {
-        width: 100%;
-        height: 100%;
-        padding-left: 0px;
-        color: var(--second-text-color);
-    }
-
-    .jointexam-detail-wrap {
-        width: 100%;
-        height: 100%;
-    }
-}
-.jointexam-list-wrap {
-    .jointexam-list-title {
-        width: 100%;
-        height: 45px;
-        line-height: 45px;
-        padding-left: 15px;
-    }
-
-    .jointexam-list-main {
-        width: 100%;
-        height: ~"calc(100% - 50px)";
-
-        .jointexam-item {
-            padding: 15px 10px 15px 15px;
-            cursor: pointer;
-            background: white;
-            &:hover{
-                background: var(--hover-text-color);
-            }
-
-            .jointexam-name {
-                font-size: 16px;
-                color: var(--primary-text-color);
-            }
-
-            .jointexam-type {
-                color: @second-textColor;
-                margin-top: 4px;
-                font-size: 12px;
-
-                .ivu-icon{
-                    color: var(--assist-color-light);
-                }
-            }
-        }
-    }
-}
-.jointexam-item:hover{
-    .edit-end-time{
-        display: inline-block;
-    }
-}
-.edit-end-time{
-    display: none;
-    font-size: 15px;
-    color: #2d8cf0 !important;
-}
-.all-tag-box{
-    display: flex;
-    align-items: center;
-    margin-top: 6px;
-}
-.tags-wrap{
-    display: flex;
-    flex-wrap: wrap;
-    border: 1px solid #d2d2d2;
-    width: fit-content;
-    border-radius: 3px;
-    overflow: hidden;
-}
-.ev-info-tag{
-    color: #2d8cf0;
-    
-}
-.ev-tag-common{
-    padding: 1px 6px;
-    white-space: nowrap;
-    font-size:12px;
-    border-right: 1px solid #d2d2d2;
-    &:last-child{
-        border: none;
-    }
-}
-.jointexam-status-tag {
-    white-space: nowrap;
-}
-.handle-end-tag{
-    background:#ed4014;
-    color: white;
-    height: fit-content;
-    margin-left: 5px;
-    padding: 2px 6px;
-    border-radius: 2px;
-}
-.ev-qr-tag{
-    text-align: center;
-    padding: 1px 2px 1px 1px;
-    position: absolute;
-    right: 15px;
-    top: 50%;
-    margin-top: -10px;
-    &:hover{
-        color: #2d8cf0;
-    }
-}
-.to-create-icon {
-    float: right;
-    margin-right: 20px;
-    margin-top: 12px;
-    cursor: pointer;
-    color: var(--normal-icon-color);
-    font-size: 18px;
-}
-.filter-item{
-    margin: 10px 5px;
-}
-.jointexam-detail-bar {
-    width: 100%;
-    height: 45px;
-    line-height: 45px;
-    box-shadow: 0 2px 5px #e9e9e9;
-    padding-left: 10px;
-    color: @second-textColor;
-    position: relative;
-
-    .evalustion-bar-item {
-        display: inline-block;
-        cursor: pointer;
-        user-select: none;
-        line-height: 38px;
-    }
-}
-.jointexam-base-info {
-    width: 100%;
-    height: ~"calc(100% - 45px)";
-    // padding-left: 10px;
-    background: #f6f6f6;
-}
-.exam-target{
-    color: #808695;
-    margin: 0px 5px;
-    font-size: 14px;
-    &:hover{
-        color: #2db7f5;
-    }
-}
-.ev-list-scroll{
-    width: 100%;
-    height: 100%;
-}
-.action-icon-wrap{
-    float: right;
-    position: relative;
-    z-index: 99;
-}
-.copy-text-info{
-    padding: 5px 10px;
-    cursor: pointer;
-    user-select: none;
-    &:hover{
-        color: #2d8cf0;
-    }
-}

+ 0 - 982
TEAMModelOS/ClientApp/src/view/learnactivity/JointExamMgt.vue

@@ -1,982 +0,0 @@
-<template>
-	<div class="jointexam-mgt-container custom-iview-split">
-		<Loading :top="200" type="1" style="text-align: center" v-show="isLoading"></Loading>
-		<Split v-model="split1" min="350px">
-			<!--統測列表-->
-			<div class="jointexam-list-wrap" slot="left">
-				<div class="jointexam-list-title">
-					<b class="title">
-						{{ $t("learnActivity.jointexam.jointexam") }}
-					</b>
-					<div class="action-icon-wrap" v-if="!isSearch">
-						<Icon type="md-add" class="to-create-icon" @click="goToCreate" :title="$t('learnActivity.jointexam.create')" v-if="evAuthStatus" />
-						<Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.jointexam.delete')" @click="deleteEvaluation" v-if="evAuthStatus" />
-						<!-- 篩選 -->
-						<Poptip style="float: right" trigger="click" :offset="-10" theme="light">
-							<Icon type="ios-funnel" class="to-create-icon" :title="$t('learnActivity.jointexam.create')" />
-							<div slot="content">
-								<div class="filter-item">
-									<span>{{ $t("learnActivity.jointexam.ftStatus") }}</span>
-									<Select v-model="filter.progress" style="width: 100px" size="small" clearable @on-change="filterEv">
-										<Option value="pending">{{ $t("learnActivity.jointexam.pending") }}</Option>
-										<Option value="going">{{ $t("learnActivity.jointexam.going") }}</Option>
-										<Option value="finish">{{ $t("learnActivity.jointexam.finish") }}</Option>
-									</Select>
-								</div>
-								<div class="filter-item">
-									<span>{{ $t("learnActivity.jointexam.ftMode") }}</span>
-									<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>
-						</Poptip>
-						<Icon type="md-search" class="to-create-icon" @click="isSearch = !isSearch" :title="$t('learnActivity.jointexam.search')" />
-					</div>
-					<div v-else style="float: right; width: 150px; padding-right: 10px" class="light-iview-input">
-						<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>
-				<Scroll class="jointexam-list-main" :on-reach-bottom="handleReachBottom" :distance-to-edge="[-1, -1]">
-					<div v-for="(item, index) in evaListShow" @click.capture="selectEvaluation(index)" :class="['jointexam-item', 'block-bg', index == curEvaIndex ? 'block-bg-active' : '']" :key="index">
-						<p class="jointexam-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="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>
-								<Icon class="exam-target" size="20" type="ios-people" @click="getExamTarget(item)" />
-							</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="jointexam-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: 25%" v-if="item.source == '0' && item.progress == 'going'">
-							<Tooltip content="Here is the prompt text" transfer theme="light">
-								<Icon type="ios-send" size="24" />
-								<div slot="content" style="padding: 5px">
-									<p class="copy-text-info" @click="copyNotice(index)">
-										<Icon type="ios-notifications" style="margin-right: 5px" />
-										{{ $t("learnActivity.mgtScEv.shareText9") }}
-									</p>
-									<p class="copy-text-info" @click="copyLink(index)">
-										<Icon type="ios-link" style="margin-right: 5px" />
-										{{ $t("learnActivity.mgtScEv.shareText10") }}
-									</p>
-								</div>
-							</Tooltip>
-						</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>
-				</Scroll>
-			</div>
-			<div slot="right" class="jointexam-detail-wrap">
-				<!--顶部菜单-->
-				<div class="jointexam-detail-bar">
-					<!-- 评测数据 -->
-					<span :class="curBarIndex == 0 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" @click="selectBar(0)">
-						{{ $t("learnActivity.mgtScEv.tab1") }}
-					</span>
-					<!-- 作答详情 -->
-					<span :class="curBarIndex == 3 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" @click="selectBar(3)">
-						{{ $t("learnActivity.mgtScEv.tab3") }}
-					</span>
-					<!-- 评测试卷 -->
-					<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>
-					<!-- 阅卷设置-->
-					<span :class="curBarIndex == 2 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" v-show="scope == 'school'" @click="selectBar(2)">
-						{{ $t("learnActivity.mgtScEv.markSetting") }}
-					</span>
-					<!-- 小学情-->
-					<span :class="curBarIndex == 4 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" v-show="scope !== 'school'" @click="selectBar(4)">
-						{{ $t("learnActivity.mgtScEv.tab4") }}
-					</span>
-				</div>
-				<!-- 暂无数据 -->
-				<EmptyData v-if="!evaListShow.length" :top="120"></EmptyData>
-				<!-- 跨校个人评测提示UI -->
-				<CrossSchool v-else-if="examDetaiInfo && !examDetaiInfo.curSchool" :examInfo="examDetaiInfo"></CrossSchool>
-				<!-- 评测数据 -->
-				<DataView v-else-if="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="jointexam-base-info"></DataView>
-				<!-- 作答详情 -->
-				<AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="jointexam-base-info"></AnswerTable>
-				<!-- 评测试卷 -->
-				<ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" class="jointexam-base-info"></ExamPaper>
-				<!-- 学情分析 -->
-				<CloudDAS v-else-if="curBarIndex == 4" :evInfo="examDetaiInfo"></CloudDAS>
-				<!-- 阅卷任务 -->
-				<ExamTask v-show="curBarIndex == 2" :evInfo="examDetaiInfo" class="jointexam-base-info"></ExamTask>
-			</div>
-		</Split>
-		<!-- 修改评测名称 -->
-		<Modal v-model="editNameStatus" footer-hide className="ed-name-modal" @on-ok="confirmEditName">
-			<div slot="header" class="modal-header">
-				{{ $t("learnActivity.mgtScEv.edName") }}
-			</div>
-			<div class="edit-name-content">
-				<p class="edit-name-label">
-					{{ $t("cusMgt.listName") }}
-				</p>
-				<Input v-model="editName" :placeholder="$t('learnActivity.mgtScEv.edNameHolder')" />
-				<Button :loading="btnLoading" @click="confirmEditName" long type="primary" class="confirm-btn">{{ $t("syllabus.confirm") }}</Button>
-			</div>
-		</Modal>
-		<!-- 修改评测时间 -->
-		<Modal v-model="editTimeStatus" footer-hide className="ed-name-modal">
-			<div slot="header" class="modal-header">
-				{{ $t("learnActivity.mgtScEv.editEndTime") }}
-			</div>
-			<div class="edit-name-content">
-				<p class="edit-name-label">
-					{{ $t("cusMgt.listName") }}
-				</p>
-				<DatePicker v-model="editTime" :options="dateOpt1" type="datetime" @on-change="handleTime" format="yyyy-MM-dd HH:mm" :placeholder="$t('learnActivity.mgtScEv.endTimeHolder')" style="width: 100%"></DatePicker>
-				<Button :loading="btnLoading" @click="confirmEditEndtime" long type="primary" class="confirm-btn">{{ $t("syllabus.confirm") }}</Button>
-			</div>
-		</Modal>
-		<!-- 分享二维码 -->
-		<QrcodeModal v-model="showQrStatus" :config="qrConfig"></QrcodeModal>
-	</div>
-</template>
-<script>
-	import CrossSchool from "./tabs/CrossSchool.vue";
-	import DataView from "./tabs/DataView.vue";
-	import AnswerTable from "./tabs/AnswerTable.vue";
-	import ExamPaper from "./tabs/ExamPaper.vue";
-	import ExamTask from "./tabs/ExamTask.vue";
-	import CloudDAS from "./tabs/CloudDAS.vue";
-	export default {
-		components: {
-			DataView,
-			AnswerTable,
-			ExamPaper,
-			ExamTask,
-			CrossSchool,
-			CloudDAS
-		},
-		data() {
-			return {
-				ctnToken: "",
-				pageCount: 20,
-				dataErr: false,
-				isSetting: false,
-				examTargets: [],
-				correctData: [], //各科错题分析数据
-				paperQuInfo: [],
-				simpleData: {},
-				btnLoading: false,
-				shareUrl: "",
-				split1: 0.2,
-				isSearch: false,
-				showQrStatus: false,
-				qrConfig: {
-					title: this.$t("learnActivity.mgtScEv.shareText8"),
-					url: "", //二维码内容 不用转短网址,组件内部处理
-					shareContent: "" //复制链接内容,支持字符串模板,如果包含网址需要处理好短网址
-				},
-				editTime: null,
-				editTimeStatus: false,
-				editName: "",
-				editNameStatus: false,
-				keyword: "",
-				scope: "", //school 校本 private 个人
-				curSubIndex: 0,
-				curBarIndex: 0,
-				curEvaIndex: 0,
-				evaListShow: [],
-				examDetaiInfo: {},
-				targetList: [],
-				isLoading: false,
-				filterPeriod: undefined,
-				curPdInfo: {},
-				filter: {
-					progress: "",
-					source: "",
-					name: ""
-				},
-				semesterRange: null
-			};
-		},
-		computed: {
-			dateOpt1() {
-				let _this = this;
-				return {
-					disabledDate(date) {
-						let d = _this.evaListShow[_this.curEvaIndex]?.startTime ? _this.evaListShow[_this.curEvaIndex].startTime : Date.now();
-						return d && d > date.valueOf();
-					}
-				};
-			},
-			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";
-			} else {
-				this.scope = "private";
-			}
-			this.filterPeriod = this.$store.state.user.curPeriod?.id;
-			// this.findEvaluation(true);
-		},
-		methods: {
-			handleReachBottom() {
-				return this.findEvaluation();
-			},
-			closeKeySearch() {
-				this.isSearch = false;
-				this.filter.name = "";
-				this.filterEv();
-			},
-			getExamTarget(data) {
-                console.log('getExamTarget data:', data)
-				let ids = [];
-				if (data.groupLists.length > 0) {
-                    data.groupLists.forEach((group) => {
-						group.courseLists.forEach((course) => {
-                            ids = ids.concat(course.groupListIds)
-						})
-					})
-				}
-                this.examTargets = data.groupLists;
-                this.$Modal.info({
-                    title: this.$t("learnActivity.createEv.evTarget"),
-                    render: (h) => {
-                        return h(
-                            "ul",
-                            this.examTargets.map((group2, index) => {
-								return h("li",
-									{ style: { marginLeft: "20px" } },
-									[
-										group2.creatorName + " (" + group2.creatorId + ")",
-										[
-											h("ul",
-												this.examTargets[index].courseLists.map((course2) => {
-													return h(
-														"li",
-                                                        { style: { marginLeft: "30px" } },
-														course2.courseName
-													);
-												})
-											)
-										]
-									]
-                                );
-                            })
-                        );
-                    }
-                });
-			},
-			handleEnd(index) {
-				this.$Modal.confirm({
-					title: this.$t("learnActivity.mgtScEv.stopTitle"),
-					content: `${this.$t("learnActivity.mgtScEv.stopContent")}${this.evaListShow[index].name}?`,
-					onOk: () => {
-						let code = this.evaListShow[index].code;
-						this.$api.learnActivity
-							.FinishEva({
-								id: this.evaListShow[index].id,
-								code: code.includes("Exam") ? code : `Exam-${code}`
-								// code: this.evaListShow[index].code.replace('Exam-', '')
-							})
-							.then(
-								(res) => {
-									if (!res.error) {
-										this.$Message.success(this.$t("learnActivity.mgtScEv.stopOk"));
-										this.evaListShow[index].progress = "finish";
-										this.evaListShow[index].progText = this.$t("learnActivity.mgtScEv.finish");
-										this.evaListShow[index].progColor = "#75787d";
-										// this.reload()
-									} else {
-										// this.$Message.error('API ERROR!')
-										this.$Message.error(this.$t("learnActivity.mgtScEv.actionErr"));
-									}
-								},
-								(err) => {
-									// this.$Message.error('API ERROR!')
-								}
-							);
-					}
-				});
-			},
-			//获取各科题目正确率数据
-			getCorrectData(data) {
-				let d = [];
-				if (data.averageTotal) {
-					data.averageTotal.forEach((item) => {
-						let quInfo = this.paperQuInfo.find((pq) => pq.subjectId == item.subjectId);
-						let quNoList = quInfo ? quInfo.quNo : [];
-						let total = item.total.length; //总人数
-						let cData = item.wrongNum.map((w, i) => {
-							let correct = total - w;
-							return {
-								correct: correct, //正确人数
-								wrong: w, //错误人数
-								rate: total ? parseInt((correct * 100) / total) : 0, //正确率
-								quLabel: quNoList[i] ? quNoList[i].label : i
-							};
-						});
-						d.push({
-							subjectId: item.subjectId,
-							subjectName: item.subjectName,
-							data: cData
-						});
-					});
-					this.correctData = d;
-				} else {
-					this.correctData = [];
-				}
-			},
-			//获取已结束评测简要数据分析
-			findSimpleAna() {
-				this.simpleData = {};
-				let requestData = {
-					id: this.examDetaiInfo.id,
-					code: this.examDetaiInfo.code.replace("Exam-", "")
-				};
-				this.$api.learnActivity
-					.simpleAna(requestData)
-					.then(
-						(res) => {
-							if (!res.error) {
-								if (res.averageMap.length && res.averageMap.length) {
-									this.dataErr = false;
-									this.calculating = false;
-									for (let i in res.averageMap) {
-										for (let j in res.averageMap[i].ClassAverage) {
-											res.averageMap[i].ClassAverage[j] = parseFloat(res.averageMap[i].ClassAverage[j].toFixed(2));
-										}
-										let subject = this.examDetaiInfo.subjects.find((item) => {
-											return item.id == res.averageMap[i].subjectId;
-										});
-										if (subject) {
-											res.averageMap[i].subjectId = subject.name;
-										} else {
-											res.averageMap[i].subjectId = "-";
-										}
-									}
-									res.averageTotal.forEach((item) => {
-										let subjectInfo = this.examDetaiInfo.papers.find((subItem) => {
-											return subItem.subjectId == item.subjectId;
-										});
-										if (subjectInfo) {
-											item.subjectName = subjectInfo.subjectName;
-											item.paperScore = subjectInfo.score;
-										} else {
-											item.subjectName = this.examDetaiInfo.subjects && this.examDetaiInfo.subjects.length ? this.examDetaiInfo.subjects[0].name : "";
-											item.paperScore = this.examDetaiInfo.papers && this.examDetaiInfo.papers[0] ? this.examDetaiInfo.papers[0].score : "";
-										}
-									});
-									this.simpleData = res;
-									this.getCorrectData(res);
-								} else {
-									this.calculating = true;
-									this.$Message.warning(this.$t("learnActivity.simple.inCalc"));
-								}
-							} else {
-								this.dataErr = true;
-								this.$Message.error(this.$t("learnActivity.simple.simpleErr"));
-							}
-						},
-						(err) => {
-							this.dataErr = true;
-						}
-					)
-					.finally(() => {
-						this.isLoading = false;
-					});
-			},
-			selectBar(index) {
-				this.$EventBus.$emit("EvBarChange", index);
-				this.checkScoreSave(this.handleSelectBar, index);
-			},
-			handleSelectBar(index) {
-				this.curBarIndex = index;
-				this.$nextTick(() => {
-					if (this.$refs["score-box"]) this.$refs["score-box"].showTest = false;
-				});
-			},
-			async copyNotice(index) {
-				this.shareUrl = `https://${window.location.host}/studentWeb/examView?aId=${this.evaListShow[index].id}`;
-				this.qrConfig.url = this.shareUrl;
-				let evName = this.evaListShow[this.curEvaIndex].name;
-				let evType = this.getModeLabel(this.evaListShow[this.curEvaIndex].source);
-				let soc = this.evaListShow[this.curEvaIndex].owner === "school" ? this.$t("learnActivity.mgtScEv.shareText4") : this.$t("learnActivity.mgtScEv.shareText5");
-				let socName = this.evaListShow[this.curEvaIndex].subjects.map((item) => item.name).join("、");
-				try {
-					let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl));
-					let 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.shareText11")}`;
-					this.handleCopy(shareContent);
-				} catch (e) {
-					let 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${encodeURI(this.shareUrl)}\n\n${this.$t("learnActivity.mgtScEv.shareText11")}`;
-					this.handleCopy(shareContent);
-				}
-			},
-			async copyLink(index) {
-				try {
-					this.shareUrl = `https://${window.location.host}/studentWeb/examView?aId=${this.evaListShow[index].id}`;
-					let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl));
-					this.handleCopy(shortUrl.result);
-				} catch (e) {
-					this.handleCopy(ncodeURI(this.shareUrl));
-				}
-			},
-			handleCopy(content) {
-				//直接复制链接
-				this.$copyText(content).then(
-					(ok) => {
-						this.$Message.success(this.$t("settings.copyModal1"));
-					},
-					(fail) => {
-						this.$Message.error(this.$t("settings.copyModal2"));
-					}
-				);
-			},
-			async openQrcode() {
-				this.shareUrl = `https://${window.location.host}/studentWeb/examView?aId=${this.evaListShow[index].id}`;
-				let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl));
-				this.qrConfig.url = this.shareUrl;
-
-				let evName = this.evaListShow[this.curEvaIndex].name;
-				let evType = this.getModeLabel(this.evaListShow[this.curEvaIndex].source);
-				let soc = this.evaListShow[this.curEvaIndex].owner === "school" ? this.$t("learnActivity.mgtScEv.shareText4") : this.$t("learnActivity.mgtScEv.shareText5");
-				let socName = this.evaListShow[this.curEvaIndex].subjects.map((item) => item.name).join("、");
-				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.$copyText(this.qrConfig.shareContent).then(
-				//     ok => {
-				//         this.$Message.success(this.$t("settings.copyModal1"))
-				//     },
-				//     fail => {
-				//         this.$Message.error(this.$t("settings.copyModal2"))
-				//     }
-				// )
-				//暂时隐藏 现在不显示二维码,仅提供复制链接
-				// this.showQrStatus = true
-			},
-			/**
-			 * @param isFresh 是否清空当前列表 如果是筛选条件变化需要清空,如果是只是下拉刷新则不需要
-			 */
-			findEvaluation(isFresh) {
-				// 下拉加载需要返回一个Promise
-				return new Promise((r, j) => {
-					if (isFresh) {
-						this.evaListShow = [];
-						this.ctnToken = "";
-					}
-					let requestData = {
-						count: this.pageCount
-					};
-					//if(this.scope === 'school'){
-					//	requestData.stime = this.semesterRange.stime
-					//	requestData.etime = this.semesterRange.etime
-					//}
-					//判断是否加载完所有数据
-					if (this.ctnToken == "end") {
-                        this.$Message.success(this.$t("learnActivity.jointexam.loadAll"));
-						r();
-						return;
-					}
-					if (this.ctnToken) requestData.token = this.ctnToken;
-					//添加其他查询条件
-					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.FindJointExamList(requestData).then(
-						(res) => {
-							if (!res.error) {
-								// res.examInfo = res.examInfo.sort((a, b) => {
-								//     return a.createTime - b.createTime > 0 ? -1 : 1
-								// })
-                                res.jointExamInfo.forEach((item) => {
-									let statusInfo = this.getEvStatusInfo(item.progress);
-									item.progText = statusInfo.progText;
-									item.progColor = statusInfo.progColor;
-								});
-                                this.evaListShow.push(...res.jointExamInfo);
-                                if (isFresh && res.jointExamInfo.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.jointexam.evListErr"));
-								this.isLoading = false;
-								j();
-							}
-						},
-						(err) => {
-							this.isLoading = false;
-							j();
-						}
-					);
-				});
-			},
-			getEvStatusInfo(progress) {
-				let info = {};
-				if (progress == "pending") {
-					info.progText = this.$t("learnActivity.mgtScEv.pending");
-					info.progColor = "#2d8cf0";
-				} else if (progress == "going") {
-					info.progText = this.$t("learnActivity.mgtScEv.going");
-					info.progColor = "#2d8cf0";
-				} else if (progress == "finish") {
-					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) {
-				//	info.scoreText = this.$t("learnActivity.mgtScEv.scoreStatus1");
-				//	info.scoreColor = "#515a6e";
-				//}
-				return info;
-			},
-			selectEvaluation(index) {
-				this.checkScoreSave(this.toEvaluation, index);
-				this.$EventBus.$emit("onEvaChange", this.evaListShow[index]);
-			},
-			toEvaluation(index) {
-				this.curSubIndex = 0;
-				this.curEvaIndex = index;
-				sessionStorage.setItem("examScope", this.evaListShow[index].scope);
-				//跨校个人评测
-				if (!this.evaListShow[this.curEvaIndex].curSchool) {
-					this.examDetaiInfo = this.evaListShow[this.curEvaIndex];
-					this.isLoading = false;
-					return;
-				}
-				if (this.evaListShow[this.curEvaIndex].progress == "going" && this.curBarIndex === 0) {
-					this.curBarIndex = 3;
-				}
-				if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].papers.length == 0) {
-					this.findExamInfo();
-				} else {
-					this.examDetaiInfo = this.evaListShow[this.curEvaIndex];
-					if (this.examDetaiInfo.progress === "finish") {
-						this.findSimpleAna();
-					}
-				}
-			},
-			//查询当前评测的详细信息
-			findExamInfo() {
-				let requestData = {
-					id: this.evaListShow[this.curEvaIndex].id,
-					code: this.evaListShow[this.curEvaIndex].code
-				};
-				this.isLoading = true;
-				this.$api.learnActivity
-					.FindExamInfo(requestData)
-					.then(
-						async (res) => {
-							this.dataErr = false;
-							if (!res.error) {
-								let resData = res.examInfo[0];
-								resData.score = 0;
-								for (let index in resData.papers) {
-									let blob = resData.papers[index].blob;
-									let sheetNo = resData.papers[index].sheetNo;
-									let totlaSocre = resData.papers[index].point.reduce((prev, next, index, array) => {
-										return prev + next;
-									});
-									resData.examPaperErr = false;
-									resData.papers[index].examScope = resData.scope;
-									resData.papers[index].examCode = resData.code;
-									resData.papers[index].examId = resData.id;
-									resData.papers[index].owner = resData.owner;
-									resData.papers[index].sheetNo = sheetNo;
-									try {
-										let tmdid = this.evaListShow[this.curEvaIndex].code.substr(this.evaListShow[this.curEvaIndex].code.lastIndexOf("-") + 1)
-										if(tmdid != this.$store.state.userInfo.TEAMModelId && this.evaListShow[this.curEvaIndex].scope != 'school') {
-											resData.papers[index] = await this.$evTools.getFullPaperByTmdId(tmdid, resData.papers[index].blob)
-										} else {
-											resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
-										}
-									} catch (e) {
-										resData.papers[index].item = [];
-										resData.examPaperErr = true;
-										this.$Message.error(this.$t("learnActivity.simple.paperErr"));
-									}
-									resData.papers[index].examScope = resData.scope;
-									resData.papers[index].examCode = resData.code;
-									resData.papers[index].examId = resData.id;
-									resData.papers[index].owner = resData.owner;
-									resData.papers[index].sheetNo = sheetNo;
-									resData.papers[index].totlaSocre = totlaSocre;
-									if (!resData.papers[index].subjectId) {
-										resData.papers[index].subjectId = blob.substring(blob.lastIndexOf("/") + 1);
-										resData.papers[index].subjectName = resData.subjects[index].name;
-									}
-									resData.papers[index].blob = blob;
-									resData.score += resData.papers[index].score;
-
-									//补充评测状态信息
-									let statusInfo = this.getEvStatusInfo(resData.progress);
-									resData.progText = statusInfo.progText;
-									resData.progColor = statusInfo.progColor;
-									//设置各科题号信息
-									this.setPaperQuInfo(resData.papers);
-								}
-								this.evaListShow.splice(this.curEvaIndex, 1, resData);
-								this.examDetaiInfo = resData;
-								// if (this.examDetaiInfo.progress === 'finish' && !this.dataErr) {
-								if (this.examDetaiInfo.progress === "finish") {
-									this.findSimpleAna();
-								}
-							} else {
-								this.$Message.error(this.$t("learnActivity.mgtScEv.exInfoErr"));
-								// this.$Message.error('API ERROR!')
-							}
-						},
-						(err) => {
-							// this.$Message.error('API ERROR!')
-						}
-					)
-					.finally(() => {
-						this.isLoading = false;
-					});
-			},
-			// 设置各科题号信息
-			setPaperQuInfo(papers) {
-				this.paperQuInfo = [];
-				if (!papers) return;
-				let objectiveQu = ["single", "multiple", "judge"];
-				papers.forEach((paper) => {
-					let data = [];
-					let realIndex = 0;
-					paper.item?.forEach((item, index) => {
-						if (item.children.length) {
-							item.children.forEach((childItem, childIndex) => {
-								let i = realIndex++;
-								data.push({
-									label: index + 1 + "-" + (childIndex + 1),
-									value: i,
-									disabled: objectiveQu.includes(childItem.type),
-									quIndex: index,
-									childIndex: childIndex
-								});
-							});
-						} else {
-							let i = realIndex++;
-							data.push({
-								label: index + 1 + "",
-								value: i,
-								disabled: objectiveQu.includes(item.type),
-								quIndex: index,
-								childIndex: -1
-							});
-						}
-					});
-					this.paperQuInfo.push({
-						subjectId: paper.subjectId,
-						subjectName: paper.subjectName,
-						quNo: data
-					});
-				});
-			},
-			checkScoreSave(fn, index) {
-				let compStu = this.$refs["score-box"] ? this.$refs["score-box"].$refs["byStuMark"] : null;
-				let compQu = this.$refs["score-box"] ? this.$refs["score-box"].$refs["byQuMark"] : null;
-				if ((compStu && compStu.isUpd) || (compQu && compQu.isUpd)) {
-					this.$Modal.confirm({
-						title: this.$t("learnActivity.score.saveScoreTitle"),
-						content: this.$t("learnActivity.score.saveScoreContent"),
-						okText: this.$t("learnActivity.mark.yes"),
-						cancelText: this.$t("learnActivity.mark.no"),
-						onOk: () => {
-							if (compStu && compStu.isUpd) {
-								compStu.saveScore();
-							} else if (compQu && compQu.isUpd) {
-								compQu.saveScore();
-							}
-							if (fn) fn(index);
-						},
-						onCancel: () => {
-							if (compStu && compStu.isUpd) {
-								compStu.isUpd = false;
-							} else if (compQu && compQu.isUpd) {
-								compStu.preSaveList = {};
-							}
-							if (fn) fn(index);
-						}
-					});
-				} else {
-					if (fn) fn(index);
-				}
-			},
-			goToCreate() {
-				if (this.scope == "school") {
-					this.$router.push({
-						name: "createSchoolEva"
-					});
-				} else if (this.scope == "private") {
-					this.$router.push({
-						name: "createPrivEva"
-					});
-				}
-			},
-			// 复制评测
-			copyEv() {
-				// 课中评测不提供复制操作
-				if (this.evaListShow[this.curEvaIndex]?.source === "1") {
-					this.$Modal.info({
-						title: this.$t("learnActivity.mgtScEv.copyTitle"),
-						content: this.$t("learnActivity.mgtScEv.copyContent1")
-					});
-				} else if (this.evaListShow[this.curEvaIndex]) {
-					this.$Modal.confirm({
-						title: this.$t("learnActivity.mgtScEv.copyTitle"),
-						content: this.$t("learnActivity.mgtScEv.copyContent"),
-						onOk: () => {
-							console.log(this.evaListShow[this.curEvaIndex]);
-							if (this.scope == "school") {
-								this.$router.push({
-									name: "createSchoolEva",
-									params: {
-										evaluationInfo: this.evaListShow[this.curEvaIndex]
-									}
-								});
-							} else {
-								this.$router.push({
-									name: "createPrivEva",
-									params: {
-										evaluationInfo: this.evaListShow[this.curEvaIndex]
-									}
-								});
-							}
-						}
-					});
-				}
-			},
-			/**删除评测信息 */
-			deleteEvaluation() {
-				let isArtExam = this.evaListShow[this.curEvaIndex].qamode === 2;
-				if (isArtExam) {
-					this.$Message.warning(this.$t("learnActivity.mgtScEv.delArtExamTip"));
-					return;
-				}
-				this.$Modal.confirm({
-					title: this.$t("learnActivity.mgtScEv.deleteTitle"),
-					content: `${this.$t("learnActivity.mgtScEv.deleteContent")}${this.evaListShow[this.curEvaIndex].name}?`,
-					onOk: () => {
-						let params = {
-							id: this.evaListShow[this.curEvaIndex].id,
-							scope: this.evaListShow[this.curEvaIndex].scope,
-							code: this.evaListShow[this.curEvaIndex].code.replace("Exam-", "")
-						};
-						this.isLoading = true;
-						this.$api.learnActivity
-							.DeleteExamInfo(params)
-							.then(
-								(res) => {
-									if (res.error == null) {
-										let index = this.curEvaIndex;
-										this.selectEvaluation(0);
-										this.evaListShow.splice(index, 1);
-										this.$Message.success(this.$t("learnActivity.mgtScEv.deleteOk"));
-									} else {
-										this.$Message.error(this.$t("learnActivity.mgtScEv.deleteErr"));
-									}
-								},
-								(err) => {
-									this.$Message.error(this.$t("learnActivity.mgtScEv.deleteErr"));
-								}
-							)
-							.finally(() => {
-								setTimeout(() => {
-									this.isLoading = false;
-								}, 500);
-							});
-					}
-				});
-			},
-			//筛选评测
-			filterEv() {
-				this.ctnToken = "";
-				this.findEvaluation(true);
-			},
-			/**获取mode对应的label */
-			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;
-					}
-				}
-			},
-			/**获取type对应的label */
-			getTypeLabel(code) {
-				for (let item of this.$GLOBAL.EV_TYPE()) {
-					if (item.value == code) {
-						return item.label;
-					}
-				}
-			},
-			editEvName(index) {
-				this.editNameStatus = true;
-				this.editName = this.evaListShow[index]?.name;
-			},
-			confirmEditName() {
-				if (this.editName) {
-					this.evaListShow[this.curEvaIndex].code = this.evaListShow[this.curEvaIndex].code.replace("Exam-", "");
-					this.btnLoading = true;
-					this.$api.learnActivity
-						.updExamEndtime({
-							id: this.evaListShow[this.curEvaIndex].id,
-							code: this.evaListShow[this.curEvaIndex].code,
-							name: this.editName
-						})
-						.then(
-							(res) => {
-								if (res.code == 200) {
-									this.evaListShow[this.curEvaIndex].name = this.editName;
-									this.$Message.success(this.$t("learnActivity.mgtScEv.updOk"));
-								} else {
-									this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
-								}
-							},
-							(err) => {
-								this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
-							}
-						)
-						.finally(() => {
-							this.editNameStatus = false;
-							this.btnLoading = false;
-						});
-				} else {
-					this.$Message.warning(this.$t("learnActivity.mgtScEv.edNameHolder"));
-				}
-			},
-			handleTime(value) {
-				if (value.indexOf("00:00") > 0) {
-					value = value.replace("00:00", "23:59:59");
-					this.editTime = value;
-				}
-			},
-			editEvEndtime(index) {
-				this.editTimeStatus = true;
-				this.editTime = new Date(this.evaListShow[index]?.endTime);
-			},
-			confirmEditEndtime() {
-				if (this.editTime) {
-					this.evaListShow[this.curEvaIndex].code = this.evaListShow[this.curEvaIndex].code.replace("Exam-", "");
-					this.btnLoading = true;
-					this.$api.learnActivity
-						.updExamEndtime({
-							id: this.evaListShow[this.curEvaIndex].id,
-							code: this.evaListShow[this.curEvaIndex].code,
-							time: this.editTime.getTime()
-						})
-						.then(
-							(res) => {
-								if (res.code == 200) {
-									this.evaListShow[this.curEvaIndex].endTime = this.editTime.getTime();
-									this.$Message.success(this.$t("learnActivity.mgtScEv.updOk"));
-								} else {
-									this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
-								}
-							},
-							(err) => {
-								this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
-							}
-						)
-						.finally(() => {
-							this.editTimeStatus = false;
-							this.btnLoading = false;
-						});
-				} else {
-					this.$Message.warning(this.$t("learnActivity.mgtScEv.endTimeHolder"));
-				}
-			}
-		},
-		watch: {
-			curBarIndex(n, o) {
-				if (n == 0) {
-					if (this.$refs["score-box"] && this.$refs["score-box"].$refs["score-table"]) {
-						this.$nextTick(() => {
-							this.$refs["score-box"].$refs["score-table"].handleResize();
-						});
-					}
-				}
-			},
-			"$store.state.user.curSemester": {
-				deep: true,
-				immediate: true,
-				handler(n, old) {
-					if (n) {
-						this.scope = this.$route.name === "schoolExam" ? "school" : "private";
-						this.semesterRange = this.$tools.getStTimeByYearAndSemester(n.year, n.index);
-						let curPeriod = this.$store.state.user.curPeriod;
-						this.filterPeriod = curPeriod.id;
-					}
-					this.findEvaluation(true);
-				}
-			}
-		}
-	};
-</script>
-<style lang="less" scoped>
-	@import "./jointExamMgt.less";
-</style>
-<style lang="less">
-	.jointexam-list-main {
-		.ivu-scroll-container {
-			width: 100%;
-			height: 100% !important;
-		}
-	}
-</style>

+ 0 - 159
TEAMModelOS/Controllers/Common/JointExamController.cs

@@ -1,159 +0,0 @@
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Configuration;
-using TEAMModelOS.SDK.DI;
-using TEAMModelOS.SDK;
-using Microsoft.Extensions.Options;
-using TEAMModelOS.Models;
-using System.Net.Http;
-using Microsoft.AspNetCore.Authorization;
-using TEAMModelOS.Filter;
-using System.Text.Json;
-using System.Threading.Tasks;
-using TEAMModelOS.SDK.Extension;
-using System.Text;
-using System.Collections.Generic;
-using TEAMModelOS.SDK.Models;
-using Azure.Cosmos;
-using System;
-
-namespace TEAMModelOS.Controllers.Common
-{
-    [ProducesResponseType(StatusCodes.Status200OK)]
-    [ProducesResponseType(StatusCodes.Status400BadRequest)]
-
-    [Route("common/jointexam")]
-    [ApiController]
-    public class JointExamController : ControllerBase
-    {
-        private readonly AzureCosmosFactory _azureCosmos;
-        private readonly SnowflakeId _snowflakeId;
-        private readonly AzureServiceBusFactory _serviceBus;
-        private readonly DingDing _dingDing;
-        private readonly Option _option;
-        private readonly AzureStorageFactory _azureStorage;
-        private readonly AzureRedisFactory _azureRedis;
-        private readonly IHttpClientFactory _httpClient;
-        public IConfiguration _configuration { get; set; }
-        private readonly CoreAPIHttpService _coreAPIHttpService;
-        private readonly IWebHostEnvironment _environment;
-        public JointExamController(IWebHostEnvironment environment, CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
-           IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, IConfiguration configuration, IHttpClientFactory httpClient)
-        {
-            _azureCosmos = azureCosmos;
-            _serviceBus = serviceBus;
-            _snowflakeId = snowflakeId;
-            _dingDing = dingDing;
-            _option = option?.Value;
-            _azureStorage = azureStorage;
-            _azureRedis = azureRedis;
-            _configuration = configuration;
-            _coreAPIHttpService = coreAPIHttpService;
-            _environment = environment;
-            _httpClient = httpClient;
-        }
-
-        /// <summary>
-        /// 查询考试信息
-        /// </summary>
-        /// <param name="request"></param>
-        /// <returns></returns>
-        [ProducesDefaultResponseType]
-        [Authorize(Roles = "IES")]
-        [AuthToken(Roles = "teacher,admin")]
-        [HttpPost("find")]
-        public async Task<IActionResult> Find(JsonElement request)
-        {
-            try
-            {
-                var client = _azureCosmos.GetCosmosClient();
-                var (userId, _, _, school) = HttpContext.GetAuthTokenInfo();
-
-                StringBuilder stringBuilder = new($"SELECT * FROM c WHERE c.creatorId = '{userId}'");
-                //开始时间,
-                if (request.TryGetProperty("stime", out JsonElement _stime))
-                {
-                    if (long.TryParse($"{_stime}", out long stime))
-                    {
-                        stringBuilder.Append($" AND  c.createTime >= {stime} ");
-
-                    };
-                };
-                //默认当前时间
-                if (request.TryGetProperty("etime", out JsonElement _etime))
-                {
-                    if (long.TryParse($"{_etime}", out long etime))
-                    {
-                        stringBuilder.Append($" AND  c.createTime <= {etime} ");
-                    };
-                };
-
-                if (request.TryGetProperty("name", out JsonElement name) && !string.IsNullOrWhiteSpace($"{name}"))
-                {
-                    stringBuilder.Append($" AND Contains( c.name , '{name}') =  true ");
-                }
-                if (request.TryGetProperty("progress", out JsonElement progress) && !string.IsNullOrWhiteSpace($"{progress}"))
-                {
-                    stringBuilder.Append($" AND c.progress = '{progress}' ");
-                }
-                if (request.TryGetProperty("source", out JsonElement source) && !string.IsNullOrWhiteSpace($"{source}"))
-                {
-                    stringBuilder.Append($" AND c.source = '{source}' ");
-                }
-                stringBuilder.Append("order by c.createTime desc");
-                //string token = null;
-                string token = default;
-                //默认不指定返回大小
-                int? topcout = null;
-                if (request.TryGetProperty("count", out JsonElement jcount))
-                {
-                    if (!jcount.ValueKind.Equals(JsonValueKind.Undefined) && !jcount.ValueKind.Equals(JsonValueKind.Null) && jcount.TryGetInt32(out int data))
-                    {
-                        topcout = data;
-                    }
-                }
-                //是否需要进行分页查询,默认不分页
-                bool iscontinuation = false;
-                if (topcout != null && topcout.Value > 0)
-                {
-                    iscontinuation = true;
-                }
-                //如果指定了返回大小
-                if (request.TryGetProperty("token", out JsonElement token_1))
-                {
-                    if (!token_1.ValueKind.Equals(JsonValueKind.Null) && token_1.ValueKind.Equals(JsonValueKind.String))
-                    {
-                        token = token_1.GetString();
-
-                    }
-                }
-                List<JointExam> jointExamInfo = new List<JointExam>();
-                await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: stringBuilder.ToString(), continuationToken: token, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("JointExam"),  MaxItemCount = topcout }))
-                {
-                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
-                    {
-                        foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
-                        {
-                            jointExamInfo.Add(obj.ToObject<JointExam>());
-                        }
-                    }
-                    if (iscontinuation)
-                    {
-                        token = item.GetContinuationToken();
-                        break;
-                    }
-
-                }
-                return Ok(new { jointExamInfo, token = token });
-            }
-            catch (Exception e)
-            {
-                await _dingDing.SendBotMsg($"OS,{_option.Location},exam/find()\n{e.Message}\n{e.StackTrace}", GroupNames.醍摩豆服務運維群組);
-                return BadRequest();
-            }
-
-        }
-    }
-}

+ 11 - 45
TEAMModelOS/Controllers/XTest/TestController.cs

@@ -3097,8 +3097,10 @@ namespace TEAMModelOS.Controllers
             jointEvent.name = "統測活動(測試)";
             jointEvent.pk = "JointEvent";
             jointEvent.code = "JointEvent";
+            jointEvent.startTime = DateTimeOffset.UtcNow.AddDays(-4).ToUnixTimeMilliseconds();
+            jointEvent.endTime = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeMilliseconds();
             jointEvent.progress = "going";
-            jointEvent.createTime = DateTimeOffset.UtcNow.AddDays(-3).ToUnixTimeMilliseconds();
+            jointEvent.createTime = DateTimeOffset.UtcNow.AddDays(-4).ToUnixTimeMilliseconds();
             //分享試卷
             ///分享試卷1 個人試券
             JointEventPaper jointEventPaper1 = new JointEventPaper();
@@ -3270,7 +3272,7 @@ namespace TEAMModelOS.Controllers
         
 
         //評量統一生成測試
-        /*
+        
         [HttpPost("add-exam-byJoint")]
         public async Task<IActionResult> AddExamByJointExam(JsonElement json)
         {
@@ -3293,10 +3295,10 @@ namespace TEAMModelOS.Controllers
             List<ExamInfo> examList = new List<ExamInfo>();
             if(jointExam.groupLists.Count > 0)
             {
-                foreach (JointExam.JointExamGroup jointExamGroup in jointExam.groupLists)
+                foreach (JointEventTGroupBase jointExamGroup in jointExam.groupLists)
                 {
                     string actExamCreatorId = jointExamGroup.creatorId;
-                    foreach(JointExam.JointExamGroup.JointExamGroupCourse jointExamGroupCourse in jointExamGroup.courseLists)
+                    foreach(JointEventTGroupCourse jointExamGroupCourse in jointExamGroup.courseLists)
                     {
                         string actExamCourseId = jointExamGroupCourse.courseId;
                         string actExamCourseName = jointExamGroupCourse.courseName;
@@ -3311,10 +3313,10 @@ namespace TEAMModelOS.Controllers
                         actExamInfo.name = jointExam.name;
                         actExamInfo.jointExamId = jointExam.id;
                         ///評量stuLists
-                        foreach (string actGroupId in jointExamGroupCourse.groupListIds)
+                        foreach (JointEventTGroupCourseGroup actGroup in jointExamGroupCourse.groupLists)
                         {
-                            actExamInfo.stuLists.Add(actGroupId);
-                            List<string> targetRow = new List<string>() { actExamCourseId, actGroupId };
+                            actExamInfo.stuLists.Add(actGroup.id);
+                            List<string> targetRow = new List<string>() { actExamCourseId, actGroup.id };
                             actExamInfo.targets.Add(System.Text.Json.JsonSerializer.SerializeToElement(targetRow));
                             actExamInfo.subjects.Add(new ExamSubject() { id = actExamCourseId, name = actExamCourseName });
                         }
@@ -3341,9 +3343,9 @@ namespace TEAMModelOS.Controllers
 
             return Ok();
         }
-        */
+        
         //生成評量(單)
-        /*
+        
         private async Task<string> generateExam(JointExam jointExam, ExamInfo exam)
         {
             var client = _azureCosmos.GetCosmosClient();
@@ -3463,41 +3465,5 @@ namespace TEAMModelOS.Controllers
 
             return Result;
         }
-        */
-        //統測資料架構
-        /*
-        public class JointExam : CosmosEntity 
-        {
-            public string creatorId { get; set; }
-            public string name { get; set; }
-            public List<JointExamClass> classes { get; set; } = new();
-            public List<JointExamGroup> groupLists { get; set; } = new();
-            public List<PaperSimple> papers { get; set; } = new();
-            public string progress { get; set; }
-            public long createTime { get; set; }
-            public long updateTime { get; set; }
-            public long startTime { get; set; }
-            public long endTime { get; set; }
-            public string scope { get; set; }
-
-            public class JointExamClass
-            {
-                public string school { get; set; }
-                public List<string> classIds { get; set; } = new();
-            }
-            public class JointExamGroup
-            {
-                public string creatorId { get; set; }
-                public List<JointExamGroupCourse> courseLists { get; set; } = new();
-
-                public class JointExamGroupCourse
-                {
-                    public string courseId { get; set; }
-                    public string courseName { get; set; }
-                    public List<string> groupListIds { get; set; } = new();
-                }
-            }
-        }
-        */
     }
 }