Преглед на файлове

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

CrazyIter преди 5 години
родител
ревизия
0c1c8c3988

+ 103 - 245
TEAMModelOS/ClientApp/src/api/index.js

@@ -1,7 +1,7 @@
 import { fetch, post } from '@/filters/http'
 import ClassMgmt from './classMgmt'
 import talMgmt from './talMgmt'
-import cloudApi from '../store/api/index'
+//import cloudApi from '../store/api/index'
 import schoolSetting from './schoolSetting'
 import totalAnalysis from './totalAnalysis'
 import stuAccount from './stuAccount'
@@ -10,261 +10,119 @@ import knowledge from './knowledge'
 import teachContent from './teachContent'
 import uploadFile from './uploadFile'
 import courseMgmt from './courseMgmt'
+import newEvaluation from './newEvaluation'
 export default {
-  ClassMgmt,
-  stuAccount,
-  syllabus,
-  knowledge,
-  schoolSetting,
-  totalAnalysis,
-  talMgmt,
-  teachContent,
-  cloudApi,
-  uploadFile,
-  courseMgmt,
-  // 获取登录跳转链接
-  getLoginLink: function (data) {
-    return post('api/login/login', data)
-  },
-  // 验证登录
-  checkLogin: function (data) {
-    return post('api/login/CheckLogin', data)
-  },
-  // 获取登录人员角色列表
-  getLoginRoles: function (data) {
-    return post('api/role/GetLoginRoles', data)
-  },
-  // 查找地区对应学校列表
-  getSchoolList: function (data) {
-    return post('api/School/getSchool', data)
-  },
-  // 根据当前登录用户获取已授权的AI智慧学校
-  getAuthSchool: function (data) {
-    return post('api/School/AuthorizedAISchool', data)
-  },
-  // 获取全部科目
-  FindSubjectsByDict: function (data) {
-    return post('api/subject/FindSubjectsByDict', data)
-  },
-  // 获取当前学校全部科目
-  FindSchoolSubjectsByDict: function (data) {
-    return post('api/subject/FindSchoolSubjectsByDict', data)
-  },
-  // 获取当前学校全部册别
-  FindSchoolVolumesByDict: function (data) {
-    return post('api/volume/FindSchoolVolumesByDict', data)
-  },
-  // 获取当前学校全部学段
-  FindSchoolPeriodsByDict: function (data) {
-    return post('api/period/FindSchoolPeriodsByDict', data)
-  },
-  // 获取当前学校全部年级
-  FindSchoolGradesByDict: function (data) {
-    return post('api/grade/FindSchoolGradesByDict', data)
-  },
-  // 获取当前学校全部学期
-  FindSchoolTermsByDict: function (data) {
-    return post('api/term/FindSchoolTermsByDict', data)
-  },
+    ClassMgmt,
+    stuAccount,
+    syllabus,
+    knowledge,
+    schoolSetting,
+    totalAnalysis,
+    talMgmt,
+    teachContent,
+    //cloudApi,
+    uploadFile,
+    courseMgmt,
+    newEvaluation,
+    // 获取登录跳转链接
+    getLoginLink: function (data) {
+        return post('api/login/login', data)
+    },
+    // 验证登录
+    checkLogin: function (data) {
+        return post('api/login/CheckLogin', data)
+    },
+    // 获取登录人员角色列表
+    getLoginRoles: function (data) {
+        return post('api/role/GetLoginRoles', data)
+    },
+    // 查找地区对应学校列表
+    getSchoolList: function (data) {
+        return post('api/School/getSchool', data)
+    },
+    // 根据当前登录用户获取已授权的AI智慧学校
+    getAuthSchool: function (data) {
+        return post('api/School/AuthorizedAISchool', data)
+    },
+    // 获取全部科目
+    FindSubjectsByDict: function (data) {
+        return post('api/subject/FindSubjectsByDict', data)
+    },
+    // 获取当前学校全部科目
+    FindSchoolSubjectsByDict: function (data) {
+        return post('api/subject/FindSchoolSubjectsByDict', data)
+    },
+    // 获取当前学校全部册别
+    FindSchoolVolumesByDict: function (data) {
+        return post('api/volume/FindSchoolVolumesByDict', data)
+    },
+    // 获取当前学校全部学段
+    FindSchoolPeriodsByDict: function (data) {
+        return post('api/period/FindSchoolPeriodsByDict', data)
+    },
+    // 获取当前学校全部年级
+    FindSchoolGradesByDict: function (data) {
+        return post('api/grade/FindSchoolGradesByDict', data)
+    },
+    // 获取当前学校全部学期
+    FindSchoolTermsByDict: function (data) {
+        return post('api/term/FindSchoolTermsByDict', data)
+    },
 
 
-  // 获取登录人员身份信息
-  getLoginClaim: function (data) {
-    return post('api/role/GetLoginClaim', data)
-  },
+    // 获取登录人员身份信息
+    getLoginClaim: function (data) {
+        return post('api/role/GetLoginClaim', data)
+    },
 
-  // 新建习题保存到题库
-  SaveItemBank: function (data) {
-    return post('api/evaluation/ItemBank', data)
-  },
+    // 新建习题保存到题库
+    SaveItemBank: function (data) {
+        return post('api/evaluation/ItemBank', data)
+    },
 
-  // 新建试卷到试卷库
-  SaveTestPaper: function (data) {
-    return post('api/Evaluation/testPaper', data)
-  },
+    // 新建试卷到试卷库
+    SaveTestPaper: function (data) {
+        return post('api/Evaluation/testPaper', data)
+    },
 
-  // 新建试卷到试卷库
-  SaveAnalyzeHtml: function (data) {
-    return post('/api/ImportExercise/AnalyzeHtml', data)
-  },
+    // 新建试卷到试卷库
+    SaveAnalyzeHtml: function (data) {
+        return post('/api/ImportExercise/AnalyzeHtml', data)
+    },
 
-  // 获取所有学校信息
-  GetAllSchool: function (data) {
-    return post('api/school/GetAllSchool', data)
-  },
+    // 获取所有学校信息
+    GetAllSchool: function (data) {
+        return post('api/school/GetAllSchool', data)
+    },
 
-  // 根据条件获取学段
-  FindPeriodsByDict: function (data) {
-    return post('api/period/FindPeriodsByDict', data)
-  },
+    // 根据条件获取学段
+    FindPeriodsByDict: function (data) {
+        return post('api/period/FindPeriodsByDict', data)
+    },
 
-  // 根据条件获取年级
-  FindGradesByDict: function (data) {
-    return post('api/grade/FindGradesByDict', data)
-  },
-  // 根据条件获取学科
-  FindSubjectsByDict: function (data) {
-    return post('api/subject/FindSubjectsByDict', data)
-  },
+    // 根据条件获取年级
+    FindGradesByDict: function (data) {
+        return post('api/grade/FindGradesByDict', data)
+    },
+    // 根据条件获取学科
+    FindSubjectsByDict: function (data) {
+        return post('api/subject/FindSubjectsByDict', data)
+    },
 
-  // 学情分析API
-  // 查询班年级数据
-  FindGrade: function () {
-    return fetch('/api/class/getGrade?identity=Grade')
-  },
-  // 查询学年期数据
-  FindTerm: function () {
-    return fetch('/api/class/getTerm?identity=term')
-  },
-  // 查询考试情况
-  FindExam: function () {
-    return fetch('/api/class/getExam?identity=Exam')
-  },
-  // 查询基础数据
-  FindBasics: function () {
-    return fetch('/api/class/getBase?identity=Base')
-  },
-  // 查询各校成绩排名(堆叠柱状图)
-  FindBargraph: function () {
-    return fetch('/api/class/getExam?identity=EcharsZ')
-  },
-  // 查询各项科目表现(雷达图)
-  FindRadargraph: function () {
-    return fetch('/api/class/getExam?identity=EcharsL')
-  },
-  // 查询科目表现对比(饼图)
-  FindSubjectsManifestation: function () {
-    return fetch('/api/class/getExam?identity=EcharsY')
-  },
-  // 查询历次总分统计表(折线图)
-  FindLinechart: function () {
-    return fetch('/api/class/getExam?identity=EcharsZx')
-  },
-  // 查询考试类型
-  FindExamtype: function () {
-    return fetch('/api/class/getExam?identity=ExamType')
-  },
 
-  // 动态数据
-  // 关注年级变化数据
-  FindSelectGrade: function () {
-    return fetch('/api/class/getChange?identity=Changegrade')
-  },
-  // 关注学年期变化数据
-  FindSelectTerm: function () {
-    return fetch('/api/class/getChangeterm?identity=Changeterm')
-  },
-  // 点击某次考试详情 变化数据
-  FindSelectExam: function () {
-    return fetch('/api/class/getChangeExam?identity=Changeexam')
-  },
-  // 筛选考试类型 变化数据
-  FindSelectExamType: function () {
-    return fetch('/api/class/getChangeExamType?identity=Changeexamtype')
-  },
-  // 显示文科数据  变化数据
-  FindSelectArts: function () {
-    return fetch('/api/class/getChangeArts?identity=Changarts')
-  },
-  // 显示理科数据  变化数据
-  FindSelectScience: function () {
-    return fetch('/api/class/getChangeScience?identity=Changscience')
-  },
-  // 点击柱状图 赋值到雷达图
-  // 成都七中
-  Findcdqz: function () {
-    return fetch('/api/class/getExam?identity=cdqz')
-  },
-  // 成都四中
-  Findcdsz: function () {
-    return fetch('/api/class/getExam?identity=cdsz')
-  },
-  // 成都九中
-  Findcdjz: function () {
-    return fetch('/api/class/getExam?identity=cdjz')
-  },
-  // 成都树德
-  Findcdsd: function () {
-    return fetch('/api/class/getExam?identity=cdsd')
-  },
-  // 师大一中
-  Findsdyz: function () {
-    return fetch('/api/class/getExam?identity=sdyz')
-  },
-  // 西川中学
-  Findxczx: function () {
-    return fetch('/api/class/getExam?identity=xczx')
-  },
-  // 石室中学
-  Findsszx: function () {
-    return fetch('/api/class/getExam?identity=sszx')
-  },
+    /*
+     *评测
+     */
+    // 上传图片
+    UploadFile: function (data) {
+        return post('/api/file/uploadFile', data)
+    },
 
-  // 任教老师页面
-  // 查询关注学年期
-  FindTeachTerm: function () {
-    return fetch('/api/class/getTerm?identity=Teachterm')
-  },
-  // 查询数据对比
-  FindTeachContrast: function () {
-    return fetch('/api/class/getTerm?identity=Teachcontrast')
-  },
-  // 查询考试信息
-  FindTeachExam: function () {
-    return fetch('/api/class/getExam?identity=TeachExam')
-  },
-  // 查询基础数据
-  FindTeachBasics: function () {
-    return fetch('/api/class/getTerm?identity=TeachBase')
-  },
-  // 查询各班平均分数排名(柱状图)
-  FindTeachbargraph: function () {
-    return fetch('/api/class/getExam?identity=TeachEcharsZ')
-  },
-  // 查询及格率比较
-  FindTeachAnnulus: function () {
-    return fetch('/api/class/getExam?identity=TeachAnnulus')
-  },
-  // 查询历次总分统计图
-  FindTeachHistory: function () {
-    return fetch('/api/class/getExam?identity=TeachEcharsZx')
-  },
-  // 查询PR值
-  FindTeachPR: function () {
-    return fetch('/api/class/getExam?identity=TeachPie')
-  },
-
-  // 动态数据
-  // 选择关注学年期
-  FindDynamicTerm: function () {
-    return fetch('/api/class/getExam?identity=TeachChangeterm')
-  },
-  // 选择数据比较
-  FindDatacompare: function () {
-    return fetch('/api/class/getExam?identity=TeachChangeDatacompare')
-  },
-  // 选择考试数据
-  FindClickExam: function () {
-    return fetch('/api/class/getExam?identity=TeachChangeExam')
-  },
-  // 点击班级 联动 RP值
-  FindClickPR: function () {
-    return fetch('/api/class/getExam?identity=TeachClickPR')
-  },
-
-  /*
-   *评测
-   */
-  // 上传图片
-  UploadFile: function (data) {
-    return post('/api/file/uploadFile', data)
-  },
-
-  /**
-   * 通用查询接口
-   */
-  FindCollection: function (data) {
-    return post('/api/Common/FindCollection', data)
-  }
+    /**
+     * 通用查询接口
+     */
+    FindCollection: function (data) {
+        return post('/api/Common/FindCollection', data)
+    }
 
 }

+ 10 - 0
TEAMModelOS/ClientApp/src/api/newEvaluation.js

@@ -9,6 +9,16 @@ export default {
      */
     SaveSingleExercise: function (data) {
         return post('/api/ItemInfo/Save', data)
+    },
+
+    /**
+     * ²éѯÌâ¿âÁбí
+     * @param {any} data
+     */
+    FindExerciseList: function (data) {
+        return post('/api/ItemInfo/Find', data)
     }
+
+    
     
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/common/BaseExamList.vue

@@ -11,7 +11,7 @@
                 <div v-else v-for="(item,index) in examList" :class="['list-item',examIndex == index ? 'list-item-active' : '']" :key="index" @click="handleExamClick(index,item)">
                     <p class="list-item-type"><span class="type1" :style="{color:colorTransfer[item.conditions.range],borderColor:colorTransfer[item.conditions.range]}">{{item.conditions.range}}</span></p>
                     <span class="list-item-name">{{item.name}}</span>
-                    <span class="list-item-info">{{item.stuCount}}人 | {{item.time}}</span>
+                    <span class="list-item-info">{{item.stuCount}}人 | {{item.time || '2019-02-11'}}</span>
                 </div>
             </vuescroll>
         </div>

+ 0 - 210
TEAMModelOS/ClientApp/src/store/api/index.js

@@ -1,210 +0,0 @@
-import { fetch, post } from '@/filters/http'
-
-export default {
-  // 获取登录跳转链接
-  getLoginLink: function(data) {
-     return post('api/login/login', data)
-  },
-  // 验证登录
-  checkLogin: function(data) {
-     return post('api/login/CheckLogin', data)
-  },
-  // 获取登录人员角色列表
-  getLoginRoles: function(data) {
-    return post('api/role/GetLoginRoles', data)
-  },
-  // 查找地区对应学校列表
-  getSchoolList: function(data) {
-    return post('api/School/getSchool', data)
-  },
-  // 根据当前登录用户获取已授权的AI智慧学校
-  getAuthSchool: function(data) {
-    return post('api/School/AuthorizedAISchool', data)
-  },
-  // 获取全部科目
-  FindSubjectsByDict: function(data) {
-    return post('api/subject/FindSubjectsByDict', data)
-  },
-  // 获取当前学校全部科目
-  FindSchoolSubjectsByDict: function(data) {
-    return post('api/subject/FindSchoolSubjectsByDict', data)
-  },
-  // 获取当前学校全部册别
-  FindSchoolVolumesByDict: function(data) {
-    return post('api/volume/FindSchoolVolumesByDict', data)
-  },
-  // 获取当前学校全部学段
-  FindSchoolPeriodsByDict: function(data) {
-    return post('api/period/FindSchoolPeriodsByDict', data)
-  },
-  // 获取当前学校全部年级
-  FindSchoolGradesByDict: function(data) {
-    return post('api/grade/FindSchoolGradesByDict', data)
-  },
-  // 获取当前学校全部学期
-  FindSchoolTermsByDict: function(data) {
-    return post('api/term/FindSchoolTermsByDict', data)
-  },
-  // 保存或更新学校科目
-  SaveOrUpdateSchoolSubject: function(data) {
-    return post('api/subject/SaveOrUpdateSchoolSubject', data)
-  },
-  // 保存或更新学校册别
-  SaveOrUpdateSchoolVolume: function(data) {
-    return post('api/volume/SaveOrUpdateSchoolVolume', data)
-  },
-  // 获取登录人员身份信息
-  getLoginClaim: function(data) {
-    return post('api/role/GetLoginClaim', data)
-  },
-
-  // 解析Html题目
-  SaveAnalyzeHtml: function(data) {
-    return post('api/ImportExercise/AnalyzeHtml', data)
-  },
-
-  // 学情分析API
-  // 查询班年级数据
-  FindGrade: function() {
-    return fetch('/api/class/getGrade?identity=Grade')
-  },
-  // 查询学年期数据
-  FindTerm: function() {
-    return fetch('/api/class/getTerm?identity=term')
-  },
-  // 查询考试情况
-  FindExam: function() {
-    return fetch('/api/class/getExam?identity=Exam')
-  },
-  // 查询基础数据
-  FindBasics: function() {
-    return fetch('/api/class/getBase?identity=Base')
-  },
-  // 查询各校成绩排名(堆叠柱状图)
-  FindBargraph: function() {
-    return fetch('/api/class/getExam?identity=EcharsZ')
-  },
-  // 查询各项科目表现(雷达图)
-  FindRadargraph: function() {
-    return fetch('/api/class/getExam?identity=EcharsL')
-  },
-  // 查询科目表现对比(饼图)
-  FindSubjectsManifestation: function() {
-    return fetch('/api/class/getExam?identity=EcharsY')
-  },
-  // 查询历次总分统计表(折线图)
-  FindLinechart: function() {
-    return fetch('/api/class/getExam?identity=EcharsZx')
-  },
-  // 查询考试类型
-  FindExamtype: function() {
-    return fetch('/api/class/getExam?identity=ExamType')
-  },
-
-  // 动态数据
-  // 关注年级变化数据
-  FindSelectGrade: function() {
-    return fetch('/api/class/getChange?identity=Changegrade')
-  },
- // 关注学年期变化数据
-  FindSelectTerm: function() {
-    return fetch('/api/class/getChangeterm?identity=Changeterm')
-  },
-  // 点击某次考试详情 变化数据
-   FindSelectExam: function() {
-     return fetch('/api/class/getChangeExam?identity=Changeexam')
-  },
-  // 筛选考试类型 变化数据
-  FindSelectExamType: function() {
-    return fetch('/api/class/getChangeExamType?identity=Changeexamtype')
-  },
-  // 显示文科数据  变化数据
-  FindSelectArts: function() {
-    return fetch('/api/class/getChangeArts?identity=Changarts')
-  },
-  // 显示理科数据  变化数据
-  FindSelectScience: function() {
-    return fetch('/api/class/getChangeScience?identity=Changscience')
-  },
-  // 点击柱状图 赋值到雷达图
-  // 成都七中
-  Findcdqz: function() {
-    return fetch('/api/class/getExam?identity=cdqz')
-  },
-  // 成都四中
-  Findcdsz: function() {
-    return fetch('/api/class/getExam?identity=cdsz')
-  },
-  // 成都九中
-  Findcdjz: function() {
-    return fetch('/api/class/getExam?identity=cdjz')
-  },
-  // 成都树德
-  Findcdsd: function() {
-    return fetch('/api/class/getExam?identity=cdsd')
-  },
-  // 师大一中
-  Findsdyz: function() {
-    return fetch('/api/class/getExam?identity=sdyz')
-  },
-  // 西川中学
-  Findxczx: function() {
-    return fetch('/api/class/getExam?identity=xczx')
-  },
-  // 石室中学
-  Findsszx: function() {
-    return fetch('/api/class/getExam?identity=sszx')
-  },
-
-  // 任教老师页面
-  // 查询关注学年期
-  FindTeachTerm: function() {
-    return fetch('/api/class/getTerm?identity=Teachterm')
-  },
-  // 查询数据对比
-  FindTeachContrast: function() {
-    return fetch('/api/class/getTerm?identity=Teachcontrast')
-  },
-  // 查询考试信息
-  FindTeachExam: function() {
-    return fetch('/api/class/getExam?identity=TeachExam')
-  },
-  // 查询基础数据
-  FindTeachBasics: function() {
-    return fetch('/api/class/getTerm?identity=TeachBase')
-  },
-  // 查询各班平均分数排名(柱状图)
-  FindTeachbargraph: function() {
-    return fetch('/api/class/getExam?identity=TeachEcharsZ')
-  },
-  // 查询及格率比较
-  FindTeachAnnulus: function() {
-    return fetch('/api/class/getExam?identity=TeachAnnulus')
-  },
-  // 查询历次总分统计图
-  FindTeachHistory: function() {
-    return fetch('/api/class/getExam?identity=TeachEcharsZx')
-  },
-  // 查询PR值
-  FindTeachPR: function() {
-    return fetch('/api/class/getExam?identity=TeachPie')
-  },
-
-  // 动态数据
-  // 选择关注学年期
-  FindDynamicTerm: function() {
-    return fetch('/api/class/getExam?identity=TeachChangeterm')
-  },
-  // 选择数据比较
-  FindDatacompare: function() {
-    return fetch('/api/class/getExam?identity=TeachChangeDatacompare')
-  },
-  // 选择考试数据
-  FindClickExam: function() {
-    return fetch('/api/class/getExam?identity=TeachChangeExam')
-  },
-  // 点击班级 联动 RP值
-  FindClickPR: function() {
-    return fetch('/api/class/getExam?identity=TeachClickPR')
-  }
-}

+ 1 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.css

@@ -38,6 +38,7 @@
     width: 50%;
 }
 
+
 .my-radio-style .ivu-radio-group-button .ivu-radio-wrapper {
     margin-right: 20px;
     border-radius: 5px;

+ 60 - 11
TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.vue

@@ -2,17 +2,31 @@
     <div class="ev-container">
         <span class="ev-title"><Icon type="ios-paper" />{{isEdit?'编辑习题':'新建习题'}}</span>
         <Divider />
-        <div class="exersices-attr display-flex">
+        <div class="exersices-attr display-flex exersice-school-info">
             <div class="exersices-attr-type my-radio-style">
                 <IconText :text="'选择学段'" :color="'green'" :icon="'md-apps'"></IconText>
-                <Select v-model="exercisePeriod" style="width:200px;margin-top:20px">
-                    <Option v-for="(item,index) in periodList" :value="index" :key="index">{{ item }}</Option>
+                <Select v-model="exercisePeriod" style="width:200px;margin-top:20px" @on-change="onPeriodChange">
+                    <Option v-for="(period,index) in schoolInfo.period" :value="index" :key="index">{{ period.periodName }}</Option>
                 </Select>
             </div>
             <div class="exersices-attr-diff my-radio-style">
                 <IconText :text="'选择年级'" :color="'red'" :icon="'md-pulse'"></IconText>
                 <Select v-model="exerciseGrade" style="width:200px;margin-top:20px">
-                    <Option v-for="(item,index) in gradeList" :value="index" :key="index">{{ item }}</Option>
+                    <Option v-for="(grade,index) in gradeList" :value="index" :key="index">{{ grade.gradeName }}</Option>
+                </Select>
+            </div>
+        </div>
+        <div class="exersices-attr display-flex" style="margin-top:30px">
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'选择科目'" :color="'red'" :icon="'md-pulse'"></IconText>
+                <Select v-model="exerciseSubject" style="width:200px;margin-top:20px">
+                    <Option v-for="(subject,index) in subjectList" :value="index" :key="index">{{ subject.subjectName }}</Option>
+                </Select>
+            </div>
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'题目归属'" :color="'red'" :icon="'md-pulse'"></IconText>
+                <Select v-model="exerciseScope" style="width:200px;margin-top:20px">
+                    <Option v-for="(item,index) in scopeList" :value="index" :key="index">{{ item }}</Option>
                 </Select>
             </div>
         </div>
@@ -88,11 +102,16 @@
             return {
                 isEdit: false,
                 editInfo: {},
+                schoolInfo: {},
                 exersicesType: 'Single',
                 exercisePeriod: 0,
                 exerciseGrade: 0,
-                periodList: ['小学', '初中', '高中'],
-                gradeList: ['一年级', '二年级', '三年级'],
+                exerciseSubject: 0,
+                exerciseScope: 0,
+                scopeList: ['个人题库', '校本题库'],
+                periodList: [],
+                gradeList: [],
+                subjectList: [],
                 exersicesDiff: '0',
                 analysisContent: '',
                 stemContent: '',
@@ -119,6 +138,8 @@
             }
         },
         created() {
+            // 初始化区班校信息
+            this.getSchoolInfo()
             let editItem = this.$route.params.item // 编辑题目
             if (editItem) {
                 this.editInfo = editItem
@@ -126,6 +147,15 @@
             }
         },
         methods: {
+            getSchoolInfo() {
+                this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(res => {
+                    this.schoolInfo = res.data
+                    this.gradeList = res.data.period[0].grades
+                    this.subjectList = res.data.period[0].subjects
+                    console.log(res.data)
+                })
+            },
+
             getContent: function (type) {
                 let exerciseItem = Object.assign({}, defaultExercise)
                 switch (type) {
@@ -136,6 +166,7 @@
                         exerciseItem.difficulty = this.exersicesDiff
                         exerciseItem.explain = this.analysisContent
                         exerciseItem.answer = [String.fromCharCode(64 + parseInt(this.$refs.single._data.trueIndex + 1))]
+
                         break
                     case 'Multiple':
                         exerciseItem.question = this.$refs.multiple._data.stemContent
@@ -170,13 +201,16 @@
                         exerciseItem.answer = this.$refs.subjective._data.answerContent
                         break
                 }
+                exerciseItem.period = this.schoolInfo.period[this.exercisePeriod].periodCode
+                exerciseItem.grade = this.schoolInfo.period[this.exercisePeriod].grades[this.exerciseGrade].gradeCode
+                exerciseItem.subject = this.schoolInfo.period[this.exercisePeriod].subjects[this.exerciseSubject].subjectCode
+                exerciseItem.scopeCode = this.exerciseScope === 0 ? 'habook0001' : this.schoolInfo.schoolCode
+
 
                 // 判断获取的数据是否有空数据以及是否为空字符串
                 if (this.checkContent(exerciseItem) && this.getSimpleText(exerciseItem.question) && this.getSimpleText(exerciseItem.explain)) {
-                    //this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(res => {
-                    //    console.log(res)
-                    //})
-
+                    this.saveExercise(exerciseItem)
+                    console.log(exerciseItem)
                     this.$router.push({
                         name: 'exercisesList',
                         params: {
@@ -187,7 +221,13 @@
                     this.$Message.warning('请将题目填写完整!')
                 }
 
-                console.log(exerciseItem)
+
+            },
+
+            saveExercise(item) {
+                this.$api.newEvaluation.SaveSingleExercise(item).then(res => {
+                    console.log(res)
+                })
             },
 
             // 题目类型转换
@@ -218,6 +258,13 @@
                 e.target.style.color = '#fff'
             },
 
+            onPeriodChange(val) {
+                this.gradeList = this.schoolInfo.period[val].grades
+                this.subjectList = this.schoolInfo.period[val].subjects
+                this.exerciseGrade = 0
+                this.exerciseSubject = 0
+            },
+
             // 提取富文本内容中的文本
             getSimpleText(html) {
                 var msg = html.replace(/<(?!img|video).*?>/g, '')// 执行替换成空字符
@@ -241,6 +288,7 @@
                 })
             },
 
+            // 重置
             reloadCreate() {
                 location.reload()
             },
@@ -255,6 +303,7 @@
 
         },
         mounted() {
+
             let analysisEditor = new E(this.$refs.analysisEditor)
             analysisEditor.customConfig.onchange = (html) => {
                 this.analysisContent = html

+ 6 - 57
TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.vue

@@ -191,16 +191,6 @@
                 list: [],
                 flag: false,
                 searchWord: '',
-                basketCount: 0,
-                basketList: {
-                    all: [],
-                    Single: [],
-                    Multiple: [],
-                    Judge: [],
-                    Complete: [],
-                    Subjective: [],
-                    Compose: []
-                },
                 pointListLoading: true,
                 isShowUploadList: false,
                 schoolInfo: {},
@@ -234,6 +224,7 @@
             }
         },
         created() {
+            this.getExerciseList({})
             //this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[0]
             this.list = questions.result.data
             this.totalNum = questions.result.data.length
@@ -243,6 +234,11 @@
         },
         methods: {
 
+            getExerciseList(data) {
+                this.$api.newEvaluation.FindExerciseList(data).then(res => {
+                    console.log(res)
+                })
+            },
 
             // 根据题库加载题目
             filterOriginChange(origin) {
@@ -327,53 +323,6 @@
                 })
             },
 
-            // 选题
-            handleChoose(item) {
-                let that = this
-                if (this.basketList.all.indexOf(item) > -1) {
-                    this.$Message.warning('该试题已存在试卷篮!')
-                } else {
-                    this.drop(event.target)
-                    // let cartClassList = document.getElementById('questionCart').classList
-                    this.basketList[item.type].push(item)
-                    this.basketList.all.push(item)
-                    setTimeout(function() {
-                        that.basketCount += 1
-                    }, 400)
-                }
-            },
-
-            // 从试题篮删除题型
-            handleBasketDelete(type) {
-                let arr = JSON.parse(JSON.stringify(this.basketList.all))
-                this.$Modal.confirm({
-                    title: '删除题型',
-                    content: '<p>确认删除该题型吗?</p>',
-                    okText: '确认',
-                    cancelText: '取消',
-                    onOk: () => {
-                        for (let i = 0; i < arr.length; i++) {
-                            let shaCodeArr = this.basketList.all.map(item => item.shaCode)
-                            let index = shaCodeArr.indexOf(arr[i].shaCode)
-                            if (arr[i].type === type && index > -1) {
-                                this.basketList.all.splice(index, 1)
-                            }
-                        }
-                        this.basketList[type] = []
-                        this.basketCount = this.basketList.all.length
-                        this.$Message.success('删除成功!')
-                    }
-                })
-            },
-
-            // 进入组卷中心
-            handleSubmitPaper() {
-                if (this.basketList.all.length) {
-                    this.$router.push({
-                        name: 'testPaper'
-                    })
-                }
-            },
 
             // 绑定知识点操作
             handleBindPoint(concepts) {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue

@@ -222,7 +222,7 @@
                                         </span>
                                     </div>
                                     <div class="exam-info-bottom">
-                                        <span>{{$t('totalAnalysis.echarts_text11')}}: {{item.time}}</span>
+                                        <span>{{$t('totalAnalysis.echarts_text11')}}: {{item.time || '2019-02-11'}}</span>
                                         <span>{{$t('totalAnalysis.echarts_text12')}}: {{item.stuCount}}</span>
                                         <span>{{$t('totalAnalysis.echarts_text13')}}: 1680</span>
                                         <span>{{$t('totalAnalysis.echarts_text14')}}: 98%</span>

+ 2 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.vue

@@ -29,8 +29,8 @@
                         </p>
                         <p class="info-date-person">
                             <!--<span class="info-person">{{$t('totalAnalysis.text7')}}:<span style="color:#fff">{{currentExamItem.stuCount}}人</span></span>-->
-                            <!--<span class="info-date">{{$t('totalAnalysis.text8')}}:<span style="color:#fff">{{currentExamItem.time}}</span></span>-->
-                            <span class="info-item">{{$t('totalAnalysis.echarts_text11')}}: <span style="color:#fff;font-weight:bold">{{currentExamItem.time}}</span></span>
+                            <!--<span class="info-date">{{$t('totalAnalysis.text8')}}:<span style="color:#fff">{{currentExamItem.time || '2019-02-11'}}</span></span>-->
+                            <span class="info-item">{{$t('totalAnalysis.echarts_text11')}}: <span style="color:#fff;font-weight:bold">{{currentExamItem.time || '2019-02-11'}}</span></span>
                             <span class="info-item">{{$t('totalAnalysis.echarts_text12')}}: <span style="color:#fff;font-weight:bold">{{currentExamItem.stuCount}}</span></span>
                             <span class="info-item">{{$t('totalAnalysis.echarts_text13')}}: <span style="color:#fff;font-weight:bold">1680</span></span>
                             <span class="info-item">{{$t('totalAnalysis.echarts_text14')}}: <span style="color:#fff;font-weight:bold">98%</span></span>