Explorar o código

Merge branch 'develop6.0-tmd' into develop6.0

CrazyIter_Bin %!s(int64=3) %!d(string=hai) anos
pai
achega
b8e29e1152
Modificáronse 100 ficheiros con 4617 adicións e 1132 borrados
  1. 5 2
      TEAMModelAPI/Controllers/School/SchoolController.cs
  2. 1 1
      TEAMModelBI/ClientApp/public/index.html
  3. 23 18
      TEAMModelBI/ClientApp/src/api/index.js
  4. 550 0
      TEAMModelBI/ClientApp/src/static/time-zone/timeCN.json
  5. 550 0
      TEAMModelBI/ClientApp/src/static/time-zone/timeEN.json
  6. 550 0
      TEAMModelBI/ClientApp/src/static/time-zone/timeTW.json
  7. 6 1
      TEAMModelBI/ClientApp/src/store/index.js
  8. 44 0
      TEAMModelBI/ClientApp/src/until/common.js
  9. 8 3
      TEAMModelBI/ClientApp/src/until/http.js
  10. 39 0
      TEAMModelBI/ClientApp/src/until/inspect.js
  11. 111 49
      TEAMModelBI/ClientApp/src/view/teachermanage/school.vue
  12. 1137 82
      TEAMModelBI/ClientApp/src/view/teachermanage/setschool.vue
  13. 1 1
      TEAMModelBI/ClientApp/src/view/teachermanage/traitmanage.vue
  14. 13 11
      TEAMModelBI/Controllers/BIAbility/AbilityMgmtController.cs
  15. 6 14
      TEAMModelBI/Controllers/BIAbility/AbilityTaskMgmtController.cs
  16. 3 2
      TEAMModelBI/Controllers/BISchool/AreaRelevantController.cs
  17. 5 9
      TEAMModelBI/Controllers/BISchool/BatchAreaController.cs
  18. 113 330
      TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs
  19. 2 4
      TEAMModelBI/Controllers/BISchool/SchoolController.cs
  20. 36 103
      TEAMModelBI/Controllers/BITest/TestController.cs
  21. 1 1
      TEAMModelBI/Controllers/DingDingStruc/DDStructController.cs
  22. 14 16
      TEAMModelBI/Controllers/DingDingStruc/TableDingDingInfoController.cs
  23. 1 0
      TEAMModelBI/Controllers/LoginController.cs
  24. 4 3
      TEAMModelBI/Controllers/OperateRecord/OperateLogController.cs
  25. 1 0
      TEAMModelBI/Startup.cs
  26. 12 8
      TEAMModelOS.FunctionV4/CosmosDB/CommonTrigger.cs
  27. 3 2
      TEAMModelOS.FunctionV4/CosmosDB/TriggerCorrect.cs
  28. 49 13
      TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs
  29. 4 3
      TEAMModelOS.FunctionV4/CosmosDB/TriggerExamLite.cs
  30. 34 7
      TEAMModelOS.FunctionV4/CosmosDB/TriggerHomework.cs
  31. 4 3
      TEAMModelOS.FunctionV4/CosmosDB/TriggerStudy.cs
  32. 35 8
      TEAMModelOS.FunctionV4/CosmosDB/TriggerSurvey.cs
  33. 34 7
      TEAMModelOS.FunctionV4/CosmosDB/TriggerVote.cs
  34. 27 7
      TEAMModelOS.FunctionV4/HttpTrigger/ScsYxptApis.cs
  35. 1 0
      TEAMModelOS.FunctionV4/Program.cs
  36. 7 5
      TEAMModelOS.FunctionV4/ServiceBus/ActiveTaskTopic.cs
  37. 1 0
      TEAMModelOS.FunctionV4/local.settings.json
  38. 33 6
      TEAMModelOS.SDK/DI/CoreAPI/CoreAPIHttpService.cs
  39. 2 1
      TEAMModelOS.SDK/Models/Cosmos/Common/StuActivity.cs
  40. 1 0
      TEAMModelOS.SDK/Models/Cosmos/Common/TmdInfo.cs
  41. 4 0
      TEAMModelOS.SDK/Models/Cosmos/Teacher/Research/TeacherTrain.cs
  42. 5 5
      TEAMModelOS.SDK/Models/Service/ActivityService.cs
  43. 39 0
      TEAMModelOS.SDK/Models/Service/Common/ActivityStudentService.cs
  44. 30 6
      TEAMModelOS.SDK/Models/Service/GroupListService.cs
  45. 8 6
      TEAMModelOS.SDK/Models/Service/StatisticsService.cs
  46. 4 2
      TEAMModelOS.SDK/Models/Service/Third/Sc/ScYxptModel.cs
  47. 12 2
      TEAMModelOS.SDK/Models/Service/Third/ThirdService.cs
  48. 2 0
      TEAMModelOS/ClientApp/src/api/http.js
  49. 1 1
      TEAMModelOS/ClientApp/src/api/login.js
  50. 4 0
      TEAMModelOS/ClientApp/src/api/newEvaluation.js
  51. 2 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue
  52. 5 2
      TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js
  53. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/en-US/studentWeb.js
  54. 4 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/system.js
  55. 5 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js
  56. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js
  57. 4 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/system.js
  58. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/cusMgt.js
  59. 5 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js
  60. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js
  61. 4 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/system.js
  62. 2 2
      TEAMModelOS/ClientApp/src/utils/public.js
  63. 73 18
      TEAMModelOS/ClientApp/src/view/Home.vue
  64. 1 1
      TEAMModelOS/ClientApp/src/view/ability/Review.vue
  65. 10 0
      TEAMModelOS/ClientApp/src/view/areaMgmt/AreaBase.vue
  66. 73 1
      TEAMModelOS/ClientApp/src/view/assessment/Assessment.vue
  67. 149 30
      TEAMModelOS/ClientApp/src/view/evaluation/bank/ShareCenter.vue
  68. 1 1
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseEditExercise.vue
  69. 80 49
      TEAMModelOS/ClientApp/src/view/evaluation/index/CreatePaper.vue
  70. 1 1
      TEAMModelOS/ClientApp/src/view/joinclass/JoinClass.vue
  71. 1 0
      TEAMModelOS/ClientApp/src/view/jyzx/offline.vue
  72. 13 2
      TEAMModelOS/ClientApp/src/view/learnactivity/ByQuMark.vue
  73. 8 3
      TEAMModelOS/ClientApp/src/view/learnactivity/ByStuMark.vue
  74. 80 31
      TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue
  75. 80 49
      TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue
  76. 28 11
      TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue
  77. 13 10
      TEAMModelOS/ClientApp/src/view/learnactivity/SimpleAnalysis.vue
  78. 24 8
      TEAMModelOS/ClientApp/src/view/login/page/Student.vue
  79. 7 7
      TEAMModelOS/ClientApp/src/view/login/page/Teacher.vue
  80. 7 3
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less
  81. 132 63
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue
  82. 85 34
      TEAMModelOS/ClientApp/src/view/user/BandPhone.vue
  83. 4 2
      TEAMModelOS/Controllers/Analysis/ClassAnalysisController.cs
  84. 6 5
      TEAMModelOS/Controllers/Both/GroupListController.cs
  85. 6 5
      TEAMModelOS/Controllers/Client/HiScanController.cs
  86. 6 4
      TEAMModelOS/Controllers/Common/AreaController.cs
  87. 5 2
      TEAMModelOS/Controllers/Common/CommonController.cs
  88. 5 4
      TEAMModelOS/Controllers/Common/ExamController.cs
  89. 4 2
      TEAMModelOS/Controllers/Common/ExamLiteController.cs
  90. 5 3
      TEAMModelOS/Controllers/Common/HomeworkController.cs
  91. 3 2
      TEAMModelOS/Controllers/Common/StudyController.cs
  92. 6 4
      TEAMModelOS/Controllers/Normal/AbilityStatisticsController.cs
  93. 8 4
      TEAMModelOS/Controllers/Normal/AbilitySubController.cs
  94. 1 1
      TEAMModelOS/Controllers/School/SchoolTeacherController.cs
  95. 5 4
      TEAMModelOS/Controllers/Teacher/ClassVideoController.cs
  96. 1 1
      TEAMModelOS/Controllers/Teacher/InitController.cs
  97. 3 3
      TEAMModelOS/Controllers/Teacher/TeacherCommonController.cs
  98. 3 0
      TEAMModelOS/Controllers/Third/ScController.cs
  99. 61 1
      TEAMModelOS/Controllers/XTest/FixDataController.cs
  100. 0 0
      TEAMModelOS/Controllers/XTest/TestController.cs

+ 5 - 2
TEAMModelAPI/Controllers/School/SchoolController.cs

@@ -24,6 +24,7 @@ using Microsoft.Extensions.Configuration;
 using TEAMModelOS.Filter;
 using Microsoft.AspNetCore.Authorization;
 using HTEXLib.COMM.Helpers;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelAPI.Controllers
 {
@@ -39,7 +40,8 @@ namespace TEAMModelAPI.Controllers
         private readonly DingDing _dingDing;
         private readonly Option _option;
         private readonly IConfiguration _configuration;
-        public SchoolController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, DingDing dingDing, IOptionsSnapshot<Option> option, IConfiguration configuration)
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public SchoolController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, DingDing dingDing, IOptionsSnapshot<Option> option, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
             _azureStorage = azureStorage;
@@ -47,6 +49,7 @@ namespace TEAMModelAPI.Controllers
             _dingDing = dingDing;
             _option = option?.Value;
             _configuration = configuration;
+            _coreAPIHttpService=coreAPIHttpService;
         }
 
         /// <summary>
@@ -249,7 +252,7 @@ namespace TEAMModelAPI.Controllers
             if (!json.TryGetProperty("ids", out JsonElement ids)) return BadRequest();
             var (id, school) = HttpContext.GetApiTokenInfo();
             List<string> listids = ids.ToObject<List<string>>();
-            (List<RMember> members, List<RGroupList> groups) = await GroupListService.GetStutmdidListids(client, _dingDing, listids, $"{school}");
+            (List<RMember> members, List<RGroupList> groups) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, listids, $"{school}");
             return Ok(new { groups = groups.Select(x => new { x.name, x.no, x.periodId, x.school, x.type, x.year, x.tcount, x.scount, x.leader, x.members, x.id }), members });
         }
        

+ 1 - 1
TEAMModelBI/ClientApp/public/index.html

@@ -11,7 +11,7 @@
     </title>
 </head>
 <script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
-<script src="https://at.alicdn.com/t/font_2934132_2bf1igxcbdy.js"></script>
+<script src="https://at.alicdn.com/t/font_2934132_2ic8w2c2g79.js"></script>
 
 <body>
     <noscript>

+ 23 - 18
TEAMModelBI/ClientApp/src/api/index.js

@@ -37,7 +37,7 @@ export default {
     getEveryinfo(data) {
         return post('/tabledd/get-ddusers', data)
     },
-    //人员权限管理 ***
+    //人员权限管理 ***    Headers[x-auth-authtoken]
     updateManege(data) {
         return post('/tabledd/set-permissions', data)
     },
@@ -45,7 +45,7 @@ export default {
     getDeparttotal(data) {
         return post('/tabledd/get-dddeptiduser', data)
     },
-    //设置系统管理员
+    //设置系统管理员     Headers[x-auth-authtoken]
     setisAdmin(data) {
         return post('/tabledd/set-backend', data)
     },
@@ -53,7 +53,7 @@ export default {
     getCapacity(data) {
         return post('/batcharea/get-areas', data)
     },
-    //创建区域 ***
+    //创建区域 ***   Headers[x-auth-authtoken]
     createAreas(data) {
         return post('/batcharea/batch-area', data)
     },
@@ -61,12 +61,12 @@ export default {
     getUserdata(data) {
         return post('/biservers/get-mobileuserinfo', data)
     },
-    //创建学校 ***
+    //创建学校 ***    Headers[x-auth-authtoken]
     createdSchools(data) {
         return post('/batchschool/batch-school', data)
     },
     //区域管理和微能力点管理
-    //切换为能力点 ***
+    //切换为能力点 ***    Headers[x-auth-authtoken]
     changeCutstandard(data) {
         return post('/batcharea/cut-standard', data)
     },
@@ -82,15 +82,11 @@ export default {
     getAbilityDeatils(data) {
         return post('/biabilitytask/get-abilitytasksid', data)
     },
-    //册别删除(删除某个能力点) *** 
+    //册别删除(删除某个能力点) ***   Headers[x-auth-authtoken]
     delAbility(data) {
         return post('/biabilitymgmt/del-ability', data)
     },
-    //更新或添加册别(添加能力点) ***
-    uporaddAbility(data) {
-        return post('/biabilitymgmt/upd-ability', data)
-    },
-    //调整微能力点的必修、选修 ***
+    //调整微能力点的必修、选修 *** Headers[x-auth-authtoken]
     saveAbility(data) {
         return post('/biabilitymgmt/upd-currency', data)
     },
@@ -102,11 +98,11 @@ export default {
     getForareaSchool(data) {
         return post('/area/get-areaschools', data)
     },
-    //区域内加入学校 ***
+    //区域内加入学校 ***  Headers[x-auth-authtoken]
     areaAddSchool(data) {
         return post('/schoolcheck/set-schooljoinarea', data)
     },
-    //区域内移除学校 ***
+    //区域内移除学校 *** Headers[x-auth-authtoken]
     areaDeleSchool(data) {
         return post('/area/set-areashiftschool', data)
     },
@@ -120,10 +116,19 @@ export default {
     getAllassist(data) {
         return post('/dd/get-tmdandddusers', data)
     },
-    //对学校编辑提交更改 ***
+    //对学校编辑提交更改 ***   Headers[x-auth-authtoken]   接口已对接
     updateSchoolinfo(data) {
         return post('/batchschool/upd-schoolassist', data)
     },
+    //获取当前学校的学段管理数据
+    getNowscholl(data) {
+        return post('/schoolcheck/get-schoolid', data)
+    },
+    //修改学段管理内容    Headers[x-auth-authtoken]   接口已对接
+    updateSchoolphase(data) {
+        return post('/schoolcheck/upd-school', data)
+    },
+
     //首页dashboard数据接口
     //获取各城市的学校数量(bar)
     getEachSchool(data) {
@@ -149,22 +154,22 @@ export default {
     getModuledata(data) {
         return post('/product/get-allcount', data)
     },
-    //强制刷新人员名单(从DD服务器拉取)  ***
+    //强制刷新人员名单(从DD服务器拉取)  ***  Headers[x-auth-authtoken]
     getStaffList(data) {
         return post('/tabledd/get-dingdingusers', data)
     },
 
 
     //微能力点编辑
-    //tree增加子节点 ***
+    //tree增加子节点 ***  Headers[x-auth-authtoken]  
     addChild(data) {
         return post('/biabilitytask/upd-abilitytask', data)
     },
-    //tree删除父节点(一级@章节) ***
+    //tree删除父节点(一级@章节) ***  Headers[x-auth-authtoken]
     removeChildnodes(data) {
         return post('/biabilitytask/del-abilitytask', data)
     },
-    //新增或编辑当前册别 (同时也支持添加实践任务)
+    //新增或编辑当前册别 (同时也支持添加实践任务)     Headers[x-auth-authtoken]   /**参数结构有所更改需要和后端对接、BI文档已更新。**/    你这里有重复API
     redactOraddAbility(data) {
         return post('/biabilitymgmt/upd-ability', data)
     },

+ 550 - 0
TEAMModelBI/ClientApp/src/static/time-zone/timeCN.json

@@ -0,0 +1,550 @@
+[
+    {
+        "label": "(UTC-12:00) 国际换日线以西",
+        "value": "-12:00"
+    },
+    {
+        "label": "(UTC-11:00) 国际标准时间-11",
+        "value": "-11:00"
+    },
+    {
+        "label": "(UTC-10:00) 阿留申群岛",
+        "value": "-10:00"
+    },
+    {
+        "label": "(UTC-10:00) 夏威夷",
+        "value": "-10:00"
+    },
+    {
+        "label": "(UTC-09:30) 马克沙斯群岛",
+        "value": "-09:30"
+    },
+    {
+        "label": "(UTC-09:00) 阿拉斯加",
+        "value": "-09:00"
+    },
+    {
+        "label": "(UTC-09:00) 国际标准时间-09",
+        "value": "-09:00"
+    },
+    {
+        "label": "(UTC-08:00) 下加利福尼亚",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-08:00) 太平洋时间 (美国和加拿大)",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-08:00) 国际标准时间-08",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-07:00) 山区时间 (美国和加拿大)",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-07:00) 亚历桑那",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-07:00) 齐骅华,拉帕兹,马札特兰",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-06:00) 中美洲",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 中部时间 (美国和加拿大)",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 瓜达拉加若,墨西哥城,蒙特利",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 伊斯特岛",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 萨克其万 (加拿大)",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-05:00) 土克斯及开科斯",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 切图马尔",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 印第安纳 (东部)",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 东部时间 (美国和加拿大)",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 波哥大,利马,基多,里约布兰科",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 哈瓦那",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 海地",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-04:00) 大西洋时间 (加拿大)",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 卡拉卡斯",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 古雅巴",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 佐治敦,拉帕兹,玛瑙斯,圣胡安",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 亚松森",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 圣地牙哥",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-03:30) 纽芬兰",
+        "value": "-03:30"
+    },
+    {
+        "label": "(UTC-03:00) 巴西利亚",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 布宜诺斯艾利斯",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 阿拉瓜伊纳",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 格陵兰",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 开云,福塔力沙",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 圣匹岛",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 蒙特维多",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 蓬塔阿雷纳斯",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 萨尔瓦多",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-02:00) 国际标准时间-02",
+        "value": "-02:00"
+    },
+    {
+        "label": "(UTC-01:00) 亚速尔群岛",
+        "value": "-01:00"
+    },
+    {
+        "label": "(UTC-01:00) 维德角",
+        "value": "-01:00"
+    },
+    {
+        "label": "(UTC) 国际标准时间",
+        "value": ""
+    },
+    {
+        "label": "(UTC+00:00) 都柏林,爱丁堡,里斯本,伦敦",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+00:00) 圣多美普林西比",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+00:00) 蒙罗维亚,雷克雅维克",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+01:00) 卡萨布兰卡",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 中西非",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 布鲁塞尔,哥本哈根,马德里,巴黎",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 贝尔格勒,布拉提斯拉瓦,布达佩斯,卢布亚纳,布拉格",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 阿姆斯特丹,柏林,伯恩,罗马,斯德哥尔摩,维也纳",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 塞拉耶佛,斯高彼亚,华沙,札格雷布",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+02:00) 大马士革",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 加萨,希伯仑",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 卡里宁格勒",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 安曼",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 贝鲁特",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 奇西瑙",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 的黎波里",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 哈拉雷,皮托里",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 耶路撒冷",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 喀土穆",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 开罗",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 雅典,布加勒斯特",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 温吐克",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 赫尔辛基,凯耶夫,里加,苏非亚,塔林,维尔纽斯",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+03:00) 巴格达",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 伊斯坦堡",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 奈洛比",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 明斯克",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 科威特,利雅德",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 莫斯科,圣彼得堡",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:30) 德黑兰",
+        "value": "+03:30"
+    },
+    {
+        "label": "(UTC+04:00) 巴库",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 伊热夫斯克,沙马拉",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 伏尔加格勒",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 阿布达比,马斯喀特",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 阿斯特拉罕,乌里扬诺夫斯克",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 第比利斯",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 叶里温",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 路易士港",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 萨拉托夫",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:30) 喀布尔",
+        "value": "+04:30"
+    },
+    {
+        "label": "(UTC+05:00) 伊卡特林堡",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) 伊斯兰马巴德,克洛奇",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) 克孜勒奥尔达",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) 阿什哈巴德,塔什干",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:30) 辰内,加尔各答,孟拜,新德里",
+        "value": "+05:30"
+    },
+    {
+        "label": "(UTC+05:30) 斯里哈亚华登尼普拉",
+        "value": "+05:30"
+    },
+    {
+        "label": "(UTC+05:45) 加德满都",
+        "value": "+05:45"
+    },
+    {
+        "label": "(UTC+06:00) 阿斯坦纳",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:00) 鄂木斯克",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:00) 达卡",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:30) 仰光",
+        "value": "+06:30"
+    },
+    {
+        "label": "(UTC+07:00) 巴尔瑙尔,戈尔诺-阿尔泰斯克",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 托木斯克",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 克拉斯诺亚尔斯克",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 哈霍德",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 曼谷,河内,雅加达",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 新西伯利亚",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+08:00) 北京,重庆,香港特别行政区,乌鲁木齐",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 台北",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 伊尔库次克",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 吉隆坡,新加坡",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 伯斯",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 库伦",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:45) 尤克拉",
+        "value": "+08:45"
+    },
+    {
+        "label": "(UTC+09:00) 大阪,北海道,东京",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 平壤",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 赤塔",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 亚库兹克",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 首尔",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:30) 爱德兰",
+        "value": "+09:30"
+    },
+    {
+        "label": "(UTC+09:30) 达尔文",
+        "value": "+09:30"
+    },
+    {
+        "label": "(UTC+10:00) 布里斯本",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 坎培拉,墨尔本,雪梨",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 海参威",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 霍巴特",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 关岛,莫尔斯贝港",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:30) 罗豪岛",
+        "value": "+10:30"
+    },
+    {
+        "label": "(UTC+11:00) 布干维尔岛",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 库页岛",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 索罗门群岛,新喀里多尼亚群岛",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 马加丹",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 乔库尔达赫",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 诺福克岛",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+12:00) 阿纳底,彼得保罗夫斯克-堪察加斯克",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) 国际标准时间+12",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) 斐济",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) 奥克兰,威灵顿",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:45) 查塔姆群岛",
+        "value": "+12:45"
+    },
+    {
+        "label": "(UTC+13:00) 努瓜娄发",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+13:00) 国际标准时间+13",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+13:00) 萨摩亚",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+14:00) 刻里提玛斯岛",
+        "value": "+14:00"
+    }
+]

+ 550 - 0
TEAMModelBI/ClientApp/src/static/time-zone/timeEN.json

@@ -0,0 +1,550 @@
+[
+    {
+        "label": "(UTC-12:00) International Date Line West",
+        "value": "-12:00"
+    },
+    {
+        "label": "(UTC-11:00) Coordinated Universal Time-11",
+        "value": "-11:00"
+    },
+    {
+        "label": "(UTC-10:00) Aleutian Islands",
+        "value": "-10:00"
+    },
+    {
+        "label": "(UTC-10:00) Hawaii",
+        "value": "-10:00"
+    },
+    {
+        "label": "(UTC-09:30) Marquesas Islands",
+        "value": "-09:30"
+    },
+    {
+        "label": "(UTC-09:00) Alaska",
+        "value": "-09:00"
+    },
+    {
+        "label": "(UTC-09:00) Coordinated Universal Time-09",
+        "value": "-09:00"
+    },
+    {
+        "label": "(UTC-08:00) Baja California",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-08:00) Coordinated Universal Time-08",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-08:00) Pacific Time (US & Canada)",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-07:00) Arizona",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-07:00) Chihuahua, La Paz, Mazatlan",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-07:00) Mountain Time (US & Canada)",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-06:00) Central America",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) Central Time (US & Canada)",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) Easter Island",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) Guadalajara, Mexico City, Monterrey",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) Saskatchewan",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-05:00) Bogota, Lima, Quito, Rio Branco",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) Chetumal",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) Eastern Time (US & Canada)",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) Haiti",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) Havana",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) Indiana (East)",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) Turks and Caicos",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-04:00) Asuncion",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) Atlantic Time (Canada)",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) Caracas",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) Cuiaba",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) Santiago",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-03:30) Newfoundland",
+        "value": "-03:30"
+    },
+    {
+        "label": "(UTC-03:00) Araguaina",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Brasilia",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Cayenne, Fortaleza",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) City of Buenos Aires",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Greenland",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Montevideo",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Punta Arenas",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Saint Pierre and Miquelon",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) Salvador",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-02:00) Coordinated Universal Time-02",
+        "value": "-02:00"
+    },
+    {
+        "label": "(UTC-01:00) Azores",
+        "value": "-01:00"
+    },
+    {
+        "label": "(UTC-01:00) Cabo Verde Is.",
+        "value": "-01:00"
+    },
+    {
+        "label": "(UTC) Coordinated Universal Time",
+        "value": ""
+    },
+    {
+        "label": "(UTC+00:00) Dublin, Edinburgh, Lisbon, London",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+00:00) Monrovia, Reykjavik",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+00:00) Sao Tome",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+01:00) Casablanca",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) West Central Africa",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+02:00) Amman",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Athens, Bucharest",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Beirut",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Cairo",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Chisinau",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Damascus",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Gaza, Hebron",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Harare, Pretoria",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Jerusalem",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Kaliningrad",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Khartoum",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Tripoli",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) Windhoek",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+03:00) Baghdad",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) Istanbul",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) Kuwait, Riyadh",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) Minsk",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) Moscow, St. Petersburg",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) Nairobi",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:30) Tehran",
+        "value": "+03:30"
+    },
+    {
+        "label": "(UTC+04:00) Abu Dhabi, Muscat",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Astrakhan, Ulyanovsk",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Baku",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Izhevsk, Samara",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Port Louis",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Saratov",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Tbilisi",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Volgograd",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) Yerevan",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:30) Kabul",
+        "value": "+04:30"
+    },
+    {
+        "label": "(UTC+05:00) Ashgabat, Tashkent",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) Ekaterinburg",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) Islamabad, Karachi",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) Qyzylorda",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",
+        "value": "+05:30"
+    },
+    {
+        "label": "(UTC+05:30) Sri Jayawardenepura",
+        "value": "+05:30"
+    },
+    {
+        "label": "(UTC+05:45) Kathmandu",
+        "value": "+05:45"
+    },
+    {
+        "label": "(UTC+06:00) Astana",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:00) Dhaka",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:00) Omsk",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:30) Yangon (Rangoon)",
+        "value": "+06:30"
+    },
+    {
+        "label": "(UTC+07:00) Bangkok, Hanoi, Jakarta",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) Barnaul, Gorno-Altaysk",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) Hovd",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) Krasnoyarsk",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) Novosibirsk",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) Tomsk",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+08:00) Beijing, Chongqing,Hong Kong, Urumqi ",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) Irkutsk",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) Kuala Lumpur, Singapore",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) Perth",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) Taipei",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) Ulaanbaatar",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:45) Eucla",
+        "value": "+08:45"
+    },
+    {
+        "label": "(UTC+09:00) Chita",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) Osaka, Sapporo, Tokyo",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) Pyongyang",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) Seoul",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) Yakutsk",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:30) Adelaide",
+        "value": "+09:30"
+    },
+    {
+        "label": "(UTC+09:30) Darwin",
+        "value": "+09:30"
+    },
+    {
+        "label": "(UTC+10:00) Brisbane",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) Canberra, Melbourne, Sydney",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) Guam, Port Moresby",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) Hobart",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) Vladivostok",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:30) Lord Howe Island",
+        "value": "+10:30"
+    },
+    {
+        "label": "(UTC+11:00) Bougainville Island",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) Chokurdakh",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) Magadan",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) Norfolk Island",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) Sakhalin",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) Solomon Is., New Caledonia",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) Auckland, Wellington",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) Coordinated Universal Time+12",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) Fiji",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:45) Chatham Islands",
+        "value": "+12:45"
+    },
+    {
+        "label": "(UTC+13:00) Coordinated Universal Time+13",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+13:00) Nuku'alofa",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+13:00) Samoa",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+14:00) Kiritimati Island",
+        "value": "+14:00"
+    }
+]

+ 550 - 0
TEAMModelBI/ClientApp/src/static/time-zone/timeTW.json

@@ -0,0 +1,550 @@
+[
+    {
+        "label": "(UTC-12:00) 國際換日線以西",
+        "value": "-12:00"
+    },
+    {
+        "label": "(UTC-11:00) 國際標準時間-11",
+        "value": "-11:00"
+    },
+    {
+        "label": "(UTC-10:00) 阿留申群島",
+        "value": "-10:00"
+    },
+    {
+        "label": "(UTC-10:00) 夏威夷",
+        "value": "-10:00"
+    },
+    {
+        "label": "(UTC-09:30) 馬克沙斯群島",
+        "value": "-09:30"
+    },
+    {
+        "label": "(UTC-09:00) 阿拉斯加",
+        "value": "-09:00"
+    },
+    {
+        "label": "(UTC-09:00) 國際標準時間-09",
+        "value": "-09:00"
+    },
+    {
+        "label": "(UTC-08:00) 下加利福尼亞",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-08:00) 太平洋時間 (美國和加拿大)",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-08:00) 國際標準時間-08",
+        "value": "-08:00"
+    },
+    {
+        "label": "(UTC-07:00) 山區時間 (美國和加拿大)",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-07:00) 亞歷桑那",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-07:00) 齊驊華,拉帕茲,馬札特蘭",
+        "value": "-07:00"
+    },
+    {
+        "label": "(UTC-06:00) 中美洲",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 中部時間 (美國和加拿大)",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 瓜達拉加若,墨西哥城,蒙特利",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 伊斯特島",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-06:00) 薩克其萬 (加拿大)",
+        "value": "-06:00"
+    },
+    {
+        "label": "(UTC-05:00) 土克斯及開科斯",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 切圖馬爾",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 印第安納 (東部)",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 東部時間 (美國和加拿大)",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 波哥大,利馬,基多,里約布蘭科",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 哈瓦那",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-05:00) 海地",
+        "value": "-05:00"
+    },
+    {
+        "label": "(UTC-04:00) 大西洋時間 (加拿大)",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 卡拉卡斯",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 古雅巴",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 佐治敦,拉帕茲,瑪瑙斯,聖胡安",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 亞松森",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-04:00) 聖地牙哥",
+        "value": "-04:00"
+    },
+    {
+        "label": "(UTC-03:30) 紐芬蘭",
+        "value": "-03:30"
+    },
+    {
+        "label": "(UTC-03:00) 巴西利亞",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 布宜諾斯艾利斯",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 阿拉瓜伊納",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 格陵蘭",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 開雲,福塔力沙",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 聖匹島",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 蒙特維多",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 蓬塔阿雷納斯",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-03:00) 薩爾瓦多",
+        "value": "-03:00"
+    },
+    {
+        "label": "(UTC-02:00) 國際標準時間-02",
+        "value": "-02:00"
+    },
+    {
+        "label": "(UTC-01:00) 亞速爾群島",
+        "value": "-01:00"
+    },
+    {
+        "label": "(UTC-01:00) 維德角",
+        "value": "-01:00"
+    },
+    {
+        "label": "(UTC) 國際標准時間",
+        "value": ""
+    },
+    {
+        "label": "(UTC+00:00) 都柏林,愛丁堡,里斯本,倫敦",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+00:00) 聖多美普林西比",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+00:00) 蒙羅維亞,雷克雅維克",
+        "value": "+00:00"
+    },
+    {
+        "label": "(UTC+01:00) 卡薩布蘭卡",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 中西非",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 布魯塞爾,哥本哈根,馬德里,巴黎",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 貝爾格勒,布拉提斯拉瓦,布達佩斯,盧布亞納,布拉格",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 阿姆斯特丹,柏林,伯恩,羅馬,斯德哥爾摩,維也納",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+01:00) 塞拉耶佛,斯高彼亞,華沙,札格雷布",
+        "value": "+01:00"
+    },
+    {
+        "label": "(UTC+02:00) 大馬士革",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 加薩,希伯侖",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 卡里寧格勒",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 安曼",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 貝魯特",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 奇西瑙",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 的黎波里",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 哈拉雷,皮托里",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 耶路撒冷",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 喀土穆",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 開羅",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 雅典,布加勒斯特",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 溫吐克",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+02:00) 赫爾辛基,凱耶夫,里加,蘇非亞,塔林,維爾紐斯",
+        "value": "+02:00"
+    },
+    {
+        "label": "(UTC+03:00) 巴格達",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 伊斯坦堡",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 奈洛比",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 明斯克",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 科威特,利雅德",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:00) 莫斯科,聖彼得堡",
+        "value": "+03:00"
+    },
+    {
+        "label": "(UTC+03:30) 德黑蘭",
+        "value": "+03:30"
+    },
+    {
+        "label": "(UTC+04:00) 巴庫",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 伊熱夫斯克,沙馬拉",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 伏爾加格勒",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 阿布達比,馬斯喀特",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 阿斯特拉罕,烏里揚諾夫斯克",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 第比利斯",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 葉里溫",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 路易士港",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:00) 薩拉托夫",
+        "value": "+04:00"
+    },
+    {
+        "label": "(UTC+04:30) 喀布爾",
+        "value": "+04:30"
+    },
+    {
+        "label": "(UTC+05:00) 伊卡特林堡",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) 伊斯蘭馬巴德,克洛奇",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) 克孜勒奧爾達",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:00) 阿什哈巴德,塔什干",
+        "value": "+05:00"
+    },
+    {
+        "label": "(UTC+05:30) 辰內,加爾各答,孟拜,新德里",
+        "value": "+05:30"
+    },
+    {
+        "label": "(UTC+05:30) 斯里哈亞華登尼普拉",
+        "value": "+05:30"
+    },
+    {
+        "label": "(UTC+05:45) 加德滿都",
+        "value": "+05:45"
+    },
+    {
+        "label": "(UTC+06:00) 阿斯坦納",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:00) 鄂木斯克",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:00) 達卡",
+        "value": "+06:00"
+    },
+    {
+        "label": "(UTC+06:30) 仰光",
+        "value": "+06:30"
+    },
+    {
+        "label": "(UTC+07:00) 巴爾瑙爾,戈爾諾-阿爾泰斯克",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 托木斯克",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 克拉斯諾亞爾斯克",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 哈霍德",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 曼谷,河內,雅加達",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+07:00) 新西伯利亞",
+        "value": "+07:00"
+    },
+    {
+        "label": "(UTC+08:00) 北京,重慶,香港特別行政區,烏魯木齊",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 台北",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 伊爾庫次克",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 吉隆坡,新加坡",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 伯斯",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:00) 庫倫",
+        "value": "+08:00"
+    },
+    {
+        "label": "(UTC+08:45) 尤克拉",
+        "value": "+08:45"
+    },
+    {
+        "label": "(UTC+09:00) 大阪,北海道,東京",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 平壤",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 赤塔",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 亞庫茲克",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:00) 首爾",
+        "value": "+09:00"
+    },
+    {
+        "label": "(UTC+09:30) 愛德蘭",
+        "value": "+09:30"
+    },
+    {
+        "label": "(UTC+09:30) 達爾文",
+        "value": "+09:30"
+    },
+    {
+        "label": "(UTC+10:00) 布里斯本",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 坎培拉,墨爾本,雪梨",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 海參威",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 霍巴特",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:00) 關島,莫爾斯貝港",
+        "value": "+10:00"
+    },
+    {
+        "label": "(UTC+10:30) 羅豪島",
+        "value": "+10:30"
+    },
+    {
+        "label": "(UTC+11:00) 布干維爾島",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 庫頁島",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 索羅門群島,新喀里多尼亞群島",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 馬加丹",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 喬庫爾達赫",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+11:00) 諾福克島",
+        "value": "+11:00"
+    },
+    {
+        "label": "(UTC+12:00) 阿納底,彼得保羅夫斯克-堪察加斯克",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) 國際標準時間+12",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) 斐濟",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:00) 奧克蘭,威靈頓",
+        "value": "+12:00"
+    },
+    {
+        "label": "(UTC+12:45) 查塔姆群島",
+        "value": "+12:45"
+    },
+    {
+        "label": "(UTC+13:00) 努瓜婁發",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+13:00) 國際標準時間+13",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+13:00) 薩摩亞",
+        "value": "+13:00"
+    },
+    {
+        "label": "(UTC+14:00) 刻里提瑪斯島",
+        "value": "+14:00"
+    }
+]

+ 6 - 1
TEAMModelBI/ClientApp/src/store/index.js

@@ -12,7 +12,8 @@ export default createStore({
             "host": '',
             "sas": '',
         },
-        createModel: ''
+        createModel: '',
+        changbtnShow: false
     },
     mutations: {
         //修改组织架构
@@ -48,6 +49,10 @@ export default createStore({
         //改变创建模式
         changeCreatedmodel(state, value) {
             state.createModel = value
+        },
+        //改变存储变更按钮显示
+        changeShowbtn(state, value) {
+            state.changbtnShow = value
         }
     },
     actions: {},

+ 44 - 0
TEAMModelBI/ClientApp/src/until/common.js

@@ -28,5 +28,49 @@ export default {
     //时间戳转日期
     getLocalTime(nS) {
         return new Date(parseInt(nS)).toLocaleString().replace(/:\d{1,2}$/, ' ');
+    },
+    //计算总天数
+    totalDay(startime, endtime) {
+        console.log(startime, endtime, '传进来的值')
+        var date = new Date();
+        let year = date.getFullYear()
+        let month = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
+        var totaldays = 0
+        month.forEach(item => {
+            let days = 0
+            if (item >= startime && item <= endtime) {
+                switch (item) {
+                    case 1:
+                    case 3:
+                    case 5:
+                    case 7:
+                    case 8:
+                    case 10:
+                    case 12:
+                        days = 31;
+                        break;
+                    case 4:
+                    case 6:
+                    case 9:
+                    case 11:
+                        days = 30;
+                        break;
+                    case 2:
+                        let years = 0;
+                        if (startime < endtime)
+                            years = year;
+                        else
+                            years = year + 1;
+                        if (years % 4 == 0 && year % 100 != 0 || year % 400 == 0)
+                            days = 29;
+                        else
+                            days = 28;
+                        break;
+                }
+                totaldays += days;
+                console.log(totaldays, days)
+            }
+        });
+        return totaldays
     }
 }

+ 8 - 3
TEAMModelBI/ClientApp/src/until/http.js

@@ -6,7 +6,13 @@ axios.interceptors.request.use(
     config => {
         // const token = getCookie('名称');
         config.data = JSON.stringify(config.data);
-        if (config.url.indexOf('biabilitymgmt') != -1 || config.url.indexOf('biabilitytask') != -1 || config.url.indexOf('area') != -1 || config.url.indexOf('batcharea') != -1 || config.url.indexOf('batchschool') != -1 || config.url.indexOf('schoolcheck') != -1 || config.url.indexOf('tabledd') != -1) {
+        if (config.url.indexOf('biabilitymgmt') != -1 ||
+            config.url.indexOf('biabilitytask') != -1 ||
+            config.url.indexOf('area') != -1 ||
+            config.url.indexOf('batcharea') != -1 ||
+            config.url.indexOf('batchschool') != -1 ||
+            config.url.indexOf('schoolcheck') != -1 ||
+            config.url.indexOf('tabledd') != -1) {
             config.headers = {
                 'Content-Type': 'application/json',
                 'x-auth-authtoken': JSON.parse(localStorage.id_token)
@@ -17,7 +23,6 @@ axios.interceptors.request.use(
                 'Authorization': ""
             }
         }
-
         return config;
     },
     error => {
@@ -45,7 +50,7 @@ export function fetch(url, params) {
             })
             .catch(error => {
                 reject(error);
-                this.$Message.error('数据访问错误!');
+                // this.$Message.error('数据访问错误!');
             })
     })
 }

+ 39 - 0
TEAMModelBI/ClientApp/src/until/inspect.js

@@ -24,5 +24,44 @@ export default {
             m = now.getMonth() + 1,
             d = now.getDate();
         return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d) + " " + now.toTimeString().substr(0, 8);
+    },
+    //计算总天数
+    totalDay(startime, endtime) {
+        var date = new Date();
+        let year = date.getFullYear()
+        let month = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
+        let totaldays = 0
+        month.forEach(item => {
+            switch (item) {
+                case 1:
+                case 3:
+                case 5:
+                case 7:
+                case 8:
+                case 10:
+                case 12:
+                    days = 31;
+                    break;
+                case 4:
+                case 6:
+                case 9:
+                case 11:
+                    days = 30;
+                    break;
+                case 2:
+                    let years = 0;
+                    if (item <= 8 && item >= 3)
+                        years = year;
+                    else
+                        years = year + 1;
+                    if (years % 4 == 0 && year % 100 != 0 || year % 400 == 0)
+                        days = 29;
+                    else
+                        days = 28;
+                    break;
+            }
+            totaldays += days;
+        });
+        return totaldays
     }
 }

+ 111 - 49
TEAMModelBI/ClientApp/src/view/teachermanage/school.vue

@@ -81,11 +81,17 @@
     </div>
     <!--学校列表end-->
     <!--编辑学校页面-->
-    <div class="backbtn" v-show="models==='details' && PowerShow">
+    <div class="backbtn" v-if="models==='details' && PowerShow">
         <el-button type="primary" icon="el-icon-back" @click="schoolClose">返回</el-button>
+        <el-button class="changebtn" v-if="store.state.changbtnShow && changebtns" @click="getSetschool()">
+            <svg class="changebtn-areaicon" aria-hidden="true">
+                <use xlink:href="#icon-wenjian"></use>
+            </svg>
+            <span class="changebtn-title">存储变更</span>
+        </el-button>
     </div>
     <div class="schoolDeatils">
-        <el-tabs type="border-card" v-show="models==='details' && PowerShow">
+        <el-tabs type="border-card" v-if="models==='details' && PowerShow" @tab-click="changeTabs">
             <el-tab-pane label="基础设置">
                 <div class="redactbox" v-show="models==='details' && PowerShow">
                     <div class="school-formbox">
@@ -95,18 +101,22 @@
                             </el-form-item>
                             <el-form-item label="校徽:" class="school-form-badge">
                                 <el-upload class="upload-demo" :headers="uploadHeader" action="/blob/upload-public" :before-upload="changeBadge" :on-success="success" :on-error="handleUpdErr">
-                                    <el-image style="width: 125px; height:125px" :src="nowPitchdata.picture" fit="contain"></el-image>
+                                    <el-image style="width: 100%; height:125px" :src="nowPitchdata.picture" fit="contain"></el-image>
                                     <div class="changebadge">
                                         <el-button>更 换</el-button>
                                     </div>
                                 </el-upload>
                             </el-form-item>
-                            <el-form-item label="学段:" class="school-form-grading">
+                            <!-- <el-form-item label="学段:" class="school-form-grading">
                                 <el-checkbox v-model="nowPitchdata.period[0].value" label="小学"></el-checkbox>
                                 <el-checkbox v-model="nowPitchdata.period[1].value" label="初中"></el-checkbox>
                                 <el-checkbox v-model="nowPitchdata.period[2].value" label="高中"></el-checkbox>
                                 <el-checkbox v-model="nowPitchdata.period[3].value" label="职高"></el-checkbox>
                                 <el-checkbox v-model="nowPitchdata.period[4].value" label="大学"></el-checkbox>
+                            </el-form-item> -->
+                            <el-form-item label="学校类型:" class="school-form-grading">
+                                <el-radio v-model="nowPitchdata.type" label="1" size="large">普教</el-radio>
+                                <el-radio v-model="nowPitchdata.type" label="2" size="large">高教</el-radio>
                             </el-form-item>
                             <el-form-item label="当前管家:" class="school-form-admin">
                                 <el-select v-model="adminvalue" placeholder="管家名单" multiple @change="assistChange">
@@ -130,8 +140,11 @@
                                     </el-option>
                                 </el-select>
                             </el-form-item>
+                            <el-form-item label="学校规模:" class="school-form-size">
+                                <el-input-number v-model="nowPitchdata.scale" :min="1" :step="100" />
+                            </el-form-item>
                             <el-form-item label="学校地址:" class="school-form-site">
-                                <el-input disabled :placeholder="nowPitchdata.province+nowPitchdata.city+nowPitchdata.dist" />
+                                <el-input disabled :placeholder="nowPitchdata.address" />
                             </el-form-item>
                             <el-form-item label="学校空间容量:" class="school-form-size">
                                 <el-input-number v-model="nowPitchdata.size" :min="1" :max="1000" />
@@ -148,7 +161,7 @@
                 </div>
             </el-tab-pane>
             <el-tab-pane label="学段管理">
-                <SetSchool></SetSchool>
+                <SetSchool :schoolData="studyPhase" ref="setSchoolData"></SetSchool>
             </el-tab-pane>
         </el-tabs>
     </div>
@@ -190,20 +203,13 @@ export default {
         let loading = ref(true)
         let uploadHeader = ref({})
         let nowPitchdata = ref({
+            address: '',
             areaId: '',
             campuses: [],
             city: '',
             dist: '',
             id: '',
             name: '',
-            period: [
-                { value1: false, name: '小学' },
-                { value2: false, name: '初中' },
-                { value3: false, name: '高中' },
-                { value4: false, name: '职高' },
-                { value5: false, name: '大学' },
-                { value6: false, name: '其他' },
-            ],
             picture: '',
             pk: '',
             province: '',
@@ -212,6 +218,8 @@ export default {
             size: 0,
             standard: '',
             admin: '',
+            type: 0,
+            scale: 0,
         })
         let originalData = ref([])
         const options = option
@@ -240,6 +248,11 @@ export default {
             Selectvalue: '',
             data: [],
         })
+        //学段管理(传输给子组件)
+        let studyPhase = ref()
+        //存储变更按钮显示show
+        let changebtns = ref(false)
+        let setSchoolData = ref(null)
         provinceOptions.value.optionInfo = optionsData
         console.log(store.state.point)
         //所有学校列表
@@ -262,27 +275,35 @@ export default {
         }
         //点击学校列表,详情
         function deleteRow(index, data) {
-            console.log(data, 'DATA')
+            console.log(index, data, 'DATA')
+            //处理的基础设置
             areaSelect.value.data = []
+            studyPhase.value = data.id
             nowPitchdata.value = Object.assign(nowPitchdata.value, data)
-            let checkboxInof = [
-                { value: false, name: '小学' },
-                { value: false, name: '初中' },
-                { value: false, name: '高中' },
-                { value: false, name: '职高' },
-                { value: false, name: '大学' },
-            ]
-            nowPitchdata.value.period = []
-            nowPitchdata.value.period.push(...checkboxInof)
-            if (data.period.length) {
-                for (let i in data.period) {
-                    data.period[i].name === '小学' ? (nowPitchdata.value.period[0].value = true) : ''
-                    data.period[i].name === '初中' ? (nowPitchdata.value.period[1].value = true) : ''
-                    data.period[i].name === '高中' ? (nowPitchdata.value.period[2].value = true) : ''
-                    data.period[i].name === '职高' ? (nowPitchdata.value.period[3].value = true) : ''
-                    data.period[i].name === '大学' ? (nowPitchdata.value.period[4].value = true) : ''
-                }
-            }
+            // let checkboxInof = [
+            //     { value: false, name: '小学' },
+            //     { value: false, name: '初中' },
+            //     { value: false, name: '高中' },
+            //     { value: false, name: '职高' },
+            //     { value: false, name: '大学' },
+            // ]
+            // nowPitchdata.value.period = []
+            // nowPitchdata.value.period.push(...checkboxInof)
+            // if (data.period.length) {
+            //     for (let i in data.period) {
+            //         data.period[i].name === '小学' ? (nowPitchdata.value.period[0].value = true) : ''
+            //         data.period[i].name === '初中' ? (nowPitchdata.value.period[1].value = true) : ''
+            //         data.period[i].name === '高中' ? (nowPitchdata.value.period[2].value = true) : ''
+            //         data.period[i].name === '职高' ? (nowPitchdata.value.period[3].value = true) : ''
+            //         data.period[i].name === '大学' ? (nowPitchdata.value.period[4].value = true) : ''
+            //     }
+            // }
+            nowPitchdata.value.address = data.address
+            nowPitchdata.value.name = data.name
+            nowPitchdata.value.type = data.type.toString()
+            nowPitchdata.value.scale = data.scale
+            nowPitchdata.value.standard = data.standard
+            nowPitchdata.value.areaId = data.areaId
             data.assists.length
                 ? data.assists.forEach((element) => {
                       adminvalue.value.push(element.tmdId)
@@ -290,9 +311,11 @@ export default {
                 : ''
             let token = JSON.parse(localStorage.getItem('id_token'))
             uploadHeader.value['x-auth-authtoken'] = token
-            models.value = 'details'
             data.areaId !== null ? (areaSelect.value.Selectvalue = data.areaId) : ''
+            console.log(store.state.point, '目前现有的所有区')
             store.state.point.length ? areaSelect.value.data.push(...store.state.point) : getoption()
+            models.value = 'details'
+            console.log(nowPitchdata.value, '查看当前学校的值')
         }
         //更换校徽
         function changeBadge(file) {
@@ -351,14 +374,6 @@ export default {
                 dist: '',
                 id: '',
                 name: '',
-                period: [
-                    { value1: false, name: '小学' },
-                    { value2: false, name: '初中' },
-                    { value3: false, name: '高中' },
-                    { value4: false, name: '职高' },
-                    { value5: false, name: '大学' },
-                    { value6: false, name: '其他' },
-                ],
                 picture: '',
                 pk: '',
                 province: '',
@@ -418,13 +433,15 @@ export default {
                 }
             }
             let updateForm = {
+                name: nowPitchdata.value.name,
                 schoolId: nowPitchdata.value.id,
                 picture: nowPitchdata.value.picture,
-                period: periodData,
                 size: nowPitchdata.value.size,
                 assistId: assistData,
-                tmdId: user.tmdId,
-                tmdName: user.tmdName,
+                scale: nowPitchdata.value.scale,
+                type: parseInt(nowPitchdata.value.type),
+                standard: nowPitchdata.value.standard,
+                areaId: nowPitchdata.value.areaId,
             }
             console.log(updateForm, '学校信息')
             proxy.$api.updateSchoolinfo(updateForm).then((res) => {
@@ -441,7 +458,6 @@ export default {
             let standname = areaSelect.value.data.filter((item) => {
                 return item.id === areaSelect.value.Selectvalue
             })
-            console.log(standname, nowPitchdata.value)
             let dataInfo = {
                 tmdId: user.tmdId,
                 tmdName: user.tmdName,
@@ -482,9 +498,28 @@ export default {
             tableData.value = originalData.value
             provinceOptions.value.optionInfo = optionsData
         }
+        //关于储存变更按钮
+        function changeTabs(value) {
+            console.log(value.props.label)
+            value.props.label == '学段管理' ? (changebtns.value = true) : (changebtns.value = false)
+        }
+        //获取子页面的数据
+        function getSetschool() {
+            console.log(setSchoolData.value.nowschoolData)
+            let newData = setSchoolData.value.nowschoolData
+            proxy.$api
+                .updateSchoolphase(newData)
+                .then((res) => {
+                    res.state === 200 ? (ElMessage.success('保存成功'), (studyPhase.value = res.schoolInfo.id), (changebtns.value = false)) : ElMessage.error('保存失败')
+                })
+                .catch((res) => {
+                    ElMessage.error('API异常,保存失败')
+                })
+        }
         getAllschool()
         getAllassists()
         return {
+            store,
             tableData,
             options,
             props,
@@ -516,6 +551,11 @@ export default {
             updateSuccess,
             PowerShow,
             closeSelectarea,
+            studyPhase,
+            changeTabs,
+            changebtns,
+            setSchoolData,
+            getSetschool,
         }
     },
 }
@@ -544,17 +584,17 @@ export default {
     width: 100%;
 }
 .backbtn {
-    width: 20%;
+    width: 100%;
     text-align: left;
     line-height: 20px;
 }
 .school-formbox {
     width: 85%;
     margin: 0 auto;
-    padding: 2%;
+    padding: 1%;
 }
 .upload-demo {
-    width: 125px;
+    width: 100%;
     height: 125px;
 }
 .school-form-name {
@@ -765,6 +805,21 @@ export default {
 }
 .schoolDeatils {
     margin-top: 0.5%;
+    position: relative;
+}
+.changebtn {
+    display: inline-block;
+    float: right;
+}
+.changebtn-title {
+    font-size: 12px;
+}
+.changebtn-areaicon {
+    width: 0.9em;
+    height: 0.9em;
+    vertical-align: -0.1em;
+    fill: currentColor;
+    margin-right: 3px;
 }
 </style>
 <style>
@@ -825,6 +880,13 @@ export default {
 .schoolDeatils .el-tabs__content {
     padding: 0px;
 }
+.backbtn .changebtn {
+    padding: 8px 15px;
+}
+.upload-demo .el-upload {
+    width: 100%;
+    height: 125px;
+}
 @media screen and (max-width: 1920px) {
     .school-formbox .school-form-badge {
         width: 17.5%;

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1137 - 82
TEAMModelBI/ClientApp/src/view/teachermanage/setschool.vue


+ 1 - 1
TEAMModelBI/ClientApp/src/view/teachermanage/traitmanage.vue

@@ -668,7 +668,7 @@ export default {
             let data = formLabelAlign.value
             console.log(data, '传递参数')
             let user = JSON.parse(localStorage.getItem('userData'))
-            let daInfo = { tmdId: user.tmdId, tmdName: user.tmdName, ability: data }
+            let daInfo = data
             proxy.$api.redactOraddAbility(daInfo).then((res) => {
                 console.log(res, '编辑或新增册别的API返回')
                 res.state === 200 ? (ElMessage.success('编辑成功'), pitch(nowPitch)) : ElMessage.error('编辑失败')

+ 13 - 11
TEAMModelBI/Controllers/BIAbility/AbilityMgmtController.cs

@@ -16,6 +16,7 @@ using System.Text;
 using TEAMModelOS.SDK.Models.Cosmos.BI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelBI.Filter;
+using TEAMModelBI.Tool.Extension;
 
 namespace TEAMModelBI.Controllers.BIAbility
 {
@@ -108,8 +109,8 @@ namespace TEAMModelBI.Controllers.BIAbility
             {
                 if (!jsonElement.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
                 if (!jsonElement.TryGetProperty("id", out JsonElement id)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
+
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
                 if (string.IsNullOrEmpty($"{standard}")) 
                 {
@@ -153,13 +154,15 @@ namespace TEAMModelBI.Controllers.BIAbility
         [ProducesDefaultResponseType]
         [AuthToken(Roles = "assist")]
         [HttpPost("upd-ability")]
-        public async Task<IActionResult> UpdAbility(RecordAbility recordAbility)
+        public async Task<IActionResult> UpdAbility(Ability ability)
         {
             try
             {
-                StringBuilder stringBuilder = new StringBuilder($"{recordAbility.tmdName}【{recordAbility.tmdId}】");
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
+
+                StringBuilder stringBuilder = new StringBuilder($"{_tmdName}【{_tmdId}】");
 
-                Ability ability = recordAbility.ability;
+                //Ability ability = recordAbility.ability;
                 ability.pk = "Ability";
                 ability.ttl = -1;
 
@@ -198,8 +201,8 @@ namespace TEAMModelBI.Controllers.BIAbility
                     }
                     tempType = "ability-add";
                     ability.id = Guid.NewGuid().ToString();
-                    ability.creatorId = string.IsNullOrEmpty($"{ability.creatorId}") ?$"{recordAbility.tmdId}": ability.creatorId;
-                    ability.creatorName = string.IsNullOrEmpty($"{ability.creatorName}") ? $"{recordAbility.tmdName}" : ability.creatorName;
+                    ability.creatorId = string.IsNullOrEmpty($"{ability.creatorId}") ? $"{_tmdId}" : ability.creatorId;
+                    ability.creatorName = string.IsNullOrEmpty($"{ability.creatorName}") ? $"{_tmdName}" : ability.creatorName;
                     tempAbility = await azureClient.GetContainer("TEAMModelOS", "Normal").CreateItemAsync(ability, new PartitionKey(ability.code));
                     stringBuilder.Append($"新增册别信息,册别编号:{tempAbility.id},册别名称:{tempAbility.name}");
                 }
@@ -244,10 +247,9 @@ namespace TEAMModelBI.Controllers.BIAbility
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
                 if (!jsonElement.TryGetProperty("isRequired", out JsonElement isRequired)) return BadRequest(); //是否是必修集合
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
                 var currencys = isRequired.ToObject<List<IsRequired>>();
 
                 foreach (var item in currencys)
@@ -265,7 +267,7 @@ namespace TEAMModelBI.Controllers.BIAbility
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  /biabilitymgmt/upd-isrequired  \n  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"BI,{_option.Location}  /biabilitymgmt/upd-currency  \n  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
                 return BadRequest();
             }
         }
@@ -279,7 +281,7 @@ namespace TEAMModelBI.Controllers.BIAbility
         }
 
         /// <summary>
-        /// 新增和删除是使用
+        /// 新增和修改是使用
         /// </summary>
         public record RecordAbility() 
         {

+ 6 - 14
TEAMModelBI/Controllers/BIAbility/AbilityTaskMgmtController.cs

@@ -16,6 +16,8 @@ using TEAMModelOS.SDK.Models.Cosmos.Common;
 using System.Text;
 using TEAMModelBI.Filter;
 using TEAMModelOS.SDK.Services;
+using TEAMModelBI.Tool.Extension;
+using TEAMModelOS.SDK.Extension;
 
 namespace TEAMModelBI.Controllers.BIAbility
 {
@@ -123,8 +125,9 @@ namespace TEAMModelBI.Controllers.BIAbility
             try
             {
                 var cosmosClient = _azureCosmos.GetCosmosClient();
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
-                StringBuilder msgBuilder = new StringBuilder($"{recordAbilityTask.tmdName}【{recordAbilityTask.tmdId}】");
+                StringBuilder msgBuilder = new StringBuilder($"{_tmdName}【{_tmdId}】");
                 string type = null;
                 long now = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                 foreach (var abilityTaskTree in recordAbilityTask.abilityTask)
@@ -232,9 +235,8 @@ namespace TEAMModelBI.Controllers.BIAbility
             {
                 if (!jsonElement.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
                 if (!jsonElement.TryGetProperty("id", out JsonElement id)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-                
+
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
                 var cosmosClient = _azureCosmos.GetCosmosClient();
                 var response = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"AbilityTask-{standard}"));
 
@@ -257,16 +259,6 @@ namespace TEAMModelBI.Controllers.BIAbility
 
         public record RecordAbilityTask() 
         {
-            /// <summary>
-            /// 醍摩豆账户ID
-            /// </summary>
-            public string tmdId { get; set; }
-
-            /// <summary>
-            /// 醍摩豆账户名称
-            /// </summary>
-            public string tmdName { get; set; }
-
             public string standard { get; set; }
 
             /// <summary>

+ 3 - 2
TEAMModelBI/Controllers/BISchool/AreaRelevantController.cs

@@ -8,6 +8,7 @@ using System.Linq;
 using System.Text.Json;
 using System.Threading.Tasks;
 using TEAMModelBI.Filter;
+using TEAMModelBI.Tool.Extension;
 using TEAMModelOS.Models;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
@@ -94,11 +95,11 @@ namespace TEAMModelBI.Controllers.BISchool
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
                 //if (!jsonElement.TryGetProperty("areaId", out JsonElement areaId)) return BadRequest();
                 if (!jsonElement.TryGetProperty("schoolId", out JsonElement schoolId)) return BadRequest();
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
+
                 var cosmosClient = _azureCosmos.GetCosmosClient();
                 School tempSchool = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{schoolId}", new PartitionKey("Base"));
 

+ 5 - 9
TEAMModelBI/Controllers/BISchool/BatchAreaController.cs

@@ -10,9 +10,6 @@ using TEAMModelOS.Models;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Models;
 using Azure.Cosmos;
-using DingTalk.Api;
-using DingTalk.Api.Request;
-using DingTalk.Api.Response;
 using System.Text.Json;
 using HTEXLib.COMM.Helpers;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
@@ -21,6 +18,7 @@ using Azure.Messaging.ServiceBus;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models.Service;
 using TEAMModelBI.Filter;
+using TEAMModelBI.Tool.Extension;
 
 namespace TEAMModelBI.Controllers.BISchool
 {
@@ -151,11 +149,11 @@ namespace TEAMModelBI.Controllers.BISchool
                 if (!jsonElement.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
                 if (!jsonElement.TryGetProperty("standardName", out JsonElement standardName)) return BadRequest();
                 jsonElement.TryGetProperty("institution", out JsonElement institution);
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
                 jsonElement.TryGetProperty("oldId", out JsonElement _oldId);
                 jsonElement.TryGetProperty("oldStandard", out JsonElement oldStandard);
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
+
                 //操作记录实体
                 var tempStandard = !string.IsNullOrEmpty($"{oldStandard}") && !string.IsNullOrEmpty($"{_oldId}") ? $"{oldStandard}" : "standard2";
                 
@@ -478,12 +476,10 @@ namespace TEAMModelBI.Controllers.BISchool
                 if (!jsonElement.TryGetProperty("oldStandard", out JsonElement _oldStandard)) return BadRequest();
                 if (!jsonElement.TryGetProperty("newId", out JsonElement _newId)) return BadRequest();
                 if (!jsonElement.TryGetProperty("newStandard", out JsonElement _newStandard)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
                 //操作记录实体
-                string blobOrTable = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
-                
+                string blobOrTable = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();                
                 var cosmosClient = _azureCosmos.GetCosmosClient();
 
                 List<string> abilityIds = new List<string>();  //册别的ID集合

+ 113 - 330
TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

@@ -132,8 +132,8 @@ namespace TEAMModelBI.Controllers.BISchool
                 if (!jsonElement.TryGetProperty("school_code", out JsonElement school_code)) return Ok(new { state = 1, message = "school_code参数错误!" });
                 if (!jsonElement.TryGetProperty("mode", out JsonElement mode)) return Ok(new { state = 1, message = "mode参数错误!" });     //del删除权限  up更新权限
                 if (!jsonElement.TryGetProperty("paramPower", out JsonElement paramPower)) return Ok(new { state = 1, message = "paramPower参数错误!" });
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
+                
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
                 List<Exist> havepower = new List<Exist>(); //已存在的
                 var client = _azureCosmos.GetCosmosClient();
 
@@ -210,9 +210,10 @@ namespace TEAMModelBI.Controllers.BISchool
         {
             try
             {
-                List<BISchool> schools = new List<BISchool>();
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
-                StringBuilder stringBuilder = new StringBuilder($"{foundSchools.tmdName}【{foundSchools.tmdId}】使用批量创校功能:");
+                List<BISchool> schools = new List<BISchool>();
+                StringBuilder stringBuilder = new StringBuilder($"{_tmdName}【{_tmdId}】使用批量创校功能:");
 
                 if (foundSchools.biSchools.Count > 0)
                 {
@@ -396,29 +397,24 @@ namespace TEAMModelBI.Controllers.BISchool
 
                 await foreach (var itemSchool in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<School>(queryText: stringBuilder.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Base") }))
                 {
-                    SchoolAssist schoolAssist = new SchoolAssist();
-                    schoolAssist.id = itemSchool.id;
-                    schoolAssist.code = itemSchool.code;
-                    schoolAssist.pk = itemSchool.pk;
-                    schoolAssist.ttl = itemSchool.ttl;
-                    schoolAssist.schoolCode = itemSchool.schoolCode;
-                    schoolAssist.name = itemSchool.name;
-                    schoolAssist.period = itemSchool.period;
-                    schoolAssist.campuses = itemSchool.campuses;
-                    schoolAssist.region = itemSchool.region;
-                    schoolAssist.province = itemSchool.province;
-                    schoolAssist.city = itemSchool.city;
-                    schoolAssist.dist = itemSchool.dist;
-                    schoolAssist.areaId = itemSchool.areaId;
-                    schoolAssist.size = itemSchool.size;
-                    schoolAssist.address = itemSchool.address;
-                    schoolAssist.picture = itemSchool.picture;
-                    schoolAssist.timeZone = itemSchool.timeZone;
-                    schoolAssist.type = itemSchool.type;
-                    schoolAssist.standard = itemSchool.standard;
-                    schoolAssist.hpappraise = itemSchool.hpappraise;
-                    schoolAssist.standard = itemSchool.standard;
-                    schoolAssist.areaId = itemSchool.areaId;
+                    SchoolAssist schoolAssist = new SchoolAssist()
+                    {
+                        id = itemSchool.id,
+                        code = itemSchool.code,
+                        schoolCode = itemSchool.schoolCode,
+                        name = itemSchool.name,
+                        region = itemSchool.region,
+                        province = itemSchool.province,
+                        city = itemSchool.city,
+                        dist = itemSchool.dist,
+                        size = itemSchool.size,
+                        address = itemSchool.address,
+                        picture = itemSchool.picture,
+                        type = itemSchool.type,
+                        scale = itemSchool.scale,
+                        areaId = itemSchool.areaId,
+                        standard = itemSchool.standard
+                    };
 
                     List<Assist> assists = new List<Assist>();
                     //查询学校的顾问
@@ -560,18 +556,20 @@ namespace TEAMModelBI.Controllers.BISchool
             try
             {
                 if (!jsonElement.TryGetProperty("schoolId", out JsonElement _schoolId)) return BadRequest();
-                if (!jsonElement.TryGetProperty("period", out JsonElement period)) return BadRequest();
+                if (!jsonElement.TryGetProperty("name", out JsonElement schoolName)) return BadRequest();
+                if (!jsonElement.TryGetProperty("areaId", out JsonElement areaId)) return BadRequest();
+                if (!jsonElement.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
+                //if (!jsonElement.TryGetProperty("period", out JsonElement period)) return BadRequest();
                 if (!jsonElement.TryGetProperty("picture", out JsonElement picture)) return BadRequest();
                 if (!jsonElement.TryGetProperty("size", out JsonElement size)) return BadRequest();
                 if (!jsonElement.TryGetProperty("scale", out JsonElement scale)) return BadRequest();
                 if (!jsonElement.TryGetProperty("assistId", out JsonElement _assistId)) return BadRequest();
-                //if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
-                //if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
+                if (!jsonElement.TryGetProperty("type", out JsonElement _type)) return BadRequest();
 
                 var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
                 List<string> assistId = _assistId.ToObject<List<string>>();
-                List<string> periodS = period.ToObject<List<string>>();
+                //List<string> periodS = period.ToObject<List<string>>();
 
                 Dictionary<string, List<Dictionary<string, string>>> haveSchoolManger = new Dictionary<string, List<Dictionary<string, string>>>();
 
@@ -581,15 +579,20 @@ namespace TEAMModelBI.Controllers.BISchool
                 {
                     List<Period> periods = new List<Period>();
                     string campusId = Guid.NewGuid().ToString();
-                    periodS.ForEach(x =>
-                    {
-                        periods.Add(new Period { id = Guid.NewGuid().ToString(), name = x.ToString(), campusId = campusId });
-                    });
+                    //periodS.ForEach(x =>
+                    //{
+                    //    periods.Add(new Period { id = Guid.NewGuid().ToString(), name = x.ToString(), campusId = campusId });
+                    //});
 
-                    tempShool.period = periods;
+                    //tempShool.period = periods;
                     tempShool.size = !string.IsNullOrEmpty($"{size}") ? int.Parse($"{size}") : tempShool.size;
                     tempShool.scale = !string.IsNullOrEmpty($"{scale}") ? int.Parse($"{scale}") : tempShool.scale;
                     tempShool.picture = $"{picture}";
+                    tempShool.type = int.Parse($"{_type}");
+                    tempShool.name = $"{schoolName}";
+                    tempShool.areaId = $"{areaId}";
+                    tempShool.standard = $"{standard}";
+
                     //修改学校
                     await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(tempShool, tempShool.id, new PartitionKey("Base"));
 
@@ -613,8 +616,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                     var tems = await cosmosClient.GetContainer("TEAMModelOS", "School").DeleteItemAsync<SchoolTeacher>(item.id, new PartitionKey(item.code));
                                 }
                             }
-                        }
-                        //bool temp = item.roles.Contains("assist");                        
+                        }                   
                     }
 
                     if (assistId.Count > 0)
@@ -698,52 +700,10 @@ namespace TEAMModelBI.Controllers.BISchool
                             }
                         }
                     }
-
-                    //SchoolAssist schoolAssist = new();
-                    //schoolAssist.id = tempShool.id;
-                    //schoolAssist.code = tempShool.code;
-                    //schoolAssist.pk = tempShool.pk;
-                    //schoolAssist.ttl = tempShool.ttl;
-                    //schoolAssist.schoolCode = tempShool.schoolCode;
-                    //schoolAssist.name = tempShool.name;
-                    //schoolAssist.period = tempShool.period;
-                    //schoolAssist.campuses = tempShool.campuses;
-                    //schoolAssist.region = tempShool.region;
-                    //schoolAssist.province = tempShool.province;
-                    //schoolAssist.city = tempShool.city;
-                    //schoolAssist.dist = tempShool.dist;
-                    //schoolAssist.areaId = tempShool.areaId;
-                    //schoolAssist.size = tempShool.size;
-                    //schoolAssist.address = tempShool.address;
-                    //schoolAssist.picture = tempShool.picture;
-                    //schoolAssist.timeZone = tempShool.timeZone;
-                    //schoolAssist.type = tempShool.type;
-                    //schoolAssist.standard = tempShool.standard;
-                    //schoolAssist.hpappraise = tempShool.hpappraise;
-
-                    //List<Assist> assists = new List<Assist>();
-                    ////查询学校的顾问
-                    //string managerSql = $"SELECT DISTINCT REPLACE(c.code, 'Teacher-', '') AS schoolId, c.id, c.name FROM c WHERE ARRAY_CONTAINS(c.roles, 'assist', true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.code = 'Teacher-{tempShool.id}'";
-                    //var cosmosClent = _azureCosmos.GetCosmosClient();
-                    //await foreach (var item in cosmosClent.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: managerSql, requestOptions: new QueryRequestOptions() { }))
-                    //{
-                    //    using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                    //    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
-                    //    {
-                    //        Assist assist = new Assist
-                    //        {
-                    //            tmdId = obj.GetProperty("id").GetString(),
-                    //            tmdName = obj.GetProperty("name").GetString()
-                    //        };
-                    //        assists.Add(assist);
-                    //    }
-                    //}
-
-                    //schoolAssist.assists = assists;
                 }
 
                 //保存操作记录
-                await _azureStorage.SaveLog("TeacherRoles-update", $"{_tmdName}【{_tmdId}】修改学校功能,修改的学校:{_schoolId},{string.Join("|", periodS.ToArray())},{picture},{size},{string.Join("|", assistId.ToArray())}", _dingDing, httpContext: HttpContext);
+                await _azureStorage.SaveLog("TeacherRoles-update", $"{_tmdName}【{_tmdId}】修改学校功能,修改的学校:{_schoolId},{_type},{picture},{size},{string.Join("|", assistId.ToArray())}", _dingDing, httpContext: HttpContext);
 
 
                 return Ok(new { state = 200 });
@@ -756,277 +716,97 @@ namespace TEAMModelBI.Controllers.BISchool
         }
 
         /// <summary>
-        /// 增加学段
+        /// 查询区域的学校
         /// </summary>
+        /// <param name="jsonElement"></param>
         /// <returns></returns>
         [ProducesDefaultResponseType]
-        [AuthToken(Roles = "assist")]
-        [HttpPost("upd-schoolperiod")]
-        public async Task<IActionResult> UpdSchoolPeriod(JsonElement jsonElement)
+        [HttpPost("get-schooldist")]
+        public async Task<IActionResult> GetSchoolDist(JsonElement jsonElement)
         {
             try
             {
-                if (!jsonElement.TryGetProperty("schooId", out JsonElement _schoolCode)) return BadRequest();   //学校编号
-                jsonElement.TryGetProperty("campusId", out JsonElement _campusId);      //校区ID  新增时
-                jsonElement.TryGetProperty("campusName", out JsonElement _campusName);        //校区   新增时
-                if (!jsonElement.TryGetProperty("periodName", out JsonElement _periodName)) return BadRequest();    //新增学段名称
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-         
-                StringBuilder stringBuilder = new StringBuilder($"{_tmdId}【{_tmdName}】新增学校的学段,");
-                School school = new();
+                if (!jsonElement.TryGetProperty("dist", out JsonElement _dist)) return BadRequest();
 
                 var cosmosClient = _azureCosmos.GetCosmosClient();
-                try
-                {
-                    school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{_schoolCode}", new PartitionKey("Base"));
-                }
-                catch (Exception) { }
-
-                if (school != null)
-                {
-                    if (!string.IsNullOrEmpty($"{_campusId}"))
-                    {
-                        school.period.Add(new Period { id = Guid.NewGuid().ToString(), name = $"{_periodName}", campusId = $"{_campusId}" });
-                        stringBuilder.Append($"在原有校区中添加学段:学段ID:{_campusId}学段名称:{_periodName}");
-                    }
-                    else
-                    {
-                        string campusId = Guid.NewGuid().ToString();
-                        school.period.Add(new Period { id = Guid.NewGuid().ToString(), name = $"{_periodName}", campusId = campusId });
-                        school.campuses.Add(new Campus { id = campusId, name = $"{_campusName}" });
-                        stringBuilder.Append($"新建校区中在添加学段:学段ID:{_campusId}学段名称:{_periodName}");
-                    }
-
-                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(school, school.id, new PartitionKey("Base"));
-
-                    //保存操作记录
-                    await _azureStorage.SaveLog("schoolperiod-add", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
-
-                    return Ok(new { state = 200, school });
-                }
-                else return Ok(new { state = 400, school });
-
-            }
-            catch (Exception ex)
-            {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  /batchschool/upd-schoolperiod   \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
-                return BadRequest();
-            }
-        }
+                string sqltxt = $"SELECT * FROM c where c.dist='{_dist}'";
 
-        /// <summary>
-        /// 修改学校学段信息
-        /// </summary>
-        /// <param name="jsonElement"></param>
-        /// <returns></returns>
-        [ProducesDefaultResponseType]
-        [AuthToken(Roles = "assist")]
-        [HttpPost("set-schoolperiod")]
-        public async Task<IActionResult> SetSchoolPeriod(JsonElement jsonElement)
-        {
-            try
-            {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-                if (!jsonElement.TryGetProperty("schooId", out JsonElement _schoolCode)) return BadRequest();   //学校编号
-                if (!jsonElement.TryGetProperty("setId", out JsonElement _setId)) return BadRequest();          //修改学段的ID
-                if (!jsonElement.TryGetProperty("setName", out JsonElement _setName)) return BadRequest();           //修改学段的名称
+                List<School> schools = new List<School>();
 
-                var cosmosClient = _azureCosmos.GetCosmosClient();
-                School school = new();
-                try
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<School>(queryText: sqltxt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Base") }))
                 {
-                    school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{_schoolCode}", new PartitionKey("Base"));
+                    schools.Add(item);
                 }
-                catch (Exception) { }
-
-                if (school != null)
-                {
-                    school.period.Find(x => x.id.Equals($"{_setId}")).name = $"{_setName}";
-
-                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(school, school.id, new PartitionKey("Base"));
-
-                    //保存操作记录
-                    await _azureStorage.SaveLog("schoolperiod-update", $"{_tmdId}【{_tmdName}】修改学校学段信息,修改ID和名称:{_setId}{_setName}", _dingDing, httpContext: HttpContext);
 
-                    return Ok(new { state = 200, school });
-                }
-                else return Ok(new { state = 400, school });
+                return Ok(new { state = 200, schools });
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  /batchschool/set-schoolperiod   \n {ex.Message}{ex.StackTrace} ", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"BI,{_option.Location}   /batchschool/get-schooldist  \n  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
                 return BadRequest();
             }
         }
 
         /// <summary>
-        /// 删除学校学段
+        /// 分页学校和顾问信息
         /// </summary>
         /// <param name="jsonElement"></param>
         /// <returns></returns>
-        [ProducesDefaultResponseType]
-        [AuthToken(Roles = "assist")]
-        [HttpPost("del-schoolperiod")]
-        public async Task<IActionResult> DelSchoolPeriod(JsonElement jsonElement)
+        [HttpPost("get-schools")]
+        public async Task<IActionResult> GetSchools(JsonElement jsonElement) 
         {
-            try
-            {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-                if (!jsonElement.TryGetProperty("schooId", out JsonElement _schoolCode)) return BadRequest();   //学校编号
-                if (!jsonElement.TryGetProperty("delId", out JsonElement _delId)) return BadRequest();               //删除学段的ID
+            //List<School> schools = new List<School>();
+            List<SchoolAssist> schoolAssists = new List<SchoolAssist>();
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            if (!jsonElement.TryGetProperty("endPosition", out JsonElement endPosition)) return BadRequest();
+            if (!jsonElement.TryGetProperty("pageSize", out JsonElement pageSize)) return BadRequest();
 
-                var cosmosClient = _azureCosmos.GetCosmosClient();
-                School school = new();
-                try
-                {
-                    school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{_schoolCode}", new PartitionKey("Base"));
-                }
-                catch (Exception) { }
-
-                if (school != null)
-                {
-                    school.period.Remove(school.period.Find(x => x.id.Equals($"{_delId}")));
-                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(school, school.id, new PartitionKey("Base"));
+            string sqltxt = $"SELECT * FROM c order by c.id offset {endPosition} limit {pageSize}";
 
-                    //保存操作记录
-                    await _azureStorage.SaveLog("ability-update", $"{_tmdId}【{_tmdName}】删除学校的学段", _dingDing, httpContext: HttpContext);
-
-                    return Ok(new { state = 200, school });
-                }
-                else return Ok(new { state = 400, school });
-            }
-            catch (Exception ex)
+            await foreach (var itemSchool in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<School>(queryText: sqltxt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Base") }))
             {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  /batchschool/del-schoolperiod \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
-                return BadRequest();
-            }
-        }
-
-        /// <summary>
-        /// 增加、修改、删除学段信息
-        /// </summary>
-        /// <param name="jsonElement"></param>
-        /// <returns></returns>
-        [ProducesDefaultResponseType]
-        [AuthToken(Roles = "assist")]
-        [HttpPost("set-schoolperiodinfo")]
-        public async Task<IActionResult> SetSchoolPeriodInfo(JsonElement jsonElement)
-        {
-            try
-            {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-                if (!jsonElement.TryGetProperty("schooId", out JsonElement _schoolCode)) return BadRequest();   //学校编号
-                if (!jsonElement.TryGetProperty("mode", out JsonElement _mode)) return BadRequest();   //执行方式 upd 新增学段   set 修改学段  del删除学段
-                jsonElement.TryGetProperty("campusId", out JsonElement _campusId);            //校区ID  新增学段
-                jsonElement.TryGetProperty("campusName", out JsonElement _campusName);        //校区    新增学段
-                jsonElement.TryGetProperty("periodName", out JsonElement _periodName);        //新增学段名称
-                jsonElement.TryGetProperty("setId", out JsonElement _setId);                  //修改学段的ID
-                jsonElement.TryGetProperty("setName", out JsonElement _setName);              //修改学段的名称
-                jsonElement.TryGetProperty("delId", out JsonElement _delId);                  //删除学段的ID
-
-                StringBuilder stringBuilder = new StringBuilder($"{_tmdId}【{_tmdName}】");
-                string tempType = null;
-                var cosmosClient = _azureCosmos.GetCosmosClient();
-
-                School school = new();
-                try
+                SchoolAssist schoolAssist = new SchoolAssist()
                 {
-                    school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{_schoolCode}", new PartitionKey("Base"));
-                }
-                catch (Exception) { }
-
-                if (school != null)
+                    id = itemSchool.id,
+                    code = itemSchool.code,
+                    schoolCode = itemSchool.schoolCode,
+                    name = itemSchool.name,
+                    region = itemSchool.region,
+                    province = itemSchool.province,
+                    city = itemSchool.city,
+                    dist = itemSchool.dist,
+                    size = itemSchool.size,
+                    address = itemSchool.address,
+                    picture = itemSchool.picture,
+                    type = itemSchool.type,
+                    scale = itemSchool.scale,
+                    areaId = itemSchool.areaId,
+                    standard = itemSchool.standard
+                };
+
+                List<Assist> assists = new List<Assist>();
+                //查询学校的顾问
+                string managerSql = $"SELECT DISTINCT REPLACE(c.code, 'Teacher-', '') AS schoolId, c.id, c.name FROM c WHERE ARRAY_CONTAINS(c.roles, 'assist', true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.code = 'Teacher-{itemSchool.id}'";
+                var cosmosClent = _azureCosmos.GetCosmosClient();
+                await foreach (var item in cosmosClent.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: managerSql, requestOptions: new QueryRequestOptions() { }))
                 {
-                    switch ($"{_mode}")
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
                     {
-                        //新增学段
-                        case "upd":
-
-                            if (string.IsNullOrEmpty($"{_periodName}")) return Ok(new { state = 1 });
-                            if (!string.IsNullOrEmpty($"{_campusId}"))
-                            {
-                                school.period.Add(new Period { id = Guid.NewGuid().ToString(), name = $"{_periodName}", campusId = $"{_campusId}" });
-                                stringBuilder.Append($"新增学校学段,在原有校区中添加学段:学段ID:{_campusId}学段名称:{_periodName}");
-
-                            }
-                            else
-                            {
-                                string campusId = Guid.NewGuid().ToString();
-                                school.period.Add(new Period { id = Guid.NewGuid().ToString(), name = $"{_periodName}", campusId = campusId });
-                                school.campuses.Add(new Campus { id = campusId, name = $"{_campusName}" });
+                        Assist assist = new Assist
+                        {
+                            tmdId = obj.GetProperty("id").GetString(),
+                            tmdName = obj.GetProperty("name").GetString()
+                        };
 
-                                stringBuilder.Append($"新增学校学段,新建校区中在添加学段:学段ID:{_campusId}学段名称:{_periodName}");
-                            }
-                            tempType = "schoolperiod-add";
-                            break;
-                        //修改学段
-                        case "set":
-                            school.period.Find(x => x.id.Equals($"{_setId}")).name = $"{_setName}";
-                            stringBuilder.Append($"修改学校学段,修改ID和名称:{_setId}{_setName}");
-                            tempType = "schoolperiod-set";
-                            break;
-
-                        //删除学段
-                        case "del":
-                            school.period.Remove(school.period.Find(x => x.id.Equals($"{_delId}")));
-                            stringBuilder.Append($"删除学校的学段,删除学段ID和名称:{_delId}");
-                            tempType = "schoolperiod-del";
-                            break;
-                        default:
-                            return Ok(new { state = 1, message = "mode参数错误" });
+                        assists.Add(assist);
                     }
-
-                    //保存操作记录
-                    await _azureStorage.SaveLog(tempType?.ToString(), stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
-
-                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(school, school.id, new PartitionKey("Base"));
-
-                    return Ok(new { state = 200, school });
                 }
-                else return Ok(new { state = 400, school });
-
-            }
-            catch (Exception ex)
-            {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  /batchschool/set-schoolperiodinfo   \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
-                return BadRequest();
+                schoolAssist.assists = assists;
+                schoolAssists.Add(schoolAssist);
             }
-        }
-
-        /// <summary>
-        /// 查询区域的学校
-        /// </summary>
-        /// <param name="jsonElement"></param>
-        /// <returns></returns>
-        [ProducesDefaultResponseType]
-        [HttpPost("get-schooldist")]
-        public async Task<IActionResult> GetSchoolDist(JsonElement jsonElement)
-        {
-            try
-            {
-                if (!jsonElement.TryGetProperty("dist", out JsonElement _dist)) return BadRequest();
-
-                var cosmosClient = _azureCosmos.GetCosmosClient();
-                string sqltxt = $"SELECT * FROM c where c.dist='{_dist}'";
-
-                List<School> schools = new List<School>();
-
-                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<School>(queryText: sqltxt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Base") }))
-                {
-                    schools.Add(item);
-                }
 
-                return Ok(new { state = 200, schools });
-            }
-            catch (Exception ex)
-            {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}   /batchschool/get-schooldist  \n  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
-                return BadRequest();
-            }
+            return Ok(new { state = 200, schoolAssists });
         }
 
 
@@ -1093,7 +873,6 @@ namespace TEAMModelBI.Controllers.BISchool
             return periods;
         }
 
-
         public record SchoolConfig
         {
             public string Lang { get; set; }
@@ -1139,13 +918,27 @@ namespace TEAMModelBI.Controllers.BISchool
 
         #endregion
 
-
-
-        public class SchoolAssist : School
+        public class SchoolAssist
         {
+            public string id { get; set; }
+            public string code { get; set; }
+            public string schoolCode { get; set; }
+            public string name { get; set; }
+            public string region { get; set; }
+            public string province { get; set; }
+            public string city { get; set; }
+            public string dist { get; set; }
+            public int size { get; set; }
+            public string address { get; set; }
+            public string picture { get; set; }
+            public int type { get; set; }
+            public int scale { get; set; }
+            public string standard { get; set; }
+            public string areaId { get; set; }
             public List<Assist> assists { get; set; }
 
         }
+
         public class Assist
         {
             public string tmdId { get; set; }
@@ -1158,16 +951,6 @@ namespace TEAMModelBI.Controllers.BISchool
         /// </summary>
         public record FoundSchools()
         {
-            /// <summary>
-            ///醍摩豆账户ID
-            /// </summary>
-            public string tmdId { get; set; }
-
-            /// <summary>
-            /// 醍摩豆账户名称
-            /// </summary>
-            public string tmdName { get; set; }
-
             /// <summary>
             /// 语系
             /// </summary>

+ 2 - 4
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -15,7 +15,6 @@ using TEAMModelOS.Models;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
-using TEAMModelOS.SDK.Models.Cosmos.BI;
 
 namespace TEAMModelBI.Controllers.BISchool
 {
@@ -96,12 +95,12 @@ namespace TEAMModelBI.Controllers.BISchool
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
                 if (!jsonElement.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
                 if (!jsonElement.TryGetProperty("schoolCode", out JsonElement _schoolCode)) return BadRequest();
                 if (!jsonElement.TryGetProperty("areaId", out JsonElement _areaId)) return BadRequest();
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
+
                 List<string> schoolCodes = _schoolCode.ToObject<List<string>>();
 
                 var cosmosCliet = _azureCosmos.GetCosmosClient();
@@ -294,7 +293,6 @@ namespace TEAMModelBI.Controllers.BISchool
             }
         }
 
-
         /// <summary>
         /// 顾问学校空间使用情况
         /// </summary>

+ 36 - 103
TEAMModelBI/Controllers/BITest/TestController.cs

@@ -54,7 +54,6 @@ namespace TEAMModelBI.Controllers.BITest
         private readonly IWebHostEnvironment _environment; //读取文件
         //读取配置文件
         private readonly IConfiguration _configuration;
-        public readonly string mobel = "测试接口";
 
         public TestController(AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage, IOptionsSnapshot<Option> option, IWebHostEnvironment hostingEnvironment, IConfiguration configuration)
         {
@@ -299,38 +298,6 @@ namespace TEAMModelBI.Controllers.BITest
 
         }
 
-        /// <summary>
-        /// 分页
-        /// </summary>
-        /// <returns></returns>
-        [HttpPost("get-testpage")]
-        public async Task<IActionResult> GetTestPage()
-        {
-            List<string> st = new List<string> { { "1-23" }, { "2-022" }, { "3-ijjis" }, { "4-ssss" }, { "5-02rrr2" }, { "6-00srr22" }, { "7-002sr2" }, { "8-00s2srg2" }, { "9-0022ssgf" }, { "10-0ssa022" }, { "11-002saf2" }, { "12-0022" } };
-
-            List<pageTest> pageTests = new List<pageTest>();
-            List<pageTest1> pageTests1 = new List<pageTest1>();
-            foreach (var item in st)
-            {
-                int i = 0;
-                pageTest pageTest = new pageTest();
-                pageTest.keyt = $"分页{i}";
-                pageTest.listv = item;
-                pageTests.Add(pageTest);
-                i += 1;
-            }
-
-            for (int i = 0; i < st.Count; i++)
-            {
-                pageTest1 pageTest = new pageTest1();
-                pageTest.keyt = $"分页{i}";
-                pageTest.listv = st.Skip(i).Take(1).ToList();
-                pageTests1.Add(pageTest);
-            }
-
-            return Ok(new {  pageTests1 });
-        }
-
         /// <summary>
         /// 赋值默认的顾问角色和BI默认的功能权限
         /// </summary>
@@ -370,7 +337,6 @@ namespace TEAMModelBI.Controllers.BITest
             return Ok(new { state = 200, response });
         }
 
-
         /// <summary>
         /// 保存日志文件
         /// </summary>
@@ -384,39 +350,6 @@ namespace TEAMModelBI.Controllers.BITest
             return Ok(123);
         }
 
-        /// <summary>
-        /// 课例二维数组统计
-        /// </summary>
-        /// <param name="jsonElement"></param>
-        /// <returns></returns>
-        [HttpPost("get-test")]
-        public async Task<IActionResult> test(JsonElement jsonElement)
-        {
-            var cosmosClient = _azureCosmos.GetCosmosClient();
-
-            List<lessons> lessons = new List<lessons>();
-            List<LessonCount> lessonCounts = new List<LessonCount>();
-            List<List<double>> begin = new();
-
-            await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS,"School").GetItemQueryIterator<LessonCount>(queryText:$"select value(c) from c where c.pk='LessonCount'",requestOptions:new QueryRequestOptions() { }))
-            {
-                lessons le = new lessons() {
-                    countB =item.beginCount.Count,
-                    countP = item.pCount.Count,
-                    countT = item.tCount.Count,
-                    countPT = item.ptCount.Count,
-                    lesson = item
-                };
-                lessons.Add(le);
-                lessonCounts.Add(item);
-                begin.Add(item.beginCount);
-            }
-
-
-
-            return Ok(new { state = 200 , lessonCounts });
-        }
-
         /// <summary>
         /// 测试使用 CosmosDB中的COUNT 函数统计
         /// </summary>
@@ -670,30 +603,11 @@ namespace TEAMModelBI.Controllers.BITest
             return Ok(new { state = 200 });
         }
 
-        [HttpPost("get-diptid")]
-        public async Task<IActionResult> GetDeptIdUser(JsonElement jsonElement) 
-        {
-            if (!jsonElement.TryGetProperty("deptId", out JsonElement deptId)) return BadRequest();
-            string divide = _configuration["CustomParam:SiteScope"];
-
-            Dictionary<string, object> dic = new Dictionary<string, object> { { "PartitionKey", $"{divide}" } };
-            List<DingDingUserInfo> tempUserInfo = await _azureStorage.FindListByDict<DingDingUserInfo>(dic);
-
-            List<DingDingUserInfo> userInfo = new();
-            tempUserInfo.ForEach(x => {
-                if (x.depts.Contains($"{deptId}")) 
-                {
-                    if (x.depts.Contains($"{x.pid}")) 
-                    {
-                        userInfo.Add(x);
-                    }
-                    userInfo.Add(x);
-                }
-            });
-
-            return Ok(new { state = 200, count = userInfo.Count, userInfo });
-        }
-
+        /// <summary>
+        /// 去重、判断
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
         [HttpPost("get-repeat")]
         public async Task<IActionResult> GetRepeat(JsonElement jsonElement) 
         {
@@ -775,6 +689,12 @@ namespace TEAMModelBI.Controllers.BITest
             return Ok(new { state = 200, day });
             
         }
+        
+        /// <summary>
+        /// 测试获取传过来的头部
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
         [ProducesDefaultResponseType]
         [HttpPost("get-xauth")]
         public async Task<IActionResult> GetXAuth(JsonElement jsonElement) 
@@ -785,8 +705,8 @@ namespace TEAMModelBI.Controllers.BITest
             //var (id, name, pic, did, dname, dpic) = HttpJwtAnalysis.GetAuthTokenInfo(HttpContext);
 
 
-            var (tmdId, tmdName) = HttpJwtAnalysis.JwtXAuth(_auth, _option);
-            //var (tmdId, tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(_auth, _option);
+            //var (tmdId, tmdName) = HttpJwtAnalysis.JwtXAuth(_auth, _option);
+            var (tmdId, tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(_auth, _option);
 
             // var (id, name) = httpXAuth(_auth, _option);
 
@@ -804,20 +724,33 @@ namespace TEAMModelBI.Controllers.BITest
 
         }
 
-
-        public (string id, string name) httpXAuth(string auth,Option option)
+        /// <summary>
+        /// 测试CosmosDB分页查询
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [HttpPost("get-page")]
+        public async Task<IActionResult> cosmosDBPage(JsonElement jsonElement) 
         {
-            string id = null;
-            string name = null;
-
-            if (!string.IsNullOrWhiteSpace(auth) && JwtAuthExtension.ValidateApiToken(auth, option.JwtSecretKey))
+            if (!jsonElement.TryGetProperty("pageSize", out JsonElement pageSize)) return BadRequest();
+            if (!jsonElement.TryGetProperty("endPosition", out JsonElement endPosition)) return BadRequest();
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            List<School> schools = new List<School>();
+            //string sqlTxt = $"SELECT * FROM c where c.code='Base' order by c.id offset {endPosition} limit {pageSize}";
+            string sqlTxt = $"SELECT * FROM c order by c.id offset {pageSize} limit {endPosition}";
+            await foreach (var tempPage in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator(queryText: sqlTxt, requestOptions:new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
             {
-                var jwt = new JwtSecurityTokenHandler().ReadJwtToken(auth);
-                id = jwt.Payload.Sub;
-                name = jwt.Claims.FirstOrDefault(claim => claim.Type.Equals("name"))?.Value;
+                using var json = await JsonDocument.ParseAsync(tempPage.ContentStream);
+                if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt16() > 0)
+                {
+                    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                    {
+                        schools.Add(obj.ToObject<School>());
+                    }
+                }
             }
 
-            return (id, name);
+            return Ok(new { state = 200, schools });
         }
 
 

+ 1 - 1
TEAMModelBI/Controllers/DingDingStruc/DDStructController.cs

@@ -19,7 +19,7 @@ using TEAMModelOS.SDK.Models;
 using TEAMModelBI.Controllers.BISchool;
 using TEAMModelOS.SDK.Models.Cosmos.BI;
 using Microsoft.Azure.Cosmos.Table;
-
+using TEAMModelOS.SDK;
 
 namespace TEAMModelBI.Controllers.DingDingStruc
 {

+ 14 - 16
TEAMModelBI/Controllers/DingDingStruc/TableDingDingInfoController.cs

@@ -22,6 +22,7 @@ using System.Text;
 using Azure.Cosmos;
 using Microsoft.Azure.Cosmos.Table;
 using TEAMModelBI.Filter;
+using TEAMModelBI.Tool.Extension;
 
 namespace TEAMModelBI.Controllers.DingDingStruc
 {
@@ -61,12 +62,10 @@ namespace TEAMModelBI.Controllers.DingDingStruc
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-
                 string appKey = _configuration["DingDingAuth:appKey"];
                 string appSecret = _configuration["DingDingAuth:appSecret"];
                 string divide = _configuration["CustomParam:SiteScope"];
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
                 HttpClient httpClient = _http.CreateClient();
                 string url = _configuration.GetValue<string>("HaBookAuth:CoreId:userinfo");
@@ -238,13 +237,10 @@ namespace TEAMModelBI.Controllers.DingDingStruc
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
-
                 string appKey = _configuration["DingDingAuth:appKey"];
                 string appSecret = _configuration["DingDingAuth:appSecret"];
-
                 string divide = _configuration["CustomParam:SiteScope"];
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
                 //获取access_token
                 IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
@@ -312,13 +308,12 @@ namespace TEAMModelBI.Controllers.DingDingStruc
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称 
-
                 string appKey = _configuration["DingDingAuth:appKey"];
                 string appSecret = _configuration["DingDingAuth:appSecret"];
                 string divide = _configuration["CustomParam:SiteScope"];
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
+
                 //获取access_token
                 IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
                 OapiGettokenRequest request = new OapiGettokenRequest() { Appkey = appKey, Appsecret = appSecret };
@@ -373,11 +368,10 @@ namespace TEAMModelBI.Controllers.DingDingStruc
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称
                 if (!jsonElement.TryGetProperty("partitionKey", out JsonElement partitionKey)) return BadRequest();
                 if (!jsonElement.TryGetProperty("rowKey", out JsonElement userId)) return BadRequest();
                 if (!jsonElement.TryGetProperty("permissions", out JsonElement _permissions)) return BadRequest();
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
 
                 StringBuilder stringBuilder = new StringBuilder($"{_tmdName}【{_tmdId}】醍摩豆账号");
                 List<DingDingUserInfo> ddUserInfo = new List<DingDingUserInfo>();
@@ -565,11 +559,10 @@ namespace TEAMModelBI.Controllers.DingDingStruc
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
                 if (!jsonElement.TryGetProperty("rowKey", out JsonElement rowKey)) return BadRequest();
                 if (!jsonElement.TryGetProperty("mobile", out JsonElement mobile)) return BadRequest();
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
                 List<DingDingUserInfo> tempddUsers = null;
                 List<DingDingUserInfo> ddUsers = new List<DingDingUserInfo>();
                 StringBuilder tableSql = new StringBuilder();
@@ -638,6 +631,11 @@ namespace TEAMModelBI.Controllers.DingDingStruc
             }        
         }
 
+        /// <summary>
+        /// 设置系统管理员
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
         [ProducesDefaultResponseType]
         [AuthToken(Roles = "admin")]
         [HttpPost("set-backend")]
@@ -645,12 +643,12 @@ namespace TEAMModelBI.Controllers.DingDingStruc
         {
             try
             {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
                 if (!jsonElement.TryGetProperty("columnKey", out JsonElement partitionKey)) return BadRequest();
                 if (!jsonElement.TryGetProperty("rowKey", out JsonElement rowKey)) return BadRequest();
                 if (!jsonElement.TryGetProperty("isAdmin", out JsonElement isAdmin)) return BadRequest();
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
+
                 var tempUser = await _azureStorage.FindListByDict<DingDingUserInfo>(new Dictionary<string, object> { { "PartitionKey", $"{partitionKey}" }, { "RowKey", $"{rowKey}" } });
                 List<ddUserInfo> ddUserInfos = new();
                 List<string> roles = new();//角色列表

+ 1 - 0
TEAMModelBI/Controllers/LoginController.cs

@@ -31,6 +31,7 @@ using Azure.Storage.Sas;
 using System.Net.Http.Json;
 using TEAMModelBI.Filter;
 using TEAMModelBI.Models.Extension;
+using TEAMModelOS.SDK;
 //using static DingTalk.Api.Response.OapiV2UserGetResponse;
 
 namespace TEAMModelBI.Controllers

+ 4 - 3
TEAMModelBI/Controllers/OperateRecord/OperateLogController.cs

@@ -13,6 +13,8 @@ using TEAMModelOS.SDK.Models.Cosmos.BI;
 using System.Text;
 using TEAMModelOS.SDK.Models.Table;
 using TEAMModelBI.Filter;
+using TEAMModelBI.Tool.Extension;
+using TEAMModelOS.SDK.Extension;
 
 namespace TEAMModelBI.Controllers.OperateRecord
 {
@@ -79,13 +81,12 @@ namespace TEAMModelBI.Controllers.OperateRecord
         public async Task<IActionResult> DelOperateLogRecord(JsonElement jsonElement) 
         {
             try
-            {
-                if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();   //醍摩豆账户
-                if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest(); //醍摩豆账号名称                
+            {             
                 jsonElement.TryGetProperty("startDate", out JsonElement startDate);
                 jsonElement.TryGetProperty("endDate", out JsonElement endDate);
                 jsonElement.TryGetProperty("rowKey", out JsonElement rowKey);
 
+                var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
                 //var temp = await _azureStorage.Delete<OperateLog>(partitionKey: "OperateLog-BI", rowKey: $"{startDate}");  //删除单个
                 StringBuilder operateStr = new StringBuilder($"{_tmdName}【{_tmdId}】账户删除操作记录,");
                 StringBuilder tableStrWhere = new StringBuilder();

+ 1 - 0
TEAMModelBI/Startup.cs

@@ -16,6 +16,7 @@ using System.IdentityModel.Tokens.Jwt;
 using System.Linq;
 using System.Threading.Tasks;
 using TEAMModelOS.Models;
+using TEAMModelOS.SDK;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Filter;

+ 12 - 8
TEAMModelOS.FunctionV4/CosmosDB/CommonTrigger.cs

@@ -7,8 +7,10 @@ using System.Linq;
 using System.Text;
 using System.Text.Json;
 using System.Threading.Tasks;
+using TEAMModelOS.SDK;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelOS.FunctionV4
 {
@@ -20,7 +22,8 @@ namespace TEAMModelOS.FunctionV4
         private readonly DingDing _dingDing;
         private readonly AzureRedisFactory _azureRedis;
         private IConfiguration _configuration { get; set; }
-        public CommonTrigger(AzureCosmosFactory azureCosmos, AzureServiceBusFactory azureServiceBus, AzureStorageFactory azureStorage, DingDing dingDing, AzureRedisFactory azureRedis
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public CommonTrigger(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory azureServiceBus, AzureStorageFactory azureStorage, DingDing dingDing, AzureRedisFactory azureRedis
           , IConfiguration configuration
           )
         {
@@ -30,6 +33,7 @@ namespace TEAMModelOS.FunctionV4
             _dingDing = dingDing;
             _azureRedis = azureRedis;
             _configuration = configuration;
+            _coreAPIHttpService=coreAPIHttpService;
         }
         [Function("Common")]
         public async Task Common([CosmosDBTriggerAttribute(
@@ -69,25 +73,25 @@ namespace TEAMModelOS.FunctionV4
                                 switch (data.pk)
                                 {
                                     case "Exam":
-                                        await TriggerExam.Trigger(_azureCosmos, _serviceBus, _azureStorage, _dingDing, client, element, data);
+                                        await TriggerExam.Trigger(_coreAPIHttpService,_azureCosmos, _serviceBus, _azureStorage, _dingDing, client, element, data);
                                         break;
                                     case "Vote":
-                                        await TriggerVote.Trigger(_serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
+                                        await TriggerVote.Trigger(_coreAPIHttpService, _serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
                                         break;
                                     case "Survey":
-                                        await TriggerSurvey.Trigger(_serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
+                                        await TriggerSurvey.Trigger(_coreAPIHttpService, _serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
                                         break;
                                     case "Correct":
-                                        await TriggerCorrect.Trigger(_serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis);
+                                        await TriggerCorrect.Trigger(_coreAPIHttpService, _serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis);
                                         break;
                                     case "ExamLite":
-                                        await TriggerExamLite.Trigger(_serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
+                                        await TriggerExamLite.Trigger(_coreAPIHttpService, _serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
                                         break;
                                     case "Study":
-                                        await TriggerStudy.Trigger(_serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
+                                        await TriggerStudy.Trigger(_coreAPIHttpService, _serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
                                         break;
                                     case "Homework":
-                                        await TriggerHomework.Trigger(_serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
+                                        await TriggerHomework.Trigger(_coreAPIHttpService, _serviceBus, _azureStorage, _dingDing, client, element, data, _azureRedis, _configuration);
                                         break;
 
                                 }

+ 3 - 2
TEAMModelOS.FunctionV4/CosmosDB/TriggerCorrect.cs

@@ -15,17 +15,18 @@ using TEAMModelOS.SDK.Models.Table;
 using HTEXLib.COMM.Helpers;
 using Azure;
 
+
 namespace TEAMModelOS.FunctionV4
 {
     public static class TriggerCorrect
     {
-        public static async Task Trigger(AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
            CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis)
         {
             if ((tdata.status != null && tdata.status.Value == 404) || tdata.ttl > 0)
             {
                 ActivityList data = input.ToObject<ActivityList>();
-                await ActivityService.DeleteActivity(client, _dingDing, data);
+                await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
                 return;
             }
             var adid = tdata.id;

+ 49 - 13
TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs

@@ -18,7 +18,7 @@ namespace TEAMModelOS.FunctionV4
 {
     public class TriggerExam
     {
-        public static async Task Trigger(AzureCosmosFactory _azureCosmos, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService, AzureCosmosFactory _azureCosmos, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
             CosmosClient client, JsonElement input, TriggerData data)
         {
             
@@ -29,7 +29,7 @@ namespace TEAMModelOS.FunctionV4
                 if ((data.status != null && data.status.Value == 404) || data.ttl > 0)
                 {
                     ActivityList activity = input.ToObject<ActivityList>();
-                    await ActivityService.DeleteActivity(client, _dingDing, activity);
+                    await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, activity);
                     return;
                 }
                 ExamInfo info = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<ExamInfo>(data.id, new Azure.Cosmos.PartitionKey($"{data.code}"));
@@ -72,6 +72,8 @@ namespace TEAMModelOS.FunctionV4
                     {
                         sub.Add(subject.id);
                     }
+                    //整合名单
+                    List<string> classes = ExamService.getClasses(info.classes, info.stuLists);
                     //ChangeRecord record = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<ChangeRecord>(input.Id, new Azure.Cosmos.PartitionKey($"{info.progress}"));
                     switch (info.progress)
                     {
@@ -105,8 +107,7 @@ namespace TEAMModelOS.FunctionV4
 
                             try
                             {
-                                //处理活动中间件
-                                (List<string> classes, List<RGroupList> members) = await Activity(info, client, _dingDing, sub);
+
                                 //向学生或醍摩豆账号发起通知
                                 #region
                                 //Notice notice = new Notice()
@@ -129,9 +130,11 @@ namespace TEAMModelOS.FunctionV4
                                 //messageBlob.ApplicationProperties.Add("name", "Notice");
                                 //await _serviceBus.GetServiceBusClient().SendMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageBlob);
                                 #endregion
+                                //List<string> classes = new List<string>();
                                 if (examClassResults.Count == 0)
                                 {
-
+                                    //处理活动中间件
+                                    List<RGroupList> members = await Activity(_coreAPIHttpService,info, classes, client, _dingDing, sub);
                                     foreach (string cla in classes)
                                     {
                                         int m = 0;
@@ -295,6 +298,20 @@ namespace TEAMModelOS.FunctionV4
                                         }
                                         gno++;
                                     }
+                                    if (gno == info.subjects.Count) {
+                                        var isScore = examClassResults.SelectMany(e => e.studentScores).ToList().Exists(c => c.Contains(-1));
+                                        int newStatus = 0;
+                                        if (!isScore)
+                                        {
+                                            newStatus = 1;
+                                        }
+                                        //判断评分状态是否发生变化,便于实时的更新评测基本信息
+                                        if (info.sStatus != newStatus)
+                                        {
+                                            info.sStatus = newStatus;
+                                            await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync<ExamInfo>(info, info.id, new PartitionKey(info.code));
+                                        }
+                                    }
                                 }
                             }
                             catch (Exception e)
@@ -344,7 +361,7 @@ namespace TEAMModelOS.FunctionV4
                                 }                               
                                 //处理活动中间件
                                 if (info.source.Equals("1")) {
-                                    await Activity(info, client, _dingDing, sub);
+                                    await Activity(_coreAPIHttpService,info, classes,client, _dingDing, sub);
                                 }                                
                                 foreach (ExamSubject subject in info.subjects)
                                 {
@@ -549,7 +566,7 @@ namespace TEAMModelOS.FunctionV4
                 await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测作答记录结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
             }
         }
-        public static async Task<(List<string> classes,List<RGroupList> members)> Activity(ExamInfo info, CosmosClient client, DingDing _dingDing, List<string> sub) {
+        public static async Task<List<RGroupList>> Activity(CoreAPIHttpService _coreAPIHttpService, ExamInfo info, List<string> classes,CosmosClient client, DingDing _dingDing, List<string> sub) {
             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
             if (info.groupLists.Count > 0)
             {
@@ -562,8 +579,7 @@ namespace TEAMModelOS.FunctionV4
                     }
                 }
             }
-            List<string> classes = ExamService.getClasses(info.classes, info.stuLists);
-            (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, info.school, ps);
+            (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService,client, _dingDing, classes, info.school, ps);
             var addStudentsCls = tchList.FindAll(x => x.type == 2);
             var addTmdidsCls = tchList.FindAll(x => x.type == 1);
             List<StuActivity> stuActivities = new List<StuActivity>();
@@ -572,6 +588,15 @@ namespace TEAMModelOS.FunctionV4
             {
                 addTmdidsCls.ForEach(x =>
                 {
+                    HashSet<string> classIds = new HashSet<string>();
+                    classLists.ForEach(z => {
+                        z.members.ForEach(y => {
+                            if (y.id.Equals(x.id) && y.type == 1)
+                            {
+                                classIds.Add(z.id);
+                            }
+                        });
+                    });
                     tmdActivities.Add(new StuActivity
                     {
                         pk = "Activity",
@@ -591,16 +616,26 @@ namespace TEAMModelOS.FunctionV4
                         owner = info.owner,
                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                         taskStatus = -1,
+                        ext = new Dictionary<string, JsonElement>() { { "type",info.type.ToJsonString().ToObject<JsonElement>() },{ "subjects", info.subjects.ToJsonString().ToObject<JsonElement>() } },
                         //sStatus = info.sStatus,
-                        classIds = classes
+                        classIds = classIds.ToList()
 
-                    });
+                    }); ;
                 });
             }
             if (addStudentsCls.IsNotEmpty())
             {
                 addStudentsCls.ForEach(x =>
                 {
+                    HashSet<string> classIds = new HashSet<string>();
+                    classLists.ForEach(z => {
+                        z.members.ForEach(y => {
+                            if (y.id.Equals(x.id) && y.code.Equals(info.school) && y.type == 2)
+                            {
+                                classIds.Add(z.id);
+                            }
+                        });
+                    });
                     stuActivities.Add(new StuActivity
                     {
                         pk = "Activity",
@@ -618,15 +653,16 @@ namespace TEAMModelOS.FunctionV4
                         subjects = sub,
                         blob = null,
                         owner = info.owner,
-                        classIds = classes,
+                        classIds = classIds.ToList(),
                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
+                        ext = new Dictionary<string, JsonElement>() { { "type", info.type.ToJsonString().ToObject<JsonElement>() }, { "subjects", info.subjects.ToJsonString().ToObject<JsonElement>() } },
                         taskStatus = -1
                         //sStatus = info.sStatus,
                     });
                 });
             }
             await ActivityService.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities, null);
-            return (classes, classLists);
+            return  classLists;
         }
 
         public static async Task knowledgeCount(ExamInfo info, ExamSubject subject, DingDing _dingDing, int no, List<ExamClassResult> classResults,

+ 4 - 3
TEAMModelOS.FunctionV4/CosmosDB/TriggerExamLite.cs

@@ -14,12 +14,13 @@ using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelOS.FunctionV4
 {
     public static class TriggerExamLite
     {
-        public static async Task Trigger(AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger (CoreAPIHttpService _coreAPIHttpService, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
                     CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis, IConfiguration _configuration)
         {
             try
@@ -27,7 +28,7 @@ namespace TEAMModelOS.FunctionV4
                 if ((tdata.status != null && tdata.status.Value == 404) || tdata.ttl > 0)
                 {
                     ActivityList data = input.ToObject<ActivityList>();
-                    await ActivityService.DeleteActivity(client, _dingDing, data);
+                    await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
                     return;
                 }
                 var adid = tdata.id;
@@ -88,7 +89,7 @@ namespace TEAMModelOS.FunctionV4
                                     }
                                 }
                             }
-                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, lite.tchLists, lite.school, ps);
+                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, lite.tchLists, lite.school, ps);
                             List<StuActivity> tchActivities = new List<StuActivity>();
                             (string standard, List<string> tmdids, string school, List<string> update, int statistics)  list =    (null,null, null, new List<string> { StatisticsService.TeacherExamLite }, 0)  ;
                             if (tchList.IsNotEmpty())

+ 34 - 7
TEAMModelOS.FunctionV4/CosmosDB/TriggerHomework.cs

@@ -20,7 +20,7 @@ namespace TEAMModelOS.FunctionV4
 {
     public static class TriggerHomework
     {
-        public static async Task Trigger(AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService,AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
                     CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis, IConfiguration _configuration)
         {
             try
@@ -28,7 +28,7 @@ namespace TEAMModelOS.FunctionV4
                 if ((tdata.status != null && tdata.status.Value == 404) || tdata.ttl > 0)
                 {
                     ActivityList data = input.ToObject<ActivityList>();
-                    await ActivityService.DeleteActivity(client, _dingDing, data);
+                    await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
                     return;
                 }
                 var adid = tdata.id;
@@ -90,7 +90,7 @@ namespace TEAMModelOS.FunctionV4
                                 }
                             }
                             List<string> classes = ExamService.getClasses(work.classes, work.stuLists);
-                            (List<RMember> tmdids, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, work.school, ps);
+                            (List<RMember> tmdids, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classes, work.school, ps);
                             var addStudentsCls = tmdids.FindAll(x => x.type == 2);
                             var addTmdidsCls = tmdids.FindAll(x => x.type == 1);
                             List<StuActivity> stuActivities = new List<StuActivity>();
@@ -100,6 +100,15 @@ namespace TEAMModelOS.FunctionV4
                             {
                                 addTmdidsCls.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) && y.type == 1)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     tmdActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -118,7 +127,7 @@ namespace TEAMModelOS.FunctionV4
                                         owner = work.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
+                                        classIds = classIds.ToList()
                                     });
                                 });
                             }
@@ -126,6 +135,15 @@ namespace TEAMModelOS.FunctionV4
                             {
                                 addStudentsCls.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) &&y.code.Equals(work.school) && y.type ==2)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     stuActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -144,11 +162,11 @@ namespace TEAMModelOS.FunctionV4
                                         owner = work.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
+                                        classIds = classIds.ToList()
                                     });
                                 });
                             }
-                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, work.tchLists, work.school,ps);
+                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, work.tchLists, work.school,ps);
                             (string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.OfflineRecord }, 0);
                             if (tchList.IsNotEmpty())
                             {
@@ -162,6 +180,15 @@ namespace TEAMModelOS.FunctionV4
                                 }
                                 tchList.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classInfos.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) && y.type == 1)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     tchActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -180,7 +207,7 @@ namespace TEAMModelOS.FunctionV4
                                         owner = work.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = work.tchLists
+                                        classIds = classIds.ToList()
                                     });
                                      
                                 });

+ 4 - 3
TEAMModelOS.FunctionV4/CosmosDB/TriggerStudy.cs

@@ -14,12 +14,13 @@ using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelOS.FunctionV4
 {
     public static class TriggerStudy
     {
-        public static async Task Trigger(AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
                     CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis, IConfiguration _configuration)
         {
             try
@@ -27,7 +28,7 @@ namespace TEAMModelOS.FunctionV4
                 if ((tdata.status != null && tdata.status.Value == 404) || tdata.ttl > 0 || tdata.publish == 1)
                 {
                     ActivityList data = input.ToObject<ActivityList>();
-                    await ActivityService.DeleteActivity(client, _dingDing, data);
+                    await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
                     return;
                 }
                 var adid = tdata.id;
@@ -89,7 +90,7 @@ namespace TEAMModelOS.FunctionV4
                                         }
                                     }
                                 }
-                                (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, study.tchLists, study.school, ps);
+                                (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, study.tchLists, study.school, ps);
                                 List<StuActivity> tchActivities = new List<StuActivity>();
                                 (string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.OfflineRecord }, 0);
                                 if (tchList.IsNotEmpty())

+ 35 - 8
TEAMModelOS.FunctionV4/CosmosDB/TriggerSurvey.cs

@@ -26,7 +26,7 @@ namespace TEAMModelOS.FunctionV4
 {
     public class TriggerSurvey
     {
-        public static async Task Trigger(AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService,AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
                CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis, IConfiguration _configuration)
         {
             try
@@ -34,7 +34,7 @@ namespace TEAMModelOS.FunctionV4
                 if ((tdata.status != null && tdata.status.Value == 404) || tdata.ttl > 0)
                 {
                     ActivityList data = input.ToObject<ActivityList>();
-                    await ActivityService.DeleteActivity(client, _dingDing, data);
+                    await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
                     _azureRedis.GetRedisClient(8).KeyDelete($"Survey:Record:{tdata.id}");
                     _azureRedis.GetRedisClient(8).KeyDelete($"Survey:Submit:{tdata.id}");
                     return;
@@ -97,7 +97,7 @@ namespace TEAMModelOS.FunctionV4
                                 }
                             }
                             List<string> classes = ExamService.getClasses(survey.classes, survey.stuLists);
-                            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, survey.school);
+                            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classes, survey.school);
                             var addStudentsCls = tmdIds.FindAll(x => x.type == 2);
                             var addTmdidsCls = tmdIds.FindAll(x => x.type == 1);
 #if DEBUG
@@ -110,6 +110,15 @@ namespace TEAMModelOS.FunctionV4
                             {
                                 addTmdidsCls.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x.id)&& y.type==1) 
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     tmdActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -128,7 +137,7 @@ namespace TEAMModelOS.FunctionV4
                                         owner = survey.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
+                                        classIds = classIds.ToList()
                                     });
                                 });
                             }
@@ -136,6 +145,15 @@ namespace TEAMModelOS.FunctionV4
                             {
                                 addStudentsCls.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x.id)&& y.code.Equals(survey.school) && y.type == 2)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     stuActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -154,11 +172,11 @@ namespace TEAMModelOS.FunctionV4
                                         owner = survey.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
-                                    });
+                                        classIds = classIds.ToList()
+                                    }); 
                                 });
                             }
-                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, survey.tchLists, survey.school, ps);
+                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, survey.tchLists, survey.school, ps);
                             (string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.TeacherSurvey }, 0);
                             if (tchList.IsNotEmpty())
                             {
@@ -172,6 +190,15 @@ namespace TEAMModelOS.FunctionV4
                                 }
                                 tchList.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classInfos.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x.id)  && y.type == 1)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     tchActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -190,7 +217,7 @@ namespace TEAMModelOS.FunctionV4
                                         owner = survey.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = survey.tchLists
+                                        classIds = classIds.ToList()
                                     });
                                 });
 

+ 34 - 7
TEAMModelOS.FunctionV4/CosmosDB/TriggerVote.cs

@@ -23,7 +23,7 @@ namespace TEAMModelOS.FunctionV4
     public static class TriggerVote
     {
 
-        public static async Task Trigger(AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
             CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis, IConfiguration _configuration)
         {
             try
@@ -31,7 +31,7 @@ namespace TEAMModelOS.FunctionV4
                 if ((tdata.status != null && tdata.status.Value == 404) || tdata.ttl > 0)
                 {
                     ActivityList data = input.ToObject<ActivityList>();
-                    await ActivityService. DeleteActivity(client, _dingDing, data);
+                    await ActivityService. DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
                     _azureRedis.GetRedisClient(8).KeyDelete($"Vote:Record:{tdata.id}");
                     _azureRedis.GetRedisClient(8).KeyDelete($"Vote:Count:{tdata.id}");
                     return;
@@ -95,7 +95,7 @@ namespace TEAMModelOS.FunctionV4
                                 }
                             }
                             List<string> classes = ExamService.getClasses(vote.classes, vote.stuLists);
-                            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, vote.school, ps);
+                            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classes, vote.school, ps);
                             var addStudentsCls = tmdIds.FindAll(x => x.type == 2);
                             var addTmdidsCls = tmdIds.FindAll(x => x.type == 1);
                             //await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动" +
@@ -115,6 +115,15 @@ namespace TEAMModelOS.FunctionV4
                             {
                                 tmds.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) && y.type == 1)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     tmdActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -133,7 +142,7 @@ namespace TEAMModelOS.FunctionV4
                                         owner = vote.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
+                                        classIds = classIds.ToList()
                                     });
                                 });
                             }
@@ -141,6 +150,15 @@ namespace TEAMModelOS.FunctionV4
                             {
                                 addStudentsCls.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) && y.code.Equals(vote.school) && y.type == 2)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     stuActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -159,11 +177,11 @@ namespace TEAMModelOS.FunctionV4
                                         owner = vote.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
+                                        classIds = classIds.ToList()
                                     });
                                 });
                             }
-                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, vote.tchLists, vote.school, ps);
+                            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, vote.tchLists, vote.school, ps);
                             (string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.TeacherVote }, 0);
                             if (tchList.IsNotEmpty())
                             {
@@ -177,6 +195,15 @@ namespace TEAMModelOS.FunctionV4
                                 }
                                 tchList.ForEach(x =>
                                 {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classInfos.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) && y.type == 1)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
                                     tchActivities.Add(new StuActivity
                                     {
                                         pk = "Activity",
@@ -195,7 +222,7 @@ namespace TEAMModelOS.FunctionV4
                                         owner = vote.owner,
                                         createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         taskStatus = -1,
-                                        classIds = classes
+                                        classIds = classIds.ToList()
                                     });
                                 });
 

+ 27 - 7
TEAMModelOS.FunctionV4/HttpTrigger/ScsYxptApis.cs

@@ -118,6 +118,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
                             List<ScSchool> schools = result.content.ToObject<List<ScSchool>>();
                             if (schools.IsNotEmpty())
                             {
+                                schools.ForEach(x => { x.ProjectID = int.Parse(ps.pd); x.ProjectItemID = int.Parse(ps.pid); });
                                 scSchools.AddRange(schools);
                             }
                         }
@@ -231,7 +232,10 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
                             if (diagnoses.IsNotEmpty())
                             {
                                 projects.Add(new ScsProjectDiagnosis { project = ps, diagnoses = diagnoses, });
-                                await _azureStorage.SaveOrUpdate<ScProjectDiagnosis>(new ScProjectDiagnosis {schoolCode=$"{schoolCode}",areaId= areaId, RowKey = $"{ps.pid}-{schoolCode}", PartitionKey = "ScSchoolDiagnosis", abilityNos = diagnoses.ToJsonString() });
+                                await _azureStorage.SaveOrUpdate<ScProjectDiagnosis>(new ScProjectDiagnosis {schoolCode=$"{schoolCode}",areaId= areaId,
+                                    ProjectID=int.Parse(ps.pd),
+                                    ProjectItemID=int.Parse(ps.pid),
+                                    RowKey = $"{ps.pid}-{schoolCode}", PartitionKey = "ScSchoolDiagnosis", abilityNos = diagnoses.ToJsonString() });
                             }
                         }
                         else
@@ -366,6 +370,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
                 areaId = $"{_areaId}";
             }
             JsonElement pxid = data.ToObject<JsonElement>().GetProperty("pxid");
+            JsonElement schoolCode = data.ToObject<JsonElement>().GetProperty("schoolCode");
             ScAccessConfig config = $"{accessConfig}".ToObject<ScAccessConfig>();
             Code = "GetDiagnosisListByProject_V2";
             parameterMap = new Dictionary<string, object>();
@@ -384,7 +389,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
                     }
                     if (abilityNos.IsNotEmpty())
                     {
-                        await _azureStorage.SaveOrUpdate<ScTeacherDiagnosis>(new ScTeacherDiagnosis {areaId=areaId, RowKey = $"{pxid}", PartitionKey = "ScTeacherDiagnosis", abilityNos = abilityNos.ToJsonString() });
+                        await _azureStorage.SaveOrUpdate<ScTeacherDiagnosis>(new ScTeacherDiagnosis {areaId = areaId,schoolCode=$"{schoolCode}", RowKey = $"{pxid}", PartitionKey = "ScTeacherDiagnosis", abilityNos = abilityNos.ToJsonString() });
                     }
                 }
                 else
@@ -517,7 +522,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
             List<KeyValuePair<TeacherTrain, string>> trainsNO = new List<KeyValuePair<TeacherTrain, string>>();
             List<PushFail> fails = new List<PushFail>();
             List<ScTeacher> scTeachers = await _azureStorage.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" } });
-          //  List<ScTeacherDiagnosis> diagnoses = await _azureStorage.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis", }});
+            //  List<ScTeacherDiagnosis> diagnoses = await _azureStorage.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis", }});
             trains.ForEach(x => {
                 var teacher = teachers.Find(t => t.id.Equals(x.id));
                 if (teacher == null)
@@ -550,6 +555,25 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
             await response.WriteAsJsonAsync(new { });
             return response;
         }
+        //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
+        public (int t53122OK, List<KeyValuePair<string, string>> msgs) check53122(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs) {
+            int t53122OK = 1;
+            if (teacherTrain.offlineRecords.Count<= 0)
+            {
+                msgs.Add(new KeyValuePair<string, string>("offlineRecord-count", $"文件个数为0"));
+            }
+            teacherTrain.offlineRecords.ForEach(x => {
+                if (string.IsNullOrEmpty(x.url)) {
+                    msgs.Add(new KeyValuePair<string, string>("offlineRecord-url", $"链接为空"));
+                }
+                if (x.size<=0)
+                {
+                    msgs.Add(new KeyValuePair<string, string>("offlineRecord-size", $"文件大小"));
+                }
+            });
+            return (t53122OK, msgs);
+        }
+
         //5.3.1.17学员课堂实录批量回写-UploadKTSLList
         public (int t53117OK, List<KeyValuePair<string, string>> msgs) check53117(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs) {
             //校验 基本情况是否满足
@@ -623,15 +647,12 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
                 if (teacherTrain.currency.teacherAilities.IsNotEmpty())
                 {
                     insql = $" where c.id in ({string.Join(",", teacherTrain.currency.teacherAilities.Select(o => $"'{o.id}'"))})";
-
                 }
-              
                 //认证材料
                 await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher")
                          .GetItemQueryIterator<AbilitySub>(queryText: $"select value(c) from c {insql}", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilitySub-{teacherTrain.school}-{teacherTrain.id}") }))
                 {
                     abilitySubs.Add(item);
-
                 }
                 teacherTrain.currency.teacherAilities.ForEach(x => {
                     var  abilitySub= abilitySubs.Find(z => z.id.Equals(x.id));
@@ -648,7 +669,6 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
                     }
                 });
                 t53113OK = 0;
-
             }
             return (t53113OK, msgs, abilitySubs);
         }

+ 1 - 0
TEAMModelOS.FunctionV4/Program.cs

@@ -36,6 +36,7 @@ namespace TEAMModelOS.FunctionV4
                services.AddHttpClient<DingDing>();
                services.AddHttpClient<ThirdApisService>();
                services.AddHttpClient<NotificationService>();
+               services.AddHttpClient<CoreAPIHttpService>();
                services.AddAzureCosmos(context.Configuration.GetSection("Azure:Cosmos:ConnectionString").Get<string>());
                services.AddAzureServiceBus(context.Configuration.GetSection("Azure:ServiceBus:ConnectionString").Get<string>());
                services.AddAzureStorage(context.Configuration.GetSection("Azure:Storage:ConnectionString").Get<string>());

+ 7 - 5
TEAMModelOS.FunctionV4/ServiceBus/ActiveTaskTopic.cs

@@ -36,8 +36,9 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
         private readonly AzureServiceBusFactory _serviceBus;
         private readonly Option _option;
         private readonly NotificationService _notificationService;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         private readonly IConfiguration _configuration;
-        public ActiveTaskTopic(AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, AzureServiceBusFactory serviceBus, IOptionsSnapshot<Option> option, NotificationService notificationService, IConfiguration configuration)
+        public ActiveTaskTopic(CoreAPIHttpService  coreAPIHttpService,AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, AzureServiceBusFactory serviceBus, IOptionsSnapshot<Option> option, NotificationService notificationService, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
             _dingDing = dingDing;
@@ -47,6 +48,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
             _option = option?.Value;
             _notificationService = notificationService;
             _configuration = configuration;
+            _coreAPIHttpService = coreAPIHttpService;
         }
         [Function("Exam")]
         public async Task ExamFunc([ServiceBusTrigger("%Azure:ServiceBus:ActiveTask%", "exam", Connection = "Azure:ServiceBus:ConnectionString")] string msg)
@@ -1125,7 +1127,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                 }
                 foreach (var cls in courseChange.addClass)
                 {
-                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, new List<string> { cls }, courseChange.school);
+                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, new List<string> { cls }, courseChange.school);
                     var addStudentsCls = tchList.FindAll(x => x.type == 2);
                     var addTmdidsCls = tchList.FindAll(x => x.type == 1);
                     foreach (var stu in addStudentsCls)
@@ -1207,7 +1209,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
 
                 foreach (var list in courseChange.addList)
                 {
-                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, new List<string> { list }, courseChange.school);
+                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, new List<string> { list }, courseChange.school);
                     var addStudentsCls = tchList.FindAll(x => x.type == 2);
                     var addTmdidsCls = tchList.FindAll(x => x.type == 1);
                     foreach (var stu in addStudentsCls)
@@ -1289,7 +1291,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
 
                 foreach (var delCls in courseChange.delClass)
                 {
-                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, new List<string> { delCls }, courseChange.school);
+                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, new List<string> { delCls }, courseChange.school);
                     var delStudentsCls = tchList.FindAll(x => x.type == 2);
                     var delTmdidsCls = tchList.FindAll(x => x.type == 1);
                     foreach (var stu in delStudentsCls)
@@ -1349,7 +1351,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                 }
                 foreach (var delList in courseChange.delList)
                 {
-                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, new List<string> { delList }, courseChange.school);
+                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, new List<string> { delList }, courseChange.school);
                     var delStudentsCls = tchList.FindAll(x => x.type == 2);
                     var delTmdidsCls = tchList.FindAll(x => x.type == 1);
                     foreach (var stu in delStudentsCls)

+ 1 - 0
TEAMModelOS.FunctionV4/local.settings.json

@@ -4,6 +4,7 @@
     "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=teammodellog;AccountKey=lxVDrgs+6rKtmASL3k1WrarrEd5Rk42wS1Mu5+sqQlPya1JLSlFDtnZUvMPeHHe7zlESfn/1NY7CZdGviy2UCw==;EndpointSuffix=core.chinacloudapi.cn",
     "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
     "Azure:Storage:ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelstorage;AccountKey=Yq7D4dE6cFuer2d2UZIccTA/i0c3sJ/6ITc8tNOyW+K5f+/lWw9GCos3Mxhj47PyWQgDL8YbVD63B9XcGtrMxQ==;EndpointSuffix=core.chinacloudapi.cn",
+    //"Azure:Storage:ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelos;AccountKey=Dl04mfZ9hE9cdPVO1UtqTUQYN/kz/dD/p1nGvSq4tUu/4WhiKcNRVdY9tbe8620nPXo/RaXxs+1F9sVrWRo0bg==;EndpointSuffix=core.chinacloudapi.cn",
     "Azure:ServiceBus:ConnectionString": "Endpoint=sb://teammodelos.servicebus.chinacloudapi.cn/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sy4h4EQ8zP+7w/lOLi1X3tGord/7ShFHimHs1vC50Dc=",
     "Azure:Cosmos:ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;",
     "Azure:Redis:ConnectionString": "52.130.252.100:6379,password=habook,ssl=false,abortConnect=False,writeBuffer=10240",

+ 33 - 6
TEAMModelOS.SDK/DI/CoreAPI/CoreAPIHttpService.cs

@@ -1,4 +1,6 @@
 using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
 using System;
 using System.Collections.Generic;
 using System.Net;
@@ -10,14 +12,38 @@ using System.Threading.Tasks;
 using TEAMModelOS.SDK.Extension;
 
 
-namespace TEAMModelOS.SDK.Models.Service
+namespace TEAMModelOS.SDK
 {
+    public static class CoreAPIHttpServiceExtensions
+    {
+        public static IServiceCollection AddCoreAPIHttpService(this IServiceCollection services,  IConfiguration _configuration,string name = "Default")
+        {
+            if (services == null) throw new ArgumentNullException(nameof(services));
+            string location = _configuration.GetValue<string>("Option:Location");
+            string url = _configuration.GetValue<string>("HaBookAuth:CoreAPI");
+            var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
+            var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
+            services.AddHttpClient<CoreAPIHttpService>();
+            services.Configure<CoreAPIHttpServiceOptions>(name  , o => { o.location = location;o.url =url;o.clientID = clientID; o.clientSecret = clientSecret; });
+            return services;
+        }
+    }
+    public class CoreAPIHttpServiceOptions
+    {
+        public string location { get; set; }
+        public string url { get; set; }
+        public string clientID { get; set; }
+        public string clientSecret { get; set; }
+
+    }
     public class CoreAPIHttpService
     {
         private readonly HttpClient _httpClient;
-        public CoreAPIHttpService(HttpClient httpClient)
+        public readonly IOptionsMonitor<CoreAPIHttpServiceOptions> options;
+        public CoreAPIHttpService(HttpClient httpClient, IOptionsMonitor<CoreAPIHttpServiceOptions> optionsMonitor)
         {
             _httpClient = httpClient;
+            options = optionsMonitor;
         }
         /// <summary>
         ///  隐式登录
@@ -83,12 +109,13 @@ namespace TEAMModelOS.SDK.Models.Service
         /// <param name="url"></param>
         /// <param name="data"></param>
         /// <returns></returns>
-        public async Task<string> GetUserInfos(StringContent scontent, string location, IConfiguration _configuration) {
-            var url = _configuration.GetValue<string>("HaBookAuth:CoreAPI");
+        public async Task<string> GetUserInfos(StringContent scontent, string name = "Default") {
+            var url = options.Get(name).url;
             //url = "https://api2-rc.teammodel.cn";
             url = $"{url}/oauth2/getuserinfos";
-            var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
-            var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
+            var clientID = options.Get(name).clientID;
+            var clientSecret = options.Get(name).clientSecret;
+            var location = options.Get(name).location;
             if (location.Contains("China"))
             {
                 location = "China";

+ 2 - 1
TEAMModelOS.SDK/Models/Cosmos/Common/StuActivity.cs

@@ -67,7 +67,8 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public int taskStatus { get; set; } = -1;
         //写入投票记录,评测作答记录等,自行定义相关规范
-        public List<JsonElement> extParam { get; set; } = new List<JsonElement>();
+      //  public List<JsonElement> extParam { get; set; } = new List<JsonElement>();
+        public Dictionary<string, JsonElement> ext { get; set; } = new Dictionary<string, JsonElement>();
         /// 评分状态,0,未评分, 1已评分
         public int sStatus { get; set; } = 0;
     }

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/TmdInfo.cs

@@ -9,6 +9,7 @@ namespace TEAMModelOS.SDK.Models
         public string id { get; set; }
         public string name { get; set; }
         public string picture { get; set; }
+        public string code { get; set; }
     }
     public class StuInfo
     {

+ 4 - 0
TEAMModelOS.SDK/Models/Cosmos/Teacher/Research/TeacherTrain.cs

@@ -310,6 +310,10 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public int upload { get; set; } = 0;
         public int haswork { get; set; } = 0;
+        /// <summary>
+        /// 
+        /// </summary>
+        public List<Attachment> other { get; set; }= new List<Attachment>();
     }
     /// <summary>
     /// 互评记录

+ 5 - 5
TEAMModelOS.SDK/Models/Service/ActivityService.cs

@@ -301,7 +301,7 @@ namespace TEAMModelOS.SDK
             }
             return "";
         }
-        public static async Task RefreshStuActivity(CosmosClient client, DingDing _dingDing, string id, string code)
+        public static async Task RefreshStuActivity(CoreAPIHttpService _coreAPIHttpService ,CosmosClient client, DingDing _dingDing, string id, string code)
         {
             MQActivity activity = null;
             try
@@ -318,7 +318,7 @@ namespace TEAMModelOS.SDK
             {
                 List<Task<ItemResponse<StuActivity>>> tasks = new List<Task<ItemResponse<StuActivity>>>();
                 List<string> classes = ExamService.getClasses(activity.classes, activity.stuLists);
-                (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, activity.school);
+                (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classes, activity.school);
                 var students = tmdIds.FindAll(x => x.type == 2);
                 var tmdids = tmdIds.FindAll(x => x.type == 1);
                 if (tmdids.IsNotEmpty())
@@ -379,7 +379,7 @@ namespace TEAMModelOS.SDK
             }
         }
 
-        public static async Task DeleteActivity(CosmosClient client, DingDing _dingDing, ActivityList activityList) {
+        public static async Task DeleteActivity(CoreAPIHttpService _coreAPIHttpService, CosmosClient client, DingDing _dingDing, ActivityList activityList) {
             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
             if (activityList.groupLists.Count > 0)
             {
@@ -393,7 +393,7 @@ namespace TEAMModelOS.SDK
                 }
             }
             List<string> classes = ExamService.getClasses(activityList.classes, activityList.stuLists);
-            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, activityList.school, ps);
+            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classes, activityList.school, ps);
             var addStudentsCls = tmdIds.FindAll(x => x.type == 2);
             var addTmdidsCls = tmdIds.FindAll(x => x.type == 1);
             List<string> tmds = new List<string>();
@@ -426,7 +426,7 @@ namespace TEAMModelOS.SDK
                     });
                 });
             }
-            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, activityList.tchLists, activityList.school, ps);
+            (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, activityList.tchLists, activityList.school, ps);
             (string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.TeacherVote }, 0);
             if (tchList.IsNotEmpty())
             {

+ 39 - 0
TEAMModelOS.SDK/Models/Service/Common/ActivityStudentService.cs

@@ -474,6 +474,45 @@ namespace TEAMModelOS.SDK.Services
                     }
                 }
             }
+           /* List<(string id, HashSet<string> name)> cn = new(); 
+            foreach (StuActivity activity in datas) {
+                var cIds = activity.classIds;
+                HashSet<string> name = new HashSet<string>();
+                if (cIds.ToList().Count > 0)
+                {
+                    List<GroupListDto> groups = await GroupListService.GetGroupListListids(client, _dingDing, cIds.ToList(), school);
+                    foreach (GroupListDto dto in groups)
+                    {
+                        name.Add(dto.name);
+                    }
+                    cn.Add((activity.id, name));
+                }
+            }
+            
+            //string SummarySql = " c.id,c.code,c.name,c.no,c.periodId,c.scope,c.school,c.creatorId,c.type,c.year,c.tcount,c.scount,c.leader ";
+           
+            datas.Select(item => new {
+                item.name,
+                item.classIds,
+                cName = cn.Where(c =>c.id.Equals(item.id)).FirstOrDefault().name,
+                item.code,
+                item.createTime,
+                item.creatorId,
+                item.id,
+                item.owner,
+                item.endTime,
+                item.startTime,
+                item.pk,
+                item.sStatus,
+                item.school,
+                item.scode,
+                item.scope,
+                item.source,
+                item.subjects,
+                item.taskStatus,
+                item.type
+                
+            });*/
             return (datas, continuationToken);
         }
 

+ 30 - 6
TEAMModelOS.SDK/Models/Service/GroupListService.cs

@@ -15,6 +15,7 @@ using Microsoft.Extensions.Configuration;
 using TEAMModelOS.SDK.Models.Service;
 using System.Text.RegularExpressions;
 using TEAMModelOS.SDK.Models;
+using System.Net.Http;
 
 namespace TEAMModelOS.SDK
 {
@@ -44,7 +45,7 @@ namespace TEAMModelOS.SDK
         public static (int status, GroupList stuList) JoinList(GroupList stuList, string userid,   int type,  string school)
         {
             string irs=string.Empty;
-            List<string> irsOrder= stuList.members.Select(x => x.irs)?.Where(y => !string.IsNullOrEmpty(y)&& Regex.IsMatch(y, @"^\d*$")).OrderBy(x => x).ToList();
+            List<string> irsOrder= stuList.members.Select(x => x.irs)?.Where(y => !string.IsNullOrEmpty(y)&& Regex.IsMatch(y, @"^\d*$")).OrderBy(x => int.Parse(x)).ToList();
             if (!irsOrder.Contains("0"))
             {
                 irsOrder.Insert(0, "0");
@@ -402,7 +403,7 @@ namespace TEAMModelOS.SDK
             }
             return groupLists;
         }
-        public static async Task<(List<RMember>, List<RGroupList> groups)> GetStutmdidListids(CosmosClient client, DingDing _dingDing, List<string> classes, string school, List<(string, List<string>)> groupids = null)
+        public static async Task<(List<RMember>, List<RGroupList> groups)> GetStutmdidListids(CoreAPIHttpService _coreAPIHttpService,CosmosClient client, DingDing _dingDing, List<string> classes, string school, List<(string, List<string>)> groupids = null)
         {
             List<RMember> members = new List<RMember>();
             List<RGroupList> groupLists = new List<RGroupList>();
@@ -523,7 +524,7 @@ namespace TEAMModelOS.SDK
                     var list = item.Value.GroupBy(x => x.type).Select(y => new { key = y.Key, list = y.ToList() });
                     foreach (var group in list)
                     {
-                        (List<RGroupList> rgroups, List<RMember> rmembers)  =await GetGroupListMemberInfo(client, group.key, group.list, item.Key,_dingDing,school);
+                        (List<RGroupList> rgroups, List<RMember> rmembers)  =await GetGroupListMemberInfo(_coreAPIHttpService, client, group.key, group.list, item.Key,_dingDing,school);
                         members.AddRange(rmembers);
                     }
                 }
@@ -598,7 +599,7 @@ namespace TEAMModelOS.SDK
                 return (members, groupLists);
             }
         }
-        public static async Task< List<RGroupList>  > GetGroupListMemberByType(CosmosClient client,string type, List<string> scopes, string school, DingDing _dingDing)
+        public static async Task< List<RGroupList>  > GetGroupListMemberByType(CoreAPIHttpService _coreAPIHttpService,CosmosClient client,string type, List<string> scopes, string school, DingDing _dingDing)
         {
             StringBuilder sql = new StringBuilder($"SELECT distinct value(c) FROM c where c.type='{type}'");
             
@@ -630,13 +631,13 @@ namespace TEAMModelOS.SDK
                 var list = item.Value.GroupBy(x => x.type).Select(y => new { key = y.Key, list = y.ToList() });
                 foreach (var group in list)
                 {
-                    (List<RGroupList> rgroups, List<RMember> rmembers) = await GetGroupListMemberInfo(client, group.key, group.list, item.Key, _dingDing,school);
+                    (List<RGroupList> rgroups, List<RMember> rmembers) = await GetGroupListMemberInfo(_coreAPIHttpService, client, group.key, group.list, item.Key, _dingDing,school);
                 }
             }
             var  lists= groups.SelectMany(x => x.Value).ToList() ;
             return lists;
         }
-        public static async Task<(List<RGroupList> groups, List<RMember> members)> GetGroupListMemberInfo(CosmosClient client, string type, List<RGroupList> groups, string groupTbname, DingDing _dingDing, string school)
+        public static async Task<(List<RGroupList> groups, List<RMember> members)> GetGroupListMemberInfo(CoreAPIHttpService _coreAPIHttpService,CosmosClient client, string type, List<RGroupList> groups, string groupTbname, DingDing _dingDing, string school)
         {
 
             try {
@@ -676,6 +677,7 @@ namespace TEAMModelOS.SDK
                     });
 
                 }
+                 
                 List<TmdUser> tmdsData = new List<TmdUser>();
                 if (tmdids.IsNotEmpty())
                 {
@@ -705,6 +707,7 @@ namespace TEAMModelOS.SDK
                         });
                     }
                     else {
+                         
                         //处理研修名单,如果是学校老师的,则需要检查SchoolTeacher
                         //处理 学校教研组,学校管理人员,学校任课教师,学校研修名单。
                         if (!string.IsNullOrEmpty(school) && ($"{type}".Equals("yxtrain") || $"{type}".Equals("research") || $"{type}".Equals("manage") || $"{type}".Equals("subject")))
@@ -763,6 +766,27 @@ namespace TEAMModelOS.SDK
                         });
                     }
                 }
+
+                ///获取真实的名称 
+                var content = new StringContent(tmdids.Select(x=>x.id).ToJsonString(), Encoding.UTF8, "application/json");
+                string json = await _coreAPIHttpService.GetUserInfos(content);
+                try
+                {
+                    List<TmdInfo> tmdInfos = json.ToObject<List<TmdInfo>>();
+                    if (tmdInfos.IsNotEmpty())
+                    {
+                        tmdsData.ForEach(y =>
+                        {
+                            var tmd = tmdInfos.Find(x => x.id.Equals(y.id));
+                            y.name = tmd?.name;
+                            y.picture = tmd?.picture;
+                        });
+                    }
+                }
+                catch (Exception ex)
+                {
+                    await _dingDing.SendBotMsg($"用户转换失败:{json}\n {ex.StackTrace}", GroupNames.成都开发測試群組);
+                }
                 tmdids.ForEach(x =>
                 {
                     var user = tmdsData.Find(y => y.id.Equals(x.id));

+ 8 - 6
TEAMModelOS.SDK/Models/Service/StatisticsService.cs

@@ -11,6 +11,7 @@ using System.Threading.Tasks;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelOS.SDK
 {
@@ -164,7 +165,7 @@ namespace TEAMModelOS.SDK
                 school = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(schoolId, new PartitionKey("Base"));
             }
         }
-        public static async Task<List<(List<TeacherTrain> trains, List<RGroupList> yxtrain)>> StatisticsArea(AreaSetting setting, Area area, CosmosClient client, DingDing _dingDing, HashSet<string> updates)
+        public static async Task<List<(List<TeacherTrain> trains, List<RGroupList> yxtrain)>> StatisticsArea(CoreAPIHttpService _coreAPIHttpService, AreaSetting setting, Area area, CosmosClient client, DingDing _dingDing, HashSet<string> updates)
         {
             List<(List<TeacherTrain> trains, List<RGroupList> yxtrain)> teacherTrains = new List<(List<TeacherTrain> trains, List<RGroupList> yxtrain)>();
             List<School> schools = new List<School>();
@@ -173,22 +174,22 @@ namespace TEAMModelOS.SDK
             {
                 schools.Add(item);
             }
-            await foreach ((List<TeacherTrain> trains, List<RGroupList> yxtrain) tarain in GetStatisticsSchool(schools, setting, area, client, _dingDing, updates))
+            await foreach ((List<TeacherTrain> trains, List<RGroupList> yxtrain) tarain in GetStatisticsSchool(_coreAPIHttpService, schools, setting, area, client, _dingDing, updates))
             {
                 teacherTrains.Add(tarain);
             }
             return teacherTrains;
         }
-        private static async IAsyncEnumerable<(List<TeacherTrain> trains, List<RGroupList> yxtrain)> GetStatisticsSchool(List<School> schools, AreaSetting setting, Area area, CosmosClient client, DingDing _dingDing, HashSet<string> updates)
+        private static async IAsyncEnumerable<(List<TeacherTrain> trains, List<RGroupList> yxtrain)> GetStatisticsSchool(CoreAPIHttpService _coreAPIHttpService,List<School> schools, AreaSetting setting, Area area, CosmosClient client, DingDing _dingDing, HashSet<string> updates)
         {
             foreach (var school in schools)
             {
-                yield return await StatisticsSchool(school.id, setting, area, client, _dingDing, updates);
+                yield return await StatisticsSchool(  _coreAPIHttpService,school.id, setting, area, client, _dingDing, updates);
             }
         }
-        public static async Task<(List<TeacherTrain> trains, List<RGroupList> yxtrain)> StatisticsSchool(string school, AreaSetting setting, Area area, CosmosClient client, DingDing _dingDing, HashSet<string> updates)
+        public static async Task<(List<TeacherTrain> trains, List<RGroupList> yxtrain)> StatisticsSchool(CoreAPIHttpService _coreAPIHttpService,string school, AreaSetting setting, Area area, CosmosClient client, DingDing _dingDing, HashSet<string> updates)
         {
-            List<RGroupList> yxtrain = await GroupListService.GetGroupListMemberByType(client, "yxtrain", new List<string> { "school" }, $"{school}", _dingDing);
+            List<RGroupList> yxtrain = await GroupListService.GetGroupListMemberByType(_coreAPIHttpService, client, "yxtrain", new List<string> { "school" }, $"{school}", _dingDing);
             List<TeacherTrain> trains = new List<TeacherTrain>();
             var members = yxtrain.SelectMany(x => x.members).ToList();
             if (members.Count <= 0)
@@ -615,6 +616,7 @@ namespace TEAMModelOS.SDK
                     if (!string.IsNullOrEmpty(study.workId))
                     {
                         HomeworkRecord homeworkRecord = homeworkRecords.Find(y => y.id.Equals(study.workId));
+                        record.other = homeworkRecord?.content;
                         Attachment attachment = homeworkRecord != null ? homeworkRecord.content.Find(x => x.prime) : null;
                         record.haswork = 1;
                         if (null != attachment)

+ 4 - 2
TEAMModelOS.SDK/Models/Service/Third/Sc/ScYxptModel.cs

@@ -22,16 +22,16 @@ namespace TEAMModelOS.SDK.Models
         public string areaId { get; set; }
         public string schoolCode { get; set; }
         public string abilityNos { get; set; }
-   
     }
 
     [TableName(Name = "ScYxpt")]
     public class ScProjectDiagnosis : TableEntity
     {
         public string abilityNos { get; set; }
-        public string pd { get; set; }
         public string areaId{get;set;}
         public string schoolCode { get; set; }
+        public int ProjectID { get; set; }
+        public int ProjectItemID { get; set; }
     }
     public class ScDiagnosis
     {
@@ -73,6 +73,8 @@ namespace TEAMModelOS.SDK.Models
         public string dist { get; set; }
         public string city { get; set; }
         public string areaId { get; set; }
+        public int ProjectID { get; set; }
+        public int ProjectItemID { get; set; }
     }
 
     [TableName(Name = "ScYxpt")]

+ 12 - 2
TEAMModelOS.SDK/Models/Service/Third/ThirdService.cs

@@ -215,7 +215,7 @@ namespace TEAMModelOS.SDK.Models
                 return (setting.accessConfig,area,setting);
             }
         }
-        public static async Task<List<Ability>> GetDiagnosisList(CosmosClient client, string standard,DingDing dingDing,  AreaSetting setting, HttpTrigger httpTrigger,  Teacher teacher, TEAMModelOS.Models.Option _option) {
+        public static async Task<List<Ability>> GetDiagnosisList(CosmosClient client, string standard,DingDing dingDing,  AreaSetting setting, HttpTrigger httpTrigger,  Teacher teacher, TEAMModelOS.Models.Option _option, AzureStorageFactory _azureStorage) {
             List<string> abilityNos = new List<string>() ;
             var config= setting.accessConfig.ToObject<JsonElement>();
             config.TryGetProperty("config", out JsonElement _config);
@@ -233,7 +233,17 @@ namespace TEAMModelOS.SDK.Models
                     });
                 }
                 foreach (var pxid in pxids) {
-                    Dictionary<string, object> dict = new Dictionary<string, object>() { { "accessConfig", setting.accessConfig },{ "pxid",pxid },{ "areaId" , setting.id } };
+                    List<ScTeacher> teachers = await _azureStorage.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" }, { "PXID", pxid } });
+                    Dictionary<string, object> dict = new Dictionary<string, object>();
+                    if (teachers.IsNotEmpty())
+                    {
+                        dict = new Dictionary<string, object>() { { "accessConfig", setting.accessConfig }, { "pxid", pxid }, { "areaId", setting.id } ,{ "schoolCode", teachers[0].schoolCode} };
+                    }
+                    else {
+                        dict = new Dictionary<string, object>() { { "accessConfig", setting.accessConfig }, { "pxid", pxid }, { "areaId", setting.id } };
+                    }
+                   
+                   
                     (int status, string json) = await httpTrigger.RequestHttpTrigger(dict, _option.Location, "GetDiagnosisListByProject_V2");
                     if (status == 200)
                     {

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

@@ -194,9 +194,11 @@ async function refreshToken() {
 function loginOut() {
     let login_schoolCode = localStorage.getItem('login_schoolCode')
     let srvAdr = localStorage.getItem('srvAdr')
+    let versionFlag = localStorage.getItem('versionFlag')
     localStorage.clear()
     localStorage.setItem('srvAdr', srvAdr)
     localStorage.setItem('login_schoolCode', login_schoolCode)
+    localStorage.setItem('versionFlag', versionFlag)
     window.location.href = window.location.origin + '/login'
 }
 

+ 1 - 1
TEAMModelOS/ClientApp/src/api/login.js

@@ -235,7 +235,7 @@ export default {
 		return post('/teacher/init/GetUserInfo', data)
 	},
 	/**
-	 * 根据id 或 phone 获取账号信息
+	 * 绑定手机号
 	 */
 	bandOpenAccount(data) {
 		return new Promise((resolve,reject) => {

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

@@ -47,6 +47,10 @@ export default {
         return post('/core/image-quant', data)
     },
 	
+	/* 检查试卷是否已存在 */
+	checkPaperName: function(data) {
+        return post('/paper/check-paper-name', data)
+    },
 	
 
 }

+ 2 - 2
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue

@@ -113,12 +113,12 @@
                                     </span>
                                     <!-- 课中评量才判断:qamode:0(书面问答),1(纸本测验) -->
                                     <!-- <span v-if="item.source === '1'" style="margin-left: 10px;">
-                                        <span style="border: 1px solid #5783e7; padding: 0 5px; border-radius: 3px; color: #5783e7;"
+                                        <span style="border: 1px solid #8fc07b; padding: 0 5px; border-radius: 3px; color: #8fc07b;"
                                               v-if="item.qamode"
                                         >
                                             纸本测验
                                         </span>
-                                        <span style="border: 1px solid #c4937b; padding: 0 5px; border-radius: 3px; color: #c4937b;"
+                                        <span style="border: 1px solid #acab88; padding: 0 5px; border-radius: 3px; color: #acab88;"
                                                 v-else>
                                             书面问答
                                         </span>

+ 5 - 2
TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js

@@ -57,6 +57,7 @@ export default {
         edName: '修改評測名稱',
         edNameHolder: '請輸入評測名稱',
         scoreStatus: '待評分',
+        scoreStatus1:'已評分',
         hasDel: '此評測已被删除',
         actionErr: '操作失敗',
         classInfoErr: '査詢班級資訊失敗',
@@ -254,7 +255,8 @@ export default {
         exportData: 'Export Data',
         exporting: 'Exporting...',
         exportTips: 'The assessment is in progress and some students have not yet answered. Are you sure you want to export the data?',
-        noQuMark: '已完成所有題目評分,暫無未閱題目'
+        noQuMark: '已完成所有題目評分,暫無未閱題目',
+        noUpd:'暫未修改分數'
     },
 
     //SimpleAnalysis.vue
@@ -280,7 +282,8 @@ export default {
         complyNum: 'Passer',
         failedNum: 'Non-Passer',
         complyCount: 'Passer Number Statistics',
-        simpleErr: '查詢統計數據失敗'
+        simpleErr: '查詢統計數據失敗',
+        dataErr:'評測統計數據出錯啦'
     },
 
     mark: {

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/en-US/studentWeb.js

@@ -291,8 +291,8 @@ export default {
         teacher: 'Teacher:',
         voteType: "投票類型:",
         timeLong: "時長:",
-        period: 'Activity Duration',
-        postTime: 'Start Time',
+        period: 'Activity Duration:',
+        postTime: 'Start Time:',
         classTime: 'Class time',
         unFinished: 'Unfinished',
         Fineshed: 'Completed',

+ 4 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/system.js

@@ -91,5 +91,8 @@ export default {
     iKnow:'I understand',
     basic: 'Basic Version',
     advanced: 'Standard Version',
-    flagship: 'Advanced Version'
+    flagship: 'Advanced Version',
+    add: '新增功能',
+    opt: '優化功能',
+    bug: '修復已知Bug'
 }

+ 5 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js

@@ -57,6 +57,7 @@ export default {
         edName:'修改评测名称',
         edNameHolder:'请输入评测名称',
         scoreStatus:'待评分',
+        scoreStatus1:'已评分',
         hasDel:'此评测已被删除',
         actionErr:'操作失败',
         classInfoErr:'查询班级信息失败',
@@ -254,7 +255,8 @@ export default {
         exportData:'导出数据',
         exporting:'正在导出',
         exportTips:'评测进行中,有些学生尚未作答,确认导出数据吗?',
-        noQuMark:'已完成所有题目评分,暂无未阅题目'
+        noQuMark:'已完成所有题目评分,暂无未阅题目',
+        noUpd:'暂未修改分数'
     },
 
     //SimpleAnalysis.vue
@@ -280,7 +282,8 @@ export default {
         complyNum: '及格',
         failedNum: '不及格',
         complyCount:'及格人数统计',
-        simpleErr:'查询统计数据失败'
+        simpleErr:'查询统计数据失败',
+        dataErr:'评测统计数据出错啦'
     },
 
     mark: {

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js

@@ -291,8 +291,8 @@ export default {
         teacher: '教师:',
         voteType: "投票类型:",
         timeLong: "时长:",
-        period: '活动期限',
-        postTime: '发布时间',
+        period: '活动期限:',
+        postTime: '发布时间:',
         classTime: '上课时间',
         unFinished: '未完成',
         Fineshed: '已完成',

+ 4 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/system.js

@@ -91,5 +91,8 @@ export default {
     iKnow:'我知道了',
     basic:'基础版',
     advanced:'标准版',
-    flagship:'专业版'
+    flagship:'专业版',
+    add:'新增功能',
+    opt:'优化功能',
+    bug:'修复已知Bug'
 }

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/cusMgt.js

@@ -94,7 +94,7 @@ export default {
     ev: '評量',
     vote: '投票',
     qu: '問卷',
-    hw: '作',
+    hw: '作',
     sl: '自主學習',
     acTime: '活動時間',
     private: '個人',
@@ -222,7 +222,7 @@ export default {
     confirmAdd: '確認新增',
     cancelAdd: '取消新增',
     createList: '新建選課班',
-    name: '名稱',
+    name: '名稱',
     nameHolder: '請輸入名單名稱…',
     nameRepeat: '選課班名稱重複',
     pdHolder: '請設置學段',

+ 5 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js

@@ -57,6 +57,7 @@ export default {
         edName: '修改評測名稱',
         edNameHolder: '請輸入評測名稱',
         scoreStatus: '待評分',
+        scoreStatus1:'已評分',
         hasDel: '此評測已被删除',
         actionErr: '操作失敗',
         classInfoErr: '査詢班級資訊失敗',
@@ -254,7 +255,8 @@ export default {
         exportData: '導出數據',
         exporting: '正在導出',
         exportTips: '評測進行中,有些學生尚未作答,確認導出數據嗎? ',
-        noQuMark: '已完成所有題目評分,暫無未閱題目'
+        noQuMark: '已完成所有題目評分,暫無未閱題目',
+        noUpd:'暫未修改分數'
     },
 
     //SimpleAnalysis.vue
@@ -280,7 +282,8 @@ export default {
         complyNum: '及格',
         failedNum: '不及格',
         complyCount: '及格人數統計',
-        simpleErr: '查詢統計數據失敗'
+        simpleErr: '查詢統計數據失敗',
+        dataErr:'評測統計數據出錯啦'
     },
 
     mark: {

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js

@@ -291,8 +291,8 @@ export default {
         teacher: '教師:',
         voteType: "投票類型:",
         timeLong: "時長:",
-        period: '活動期限',
-        postTime: '發佈時間',
+        period: '活動期限:',
+        postTime: '發佈時間:',
         classTime: '上課時間',
         unFinished: '未完成',
         Fineshed: '已完成',

+ 4 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/system.js

@@ -91,5 +91,8 @@ export default {
     iKnow: '我知道了',
     basic: '基礎版',
     advanced: '標準版',
-    flagship: '專業版'
+    flagship: '專業版',
+    add: '新增功能',
+    opt: '優化功能',
+    bug: '修復已知Bug'
 }

+ 2 - 2
TEAMModelOS/ClientApp/src/utils/public.js

@@ -494,12 +494,12 @@ export default {
 		return (bytes / Math.pow(k, i)).toFixed(2) + ' ' + sizes[i];
 	},
 	/* 采用原生Xhr来发送HTTP请求 避免携带token访问blob报错 */
-	getFile(url) {
+	getFile(url, type) {
 		return new Promise((resolve, reject) => {
 			var xhr = new XMLHttpRequest();
 			var formData = new FormData();
 			xhr.open('get', url); //url填写后台的接口地址,如果是post,在formData append参数(参考原文地址)
-			// xhr.responseType = 'arraybuffer';
+			if(type) xhr.responseType = 'arraybuffer';
 			xhr.onload = function(e) {
 				switch (e.currentTarget.status) {
 					case 200:

+ 73 - 18
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -26,10 +26,24 @@
                 </p>
             </div>
             <div class="upd-content">
-                <p>针对学区、学校统一测评数据进行数据分析,为学校和老师提供全面、精准、高效的分析服务系统。协助学校各层级人员了解学校教学的总体情况,发现教学数据中的差异与异常,通过系统数据分析寻找教学过程存在原因。协助老师分析了解班级教学质量,发现知识点的薄弱处,个性化辅导学生为补偿教学提供依据。</p>
+                <p v-show="add.length" class="upd-block-title" style="margin-top:0px">
+                    {{$t('system.add')}}
+                </p>
+                <p v-for="(item,index) in add" :key="'add' + index">
+                    {{item.content}}
+                </p>
+                <p v-show="opt.length" class="upd-block-title">
+                    {{$t('system.opt')}}
+                </p>
+                <p v-for="(item,index) in opt" :key="'opt' + index">
+                    {{item.content}}
+                </p>
+                <p v-show="bug.length" class="upd-block-title">
+                    {{$t('system.bug')}}
+                </p>
             </div>
             <div class="close-btn">
-                <Button type="primary" :disabled="countDown > 0" @click="updStatus = false">
+                <Button type="primary" :disabled="countDown > 0" @click="iKnow">
                     {{$t('system.iKnow')}}
                     <span v-show="countDown > 0">
                         {{`(${countDown}S)`}}
@@ -41,6 +55,7 @@
 </template>
 
 <script>
+import excel from '@/utils/excel.js'
 export default {
     name: 'headers',
     props: ['parentToChild', 'identityselect'],
@@ -61,10 +76,14 @@ export default {
             isLoading: false,
             curPlatform: '',
             location: '',
-            countDown: 15,
+            countDown: 5,
+            add: [],//新增功能
+            opt: [],//优化功能
+            bug: []//bug
         }
     },
     created() {
+        this.getVersionInfo()
         this.$Message.config({
             duration: 3
         });
@@ -117,16 +136,51 @@ export default {
 
     },
     methods: {
+        iKnow(){
+            this.updStatus = false
+            let version = localStorage.getItem('version')
+            let data = {
+                [version]: true
+            } 
+            localStorage.setItem('versionFlag',JSON.stringify(data))
+        },
+        readBuffer(data) {
+            const { header, results } = excel.read(data, 'array')
+            this.add = results.filter(item => item.type === 'add')
+            this.opt = results.filter(item => item.type === 'opt')
+            this.bug = results.filter(item => item.type === 'bug')
+            this.updStatus = true
+        },
+        async getVersionInfo() {
+            let version = localStorage.getItem('version')
+            let versionFlag = localStorage.getItem('versionFlag') || '{}'
+            let d = JSON.parse(versionFlag)
+            if (d[version]) {
+                return
+            }
+            if (version) {
+                try {
+                    let blobHost = this.$evTools.getBlobHost()
+                    let local = localStorage.getItem('local') || ''
+                    let lang = local.includes('en') ? 'en' : local.includes('tw') ? 'tw' : 'cn'
+                    let xlsx = await this.$tools.getFile(`${blobHost}/0-public/version/${lang}/${version}.xlsx`, 'arraybuffer')
+                    this.readBuffer(xlsx)
+                } catch (e) {
+                    console.log(e)
+                }
+            }
+        },
         loginOut() {
             let login_schoolCode = localStorage.getItem('login_schoolCode')
             let srvAdr = localStorage.getItem('srvAdr')
+            let versionFlag = localStorage.getItem('versionFlag')
             localStorage.clear()
             localStorage.setItem('srvAdr', srvAdr)
+            localStorage.setItem('versionFlag', versionFlag)
             localStorage.setItem('login_schoolCode', login_schoolCode)
             window.location.href = window.location.origin + '/login'
         },
         reload() {
-            // console.error('reload==============================')
             this.isRouterAlive = false
             this.$nextTick(() => {
                 this.isRouterAlive = true
@@ -150,7 +204,7 @@ export default {
                     i.body = JSON.parse(this.getBodyJson(i.body))
                 })
             }
-			localStorage.setItem('msgs', JSON.stringify(this.msgs))
+            localStorage.setItem('msgs', JSON.stringify(this.msgs))
             console.log('端外通知', this.msgs)
         },
         getBodyJson(str) {
@@ -162,9 +216,9 @@ export default {
         getSchoolNotice(user_profile, userId) {
             return new Promise((r, j) => {
                 if (this.hasSchool) {
-					let srvAdr = this.$store.state.config.srvAdr
-					let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state.config.China.coreAPIUrl
-                    this.$api.service.getNotification(host,{
+                    let srvAdr = this.$store.state.config.srvAdr
+                    let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state.config.China.coreAPIUrl
+                    this.$api.service.getNotification(host, {
                         "from": "ies5:" + this.location + ':' + (user_profile.defaultschool || user_profile.schools[0].schoolId),
                         "receiver": userId
                     }).then(res => {
@@ -177,9 +231,9 @@ export default {
         },
         getPrivateNotice(userId) {
             return new Promise((r, j) => {
-				let srvAdr = this.$store.state.config.srvAdr
-				let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state.config.China.coreAPIUrl
-                this.$api.service.getNotification(host,{
+                let srvAdr = this.$store.state.config.srvAdr
+                let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state.config.China.coreAPIUrl
+                this.$api.service.getNotification(host, {
                     "from": "ies5:" + this.location + ":private",
                     "receiver": userId
                 }).then(res => {
@@ -218,12 +272,6 @@ export default {
             localStorage.setItem('noSave', '[]')
         }
 
-        //      this.$EventBus.$off('onGlobalLoading')
-        //      this.$EventBus.$on('onGlobalLoading', val => {
-        // console.error('HOMT',val)
-        // this.isLoading = val
-        //      })
-
         this.$EventBus.$off('noSave')
         this.$EventBus.$on('noSave', val => {
             let curNoSaveArr = JSON.parse(localStorage.getItem('noSave'))
@@ -258,7 +306,14 @@ export default {
 </script>
 
 <style scoped>
-.upd-content{
+.upd-block-title {
+    font-weight: 600;
+    font-size: 14px;
+    color: #2d8cf0;
+    margin-top: 20px;
+    margin-bottom: 5px;
+}
+.upd-content {
     width: 100%;
     padding: 0px 30px;
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/view/ability/Review.vue

@@ -4,7 +4,7 @@
     <div class="review-header">
       <div class="review-title">
 		  <!-- <Icon type="ios-arrow-dropleft-circle" /> -->
-        <Icon type="md-arrow-dropleft-circle" color="#2674c8" @click="goBack(false)" />
+        <Icon type="md-arrow-back" color="#2674c8" @click="goBack(false)" />
         <span>{{ data.targetName }} 【 {{ data.no}} {{ data.name }} 】</span>
       </div>
       <div class="ability-des">

+ 10 - 0
TEAMModelOS/ClientApp/src/view/areaMgmt/AreaBase.vue

@@ -82,6 +82,16 @@ export default {
 
     },
     methods: {
+        loginOut() {
+            let login_schoolCode = localStorage.getItem('login_schoolCode')
+            let srvAdr = localStorage.getItem('srvAdr')
+            let versionFlag = localStorage.getItem('versionFlag')
+            localStorage.clear()
+            localStorage.setItem('srvAdr', srvAdr)
+            localStorage.setItem('versionFlag', versionFlag)
+            localStorage.setItem('login_schoolCode', login_schoolCode)
+            window.location.href = window.location.origin + '/login'
+        },
 		changePlatform(){
 			let goPlatform = this.curPlatform === 'area' ? 'school' : 'area'
             let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'

+ 73 - 1
TEAMModelOS/ClientApp/src/view/assessment/Assessment.vue

@@ -126,7 +126,7 @@
 									<span slot="close">Fail</span>
 								</i-switch>
 							</span>
-							<Icon type="ios-folder" size="18" :color="item.url ? '#2db694' : '#b6b6b6'" v-if="item.haswork" :title="item.url ? '已提交PDF' : '未提交PDF'"/>
+							<Icon type="ios-folder" style="cursor: pointer;" size="18" :color="item.url ? '#2db694' : '#b6b6b6'" v-if="item.haswork" :title="item.url ? '已提交PDF' : '未提交PDF'" @click="onClickFolder(item)"/>
 						</div>
 					</template>
 					<!-- 线上研修列 -->
@@ -217,6 +217,23 @@
 				</template>
 			</Table>
 		</Modal>
+		<!-- 展示作业提交PDF选择弹窗 -->
+		<Modal v-model="choosePdfModal" width="800" footer-hide class="tree-modal comment-modal">
+			<p slot="header">作业提交内容</p>
+			<div>
+				<span class="hw-item" v-for="(item,index) in attachmentList" :key="index" @click="onPreview(item)">{{ item.name }}</span>
+			</div>
+			<div v-if="choosePdfModal && hwPreviewFile && (hwPreviewFile.type === 'image' || hwPreviewFile.type === 'video' || hwPreviewFile.type === 'audio')" style="margin-top:20px">
+			    <video v-if="hwPreviewFile.type == 'video'" id="previewVideo" autoplay :src="hwPreviewFile.url" width="770" controls="controls" style="max-height: 800px;">
+			        {{$t('teachContent.tips8')}}
+			    </video>
+			    <audio v-else-if="hwPreviewFile.type == 'audio'" controls>
+			        <source :src="hwPreviewFile.url">
+			        {{$t('teachContent.notAudio')}}
+			    </audio>
+			    <img v-else-if="hwPreviewFile.type == 'image'" :src="hwPreviewFile.url" style="border-radius: 5px;max-height: 800px;max-width:870px;" />
+			</div>
+		</Modal>
 
 	</div>
 </template>
@@ -230,6 +247,9 @@
 		},
 		data(vm) {
 			return {
+				hwPreviewFile:null,
+				choosePdfModal:false,
+				attachmentList:[],
 				finalScore: -1,
 				videoData: null,
 				colorMap: ['color-none', 'color-bad', 'color-normal', 'color-good'],
@@ -552,6 +572,49 @@
 				})
 				return renderJson
 			},
+			/* 点击PDF提交文件图标 */
+			async onClickFolder(item){
+				if(!item.url){
+					this.$Message.warning('暂未提交作品,无法查看')
+				}else{
+					this.choosePdfModal = true
+					this.attachmentList = item.other
+					
+				}
+			},
+			/* 预览文件 */
+			async onPreview(item){
+				let info = this._.cloneDeep(item)
+				let fileSas = await this.$tools.getFileSas(info.url)
+				info.url = fileSas.url
+				if (info.type === 'image' || info.type === 'video' || info.type === 'audio') {
+				    this.hwPreviewFile = info
+				} else if (info.type === 'doc') {
+				    this.hwPreviewFile = null
+				    if (info.extension === 'PDF') {
+				        window.open('/web/viewer.html?file=' + encodeURIComponent(info.url))
+				    } else {
+				        window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(info.url))
+				    }
+				}else{
+				    this.hwPreviewFile = null
+				    this.downloadTrainFile(info.url, info.name)
+				}
+			},
+			/* 下载文件 */
+			downloadTrainFile(url, name) {
+			    const downloadRes = async () => {
+			        let response = await fetch(url); // 内容转变成blob地址
+			        let blob = await response.blob();  // 创建隐藏的可下载链接
+			        let objectUrl = window.URL.createObjectURL(blob);
+			        let a = document.createElement('a');
+			        a.href = objectUrl;
+			        a.download = name;
+			        a.click()
+			        a.remove()
+			    }
+			    downloadRes()
+			},
 			/* 排序算法 */
 			sortByNo(arr) {
 			  return arr.sort(function (s, t) {
@@ -949,5 +1012,14 @@
 		.ivu-modal-body {
 			padding: 15px;
 		}
+		
+		.hw-item{
+			display: inline-block;
+			border: 1px solid #CCCCCC;
+			padding: 10px;
+			margin: 10px;
+			border-radius: 4px;
+			cursor: pointer;
+		}
 	}
 </style>

+ 149 - 30
TEAMModelOS/ClientApp/src/view/evaluation/bank/ShareCenter.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="share-center-container">
 		<div class="share-center-tab-wrap">
-			<span @click="tabClick('item')"
+			<span @click="tabClick('exercise')"
 				:class="['share-center-tab',tabName == 'exercise' ? 'share-center-tab-active':'']">
 				分享个人试题
 			</span>
@@ -66,7 +66,18 @@
 				<Button type="info" :loading="btnLoading" :disabled="btnDisable"
 					@click="doShare">确认分享</Button>
 			</div>
-
+			<!-- 已存在弹窗 -->
+			<Modal v-model="isShowExist" width="800px" title="重复提示" class-name="preview-modal">
+				<p>检测到分享的以下资源 <span style="color: #FF0000;font-weight: bold;">已存在于校本库</span> 中</p>
+				<div style="margin: 10px 0;">
+					<Tag color="blue" size="medium" v-for="(item,index) in existList" :key="index">{{ tabName === 'paper' ? item.name : getSimpleText(item.question) }}</Tag>
+				</div>
+				<p>继续分享将会覆盖校本资源,请确认您的操作</p>
+				<div slot="footer">
+					<Button @click="onIgnoreExist">忽略上述资源的分享</Button>
+					<Button type="success" @click="onConfirmCover" :loading="coverLoading">确认覆盖</Button>
+				</div>
+			</Modal>
 		</div>
 	</div>
 </template>
@@ -81,6 +92,8 @@
 		},
 		data() {
 			return {
+				coverLoading:false,
+				isShowExist:false,
 				schoolBlobClient:null,
 				privateBlobClient:null,
 				selectedItems: [],
@@ -94,7 +107,7 @@
 				periodList: [],
 				subjectList: [],
 				gradeList: [],
-
+				existList:[]
 			}
 		},
 		created() {
@@ -102,9 +115,48 @@
 			this.tabName = tabName || 'exercise'
 			this.getSchoolInfo()
 			
-			
 		},
 		methods: {
+			/* 忽略重复 */
+			onIgnoreExist(){
+				this.$router.push({
+					name:'schoolBank',
+					params:{
+						tabName:this.tabName
+					}
+				})
+			},
+			/* 确认覆盖 */
+			onConfirmCover(){
+				let promiseArr = []
+				if(this.tabName === 'paper'){
+					this.existList.forEach(paper => {
+						paper.scope = 'school'
+						paper.periodId = this.sharePeriodId
+						paper.subjectId = this.shareSubjectId
+						paper.subjectName = this.subjectList.find(i => i.id === this.shareSubjectId).name
+						paper.gradeIds = this.shareGradeIds.length ? this.shareGradeIds.map(i => i + '') : this.gradeList.map((i, index) => index + '')
+						paper.code = this.$store.state.userInfo.schoolCode
+						promiseArr.push(this.saveCosmosPaper(paper,true))
+						promiseArr.push(this.saveBlobPaper(paper))
+					})
+				}else{
+					this.existList.forEach(i => {
+						promiseArr.push(this.saveShareItem(i,true))
+					})
+				}
+				this.coverLoading = true
+				Promise.all(promiseArr).then(result => {
+					this.$Message.success('分享成功!')
+					this.coverLoading = false
+					this.$router.push({
+						name:'schoolBank',
+						params:{
+							tabName:this.tabName
+						}
+					})
+				})
+			},
 			/* 初始化BLOB实例 */
 			initBlobClient(scope){
 				return new Promise(async (r,j) => {
@@ -137,6 +189,7 @@
 			/* 确认分享 */
 			async doShare() {
 				let promiseArr = []
+				this.existList = []
 				this.schoolBlobClient = await this.initBlobClient('school')
 				this.privateBlobClient = await this.initBlobClient('private')
 				this.btnLoading = true
@@ -156,35 +209,42 @@
 								child.subjectId = this.shareSubjectId
 								child.gradeIds = this.shareGradeIds.length ? this.shareGradeIds.map(i => i + '') : this.gradeList.map((i, index) => index + '')
 								child.code = 'Item-' + this.$store.state.userInfo.schoolCode
-								promiseArr.push(this.saveCosmosItem(child))
-								promiseArr.push(this.saveBlobItem(child))
+								promiseArr.push(this.saveShareItem(child))
+								// promiseArr.push(this.saveBlobItem(child))
 							})
 						}
-						promiseArr.push(this.saveCosmosItem(item))
-						promiseArr.push(this.saveBlobItem(item))
+						promiseArr.push(this.saveShareItem(item))
+						// promiseArr.push(this.saveBlobItem(item))
 					})
 				}else{
+					this.existList = await this.checkPapers(this.selectedPapers)
 					// 对所有分享的题目进行信息补充及保存事件处理
-					this.selectedPapers.forEach(item => {
-						item.scope = 'school'
-						item.periodId = this.sharePeriodId
-						item.subjectId = this.shareSubjectId
-						item.subjectName = this.subjectList.find(i => i.id === this.shareSubjectId).name
-						item.gradeIds = this.shareGradeIds.length ? this.shareGradeIds.map(i => i + '') : this.gradeList.map((i, index) => index + '')
-						item.code = this.$store.state.userInfo.schoolCode
-						promiseArr.push(this.saveCosmosPaper(item))
-						promiseArr.push(this.saveBlobPaper(item))
+					this.selectedPapers.forEach(paper => {
+						if(!this.existList.find(i => i.id === paper.id)){
+							paper.scope = 'school'
+							paper.periodId = this.sharePeriodId
+							paper.subjectId = this.shareSubjectId
+							paper.subjectName = this.subjectList.find(i => i.id === this.shareSubjectId).name
+							paper.gradeIds = this.shareGradeIds.length ? this.shareGradeIds.map(i => i + '') : this.gradeList.map((i, index) => index + '')
+							paper.code = this.$store.state.userInfo.schoolCode
+							promiseArr.push(this.saveCosmosPaper(paper))
+							promiseArr.push(this.saveBlobPaper(paper))
+						}
 					})
 				}
 				// 执行分享同步操作
 				Promise.all(promiseArr).then(result => {
-					this.$Message.success('分享成功!')
-					this.$router.push({
-						name:'schoolBank',
-						params:{
-							tabName:this.tabName
-						}
-					})
+					if(this.existList.length){
+						this.isShowExist = true
+					}else{
+						this.$Message.success('分享成功!')
+						this.$router.push({
+							name:'schoolBank',
+							params:{
+								tabName:this.tabName
+							}
+						})
+					}
 				}).catch(e => {
 					console.log(e)
 					this.$Message.success('分享失败!')
@@ -193,15 +253,35 @@
 				})
 			},
 			/* 保存试题到数据库 */
-			saveCosmosItem(item) {
+			saveShareItem(shareItem,isUpdate) {
 				return new Promise(async (r, j) => {
-					let cosmosItem = await this.$evTools.createCosmosItem(item)
+					let cosmosItem = await this.$evTools.createCosmosItem(shareItem)
 					this.$api.newEvaluation.SaveSingleExercise({
 						itemInfo: cosmosItem,
-						option: "insert",
+						option: isUpdate ? "update" : "insert",
 					}).then((res) => {
 						if (!res.error) {
-							r(res);
+							/* 代表试题已经存在于校本库中 需要询问用户是否覆盖 */
+							if(res.code && res.code === 409){
+								this.existList.push(shareItem)
+								r(409)
+							}else{
+								// 避免影响试题列表显示
+								let item = this._.cloneDeep(shareItem)
+								// 如果是综合题 blob内只存储子题的ID集合
+								if(item.children.length){
+									item.children = item.children.map(i => i.id)
+								}
+								this.schoolBlobClient.copyFolder('item/' + item.id + '/', 'item/' + item.id, this.privateBlobClient,false).then(async res => {
+									let removeItem = await this.$editorTools.doRemoveMideaHost(item)
+									let blobItemJson = await this.$evTools.createBlobItem(removeItem)
+									let file = new File([JSON.stringify(blobItemJson)], item.id + ".json");
+									let blobFile = await this.schoolBlobClient.upload(file, { path:"item/" + item.id });
+									r(200)
+								}).catch(e => {
+									j(500)
+								})
+							}
 						} else {
 							j(500);
 						}
@@ -232,12 +312,12 @@
 				})
 			},
 			/* 保存试题到数据库 */
-			saveCosmosPaper(item) {
+			saveCosmosPaper(item,isUpdate) {
 				return new Promise(async (r, j) => {
 					let cosmosPaper = await this.$evTools.createCosmosPaper(item)
 					this.$api.learnActivity.SaveExamPaper({
 						paper: cosmosPaper,
-						option: 'insert'
+						option: isUpdate ? 'update' : 'insert'
 					}).then((res) => {
 						if (!res.error) {
 							r(res);
@@ -274,6 +354,45 @@
 					
 				})
 			},
+			/* 检测分享的试卷是否有重名 */
+			checkPapers(papers){
+				return new Promise((resolve,reject) => {
+					let promiseArr = []
+					papers.forEach(i => {
+						promiseArr.push(this.checkPaperExist(i.name))
+					})
+					
+					Promise.all(promiseArr).then(result => {
+						let arr = []
+						result.forEach((i,index) => {
+							if(i){
+								arr.push(papers[index])
+							}
+						})
+						resolve(arr)
+					})
+				})
+				
+			},
+			/* 检测试卷是否已存在于校本库 */
+			checkPaperExist(paperName){
+				return new Promise((r,j) => {
+					this.$api.newEvaluation.checkPaperName({
+						scope:'school',
+						code:this.$store.state.userInfo.schoolCode,
+						name:paperName
+					}).then(res => {
+						if(!res.error){
+							r(res.papers.length > 0)
+						}else{
+							j(false)
+						}
+					}).catch(e => {
+						j(false)
+					})
+				})
+				
+			},
 			/* 学段切换 */
 			onPeriodChange(val) {
 				let period = this.periodList.find(i => i.id === val)

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseEditExercise.vue

@@ -414,8 +414,8 @@
 							this.$Message.error(e.spaceError);
 						}
 					} else {
-						exerciseItem = await this.$evTools.doAddHost(exerciseItem)
 						// 如果是试卷内编辑试题 则返回编辑好的数据 再统一进行保存
+						exerciseItem = await this.$evTools.doAddHost(exerciseItem,{ name:sessionStorage.getItem('paper_name'),scope:sessionStorage.getItem('editorEnv') })
 						this.saveExercise(exerciseItem);
 					}
 				} else{

+ 80 - 49
TEAMModelOS/ClientApp/src/view/evaluation/index/CreatePaper.vue

@@ -4,9 +4,11 @@
 			<p class="create-header-title">
 				{{ isEditPaper ? $t('evaluation.paperList.editPaper') : evaluationInfo.createType === 'auto' ? $t('evaluation.index.autoCreate') : evaluationInfo.createType === 'import' ? $t('evaluation.importItems')  : $t('evaluation.index.manualCreate') }}
 				<Checkbox v-model="isSaveToBank" v-if="evaluationInfo.createType === 'import'"
-					style="margin-left: 20px;" @on-change="onModeChange('item')"> {{ $t('evaluation.syncItems') }}</Checkbox>
+					style="margin-left: 20px;" @on-change="onModeChange('item')"> {{ $t('evaluation.syncItems') }}
+				</Checkbox>
 				<Checkbox v-model="isGeneratePaper" v-if="evaluationInfo.createType === 'import'"
-					style="margin-left: 20px;" @on-change="onModeChange('paper')"> {{ $t('evaluation.composePaper') }}</Checkbox>
+					style="margin-left: 20px;" @on-change="onModeChange('paper')"> {{ $t('evaluation.composePaper') }}
+				</Checkbox>
 			</p>
 			<div style="float: right;" class="common-save-btn">
 				<Button class="btn-save" type="text" icon="md-arrow-round-back"
@@ -17,7 +19,8 @@
 		</div>
 		<div class="create-body">
 			<Split v-model="split1">
-				<div slot="left" class="demo-split-pane animated fadeIn" v-show="(isGeneratePaper && !isSchool) || isSchool">
+				<div slot="left" class="demo-split-pane animated fadeIn"
+					v-show="(isGeneratePaper && !isSchool) || isSchool">
 					<div class="evaluation-attr-wrap">
 						<p class="wrap-label">{{$t('evaluation.paperList.baseInfo')}}</p>
 						<div style="width:100%; height:calc(100% - 45px);padding-top:30px;">
@@ -31,12 +34,13 @@
 										<Option value="school">{{$t('evaluation.paperList.schoolBank')}}</Option>
 									</Select>
 								</FormItem>
-								<FormItem :label="$t('evaluation.paperList.paperName')" prop="name"  v-show="isGeneratePaper">
+								<FormItem :label="$t('evaluation.paperList.paperName')" prop="name"
+									v-show="isGeneratePaper">
 									<Input v-special-char v-model="evaluationInfo.name"></Input>
 								</FormItem>
-								<FormItem :label="$t('evaluation.paperTag')"  v-show="isGeneratePaper">
-									<Select v-model="evaluationInfo.tags" filterable multiple allow-create :placeholder="$t('evaluation.paperTagPlace')"
-										@on-create="createTag">
+								<FormItem :label="$t('evaluation.paperTag')" v-show="isGeneratePaper">
+									<Select v-model="evaluationInfo.tags" filterable multiple allow-create
+										:placeholder="$t('evaluation.paperTagPlace')" @on-create="createTag">
 										<Option v-for="item in tags" :value="item" :key="item">{{ item }}</Option>
 									</Select>
 								</FormItem>
@@ -65,7 +69,7 @@
 									</Select>
 								</FormItem>
 								<FormItem :label="$t('evaluation.paperList.paperScore')" prop="name"
-									class="evaluation-attr-wrap-inputNumber"  v-show="isGeneratePaper">
+									class="evaluation-attr-wrap-inputNumber" v-show="isGeneratePaper">
 									<InputNumber :max="1000" :min="1" v-model="evaluationInfo.score"></InputNumber>
 								</FormItem>
 							</Form>
@@ -182,7 +186,8 @@
 				noAnswerList: [],
 				oldPaper: null,
 				needSaveCosmosArr: [],
-				typeSummaryInfo:null
+				typeSummaryInfo: null,
+				importKnowledges: [],
 			}
 		},
 		async created() {
@@ -196,7 +201,7 @@
 			if (this.$route.params.isFromItemBank) {
 				this.isGeneratePaper = false
 				this.curMode = 'item'
-				if(!this.isSchool){
+				if (!this.isSchool) {
 					this.split1 = 0
 				}
 			} else {
@@ -268,10 +273,13 @@
 			},
 			/* 导入试题结束 */
 			async onImportFinish(importRes) {
-				let { list,fileName } = importRes
-				if(fileName){
+				let {
+					list,
+					fileName
+				} = importRes
+				if (fileName) {
 					this.evaluationInfo.name = fileName
-					sessionStorage.setItem('paper_name',this.evaluationInfo.name)
+					sessionStorage.setItem('paper_name', this.evaluationInfo.name)
 				}
 				this.errorList = []
 				this.$refs.testPaper.$refs.exList.errorList = []
@@ -285,7 +293,17 @@
 					return
 				}
 				try {
+					let allPoints = []
+					list.forEach(i => {
+						allPoints.push(...i.knowledge)
+						if (i.children.length) {
+							i.children.forEach(j => {
+								allPoints.push(...j.knowledge)
+							})
+						}
+					})
 					let importList = await this.refreshImportItems(list)
+					this.importKnowledges = allPoints
 					this.evaluationInfo.item = importList
 					this.activeTab = 'preview'
 					this.$Message.success(this.$t('evaluation.importFile.warningTips3'))
@@ -596,8 +614,11 @@
 											// 等待上传blob的返回结果
 											let blobFile =
 												await containerClient
-												.upload(file, { path:'item/' +
-													composeItem.id,checkSize:false })
+												.upload(file, {
+													path: 'item/' +
+														composeItem.id,
+													checkSize: false
+												})
 											if (blobFile.blob) {
 												// 保存试题JSON文件到试卷文件夹需要
 												itemJsonFiles.push(composeItem)
@@ -652,8 +673,10 @@
 									} else {
 										// 等待上传blob的返回结果
 										let blobFile = await containerClient.upload(
-											file,
-											{ path:'item/' + exerciseItem.id,checkSize:false })
+											file, {
+												path: 'item/' + exerciseItem.id,
+												checkSize: false
+											})
 										if (blobFile.blob) {
 											// 保存试题JSON文件到试卷文件夹需要
 											// 保存到COSMOS是不含base64图片编码的数据 避免数据量过大
@@ -813,10 +836,11 @@
 					this.savePaperItems(refreshList, false, true).then(async res => {
 						console.log(res);
 						// 校本组卷情况下 同步知识点数据
-						if (this.isSchool && this.isSavePoints && this.evaluationInfo.createType === 'import') {
-							let allPoints = [...new Set(refreshList.map(i => i.knowledge).flat(1))]
-							if (allPoints.length) {
-								await this.saveImportPoints(allPoints, paperItem)
+						if (this.isSchool && this.isSavePoints && this.evaluationInfo.createType ===
+							'import') {
+							if (this.importKnowledges.length) {
+								this.importKnowledges.push(...refreshList.map(i => i.knowledge).flat(1))
+								await this.saveImportPoints([...new Set(this.importKnowledges)], paperItem)
 							}
 						}
 						this.$Message.success(this.$t('evaluation.paperList.saveSuc'))
@@ -1105,19 +1129,19 @@
 					sheet: this.evaluationInfo.sheet || null,
 					tags: [...new Set(this.evaluationInfo.tags)],
 					multipleRule: multipleRule || 1,
-					typeSummaryInfo:this.typeSummaryInfo,
-					orderTemp:this.orderTempIndex
+					typeSummaryInfo: this.typeSummaryInfo,
+					orderTemp: this.orderTempIndex
 				}
 				// 如果是编辑试卷并且试卷已经产生过答题卡 则让用户决定是否重新生成答题卡
 				let isRemoveSheet = false
-				if(paperItem.sheet && this.isEditPaper){
+				if (paperItem.sheet && this.isEditPaper) {
 					isRemoveSheet = await this.doConfirmRemoveSheet()
 				}
-				if(isRemoveSheet){
+				if (isRemoveSheet) {
 					await this.delPaperSheet(paperItem)
 					paperItem.sheet = null
 					this.isLoading = true
-				}else{
+				} else {
 					this.isLoading = true
 				}
 				// 保存导入的试题到BLOB以及COSMOS
@@ -1165,7 +1189,10 @@
 											.createBlobItem(item)
 										let file = new File([JSON.stringify(itemJsonFile)],
 											item.id + ".json");
-										containerClient.upload(file, { path:'paper/' + paperItem.name,checkSize:false}).then(res => {
+										containerClient.upload(file, {
+											path: 'paper/' + paperItem.name,
+											checkSize: false
+										}).then(res => {
 											r(200)
 										})
 									}
@@ -1178,8 +1205,10 @@
 						// 放入index.json文件
 						promiseArr.push(new Promise(async (r, j) => {
 							try {
-								blobFile = await containerClient.upload(paperFile,
-									{path:'paper/' + paperItem.name,checkSize:false})
+								blobFile = await containerClient.upload(paperFile, {
+									path: 'paper/' + paperItem.name,
+									checkSize: false
+								})
 								console.log('上传到试卷目录下', blobFile)
 								r(blobFile)
 							} catch (e) {
@@ -1204,7 +1233,8 @@
 									let sas = i.scope === 'private' ? privateSas :
 										schoolSas
 									let mediaFullPath = this.$evTools
-									.getBlobHost() + '/' + containerName + i.path
+										.getBlobHost() + '/' + containerName + i
+										.path
 									let fileName = i.path.split('/')[i.path.split(
 										'/').length - 1]
 									client.copyBlob('paper/' + paperItem.name +
@@ -1221,9 +1251,10 @@
 						// 校本组卷情况下 同步知识点数据
 						if (this.isSchool && this.isSavePoints && this.evaluationInfo.createType ===
 							'import') {
-							let allPoints = [...new Set(refreshList.map(i => i.knowledge).flat(1))]
-							if (allPoints.length) {
-								promiseArr.push(this.saveImportPoints(allPoints, paperItem))
+							if (this.importKnowledges.length) {
+								this.importKnowledges.push(...refreshList.map(i => i.knowledge).flat(1))
+								promiseArr.push(this.saveImportPoints([...new Set(this.importKnowledges)],
+									paperItem))
 							}
 						}
 
@@ -1257,7 +1288,7 @@
 								if (blobFile.blob) {
 									// 试卷保存更新后需要重新生成答题卡
 									paperItem.blob = blobFile.blob.split('/index.json')[0]
-									
+
 
 									let params = {
 										paper: await this.$evTools.createCosmosPaper(
@@ -1439,8 +1470,8 @@
 					startTime: 0,
 					endTime: 0,
 					createType: 'manual',
-					typeSummaryInfo:paper.typeSummaryInfo,
-					orderTemp:paper.orderTemp || 0
+					typeSummaryInfo: paper.typeSummaryInfo,
+					orderTemp: paper.orderTemp || 0
 				}
 				this.oldPaper = JSON.parse(JSON.stringify(this.evaluationInfo))
 			}
@@ -1473,8 +1504,8 @@
 				localStorage.setItem('noSave', JSON.stringify(curNoSaveArr))
 			})
 			// 设置富文本编辑器环境
-			sessionStorage.setItem('editorEnv',this.$route.name === 'newSchoolPaper' ? 'school' : 'private')
-			sessionStorage.setItem('paper_name',this.evaluationInfo.name)
+			sessionStorage.setItem('editorEnv', this.$route.name === 'newSchoolPaper' ? 'school' : 'private')
+			sessionStorage.setItem('paper_name', routerData ? routerData.name : this.evaluationInfo.name)
 		},
 
 		computed: {
@@ -1501,8 +1532,8 @@
 		},
 
 		watch: {
-			isLoading(n){
-				if(n){
+			isLoading(n) {
+				if (n) {
 					this.$Spin.show({
 						render: (h) => {
 							return h('div', [
@@ -1517,12 +1548,12 @@
 							])
 						}
 					});
-				}else{
+				} else {
 					this.$Spin.hide()
 				}
 			},
-			isGeneratePaper(n,o){
-				if(!this.isSchool){
+			isGeneratePaper(n, o) {
+				if (!this.isSchool) {
 					this.split1 = n ? 0.2 : 0
 				}
 			},
@@ -1536,21 +1567,21 @@
 				immediate: true,
 				handler(n, o) {
 					if (n && !this.isEditPaper) {
-						if(sessionStorage.getItem('isEditPaper') !== '1'){
+						if (sessionStorage.getItem('isEditPaper') !== '1') {
 							this.getSchoolBaseInfo().then(res => {
 								if (!res) return
 								this.schoolInfo = res
 								this.evaluationInfo.paperPeriod = n.periodIndex
 								this.onPeriodChange(n.periodIndex)
 							})
-						}else{
-							sessionStorage.setItem('isEditPaper',0)
+						} else {
+							sessionStorage.setItem('isEditPaper', 0)
 						}
 					}
 				}
 			}
 		},
-		
+
 		beforeRouteLeave(to, from, next) {
 			if (this.$refs.testPaper.hasModify) {
 				this.$Modal.confirm({
@@ -1559,14 +1590,14 @@
 					onOk: () => {
 						next();
 						// 设置富文本编辑器环境
-						sessionStorage.setItem('editorEnv','normal')
+						sessionStorage.setItem('editorEnv', 'normal')
 						localStorage.setItem('noSave', '[]')
 					}
 				});
 			} else {
 				next();
 				// 设置富文本编辑器环境
-				sessionStorage.setItem('editorEnv','normal')
+				sessionStorage.setItem('editorEnv', 'normal')
 				localStorage.setItem('noSave', '[]')
 			}
 		},

+ 1 - 1
TEAMModelOS/ClientApp/src/view/joinclass/JoinClass.vue

@@ -42,7 +42,7 @@
                         {{listName}}
                     </span>
                 </p>
-                <router-link v-show="(isJoin || isRep) && isPC" :to="{name:'login', query:{code}}" style="margin-top:50px;display:block">{{$t('cusMgt.join.toTeammodel')}}</router-link>
+                <router-link v-show="(isJoin || isRep) && isPC" :to="{name:'login', query:{code,identity:'student'}}" style="margin-top:50px;display:block">{{$t('cusMgt.join.toTeammodel')}}</router-link>
             </div>
 
             <div class="join-btn" @click="toLogin()" v-show="!isJoin && !isRep">

+ 1 - 0
TEAMModelOS/ClientApp/src/view/jyzx/offline.vue

@@ -505,6 +505,7 @@ export default {
             this.resource = {}
             this.homeWork = ""
             this.uploadList = []
+            this.answerList = undefined
             this.uploadIndex = -1
             let req = {
                 code: this.$store.state.userInfo.schoolCode,

+ 13 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/ByQuMark.vue

@@ -32,7 +32,7 @@
                 <span class="base-info-item" style="white-space: nowrap;">
                     {{$t('learnActivity.score.quIndex')}}
                 </span>
-                <span :class="['qu-order-tag-def', quIndex == index ? 'qu-order-tag-active' : '' ]" v-for="(item,index) in quNoList" :key="index" @click="quIndex = index">
+                <span :class="['qu-order-tag-def', quIndex == index ? 'qu-order-tag-active' : '' ]" v-for="(item,index) in quNoList" :key="index" @click="selectQu(index)">
                     {{item.label}}
                 </span>
             </div>
@@ -231,6 +231,12 @@ export default {
         }
     },
     methods: {
+        selectQu(index){
+            if(this.isUpd){
+                this.saveScore()
+            }
+            this.quIndex = index
+        },
         /**
          * score 分数
          * isAll 是否所有 false -> 筛选未作答
@@ -397,6 +403,10 @@ export default {
             this.markStatus = true
         },
         saveScore() {
+            if(!this.isUpd){
+                this.$Message.warning(this.$t('learnActivity.score.noUpd'))
+                return
+            }
             let saveList = []
             for (const key in this.preSaveList) {
                 saveList.push(this.preSaveList[key])
@@ -415,12 +425,13 @@ export default {
                 "school": this.examInfo.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
                 "subjectId": this.subjectId
             }
+            let d = this._.cloneDeep(saveList)
             this.$api.learnActivity.UpsertAllRecord(requestData).then(res => {
                 if (res.error == null) {
                     this.successTips()
+                    this.$emit('updScore', d)
                     //TODO 清空预保存学生
                     this.preSaveList = {}
-                    this.$emit('updScore', saveList)
                 } else {
                     this.$Message.error(this.$t('learnActivity.score.saveSocreErr'))
                 }

+ 8 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/ByStuMark.vue

@@ -710,6 +710,11 @@ export default {
 
         //保存学生分数
         saveScore() {
+            if(!this.isUpd){
+                this.$Message.warning(this.$t('learnActivity.score.noUpd'))
+                return
+            }
+            let d = this._.cloneDeep(this.studentAnswer)
             let requestData = {
                 "id": this.examId,
                 "code": this.owner == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
@@ -724,10 +729,10 @@ export default {
                 "subjectId": this.subjectId
             }
             this.$api.learnActivity.UpsertAllRecord(requestData).then(res => {
-                if (res.error == null) {
+                if (!res.error) {
                     this.$Message.success(this.$t('learnActivity.score.saveScoreOk'))
                     this.isUpd = false
-                    this.$emit('updScore', [this.studentAnswer])
+                    this.$emit('updScore', [d])
                     if (!this.studentAnswer.scores.includes(-1)) {
                         this.isComplete = true
                     }
@@ -805,7 +810,7 @@ export default {
         pStudentAnswer: {
             async handler(newValue, oldValue) {
                 this.studentAnswer = this._.cloneDeep(newValue || {})
-                console.log(this.studentAnswer)
+                this.isComplete = false
                 //处理默认显示批注
                 this.markFlag = {}
                 if (this.studentAnswer.mark) {

+ 80 - 31
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue

@@ -32,9 +32,13 @@
                                 <span class="ev-info-tag ev-tag-common">{{getTypeLabel(item.type)}}</span>
                                 <!-- 评测模式 -->
                                 <span class="ev-info-tag ev-tag-common">{{getModeLabel(item.source)}}</span>
-                                <!-- 活动状态 -->
-                                <span class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.statusColor, color: item.statusColor}">
-                                    {{ item.statusText }}
+                                <!-- 活动进度状态 -->
+                                <span class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.progColor, color: item.progColor}">
+                                    {{ item.progText }}
+                                </span>
+                                <!-- 活动评分状态 -->
+                                <span v-show="item.scoreText" class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.scoreColor, color: item.scoreColor}">
+                                    {{ item.scoreText }}
                                 </span>
                                 <!-- 立即结束 -->
                                 <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
@@ -401,9 +405,6 @@ export default {
         selectSubject(index) {
             this.curSubIndex = index
         },
-        selectBar(index) {
-            this.curBarIndex = index
-        },
         dateFormat(timestamp) {
             let date = new Date(timestamp)
             let Y = date.getFullYear()
@@ -414,24 +415,23 @@ export default {
             return `${Y}-${M < 9 ? '0' + (M + 1) : M + 1}-${D} ${H < 10 ? '0' + H : H}:${MIN < 10 ? '00' : MIN}`
         },
         getEvStatusInfo(progress, isScore) {
-            let info = {
-                // color: '#ed4014'
-            }
+            let info = {}
             if (progress == 'pending') {
-                info.text = this.$t('learnActivity.mgtScEv.pending')
-                info.color = '#2d8cf0'
-            }
-            if (progress == 'going') {
-                info.text = this.$t('learnActivity.mgtScEv.going')
-                info.color = '#19be6b'
+                info.progText = this.$t('learnActivity.mgtScEv.pending')
+                info.progColor = '#2d8cf0'
+            } else if (progress == 'going') {
+                info.progText = this.$t('learnActivity.mgtScEv.going')
+                info.progColor = '#19be6b'
+            } else if (progress == 'finish') {
+                info.progText = this.$t('learnActivity.mgtScEv.finish')
+                info.progColor = '#515a6e'
             }
-            if (progress == 'finish' && isScore === 0) {
-                info.text = this.$t('learnActivity.mgtScEv.scoreStatus')
-                info.color = '#ff9900'
-            }
-            if (progress == 'finish' && isScore === 1) {
-                info.text = this.$t('learnActivity.mgtScEv.finish')
-                info.color = '#515a6e'
+            if (isScore === 0) {
+                info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus')
+                info.scoreColor = '#ff9900'
+            } else if (isScore === 1) {
+                info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
+                info.scoreColor = '#515a6e'
             }
             return info
         },
@@ -448,8 +448,10 @@ export default {
                         })
                         res.examInfo.forEach(item => {
                             let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
-                            item.statusText = statusInfo.text
-                            item.statusColor = statusInfo.color
+                            item.progText = statusInfo.progText
+                            item.progColor = statusInfo.progColor
+                            item.scoreText = statusInfo.scoreText
+                            item.scoreColor = statusInfo.scoreColor
                         })
                         this.evaluationList = res.examInfo
                         this.evaListShow = res.examInfo
@@ -462,7 +464,7 @@ export default {
                 }
             )
         },
-        selectEvaluation(index) {
+        checkScoreSave(fn, index) {
             let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
             let compQu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byQuMark'] : null
             if ((compStu && compStu.isUpd) || (compQu && compQu.isUpd)) {
@@ -477,16 +479,33 @@ export default {
                         } else if (compQu && compQu.isUpd) {
                             compQu.saveScore()
                         }
-                        this.toEvaluation(index)
+                        if (fn) fn(index)
                     },
                     onCancel: () => {
-                        this.toEvaluation(index)
+                        if (compStu && compStu.isUpd) {
+                            compStu.isUpd = false
+                        } else if (compQu && compQu.isUpd) {
+                            compStu.preSaveList = {}
+                        }
+                        if (fn) fn(index)
                     }
                 })
             } else {
-                this.toEvaluation(index)
+                if (fn) fn(index)
             }
         },
+        selectEvaluation(index) {
+            this.checkScoreSave(this.toEvaluation, index)
+        },
+        selectBar(index) {
+            this.checkScoreSave(this.handleSelectBar, index)
+        },
+        handleSelectBar(index) {
+            this.curBarIndex = index
+            this.$nextTick(() => {
+                if (this.$refs['score-box']) this.$refs['score-box'].showTest = false
+            })
+        },
         toEvaluation(index) {
             this.curSubIndex = 0
             this.curEvaIndex = index
@@ -527,8 +546,10 @@ export default {
                                 resData.papers[index].sheetNo = sheetNo
                                 //补充评测状态信息
                                 let statusInfo = this.getEvStatusInfo(resData.progress, resData.sStatus)
-                                resData.statusText = statusInfo.text
-                                resData.statusColor = statusInfo.color
+                                resData.progText = statusInfo.progText
+                                resData.progColor = statusInfo.progColor
+                                resData.scoreText = statusInfo.scoreText
+                                resData.scoreColor = statusInfo.scoreColor
                             }
                         }
                         this.evaListShow.splice(this.curEvaIndex, 1, resData)
@@ -544,7 +565,32 @@ export default {
             ).finally(() => {
                 this.isLoading = false;
             })
-        }
+        },
+        beforeunloadHandler(e) {
+            let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
+            let compQu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byQuMark'] : null
+            if ((compStu && compStu.isUpd) || (compQu && compQu.isUpd)) {
+                e = e || window.event
+                if (e) {
+                    e.returnValue = '关闭提示'
+                }
+                return '关闭提示'
+            }
+        },
+    },
+    mounted() {
+        // 监听浏览器刷新事件
+        window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
+        // 处理浏览器返回事件
+        // if (window.history && window.history.pushState) {
+        //     // 向历史记录中插入了当前页
+        //     history.pushState(null, null, document.URL);
+        //     window.addEventListener('popstate', this.goBack, false);
+        // }
+    },
+    destroyed() {
+        window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
+        window.removeEventListener('popstate', this.goBack, false);
     },
     created() {
         if (this.$route.name == 'privateEvaluation') {
@@ -592,6 +638,9 @@ export default {
                 }
             }
         },
+    },
+    beforeRouteLeave(to, from, next) {
+        this.checkScoreSave(next)
     }
 }
 </script>

+ 80 - 49
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue

@@ -64,9 +64,13 @@
                                 <!-- 评测模式 -->
                                 <span class="ev-info-tag ev-tag-common">{{getModeLabel(item.source)}}</span>
                                 <span class="ev-info-tag ev-tag-common">{{getTypeLabel(item.type)}}</span>
-                                <!-- 活动状态 -->
-                                <span class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.statusColor, color: item.statusColor}">
-                                    {{ item.statusText }}
+                                <!-- 活动进度状态 -->
+                                <span class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.progColor, color: item.progColor}">
+                                    {{ item.progText }}
+                                </span>
+                                <!-- 活动评分状态 -->
+                                <span class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.scoreColor, color: item.scoreColor}">
+                                    {{ item.scoreText }}
                                 </span>
                                 <!-- 立即结束 -->
                                 <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
@@ -511,9 +515,7 @@ export default {
         selectSubject(index) {
             this.curSubIndex = index
         },
-        selectBar(index) {
-            this.curBarIndex = index
-        },
+
         dateFormat(timestamp) {
             let date = new Date(timestamp)
             let Y = date.getFullYear()
@@ -524,24 +526,23 @@ export default {
             return `${Y}-${M < 9 ? '0' + (M + 1) : M + 1}-${D} ${H < 10 ? '0' + H : H}:${MIN < 10 ? '00' : MIN}`
         },
         getEvStatusInfo(progress, isScore) {
-            let info = {
-                // color: '#ed4014'
-            }
+            let info = {}
             if (progress == 'pending') {
-                info.text = this.$t('learnActivity.mgtScEv.pending')
-                info.color = '#2d8cf0'
-            }
-            if (progress == 'going') {
-                info.text = this.$t('learnActivity.mgtScEv.going')
-                info.color = '#19be6b'
+                info.progText = this.$t('learnActivity.mgtScEv.pending')
+                info.progColor = '#2d8cf0'
+            } else if (progress == 'going') {
+                info.progText = this.$t('learnActivity.mgtScEv.going')
+                info.progColor = '#19be6b'
+            } else if (progress == 'finish') {
+                info.progText = this.$t('learnActivity.mgtScEv.finish')
+                info.progColor = '#515a6e'
             }
-            if (progress == 'finish' && isScore === 0) {
-                info.text = this.$t('learnActivity.mgtScEv.scoreStatus')
-                info.color = '#ff9900'
-            }
-            if (progress == 'finish' && isScore === 1) {
-                info.text = this.$t('learnActivity.mgtScEv.finish')
-                info.color = '#515a6e'
+            if (isScore === 0) {
+                info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus')
+                info.scoreColor = '#ff9900'
+            } else if (isScore === 1) {
+                info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
+                info.scoreColor = '#515a6e'
             }
             return info
         },
@@ -559,8 +560,10 @@ export default {
                         })
                         res.examInfo.forEach(item => {
                             let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
-                            item.statusText = statusInfo.text
-                            item.statusColor = statusInfo.color
+                            item.progText = statusInfo.progText
+                            item.progColor = statusInfo.progColor
+                            item.scoreText = statusInfo.scoreText
+                            item.scoreColor = statusInfo.scoreColor
                         })
                         this.evaluationList = res.examInfo
                         this.evaListShow = res.examInfo
@@ -584,7 +587,7 @@ export default {
                 }
             )
         },
-        selectEvaluation(index) {
+        checkScoreSave(fn, index) {
             let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
             let compQu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byQuMark'] : null
             if ((compStu && compStu.isUpd) || (compQu && compQu.isUpd)) {
@@ -599,16 +602,33 @@ export default {
                         } else if (compQu && compQu.isUpd) {
                             compQu.saveScore()
                         }
-                        this.toEvaluation(index)
+                        if (fn) fn(index)
                     },
                     onCancel: () => {
-                        this.toEvaluation(index)
+                        if (compStu && compStu.isUpd) {
+                            compStu.isUpd = false
+                        } else if (compQu && compQu.isUpd) {
+                            compStu.preSaveList = {}
+                        }
+                        if (fn) fn(index)
                     }
                 })
             } else {
-                this.toEvaluation(index)
+                if (fn) fn(index)
             }
         },
+        selectEvaluation(index) {
+            this.checkScoreSave(this.toEvaluation, index)
+        },
+        selectBar(index) {
+            this.checkScoreSave(this.handleSelectBar, index)
+        },
+        handleSelectBar(index) {
+            this.curBarIndex = index
+            this.$nextTick(() => {
+                if (this.$refs['score-box']) this.$refs['score-box'].showTest = false
+            })
+        },
         toEvaluation(index) {
             this.curSubIndex = 0
             this.curEvaIndex = index
@@ -649,8 +669,10 @@ export default {
                             resData.papers[index].sheetNo = sheetNo
                             //补充评测状态信息
                             let statusInfo = this.getEvStatusInfo(resData.progress, resData.sStatus)
-                            resData.statusText = statusInfo.text
-                            resData.statusColor = statusInfo.color
+                            resData.progText = statusInfo.progText
+                            resData.progColor = statusInfo.progColor
+                            resData.scoreText = statusInfo.scoreText
+                            resData.scoreColor = statusInfo.scoreColor
                         }
                         this.evaListShow.splice(this.curEvaIndex, 1, resData)
                         this.examDetaiInfo = resData
@@ -665,7 +687,33 @@ export default {
             ).finally(() => {
                 this.isLoading = false;
             })
-        }
+        },
+        beforeunloadHandler(e) {
+            let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
+            let compQu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byQuMark'] : null
+            if ((compStu && compStu.isUpd) || (compQu && compQu.isUpd)) {
+                e = e || window.event
+                if (e) {
+                    e.returnValue = '关闭提示'
+                }
+                return '关闭提示'
+            }
+        },
+        // goBack(){}
+    },
+    mounted() {
+        // 监听浏览器刷新事件
+        window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
+        // 处理浏览器返回事件
+        // if (window.history && window.history.pushState) {
+        //     // 向历史记录中插入了当前页
+        //     history.pushState(null, null, document.URL);
+        //     window.addEventListener('popstate', this.goBack, false);
+        // }
+    },
+    destroyed() {
+        window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
+        window.removeEventListener('popstate', this.goBack, false);
     },
     created() {
         this.scope = 'school'
@@ -694,24 +742,7 @@ export default {
         }
     },
     beforeRouteLeave(to, from, next) {
-        let comp = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : undefined
-        if (comp && comp.isUpd) {
-            this.$Modal.confirm({
-                title: this.$t('learnActivity.score.saveScoreTitle'),
-                content: this.$t('learnActivity.score.saveScoreContent'),
-                okText: this.$t('learnActivity.mark.yes'),
-                cancelText: this.$t('learnActivity.mark.no'),
-                onOk: () => {
-                    comp.saveScore()
-                    next()
-                },
-                onCancel: () => {
-                    next()
-                }
-            })
-        } else {
-            next()
-        }
+        this.checkScoreSave(next)
     }
 }
 </script>

+ 28 - 11
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue

@@ -68,7 +68,7 @@
                     <Loading :top="200" type="1" style="text-align:center" v-show="dataLoading"></Loading>
                 </div>
                 <!-- 按题批阅 -->
-                <div class="scoring-handle-box" v-if="showTest && markType== 'byQu'">
+                <div class="scoring-handle-box" v-show="showTest && markType== 'byQu'">
                     <ByQuMark @updScore="updScore" :paper="paperInfo" :examInfo="examInfo" ref="byQuMark" :stusInfo="studentScore" :classId="chooseClass" :subjectId="chooseSubject"></ByQuMark>
                     <Loading :top="200" type="1" style="text-align:center" v-show="dataLoading"></Loading>
                 </div>
@@ -245,9 +245,6 @@ export default {
         }
     },
     methods: {
-        toggleMarkType() {
-            this.markType = this.markType == 'byQu' ? 'byStu' : 'byQu'
-        },
         exportData() {
             if (this.examInfo.progress == 'going') {
                 this.$Modal.confirm({
@@ -387,7 +384,7 @@ export default {
                             filename: sName
                         })
                     }
-                    excel.export_array_to_sheet(sheets,this.examInfo.name)
+                    excel.export_array_to_sheet(sheets, this.examInfo.name)
                 },
                 err => {
                     console.error(err)
@@ -489,7 +486,10 @@ export default {
             this.currentPage = page
             this.tableData = this.studentScore.slice(start, end)
         },
-        toggleScoreStatus() {
+        /**
+         * 检查评测打分
+         */
+        checkScoreSave(fn) {
             if (this.$refs['byStuMark']?.isUpd || this.$refs['byQuMark']?.isUpd) {
                 this.$Modal.confirm({
                     title: this.$t('learnActivity.score.saveScoreTitle'),
@@ -500,28 +500,42 @@ export default {
                         if (this.$refs['byStuMark'].isUpd) {
                             this.$refs['byStuMark'].saveScore()
                             this.$refs['byStuMark'].isComplete = false
-                            this.showTest = !this.showTest
+                            if (fn) fn()
                         } else {
                             this.$refs['byQuMark'].saveScore()
+                            if (fn) fn()
                         }
                     },
                     onCancel: () => {
                         if (this.$refs['byStuMark'].isUpd) {
                             this.$refs['byStuMark'].isUpd = false
                             this.$refs['byStuMark'].isComplete = false
-                            this.showTest = !this.showTest
+                            if (fn) fn()
                         } else {
                             this.$refs['byQuMark'].preSaveList = {}
+                            if (fn) fn()
                         }
 
                     }
                 })
             } else {
                 this.$refs['byStuMark'].isComplete = false
-                this.showTest = !this.showTest
                 this.$refs['byQuMark'] && (this.$refs['byQuMark'].preSaveList = {})
+                if (fn) fn()
             }
         },
+        toggleMarkType() {
+            this.checkScoreSave(this.handleMarkType)
+        },
+        handleMarkType() {
+            this.markType = this.markType == 'byQu' ? 'byStu' : 'byQu'
+        },
+        toggleScoreStatus() {
+            this.checkScoreSave(this.handleScoreStatus)
+        },
+        handleScoreStatus() {
+            this.showTest = !this.showTest
+        },
         updScore(data) {
             if (this.$refs['simpleData'] && this.examInfo.progress === 'finish') {
                 this.$refs['simpleData'].findSimpleAna()
@@ -603,8 +617,11 @@ export default {
             }
         },
         //获取当前学生信息
-        setStuInfo(data) {
+        async setStuInfo(data) {
             if (data) {
+                if (this.$refs['byStuMark'] && this.$refs['byStuMark'].isUpd) {
+                    await this.$refs['byStuMark'].saveScore()
+                }
                 this.chooseStudent.name = data.label
                 let student = this.tableData.find(i => i.id == data.value)
                 this.chooseStudent.type = student?.type
@@ -614,7 +631,7 @@ export default {
                     this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex];
                     this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex];
                     this.chooseStudent["mark"] = this.paperInfo[this.chooseClass].studentAns.mark ? this.paperInfo[this.chooseClass].studentAns.mark[answerIndex] || '' : '' //批注
-                    this.chooseStudent["status"] = false;
+                    this.chooseStudent["status"] = false
                 }
             }
         },

+ 13 - 10
TEAMModelOS/ClientApp/src/view/learnactivity/SimpleAnalysis.vue

@@ -1,6 +1,9 @@
 <template>
     <div>
-        <div class="overview-box" v-if="examInfo.progress == 'finish'">
+        <div v-if="dataErr" class="data-err-wrap">
+            <EmptyData :textContent="$t('learnActivity.simple.dataErr')"></EmptyData>
+        </div>
+        <div class="overview-box" v-if="examInfo.progress == 'finish' && !dataErr">
             <!-- 总人数 -->
             <div class="count-box">
                 <span class="count-subject-num">{{examInfo.stuCount}}</span>
@@ -42,7 +45,7 @@
                 </span>
             </div>
         </div>
-        <div class="overview-box" style="justify-content: space-around;padding-top:40px" v-if="examInfo.progress == 'finish'">
+        <div class="overview-box" style="justify-content: space-around;padding-top:40px" v-if="examInfo.progress == 'finish' && !dataErr">
             <ScoreMatrix :pieData="scoreSegment"></ScoreMatrix>
             <Comply :complyData="complyData"></Comply>
             <AvgCompare :pieData="simpleData.averageMap"></AvgCompare>
@@ -138,6 +141,7 @@ export default {
     },
     data() {
         return {
+            dataErr:false,
             simpleData: {},
             allData: {},
             calculating: false
@@ -190,15 +194,15 @@ export default {
                         }
 
                     } else {
-                        // this.$Message.error('API ERROR!')
+                        this.dataErr = true
                         this.$Message.error(this.$t('learnActivity.simple.simpleErr'))
                     }
                 },
                 err => {
-                    // this.$Message.error('API ERROR!')
+                    this.dataErr = true
                 }
             ).finally(() => {
-                this.isLoading = false;
+                this.isLoading = false
             })
         },
     },
@@ -206,11 +210,6 @@ export default {
         examInfo: {
             handler() {
                 if (this.examInfo.progress == 'finish') {
-                    // if (this.allData[this.examInfo.id]) {
-                    //     this.simpleData = this.allData[this.examInfo.id]
-                    // } else {
-                    //     this.findSimpleAna()
-                    // }
                     this.findSimpleAna()
                 }
             },
@@ -319,6 +318,10 @@ export default {
 }
 </script>
 <style lang="less" scoped>
+.data-err-wrap{
+    background: #f9f9f9;
+    padding: 10px 0px 40px 0px;
+}
 .overview-box {
     width: 100%;
     flex-wrap: wrap;

+ 24 - 8
TEAMModelOS/ClientApp/src/view/login/page/Student.vue

@@ -121,10 +121,10 @@
                     <div class="errlable">{{ loginErrText }}</div>
                 </Form>
                 <p class="form-bottom">
-                    <!-- <span class="qrcode-login" @click="chgLoginType()">
-                        <Icon size="14" custom="iconfont icon-qr-code" style="vertical-align: text-bottom;" />
+                    <span class="qrcode-login" @click="chgLoginType()">
+                        <Icon size="14" custom="iconfont icon-qr-code" color="rgb(45, 140, 240)" style="vertical-align: text-bottom;" />
                         {{ $t('login.link.QRLogin') }}
-                    </span> -->
+                    </span>
                     <router-link to="/forgotpw" href="" class="form-bottom-link">
                         {{$t('login.link.forgetPsw')}}
                     </router-link>
@@ -153,13 +153,13 @@
                         </p>
                     </div>
                     <div style="margin:auto" class="other-login-item" v-if="srvAdr == 'China'" @click="oauthLogin('wechat')">
-                        <Icon custom="iconfont icon-wechat" class="other-login-icon" color="#01c923" />
+                        <Icon custom="iconfont icon-wechat" class="other-login-icon" />
                         <p class="other-login-text">{{$t('login.communy.wechat')}}</p>
                     </div>
                 </div>
             </div>
             <!-- 醍摩豆qrcode登录 -->
-            <div v-show="qrloginFlag" class="tmd-login-box" style="width:300px;">
+            <div v-show="qrloginFlag" class="tmd-login-box" style="width:260px;">
                 <div style="width:fit-content;margin: auto;">
                     <div class="title">
                         <div class="logo">
@@ -415,10 +415,9 @@ export default {
                                 this.loginErrText = this.$t('login.apiError.text1')
                                 this.loading = false
                             } else {
-								localStorage.setItem("access_token", result.access_token)
+                                localStorage.setItem("access_token", result.access_token)
                                 this.$api.login.studLoginbyID(result).then(
                                     res => {
-										console.log(res)
                                         User.login({
                                             id: this.loginForm.id,
                                             roles: ['student'],
@@ -473,7 +472,24 @@ export default {
                 this.$Spin.hide(); // 關閉加載畫面
                 if (!res.error) {
                     // 登入大雲開始
-                    this.loginProcess(res, this.defaultSchool.code)
+                    // this.loginProcess(res, this.defaultSchool.code)
+                    localStorage.setItem("access_token", res.access_token)
+                    this.$api.login.studLoginbyID(res).then(
+                        res => {
+                            User.login({
+                                id: this.loginForm.id,
+                                roles: ['student'],
+                                permissions: []
+                            }).then(r => {
+                                if (r) {
+                                    localStorage.setItem('identity', 'student')
+                                    this.$router.push({ path: '/studentWeb' })
+                                }
+                            })
+                        }
+                    ).catch(e => {
+                        console.error(e)
+                    })
                 } else {
                     this.$Message.warning(this.$t('login.sse.error.text1'));
                 }

+ 7 - 7
TEAMModelOS/ClientApp/src/view/login/page/Teacher.vue

@@ -136,7 +136,7 @@
             <div class="other-login-box" style="margin-top:0px">
                 <!-- 钉钉暂时不加 -->
                 <div class="other-login-item" @click="oauthLogin('dingding')" v-if="srvAdr == 'China'">
-                    <Icon custom="iconfont icon-dingding"   class="other-login-icon" />
+                    <Icon custom="iconfont icon-dingding" class="other-login-icon" />
                     <p class="other-login-text">
                         {{$t('login.communy.dingding')}}
                     </p>
@@ -370,14 +370,14 @@ export default {
         //     )
         // },
         oauthLogin: function (provider) { // 第三方登入
-			let isDev = this.$store.state.config.srvAdrType != 'product'
-			if(provider === 'dingding' && !isDev){
-				this.$Message.warning(this.$t('login.dingCloseTip'))
-				return
-			}
+            let isDev = this.$store.state.config.srvAdrType != 'product'
+            if (provider === 'dingding' && !isDev) {
+                this.$Message.warning(this.$t('login.dingCloseTip'))
+                return
+            }
             let redirect_uri = window.location.origin + '/login';
             // console.log(redirect_uri);
-			this.$api.BuildOauthUrl(provider, redirect_uri).then(res => {
+            this.$api.BuildOauthUrl(provider, redirect_uri).then(res => {
                 console.log('三方登录', res)
                 window.location.href = res
             })

+ 7 - 3
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less

@@ -137,11 +137,11 @@
 .evaluation-status-tag {
     padding: 0px 2px;
     border: 1px solid #1CC0F3;
-    margin-left: 4px;
-    margin-right: 4px;
+    // margin-left: 4px;
+    margin-right: 8px;
     border-radius: 2px;
     font-size: 12px;
-    vertical-align: top;
+    // vertical-align: top;
 }
 .ev-attr-wrap{
     margin-right: 20px;
@@ -474,4 +474,8 @@
     font-size: 16px;
     display: none;
     margin-top: -5px;
+}
+.ev-description-wrap{
+    display: flex;
+    justify-content: space-between;
 }

+ 132 - 63
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -86,6 +86,10 @@
                                     <Icon type="md-settings" size="16" />
                                     {{$t('cusMgt.editStu')}}
                                 </span>
+                                <span class="action-btn-wrap" @click="exportStudents">
+                                    <Icon type="md-settings" size="16" />
+                                    {{$t('cusMgt.exportStu')}}
+                                </span>
                                 <Button icon="md-download" class="save-btn action-btn-wrap" style="margin-top:6px" @click="generateQrcodes" :loading="btnLoading">
                                     {{$t('schoolBaseInfo.exportQrCode')}}
                                 </Button>
@@ -195,21 +199,6 @@
                                         <ListItemMeta @click.native="toAcDetail(index)" class="ac-item-warp">
                                             <p slot="title" class="record-name">
                                                 {{item.name}}
-                                                <!-- 评测模式 -->
-                                                <span v-show="curAcType === 'ev'" class="evaluation-status-tag" style="color:#0BADD4">
-                                                    {{getModeLabel(item.source)}}
-                                                </span>
-                                                <span v-show="curAcType === 'ev'" class="evaluation-status-tag" style="color:#0BADD4">
-                                                    {{getTypeLabel(item.type)}}
-                                                </span>
-                                                <!-- 学校|个人 -->
-                                                <span class="evaluation-status-tag" :style="{ borderColor: item.owner == 'school' ? '#0BADD4' : '#ff9900', color: (item.owner == 'school' ? '#0BADD4' : '#ff9900')}">
-                                                    {{ item.owner == 'school' ? $t('cusMgt.school') : $t('cusMgt.private') }}
-                                                </span>
-                                                <!-- 评测状态 -->
-                                                <span class="evaluation-status-tag" :style="{ borderColor: item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#ed4014', color: (item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#ed4014')}">
-                                                    {{ item.progress == 'pending' ? $t('learnActivity.mgtScEv.pending') : item.progress == 'going' ? $t('learnActivity.mgtScEv.going') : $t('learnActivity.mgtScEv.finish') }}
-                                                </span>
                                             </p>
                                             <span slot="avatar" style="margin-top:12px;display: inline-block;margin-left:10px;">
                                                 <Icon v-if="curAcType == 'ev'" custom="iconfont icon-test" size="24" color="#8685EF" />
@@ -218,18 +207,41 @@
                                                 <Icon v-else-if="curAcType == 'hw'" custom="iconfont icon-hw" size="24" color="#CCC" />
                                                 <Icon v-else custom="iconfont icon-learning-self" size="24" color="#CCC" />
                                             </span>
-                                            <div slot="description">
-                                                <span class="ev-attr-wrap">
-                                                    <span class="attr-label">
-                                                        <Icon type="md-time" size="16" />
-                                                        {{$t('cusMgt.acTime')}}:
+                                            <div slot="description" class="ev-description-wrap">
+                                                <p>
+                                                    <!-- 评测模式 -->
+                                                    <span v-show="curAcType === 'ev'" class="evaluation-status-tag" style="color:#0BADD4">
+                                                        {{getModeLabel(item.source)}}
                                                     </span>
-                                                    <span class="attr-value">
-                                                        {{dateFormat(item.startTime)}}
-                                                        -
-                                                        {{dateFormat(item.endTime)}}
+                                                    <span v-show="curAcType === 'ev'" class="evaluation-status-tag" style="color:#0BADD4">
+                                                        {{getTypeLabel(item.type)}}
                                                     </span>
-                                                </span>
+                                                    <!-- 学校|个人 -->
+                                                    <span class="evaluation-status-tag" :style="{ borderColor: item.owner == 'school' ? '#0BADD4' : '#ff9900', color: (item.owner == 'school' ? '#0BADD4' : '#ff9900')}">
+                                                        {{ item.owner == 'school' ? $t('cusMgt.school') : $t('cusMgt.private') }}
+                                                    </span>
+                                                    <!-- 活动进度状态 -->
+                                                    <span class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.progColor, color: item.progColor}">
+                                                        {{ item.progText }}
+                                                    </span>
+                                                    <!-- 活动评分状态 -->
+                                                    <span v-show="item.scoreText" class="evaluation-status-tag ev-tag-common" :style="{ borderColor: item.scoreColor, color: item.scoreColor}">
+                                                        {{ item.scoreText }}
+                                                    </span>
+                                                </p>
+                                                <p>
+                                                    <span class="ev-attr-wrap">
+                                                        <span class="attr-label">
+                                                            <Icon type="md-time" size="16" />
+                                                            {{$t('cusMgt.acTime')}}:
+                                                        </span>
+                                                        <span class="attr-value">
+                                                            {{dateFormat(item.startTime)}}
+                                                            -
+                                                            {{dateFormat(item.endTime)}}
+                                                        </span>
+                                                    </span>
+                                                </p>
                                             </div>
                                         </ListItemMeta>
                                     </ListItem>
@@ -381,6 +393,7 @@ import PersonalPhoto from '@/components/public/personalPhoto/Index.vue'
 import StudentList from '@/components/coursemgt/StudentList.vue'
 import TeaTable from './TeaTable.vue'
 import Video from '../video/Video.vue'
+import excel from '@/utils/excel.js'
 export default {
     components: {
         StudentList, PersonalPhoto, TeaTable,
@@ -470,12 +483,12 @@ export default {
                     align: 'center',
                     sortable: true
                 },
-                {
-                    title: this.$t('courseManage.classroom.studentTableC5'),
-                    slot: 'groupId',
-                    align: 'center',
-                    sortable: true
-                },
+                // {
+                //     title: this.$t('courseManage.classroom.studentTableC5'),
+                //     slot: 'groupId',
+                //     align: 'center',
+                //     sortable: true
+                // },
                 {
                     title: this.$t('courseManage.classroom.studentTableC6'),
                     slot: 'groupName',
@@ -585,6 +598,51 @@ export default {
         }
     },
     methods: {
+        //导出名单
+        exportStudents() {
+            let fileName = this.teaClassList[this.curClassIndex].listName || this.teaClassList[this.curClassIndex].classInfo.name
+            let sIndex = this.isDefList ? 1 : 2
+            let column = this.isDefList ? this.classColumn : this.listColumn
+            let title = column.map(item => item.title)
+            let key = column.map(item => item.key || item.slot)
+            title.splice(0,sIndex)
+            key.splice(0,sIndex)
+            let data = this._.cloneDeep(this.students)
+            if(!this.isDefList){
+                data.forEach(item=>{
+                    item.type = item.type === 2 ? this.$t('cusMgt.schoolType') : this.$t('cusMgt.tmIDType')
+                })
+            }
+            const params = {
+                title,
+                key,
+                data,
+                autoWidth: true,
+                filename: fileName
+            }
+            excel.export_array_to_excel(params)
+        },
+        getEvStatusInfo(progress, isScore) {
+            let info = {}
+            if (progress == 'pending') {
+                info.progText = this.$t('learnActivity.mgtScEv.pending')
+                info.progColor = '#2d8cf0'
+            } else if (progress == 'going') {
+                info.progText = this.$t('learnActivity.mgtScEv.going')
+                info.progColor = '#19be6b'
+            } else if (progress == 'finish') {
+                info.progText = this.$t('learnActivity.mgtScEv.finish')
+                info.progColor = '#515a6e'
+            }
+            if (isScore === 0) {
+                info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus')
+                info.scoreColor = '#ff9900'
+            } else if (isScore === 1) {
+                info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
+                info.scoreColor = '#515a6e'
+            }
+            return info
+        },
         /**获取type对应的label */
         getTypeLabel(code) {
             for (let item of this.$GLOBAL.EV_TYPE()) {
@@ -947,11 +1005,13 @@ export default {
         },
         //时间戳转换
         dateFormat(timestamp) {
-            var date = new Date(timestamp)
-            var Y = date.getFullYear() + '/'
-            var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/'
-            var D = date.getDate() + ' '
-            return Y + M + D;
+            let date = new Date(timestamp)
+            let Y = date.getFullYear()
+            let M = date.getMonth()
+            let D = date.getDate()
+            let H = date.getHours()
+            let MIN = date.getMinutes()
+            return `${Y}-${M < 9 ? '0' + (M + 1) : M + 1}-${D} ${H < 10 ? '0' + H : H}:${MIN < 10 ? '00' : MIN}`
         },
         //获取活动列表
         getActivityList() {
@@ -993,6 +1053,14 @@ export default {
                     if (!res.error) {
                         switch (this.curAcType) {
                             case 'ev':
+                                // 处理活动状态
+                                res.datas.forEach(item => {
+                                    let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
+                                    item.progText = statusInfo.progText
+                                    item.progColor = statusInfo.progColor
+                                    item.scoreText = statusInfo.scoreText
+                                    item.scoreColor = statusInfo.scoreColor
+                                })
                                 this.evList = res.datas
                                 break
                             case 'vote':
@@ -1794,33 +1862,34 @@ export default {
         this.initData()
     },
     activated() {
-        let delId = this.$route.query.delId
-        console.log(this.curAcType)
-        if (delId) {
-            let index, data
-            switch (this.curAcType) {
-                case 'ev':
-                    data = this.evList
-                    break
-                case 'vote':
-                    data = this.voteList
-                    break
-                case 'qu':
-                    data = this.quList
-                    break
-                case 'hw':
-                    data = this.hwList
-                    break
-                case 'sl':
-                    data = this.slList
-                    break
-                default:
-                    break
-            }
-            if (data) index = data.findIndex(item => item.id === delId)
-            console.log(index)
-            if (index > -1) data.splice(index, 1)
-        }
+        this.getActivityList()
+        // let delId = this.$route.query.delId
+        // console.log(this.curAcType)
+        // if (delId) {
+        //     let index, data
+        //     switch (this.curAcType) {
+        //         case 'ev':
+        //             data = this.evList
+        //             break
+        //         case 'vote':
+        //             data = this.voteList
+        //             break
+        //         case 'qu':
+        //             data = this.quList
+        //             break
+        //         case 'hw':
+        //             data = this.hwList
+        //             break
+        //         case 'sl':
+        //             data = this.slList
+        //             break
+        //         default:
+        //             break
+        //     }
+        //     if (data) index = data.findIndex(item => item.id === delId)
+        //     console.log(index)
+        //     if (index > -1) data.splice(index, 1)
+        // }
     },
     watch: {
         '$store.state.userInfo.schoolCode': {

+ 85 - 34
TEAMModelOS/ClientApp/src/view/user/BandPhone.vue

@@ -223,47 +223,98 @@ export default {
             }
             this.$api.login.getUserInfo(params).then(
                 res => {
-                    let data = {
-                        name: res.coreUser.name,
-                        pinCode: this.sendForm.code,
-                        country: this.cCode,
-                        account: this.accFormat,
-                        community: 'wechat',
-                        openId: res.coreUser.wechat,
-                        applyType: 'phone'
+                    // 这里直接修改账号信息(手机或邮箱)
+                    let loginData = res.tmdidImplicit
+                    let srvAdr = localStorage.getItem('srvAdr')
+                    let clientId = this.$store.state.config[srvAdr].clientID
+                    let host = this.$store.state.config[srvAdr].coreAPIUrl
+                    let nonce = 'habook'
+                    let params = {
+                        "nonce": nonce,
+                        "client_id": clientId,
+                        "id_token": loginData.id_token,
+                        "grant_type": 'mobileOrMail',
+                        "mobile_mail": `+${this.cCode}-${this.accFormat}`,
+                        "pin_code": this.sendForm.code
                     }
-                    this.$api.login.bandOpenAccount(data).then(
-                        bandres => {
-                            this.$api.login.teacherLogin(bandres).then(
-                                res => {
-                                    console.log('登录结果',res)
-                                    //設定權限並登入
-                                    if (res.error == 3) {
-                                        this.$Message.error(this.$t('login.codeerr'))
-                                    } else if (!res.error) {
-                                        User.login(res).then(res => {
-                                            if (res) {
-                                                let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
-                                                this.$router.push({ name: homePath })
-                                            }
-                                        })
-                                    } else {
+                    this.$api.service.getIdProfile(host, params).then(
+                        bdres => {
+                            if (!bdres.error) {
+                                this.$api.login.teacherLogin(loginData).then(
+                                    res => {
+                                        console.log('登录结果', res)
+                                        //設定權限並登入
+                                        if (res.error == 3) {
+                                            this.$Message.error(this.$t('login.codeerr'))
+                                        } else if (!res.error) {
+                                            User.login(res).then(res => {
+                                                if (res) {
+                                                    let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
+                                                    this.$router.push({ name: homePath })
+                                                }
+                                            })
+                                        } else {
+                                            this.$Message.error(this.$t('login.loginerr'))
+                                        }
+
+                                    },
+                                    err => {
                                         this.$Message.error(this.$t('login.loginerr'))
                                     }
-
-                                },
-                                err => {
-                                    this.$Message.error(this.$t('login.loginerr'))
-                                }
-                            ).finally((()=>{
-                                this.loading = false
-                            }))
+                                ).finally((() => {
+                                    this.loading = false
+                                }))
+                                
+                            } else {
+                                this.$Message.error(this.$t('login.loginerr'))
+                            }
                         },
                         err => {
-                            this.loading = false
-                            this.$Message.error(this.$t('login.banderr'))
+
                         }
                     )
+
+                    // let data = {
+                    //     name: res.coreUser.name,
+                    //     pinCode: this.sendForm.code,
+                    //     country: this.cCode,
+                    //     account: this.accFormat,
+                    //     community: 'wechat',
+                    //     openId: res.coreUser.wechat,
+                    //     applyType: 'phone'
+                    // }
+                    // this.$api.login.bandOpenAccount(data).then(
+                    //     bandres => { 
+                    //         this.$api.login.teacherLogin(bandres).then(
+                    //             res => {
+                    //                 console.log('登录结果',res)
+                    //                 //設定權限並登入
+                    //                 if (res.error == 3) {
+                    //                     this.$Message.error(this.$t('login.codeerr'))
+                    //                 } else if (!res.error) {
+                    //                     User.login(res).then(res => {
+                    //                         if (res) {
+                    //                             let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
+                    //                             this.$router.push({ name: homePath })
+                    //                         }
+                    //                     })
+                    //                 } else {
+                    //                     this.$Message.error(this.$t('login.loginerr'))
+                    //                 }
+
+                    //             },
+                    //             err => {
+                    //                 this.$Message.error(this.$t('login.loginerr'))
+                    //             }
+                    //         ).finally((()=>{
+                    //             this.loading = false
+                    //         }))
+                    //     },
+                    //     err => {
+                    //         this.loading = false
+                    //         this.$Message.error(this.$t('login.banderr'))
+                    //     }
+                    // )
                 },
                 err => {
                     this.$Message.error(this.$t('login.getinfoerr'))

+ 4 - 2
TEAMModelOS/Controllers/Analysis/ClassAnalysisController.cs

@@ -33,7 +33,8 @@ namespace TEAMModelOS.Controllers.Analysis
         private readonly DingDing _dingDing;
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
-        public ClassAnalysisController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public ClassAnalysisController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
             IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage)
         {
             _azureCosmos = azureCosmos;
@@ -42,6 +43,7 @@ namespace TEAMModelOS.Controllers.Analysis
             _dingDing = dingDing;
             _option = option?.Value;
             _azureStorage = azureStorage;
+            _coreAPIHttpService = coreAPIHttpService;
         }
         /// <param name="request"></param>
         /// <returns></returns>
@@ -100,7 +102,7 @@ namespace TEAMModelOS.Controllers.Analysis
                         groupIds.Add(item.name);
                     }
                     //var gs = sc.period.Where(s => s.id == pId.GetString()).Select(x => x.grades);
-                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, groupIds, code.GetString(), null);
+                    (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, groupIds, code.GetString(), null);
                     var total = rc.Select(x => new { x.name, value = x.count });
                     var trend = tpc.Select(x => new { name = x.week, value = x.count });
                     var classify_group = groups.Select(x => new { name = classLists.Where(c => c.id == x.name).Select(y => y.name), value = x.count });

+ 6 - 5
TEAMModelOS/Controllers/Both/GroupListController.cs

@@ -38,10 +38,10 @@ namespace TEAMModelOS.Controllers
         private readonly AzureServiceBusFactory _serviceBus;
         private readonly AzureStorageFactory _azureStorage;
         private readonly NotificationService _notificationService;
-
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         private const string SummarySql = " c.id,c.code,c.name,c.no,c.periodId,c.scope,c.school,c.creatorId,c.type,c.year,c.tcount,c.scount,c.leader ";
         public IConfiguration _configuration { get; set; }
-        public GroupListController(AzureCosmosFactory azureCosmos, DingDing dingDing, IOptionsSnapshot<Option> option, AzureServiceBusFactory serviceBus, AzureStorageFactory azureStorage, IConfiguration configuration, NotificationService notificationService)
+        public GroupListController(CoreAPIHttpService coreAPIHttpService,AzureCosmosFactory azureCosmos, DingDing dingDing, IOptionsSnapshot<Option> option, AzureServiceBusFactory serviceBus, AzureStorageFactory azureStorage, IConfiguration configuration, NotificationService notificationService)
         {
             _azureCosmos = azureCosmos;
             _dingDing = dingDing;
@@ -50,6 +50,7 @@ namespace TEAMModelOS.Controllers
             _configuration = configuration;
             _azureStorage = azureStorage; 
             _notificationService = notificationService;
+            _coreAPIHttpService = coreAPIHttpService;
         }
         //学生获取自己已经加入的名单和课程。
         [ProducesDefaultResponseType]
@@ -517,7 +518,7 @@ namespace TEAMModelOS.Controllers
             if (!json.TryGetProperty("ids", out JsonElement ids)) return BadRequest();
             json.TryGetProperty("schoolId", out JsonElement schoolId);
             List<string> listids = ids.ToObject<List<string>>();
-            (List < RMember > members,List < RGroupList > groups) = await GroupListService.GetStutmdidListids(client, _dingDing, listids, $"{schoolId}");
+            (List < RMember > members,List < RGroupList > groups) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, listids, $"{schoolId}");
             return Ok(new { groups, members });
         }
         /// <summary>
@@ -584,7 +585,7 @@ namespace TEAMModelOS.Controllers
                 {
                     groups.Add(item);
                 }
-                (List<RGroupList> groupsData, List<RMember> members) = await GroupListService.GetGroupListMemberInfo(client, $"{type}", groups, tbname,_dingDing,$"{_schoolId}");
+                (List<RGroupList> groupsData, List<RMember> members) = await GroupListService.GetGroupListMemberInfo(_coreAPIHttpService, client, $"{type}", groups, tbname,_dingDing,$"{_schoolId}");
                 return Ok(new { groups = groupsData, members });
             }
             catch (CosmosException ex)
@@ -751,7 +752,7 @@ namespace TEAMModelOS.Controllers
                         return Ok(new { groupList });
                     }
                 }
-                (List<RGroupList> groupsData, List<RMember> members) = await GroupListService.GetGroupListMemberInfo(client, $"{groupList.type}", new List<RGroupList> { groupList }, tbname,_dingDing, $"{_code}");
+                (List<RGroupList> groupsData, List<RMember> members) = await GroupListService.GetGroupListMemberInfo(_coreAPIHttpService, client, $"{groupList.type}", new List<RGroupList> { groupList }, tbname,_dingDing, $"{_code}");
                 groupList = groupsData.FirstOrDefault();
             }
             catch (CosmosException ex)

+ 6 - 5
TEAMModelOS/Controllers/Client/HiScanController.cs

@@ -48,7 +48,8 @@ namespace TEAMModelOS.Controllers.Core
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
         // private readonly ServerSentEventsService _sse;
-        public HiScanController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option,
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public HiScanController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option,
            AzureRedisFactory azureRedis, AzureStorageFactory azureStorage//, ServerSentEventsService sse
                                                                          )
         {
@@ -58,6 +59,7 @@ namespace TEAMModelOS.Controllers.Core
             _dingDing = dingDing;
             _option = option?.Value;
             _azureRedis = azureRedis;
+            _coreAPIHttpService = coreAPIHttpService;
             _azureStorage = azureStorage;
             //_sse = sse;
         }
@@ -196,7 +198,7 @@ namespace TEAMModelOS.Controllers.Core
                         pexamRcds.AddRange(ppexamRcds);
                     }
                 }
-                (List<RMember> tmdIds, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(client, _dingDing, classesSet.ToList(), $"{_schoolId}");
+                (List<RMember> tmdIds, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classesSet.ToList(), $"{_schoolId}");
                 /*var addStudentsCls = tmdIds.FindAll(x => x.type == 2);
                 var addTmdidsCls = tmdIds.FindAll(x => x.type == 1);*/
                 List<SheetConfig> configsN = new List<SheetConfig>();
@@ -394,7 +396,7 @@ namespace TEAMModelOS.Controllers.Core
                     }
                 }
                 
-                (List<RMember> tmdIds, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(client, _dingDing, classesSet.ToList(), $"{_schoolId}");
+                (List<RMember> tmdIds, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classesSet.ToList(), $"{_schoolId}");
                 List<SheetConfig> configsN = new List<SheetConfig>();
                 if (examData.sheet != null) {
                     if (examData.sheet.scope.Equals("school"))
@@ -451,11 +453,10 @@ namespace TEAMModelOS.Controllers.Core
                         }
                     }
                 }
-              
                 string blobSas = null;
                 string blobUrl = null;
                 ExamData exam = null;
-                if ($"{_owner}".Equals("school", StringComparison.OrdinalIgnoreCase))
+                if (examData.sheet.scope.Equals("school", StringComparison.OrdinalIgnoreCase))
                 {
                     if (examData != null)
                     {

+ 6 - 4
TEAMModelOS/Controllers/Common/AreaController.cs

@@ -36,8 +36,9 @@ namespace TEAMModelOS.Controllers
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
         private readonly AzureRedisFactory _azureRedis;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         public IConfiguration _configuration { get; set; }
-        public AreaController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
+        public AreaController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
             IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
@@ -48,6 +49,7 @@ namespace TEAMModelOS.Controllers
             _azureStorage = azureStorage;
             _azureRedis = azureRedis;
             _configuration = configuration;
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
         /// <param name="request"></param>
@@ -451,7 +453,7 @@ namespace TEAMModelOS.Controllers
                 {
                     var sJson = await JsonDocument.ParseAsync(aresponse.ContentStream);
                     Study study = sJson.ToObject<Study>();
-                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, study.tchLists, study.school);
+                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, study.tchLists, study.school);
                     teac = tchList;
                     var query = $"select value(c) from c where c.pId = '{id}'";
                     foreach ((string code, string name) in baseIds)
@@ -614,7 +616,7 @@ namespace TEAMModelOS.Controllers
                                 {
                                     JsonElement account = accounts.Current;
                                     List<string> tcs = account.GetProperty("tchLists").ToObject<List<string>>();
-                                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, tcs, code);
+                                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, tcs, code);
                                     // (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
                                     //(List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, tcs, code);
                                     recordUrl.Add((code, name, account.GetProperty("recordUrl").GetString(), tchList.Count));
@@ -707,7 +709,7 @@ namespace TEAMModelOS.Controllers
                                 {
                                     JsonElement account = accounts.Current;
                                     List<string> tcs = account.GetProperty("tchLists").ToObject<List<string>>();
-                                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, tcs, code);
+                                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, tcs, code);
                                     // (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
                                     //(List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, tcs, code);
 

+ 5 - 2
TEAMModelOS/Controllers/Common/CommonController.cs

@@ -19,6 +19,7 @@ using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelOS.Controllers.Common
 {
@@ -35,7 +36,8 @@ namespace TEAMModelOS.Controllers.Common
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
         private readonly IHttpClientFactory _clientFactory;
-        public CommonController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, IHttpClientFactory clientFactory)
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public CommonController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, IHttpClientFactory clientFactory)
         {
             _azureCosmos = azureCosmos;
             _serviceBus = serviceBus;
@@ -44,6 +46,7 @@ namespace TEAMModelOS.Controllers.Common
             _option = option?.Value;
             _azureStorage = azureStorage;
             _clientFactory = clientFactory;
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
        
@@ -160,7 +163,7 @@ namespace TEAMModelOS.Controllers.Common
                 await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync<Dictionary<string, object>>(dy, dy["id"].ToString(), new Azure.Cosmos.PartitionKey(dy["code"].ToString()));
                 var httpClient = _clientFactory.CreateClient();
                 var content = new { id = $"{id}", code = $"{code}" };
-                await ActivityService.RefreshStuActivity(client, _dingDing, $"{id}", $"{code}");
+                await ActivityService.RefreshStuActivity(_coreAPIHttpService, client, _dingDing, $"{id}", $"{code}");
                 return Ok(new { code=200});
             }
             catch (Exception ex)

+ 5 - 4
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -46,8 +46,8 @@ namespace TEAMModelOS.Controllers
         private readonly AzureRedisFactory _azureRedis;
         public IConfiguration _configuration { get; set; }
         private readonly NotificationService _notificationService;
-
-        public ExamController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public ExamController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
             IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, NotificationService notificationService, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
@@ -58,7 +58,8 @@ namespace TEAMModelOS.Controllers
             _azureStorage = azureStorage;
             _azureRedis = azureRedis;
             _configuration = configuration;
-            _notificationService = notificationService;
+            _notificationService = notificationService; 
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
         /// <summary>
@@ -120,7 +121,7 @@ namespace TEAMModelOS.Controllers
 
 
                 List<string> classes = ExamService.getClasses(request.classes, request.stuLists);
-                (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(client, _dingDing, classes, request.school, ps);
+                (List<RMember> tchList, List<RGroupList> classLists) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, classes, request.school, ps);
                 request.stuCount = tchList.Count;
 
                 /*for (int i = 0; i < classes.Count; i++)

+ 4 - 2
TEAMModelOS/Controllers/Common/ExamLiteController.cs

@@ -35,8 +35,9 @@ namespace TEAMModelOS.Controllers.Common
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
         private readonly AzureRedisFactory _azureRedis;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         public IConfiguration _configuration { get; set; }
-        public ExamLiteController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
+        public ExamLiteController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
            IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
@@ -47,6 +48,7 @@ namespace TEAMModelOS.Controllers.Common
             _azureStorage = azureStorage;
             _azureRedis = azureRedis;
             _configuration = configuration;
+            _coreAPIHttpService = coreAPIHttpService;
         }
         /// <summary>
         /// 保存评测信息
@@ -263,7 +265,7 @@ namespace TEAMModelOS.Controllers.Common
                 ExamLite examLite = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<ExamLite>(id.GetString(), new PartitionKey($"ExamLite-{code}"));
                 if (examLite != null)
                 {
-                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, examLite.tchLists, examLite.school);
+                    (List<RMember> tchList, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, examLite.tchLists, examLite.school);
                     // (List<TmdInfo> tmdInfos, List<ClassListInfo> classInfos) = await TriggerStuActivity.GetTchList(client, _dingDing, ids, $"{school}");
                    // (List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, examLite.tchLists, examLite.school);
                     return Ok(new { examLite, teachers = tchList.Select(t => t.id).ToList(), status = 200 });

+ 5 - 3
TEAMModelOS/Controllers/Common/HomeworkController.cs

@@ -48,8 +48,9 @@ namespace TEAMModelOS.Controllers.Learn
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
         private readonly IHttpClientFactory _clientFactory;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         public IConfiguration _configuration { get; set; }
-        public HomeworkController(AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option,
+        public HomeworkController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option,
             AzureRedisFactory azureRedis, AzureStorageFactory azureStorage, IHttpClientFactory clientFactory, IConfiguration configuration)
         {
             _snowflakeId = snowflakeId;
@@ -61,6 +62,7 @@ namespace TEAMModelOS.Controllers.Learn
             _azureStorage = azureStorage;
             _clientFactory = clientFactory;
             _configuration = configuration;
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
         /// <summary>
@@ -473,7 +475,7 @@ namespace TEAMModelOS.Controllers.Learn
                             if (!request.TryGetProperty("listIds", out JsonElement _listIds)) return BadRequest();
                             List<string> listIds = _listIds.ToJsonString().ToObject<List<string>>();
                             List<TypeUser> typeUsers = new List<TypeUser>();
-                            (List<RMember> tmdinfos, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(client, _dingDing, listIds, homework.school);
+                            (List<RMember> tmdinfos, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(_coreAPIHttpService,client, _dingDing, listIds, homework.school);
                             var addStudentsCls = tmdinfos.FindAll(x => x.type == 2);
                             var addTmdidsCls = tmdinfos.FindAll(x => x.type == 1);
                             if ($"{_targetType}".Equals("research", StringComparison.OrdinalIgnoreCase) || $"{_targetType}".Equals("yxtrain", StringComparison.OrdinalIgnoreCase))
@@ -621,7 +623,7 @@ namespace TEAMModelOS.Controllers.Learn
                             bool falge = true;
                             if (homework.leaderSubmit == 1 && content.Exists(x => x.prime == true))
                             {
-                                List<RGroupList> yxtrain = await GroupListService.GetGroupListMemberByType(client, "yxtrain", new List<string> { "school" }, $"{school}", _dingDing);
+                                List<RGroupList> yxtrain = await GroupListService.GetGroupListMemberByType(_coreAPIHttpService,client, "yxtrain", new List<string> { "school" }, $"{school}", _dingDing);
                                 var members = yxtrain.SelectMany(x => x.members).ToList();
                                 var leader = members.Find(x => x.tag!=null && x.id.Equals(userid)  && x.tag.Equals("leader"));
                                 if (leader != null && !string.IsNullOrEmpty(leader.groupName))

+ 3 - 2
TEAMModelOS/Controllers/Common/StudyController.cs

@@ -34,6 +34,7 @@ namespace TEAMModelOS.Controllers.Common
         private readonly Option _option;
         private readonly AzureStorageFactory _azureStorage;
         private readonly AzureRedisFactory _azureRedis;
+
         public IConfiguration _configuration { get; set; }
         private readonly CoreAPIHttpService _coreAPIHttpService;
         public StudyController(CoreAPIHttpService  coreAPIHttpService,AzureCosmosFactory azureCosmos, AzureServiceBusFactory serviceBus, SnowflakeId snowflakeId, DingDing dingDing,
@@ -304,7 +305,7 @@ namespace TEAMModelOS.Controllers.Common
                     }
                     try
                     {
-                        (List<RMember> members, List<RGroupList> groups) = await GroupListService.GetStutmdidListids(client, _dingDing, study.tchLists, study.school, ps);
+                        (List<RMember> members, List<RGroupList> groups) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, study.tchLists, study.school, ps);
                         await StatisticsService.DoChange(new TeacherTrainChange
                         { standard = standard, tmdids = members.Select(x => x.id)?.ToList(), school = study.school, update = new HashSet<string> { StatisticsService.OfflineRecord }, statistics = 0 }, _azureCosmos);
                     }
@@ -410,7 +411,7 @@ namespace TEAMModelOS.Controllers.Common
                 Study study = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<Study>(id.GetString(), new PartitionKey($"Study-{code}"));
                 if (study != null)
                 {
-                    (List<RMember> tchList, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(client, _dingDing, study.tchLists, study.school);
+                    (List<RMember> tchList, List<RGroupList> classInfo) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, study.tchLists, study.school);
                     List<StudyRecord> records = new();
 
                     foreach (var member in tchList)

+ 6 - 4
TEAMModelOS/Controllers/Normal/AbilityStatisticsController.cs

@@ -18,6 +18,7 @@ using HTEXLib.COMM.Helpers;
 using TEAMModelOS.Filter;
 using static TEAMModelOS.Controllers.AbilitySubController;
 using Microsoft.AspNetCore.Authorization;
+using TEAMModelOS.SDK.Models.Service;
 
 namespace TEAMModelOS.Controllers
 {
@@ -31,12 +32,13 @@ namespace TEAMModelOS.Controllers
         private readonly AzureCosmosFactory _azureCosmos;
         private readonly DingDing _dingDing;
         private readonly Option _option;
-
-        public AbilityStatisticsController(AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option)
+        private readonly CoreAPIHttpService _coreAPIHttpService;
+        public AbilityStatisticsController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option)
         {
             _azureCosmos = azureCosmos;
             _dingDing = dingDing;
             _option = option?.Value;
+            _coreAPIHttpService=coreAPIHttpService;
         }
         /// <summary>
         /// 更新教师最终学习分数。
@@ -207,7 +209,7 @@ namespace TEAMModelOS.Controllers
                     }
                     schoolInfos.Add(new SchoolInfos { schoolId = school.id, schoolName = school.name, picture = school.picture, teacherCount = count, appraiseCount = appraise });
                     //增加评审人员总人数,学习总人数。
-                    trains.Add(StatisticsService.StatisticsSchool(school.id, setting, area, client, _dingDing, null));
+                    trains.Add(StatisticsService.StatisticsSchool(_coreAPIHttpService, school.id, setting, area, client, _dingDing, null));
                 }
                 int pagesize = 100;
                 if (trains.Count <= pagesize)
@@ -356,7 +358,7 @@ namespace TEAMModelOS.Controllers
                     count += 1;
                 }
                 //增加评审人员总人数,学习总人数。
-                (List<TeacherTrain> teacherTrains, List<RGroupList> yxtrain) = await StatisticsService.StatisticsSchool(school, setting, area, client, _dingDing, update);
+                (List<TeacherTrain> teacherTrains, List<RGroupList> yxtrain) = await StatisticsService.StatisticsSchool(_coreAPIHttpService, school, setting, area, client, _dingDing, update);
                 teacherTrains.ForEach(x => {
                     x.currency.videoTime = (int)x.currency.videoTime;
                     x.currency.teacherAilities.ForEach(y => {

+ 8 - 4
TEAMModelOS/Controllers/Normal/AbilitySubController.cs

@@ -38,8 +38,10 @@ namespace TEAMModelOS.Controllers
         private readonly ThirdApisService _thirdApisService;
         private readonly HttpTrigger _httpTrigger;
         private readonly AzureServiceBusFactory _serviceBus;
+        private readonly AzureStorageFactory _azureStorage;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         public IConfiguration _configuration { get; set; }
-        public AbilitySubController(AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, ThirdApisService thirdApisService, HttpTrigger httpTrigge, AzureServiceBusFactory serviceBus, IConfiguration configuration)
+        public AbilitySubController(CoreAPIHttpService coreAPIHttpService, AzureStorageFactory azureStorage,AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, ThirdApisService thirdApisService, HttpTrigger httpTrigge, AzureServiceBusFactory serviceBus, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
             _snowflakeId = snowflakeId;
@@ -49,6 +51,8 @@ namespace TEAMModelOS.Controllers
             _httpTrigger = httpTrigge;
             _serviceBus = serviceBus;
             _configuration = configuration;
+            _azureStorage = azureStorage;
+            _coreAPIHttpService = coreAPIHttpService;
         }
        
         /// <summary>
@@ -205,7 +209,7 @@ namespace TEAMModelOS.Controllers
                     Teacher teacher = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<Teacher>(id, new PartitionKey("Base"));
                     
                     
-                    var abilitys = await ThirdService.GetDiagnosisList(client, $"{standard}", _dingDing, setting, _httpTrigger, teacher, _option);
+                    var abilitys = await ThirdService.GetDiagnosisList(client, $"{standard}", _dingDing, setting, _httpTrigger, teacher, _option,_azureStorage);
                     if (abilitys != null)
                     {
                         abilitys.ForEach(x => { x.currency = 1; });
@@ -1057,7 +1061,7 @@ namespace TEAMModelOS.Controllers
             var client = _azureCosmos.GetCosmosClient();
             if (!request.TryGetProperty("tmdid", out JsonElement _tmdid)) return Ok(new { error = 400 });
             if (!request.TryGetProperty("abilityId", out JsonElement _abilityId)) return Ok(new { error = 400 });
-            List<RGroupList> yxtrain= await  GroupListService.GetGroupListMemberByType(client, "yxtrain", new List<string> { "school" }, $"{_school}",_dingDing);
+            List<RGroupList> yxtrain= await  GroupListService.GetGroupListMemberByType(_coreAPIHttpService, client, "yxtrain", new List<string> { "school" }, $"{_school}",_dingDing);
             List<dynamic> abilitySubs = new List<dynamic>();
             if (yxtrain.IsNotEmpty()) {
                 var members = yxtrain.SelectMany(m => m.members).ToList();
@@ -1139,7 +1143,7 @@ namespace TEAMModelOS.Controllers
                 {
                     ids.Add("default");
                 }
-                (List<RMember> tmdInfos, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, ids, $"{_school}");
+                (List<RMember> tmdInfos, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, ids, $"{_school}");
                 List<GroupMember> teachers = new List<GroupMember>();
                 foreach (var classInfo in classInfos)
                 {

+ 1 - 1
TEAMModelOS/Controllers/School/SchoolTeacherController.cs

@@ -658,7 +658,7 @@ namespace TEAMModelOS.Controllers
 
 
             var content = new StringContent(request.ToString(), Encoding.UTF8, "application/json");
-            string a = await  _coreAPIHttpService.GetUserInfos(content, _option.Location, _configuration);
+            string a = await  _coreAPIHttpService.GetUserInfos(content);
             return Ok(a.ToObject<JsonElement>());
             try
             {

+ 5 - 4
TEAMModelOS/Controllers/Teacher/ClassVideoController.cs

@@ -33,8 +33,9 @@ namespace TEAMModelOS.Controllers
         private readonly DingDing _dingDing;
         private readonly Option _option;
         private readonly AzureServiceBusFactory _serviceBus;
+        private readonly CoreAPIHttpService _coreAPIHttpService;
         public IConfiguration _configuration { get; set; }
-        public ClassVideoController(AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureServiceBusFactory serviceBus, IConfiguration configuration)
+        public ClassVideoController(CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureServiceBusFactory serviceBus, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
             _snowflakeId = snowflakeId;
@@ -42,7 +43,7 @@ namespace TEAMModelOS.Controllers
             _option = option?.Value; 
             _serviceBus = serviceBus;
             _configuration = configuration;
-      
+            _coreAPIHttpService = coreAPIHttpService;
         }
 
         /// <summary>
@@ -80,7 +81,7 @@ namespace TEAMModelOS.Controllers
                 {
                     ids.Add("default");
                 }
-                (List<RMember> tmdInfos, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, ids, $"{_school}");
+                (List<RMember> tmdInfos, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, ids, $"{_school}");
                 if (classInfos.IsNotEmpty())
                 {
                     List<dynamic> groupMembers = new List<dynamic>();
@@ -163,7 +164,7 @@ namespace TEAMModelOS.Controllers
                 if (!ids.IsNotEmpty()) {
                     ids.Add("default");
                 }
-                (List<RMember> tmdInfos, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(client, _dingDing, ids, $"{_school}");
+                (List<RMember> tmdInfos, List<RGroupList> classInfos) = await GroupListService.GetStutmdidListids(_coreAPIHttpService, client, _dingDing, ids, $"{_school}");
                 List<dynamic> classVideos = new();
                 string code = $"ClassVideo-{_school}";
                 foreach (var listInfo in classInfos) {

+ 1 - 1
TEAMModelOS/Controllers/Teacher/InitController.cs

@@ -67,7 +67,7 @@ namespace TEAMModelOS.Controllers
         /// <returns></returns>
         [ProducesDefaultResponseType]
         [HttpPost("GetUserInfo")]
-        [Authorize(Roles = "IES")]
+        //[Authorize(Roles = "IES")]
         public async Task<IActionResult> GetUserInfo(JsonElement request) {
             if (!request.TryGetProperty("key", out JsonElement key)) return BadRequest();
            

+ 3 - 3
TEAMModelOS/Controllers/Teacher/TeacherCommonController.cs

@@ -291,7 +291,7 @@ namespace TEAMModelOS.Controllers
             if (!string.IsNullOrWhiteSpace(school) && classes.IsNotEmpty())
             {
                 //string querySchool = $" SELECT distinct  value c   FROM c {joinSqlClasses} {joinSqlSubjects}  where {stimesql}  {etimesql}  {progresssql}  {typesql}  {andSqlSubjects}  {tgSql}";
-                string querySchoolclss = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime,c.source,c.type   FROM c {joinSqlClasses}   where   {pksql}    {classesSql}";
+                string querySchoolclss = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime,c.source,c.type   FROM c {joinSqlClasses}   where   {pksql}    {classesSql}";
                 //查询数据归属学校的
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(querySchoolclss, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"{type}-{school}") }))
                 {
@@ -310,7 +310,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                 }
-                string querySchoollist = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type  FROM c {joinSqlStulist}   where   {pksql}    {stuListsSql}";
+                string querySchoollist = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type  FROM c {joinSqlStulist}   where   {pksql}    {stuListsSql}";
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(querySchoollist, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"{type}-{school}") }))
                 {
                     using var json = await JsonDocument.ParseAsync(item.ContentStream);
@@ -340,7 +340,7 @@ namespace TEAMModelOS.Controllers
 
                 }
             }
-            string queryTeacher = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type FROM c   where   {pksql}  ";
+            string queryTeacher = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type FROM c   where   {pksql}  ";
             //查询数据归属学校的
             await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryTeacher, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"{type}-{id}") }))
             {

+ 3 - 0
TEAMModelOS/Controllers/Third/ScController.cs

@@ -250,6 +250,7 @@ namespace TEAMModelOS.Controllers
             if (!request.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
             List<IdNameCode> ignore = ignoreSchools.ToObject<List<IdNameCode>>();
             Dictionary<string, object> dict = new Dictionary<string, object> { { "accessConfig", $"{accessConfig}" },{ "areaId",$"{areaId}" } };
+           
             int status = -1;string json = null;
             //5.3.1.1获取项目列表
             (status,   json) = await _httpTrigger.RequestHttpTrigger(dict, _option.Location, "GetProjectInfoByTrainComID");
@@ -333,6 +334,7 @@ namespace TEAMModelOS.Controllers
                         var schoolData = schoolDatas.Find(y => y.uid.Equals($"{x.schoolid}"));
                         if (schoolData != null && !string.IsNullOrEmpty(schoolData.id))
                         {
+                           
                             x.schoolCode = schoolData.id;
                             x.areaId = $"{areaId}";
                             x.city = $"{city}";
@@ -374,6 +376,7 @@ namespace TEAMModelOS.Controllers
                             x.areaId = $"{areaId}";
                             x.city = $"{city}";
                             x.dist = $"{dist}";
+                          
                         }
                     });
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 61 - 1
TEAMModelOS/Controllers/XTest/FixDataController.cs


+ 0 - 0
TEAMModelOS/Controllers/XTest/TestController.cs


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio