Quellcode durchsuchen

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

OnePsycho vor 4 Jahren
Ursprung
Commit
17fe7d93a8

+ 0 - 117
TEAMModelOS/ClientApp/src/view/learnactivity/AutoCreate.less

@@ -1,117 +0,0 @@
-@main-bgColor: rgb(40,40,40); //主背景颜色
-@borderColor: #424242;
-@primary-textColor: #fff; //文本主颜色
-@second-textColor: #a5a5a5; //文本副级颜色
-@primary-fontSize: 14px;
-@second-fontSize: 16px;
-
-.auto-create-name {
-    text-align: center;
-    margin-top: 30px;
-    color: #CCCCCC;
-    display: block;
-}
-.auto-create-wrap {
-    height: 100%;
-    background: #2B2B2E;
-    display: flex;
-}
-.select-box {
-    margin-top:40px;
-    width: 35%;
-    height: 85%;
-    background-color:#404040;
-    border-radius:5px;
-/*    border: 1px solid #606060;
-    box-shadow:2px 2px 5px #CCCCCC;*/
-    margin-left: 10%;
-}
-.button-style{
-    margin-top:5px;
-    margin-left:15px;
-}
-.type-title {
-    margin-top: 10px;
-    width: 100%;
-    text-align: center;
-}
-.question-condition-wrap {
-    width: 1000px;
-    margin: auto;
-    margin-top: 25px;
-    margin-left:15px;
-    .question-condition-item {
-        color: white;
-        font-size: 16px;
-        margin-top: 25px;
-
-        .condition-label {
-            /*margin-right: 15px;*/
-            display: inline-block;
-            color: @second-textColor;
-            width: 90px;
-        }
-    }
-}
-.question-num-item {
-  margin-bottom: 25px;
-  /*display: inline-block;*/
-  color: @primary-textColor;
-
-  .question-type-label {
-    margin-right: 10px;
-  }
-
-  .input-tag-text {
-    color: @second-textColor;
-    display: inline-block;
-    margin: 0px 6px;
-  }
-
-  .total-text-tag {
-    margin-left: 20px;
-  }
-
-  .question-difficulty-label {
-    /*margin-left: 30px;*/
-    display: inline-block;
-    margin-right: 10px;
-  }
-
-  .difficulty-text-label{
-    margin-left:25px;
-  }
-}
-.count-difficulty-item {
-  display: inline-block;
-  min-width: 40px;
-  text-align: center;
-}
-
-.point-tab-content {
-  min-height: 600px;
-  background: #505050;
-  /*padding-left:15px;*/
-  .point-tab-header {
-    width: 100%;
-    height: 50px;
-    margin-bottom: 5px;
-    border-bottom: 1px solid #606060;
-    padding-left: 15px;
-
-    .point-scope-label {
-      line-height: 45px;
-      margin-right: 30px;
-      color: #a5a5a5;
-      font-size: 14px;
-      font-weight: bold;
-      padding: 5px 0;
-      cursor: pointer;
-    }
-
-    .point-scope-label-active{
-      color:white;
-      border-bottom:2px solid white;
-    }
-  }
-}

+ 0 - 462
TEAMModelOS/ClientApp/src/view/learnactivity/AutoCreate.vue

@@ -1,462 +0,0 @@
-<template>
-    <div class="auto-create-wrap">
-
-        <div class="select-box">
-            <vuescroll>
-                <div class="type-title">
-                    <h1 style="color:#dcdee2">个人题库</h1>
-                </div>
-                <div class="question-condition-wrap">
-                    <div class="question-condition-item question-num-item" v-for="(items,indexs) in quePerson" :key="indexs">
-                        <span class="condition-label">{{items.name}}:</span>
-                        <span class="question-difficulty-label">难度</span>
-                        <Select v-model="items.level" style="width:90px" size="small" >
-                            <Option v-for="(item,index) in difficultyList" :value="item.value" :key="index">{{ item.label }}</Option>
-                        </Select>
-                        <span class="input-tag-text total-text-tag">共</span>
-                        <InputNumber v-model="items.count" placeholder="0" style="width: 40px" size="small" />
-                        <span class="input-tag-text">道</span>
-                    </div>
-                    <div class="question-condition-item" style="margin-top:0px;">
-                        <span class="condition-label">知识点:</span>
-                        <Tag closable color="#404040" v-for="(item,index) in checkedPoints" :key="index">{{item.name}}</Tag>
-                        <Icon type="md-add-circle" color="white" size="18" style="margin-left:15px;cursor:pointer;" @click="selectPoints" />
-                    </div>
-                </div>
-            </vuescroll>
-        </div>
-        <div class="select-box" v-if='$store.state.userInfo.schoolCode != ""'>
-            <vuescroll>
-                <div class="type-title">
-                    <h1 style="color:#dcdee2">校本题库</h1>
-                </div>
-                <div class="question-condition-wrap">
-                    <div class="question-condition-item">
-                        <span class="condition-label">适用学段:</span>
-                        <RadioGroup v-model="autoCreateFilter.periodCode" style="display:inline-block;">
-                            <Radio v-for="(item,index) in $store.state.user.schoolProfile.school_base.period" :label="item.id" :key="index" style="margin-right:30px;"> {{item.name}}</Radio>
-                        </RadioGroup>
-                    </div>
-                    <div class="question-condition-item question-num-item " v-if="schoolBaseInfo.length > 0">
-                        <span class="condition-label">适用科目:</span>
-                        <Select style="width:90px" size="small" v-model="autoCreateFilter.subjectId">
-                            <Option v-for="(item,index) in schoolBaseInfo[Number(autoCreateFilter.periodCode) - 1].subjects" :value="item.id" :key="index">{{item.name }}</Option>
-                        </Select>
-                    </div>
-                    <div class="question-condition-item question-num-item"  v-if="schoolBaseInfo.length > 0">
-                        <span class="condition-label">适用年級:</span>
-                        <Select multiple style="min-width:90px;max-width:200px" size="small" v-model="autoCreateFilter.gradesId">
-                            <Option v-for="(item,index) in schoolBaseInfo[Number(autoCreateFilter.periodCode)].grades" :value="item.id" :key="index">{{item.name }}</Option>
-                        </Select>
-                    </div>
-                    <div class="question-condition-item question-num-item" v-for="(items,indexs) in queSchool" :key="indexs">
-                        <span class="condition-label">{{items.name}}:</span>
-                        <span class="question-difficulty-label">难度</span>
-                        <Select v-model="items.level" style="width:90px" size="small">
-                            <Option v-for="(item,index) in difficultyList" :value="item.value" :key="index">{{ item.label }}</Option>
-                        </Select>
-                        <span class="input-tag-text total-text-tag">共</span>
-                        <InputNumber v-model="items.count" placeholder="0" style="width: 40px" size="small" />
-                        <span class="input-tag-text">道</span>
-                    </div>
-                    <div class="question-condition-item" style="margin-top:0px;">
-                        <span class="condition-label">知识点:</span>
-                        <Tag closable color="#404040" v-for="(item,index) in checkedPoints" :key="index">{{item.name}}</Tag>
-                        <Icon type="md-add-circle" color="white" size="18" style="margin-left:15px;cursor:pointer;" @click="selectPoints" />
-                    </div>
-
-                </div>
-            </vuescroll>
-        </div>
-
-        <div>
-            <Button type="info" class="button-style" @click="handleFilterData">{{isLoading ? '组卷成功将自动跳转到预览页面,组卷中...':'开始组卷'}}</Button>
-        </div>
-        <Modal v-model="selectPointsStatus"
-               title="设置知识点"
-               width="700"
-               class-name="dark-iview-modal points-component-wrap"
-               @on-ok="confirmSelectPoints"
-               @on-cancel="cancelSelectPoints">
-            <BasePoints @onCheckChange="getCheckedPoints"></BasePoints>
-        </Modal>
-    </div>
-</template>
-<script>
-    import BasePoints from '@/view/evaluation/components/BasePoints.vue'
-    export default {
-        components: {
-            BasePoints
-        },
-        props: {
-            subjectCode: {
-                type: String,
-                default: ''
-            },
-            periodCode: {
-                type: String,
-                default: ''
-            }
-        },
-        data() {
-            return {
-                isSchool: false,
-                checkedPoints: [],
-                isLoading: false,
-                activePointTab: 1,
-                pointsInBlockList: [],
-                pointBlockList: [],
-                pointTab: 'pioints',
-                selectPointsStatus: false,
-                quePerson: [
-                    {
-                        id: 1,
-                        name: '单选题',
-                        count: 0,
-                        level: -1,
-                        type:'single'
-                    },
-                    {
-                        id: 2,
-                        name: '多选题',
-                        count: 0,
-                        level: -1,
-                        type: "multiple"
-                    },
-                    {
-                        id: 3,
-                        name: '判断题',
-                        count: 0,
-                        level: -1,
-                        type: "judge"
-                    },
-                    {
-                        id: 4,
-                        name: '填空题',
-                        count: 0,
-                        level: -1,
-                        type: "complete"
-                    },
-                    {
-                        id: 5,
-                        name: '问答题',
-                        count: 0,
-                        level: -1,
-                        type:'subjective'
-                        
-                    },
-                    {
-                        id: 6,
-                        name: '综合题',
-                        count: 0,
-                        level: -1,
-                        type: 'compose'
-                    },
-                ],
-                queSchool: [
-                    {
-                        id: 1,
-                        name: '单选题',
-                        count: 0,
-                        level: -1,
-                        type:'single'
-                    },
-                    {
-                        id: 2,
-                        name: '多选题',
-                        count: 0,
-                        level: -1,
-                        type: "multiple"
-                    },
-                    {
-                        id: 3,
-                        name: '判断题',
-                        count: 0,
-                        level: -1,
-                        type: "judge"
-                    },
-                    {
-                        id: 4,
-                        name: '填空题',
-                        count: 0,
-                        level: -1,
-                        type: "complete"
-                    },
-                    {
-                        id: 5,
-                        name: '问答题',
-                        count: 0,
-                        level: -1,
-                        type:'subjective'
-                        
-                    },
-                    {
-                        id: 6,
-                        name: '综合题',
-                        count: 0,
-                        level: -1,
-                        type: 'compose'
-                    },
-                ],
-                autoCreateFilter: {
-                    code: [],
-                    periodCode: '1',
-                    subjectId: '',
-                    gradesId:[],
-                    questionType: ['single'],
-                    points: []
-                },
-                difficultyList: [
-                    {
-                        level: 'random',
-                        label: '随机',
-                        value: -1
-                    },
-                    {
-                        level: 'average',
-                        label: '平均分配',
-                        value: 0
-                    },
-                    {
-                        level: 'relativeEasy',
-                        label: '较易',
-                        value: 1
-                    },
-                    {
-                        level: 'easy',
-                        label: '容易',
-                        value: 2
-                    },
-                    {
-                        level: 'common',
-                        label: '一般',
-                        value: 3
-                    },
-                    {
-                        level: 'difficulty',
-                        label: '困难',
-                        value: 4
-                    },
-                    {
-                        level: 'relativeDifficulty',
-                        label: '较难',
-                        value: 5
-                    }
-                ],
-                schoolBaseInfo:[]
-            }
-        },
-        methods: {
-            async getData() {
-                await this.$store.dispatch('user/getSchoolProfile').then(
-                    (res) => {
-                        this.schoolBaseInfo = this.$store.state.user.schoolProfile.school_base.period
-                        if (res.code == 2) {
-                            alert('数据为空!')
-                        }
-                    },
-                    (err) => {
-                        this.$Message.error('API error!')
-                    }
-                )
-            },
-            cancel() {
-
-            },
-            /**获取已选的知识点 */
-            getCheckedPoints(val, list) {
-                let checkedPoints = [...val]
-                this.getPointObject(checkedPoints)
-            },
-            selectPointScope(index) {
-                this.activePointTab = index
-            },
-            // 获取知识点完整对象数据 ID换对象
-            getPointObject(arr) {
-                let params = {
-                    collectionName: 'Knowledge',
-                    queryDict: {
-                        id: arr
-                    }
-                }
-                this.$api.FindCollection(params).then(res => {
-                    if (!res.error && res.result.data) {
-                        this.checkedPoints = res.result.data
-                    } else {
-                        this.$Message.warning('获取数据失败')
-                    }
-                })
-            },
-            getOpenKeys(data) {
-
-            },
-            getCurrentIndex(points) {
-                this.getPointObject(points)
-            },
-            //获取知识点数据
-            getPointsData() {
-                let requestData = {
-                    code: 'hbcn',
-                    periodId: this.periodCode,
-                    school_code: "hbcn",
-                    type: 0,
-                    subjectId: this.subjectCode
-                }
-                this.$api.knowledge.GetSchoolPoints(requestData).then(res => {
-                    if (!res.error && res.result.data) {
-                        this.pointBlockList = res.result.data
-                    } else {
-                        this.$Message.warning('获取数据失败')
-                    }
-                })
-            },
-            confirmSelectPoints() {
-
-            },
-            cancelSelectPoints() {
-
-            },
-            selectPoints() {
-                this.selectPointsStatus = true
-                this.getPointsData()
-            },
-            getCount(data) {
-                return data.easy + data.relativeEasy + data.common + data.relativeDifficulty + data.difficulty
-            },
-            getNumber(num) {
-                if (num == undefined) {
-                    return 0
-                } else {
-                    return num
-                }
-            },
-            //处理题目结构数据
-            setQueInfo(data) {
-                let queInfo = []
-                if (data.length !== 0) {
-                    for (let i = 0; i < data.length; i++) {
-                        let res = {}
-                        res.type = data[i].type
-                        res.count = data[i].count
-                        if (data[i].level !== -1 && data[i].level !==0 && data[i].level !== "") {
-                            let temp = {}
-                            res.policy = "custom"
-                            res.custom = []
-                            temp.level = data[i].level
-                            temp.count = data[i].count
-                            res.custom.push(temp)
-                        } else if (data[i].level === -1) {
-                            res.policy = "random"
-                        } else if (data[i].level === 0) {
-                            res.policy = "average"
-                        }
-                        if (res.count !== 0) {
-                            queInfo.push(res)
-                        }
-                    }
-                }
-
-                return queInfo
-            },
-            //提交组卷数据
-            handleFilterData() {
-                let requestData = []
-                let filterData = {
-                    code: 'Item-' + this.$store.state.userInfo.TEAMModelId.replace('#', '') ,
-                    scope:"pravite",
-                    period: "",
-                    points: this.autoCreateFilter.points,
-                    quInfos: this.setQueInfo(this.quePerson)
-                }
-                requestData.push(filterData)
-                if (this.autoCreateFilter.periodCode !== '') {
-                    let temp = JSON.parse(JSON.stringify(filterData))
-                    temp.code = 'Item-' + this.$store.state.userInfo.schoolCode
-                    temp.scope = 'school'
-                    temp.gradesId = this.autoCreateFilter.gradesId
-                    temp.subject = this.autoCreateFilter.subjectId
-                    temp.period = this.autoCreateFilter.periodCode
-                    temp.quInfos = this.setQueInfo(this.queSchool)
-                    requestData.push(temp)
-                }
-                this.isLoading = true
-                let requestDatas = []
-                for (let i = 0; i < requestData.length; i++) {
-                    if (requestData[i].quInfos.length > 0) {
-                        requestDatas.push(requestData[i])
-                    }
-                }
-                this.$api.learnActivity.Automatic(requestDatas).then(
-                    res => {
-                            if (res.length > 0) {
-                                setTimeout(() => {
-                                    this.isLoading = false
-                                    this.$emit('getExercises', res)
-									let arr = []
-                                    for (let i = 0; i < res.length; i++) {
-										arr = arr.concat(res[i].item)
-                                    }
-									this.$emit('autoQuestions', arr)
-                                }, 2000)
-
-                            } else {
-                                this.$Message.error('未能匹配满足条件的题目!')
-                                setTimeout(() => {
-                                    this.isLoading = false
-                                }, 1000)
-                            }
-                    },
-                    err => {
-                        this.$Message.error('API ERROR!')
-                        setTimeout(() => {
-                            this.isLoading = false
-                        }, 1000)
-                    }
-                )
-            }
-        },
-        mounted() {
-            this.getData()
-        }
-    }
-</script>
-<style lang="less" scoped>
-    @import "./AutoCreate.less";
-</style>
-<style>
-    .points-component-wrap .ivu-tabs {
-        color: white;
-    }
-
-    .points-component-wrap {
-        color: white;
-    }
-
-    .question-num-item .ivu-input {
-        background: none;
-        text-align: center;
-        color: white;
-        font-size: 18px;
-    }
-
-    .question-num-item .ivu-select-selection {
-        background: none;
-        color: white;
-        border-color: #dcdee2;
-    }
-
-    .question-num-item .ivu-input-number-handler-wrap {
-        display: none;
-    }
-
-    .question-num-item .ivu-input-number, .question-num-item .ivu-input-number-small input {
-        background: none;
-        text-align: center;
-        font-size: 16px;
-        color: white;
-    }
-
-    .question-num-item .ivu-input-number-input {
-        padding: 0px;
-    }
-</style>

+ 8 - 7
TEAMModelOS/ClientApp/src/view/learnactivity/CreatePrivEva.vue

@@ -56,15 +56,16 @@
             <div class="evaluation-question-wrap">
                 <div class="evaluation-question-main">
                     <Tabs v-model="activeTab" type="card" class="question-main-tabs" name="createTest">
+                        <TabPane label="试卷库" name="manualPaper" v-if="createType == 'manualPaper'" :index="1" tab="createTest">
+                            <ManualPaper @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[0] ? evaluationInfo.paperInfo[0].id : ''"></ManualPaper>
+                        </TabPane>
                         <TabPane label="试卷预览" name="preview" :index="2" tab="createTest">
                             <TeacherPreview :testPaper="evaluationInfo.paperInfo[0]"></TeacherPreview>
                             <!-- <TestPaper :paper="evaluationInfo.paperInfo[0]" isExamPaper></TestPaper> -->
                         </TabPane>
-                        <TabPane label="试卷库" name="manualPaper" v-if="createType == 'manualPaper'" :index="3" tab="createTest">
-                            <ManualPaper @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[0] ? evaluationInfo.paperInfo[0].id : ''"></ManualPaper>
-                        </TabPane>
+
                         <TabPane label="导入说明" name="import" v-if="createType == 'import'" :index="4" tab="createTest">
-                            <ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
+                            <BaseImport @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></BaseImport>
                         </TabPane>
                         <TabPane label="作答预览" name="student" :index="6" tab="createTest">
                             <StudentPreview></StudentPreview>
@@ -84,14 +85,14 @@
 <script>
 import BlobTool from '@/utils/blobTool.js'
 import ManualPaper from './ManualPaper.vue'
-import ImportCreate from './ImportCreate.vue'
+import BaseImport from '@/view/evaluation/components/BaseImport.vue'
 import TeacherPreview from './TeacherPreview.vue'
 import StudentPreview from './StudentPreview.vue'
 export default {
     components: {
         TeacherPreview,
         StudentPreview,
-        ImportCreate,
+        BaseImport,
         ManualPaper
     },
     data() {
@@ -382,7 +383,7 @@ export default {
          * @param date
          */
         getDate(value, flag) {
-            if(value.indexOf('00:00') > 0){
+            if (value.indexOf('00:00') > 0) {
                 value = value.replace('00:00', '23:59:59')
             }
             if (flag == 0) {

+ 3 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/CreateSchoolEva.vue

@@ -76,7 +76,7 @@
                             <ManualPaper :periodId="evaluationInfo.period.id" :gradesObj="evaluationInfo.grades" :subjectId="evaluationInfo.paperInfo[curSubIndex].subjectId" @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[curSubIndex].id"></ManualPaper>
                         </TabPane>
                         <TabPane label="导入说明" name="import" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'import'" :index="4" tab="createTest">
-                            <ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
+                            <BaseImport @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></BaseImport>
                         </TabPane>
                         <TabPane label="作答预览" name="student" :index="6" tab="createTest">
                             <StudentPreview></StudentPreview>
@@ -106,14 +106,14 @@
 <script>
 import BlobTool from '@/utils/blobTool.js'
 import ManualPaper from './ManualPaper.vue'
-import ImportCreate from './ImportCreate.vue'
+import BaseImport from '@/view/evaluation/components/BaseImport.vue'
 import TeacherPreview from './TeacherPreview.vue'
 import StudentPreview from './StudentPreview.vue'
 export default {
     components: {
         TeacherPreview,
         StudentPreview,
-        ImportCreate,
+        BaseImport,
         ManualPaper,
     },
     data() {

+ 0 - 53
TEAMModelOS/ClientApp/src/view/learnactivity/ImportCreate.less

@@ -1,53 +0,0 @@
-@main-bgColor: rgb(40,40,40); //主背景颜色
-@borderColor: #424242;
-@primary-textColor: #fff; //文本主颜色
-@second-textColor: #a5a5a5; //文本副级颜色
-@primary-fontSize: 14px;
-@second-fontSize: 16px;
-
-.import-title {
-    color: @second-textColor;
-    text-align: center;
-    padding-top: 55px;
-    font-size: 24px;
-    width: 100%;
-
-    a {
-        font-size: 15px;
-        border-bottom: 1px solid #2d8cf0;
-        margin-left: 10px;
-    }
-}
-
-.import-discreption-wrap {
-    max-width: 1000px;
-    min-width: 800px;
-    width: 68%;
-    margin: auto;
-    margin-top: 30px;
-    color: @second-textColor;
-    font-size: 18px;
-
-    p {
-        margin-bottom: 15px;
-    }
-}
-
-.upload-wrap-evaluation {
-    max-width: 1000px;
-    min-width: 800px;
-    width: 68%;
-    margin: auto;
-    margin-top: 30px;
-    color: #AAAAAA;
-}
-
-.upload-wrap-evaluation:hover {
-    color: white;
-}
-
-.my-iframe-style {
-    width: 100%;
-    border: none;
-    height: 600px;
-}

+ 0 - 151
TEAMModelOS/ClientApp/src/view/learnactivity/ImportCreate.vue

@@ -1,151 +0,0 @@
-<template>
-  <div style="height: 100%; background: #404040;" class="import-create-wrap">
-    <vuescroll>
-      <h2 class="import-title">
-        试卷导入说明
-        <a href="#">下载模板</a>
-      </h2>
-      <div class="import-discreption-wrap">
-        <p>1、暂时只支持“.docx、.xlsx、.csv”格式的文件导入,文件大小不超过10M,需要按照模板格式导入;</p>
-        <p>2、导入的题型暂时只支持单选题、多选题、判断题、填空题、主观题。</p>
-      </div>
-      <Upload :disabled="disabled" :show-upload-list="false" type="drag" action="/api/ImportExercise/uploadWord" multiple :headers="headers" :before-upload="beforeUpload" :on-success="uploadSuccess" class="upload-wrap-evaluation">
-        <p style="margin:20px 0px; margin-top:50px;font-size:30px;">{{disabled ? '文件解析中......' : $t('teachContent.uploadText')}}</p>
-        <Icon v-show="!disabled" type="ios-cloud-upload" size="80" style="margin-bottom:50px;" />
-        <img v-show="disabled" src="@/assets/loading/logo_loading.png" width="70" height="70" style="margin-bottom:50px;" class="xuanzhuan" />
-      </Upload>
-    </vuescroll>
-    <Modal v-model="wordPreviewStatus"
-           width="988"
-           ok-text="导入"
-           title="解析预览"
-           :mask-closable="false"
-           @on-ok="ok"
-           @on-cancel="cancel">
-      <iframe class="my-iframe-style" src="https://www.baidu.com" :srcdoc="srcdoc"></iframe>
-    </Modal>
-    <Modal v-model="comfirmSyncStatus"
-           ok-text="是"
-           cancel-text="否"
-           :mask-closable="false"
-           @on-ok="comfirmSync"
-           @on-cancel="cancelSync">
-
-      <p style="font-size:18px;line-height:50px;padding-top:15px;">是否同步导入的题目到个人题库?</p>
-    </Modal>
-    <Modal v-model="comfirmPreviewStatus"
-           ok-text="是"
-           cancel-text="否"
-           :mask-closable="false"
-           @on-ok="goToPreview"
-           @on-cancel="cancelSync">
-
-      <p style="font-size:18px;padding-top:15px;">导入成功,是否跳转到试题预览界面预览题目?</p>
-    </Modal>
-  </div>
-</template>
-<script>
-  import Loading from '@/common/Loading.vue'
-  export default {
-    components: {
-      Loading
-    },
-    data() {
-      return {
-        disabled: false,
-        comfirmPreviewStatus: false,
-        comfirmSyncStatus: false,
-        wordPreviewStatus: false,
-        srcdoc: '',
-        importQuestions: []
-      }
-    },
-    methods: {
-      goToPreview() {
-        this.$emit('goToPreview')
-      },
-      comfirmSync() {
-        let requestData = {
-          htmlString: this.srcdoc
-        }
-        this.$api.SaveAnalyzeHtml(requestData).then(res => {
-          if (res.error === null) {
-            for (let i = 0; i < res.result.data.length; i++) {
-              res.result.data[i].code = 'personal'
-              if (res.result.data[i].children.length > 0) {
-                for (let j = 0; j < res.result.data[i].children.length; j++) {
-                  res.result.data[i].children[j].code = 'personal'
-                }
-              }
-            }
-            this.importQuestions = res.result.data
-            this.$emit('importedQuestions', this.importQuestions)
-            this.$Message.success('导入成功!')
-            this.comfirmPreviewStatus = true
-          } else {
-             this.$Message.error('导入失败!')
-          }
-        }
-        )
-      },
-      cancelSync() {
-
-      },
-      ok() {
-        this.comfirmSyncStatus = true
-      },
-      cancel() {
-
-      },
-      beforeUpload() {
-        // this.$Message.success('上传之前!')
-        this.disabled = true
-      },
-      uploadSuccess(response, file, fileList) {
-        if (response.error === null) {
-          this.$Message.success('文件上传解析成功!')
-          this.disabled = false
-          this.srcdoc = response.result.data.HtmlString
-          this.wordPreviewStatus = true
-        } else {
-          this.$Message.error('文档解析失败!')
-        }
-      }
-    },
-    computed: {
-      headers() {
-        let hd = {}
-        hd['Authorization'] = 'Bearer ' + localStorage.getItem('token')
-        return hd
-      }
-    }
-  }
-</script>
-<style lang="less">
-  @import "./ImportCreate.less";
-</style>
-<style>
-  .upload-wrap-evaluation .ivu-upload-drag {
-    background: #606060;
-  }
-  .upload-wrap-evaluation:hover .ivu-upload-drag {
-    background: #505050;
-    border-color:white;
-    transition: background ease 0.5s;
-    transition: color ease 0.5s;
-  }
-  .xuanzhuan {
-    animation: xz 1s linear infinite;
-  }
-
-  @keyframes xz {
-    from {
-      transform: rotate(0deg);
-    }
-
-    to {
-      transform: rotate(360deg);
-    }
-  }
-
-</style>

+ 7 - 5
TEAMModelOS/ClientApp/src/view/learnactivity/ManualPaper.vue

@@ -15,7 +15,7 @@
                     <Col :xs="24" :sm="24" :md="24" :lg="12" :xl="12" v-if="routeScope == 'private'" v-show="scope == $store.state.userInfo.schoolCode">
                     <div class="manual-filter-item">
                         <span class="manual-filter-label">学段:</span>
-                        <RadioGroup v-model="periodId" style="display:inline-block;" @on-change="checkFirst">
+                        <RadioGroup v-model="searchPeriod" style="display:inline-block;" @on-change="checkFirst">
                             <Radio :label="item.id" v-for="(item,index) in schoolBase.period" :key="index">{{item.name}}</Radio>
                         </RadioGroup>
                     </div>
@@ -104,6 +104,7 @@ export default {
     },
     data() {
         return {
+            searchPeriod:'',
             schoolBase: {
                 period: []
             },
@@ -184,7 +185,7 @@ export default {
                 "scope": scope,
                 //'gradeIds[*]': scope == 'school' ? this.gradeIds : [],
                 'gradeIds[*]': [],
-                'periodId': scope == 'school' ? this.periodId : [],
+                'periodId': scope == 'school' ? this.searchPeriod : [],
                 'subjectId': [],
             }
             this.$api.learnActivity.FindExamPaper(params).then(res => {
@@ -210,7 +211,7 @@ export default {
             res => {
                 this.schoolBase = res.school_base
                 if (this.routeScope == 'private' && this.schoolBase.period.length) {
-                    this.periodId = this.schoolBase.period[0].id
+                    this.searchPeriod = this.schoolBase.period[0].id
                 }
             }
         )
@@ -228,7 +229,7 @@ export default {
         },
         subjectList(){
             let res = this.schoolBase.period.find((item)=>{
-                return item.id == this.periodId
+                return item.id == this.searchPeriod
             })
             if(res){
                 return res.subjects
@@ -238,7 +239,7 @@ export default {
         },
         gradeList(){
             let res = this.schoolBase.period.find((item)=>{
-                return item.id == this.periodId
+                return item.id == this.searchPeriod
             })
             if(res){
                 return res.grades
@@ -250,6 +251,7 @@ export default {
     watch: {
         periodId: {
             handler() {
+                this.searchPeriod = this.periodId
                 this.getPaperList()
             }
         },

+ 3 - 0
TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.less

@@ -200,6 +200,9 @@
     padding: 10px 15px;
     border-bottom: 1px dashed #c3c3c34d;
     width: 100%;
+    position: sticky;
+    top: 44px;
+    z-index: 9999;
 }
 .question-index-box{
     line-height: 26px;

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue

@@ -460,7 +460,7 @@ export default {
             // this.$refs["question-scrool"].scrollIntoView('#qustion' + index, 500)
             this.$el.querySelector('#qustion' + index).scrollIntoView({
                 behavior: "smooth",  // 平滑过渡
-                block: "start"  // 上边框与视窗顶部平齐。默认值
+                block: "center"  // 上边框与视窗顶部平齐。默认值
             })
         },
         //快速打分

+ 4 - 9
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.less

@@ -50,13 +50,13 @@
 
 .ev-target-box {
     margin-top: 20px;
-    // width: 100%;
     width: ~"calc(100% - 10px)";
     color: #ffffff;
-    // background: #353535;
-    background: rgba(53, 53, 53, 0.5);
+    background: rgba(50, 50, 50, 1);
     padding: 10px 10px 10px 5px;
-    // border-bottom:1px solid #606060;
+    position: sticky;
+    top: 0px;
+    z-index: 9999;
     .filter-select {
         display: inline-block;
         width: 120px;
@@ -64,12 +64,7 @@
     }
 }
 
-.score-box {
-    // margin-top: 15px;
-}
 .scoring-handle-box {
-    margin-top: 10px;
-    overflow: hidden;
     height: 100%;
     background:white;
     padding-bottom:15px;

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue

@@ -12,7 +12,7 @@
                     <Option v-for="(item,index) in examInfo.grades" :value="item.id" :key="index">{{ item.name }}</Option>
                 </Select>
                 <span>班级:</span>
-                <Select filterable v-model="chooseClass" class="filter-select" style="width:140px;" @on-change="getClassStudent" size="small">
+                <Select filterable v-model="chooseClass" class="filter-select" style="width:140px;" @on-change="getClassStudent" size="small" transfer>
                     <Option v-for="(item,index) in classList" :value="item.id" :key="index">{{ item.name }}</Option>
                 </Select>
                 <span style="margin-left:5px" v-show="showTest">学生:</span>

+ 0 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/StudentPreview.vue

@@ -13,5 +13,4 @@
   }
 </script>
 <style lang="less">
-  @import "./AutoCreate.less";
 </style>

+ 49 - 34
TEAMModelOS/Controllers/Analysis/AnalysisController.cs

@@ -177,7 +177,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     subjectPaperDatas.Add(subjectData);
                     classSubjectPaperDatas.Add(classSubjectData);
                     subjectScatter.Add(DoSubjectScatter(examResult));
-                    //gpoint = DoKnowledgePoint(examResult,info);
+                    gpoint = DoKnowledgePoint(examResult,info);
                     //获取一张试卷的满分
                     paperScore.Add(examResult.subjectId, examResult.paper.point.Sum());
                     List<double> StuSubjectTotals = new List<double>();
@@ -277,7 +277,7 @@ namespace TEAMModelOS.Controllers.Analysis
                         //标准差
                         powSum += Math.Pow(x.total - totalAverage, 2);
                         //进线人数
-                        if (x.total > ipoint) { 
+                        if (x.total >= ipoint) { 
                             lineCount++; 
                         }
                         //班级全科的pr
@@ -706,8 +706,39 @@ namespace TEAMModelOS.Controllers.Analysis
             List<List<double>> result = new List<List<double>>();
             List<ClassRange> classes = new List<ClassRange>();
             List<string> ids = new List<string>();
-                //定位试卷信息
-                int index = 0;
+
+            //求单个知识点所占分数
+            List<string> per = new List<string>();
+            List<string> gper = new List<string>();
+            List<string> knowPer = new List<string>();
+            List<Dictionary<string, double>> eper = new List<Dictionary<string, double>>();
+            Dictionary<string, object> knowledgeALL = new Dictionary<string, object>();
+            Dictionary<string, object> knowledgeMap = new Dictionary<string, object>();
+            Dictionary<string, object> classMap = new Dictionary<string, object>();
+            Dictionary<string, object> wrongMap = new Dictionary<string, object>();
+            HashSet<string> className = new HashSet<string>();
+            List<List<string>> wrongPersent = new List<List<string>>();
+            List<string> key = new List<string>
+            {
+                "id",
+                "className",
+                "seatNO",
+                "point",
+                "anwPoint",
+                "persent"
+            };
+            List<string> keyWrong = new List<string>
+            {
+                "name",
+                "point",
+                "itemNO",
+                "persent",
+                "wrong",
+                "rhw",
+                "rlw"
+            };
+            //定位试卷信息
+            int index = 0;
                 foreach (ExamSubject subject in info.subjects)
                 {
                     if (subject.id.Equals(exam.subjectId))
@@ -719,6 +750,8 @@ namespace TEAMModelOS.Controllers.Analysis
                         index++;
                     }
                 }
+            if (info.papers[index].knowledge != null && info.papers[index].knowledge.Count > 0)
+            {
                 info.papers[index].knowledge.ForEach(k =>
                 {
                     k.ForEach(e =>
@@ -726,10 +759,21 @@ namespace TEAMModelOS.Controllers.Analysis
                         knowledge.Add(e);
                     });
                 });
+            }
+            else {
+                return knowledgeALL;
+            }
+            if (info.papers[index].field != null && info.papers[index].field.Count > 0)
+            {
                 info.papers[index].field.ForEach(f =>
                 {
                     area.Add(f.ToString());
                 });
+            }
+            else {
+                return knowledgeALL;
+            }
+                
                 double Qnum = 0;
                 point = info.papers[index].point;
                 result = exam.studentScores;
@@ -820,36 +864,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     double fieldPersent = fieldPoint / TotalPoint;
                     fper.Add(fieldPersent.ToString("0.00"));
                 }
-                //求单个知识点所占分数
-                List<string> per = new List<string>();
-                List<string> gper = new List<string>();
-                List<string> knowPer = new List<string>();
-                List<Dictionary<string, double>> eper = new List<Dictionary<string, double>>();
-                Dictionary<string, object> knowledgeALL = new Dictionary<string, object>();
-                Dictionary<string, object> knowledgeMap = new Dictionary<string, object>();
-                Dictionary<string, object> classMap = new Dictionary<string, object>();
-                Dictionary<string, object> wrongMap = new Dictionary<string, object>();
-                HashSet<string> className = new HashSet<string>();
-                List<List<string>> wrongPersent = new List<List<string>>();
-                List<string> key = new List<string>
-            {
-                "id",
-                "className",
-                "seatNO",
-                "point",
-                "anwPoint",
-                "persent"
-            };
-                List<string> keyWrong = new List<string>
-            {
-                "name",
-                "point",
-                "itemNO",
-                "persent",
-                "wrong",
-                "rhw",
-                "rlw"
-            };
+               
                 for (int k = 0; k < knowledgeName.Count; k++)
                 {
                     List<string> knowledgeClass = new List<string>();