瀏覽代碼

1、解决冲突

李思淳 5 年之前
父節點
當前提交
e29169bca5

+ 0 - 10
TEAMModelOS.API/TEAMModelOS.API.csproj

@@ -1,10 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>netcoreapp3.0</TargetFramework>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\TEAMModelOS.SDK\TEAMModelOS.SDK.csproj" />
-  </ItemGroup>
-
-</Project>

+ 0 - 11
TEAMModelOS.GRPC/Models/Params.cs

@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace TEAMModelOS.GRPC.Models
-{
-    public class Params
-    {
-    }
-}

+ 0 - 27
TEAMModelOS.GRPC/Program.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Hosting;
-
-namespace TEAMModelOS.GRPC
-{
-    public class Program
-    {
-        public static void Main(string[] args)
-        {
-            CreateHostBuilder(args).Build().Run();
-        }
-
-        // Additional configuration is required to successfully run gRPC on macOS.
-        // For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
-        public static IHostBuilder CreateHostBuilder(string[] args) =>
-            Host.CreateDefaultBuilder(args)
-                .ConfigureWebHostDefaults(webBuilder =>
-                {
-                    webBuilder.UseStartup<Startup>();
-                });
-    }
-}

+ 0 - 12
TEAMModelOS.GRPC/Properties/launchSettings.json

@@ -1,12 +0,0 @@
-{
-  "profiles": {
-    "TEAMModelOS.GRPC": {
-      "commandName": "Project",
-      "launchBrowser": false,
-      "applicationUrl": "https://localhost:5001",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      }
-    }
-  }
-}

+ 0 - 6
TEAMModelOS.sln

@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelOS", "TEAMModelOS\
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelOS.Service", "TEAMModelOS.Service\TEAMModelOS.Service.csproj", "{04508AB6-CD54-46B4-B96D-9672EB66761B}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelOS.GRPC", "TEAMModelOS.GRPC\TEAMModelOS.GRPC.csproj", "{B000D9E3-C412-4BD5-8459-08232A962665}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -29,10 +27,6 @@ Global
 		{04508AB6-CD54-46B4-B96D-9672EB66761B}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{04508AB6-CD54-46B4-B96D-9672EB66761B}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{04508AB6-CD54-46B4-B96D-9672EB66761B}.Release|Any CPU.Build.0 = Release|Any CPU
-		{B000D9E3-C412-4BD5-8459-08232A962665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{B000D9E3-C412-4BD5-8459-08232A962665}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{B000D9E3-C412-4BD5-8459-08232A962665}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{B000D9E3-C412-4BD5-8459-08232A962665}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 3 - 0
TEAMModelOS/ClientApp/src/components/learnactivity/ChooseContent.less

@@ -137,4 +137,7 @@
     border-bottom: 1px solid #666666;
     margin-bottom: 10px;
     padding-left:10px;
+}
+.file-content-wrap {
+    height: ~"calc(100% - 66px)";
 }

+ 108 - 21
TEAMModelOS/ClientApp/src/components/learnactivity/ChooseContent.vue

@@ -1,6 +1,7 @@
 <template>
     <div class="choose-content">
         <Tabs type="card">
+            <!-- 选择课纲内容 -->
             <TabPane label="课纲">
                 <div class="tab-wrap">
                     <div class="content-filter-wrap">
@@ -52,26 +53,27 @@
                     </div>
                 </div>
             </TabPane>
+            <!-- 选择资源文件 -->
             <TabPane label="内容">
                 <div class="tab-wrap">
                     <div class="content-filter-wrap">
                         <div class="content-filter-item">
                             <span class="content-filter-label">资源范围:</span>
-                            <RadioGroup v-model="syllabusFilter.type" style="display:inline-block;">
-                                <Radio label="0" class="radio-width">私有资源</Radio>
-                                <Radio label="1" class="radio-width">校本资源</Radio>
+                            <RadioGroup v-model="contentFilter.type" style="display:inline-block;">
+                                <Radio :label="0" class="radio-width">私有资源</Radio>
+                                <Radio :label="1" class="radio-width">校本资源</Radio>
                             </RadioGroup>
                         </div>
                         <div class="content-filter-item">
                             <span class="content-filter-label">类型:</span>
-                            <RadioGroup v-model="syllabusFilter.periodCode" style="display:inline-block;" @on-change="getSubjectList">
+                            <RadioGroup v-model="contentFilter.fileType" style="display:inline-block;" @on-change="filterContentByType">
                                 <Radio class="radio-width" v-for="(item,index) in contentTypeList" :label="item.type">{{item.label}}</Radio>
                             </RadioGroup>
                         </div>
-                        <Input class="seach-input" suffix="ios-search" placeholder="关键字搜索" clearable style="width: 240px" size="small" />
+                        <Input v-model="keyWord" class="seach-input" suffix="ios-search" placeholder="关键字搜索" clearable style="width: 240px" size="small" @on-change="searchKeyWord" />
                     </div>
                     <div class="file-content-wrap">
-                        <Table :columns="fileColumns" :data="fileListShow" class="animated fadeIn" @on-select="selectFile" @on-select-cancel="cancelSelectFile">
+                        <Table ref="fileList" :columns="fileColumns" :data="fileListShow" max-height="660" class="animated fadeIn" @on-select="selectFile" @on-select-cancel="cancelSelectFile">
                             <template slot-scope="{ row, index }" slot="size">
                                 <div>
                                     {{row.size/1204 > 1024 ? (row.size/1204/1204).toFixed(1) + 'M': (row.size/1204).toFixed(1) + 'KB'}}
@@ -100,6 +102,7 @@
                     </div>
                 </div>
             </TabPane>
+            <!-- 选择题库 -->
             <TabPane label="题目">
                 <div class="tab-wrap">
                     <vuescroll v-if="questionList.length > 0">
@@ -156,7 +159,7 @@
                         </Row>
                         <div class="choose-question-wrap">
                             <Loading :top="100" v-show="isLoading"></Loading>
-                            <QuestionList :class="isLoading ? '':'animated fadeIn'" v-show="!isLoading" :config="questionConfig" @seleteQuestion="seleteQuestion" :questions="questionList"></QuestionList>
+                            <QuestionList :class="isLoading ? '':'animated fadeIn'" v-show="!isLoading" :config="questionConfig" @selectQuestion="selectQuestion" @deleteQuestion="deleteQuestion" :questions="questionList"></QuestionList>
                             <NoData style="margin-top:30px;" v-if="questionList.length == 0"></NoData>
                             <div class="page-wrap">
                                 <Page :current.sync="pageNum" :total="totalNum" :page-size="pageSize" size="small" show-elevator show-sizer @on-change="getCurrentPageData" />
@@ -181,6 +184,7 @@
         },
         data() {
             return {
+                keyWord: '',
                 isLoading: false,
                 questionFilter: {
                     periodCode: ['all'],
@@ -252,10 +256,58 @@
                     status: 1,
                     scopeCode: 'HBCN'
                 },
+                contentFilter: {
+                    type: 0,
+                    fileType: 'all'
+                },
                 addKnowledgeStatus: false
             }
         },
         methods: {
+            refreshData() {
+                this.$refs.fileList.selectAll(false)
+            },
+            /**
+             * 通过文件类型筛选文件
+             * */
+            filterContentByType() {
+                this.model = []
+                let type = this.contentFilter.fileType
+                let files = this.fileList
+                //区分校本资源和私有资源
+                //if (this.rangeType == 1) {
+                //    files = this.fileList
+                //} else {
+                //    files = this.schoolFileList
+                //}
+                switch (type) {
+                    case 'all':
+                        this.fileListShow = files
+                        break
+                    case 'picture':
+                        this.fileListShow = files.filter(item => {
+                            return item.type === 'picture'
+                        })
+                        break
+                    case 'video':
+                        this.fileListShow = files.filter(item => {
+                            return item.type === 'video'
+                        })
+                        break
+                    case 'document':
+                        this.fileListShow = files.filter(item => {
+                            return item.type === 'document'
+                        })
+                        break
+                    case 'other':
+                        this.fileListShow = files.filter(item => {
+                            return item.type === 'other'
+                        })
+                        break
+                }
+                this.searchBefore = this.fileListShow
+                this.keyWord = ''
+            },
             /**
              * 查询当前页题目
              */
@@ -322,6 +374,22 @@
                     }, 500)
                 })
             },
+            /**
+             * 关键字搜索文件
+             * */
+            searchKeyWord() {
+                console.log('12345789')
+                console.log(this.searchBefore)
+                if (this.keyWord === '') {
+                    this.fileListShow = this.searchBefore
+                } else {
+                    let searchResult = this.searchBefore.filter(item => {
+                        return item.fileName.indexOf(this.keyWord) !== -1
+                    })
+                    console.log(searchResult)
+                    this.fileListShow = searchResult
+                }
+            },
             deleteAll(data) {
                 if (data.length == 1) {
                     if (data[0] == 'all') {
@@ -339,7 +407,18 @@
             setScopeCode(type) {
 
             },
-            seleteQuestion(question) {
+            /**
+             * 删除已选的题目
+             * */
+            deleteQuestion(data) {
+                console.log('index:'+this.selectedQuestions.indexOf(data))
+                this.selectedQuestions.splice(this.selectedQuestions.indexOf(data), 1)
+                this.$emit('on-cancel-question', {
+                    questions: this.selectedQuestions,
+                    question: data
+                })
+            },
+            selectQuestion(question) {
                 let flag = true
                 for (let item of this.selectedQuestions) {
                     if (item.id == question.id) {
@@ -359,12 +438,6 @@
                 }
             },
             cancelSelectFile(selection, row) {
-                //for (let i = 0; i < this.selectedFiles.length; i++) {
-                //  if (row.sha1Code == this.selectedFiles[i].sha1Code) {
-                //    this.selectedFiles.splice(i, 1)
-                //    break
-                //  }
-                //}
                 this.$emit('on-cancel-file', {
                     files: selection,
                     file: row
@@ -392,11 +465,6 @@
                             this.fileList = res.result.data
                             this.fileListShow = this.fileList
                             this.searchBefore = this.fileList
-                            //this.storageSpace = this.fileList.reduce(
-                            //  (total, item) => {
-                            //    return total + item.size
-                            //  }, 0
-                            //)
                         } else {
                             this.$Message.warning(error.message)
                         }
@@ -520,7 +588,7 @@
                     this.volumeList.length = 0
                     this.syllabusList.length = 0
                 }
-            },
+            }
         },
         created() {
             this.findFileList()
@@ -537,7 +605,7 @@
 <style lang="less" scoped>
     @import "./ChooseContent.less";
 </style>
-<style>
+<style lang="less">
     .choose-content .ivu-tabs.ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-nav-container {
         height: auto;
     }
@@ -625,4 +693,23 @@
         border-color: #606060;
         border-radius: 15px;
     }
+
+    .file-content-wrap .ivu-table-overflowY {
+        &::-webkit-scrollbar
+
+    { /*滚动条整体样式*/
+        width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
+        height: 1px;
+    }
+
+    &::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
+        -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
+        background: rgb(124,124,124);
+    }
+
+    &::-webkit-scrollbar-track { /*滚动条里面轨道*/
+        -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
+        background: rgba(68,68,68,.5);
+    }
+    }
 </style>

+ 110 - 92
TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.vue

@@ -1,105 +1,123 @@
 <template>
-  <div>
-    <div :class="index == openIndex ? 'question-item-wrap-detail question-item-wrap':'question-item-wrap'" v-for="(item,index) in questions">
-      <p class="question-content">
+    <div>
+        <div :class="index == openIndex ? 'question-item-wrap-detail question-item-wrap':'question-item-wrap'" v-for="(item,index) in questions">
+            <p class="question-content">
 
-        <span class="question-order">{{index+1+'.'}}</span>
-        <span class="question-text" v-html='item.question'></span>
-        <!--<slot name="score"></slot>-->
-        <Icon v-if="config.showSelect" type="ios-cart" title="选题" class="choose-question-btn" size="25" @click="selectQuestion(item)" />
-        <Icon type="ios-arrow-dropdown" :color="index == openIndex? 'cyan':'white'" size="25" @click="toglleQuestionDetail(index)" :class="index == openIndex ? 'toggle-detail-icon toggle-detail-icon-up':'toggle-detail-icon toggle-detail-icon-down'" :title="openIndex == index ? '收起':'查看详情'" />
-      </p>
-      <div v-show="index == openIndex" :class="index == openIndex ? 'question-detail animated  fadeIn':'question-detail animated  fadeOut'">
-        <p class="option-item" v-for="(optionItem,index) in item.option">
-          <span class="option-order">{{optionItem.code+'.'}}</span>
-          <span class="option-text" v-html='optionItem.value'></span>
-        </p>
-        <p class="dark-iview-inputnumber" style="margin-top:15px;" v-if="config.showScore">
-          <span class="answer-label">配分:</span>
-          <InputNumber :max="10" :min="1" v-model="item.score" size="small" style="width: 110px" :formatter="value => value+' 分'"  :parser="value => value.replace(' 分','')"></InputNumber>
-        </p>
-        <p class="answer-label">答案:点击展开答案详情</p>
-        <p class="answer-detail">
-          <span v-for="(answerItem,index) in item.answer" v-html='answerItem'></span>
-        </p>
-        <div class="question-control-wrap">
-          <Icon type="md-trash" class="question-control-btn" size="25" title="删除" v-if="config.showDelete" @click="deleteQuestion(index)"/>
-          <Icon type="ios-link" class="question-control-btn" size="25" title="补救资源" v-if="config.showRemedy"/>
-        </div>
-      </div>
+                <span class="question-order">{{index+1+'.'}}</span>
+                <span class="question-text" v-html='item.question'></span>
+                <!--<slot name="score"></slot>-->
+                <Icon v-if="config.showSelect" type="ios-cart" title="选题" class="choose-question-btn" size="25" @click="selectQuestion(item)" :color="selectedId.indexOf(item.id) == -1 ? 'white':'aqua'"/>
+                <Icon type="ios-arrow-dropdown" :color="index == openIndex? 'cyan':'white'" size="25" @click="toglleQuestionDetail(index)" :class="index == openIndex ? 'toggle-detail-icon toggle-detail-icon-up':'toggle-detail-icon toggle-detail-icon-down'" :title="openIndex == index ? '收起':'查看详情'" />
+            </p>
+            <div v-show="index == openIndex" :class="index == openIndex ? 'question-detail animated  fadeIn':'question-detail animated  fadeOut'">
+                <p class="option-item" v-for="(optionItem,index) in item.option">
+                    <span class="option-order">{{optionItem.code+'.'}}</span>
+                    <span class="option-text" v-html='optionItem.value'></span>
+                </p>
+                <p class="dark-iview-inputnumber" style="margin-top:15px;" v-if="config.showScore">
+                    <span class="answer-label">配分:</span>
+                    <InputNumber :max="100" :min="1" v-model="item.score" size="small" style="width: 110px" :formatter="value => value+' 分'" :parser="value => value.replace(' 分','')" @on-change="calcScore"></InputNumber>
+                </p>
+                <p class="answer-label">答案:点击展开答案详情</p>
+                <p class="answer-detail">
+                    <span v-for="(answerItem,index) in item.answer" v-html='answerItem'></span>
+                </p>
+                <div class="question-control-wrap">
+                    <Icon type="md-trash" class="question-control-btn" size="25" title="删除" v-if="config.showDelete" @click="deleteQuestion(index)" />
+                    <Icon type="ios-link" class="question-control-btn" size="25" title="补救资源" v-if="config.showRemedy" />
+                </div>
+            </div>
 
+        </div>
     </div>
-  </div>
 </template>
 <script>
-  export default {
-    props: {
-      questions: {
-        type: Array,
-        default: () => {
-          return []
-        }
-      },
-      config: {
-        type: Object,
-        default: () => {
-          return {
-            showSelect: false,
-            showScore: false,
-            showDelete: false,
-            showRemedy: false
-          }
+    export default {
+        props: {
+            questions: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            },
+            config: {
+                type: Object,
+                default: () => {
+                    return {
+                        showSelect: false,
+                        showScore: false,
+                        showDelete: false,
+                        showRemedy: false
+                    }
+                }
+            }
+        },
+        data() {
+            return {
+                selectedId: [],
+                questionDetail: false,
+                openIndex: -1
+            }
+        },
+        methods: {
+            /**
+             * 删除id数组中某个id
+             * @param id
+             */
+            removeId(id) {
+                let index = this.selectedId.indexOf(id)
+                if (index != -1) {
+                    this.selectedId.splice(index,1)
+                }
+            },
+            calcScore() {
+                this.$emit('calcScore')
+            },
+            deleteQuestion(index) {
+                this.$emit('deleteQuestion', this.questions[index])
+                this.removeId(this.questions[index].id)
+            },
+            selectQuestion(data) {
+                
+                if (this.selectedId.indexOf(data.id) == -1) {
+                    this.selectedId.push(data.id)
+                    this.$emit('selectQuestion', data)
+                } else {
+                    this.$emit('deleteQuestion', data)
+                    this.removeId(data.id)
+                }
+                
+            },
+            groupBy(array, key) {
+                const groups = {}
+                array.forEach(function (item) {
+                    const group = JSON.stringify(item[key])
+                    groups[group] = groups[group] || []
+                    groups[group].push(item)
+                })
+                return Object.keys(groups).map(function (group) {
+                    return groups[group]
+                })
+            },
+            toglleQuestionDetail(index) {
+                if (index == this.openIndex) {
+                    this.openIndex = -1
+                } else {
+                    this.openIndex = index
+                }
+            }
+        },
+        mounted() {
         }
-      },
-      showSelect: { // 是否显示选题图标
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        groupQuestion: {},
-        questionDetail: false,
-        openIndex: -1
-      }
-    },
-    methods: {
-      deleteQuestion(index) {
-        this.$emit('deleteQuestion', this.questions[index])
-      },
-      selectQuestion(data) {
-        this.$emit('seleteQuestion', data)
-      },
-      groupBy(array, key) {
-        const groups = {}
-        array.forEach(function(item) {
-          const group = JSON.stringify(item[key])
-          groups[group] = groups[group] || []
-          groups[group].push(item)
-        })
-        return Object.keys(groups).map(function(group) {
-          return groups[group]
-        })
-      },
-      toglleQuestionDetail(index) {
-        if (index == this.openIndex) {
-          this.openIndex = -1
-        } else {
-          this.openIndex = index
-        }
-      }
-    },
-    mounted() {
     }
-  }
 </script>
 <style scoped lang="less">
-  @import "./QuestionList.less";
+    @import "./QuestionList.less";
 </style>
 <style>
-  .question-detail .ivu-input-number{
-    border:none;
-    border-radius:0px;
-    border-bottom:1px solid #aaaaaa;
-  }
+    .question-detail .ivu-input-number {
+        border: none;
+        border-radius: 0px;
+        border-bottom: 1px solid #aaaaaa;
+    }
 </style>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -91,7 +91,7 @@
                             </template>
                             <MenuItem name="manageEvaluation" to="/home/manageEvaluation">评测活动</MenuItem>
                             <MenuItem name="manageLearn" to="/home/manageUnit">最小自学单元</MenuItem>
-                            <MenuItem name="manageOrder" to="/home/manageOrderLearn">作业活动</MenuItem>
+                            <MenuItem name="manageOrder" to="/home/manageOrderLearn">编序式活动</MenuItem>
                         </Submenu>
                         <MenuItem name="activityReport" to="/home/activityReport">
                             <span style="font-size:16px;">学习活动仪表</span>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/CreateEvaluation.less

@@ -29,7 +29,7 @@
       color: rgb(107, 223, 195);
       float: right;
       cursor:pointer;
-      line-height:45px;
+      margin-top:6px;
       margin-right:40px;
     }
   }

+ 7 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/CreateEvaluation.vue

@@ -2,7 +2,8 @@
     <div class="create-evaluation-container">
         <div class="create-header">
             <p class="create-header-title">创建评测活动</p>
-            <p class="btn-save" @click="saveEvaluation"><Icon type="ios-albums-outline" color="#6BE9C3" style="margin-right:10px;" />保存评测</p>
+            <!--<p class="btn-save" @click="saveEvaluation"><Icon type="ios-albums-outline" color="#6BE9C3" style="margin-right:10px;" />保存评测</p>-->
+            <Button class="btn-save" type="text" :loading="isLoading" ghost icon="ios-albums-outline" @click="saveEvaluation">保存评测</Button>
         </div>
         <div class="create-body">
             <div class="evaluation-attr-wrap">
@@ -94,6 +95,7 @@
         </Modal>
         <Modal v-model="goToManageStatus"
                title="管理评测"
+               :mask-closable="false"
                ok-text="是"
                cancel-text="否"
                @on-ok="confirmToManage">
@@ -131,6 +133,7 @@
         data() {
             return {
                 jsFn,
+                isLoading: false,
                 comfirmPreviewStatus: false,
                 goToManageStatus: false,
                 examInfo: {},
@@ -355,6 +358,7 @@
                 return flag
             },
             handleData() {
+                this.isLoading = true
                 this.evaluationInfo.schoolCode = this.demoLoginInfo.schoolCode
                 let requestData = {
                     name: this.evaluationInfo.name,
@@ -378,15 +382,15 @@
                             for (let index in this.evaluationInfo.testPaper) {
                                 this.saveTestPaper(this.evaluationInfo.testPaper[index], index)
                             }
-                            //this.$Message.success('保存成功!')
                             this.goToManageStatus = true
 
                         } else {
                             this.$Message.error('API ERROR!')
                         }
+                        this.isLoading = false
                     },
                     err => {
-
+                        this.isLoading = false
                     }
                 )
             },

+ 6 - 5
TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.vue

@@ -35,25 +35,25 @@
                     </div>
                     <Form ref="evaluationInfo" :model="evaluationList[avtiveEvaluationIndex]" label-position="top" class="evaluation-attr-form" label-colon :rules="ruleValidate" v-if="evaluationList.length > 0">
                         <FormItem label="评测名称" prop="name">
-                            <Input v-model="evaluationList[avtiveEvaluationIndex].name"></Input>
+                            <Input v-model="evaluationList[avtiveEvaluationIndex].name" disabled></Input>
                         </FormItem>
                         <FormItem label="测试类型" prop="type">
-                            <Select v-model="evaluationList[avtiveEvaluationIndex].type">
+                            <Select v-model="evaluationList[avtiveEvaluationIndex].type" disabled>
                                 <Option v-for="(item,index) in typeList" :value="item.value" :key="index">{{ item.label }}</Option>
                             </Select>
                         </FormItem>
                         <FormItem label="发布方式" prop="publish">
-                            <Select v-model="evaluationList[avtiveEvaluationIndex].publish">
+                            <Select v-model="evaluationList[avtiveEvaluationIndex].publish" disabled>
                                 <Option v-for="(item,index) in publishList" :value="item.value" :key="index">{{ item.label }}</Option>
                             </Select>
                         </FormItem>
                         <FormItem label="施测对象">
-                            <Select v-model="evaluationList[avtiveEvaluationIndex].target" multiple>
+                            <Select v-model="evaluationList[avtiveEvaluationIndex].target" multiple disabled>
                                 <Option v-for="(item,index) in classroomList" :value="item" :key="index">{{ item }}</Option>
                             </Select>
                         </FormItem>
                         <FormItem label="施测时间">
-                            <DatePicker type="daterange" v-model="myDate" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
+                            <DatePicker disabled type="daterange" v-model="myDate" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
                         </FormItem>
                     </Form>
                 </div>
@@ -438,6 +438,7 @@
                     res => {
                         if (res.error == null) {
                             this.examPaperList = res.result.data
+                            this.groupQuestion = {}
                             if (this.examPaperList.length > 0) {
                                 let groupResult = jsFn.groupBy(this.examPaperList[0].item, 'type')
                                 for (let i = 0; i < groupResult.length; i++) {

+ 2 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/ManualCreate.vue

@@ -100,7 +100,7 @@
             </div>
             <div class="question-list-wrap">
                 <Loading :top="100" v-show="isLoading"></Loading>
-                <QuestionList :class="isLoading ? '':'animated fadeIn'" v-show="!isLoading" :config="questionConfig" :questions="questionList" @seleteQuestion="seleteQuestion"></QuestionList>
+                <QuestionList :class="isLoading ? '':'animated fadeIn'" v-show="!isLoading" :config="questionConfig" :questions="questionList" @selectQuestion="selectQuestion"></QuestionList>
                 <NoData style="margin-top:120px;" v-if="!isLoading && questionList.length == 0" textContent="没有查询到题目"></NoData>
                 <div class="page-wrap">
                     <Page :current.sync="pageNum" :total="totalNum" :page-size="pageSize" size="small" show-elevator show-sizer @on-change="getCurrentPageData" />
@@ -259,7 +259,7 @@
                     return data
                 }
             },
-            seleteQuestion(data) {
+            selectQuestion(data) {
                 let flag = true
                 for (let item of this.shoppingQuestionList) {
                     if (item.id == data.id) {

+ 12 - 6
TEAMModelOS/ClientApp/src/view/learnactivity/TeacherPreview.vue

@@ -30,27 +30,27 @@
             </div>
             <div class="question-type-scope" v-if="groupQuestion.Single != undefined">
                 <span class="question-type-count">{{getOrder('Single')}}单选题(共{{groupQuestion.Single.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Single" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
+                <QuestionList :questions="groupQuestion.Single" :config="questionConfig" @deleteQuestion="deleteQuestion" @calcScore="calcScore"></QuestionList>
             </div>
             <div class="question-type-scope" v-if="groupQuestion.Multiple != undefined">
                 <span class="question-type-count">{{getOrder('Multiple')}}多选题(共{{groupQuestion.Multiple.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Multiple" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
+                <QuestionList :questions="groupQuestion.Multiple" :config="questionConfig" @deleteQuestion="deleteQuestion" @calcScore="calcScore"></QuestionList>
             </div>
             <div class="question-type-scope" v-if="groupQuestion.Complete != undefined">
                 <span class="question-type-count">{{getOrder('Complete')}}填空题(共{{groupQuestion.Complete.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Complete" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
+                <QuestionList :questions="groupQuestion.Complete" :config="questionConfig" @deleteQuestion="deleteQuestion" @calcScore="calcScore"></QuestionList>
             </div>
             <div class="question-type-scope" v-if="groupQuestion.Judge != undefined">
                 <span class="question-type-count">{{getOrder('Judge')}}判断题(共{{groupQuestion.Judge.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Judge" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
+                <QuestionList :questions="groupQuestion.Judge" :config="questionConfig" @deleteQuestion="deleteQuestion" @calcScore="calcScore"></QuestionList>
             </div>
             <div class="question-type-scope" v-if="groupQuestion.Subjective != undefined">
                 <span class="question-type-count">{{getOrder('Subjective')}}问答题(共{{groupQuestion.Subjective.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Subjective" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
+                <QuestionList :questions="groupQuestion.Subjective" :config="questionConfig" @deleteQuestion="deleteQuestion" @calcScore="calcScore"></QuestionList>
             </div>
             <div class="question-type-scope" v-if="groupQuestion.Compose != undefined">
                 <span class="question-type-count">{{getOrder('Compose')}}综合题(共{{groupQuestion.Compose.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Compose" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
+                <QuestionList :questions="groupQuestion.Compose" :config="questionConfig" @deleteQuestion="deleteQuestion" @calcScore="calcScore"></QuestionList>
             </div>
             <NoData v-if="testPaper.item.length == 0" textContent="暂无题目信息,请先添加题目" style="margin:80px 0px;"></NoData>
             <div style="text-align: center;margin-top: 20px;margin-bottom: 30px;">
@@ -188,6 +188,12 @@
             }
         },
         methods: {
+            calcScore() {
+                console.log(this.testPaper)
+                let score = this.testPaper.item.reduce((total, item) => total + item.score, 0)
+                console.log('score:' + score)
+                this.testPaper.score = score
+            },
             drawPie(flag) {
                 if (flag) {
                     this.$refs.examPaperAnalysis.drawDiffChart()

+ 30 - 6
TEAMModelOS/ClientApp/src/view/selflearning/CreateLearnUnit.vue

@@ -13,7 +13,7 @@
             <Split v-model="split1">
                 <div slot="left" class="demo-split-pane">
                     <div class="choose-content-wrap">
-                        <ChooseContent @on-select-question="getSelectedQuestion" @on-cancel-file="cancelFile" @on-select-file="getSelectFile"></ChooseContent>
+                        <ChooseContent @on-select-question="getSelectedQuestion" @on-cancel-question="cancelQuestion" @on-cancel-file="cancelFile" @on-select-file="getSelectFile"></ChooseContent>
                     </div>
                 </div>
                 <div slot="right" class="demo-split-pane">
@@ -38,8 +38,8 @@
                                             <span>{{item.fileName}}</span>
                                         </div>
                                         <span class="content-file-item-action">
-                                            <Icon type="md-download" class="action-icon" title="下载"/>
-                                            <Icon type="md-eye" class="action-icon" title="预览"/>
+                                            <Icon type="md-download" class="action-icon" title="下载" @click="downloadFile(item)"/>
+                                            <Icon v-if="item.type == 'video' || item.type == 'picture' || item.extension == 'pdf'" type="md-eye" class="action-icon" title="预览" @click="clickToPreview(item)" />
                                             <!--<Icon type="md-close" class="action-icon" title="删除"/>-->
                                         </span>
                                     </div>
@@ -63,6 +63,14 @@
                @on-ok="confirmToManage">
             <p>最小学习单元保存成功,是否跳转到管理页面查看?</p>
         </Modal>
+        <Modal v-model="previewStatus" :title="previewFile.fileName" width="800px" class="dark-iview-modal">
+            <video v-if="previewFile.type == 'video'" id="previewVideo" :src="previewFile.blobUrl+sasString" width="780" controls="controls">
+                {{$t('teachContent.tips8')}}
+            </video>
+            <img v-if="previewFile.type == 'picture'" :src="previewFile.blobUrl+sasString" width="780" style="border-radius:5px;" />
+            <embed v-if="previewFile.type == 'document'" :src="previewFile.blobUrl+sasString" width="780" height="600" />
+            <div slot="footer"></div>
+        </Modal>
     </div>
 </template>
 <script>
@@ -74,6 +82,9 @@
     export default {
         data() {
             return {
+                sasString: '',
+                previewFile: {},
+                previewStatus: false,
                 goToManageStatus: false,
                 checkName: true,
                 learnUnit: {
@@ -97,6 +108,19 @@
             QuestionList
         },
         methods: {
+            /**
+             * 删除已选的题目
+             * */
+            cancelQuestion(data) {
+                this.learnUnit.item = data.questions 
+            },
+            downloadFile(item) {
+                window.location.href = item.blobUrl + this.sasString
+            },
+            clickToPreview(file) {
+                this.previewStatus = true
+                this.previewFile = file
+            },
             confirmToManage() {
                 this.$router.push({
                     name: 'manageUnit'
@@ -119,8 +143,8 @@
                         id: this.learnUnit.id,
                         name: this.learnUnit.name,
                         scopeCode: this.demoLoginInfo.TEAMModelId,
-                        item: this.learnUnit.item.map(item => { return item.id}),
-                        resource: this.learnUnit.resource.map(item => { return item.id})
+                        item: this.learnUnit.item.map(item => { return item.id }),
+                        resource: this.learnUnit.resource.map(item => { return item.id })
                     }
                     this.$api.learnActivity.SaveUnit(requestData).then(
                         (res) => {
@@ -139,7 +163,7 @@
                 }
             },
             getSelectedQuestion(data) {
-                this.learnUnit.item.push(data.question)
+                this.learnUnit.item = data.questions
             },
             cancelFile(data) {
                 console.log(data)

+ 17 - 1
TEAMModelOS/ClientApp/src/view/selflearning/CreateOrderLearn.less

@@ -89,7 +89,6 @@
         position: absolute;
         left: 15px;
         top: 40px;
-        padding: 5px;
     }
 
     .choose-learn-content-wrap {
@@ -163,6 +162,7 @@
     height: fit-content;
     padding: 10px 0px 20px 0px;
     color: white;
+    margin-bottom:10px;
 }
 
 .content-question-wrap {
@@ -234,4 +234,20 @@
         font-weight: bold;
         margin-left: 10px;
     }
+}
+.edit-step-name-icon {
+    display: none;
+    cursor: pointer;
+}
+.content-type-label {
+    color: white;
+    line-height: 13px;
+    margin: 10px 0px 5px 0px;
+    padding: 5px;
+    padding-left: 8px;
+    border-left: 2px solid white;
+    background: #333333;
+}
+.content-file-item{
+    margin-bottom:4px;
 }

+ 118 - 41
TEAMModelOS/ClientApp/src/view/selflearning/CreateOrderLearn.vue

@@ -10,31 +10,32 @@
             </span>
         </div>
         <div class="order-learn-main">
+            <!-- 基础信息表单 -->
             <div class="base-info-wrap">
                 <p class="base-info-label">基础信息</p>
                 <div class="base-info-form">
-                    <!--<vuescroll>-->
-                    <Form :model="orderLearnInfo" label-position="top" class="evaluation-attr-form" label-colon>
-                        <FormItem label="活动名称">
+                    <!--<vuescroll>  -->
+                    <Form ref="orderLearnInfo" :model="orderLearnInfo" label-position="top" class="evaluation-attr-form" :rules="ruleValidate" label-colon>
+                        <FormItem label="活动名称" prop="name">
                             <Input v-model="orderLearnInfo.name"></Input>
                         </FormItem>
-                        <FormItem label="学段">
+                        <FormItem label="学段" prop="periodCode">
                             <Select v-model="orderLearnInfo.periodCode">
                                 <Option v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period" :value="item.periodCode" :key="index">{{ item.periodName }}</Option>
                             </Select>
                         </FormItem>
-                        <FormItem label="科目">
-                            <Select v-model="orderLearnInfo.subjectCode">
+                        <FormItem label="科目" prop="subjectCode">
+                            <Select v-model="orderLearnInfo.subjectCode" not-found-text="请先选择学段">
                                 <Option v-for="(item,index) in $jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo,orderLearnInfo.periodCode).subjects" :value="item.subjectCode" :key="index">{{ item.subjectName }}</Option>
                             </Select>
                         </FormItem>
-                        <FormItem label="学习对象">
+                        <FormItem label="学习对象" prop="target">
                             <Select v-model="orderLearnInfo.target">
                                 <Option v-for="(item,index) in classroomList" :value="item" :key="index">{{ item }}</Option>
                             </Select>
                         </FormItem>
-                        <FormItem label="闯关模式">
-                            <div slot="label">
+                        <FormItem label="闯关模式" prop="isOrder">
+                            <div slot="label" style="display:inline-block;">
                                 <span>闯关模式:</span>
                                 <Tooltip trigger="hover" content="是否必须通过阶段测试才能进入下一阶段学习" theme="light" placement="right" max-width="200">
                                     <Icon type="md-help" color="white" style="cursor:pointer;" />
@@ -45,7 +46,7 @@
                                 <Radio label="0" style="margin-left:30px;">否</Radio>
                             </RadioGroup>
                         </FormItem>
-                        <FormItem label="活动说明">
+                        <FormItem label="活动说明" prop="introduce">
                             <Input v-model="orderLearnInfo.introduce" type="textarea" :rows="6"></Input>
                         </FormItem>
                     </Form>
@@ -54,6 +55,7 @@
             </div>
             <div class="order-learn-main dark-iview-split">
                 <Split v-model="split1">
+                    <!-- 学习阶段列表 -->
                     <div slot="left" class="learn-step-wrap">
                         <div class="base-info-label">
                             <span>
@@ -73,8 +75,12 @@
                                 <Icon type="ios-pricetags" color="white" style="margin-right:8px;" />
                                 <span class="learn-step-name">{{row.name}}</span>
                             </template>
+                            <template slot-scope="{ row, index }" slot="action">
+                                <Icon type="md-create" color="white" class="edit-step-name-icon" @click="editSName(index)" />
+                            </template>
                         </Table>
                     </div>
+                    <!-- 学习资源区域 -->
                     <div slot="right" class="learn-content-wrap">
                         <div class="base-info-label">
                             学习资源
@@ -91,12 +97,13 @@
                                 </div>
                             </div>
                         </div>
+                        <!-- 选择学习资源 -->
                         <div v-if="orderLearnInfo.steps.length !== 0" :class="currentView == 1 ? 'animated faster fadeInLeft choose-learn-content-wrap':'animated fadeOutRight choose-learn-content-wrap'">
                             <div class="create-learn-content">
                                 <span :class="currentCreateType == 0 ? 'active-span':''" @click="selectCreateType(0)">选择已建自学内容</span>
                                 <span :class="currentCreateType == 1 ? 'active-span':''" @click="selectCreateType(1)">临时创建自学内容</span>
                             </div>
-                            <ChooseContent v-show="currentCreateType == 1" :class="currentCreateType == 1 ? 'animated fadeIn':''" style="margin-top:10px;height:calc(100% - 50px);" @on-select-question="getSelectedQuestion" @on-cancel-file="cancelFile" @on-select-file="getSelectFile"></ChooseContent>
+                            <ChooseContent ref="chooseContent" v-show="currentCreateType == 1" :class="currentCreateType == 1 ? 'animated fadeIn':''" style="margin-top:10px;height:calc(100% - 50px);" @on-select-question="getSelectedQuestion" @on-cancel-file="cancelFile" @on-select-file="getSelectFile"></ChooseContent>
                             <ManageUnit :type="0" v-show="currentCreateType == 0" :class="currentCreateType == 0 ? 'animated fadeIn':''" @chooseUnit="chooseUnit"></ManageUnit>
                             <Poptip padding="0px 0px" offset="10" placement="top-end" width="300" trigger="hover" :class="shoppingCarClass">
                                 <Badge type="success" :count="getContentLength.total" show-zero :offset="[-3,-3]" style="margin-top:10px;cursor:pointer;" @mouseenter.native="changeActive($event)" @mouseleave.native="removeActive($event)">
@@ -122,18 +129,20 @@
                             </Poptip>
                         </div>
                         <NoData v-if="orderLearnInfo.steps.length == 0" style="margin-top:100px;"></NoData>
+                        <!-- 查看已选择资源 -->
                         <div v-if="orderLearnInfo.steps.length !== 0" :class="currentView == 0 ? 'animated faster fadeInLeft preview-learn-content-wrap':'animated fadeOutRight preview-learn-content-wrap'">
-                            <p class="content-type-label">内容:{{orderLearnInfo.steps[stepIndex].resource.length}}个</p>
-                            <div class="content-file-wrap">
-                                <NoData style="margin-top:30px;" v-if="orderLearnInfo.steps[stepIndex].resource.length == 0"></NoData>
-                                <p v-for="(item,index) in orderLearnInfo.steps[stepIndex].resource">{{item.fileName}}</p>
-                            </div>
-                            <p class="content-type-label">题目:{{orderLearnInfo.steps[stepIndex].item.length}}道</p>
-                            <div class="content-question-wrap">
-                                <NoData v-if="orderLearnInfo.steps[stepIndex].item.length == 0" style="margin-top:30px;"></NoData>
-                                <QuestionList v-else :questions="orderLearnInfo.steps[stepIndex].item"></QuestionList>
-                            </div>
-
+                            <vuescroll>
+                                <p class="content-type-label">内容:{{orderLearnInfo.steps[stepIndex].resource.length}}个</p>
+                                <div class="content-file-wrap">
+                                    <NoData style="margin-top:30px;" v-if="orderLearnInfo.steps[stepIndex].resource.length == 0"></NoData>
+                                    <p v-for="(item,index) in orderLearnInfo.steps[stepIndex].resource" class="content-file-item">{{item.fileName}}</p>
+                                </div>
+                                <p class="content-type-label">题目:{{orderLearnInfo.steps[stepIndex].item.length}}道</p>
+                                <div class="content-question-wrap">
+                                    <NoData v-if="orderLearnInfo.steps[stepIndex].item.length == 0" style="margin-top:30px;"></NoData>
+                                    <QuestionList v-else :questions="orderLearnInfo.steps[stepIndex].item"></QuestionList>
+                                </div>
+                            </vuescroll>
                         </div>
                     </div>
                 </Split>
@@ -147,6 +156,13 @@
             <span>名称:</span>
             <Input v-model="newStepName" placeholder="请输入名称..." style="width: calc(100% - 50px);" />
         </Modal>
+        <Modal v-model="editStepStatus"
+               title="修改名称"
+               class="dark-iview-modal dark-iview-input"
+               @on-ok="confirmEditStep">
+            <span>名称:</span>
+            <Input v-model="editStepName" placeholder="请输入名称..." style="width: calc(100% - 50px);" />
+        </Modal>
         <Modal v-model="goToManageStatus"
                title="管理编序式自主学习活动"
                ok-text="是"
@@ -170,6 +186,7 @@
         },
         data() {
             return {
+                
                 goToManageStatus: false,
                 demoLoginInfo: {
                     user: 'admin',
@@ -178,8 +195,10 @@
                     schoolCode: 'HBCN'
                 },
                 shoppingCarClass: 'question-shopping-car',
-                newStepName:'',
+                newStepName: '',
+                editStepName: '',
                 addStepStatus: false,
+                editStepStatus: false,
                 currentView: 0,
                 split1: 0.2,
                 currentCreateType: 0,
@@ -190,6 +209,12 @@
                         title: '',
                         slot: 'name',
                         ellipsis: true
+                    },
+                    {
+                        title: '',
+                        slot: 'action',
+                        width: 50,
+                        align:'right'
                     }
                 ],
                 orderLearnInfo: {
@@ -202,7 +227,24 @@
                     introduce: '',
                     type:'',
                     steps: []
-                }
+                },
+                ruleValidate: {
+                    name: [
+                        { required: true, message: '请完善活动名称', trigger: 'change' }
+                    ],
+                    periodCode: [
+                        { required: true, message: '请选择学段', trigger: 'change' }
+                    ],
+                    subjectCode: [
+                        { required: true, message: '请选择学科', trigger: 'change' }
+                    ],
+                    isOrder: [
+                        { required: true, message: '请选择模式', trigger: 'change' }
+                    ],
+                    introduce: [
+                        { required: true, message: '请完善说明信息', trigger: 'change' }
+                    ]
+                },
             }
         },
         created() {
@@ -232,6 +274,21 @@
             }
         },
         methods: {
+            /**
+             * 确认修改学习阶段名称
+             * @param index
+             */
+            confirmEditStep() {
+                this.orderLearnInfo.steps[this.stepIndex].name = this.editStepName
+            },
+            /**
+             * 编辑学习阶段名称
+             * @param index
+             */
+            editSName(index) {
+                this.editStepName = this.orderLearnInfo.steps[index].name
+                this.editStepStatus = true
+            },
             confirmToManage() {
                 this.$router.push({
                     name: 'manageOrderLearn'
@@ -262,25 +319,38 @@
                 )
                 this.newStepName = ''
             },
+            checkData() {
+                let flag = true
+                this.$refs.orderLearnInfo.validate((valid) => {
+                    if (!valid) {
+                        flag = false
+                    }
+                })
+                return flag
+            },
             saveData() {
-                this.orderLearnInfo.creator = this.demoLoginInfo.TEAMModelId
-                this.orderLearnInfo.scopeCode = this.demoLoginInfo.TEAMModelId
-                this.orderLearnInfo.type = '1'//教学情境
-                this.$api.learnActivity.SaveOrderLearn(this.orderLearnInfo).then(
-                    res => {
-                        if (res.error == null) {
-                            this.orderLearnInfo.id = res.result.data.id
-                            //this.$Message.success('数据保存成功!')
-                            this.goToManageStatus = true
-                        } else {
-                            this.$Message.error('API ERROR!')
-                        }
-                    },
-                    err => {
+                let check = this.checkData()
+                if (check) {
+                    this.orderLearnInfo.creator = this.demoLoginInfo.TEAMModelId
+                    this.orderLearnInfo.scopeCode = this.demoLoginInfo.TEAMModelId
+                    this.orderLearnInfo.type = '1'//教学情境
+                    this.$api.learnActivity.SaveOrderLearn(this.orderLearnInfo).then(
+                        res => {
+                            if (res.error == null) {
+                                this.orderLearnInfo.id = res.result.data.id
+                                //this.$Message.success('数据保存成功!')
+                                this.goToManageStatus = true
+                            } else {
+                                this.$Message.error('API ERROR!')
+                            }
+                        },
+                        err => {
 
-                    }
-                )
-                console.log(this.orderLearnInfo)
+                        }
+                    )
+                } else {
+                    this.$Message.error('请先完善信息,再保存!')
+                }
             },
             getSelectedQuestion(data) {
                 this.orderLearnInfo.steps[this.stepIndex].item.push(data.question)
@@ -316,6 +386,9 @@
             getCurrentItem(row, index) {
                 this.stepIndex = index
                 this.currentView = 0
+                console.log('-1-1-1-')
+                console.log(this.$refs.chooseContent)
+                this.$refs.chooseContent.refreshData()
             },
             dragOrder(index1, index2) {
                 if (index1 > index2) {
@@ -418,4 +491,8 @@
     .learn-step-wrap .ivu-table-row-highlight {
         background-image: linear-gradient(90deg, rgba(30, 30, 30, 0) 0%, rgba(110, 110, 110, 0.2) 50%, rgba(110, 110, 110, 0.4) 100%);
     }
+    .learn-step-wrap .ivu-table-row-hover .edit-step-name-icon{
+        display:inline-block;
+    }
+    
 </style>

+ 25 - 21
TEAMModelOS/ClientApp/src/view/selflearning/ManageOrderLearn.vue

@@ -108,32 +108,36 @@
                                         </div>
                                     </div>
                                 </div>
-                                <div slot="right" style="padding-left:18px;">
+                                <div slot="right" style="padding-left:18px;height:100%;">
                                     <div class="order-learn-main-label">
                                         自学内容
                                     </div>
-                                    <p class="order-learn-content-label">
-                                        内容:{{orderLearnList.length == 0 ? 0 : orderLearnList[currentLearnIndex].steps[currentStepIndex].resource.length}}
-                                    </p>
-                                    <div style="margin-bottom:30px;">
-                                        <NoData v-if="orderLearnList.length == 0"></NoData>
-                                        <div v-if="orderLearnList.length > 0" class="order-learn-file-item">
-                                            <NoData v-if="orderLearnList[currentLearnIndex].steps[currentStepIndex].resource.length == 0"></NoData>
-                                            <p v-for="(item,index) in orderLearnList[currentLearnIndex].steps[currentStepIndex].resource">
-                                                {{item.fileName}}
+                                    <div style="height:calc(100% - 45px);">
+                                        <vuescroll>
+                                            <p class="order-learn-content-label">
+                                                内容:{{orderLearnList.length == 0 ? 0 : orderLearnList[currentLearnIndex].steps[currentStepIndex].resource.length}}
                                             </p>
-                                        </div>
+                                            <div style="margin-bottom:30px;">
+                                                <NoData v-if="orderLearnList.length == 0"></NoData>
+                                                <div v-if="orderLearnList.length > 0" class="order-learn-file-item">
+                                                    <NoData v-if="orderLearnList[currentLearnIndex].steps[currentStepIndex].resource.length == 0"></NoData>
+                                                    <p v-for="(item,index) in orderLearnList[currentLearnIndex].steps[currentStepIndex].resource">
+                                                        {{item.fileName}}
+                                                    </p>
+                                                </div>
 
-                                    </div>
-                                    <p class="order-learn-content-label">
-                                        题目:{{orderLearnList.length == 0 ? 0 : orderLearnList[currentLearnIndex].steps[currentStepIndex].item.length}}
-                                    </p>
-                                    <div>
-                                        <NoData v-if="orderLearnList.length == 0"></NoData>
-                                        <div v-if="orderLearnList.length > 0" class="order-learn-file-item">
-                                            <NoData v-if="orderLearnList[currentLearnIndex].steps[currentStepIndex].item.length == 0"></NoData>
-                                            <QuestionList :questions="orderLearnList[currentLearnIndex].steps[currentStepIndex].item"></QuestionList>
-                                        </div>
+                                            </div>
+                                            <p class="order-learn-content-label">
+                                                题目:{{orderLearnList.length == 0 ? 0 : orderLearnList[currentLearnIndex].steps[currentStepIndex].item.length}}
+                                            </p>
+                                            <div>
+                                                <NoData v-if="orderLearnList.length == 0"></NoData>
+                                                <div v-if="orderLearnList.length > 0" class="order-learn-file-item">
+                                                    <NoData v-if="orderLearnList[currentLearnIndex].steps[currentStepIndex].item.length == 0"></NoData>
+                                                    <QuestionList :questions="orderLearnList[currentLearnIndex].steps[currentStepIndex].item"></QuestionList>
+                                                </div>
+                                            </div>
+                                        </vuescroll>
                                     </div>
                                 </div>
                             </Split>

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

@@ -294,7 +294,7 @@
         methods: {
             // 获取学情首页数据
             getHomePageData() {
-                this.$api.totalAnalysis.getHomePageData({ Code: 'qcs' }).then(res => { // api请求
+                this.$api.totalAnalysis.getHomePageData({ schoolCode: 'qcs',scopeCode: 'qcs' }).then(res => { // api请求
                     this.gradeList.push(res.result.data)
                     this.geniusLineData = res.result.data
                     console.log(res.result.data)
@@ -305,7 +305,7 @@
 
             // 获取评测列表
             getExamList() {
-                this.$api.totalAnalysis.getExamList({ Code: 'qcs' }).then(res => { // api请求
+                this.$api.totalAnalysis.getExamList({ schoolCode: 'qcs',scopeCode: 'qcs' }).then(res => { // api请求
                     this.examList = res.result.data
                     this.originList = res.result.data
                     this.searchList = this.examList.length ? this.examList.map(item => item.name) : []

+ 36 - 21
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -450,7 +450,7 @@ namespace TEAMModelOS.Controllers.Analysis
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             List<Dictionary<string, object>> scatterAnalysis = new List<Dictionary<string, object>>();
             //Dictionary<string, object> scatterAnalysis = new Dictionary<string, object>();
-            List<SimpleExam> exams = await azureCosmosDBRepository.FindByDict<SimpleExam>(request.@params);
+            List<ExamResult> exams = await azureCosmosDBRepository.FindByDict<ExamResult>(request.@params);
             Dictionary<string, object> stuMap = new Dictionary<string, object>
             {
                 { "schoolCode", "Habook" }
@@ -474,9 +474,9 @@ namespace TEAMModelOS.Controllers.Analysis
             if (exams.IsNotEmpty())
             {
                 //提取班级信息
-                List<Dictionary<string, int[]>> classToName = exams[0].Classes;
+                List<Dictionary<string, int[]>> classToName = exams[0].classes;
                 //提取学生ID信息
-                List<string> idToName = exams[0].Ids;
+                List<string> idToName = exams[0].ids;
                 exams.ForEach(e =>
                 {
                     Dictionary<string, object> detail = new Dictionary<string, object>
@@ -486,10 +486,10 @@ namespace TEAMModelOS.Controllers.Analysis
                     List<List<string>> datas = new List<List<string>>();
                     Dictionary<string, object> subject = new Dictionary<string, object>
                     {
-                        { "name", e.Subject }
+                        { "name", e.subjectCode }
                     };
-                    double[] point = StringHelper.ListTodouble(e.Point);
-                    double[,] result = StringHelper.ListToDouble(e.Result);
+                    double[] point = StringHelper.ListTodouble(e.point);
+                    double[,] result = StringHelper.ListToDouble(e.result);
                     try
                     {
                         var cdm = new ClouDASMatrix(result, point);
@@ -504,16 +504,16 @@ namespace TEAMModelOS.Controllers.Analysis
                         //需小心的题型
                         List<int[]> careful = cdm.CarefulTopic;
                         int i = 0;
-                        for (int k = e.Ids.Count - 1; k >= 0; k--)
+                        for (int k = e.ids.Count - 1; k >= 0; k--)
                         {
-                            if (e.Ids[k].Equals("0"))
+                            if (e.ids[k].Equals("0"))
                             {
-                                e.Ids.Remove(e.Ids[k]);
+                                e.ids.Remove(e.ids[k]);
                             }
                         }
-                        e.Ids.ForEach(s =>
+                        e.ids.ForEach(s =>
                         {
-                            if (e.Result[i].Sum() != 0)
+                            if (e.result[i].Sum() != 0)
                             {
                                 List<string> info = new List<string>
                                 {
@@ -522,11 +522,11 @@ namespace TEAMModelOS.Controllers.Analysis
                                     sta[i].ToString(),
                                     pass[i].ToString(),
                                     i + 1 + "",
-                                    e.Result[i].Sum().ToString()
+                                    e.result[i].Sum().ToString()
                                 };
                                 int right = 0;
                                 int wrong = 0;
-                                foreach (int p in e.Result[i])
+                                foreach (int p in e.result[i])
                                 {
                                     if (p > 0)
                                     {
@@ -568,7 +568,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     catch (Exception ex)
                     {
                         builder.Data(exams);
-                        Console.WriteLine("---------------------" + ex.Message + "--------------------------");
+                        //Console.WriteLine("---------------------" + ex.Message + "--------------------------");
                     }
 
                 });
@@ -801,9 +801,12 @@ namespace TEAMModelOS.Controllers.Analysis
             request.@params.TryGetValue("subjectCode", out object subjectCode);
             request.@params.TryGetValue("schoolCode", out object schoolCode);
             request.@params.TryGetValue("examCode", out object examCode);
+            request.@params.TryGetValue("scopeCode", out object scopeCode);
             Dictionary<string, object> sub = new Dictionary<string, object>
             {
-                { "subjectCode",  subjectCode.ToString()}
+                { "subjectCode",  subjectCode.ToString()},
+                { "scopeCode",scopeCode.ToString()}
+                
             };
             Dictionary<string, object> examMap = new Dictionary<string, object>
             {
@@ -827,7 +830,7 @@ namespace TEAMModelOS.Controllers.Analysis
             List<Dictionary<string, int[]>> classes = new List<Dictionary<string, int[]>>();
             List<string> ids = new List<string>();
             //string Type = "";
-            if (request.@params.TryGetValue("Type",out object Type))
+            if (request.@params.TryGetValue("type",out object Type))
             {
                 paper.ForEach(p =>
                 {
@@ -992,7 +995,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 paper.ForEach(p =>
                 {
                     int n = 0;
-                    if (request.@params.TryGetValue("Type", out object Type)) {
+                    if (request.@params.TryGetValue("type", out object Type)) {
                         p.item.ForEach(i =>
                         {
                             if (i.field.Contains(knowledgeName[k]))
@@ -1059,7 +1062,7 @@ namespace TEAMModelOS.Controllers.Analysis
                         double po = 0;
                         p.item.ForEach(i =>
                         {
-                            if (request.@params.TryGetValue("Type", out object Type))
+                            if (request.@params.TryGetValue("type", out object Type))
                             {
                                 if (i.field.Contains(knowledgeName[k]))
                                 {
@@ -1161,7 +1164,7 @@ namespace TEAMModelOS.Controllers.Analysis
 
                                 p.item.ForEach(i =>
                                 {
-                                    if (request.@params.TryGetValue("Type", out object Type))
+                                    if (request.@params.TryGetValue("type", out object Type))
                                     {
                                         if (i.field.Contains(knowledgeName[k]))
                                         {
@@ -1247,10 +1250,22 @@ namespace TEAMModelOS.Controllers.Analysis
         public async Task<BaseJosnRPCResponse> HomeStatistics(JosnRPCRequest<Dictionary<string, object>> request)
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
+
+            //request.@params.TryGetValue("subjectCode", out object subjectCode);
+            request.@params.TryGetValue("schoolCode", out object schoolCode);
+            request.@params.TryGetValue("scopeCode", out object scopeCode);
+            Dictionary<string, object> eMap = new Dictionary<string, object>
+            {
+                { "scopeCode",  scopeCode.ToString()}
+            };
+            Dictionary<string, object> SCMap = new Dictionary<string, object>
+            {
+                { "schoolCode", schoolCode.ToString()},
+            };
             //说明 同学校、同类型考试数据
-            List<ExamInfo> exams = await azureCosmosDBRepository.FindByDict<ExamInfo>(request.@params);
+            List<ExamInfo> exams = await azureCosmosDBRepository.FindByDict<ExamInfo>(eMap);
             //查询学校对应的年级信息
-            List<School> schools = await azureCosmosDBRepository.FindByDict<School>(request.@params);
+            List<School> schools = await azureCosmosDBRepository.FindByDict<School>(SCMap);
             HashSet<string> classList = new HashSet<string>();
             HashSet<string> subjectList = new HashSet<string>();
             List<List<List<string>>> AllPoint = new List<List<List<string>>>();