Prechádzať zdrojové kódy

Merge branch 'develop' into develop-rc

CrazyIter_Bin 2 rokov pred
rodič
commit
2e3f0bb43f

+ 95 - 0
TEAMModelBI/ClientApp/src/view/product/index.vue

@@ -125,6 +125,10 @@
         </div>
         <div class="middlebox-right">
           <div class="middlebox-right-title">共有<span class="middlebox-right-num">45</span>条数据</div>
+          <div class="exportbtn">
+            <el-button type="success" plain @click="exportstate=true">导出数据到Execl</el-button>
+            <!-- <el-button type="success" plain disabled>导出数据到Execl</el-button> -->
+          </div>
         </div>
       </div>
     </div>
@@ -139,6 +143,35 @@
   <div v-else-if="showState==='details'">
     <Details @myback="changStateshow"></Details>
   </div>
+  <div class="dialog-filter" v-if="exportstate">
+    <el-dialog v-model="exportstate" title="筛选导出" width="35%">
+      <el-checkbox-group v-model="checkList">
+        <div class="selectbox-ck">
+          <div class="check-selectbox-item" v-for="(item,index) in  exportStandard" :key="index">
+            <el-checkbox :label="item.key">
+              <span>{{item.title}}:</span>
+              <el-select v-model="item.value" placeholder="请选择范围" filterable @blur="selectBlur($event)" clearable v-if="checkList.includes(item.key)">
+                <el-option v-for="(items,index) in item.option" :key="index" :label="items.name" :value="items.value">
+                </el-option>
+              </el-select>
+              <el-select v-model="item.value" placeholder="请选择范围" filterable disabled v-else-if="!checkList.includes(item.key)">
+                <el-option v-for="(items,index) in item.option" :key="index" :label="items.name" :value="items.value">
+                </el-option>
+              </el-select>
+            </el-checkbox>
+          </div>
+        </div>
+      </el-checkbox-group>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="exportstate = false">取消</el-button>
+          <el-button type="primary" @click="exportstate = false">
+            确认
+          </el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
 </template>
 <script setup>
 import option_cn from '@/static/regions/region_cn.json'
@@ -301,6 +334,39 @@ let province = function () {
 console.log(province, '省')
 /*地区相关配套json end*/
 let changeHight = ref(56)
+let exportstate = ref(false)
+let dataForm = ref({
+  newData: '',
+  selectOption: [
+    {
+      value: 'Option1',
+      label: 'Option1',
+    },
+    {
+      value: 'Option2',
+      label: 'Option2',
+    },
+    {
+      value: 'Option3',
+      label: 'Option3',
+    },
+    {
+      value: 'Option4',
+      label: 'Option4',
+    },
+    {
+      value: 'Option5',
+      label: 'Option5',
+    },
+  ]
+})
+let checkList = ref([])
+let exportStandard = ref([
+  { title: '参与人次', value: 0, key: 'personnum', option: [{ name: '小于50', value: '50' }, { name: '大于50,小于100', value: '50-100' }, { name: '大于100', value: '101' }, { name: '大于300', value: '301' }] },
+  { title: '授课时间', value: 0, key: 'classtime', option: [{ name: '小于等于45分钟', value: '45' }, { name: '大于45分钟,小于90分钟', value: '45-90' }, { name: '小于90分钟', value: '91' }] },
+  { title: 'T指标数', value: 0, key: 'Tnum', option: [{ name: '无绿灯', value: '0' }, { name: '单绿灯', value: '1' }, { name: '双绿灯', value: '2' }] },
+  { title: '授权类型', value: 0, key: 'powertype', option: [{ name: '全部', value: 'all' }, { name: '试用', value: 'test' }, { name: '已授权', value: 'power' }] },
+])
 function changeState (value) {
   console.log(value)
   showState.value = 'details'
@@ -309,6 +375,9 @@ function changStateshow (value) {
   console.log(value, '状态改变')
   showState.value = value
 }
+function selectBlur (e) {
+  dataForm.value.newData = e.target.value;
+}
 watch(activeNames, (newdata) => {
   if (newdata.length === 0) {
     changeHight.value = 80
@@ -316,6 +385,9 @@ watch(activeNames, (newdata) => {
     changeHight.value = 56
   }
 })
+watch(checkList, (newvalue) => {
+  console.log(newvalue)
+})
 </script>
 <style scoped>
 .productbox {
@@ -394,6 +466,8 @@ watch(activeNames, (newdata) => {
   font-size: 16px;
   line-height: 48px;
   padding-right: 1%;
+  display: flex;
+  flex-direction: row-reverse;
 }
 .middlebox-right-num {
   font-size: 18px;
@@ -415,6 +489,23 @@ watch(activeNames, (newdata) => {
   padding-left: 1%;
   text-align: left;
 }
+.exportbtn {
+  margin-right: 2%;
+}
+.selectbox-ck {
+  width: 100%;
+  padding: 2%;
+  display: flex;
+  flex-wrap: wrap;
+  overflow: hidden;
+}
+.check-selectbox-item {
+  padding: 0.5% 1%;
+  margin-top: 2%;
+  box-shadow: 0 2px 5px #e9e9e9;
+  width: 50%;
+  border: 1px solid #e9e9e9;
+}
 </style>
 <style>
 .data-tables .header-class,
@@ -441,4 +532,8 @@ watch(activeNames, (newdata) => {
   font-size: 16px;
   padding-left: 0.5%;
 }
+.dialog-filter .el-dialog__header,
+.dialog-filter .el-dialog__footer {
+  line-height: 60px;
+}
 </style>

+ 5 - 3
TEAMModelOS.SDK/Models/Service/Common/SyllabusService.cs

@@ -28,7 +28,7 @@ namespace TEAMModelOS.SDK.Services
         /// <param name="pid"></param>
         /// <param name="newNodes"></param>
         /// <returns></returns>
-        public async static Task<(List<List<IdCode>> idCodes, List<SyllabusTreeNode> tree)> ImportSyllabus(List<List<string>> nodes,string volumeId,string scope ,string code,string creatorId ,string creatorName, AzureCosmosFactory azureCosmos, bool ignoreCharacter = true) { 
+        public async static Task<(List<List<IdCode>> idCodes, List<SyllabusTreeNode> tree)> ImportSyllabus(List<List<string>> nodes,string volumeId,string scope ,string code,string creatorId ,string creatorName,string grant_type, AzureCosmosFactory azureCosmos, bool ignoreCharacter = true) { 
             HashSet<Syllabus> syllabuses= new HashSet<Syllabus>();
             string tbname = scope.Equals("school", StringComparison.OrdinalIgnoreCase) ? Constant.School : Constant.Teacher;
             await foreach (var item in azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).GetItemQueryIterator<Syllabus>(queryText: $"select value(c) from c where c.volumeId='{volumeId}'",
@@ -142,13 +142,15 @@ namespace TEAMModelOS.SDK.Services
                     volume.syllabusIds.Add(chapter.id);
                     volumeChange = true;
                 }
-                await azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).UpsertItemAsync(chapter);
+                if (!string.IsNullOrWhiteSpace(grant_type) && grant_type.Equals("upsert")) {
+                    await azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).UpsertItemAsync(chapter);
+                }
                 List<SyllabusTree> trees = SyllabusService.ListToTree(chapter.children);
                 SyllabusTreeNode tree = new SyllabusTreeNode() { id = chapter.id, scope = chapter.scope, trees = trees, volumeId = chapter.volumeId, auth = chapter.auth, codeval = code };
                 treeNodes.Add(tree);
 
             }
-            if (volumeChange)
+            if (volumeChange && !string.IsNullOrWhiteSpace(grant_type) && grant_type.Equals("upsert"))
             {
                 await azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).ReplaceItemAsync(volume, volume.id, new PartitionKey(volume.code));
             }

+ 2 - 1
TEAMModelOS/ClientApp/public/index.html

@@ -21,7 +21,8 @@
 		const navLang = curLang || navigator.language.toLowerCase()
 		const localLang = (navLang === 'zh' || navLang === 'zh-tw' || navLang === 'zh-cn' || navLang === 'zh-hk') ? navLang : false
 		const lang = localLang || 'en-us'
-		const langJsUrl = 'https://' + window.location.host + '/lang/' + lang + '.js'
+		const timestamp = new Date().getTime()
+		const langJsUrl = 'https://' + window.location.host + '/lang/' + lang + '.js?t=' + timestamp
 		document.write('<script  src="' + langJsUrl + '"><\/script>')
 		// 公式MathJax配置
 		MathJax = {

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -1160,7 +1160,7 @@ const LANG_EN_US = {
         confirmAdd: 'Confirm Add',
         cancelAdd: 'Cancel Add',
         createList: 'Create Customized Class',
-        name: 'Name: ',
+        name: 'Name ',
         nameHolder: 'Please enter list name...',
         nameRepeat: 'The customized class name is duplicated',
         pdHolder: 'Please set the school system',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -5656,6 +5656,7 @@ const LANG_ZH_CN = {
             policy: '政策文件',
             research: '课例数据',
             toSokrates: '苏格拉底管理',
+            toSokrates2: '苏格拉底',
             researchBoard: '数据看板',
             cusVideos: '课例数据',
             cusVideoMgt: '课堂记录管理',

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -1160,7 +1160,7 @@ const LANG_ZH_TW = {
         confirmAdd: '確認新增',
         cancelAdd: '取消新增',
         createList: '新增選課班',
-        name: '名稱',
+        name: '名稱 ',
         nameHolder: '請輸入名單名稱…',
         nameRepeat: '選課班名稱重複',
         pdHolder: '請設定學段',

+ 1 - 0
TEAMModelOS/ClientApp/src/components/evaluation/ExerciseList.vue

@@ -231,6 +231,7 @@ export default {
   methods: {
     getScatterData() {
       let analysisJson = JSON.parse(JSON.stringify(this.getAnalysisJson))
+      if (!analysisJson) return
       let curSubjectIndex = analysisJson.subjects.map(i => i.name).indexOf(this.$store.state.totalAnalysis
         .currentSubject)
       let result = []

+ 5 - 2
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseSingleStuScatter.vue

@@ -67,6 +67,9 @@ export default {
                        `
           }
         },
+        grid: {
+          left: 40
+        },
         legend: {
           data: [_this.$t('totalAnalysis.sca_text4')]
         },
@@ -307,19 +310,19 @@ export default {
     stuData: {
       handler(n, o) {
         if (n) {
+          this.scatterData = this.scatterData.filter(i => i.id !== n.id)
+          this.scatterData.push(this.stuData)
           this.stuId = n.id
           this.drawLine(this.renderData(this.scatterData))
         }
       },
       deep: true,
       immediate: true,
-
     },
     scatterData: {
       deep: true,
       immediate: true,
       handler(val) {
-        console.error(val)
         if (val.length) {
           this.drawLine(this.renderData(val)) // 获取最新落点图数据 进行渲染
         } else {

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Homework.vue

@@ -182,7 +182,7 @@
                                                                     </li>
                                                                 </div>
                                                             </div>
-                                                            <Progress :percent="item.progress" status="active" stroke-color="#7CB7F5" />
+                                                            <Progress v-show="isUpload" :percent="item.progress" status="active" stroke-color="#7CB7F5" />
                                                         </div>
                                                     </i-col>
                                                 </Row>

+ 7 - 5
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReportCharts/BaseScatter.vue

@@ -60,11 +60,13 @@ export default {
             height: '150px'
           },
           formatter: function (params) {
-            const item = params
-            return `${_this.$t('totalAnalysis.base_name')}:${item.data[2]}
-                        <br/>${_this.$t('totalAnalysis.sca_chart_text1')}:${item.data[1]}%
-                        <br/>${_this.$t('totalAnalysis.sca_chart_text2')}:${item.data[0]}
-                       `
+            if(params.data[4] === _this.$store.state.userInfo.sub) {
+              const item = params
+              return `${_this.$t('totalAnalysis.base_name')}:${item.data[2]}
+                          <br/>${_this.$t('totalAnalysis.sca_chart_text1')}:${item.data[1]}%
+                          <br/>${_this.$t('totalAnalysis.sca_chart_text2')}:${item.data[0]}
+                        `
+            }
           }
         },
         // toolbox: {

+ 5 - 0
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue

@@ -363,10 +363,15 @@
                                 // 处理落点图所需数据
                                 let subjectScatter = []
                                 res.subjectScatter.forEach(item => {
+                                    let myScatter = undefined
                                     let scatter = item.value.map(value => {
                                         value.value.id = value.key
+                                        if(value.value.id === this.userInfo.sub) myScatter = value.value
                                         return value.value
                                     })
+                                    // 由于多个学生相同,会导致当前学生被遮挡,因此将他放在最后渲染
+                                    scatter = scatter.filter(i => i.id !== this.userInfo.sub)
+                                    scatter.push(myScatter)
                                     subjectScatter.push(scatter)
                                 })
                                 this.stuData = res

+ 1 - 1
TEAMModelOS/ClientApp/src/view/research-center/ResearchMgtOld.vue

@@ -332,7 +332,7 @@ export default {
           type: '>='
         },
         {
-          name: this.$t('lessonRecord.examCount'),
+          name: this.$t('lessonRecord.examQuizCount'),
           key: 'examCount',
           val: 0,
           unit: 'count',

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

@@ -88,8 +88,10 @@
       </div>
       <StuReport :stuData="viewStuData" :classId="chooseClass" :examInfo="examInfo" :subject="chooseSubject"></StuReport>
       <BaseSingleStuScatter :scatterData="tableData" :stuData="viewStuData"></BaseSingleStuScatter>
-      <!-- <p>需小心题号:{{ viewStuData.carefulList }}</p> -->
-      <!-- <p>需努力题号:{{ viewStuData.hardList }}</p> -->
+      <div style="margin-left:30px;color:red;font-size:16px">
+        <p>{{ $t('totalAnalysis.sca_table_text4') }}:{{ viewStuData.carefulList }}</p>
+        <p>{{ $t('totalAnalysis.sca_table_text3') }}:{{ viewStuData.hardList }}</p>
+      </div>
     </Modal>
   </div>
 </template>

+ 94 - 8
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue

@@ -99,7 +99,7 @@
         </div>
         <div class="syllabus-tree-box">
           <EmptyData v-if="!treeOrigin.length"></EmptyData>
-          <Tree ref="treeRef" :treeData="treeOrigin" :volume="curVolume" :editable="hasSyllabusAuth || hasEditAuth(curNode)" @onNodeClick="onNodeClick" @doShare="doShare" @addModifyId="addModifyId" v-else></Tree>
+          <ElTree ref="treeRef" :treeData="treeOrigin" :volume="curVolume" :editable="hasSyllabusAuth || hasEditAuth(curNode)" @onNodeClick="onNodeClick" @doShare="doShare" @addModifyId="addModifyId" v-else></ElTree>
         </div>
       </div>
       <!-- 右边资源部分 -->
@@ -212,6 +212,18 @@
         <p>{{ $t('syllabus.importTip4') }}</p>
       </div>
     </Modal>
+    <!--汇入预览-->
+    <Modal v-model="importPreviewModal" width="800" class="add-volume-modal">
+      <div class="modal-header" slot="header">
+        <span>导入预览</span>
+      </div>
+      <p style="color:red;margin: -20px 0 10px 20px">* 温馨提示:请检查您导入的课纲数据是否与以下结构符合,如不符合请调整后重新导入</p>
+      <Tree :data="previewTree"></Tree>
+      <div slot="footer" align="center">
+        <Button class="btn" size="default" type="default" @click="doConfirmImport('cancel')" :disabled="isImporting">取消导入</Button>
+        <Button class="btn" size="default" type="primary" @click="doConfirmImport('ok')" :loading="isImporting">确认导入</Button>
+      </div>
+    </Modal>
     <!--上传文件-->
     <Modal v-model="isUploadModal" width="800" footer-hide class="tree-modal add-volume-modal tree-upload-modal">
       <div class="modal-header" slot="header">
@@ -387,7 +399,7 @@
 <script>
 import draggable from "vuedraggable"
 import BlobTool from '@/utils/blobTool.js'
-import Tree from "@/components/syllabus/DragTree";
+import ElTree from "@/components/syllabus/DragTree";
 import InviteTeacher from "@/components/syllabus/InviteTeacher";
 import ChooseContent from '@/components/selflearn/NewChooseContent'
 import ExerciseList from '@/components/evaluation/ExerciseList.vue'
@@ -396,13 +408,16 @@ import excel from '@/utils/excel.js'
 export default {
   components: {
     draggable,
-    Tree,
+    ElTree,
     InviteTeacher,
     ChooseContent,
     ExerciseList
   },
   data() {
     return {
+      importNodes: null,
+      excelData: null,
+      previewTree: null,
       tabResources: [],
       importPercent: 0,
       isImporting: false,
@@ -413,6 +428,7 @@ export default {
       isCopyBtnLoading: false,
       isCopyModal: false,
       importModal: false,
+      importPreviewModal: false,
       isShareModal: false,
       selectedChapters: [],
       drag: false,
@@ -570,12 +586,28 @@ export default {
       this.isImporting = true
       this.readExcel(file, data => {
         this.importPercent = 20
-        let excelItemArr = []
+
         // 先获取模板中的节点数据(需要去重)
         let syllabusArr = [...new Set(data.results.map(i => i.Syllabus))].map(i => i.split('::'))
-        this.doSaveImportTree(syllabusArr).then(nodesResult => {
+        console.log(this.getPreviewTree({ nodes: syllabusArr }))
+        this.previewTree = this.getPreviewTree({ nodes: syllabusArr })
+        this.importNodes = syllabusArr
+        this.excelData = data
+        this.importPreviewModal = true
+        this.importModal = false
+        this.isImporting = false
+        return
+
+      })
+    },
+    doConfirmImport(type) {
+      if (type === 'ok') {
+        console.log(this.previewTree)
+        this.isImporting = true
+        let excelItemArr = []
+        this.doSaveImportTree(this.importNodes).then(nodesResult => {
           this.importPercent = 40
-          data.results.forEach(item => {
+          this.excelData.results.forEach(item => {
             let itemNode = nodesResult.codes.find(i => i.map(j => j.code).join('::') === item.Syllabus)
             excelItemArr.push({
               id: this.$tools.guid(),
@@ -602,7 +634,48 @@ export default {
             this.doSaveImportItems(excelItemArr, nodesResult.tree)
           })
         })
-      })
+      } else {
+        this.importPreviewModal = false
+        this.previewTree = null
+      }
+    },
+    getPreviewTree(obj) {
+      let temp = {
+        title: '',
+        expand: true,
+        children: []
+      }
+      for (let i = 0; i < obj.nodes.length; i++) {
+        let node = obj.nodes[i];
+        let parent = temp.children.find(child => child.title === node[0]);
+        if (!parent) {
+          parent = {
+            title: node[0],
+            expand: true,
+            children: []
+          };
+          temp.children.push(parent);
+        }
+        let child = parent.children.find(child => child.title === node[1]);
+        if (!child) {
+          child = {
+            title: node[1],
+            expand: true,
+            children: []
+          };
+          parent.children.push(child);
+        }
+        if (node[2]) {
+          let grandChild = child.children.find(child => child.title === node[2]);
+          if (!grandChild) {
+            grandChild = {
+              title: node[2]
+            };
+            child.children.push(grandChild);
+          }
+        }
+      }
+      return temp.children
     },
     /* 批量保存课纲节点 */
     doSaveImportTree(syllabusArr) {
@@ -611,7 +684,8 @@ export default {
           volumeId: this.curVolume.id,
           code: this.curVolume.code.replace('Volume-', ''),
           scope: this.curVolume.scope,
-          nodes: syllabusArr
+          nodes: syllabusArr,
+          grant_type: 'upsert'
         }).then((res) => {
           r(res)
         }).catch(e => {
@@ -677,6 +751,7 @@ export default {
           this.getVolumeList(true)
           this.importModal = false
           this.isImporting = false
+          this.importPreviewModal = false
           this.importPercent = 0
         }, 1000)
 
@@ -3040,6 +3115,17 @@ export default {
   padding: 10px 30px;
 }
 
+.add-volume-modal .ivu-tree {
+  max-height: 500px;
+  overflow: auto;
+  margin: 0 20px;
+
+  .ivu-tree-arrow,
+  .ivu-tree-title {
+    padding: 5px 0;
+  }
+}
+
 .choose-content-modal {
   .ev-list-container,
   .pl-container {

+ 5 - 5
TEAMModelOS/Controllers/Analysis/ArtAnalysisController.cs

@@ -193,7 +193,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 var students = stus.Select(s => new
                 {
                     id = s.sIds,
-                    s.scs.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x.subjectId) && x.subjectId.Equals(subjectId.GetString())).score,
+                    s.scs.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x.subjectId) && x.subjectId.Equals(subjectId.GetString()))?.score,
                     tchList.Where(t => t.id.Equals(s.sIds)).FirstOrDefault()?.name,
                     classId = s.cd,
                     className = examResults[0].classes.Where(c => c.id.Equals(s.cd)).FirstOrDefault()?.name,
@@ -209,7 +209,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     List<double> scores = new();
                     foreach (var member in cls.members)
                     {
-                        var sc = students.FirstOrDefault(s => s.id.Equals(member.id)).score;
+                        double sc = (double)students.FirstOrDefault(s => s.id.Equals(member.id)).score;
                         scores.Add(sc);
                         classTotal += sc;
                     }
@@ -239,9 +239,9 @@ namespace TEAMModelOS.Controllers.Analysis
                 {
                     id = x.gradeId,
                     name = perMore[int.Parse(x.gradeId)],
-                    score = Math.Round(x.list.Sum() / x.list.Count(),2),
-                    max = x.list.Max(s => Math.Abs(s)),
-                    min = x.list.Min(s => Math.Abs(s)),
+                    score = Math.Round((double)(x.list.Sum() / x.list.Count()), 2),
+                    max = x.list.Max(s => Math.Abs((double)s)),
+                    min = x.list.Min(s => Math.Abs((double)s)),
                     excellent = Math.Round( x.list.Where(s => s >= 90).Count() * 1.0 / x.list.Count(),2),
                     pass = Math.Round(x.list.Where(s => s >= 60).Count() * 1.0 / x.list.Count(), 2)
                 });

+ 3 - 1
TEAMModelOS/Controllers/Both/SyllabusController.cs

@@ -66,11 +66,13 @@ namespace TEAMModelOS.Controllers
             if (!request.TryGetProperty("volumeId", out JsonElement _volumeId)) return BadRequest();
             if (!request.TryGetProperty("scope", out JsonElement _scope)) return BadRequest();
             if (!request.TryGetProperty("code", out JsonElement _code)) return BadRequest();
+            //操作类型  preview  upsert
+            if (!request.TryGetProperty("grant_type", out JsonElement _grant_type)) return BadRequest();
             bool ignoreCharacter = false;
             if (request.TryGetProperty("ignoreCharacter", out JsonElement _ignoreCharacter)) {
                 ignoreCharacter = _ignoreCharacter.ValueKind.Equals(JsonValueKind.True)?true:false;
             }
-            (List<List<IdCode>> idCodes, List<SyllabusTreeNode> tree) data =  await  SyllabusService.ImportSyllabus(nodes, $"{_volumeId}", $"{_scope}", $"{_code}", userid, name,_azureCosmos,ignoreCharacter);
+            (List<List<IdCode>> idCodes, List<SyllabusTreeNode> tree) data =  await  SyllabusService.ImportSyllabus(nodes, $"{_volumeId}", $"{_scope}", $"{_code}", userid, name,$"{_grant_type}",_azureCosmos,ignoreCharacter);
             return Ok(new {codes= data.idCodes, data.tree });
         }
         /// <summary>

+ 1 - 1
TEAMModelOS/Controllers/Common/ArtController.cs

@@ -752,7 +752,7 @@ namespace TEAMModelOS.Controllers.Common
                     var classes = art.classes.Select(c => new
                     {
                         id = c,
-                        groups.Where(g => g.id.Equals(c)).FirstOrDefault().name
+                        groups.Where(g => g.id.Equals(c)).FirstOrDefault()?.name
                     });
                     rmembers.ForEach(x =>
                     {

+ 16 - 14
TEAMModelOS/Startup.cs

@@ -110,20 +110,22 @@ namespace TEAMModelOS
 
 
             services.AddHttpClient();
-            services.AddHttpClient<DingDing>().ConfigureHttpMessageHandlerBuilder(builder =>
-            {
-                builder.PrimaryHandler = new HttpClientHandler
-                {
-                    ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
-                };
-            });  
-            services.AddHttpClient<CoreAPIHttpService>().ConfigureHttpMessageHandlerBuilder(builder =>
-            {
-                builder.PrimaryHandler = new HttpClientHandler
-                {
-                    ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
-                };
-            });  
+            services.AddHttpClient<DingDing>();
+            //    .ConfigureHttpMessageHandlerBuilder(builder =>
+            //{
+            //    builder.PrimaryHandler = new HttpClientHandler
+            //    {
+            //        ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
+            //    };
+            //});  
+            services.AddHttpClient<CoreAPIHttpService>();
+            //    .ConfigureHttpMessageHandlerBuilder(builder =>
+            //{
+            //    builder.PrimaryHandler = new HttpClientHandler
+            //    {
+            //        ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
+            //    };
+            //});  
             services.AddHttpClient<HttpTrigger>();
             services.AddMemoryCache();
             services.AddSpaStaticFiles(opt => opt.RootPath = "ClientApp/dist");