Ver código fonte

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

OnePsycho 1 ano atrás
pai
commit
a110f928e5

+ 31 - 23
TEAMModelBI/ClientApp/src/view/common/header.vue

@@ -10,30 +10,33 @@
         </div>
         <div class="userbox">
             <el-dropdown>
-                <el-icon style="margin-right: 25px;margin-top:8px" v-if="circleUrl">
-                    <el-avatar :size="40" :src="circleUrl"></el-avatar>
-                </el-icon>
-                <PersonalPhoto style="cursor: pointer;" :name="user.name" width="40px" height="40px" v-else></PersonalPhoto>
+                <div>
+                    <el-icon style="margin-right: 25px;margin-top:8px" v-if="circleUrl">
+                        <el-avatar :size="40" :src="circleUrl"></el-avatar>
+                    </el-icon>
+                    <PersonalPhoto style="cursor: pointer;" :name="user.name" width="40px" height="40px" v-else></PersonalPhoto>
+                </div>
                 <template #dropdown>
                     <el-dropdown-menu>
-                        <!-- <el-dropdown-item>姓名:XXX</el-dropdown-item> -->
-                        <div class="userInfo">
-                            <svg class="header-icon" aria-hidden="true">
-                                <use xlink:href="#icon-yonghu"></use>
-                            </svg>
-                            {{$t(`header.name`)}}:{{user.name}}
-                        </div>
-                        <!-- <el-dropdown-item>
-                            <svg class="header-icon" aria-hidden="true">
-                                <use xlink:href="#icon-caozuorizhi-copy"></use>
-                            </svg>
-                            操作日志
-                        </el-dropdown-item> -->
+                        <el-dropdown-item>
+                            <div class="userInfo">
+                                <div>
+                                    <svg class="header-icon" aria-hidden="true">
+                                        <use xlink:href="#icon-yonghu"></use>
+                                    </svg>
+                                </div>
+                                <div>{{$t(`header.name`)}}:{{user.name}}</div>
+                            </div>
+                        </el-dropdown-item>
                         <el-dropdown-item @click="quit">
-                            <svg class="header-icon" aria-hidden="true">
-                                <use xlink:href="#icon-tuichu"></use>
-                            </svg>
-                            {{$t(`header.quit`)}}
+                            <div class="userInfo">
+                                <div>
+                                    <svg class="header-icon" aria-hidden="true">
+                                        <use xlink:href="#icon-tuichu"></use>
+                                    </svg>
+                                </div>
+                                <div> {{$t(`header.quit`)}}</div>
+                            </div>
                         </el-dropdown-item>
                     </el-dropdown-menu>
                 </template>
@@ -172,17 +175,18 @@ export default {
 .el-header {
     background-color: #b3c0d1;
     color: var(--el-text-color-primary);
-    line-height: 60px;
+    line-height: 40px;
 }
 .userInfo {
     list-style: none;
     line-height: 36px;
-    padding: 0 20px;
+    padding: 0 10px;
     margin: 0;
     font-size: var(--el-font-size-base);
     color: var(--el-text-color-regular);
     cursor: pointer;
     outline: 0;
+    display: flex;
 }
 .logsbox,
 .userbox {
@@ -246,4 +250,8 @@ export default {
 .logsbox .el-icon-s-order {
     font-size: 16px;
 }
+.userbox .el-tooltip__trigger{
+    border: none !important;
+    outline: none !important;
+}
 </style>

+ 33 - 10
TEAMModelBI/ClientApp/src/view/systemConfig/pushmsg/createdpush.vue

@@ -32,7 +32,7 @@
             <el-form-item label="消息内容" prop="content">
               <el-input v-model="constructorData.basic.content" :autosize="{ minRows: 4, maxRows: 10 }" type="textarea" placeholder="推送消息的内容" />
             </el-form-item>
-            <el-form-item label="消息类型" prop="content" class="form-type">
+            <!-- <el-form-item label="消息类型" prop="content" class="form-type">
               <el-radio-group v-model="constructorData.basic.type" class="radio-type">
                 <el-radio label="1">
                   <el-tag color="rgba(99, 205, 218,.5)">系统型</el-tag>
@@ -47,7 +47,7 @@
                   <el-tag type="success">特殊型</el-tag>
                 </el-radio>
               </el-radio-group>
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item label="是否跳转" prop="content" class="skip-switch">
               <div class="skip-switch">
                 <!-- <div class="skip-title">是否跳转地址</div> -->
@@ -376,7 +376,7 @@
                   <el-form-item label="消息内容" prop="content">
                     <el-input v-model="constructorData.basic.content" :autosize="{ minRows: 2, maxRows: 4 }" type="textarea" placeholder="推送消息的内容" />
                   </el-form-item>
-                  <el-form-item label="消息类型" prop="content" class="form-type">
+                  <!-- <el-form-item label="消息类型" prop="content" class="form-type">
                     <el-radio-group v-model="constructorData.basic.type" class="radio-type">
                       <el-radio label="1">
                         <el-tag color="rgba(99, 205, 218,.5)">系统型</el-tag>
@@ -391,7 +391,7 @@
                         <el-tag type="success">特殊型</el-tag>
                       </el-radio>
                     </el-radio-group>
-                  </el-form-item>
+                  </el-form-item> -->
                   <el-form-item label="是否跳转" prop="content" class="skip-switch">
                     <div class="skip-switch">
                       <!-- <div class="skip-title">是否跳转地址</div> -->
@@ -428,14 +428,14 @@
                 <div class="source-box">
                   <span>消息来源:</span>
                   <el-radio-group v-model="constructorData.source" class="radio-time" @change="timechange">
-                    <el-radio label="BI" disabled>
-                      系统(BI)
+                    <el-radio label="system">
+                      系统通知
                     </el-radio>
                     <el-radio label="IES">
                       IES5(代替)
                     </el-radio>
                     <el-radio label="hita" disabled>
-                      HiTA(代替)
+                      Email发送
                     </el-radio>
                   </el-radio-group>
                 </div>
@@ -445,7 +445,7 @@
                     <el-radio label="immediately">
                       立刻发布推送
                     </el-radio>
-                    <el-radio label="preordered">
+                    <el-radio label="preordered" :disabled="constructorData.source ==='system' ? true:false">
                       预约时间发布
                     </el-radio>
                   </el-radio-group>
@@ -457,7 +457,7 @@
         </div>
         <div class="guidebox">
           <el-button @click="active=2">上一步</el-button>
-          <el-button type="primary" @click="publish">确认发布</el-button>
+          <el-button type="primary" @click="sourceMsg()">确认发布</el-button>
         </div>
       </div>
       <!--确认发布end-->
@@ -524,7 +524,7 @@ let constructorData = ref({
   basic: {
     title: '',
     content: '',
-    type: 0,
+    // type: 0,
     skipstate: false,
     skipUrl: '',
     callbackstate: false,
@@ -820,6 +820,15 @@ function pitchonly (val) {
   }
   console.log(val, constructorData.value.receivedata.personage)
 }
+//根据不同的消息来源 调用不同方法
+function sourceMsg(){
+  let values=constructorData.value.source
+  if(values ==='system'){
+    this.pushSystem()
+  }else{
+    this.publish()
+  }
+}
 //发布消息
 function publish () {
   if (!constructorData.value.source) {
@@ -858,6 +867,20 @@ function publish () {
     ElMessage.error('API异常,消息发送失败!')
   })
 }
+//system通知  访问TW API内容
+function pushSystem(){
+  console.log(constructorData.value)
+  console.log(receivedatas.value)
+  console.log(constructorData.value.receiveType)
+  let tagsData=[]; let receives=constructorData.value.receiveType =='hita5' ? 'HiTA':constructorData.value.receiveType
+  receivedatas.value.forEach((item)=>{tagsData.push(item.id+'_'+receives)})
+  let data={hubName:constructorData.value.receiveType,tags:tagsData,title:constructorData.value.basic.title,body:constructorData.value.basic.content}
+   proxy.$api.sendPushnotify(data).then((res)=>{
+     ElMessage.success('消息发送成功')
+   }).catch((error)=>{
+    ElMessage.error('API异常,消息发送失败!')
+   })
+}
 //clear数据
 function clearData () {
   constructorData.value.basic.title = ''

+ 2 - 2
TEAMModelOS.FunctionV4/ServiceBus/ActiveTaskTopic.cs

@@ -1338,7 +1338,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                             case "up-base":
 
                                 //读取TimeLine.json
-                                List<string> PickupMemberIds = new List<string>();
+                                List<int> PickupMemberIds = new List<int>();
                                 try
                                 {
                                     BlobDownloadResult timeLineBlobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/records/{_lessonId}/IES/TimeLine.json").DownloadContentAsync();
@@ -1348,7 +1348,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                                     List<TimeLineEvent> timeLineEvents =  timeLineData.events.FindAll(z => !string.IsNullOrWhiteSpace(z.Event) && z.Event.Equals("PickupResult"));
                                     if (timeLineEvents.IsNotEmpty()) {
                                         foreach (var timeLineEvent in timeLineEvents) {
-                                           var memberIds= timeLineEvent.PickupMemberId.ToObject<List<string>>();
+                                           var memberIds= timeLineEvent.PickupMemberId.ToObject<List<int>>();
                                             PickupMemberIds.AddRange(memberIds);
                                         }
                                     }

+ 1 - 4
TEAMModelOS.SDK/Models/Cosmos/Common/LessonRecord.cs

@@ -251,11 +251,8 @@ namespace TEAMModelOS.SDK.Models
         public string pageID { get; set; }
         public bool isBuzz { get; set; }
         public List<string> buzzClients { get; set; } = new List<string>();
-        public List<IRSClientAnswer> clientAnswers { get; set; }= new List<IRSClientAnswer>();
-
-    }
-    public class IRSClientAnswer {
         public Dictionary<string, List<List<string>>> clientAnswers { get; set; } = new Dictionary<string, List<List<string>>>();
+
     }
     public class TimeLineData {
       public   List<TimeLineEvent> events { get; set; } = new List<TimeLineEvent>();

+ 35 - 3
TEAMModelOS.SDK/Models/Service/LessonService.cs

@@ -169,7 +169,8 @@ namespace TEAMModelOS.SDK.Models.Service
             return dict;
         }
         public static async void DoLessonStudentRecord(DingDing _dingding, SnowflakeId snowflakeId, LessonRecord lessonRecord, string scope, CosmosClient client, string school, string tmdid,
-            Teacher teacher,   AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, IConfiguration _configuration, LessonBase lessonBase,AzureRedisFactory _azureRedis, List<string> pickupMemberIds, List<TaskData> taskDatas, List<IRSData> iRSDatas)
+            Teacher teacher,   AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, IConfiguration _configuration, LessonBase lessonBase,AzureRedisFactory _azureRedis,
+            List<int> pickupMemberIds, List<TaskData> taskDatas, List<IRSData> iRSDatas)
         {
             School schoolBase = null;
             Period period = null;
@@ -233,8 +234,18 @@ namespace TEAMModelOS.SDK.Models.Service
 
                 // 互动次数,-1 表示没有进行互动。 与 0 不同
                 int interactCount = -1;
+                //抢权作答的学生
+                List<int > buzzClients= new List<int>();
                 if (iRSDatas.IsNotEmpty()) {
-                    interactCount= iRSDatas.Where(z => z.isBuzz==false).SelectMany(v => v.clientAnswers).Count();
+                    interactCount= iRSDatas.Where(z => z.isBuzz==false).Select(v => v.clientAnswers).Select(z=>z.Keys).Count();
+                    var bclients = iRSDatas.Where(z => z.buzzClients.IsNotEmpty()).SelectMany(v => v.buzzClients);
+                    if (bclients!=null && bclients.Count()>0) {
+                        foreach (var bc in bclients) {
+                            if (int.TryParse(bc, out int b)) {
+                                buzzClients.Add(b);
+                            }
+                        }
+                    }
                 }
                 //任务发布次数 ,-1 表示没有进行互动。 与 0 不同
                 int taskCount = -1;
@@ -283,9 +294,30 @@ namespace TEAMModelOS.SDK.Models.Service
                 }
                 foreach (var x in stuids) {
                     var record = lessonStudentRecords.Find(l => l.stuid.Equals(x.id) && l.code.Equals($"StudentScoreRecord") && l.school.Equals(x.school));
+                    ClientSummaryList clientSummaryList = lessonBase.report.clientSummaryList.Find(c => c.seatID == x.seatID);
+                    int stuInteractCount = -1;
+                    int stuInteractJoin = 0;
+                    //获取挑人的互动
+                    var ids=  pickupMemberIds.FindAll(z => z==x.seatID);
+                    if (ids.IsNotEmpty())
+                    {
+                        stuInteractJoin=ids.Count;
+                        if (interactCount>=0)
+                        {
+                            stuInteractCount=interactCount+ids.Count;
+                        }
+                        else
+                        {
+                            stuInteractCount=ids.Count;
 
+                        }
+                    }
+                    //获取抢权的互动
+                    var buzIds = buzzClients.FindAll(z => z==x.seatID);
+                    if (buzIds.IsNotEmpty()) {
+                        stuInteractJoin=stuInteractJoin+buzIds.Count;
 
-                    ClientSummaryList clientSummaryList = lessonBase.report.clientSummaryList.Find(c => c.seatID == x.seatID);
+                    }
                     if (record != null)
                     {
                         if (clientSummaryList != null)

+ 32 - 1
TEAMModelOS.TEST/Program.cs

@@ -1,9 +1,40 @@
-namespace TEAMModelOS.TEST
+using HTEXLib.COMM.Helpers;
+using TEAMModelOS.SDK.Extension;
+using TEAMModelOS.SDK.Models;
+using TEAMModelOS.SDK.Models.Cosmos.OpenEntity;
+
+namespace TEAMModelOS.TEST
 {
     public class Program
     {
         static void Main(string[] args)
         {
+
+            string s = @"{
+""events"":[
+{""Time"":0.0003,""EventId"":589825,""Event"":""ActStart"",""ActStartTime"":""0""},
+{""Time"":0.6862,""Pgid"":""230919091004e7c2a32f7a5feb169508580427428204301"",""EventId"":524289,""Event"":""EzsStartRecord"",""VdoFileName"":""video_e7c2a32f7a5feb169508582860049958634"",""DeviceTypeName"":""HiEncoder""},
+{""Time"":125.0722,""Pgid"":""230919091230e7c2a32f7a5feb169508595074975887597"",""EventId"":917530,""Event"":""FastPgPush"",""PushPgNo"":2},
+{""Time"":125.8639,""Pgid"":""230919091230e7c2a32f7a5feb169508595074975887597"",""EventId"":786435,""Event"":""PopQuesLoad"",""PopOpitonCount"":9},
+{""Time"":199.7944,""Pgid"":""230919091345e7c2a32f7a5feb169508602551991831623"",""EventId"":917530,""Event"":""FastPgPush"",""PushPgNo"":3},
+{""Time"":202.9378,""Pgid"":""230919091345e7c2a32f7a5feb169508602551991831623"",""EventId"":786435,""Event"":""PopQuesLoad"",""PopOpitonCount"":9},
+{""Time"":243.0507,""Pgid"":""230919091345e7c2a32f7a5feb169508602551991831623"",""EventId"":458762,""Event"":""PickupResult"",""PickupTypeId"":655368,""PickupType"":""PickupOption"",""PickupMemberId"":""[\r\n  17\r\n]"",""PickupCount"":1,""PickupOption"":3},
+{""Time"":353.2466,""Pgid"":""230919091618e7c2a32f7a5feb169508617880160233546"",""EventId"":917530,""Event"":""FastPgPush"",""PushPgNo"":4},
+{""Time"":365.1775,""Pgid"":""230919091618e7c2a32f7a5feb169508617880160233546"",""EventId"":786435,""Event"":""PopQuesLoad"",""PopOpitonCount"":9},
+{""Time"":436.9988,""Pgid"":""230919091618e7c2a32f7a5feb169508617880160233546"",""EventId"":458762,""Event"":""PickupResult"",""PickupTypeId"":655368,""PickupType"":""PickupOption"",""PickupMemberId"":""[\r\n  31\r\n]"",""PickupCount"":1,""PickupOption"":3},
+{""Time"":1846.4325,""EventId"":589826,""Event"":""ActEnd"",""ActPeriod"":1846}
+],
+""PgIdList"":[""230919091004e7c2a32f7a5feb169508580427428204301"",""230919091230e7c2a32f7a5feb169508595074975887597"",""230919091345e7c2a32f7a5feb169508602551991831623"",""230919091618e7c2a32f7a5feb169508617880160233546"",""230919092216e7c2a32f7a5feb169508653678181046471"",""230919092644e7c2a32f7a5feb169508680433102606359"",""230919092932e7c2a32f7a5feb169508697228939345777"",""230919093259e7c2a32f7a5feb169508717901847926536"",""230919093524e7c2a32f7a5feb169508732428838481413""]
+}";
+            TimeLineData timeLineData = s.ToObject<TimeLineData>();
+            List<TimeLineEvent> timeLineEvents = timeLineData.events.FindAll(z => !string.IsNullOrWhiteSpace(z.Event) && z.Event.Equals("PickupResult"));
+            if (timeLineEvents.IsNotEmpty())
+            {
+                foreach (var timeLineEvent in timeLineEvents)
+                {
+                    var memberIds = timeLineEvent.PickupMemberId.ToObject<List<int>>();
+                }
+            }
             List<string> groupNames = new List<string>() { "組別4", "組別2", "組別3", "組別4", "組別1", "組別1" };
             groupNames =groupNames.OrderBy(x => x).ToList();
         }

+ 4 - 0
TEAMModelOS.TEST/TEAMModelOS.TEST.csproj

@@ -7,4 +7,8 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
+  <ItemGroup>
+    <ProjectReference Include="..\TEAMModelOS.SDK\TEAMModelOS.SDK.csproj" />
+  </ItemGroup>
+
 </Project>

+ 18 - 7
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -493,8 +493,8 @@ const LANG_EN_US = {
         content6: "Aiming at cultivating students' good moral character and sound personality as the foundation, promote students to form good behavior habits, and insist on combining education with social practice.Use information technology to conduct scientific, professional and objective evaluations for students' moral development. Collect process data and provide students with multi-dimensional evaluation data instruments. ",
         module7: "Labor education service",
         content7: "Aiming at the labor courses to cultivate students' core literacy, integrate new forms, new technologies and new techniques into labor education.Maintenance of school labor list, release of labor practice tasks, and record of student labor practice.Quantify the labor process, integrate labor files, students' personal labor results, and digital presentation of labor literacy information. ",
-        module8: '5 Fields Development Dashboard',
-        content8: 'Provide comprehensive evaluation services to track the development of students 5 education fields(Moral, Intellectual, Physical, Social, and Art) so that the school administrative team and teachers can clearly understand the students comprehensive development in different fields. ',
+        module8: 'All-round Quality Dashboard',
+        content8: "Provide comprehensive assessment services to track students' development in 5 fields (Moral, Intellectual, Physical, Social, and Aesthetic) so that the school administration team and teachers can have a clear picture of students' all-round development in different domains.",
         authT1: 'Teaching Services',
         authT2: 'Learning Services',
         authT3: 'Validity Period:',
@@ -1210,7 +1210,7 @@ const LANG_EN_US = {
         groupNameHolder: 'Please set the group name',
         edtiGroupName: 'Edit group name',
         addGroup: 'Add new group',
-        peopleUnit: 'People',
+        peopleUnit: ' People',
         studentCountLabel: 'Student Number',
         groupCountLabel: 'Group Number',
         groupTypeLabel: 'Group method',
@@ -1283,7 +1283,7 @@ const LANG_EN_US = {
         job: 'Title',
         teaName: 'Name',
         listName: 'Name',
-        stuCount: 'Student Number',
+        stuCount: 'Student Number:',
         code: 'Class ID',
         nameWarning: 'Please enter list name',
         updOk: 'Update successfully',
@@ -1482,6 +1482,7 @@ const LANG_EN_US = {
             filter3: 'Task',
             filter4: 'Interaction',
             filter5: 'Test',
+            filter6: 'Smart Rating',
             evt1: 'Buzz-in:',
             evt2: 'Smarter Classroom Assessment Data',
             evt3: 'Pick-out:',
@@ -1490,7 +1491,17 @@ const LANG_EN_US = {
             oldHT: 'Data uploaded by the old version of HiTeach, can not view the Smarter Classroom Assessment',
             wrkCmp: 'Pasted Works',
             dlStuWrk: 'Download Student Work',
-            stuWrk: 'Student Work'
+            stuWrk: 'Student Work',
+            stuWrk: 'Student Work',
+            wheel: 'Turn',
+            viewCom: 'View comments',
+            avgScore: 'Average score',
+            othersCom: 'Comments given to me by others',
+            noCom: 'No comments yet',
+            starRating: 'Grand Rating',
+            personMutual: 'All Items for All',
+            randomMutual: 'Random Assign',
+            anonymousSub: 'Anonymous submission',
         }
     },
     result: {
@@ -4749,7 +4760,7 @@ const LANG_EN_US = {
             expire: 'The status code has expired!',
             basicCourses: 'Basic Course',
             system: 'System',
-            semester: 'Course information will be updated after switching semesters. You need to return to the homepage to reselect courses. Would you like to switch to:',
+            semester: 'Course information will be updated after switching semesters. You need to return to the homepage to reselect courses. Would you like to switch to: ',
         },
         coursesCardTitle: 'My Course List',
         newAddCourse: 'The latest addition',
@@ -7556,7 +7567,7 @@ const LANG_EN_US = {
             studentTime: 'Total Accumulated Time of Student Participation',
             classroomTotal: 'Total Lesson Periods',
             classroomTime: 'Total Time of All Lessons',
-            totals:'totals'
+            totals:'Total'
         },
         classrooming: {
             title: 'Lesson Statistics',

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

@@ -1481,6 +1481,7 @@ const LANG_ZH_CN = {
             filter3: '任务',
             filter4: '互动',
             filter5: '测验',
+            filter6: '智慧评分',
             evt1: '抢权:',
             evt2: '课中评测数据',
             evt3: '挑人:',
@@ -1489,7 +1490,16 @@ const LANG_ZH_CN = {
             oldHT: '旧版HiTeach上传的数据,无法查看课中评测',
             wrkCmp: '作品回帖',
             dlStuWrk: '下载学生作品',
-            stuWrk: '学生作品'
+            stuWrk: '学生作品',
+            wheel: '轮',
+            viewCom: '查看评语',
+            avgScore: '平均得分',
+            othersCom: '别人给我的评语',
+            noCom: '暂无评语',
+            starRating: '星光大评分',
+            personMutual: '每人多件评分',
+            randomMutual: '随机分配互评',
+            anonymousSub: '匿名提交',
         }
     },
     result: {

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

@@ -1483,6 +1483,7 @@ const LANG_ZH_TW = {
             filter3: '任務',
             filter4: '互動',
             filter5: '測驗',
+            filter6: '智慧評分',
             evt1: '搶權:',
             evt2: '課中評量數據',
             evt3: '挑人:',
@@ -1491,7 +1492,17 @@ const LANG_ZH_TW = {
             oldHT: '舊版HiTeach上傳的數據,無法查看課中評量',
             wrkCmp: '作品回貼',
             dlStuWrk: '下載學生作品',
-            stuWrk: '學生作品'
+            stuWrk: '學生作品',
+            stuWrk: '學生作品',
+            wheel: '輪',
+            viewCom: '查看評語',
+            avgScore: '平均分數',
+            othersCom: '別人給我的評語',
+            noCom: '暫無評語',
+            starRating: '星光大評分',
+            personMutual: '每人多件評分',
+            randomMutual: '隨機分配互評',
+            anonymousSub: '匿名提交',
         }
     },
     result: {

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/ClassRecord/RecordView.vue

@@ -133,7 +133,7 @@
                                     <Button type="warning" :disabled="!filtertype.task" @click="filterFn('task')">{{ $t("cusMgt.rcd.filter3") }}<!-- ({{ filtertype.task }}) --></Button>
                                     <Button type="warning" :disabled="!filtertype.irs" @click="filterFn('irs')">{{ $t("cusMgt.rcd.filter4") }}<!-- ({{ filtertype.irs }}) --></Button>
                                     <Button type="warning" :disabled="!filtertype.exam" @click="filterFn('exam')">{{ $t("cusMgt.rcd.filter5") }}<!-- ({{ filtertype.exam }}) --></Button>
-                                    <Button type="warning" :disabled="!filtertype.smart" @click="filterFn('smart')">智慧评分<!-- ({{ filtertype.exam }}) --></Button>
+                                    <Button type="warning" :disabled="!filtertype.smart" @click="filterFn('smart')">{{ $t('cusMgt.rcd.filter6') }}<!-- ({{ filtertype.exam }}) --></Button>
                                 </div>
                             </div>
                         </div>

+ 11 - 11
TEAMModelOS/ClientApp/src/components/student-web/ClassRecord/SmartRating.vue

@@ -10,8 +10,8 @@
             <p class="clt-type">{{ smartType.name }}:</p>
             <template v-if="smartType.value === 'vote'">
                 <!-- <div v-for="(item, index) in scoreListNew" :key="index" style="margin-bottom: 10px;"> -->
-                    第{{ vote.round }}轮({{ vote.votes }}票)
-                    <Icon title="查看评语" type="md-chatbubbles" size="17" color="#2EC7C9" @click="openComment('vote')" style="cursor: pointer; margin-top: 3px; margin-right: 5px;" />
+                    {{ $t('answerSheet.tip2') }}{{ vote.round }}{{ $t('cusMgt.rcd.wheel') }}({{ vote.votes }}{{ $t('studentWeb.vote.tickets') }})
+                    <Icon :title="$t('cusMgt.rcd.viewCom')" type="md-chatbubbles" size="17" color="#2EC7C9" @click="openComment('vote')" style="cursor: pointer; margin-top: 3px; margin-right: 5px;" />
                     <SmartVote :smartData="scoreListNew"></SmartVote>
                 <!-- </div> -->
             </template>
@@ -28,25 +28,25 @@
                         <Icon type="md-chatbubbles" color="#2EC7C9" style="cursor: pointer;" @click="openComment('mutal', index, item)"
                                 v-show="!smartRate.smartRateSummary.rateInfo.AnonyCandi" />
                     </p>
-                    <p>平均得分:{{ item.result }}</p>
+                    <p>{{ $t('cusMgt.rcd.avgScore') }}:{{ item.result }}</p>
                     <img v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork'" :src="item.material" @click="$hevueImgPreview(item.material)" />
                     <p v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'IRS'" v-html="item.material" class="smart-material"></p>
                 </div>
             </template>
         </div>
         <StudentClient></StudentClient>
-        <Modal v-model="isComment" title="评语" :footer-hide="true">
+        <Modal v-model="isComment" :title="$t('homework.table.comment')" :footer-hide="true">
             <div class="mutal-info" v-if="mutalInfo">
                 <img v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork'" :src="mutalInfo" />
                 <p v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'IRS'" v-html="mutalInfo"></p>
             </div>
             <div v-for="(item, index) in showResult" :key="index" style="margin-bottom: 5px;">
                 <span style="color: #2d8cf0;">
-                    {{ item.id === '-1' ? '别人给我的评语' : item.name }}
+                    {{ item.id === '-1' ? $t('cusMgt.rcd.othersCom') : item.name }}
                 </span>:
                 <span>{{ item.details }}</span>
             </div>
-            <div v-if="!showResult.length">暂无评语</div>
+            <div v-if="!showResult.length">{{ $t('cusMgt.rcd.noCom') }}</div>
         </Modal>
     </div>
 </template>
@@ -111,21 +111,21 @@ export default {
             if(this.smartRate.smartRateSummary.scoreDetailResult && Object.keys(this.smartRate.smartRateSummary.scoreDetailResult).length) {
                 types = {
                     value: 'score',
-                    name: "星光大评分"
+                    name: this.$t('cusMgt.rcd.starRating')
                 }
             } else if(this.smartRate.smartRateSummary.voteDetailResult && Object.keys(this.smartRate.smartRateSummary.voteDetailResult).length) {
                 types = {
                     value: 'vote',
-                    name: "投票"
+                    name: this.$t('auth.vote')
                 }
             } else if(this.smartRate.smartRateSummary.mutualSummary && Object.keys(this.smartRate.smartRateSummary.mutualSummary).length) {
                 types.value = 'mutual'
                 if(this.smartRate.smartRateSummary.mutualSummary.mutualType === 'All') {
-                    types.name = "每人多件评分"
+                    types.name = this.$t('cusMgt.rcd.personMutual')
                 } else if(this.smartRate.smartRateSummary.mutualSummary.mutualType === 'Two') {
-                    types.name = "随机分配互评"
+                    types.name = this.$t('cusMgt.rcd.randomMutual')
                 } else {
-                    types.name = "自评"
+                    types.name = this.$t('assessment.selfAppraise')
                 }
             }
             return types

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/ClassRecord/SmartScore.vue

@@ -3,7 +3,7 @@
         <Icon type="md-trophy" size="25" color="#ff880d" class="trophy" />
         <div class="ev-score-matrix" :id="'vote'+id"></div>
         <p>
-            查看评语
+            {{ $t('cusMgt.rcd.viewCom') }}
             <span v-for="(item, index) in smartData" :key="index" class="show-name" @click="openResult(index)">{{ item.name }}</span>
         </p>
     </div>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/classrecord/ClassRecord.vue

@@ -305,7 +305,7 @@ export default {
         },
         {
           value: 'SmartRating',
-          text: "智慧评分",
+          text: this.$t('cusMgt.rcd.filter6'),
           events: ['RatingStart'],
           count: 0
         }

+ 11 - 11
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/SmartRating.vue

@@ -9,13 +9,13 @@
         <div class="smart-wrap">
             <p class="clt-type">
                 {{ smartType.name }}
-                <Icon type="md-eye-off" title="匿名提交" v-if="smartRate.smartRateSummary.rateInfo.AnonyCandi" />
+                <Icon type="md-eye-off" :title="$t('cusMgt.rcd.anonymousSub')" v-if="smartRate.smartRateSummary.rateInfo.AnonyCandi" />
             </p>
             <template v-if="smartType.value === 'vote'">
                 <!-- <div v-for="(item, index) in scoreListNew" :key="index" style="margin-bottom: 10px;"> -->
-                    第{{ vote.round }}轮({{ vote.votes }}票)
-                    <Icon title="查看评语" type="md-chatbubbles" size="17" color="#2EC7C9" @click="openComment('vote')" style="cursor: pointer; margin-top: 3px; margin-right: 5px;" />
+                    {{ $t('answerSheet.tip2') }}{{ vote.round }}{{ $t('cusMgt.rcd.wheel') }}({{ vote.votes }}{{ $t('studentWeb.vote.tickets') }})
+                    <Icon :title="$t('cusMgt.rcd.viewCom')" type="md-chatbubbles" size="17" color="#2EC7C9" @click="openComment('vote')" style="cursor: pointer; margin-top: 3px; margin-right: 5px;" />
                     <SmartVote :smartData="scoreListNew"></SmartVote>
                 <!-- </div> -->
             </template>
@@ -33,14 +33,14 @@
                         </span>
                         <Icon type="md-chatbubbles" color="#2EC7C9" style="cursor: pointer;" @click="openComment('mutal', index, item)" />
                     </p>
-                    <p>平均得分:{{ item.result }}</p>
+                    <p>{{ $t('cusMgt.rcd.avgScore') }}:{{ item.result }}</p>
                     <img v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork'" :src="item.material" @click="$hevueImgPreview(item.material)" />
                     <p v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'IRS'" v-html="item.material" class="smart-material"></p>
                 </div>
             </template>
         </div>
         <StudentClient></StudentClient>
-        <Modal v-model="isComment" title="评语" :footer-hide="true">
+        <Modal v-model="isComment" :title="$t('homework.table.comment')" :footer-hide="true">
             <div class="mutal-info" v-if="mutalInfo">
                 <img v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'StudentWork'" :src="mutalInfo.material" />
                 <p v-if="smartRate.smartRateSummary.rateInfo.RatingSource === 'IRS'" v-html="mutalInfo.material"></p>
@@ -56,7 +56,7 @@
                 <span style="color: #2d8cf0;">{{ item.name }}</span>:
                 <span>{{ item.details }}</span>
             </div>
-            <div v-if="!showResult.length">暂无评语</div>
+            <div v-if="!showResult.length">{{ $t('cusMgt.rcd.noCom') }}</div>
         </Modal>
     </div>
 </template>
@@ -116,21 +116,21 @@ export default {
             if(this.smartRate.smartRateSummary.scoreDetailResult && Object.keys(this.smartRate.smartRateSummary.scoreDetailResult).length) {
                 types = {
                     value: 'score',
-                    name: "星光大评分"
+                    name: this.$t('cusMgt.rcd.starRating')
                 }
             } else if(this.smartRate.smartRateSummary.voteDetailResult && Object.keys(this.smartRate.smartRateSummary.voteDetailResult).length) {
                 types = {
                     value: 'vote',
-                    name: "投票"
+                    name: this.$t('auth.vote')
                 }
             } else if(this.smartRate.smartRateSummary.mutualSummary && Object.keys(this.smartRate.smartRateSummary.mutualSummary).length) {
                 types.value = 'mutual'
                 if(this.smartRate.smartRateSummary.mutualSummary.mutualType === 'All') {
-                    types.name = "每人多件评分"
+                    types.name = this.$t('cusMgt.rcd.personMutual')
                 } else if(this.smartRate.smartRateSummary.mutualSummary.mutualType === 'Two') {
-                    types.name = "随机分配互评"
+                    types.name = this.$t('cusMgt.rcd.randomMutual')
                 } else {
-                    types.name = "自评"
+                    types.name = this.$t('assessment.selfAppraise')
                 }
             }
             return types

+ 2 - 2
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/SmartScore.vue

@@ -3,7 +3,7 @@
         <Icon type="md-trophy" size="25" color="#ff880d" class="trophy" />
         <div class="ev-score-matrix" :id="'vote'+id"></div>
         <p>
-            查看评语
+            {{ $t('cusMgt.rcd.viewCom') }}
             <span v-for="(item, index) in smartData" :key="index" class="show-name" @click="openResult(index)">{{ item.name }}</span>
         </p>
     </div>
@@ -114,7 +114,7 @@ export default {
     },
     methods: {
         openResult(index) {
-            this.$parent.openComment(index)
+            this.$parent.openComment('score', index)
         },
     }
 }

+ 13 - 3
TEAMModelOS/Controllers/Both/CourseBaseController.cs

@@ -504,12 +504,22 @@ namespace TEAMModelOS.Controllers.Both
                                     var resultBase = await client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).GetList<IdNameCode>(teacherSQLBase, $"Base");
                                     teachersBases = resultBase.list;
                                 }
-                                int count = 0; 
+                                int count = 0;
                                 if (groups.IsNotEmpty())
                                 {
-                                      count = courseTask.schedules.RemoveAll(z => !string.IsNullOrWhiteSpace(z.groupId)  &&  !groups.Select(v => v.id).Contains(z.groupId));
+                                    count = courseTask.schedules.RemoveAll(z => !string.IsNullOrWhiteSpace(z.groupId)  &&  !groups.Select(v => v.id).Contains(z.groupId));
+                                    if (count>0)
+                                    {
+                                        await client.GetContainer(Constant.TEAMModelOS, Constant.School).UpsertItemAsync(courseTask, new PartitionKey(courseTask.code));
+                                    }
+                                }
+                                else {
+                                    if (has_schedule) {
+                                        count = courseTask.schedules.RemoveAll(z => !string.IsNullOrWhiteSpace(z.groupId)  );
+                                        //排课任务的所有名单都不在。
+                                        await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).DeleteItemStreamAsync(courseTask.id, new PartitionKey(courseTask.code));
+                                    }
                                 }
-                               
                                 //当courseTask 为空,则matchedClasses可能会有年级匹配建议升学年的班级清单,
                                 //注:比如高二可能会将高三的课程学完,则该高三的课程的学年级应该是手动处理为高中二年级。不区分学期的目的,也是可能存在提前一学期学完第二学期的课程。
                                 return Ok(new {count= count, studyYear, semesterId, courseTask, teachers= teachersBases, groups, matchedClasses = classes, matchedTeachers = teachers.Select(z => new { z.id, z.name, z.subjectIds, z.job, z.periodId, z.picture }) });

+ 4 - 2
TEAMModelOS/Controllers/Student/OverallEducationController.cs

@@ -113,7 +113,7 @@ namespace TEAMModelOS.Controllers
                 List<Student> grade_students = new List<Student>();
                 List<OverallEducation> grade_overallEducations = new List<OverallEducation>();
                 List<OverallEducation> overallEducations = new List<OverallEducation>();
-                HashSet<string> classIds = null;
+                HashSet<string> classIds = new HashSet<string>();
 
                 var client = _azureCosmos.GetCosmosClient();
                 School school = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{_school}", new PartitionKey("Base"));
@@ -163,11 +163,13 @@ namespace TEAMModelOS.Controllers
                     }
                 }
                 if (!string.IsNullOrWhiteSpace($"{_studentId}")) {
-                    Azure.Response response=  await  _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).ReadItemStreamAsync($"{_studentId}", new PartitionKey($"Base-{school}"));
+                   
+                    Azure.Response response=  await  _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).ReadItemStreamAsync($"{_studentId}", new PartitionKey($"Base-{school.id}"));
                     if (response.Status == 200) { 
                         Student student= JsonDocument.Parse(response.Content).RootElement.Deserialize<Student>();
                         if (student != null && !string.IsNullOrWhiteSpace(student.classId)) {
                             classIds.Add(student.classId);
+                            isClass=true;
                         }
                     }
                 }