瀏覽代碼

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

OnePsycho 4 年之前
父節點
當前提交
48a27edd16

+ 166 - 62
TEAMModelFunction/ActivityHttpTrigger.cs

@@ -38,7 +38,7 @@ namespace TEAMModelFunction
         [FunctionName("fix-exam-activity")]
         [FunctionName("fix-exam-activity")]
         public   async Task<IActionResult> ExamActivity([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,ILogger log)
         public   async Task<IActionResult> ExamActivity([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,ILogger log)
         {
         {
-            log.LogInformation("C# HTTP trigger function processed a request.");
+            log.LogInformation("fix-exam-activity...");
             string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
             string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
             List<string> datas = JsonConvert.DeserializeObject<List<string>>(requestBody);
             List<string> datas = JsonConvert.DeserializeObject<List<string>>(requestBody);
             var client = _azureCosmos.GetCosmosClient();
             var client = _azureCosmos.GetCosmosClient();
@@ -59,52 +59,17 @@ namespace TEAMModelFunction
                     }
                     }
                 }
                 }
                 log.LogInformation($"{exams.ToJsonString()}");
                 log.LogInformation($"{exams.ToJsonString()}");
-                foreach (var info in exams) {
+                foreach (var info in exams)
+                {
+                    if (info.classes.IsEmpty())
+                    {
+                        continue;
+                    }
                     List<string> sub = new List<string>();
                     List<string> sub = new List<string>();
                     foreach (ExamSubject subject in info.subjects)
                     foreach (ExamSubject subject in info.subjects)
                     {
                     {
                         sub.Add(subject.id);
                         sub.Add(subject.id);
                     }
                     }
-                    //ActivityData dataa;
-                    //if (info.scope == "school")
-                    //{
-                    //    dataa = new ActivityData
-                    //    {
-                    //        id = info.id,
-                    //        code = $"Activity-{info.school}",
-                    //        type = "exam",
-                    //        name = info.name,
-                    //        startTime = info.startTime,
-                    //        endTime = info.endTime,
-                    //        scode = info.code,
-                    //        scope = info.scope,
-                    //        classes = info.classes.IsNotEmpty() ? info.classes : new List<string> { "" },
-                    //        tmdids = new List<string> { "" },
-                    //        progress = "going",
-                    //        subjects = sub
-                    //    };
-                    //    await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(dataa, new Azure.Cosmos.PartitionKey(dataa.code));
-                    //}
-                    //else if (info.scope == "private")
-                    //{
-                    //    dataa = new ActivityData
-                    //    {
-                    //        id = info.id,
-                    //        code = $"Activity-Common",
-                    //        type = "exam",
-                    //        name = info.name,
-                    //        startTime = info.startTime,
-                    //        endTime = info.endTime,
-                    //        scode = info.code,
-                    //        scope = info.scope,
-                    //        progress = "going",
-                    //        classes = info.classes.IsNotEmpty() ? info.classes : new List<string> { "" },
-                    //        tmdids = new List<string> { "" },
-                    //        subjects = sub
-                    //    };
-                    //    await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(dataa, new Azure.Cosmos.PartitionKey(dataa.code));
-                    //}
-
                     (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
                     (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
                     List<StuActivity> stuActivities = new List<StuActivity>();
                     List<StuActivity> stuActivities = new List<StuActivity>();
                     List<StuActivity> tmdActivities = new List<StuActivity>();
                     List<StuActivity> tmdActivities = new List<StuActivity>();
@@ -124,7 +89,8 @@ namespace TEAMModelFunction
                                 scope = info.scope,
                                 scope = info.scope,
                                 school = info.school,
                                 school = info.school,
                                 creatorId = info.creatorId,
                                 creatorId = info.creatorId,
-                                subjects = sub
+                                subjects = sub,
+                                blob = null
 
 
                             });
                             });
                         });
                         });
@@ -145,7 +111,8 @@ namespace TEAMModelFunction
                                 scope = info.scope,
                                 scope = info.scope,
                                 school = info.school,
                                 school = info.school,
                                 creatorId = info.creatorId,
                                 creatorId = info.creatorId,
-                                subjects = sub
+                                subjects = sub,
+                                blob=null
                             });
                             });
                         });
                         });
                     }
                     }
@@ -160,33 +127,170 @@ namespace TEAMModelFunction
             [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
             [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
             ILogger log)
             ILogger log)
         {
         {
-            log.LogInformation("C# HTTP trigger function processed a request.1");
-            string name = req.Query["name"];
+
+            log.LogInformation("fix-vote-activity...");
             string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
             string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
-            dynamic data = JsonConvert.DeserializeObject(requestBody);
-            log.LogInformation($"{data}");
-            name = name ?? data?.name;
+            List<string> datas = JsonConvert.DeserializeObject<List<string>>(requestBody);
+            var client = _azureCosmos.GetCosmosClient();
 
 
-            string responseMessage = string.IsNullOrEmpty(name)
-                ? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
-                : $"Hello, {name}. This HTTP triggered function executed successfully.";
-            return new OkObjectResult(responseMessage);
+            var query = $"select  *  from c ";
+            foreach (string data in datas)
+            {
+                List<Vote> votes = new List<Vote>();
+                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
+                    queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Vote-{data}") }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                    {
+                        foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                        {
+                            votes.Add(obj.ToObject<Vote>());
+                        }
+                    }
+                }
+                log.LogInformation($"{votes.ToJsonString()}");
+                foreach (var info in votes)
+                {
+                    if (info.classes.IsEmpty())
+                    {
+                        continue;
+                    }
+                   
+                    (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
+                    List<StuActivity> stuActivities = new List<StuActivity>();
+                    List<StuActivity> tmdActivities = new List<StuActivity>();
+                    if (tmdids.IsNotEmpty())
+                    {
+                        tmdids.ForEach(x => {
+                            tmdActivities.Add(new StuActivity
+                            {
+                                pk = "Activity",
+                                id = info.id,
+                                code = $"Activity-{x}",
+                                type = "vote",
+                                name = info.name,
+                                startTime = info.startTime,
+                                endTime = info.endTime,
+                                scode = info.code,
+                                scope = info.scope,
+                                school = info.school,
+                                creatorId = info.creatorId,
+                                subjects = new List<string>() { "" },
+                                blob = null
+
+                            });
+                        });
+                    }
+                    if (studentss.IsNotEmpty())
+                    {
+                        studentss.ForEach(x => {
+                            stuActivities.Add(new StuActivity
+                            {
+                                pk = "Activity",
+                                id = info.id,
+                                code = $"Activity-{info.school}-{x.id}",
+                                type = "vote",
+                                name = info.name,
+                                startTime = info.startTime,
+                                endTime = info.endTime,
+                                scode = info.code,
+                                scope = info.scope,
+                                school = info.school,
+                                creatorId = info.creatorId,
+                                subjects = new List<string>() { "" },
+                                blob = null
+                            });
+                        });
+                    }
+                    await TriggerStuActivity.SaveStuActivity(client, stuActivities, tmdActivities);
+                }
+            }
+            return new OkObjectResult(new { });
         }
         }
         [FunctionName("fix-survey-activity")]
         [FunctionName("fix-survey-activity")]
         public async Task<IActionResult> SurveyActivity(
         public async Task<IActionResult> SurveyActivity(
             [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
             [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
             ILogger log)
             ILogger log)
         {
         {
-            log.LogInformation("C# HTTP trigger function processed a request.1");
-            string name = req.Query["name"];
+            log.LogInformation("fix-survey-activity...");
             string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
             string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
-            dynamic data = JsonConvert.DeserializeObject(requestBody);
-            log.LogInformation($"{data}");
-            name = name ?? data?.name;
-            string responseMessage = string.IsNullOrEmpty(name)
-                ? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
-                : $"Hello, {name}. This HTTP triggered function executed successfully.";
-            return new OkObjectResult(responseMessage);
+            List<string> datas = JsonConvert.DeserializeObject<List<string>>(requestBody);
+            var client = _azureCosmos.GetCosmosClient();
+
+            var query = $"select  *  from c ";
+            foreach (string data in datas)
+            {
+                List<Survey> surveys = new List<Survey>();
+                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
+                    queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Survey-{data}") }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                    {
+                        foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                        {
+                            surveys.Add(obj.ToObject<Survey>());
+                        }
+                    }
+                }
+                log.LogInformation($"{surveys.ToJsonString()}");
+                foreach (var info in surveys)
+                {
+                    if (info.classes.IsEmpty())
+                    {
+                        continue;
+                    }
+                    (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
+                    List<StuActivity> stuActivities = new List<StuActivity>();
+                    List<StuActivity> tmdActivities = new List<StuActivity>();
+                    if (tmdids.IsNotEmpty())
+                    {
+                        tmdids.ForEach(x => {
+                            tmdActivities.Add(new StuActivity
+                            {
+                                pk = "Activity",
+                                id = info.id,
+                                code = $"Activity-{x}",
+                                type = "survey",
+                                name = info.name,
+                                startTime = info.startTime,
+                                endTime = info.endTime,
+                                scode = info.code,
+                                scope = info.scope,
+                                school = info.school,
+                                creatorId = info.creatorId,
+                                subjects = new List<string>() { "" },
+                                blob = info.blob
+
+                            });
+                        });
+                    }
+                    if (studentss.IsNotEmpty())
+                    {
+                        studentss.ForEach(x => {
+                            stuActivities.Add(new StuActivity
+                            {
+                                pk = "Activity",
+                                id = info.id,
+                                code = $"Activity-{info.school}-{x.id}",
+                                type = "survey",
+                                name = info.name,
+                                startTime = info.startTime,
+                                endTime = info.endTime,
+                                scode = info.code,
+                                scope = info.scope,
+                                school = info.school,
+                                creatorId = info.creatorId,
+                                subjects = new List<string>() { "" },
+                                blob=info.blob
+                            });
+                        });
+                    }
+                    await TriggerStuActivity.SaveStuActivity(client, stuActivities, tmdActivities);
+                }
+            }
+            return new OkObjectResult(new { });
         }
         }
     }
     }
 }
 }

+ 43 - 41
TEAMModelFunction/TriggerExam.cs

@@ -89,45 +89,45 @@ namespace TEAMModelFunction
                     }
                     }
                     break;
                     break;
                 case "going":                    
                 case "going":                    
-                    ActivityData data;
-                    if (info.scope == "school")
-                    {
-                        data = new ActivityData
-                        {
-                            id = info.id,
-                            code = $"Activity-{info.school}",
-                            type = "exam",
-                            name = info.name,
-                            startTime = info.startTime,
-                            endTime = info.endTime,
-                            scode = info.code,
-                            scope = info.scope,
-                            classes = info.classes.IsNotEmpty() ? info.classes : new List<string> { "" },
-                            tmdids =  new List<string> { "" },
-                            progress = "going",
-                            subjects = sub
-                        };
-                        await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
-                    }
-                    else if (info.scope == "private")
-                    {
-                        data = new ActivityData
-                        {
-                            id = info.id,
-                            code = $"Activity-Common",
-                            type = "exam",
-                            name = info.name,
-                            startTime = info.startTime,
-                            endTime = info.endTime,
-                            scode = info.code,
-                            scope = info.scope,
-                            progress = "going",
-                            classes = info.classes.IsNotEmpty() ? info.classes : new List<string> { "" },
-                            tmdids = new List<string> { "" },
-                            subjects = sub
-                        };
-                        await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
-                    }
+                    //ActivityData data;
+                    //if (info.scope == "school")
+                    //{
+                    //    data = new ActivityData
+                    //    {
+                    //        id = info.id,
+                    //        code = $"Activity-{info.school}",
+                    //        type = "exam",
+                    //        name = info.name,
+                    //        startTime = info.startTime,
+                    //        endTime = info.endTime,
+                    //        scode = info.code,
+                    //        scope = info.scope,
+                    //        classes = info.classes.IsNotEmpty() ? info.classes : new List<string> { "" },
+                    //        tmdids =  new List<string> { "" },
+                    //        progress = "going",
+                    //        subjects = sub
+                    //    };
+                    //    await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
+                    //}
+                    //else if (info.scope == "private")
+                    //{
+                    //    data = new ActivityData
+                    //    {
+                    //        id = info.id,
+                    //        code = $"Activity-Common",
+                    //        type = "exam",
+                    //        name = info.name,
+                    //        startTime = info.startTime,
+                    //        endTime = info.endTime,
+                    //        scode = info.code,
+                    //        scope = info.scope,
+                    //        progress = "going",
+                    //        classes = info.classes.IsNotEmpty() ? info.classes : new List<string> { "" },
+                    //        tmdids = new List<string> { "" },
+                    //        subjects = sub
+                    //    };
+                    //    await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
+                    //}
                     (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
                     (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
                     List<StuActivity> stuActivities = new List<StuActivity>();
                     List<StuActivity> stuActivities = new List<StuActivity>();
                     List<StuActivity> tmdActivities = new List<StuActivity>();
                     List<StuActivity> tmdActivities = new List<StuActivity>();
@@ -147,7 +147,8 @@ namespace TEAMModelFunction
                                 scope = info.scope,
                                 scope = info.scope,
                                 school = info.school,
                                 school = info.school,
                                 creatorId = info.creatorId,
                                 creatorId = info.creatorId,
-                                subjects = new List<string> { "" }
+                                subjects = sub,
+                                blob = null
 
 
                             });
                             });
                         });
                         });
@@ -168,7 +169,8 @@ namespace TEAMModelFunction
                                 scope = info.scope,
                                 scope = info.scope,
                                 school = info.school,
                                 school = info.school,
                                 creatorId = info.creatorId,
                                 creatorId = info.creatorId,
-                                subjects = new List<string> { "" }
+                                subjects = sub,
+                                blob = null
                             });
                             });
                         });
                         });
                     }
                     }

+ 10 - 50
TEAMModelFunction/TriggerStuActivity.cs

@@ -19,62 +19,22 @@ namespace TEAMModelFunction
     {
     {
 
 
         public static async Task<string> SaveStuActivity(CosmosClient client,List<StuActivity> stuActivities,List<StuActivity> tmdActivities) {
         public static async Task<string> SaveStuActivity(CosmosClient client,List<StuActivity> stuActivities,List<StuActivity> tmdActivities) {
-            int pageSize = 200;
-            if (stuActivities.IsNotEmpty()) {
-                int pages = (int)Math.Ceiling((double)stuActivities.Count / pageSize);
-                for (int i = 0; i < pages; i++)
+            if (stuActivities.IsNotEmpty())
+            {
+                foreach (var x in stuActivities)
                 {
                 {
-                    List<StuActivity> lists = stuActivities.Skip((i) * pageSize).Take(pageSize).ToList();
-                    List<KeyValuePair<PartitionKey, Stream>> itemsToInsert = new List<KeyValuePair<PartitionKey, Stream>>();
-                    lists.ForEach(async x =>
-                    {
-                        MemoryStream stream = new MemoryStream();
-                        await JsonSerializer.SerializeAsync(stream, x, new JsonSerializerOptions { IgnoreNullValues = true });
-                        KeyValuePair<PartitionKey, Stream> keyValue = new KeyValuePair<PartitionKey, Stream>(new PartitionKey(x.code), stream);
-                        itemsToInsert.Add(keyValue);
-                    });
-                    List<Task> tasks = new List<Task>(lists.Count);
-                    itemsToInsert.ForEach(item =>
-                    {
-                        tasks.Add(client.GetContainer("TEAMModelOS", "Student").CreateItemStreamAsync(item.Value, item.Key)
-                            .ContinueWith((Task<Response> task) =>
-                            {
-                                using (Response response = task.Result)
-                                {
-                                }
-                            }
-                            ));
-                    });
-                    await Task.WhenAll(tasks);
+                    await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(x, new PartitionKey(x.code));
                 }
                 }
+
+
             }
             }
             if (tmdActivities.IsNotEmpty())
             if (tmdActivities.IsNotEmpty())
             {
             {
-                int pages = (int)Math.Ceiling((double)tmdActivities.Count / pageSize);
-                for (int i = 0; i < pages; i++) {
-                    List<StuActivity> lists = tmdActivities.Skip((i) * pageSize).Take(pageSize).ToList();
-                    List<KeyValuePair<PartitionKey, Stream>> itemsToInsert = new List<KeyValuePair<PartitionKey, Stream>>();
-                    lists.ForEach(async x =>
-                    {
-                        MemoryStream stream = new MemoryStream();
-                        await JsonSerializer.SerializeAsync(stream, x, new JsonSerializerOptions { IgnoreNullValues = true });
-                        KeyValuePair<PartitionKey, Stream> keyValue = new KeyValuePair<PartitionKey, Stream>(new PartitionKey(x.code), stream);
-                        itemsToInsert.Add(keyValue);
-                    });
-                    List<Task> tasks = new List<Task>(lists.Count);
-                    itemsToInsert.ForEach(item =>
-                    {
-                        tasks.Add(client.GetContainer("TEAMModelOS", "Teacher").CreateItemStreamAsync(item.Value, item.Key)
-                            .ContinueWith((Task<Response> task) =>
-                            {
-                                using (Response response = task.Result)
-                                {
-                                }
-                            }
-                            ));
-                    });
-                    await Task.WhenAll(tasks);
+                foreach (var x in tmdActivities)
+                {
+                    await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(x, new PartitionKey(x.code));
                 }
                 }
+
             }
             }
             return ""; 
             return ""; 
         }
         }

+ 6 - 5
TEAMModelFunction/TriggerVote.cs

@@ -140,7 +140,7 @@ namespace TEAMModelFunction
                                     pk = "Activity",
                                     pk = "Activity",
                                     id = vote.id,
                                     id = vote.id,
                                     code = $"Activity-{x}",
                                     code = $"Activity-{x}",
-                                    type = "survey",
+                                    type = "vote",
                                     name = vote.name,
                                     name = vote.name,
                                     startTime = vote.startTime,
                                     startTime = vote.startTime,
                                     endTime = vote.endTime,
                                     endTime = vote.endTime,
@@ -148,8 +148,8 @@ namespace TEAMModelFunction
                                     scope = vote.scope,
                                     scope = vote.scope,
                                     school = vote.school,
                                     school = vote.school,
                                     creatorId = vote.creatorId,
                                     creatorId = vote.creatorId,
-                                    subjects = new List<string> { "" }
-
+                                    subjects = new List<string> { "" } ,
+                                    blob = null
                                 });
                                 });
                             });
                             });
                         }
                         }
@@ -161,7 +161,7 @@ namespace TEAMModelFunction
                                     pk = "Activity",
                                     pk = "Activity",
                                     id = vote.id,
                                     id = vote.id,
                                     code = $"Activity-{vote.school}-{x.id}",
                                     code = $"Activity-{vote.school}-{x.id}",
-                                    type = "survey",
+                                    type = "vote",
                                     name = vote.name,
                                     name = vote.name,
                                     startTime = vote.startTime,
                                     startTime = vote.startTime,
                                     endTime = vote.endTime,
                                     endTime = vote.endTime,
@@ -169,7 +169,8 @@ namespace TEAMModelFunction
                                     scope = vote.scope,
                                     scope = vote.scope,
                                     school = vote.school,
                                     school = vote.school,
                                     creatorId = vote.creatorId,
                                     creatorId = vote.creatorId,
-                                    subjects = new List<string> { "" }
+                                    subjects = new List<string> { "" },
+                                    blob=null
                                 });
                                 });
                             });
                             });
                         }
                         }

+ 15 - 49
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -176,7 +176,7 @@ export default {
                             icon: 'iconfont icon-question-bank',
                             icon: 'iconfont icon-question-bank',
                             name: this.$t('system.menu.scQuBack'),
                             name: this.$t('system.menu.scQuBack'),
                             router: '/home/evaluation/schoolBank',
                             router: '/home/evaluation/schoolBank',
-                            tag: '*',
+                            tag: '',
                             role: 'teacher|admin',
                             role: 'teacher|admin',
                             permission: '',
                             permission: '',
                         },
                         },
@@ -184,7 +184,7 @@ export default {
                             icon: 'iconfont icon-k-point',
                             icon: 'iconfont icon-k-point',
                             name: this.$t('system.menu.kdBack'),
                             name: this.$t('system.menu.kdBack'),
                             router: '/home/knowledge',
                             router: '/home/knowledge',
-                            tag: '*',
+                            tag: '',
                             role: 'teacher|admin',
                             role: 'teacher|admin',
                             permission: '',
                             permission: '',
                         }
                         }
@@ -201,7 +201,7 @@ export default {
                             icon: 'iconfont icon-xueqing',
                             icon: 'iconfont icon-xueqing',
                             name: this.$t('system.menu.evAna'),
                             name: this.$t('system.menu.evAna'),
                             router: '/totalIndex',
                             router: '/totalIndex',
-                            tag: '*',
+                            tag: '',
                             role: 'admin',
                             role: 'admin',
                             permission: 'analysis-read'
                             permission: 'analysis-read'
                         },
                         },
@@ -221,69 +221,35 @@ export default {
                     router: '',
                     router: '',
                     // role: 'admin',
                     // role: 'admin',
                     // permission: 'schoolAc-read|schoolAc-upd',
                     // permission: 'schoolAc-read|schoolAc-upd',
-                    role: 'teacher|admin',
+                    role: 'admin',
                     permission: '',
                     permission: '',
                     child: [
                     child: [
                         {
                         {
                             icon: 'iconfont icon-test',
                             icon: 'iconfont icon-test',
                             name: this.$t('system.menu.scEv'),
                             name: this.$t('system.menu.scEv'),
                             router: '/home/schoolEvaluation',
                             router: '/home/schoolEvaluation',
-                            tag: '*',
-                            role: 'teacher|admin',
+                            tag: '',
+                            role: 'admin',
                             permission: ''
                             permission: ''
                         },
                         },
                         {
                         {
                             icon: 'iconfont icon-vote',
                             icon: 'iconfont icon-vote',
                             name: this.$t('system.menu.scVote'),
                             name: this.$t('system.menu.scVote'),
                             router: '/home/manageVote',
                             router: '/home/manageVote',
-                            tag: '*',
-                            role: 'teacher|admin',
+                            tag: '',
+                            role: 'admin',
                             permission: ''
                             permission: ''
                         },
                         },
                         {
                         {
                             icon: 'iconfont icon-questionnaire',
                             icon: 'iconfont icon-questionnaire',
                             name: this.$t('system.menu.scQu'),
                             name: this.$t('system.menu.scQu'),
                             router: '/home/manageQuestionnaire',
                             router: '/home/manageQuestionnaire',
-                            tag: '*',
-                            role: 'teacher|admin',
+                            tag: '',
+                            role: 'admin',
                             permission: ''
                             permission: ''
                         },
                         },
                     ]
                     ]
                 },
                 },
-                //班级课程放到以及菜单
-                // {
-                //     icon: 'iconfont icon-kecheng',
-                //     name: this.$t('system.menu.classCus'),
-                //     router: '',
-                //     role: 'teacher',
-                //     permission: 'analysis',
-                //     child: [
-                //         {
-                //             icon: 'iconfont icon-class-self',
-                //             name: this.$t('system.menu.myClass'),
-                //             router: '/home/manageClass',
-                //             tag: '',
-                //             role: 'teacher',
-                //             permission: 'analysis'
-                //         },
-                //         {
-                //             icon: 'iconfont icon-course-self',
-                //             name: this.$t('system.menu.myCus'),
-                //             router: '/home/myCourse',
-                //             tag: '*',
-                //             role: 'teacher',
-                //             permission: 'analysis'
-                //         },
-                //         //{
-                //         //    icon: 'iconfont icon-schedule',
-                //         //    name: '我的课表',
-                //         //    router: '/home/CourseTable',
-                //         //    tag: '',
-                //         //    role: 'admin',
-                //         //    permission:'analysis'
-                //         //},
-                //     ]
-                // },
                 {
                 {
                     icon: 'iconfont icon-textbook',
                     icon: 'iconfont icon-textbook',
                     name: this.$t('system.menu.cusContent'),
                     name: this.$t('system.menu.cusContent'),
@@ -311,7 +277,7 @@ export default {
                             icon: 'iconfont icon-question-bank',
                             icon: 'iconfont icon-question-bank',
                             name: this.$t('system.menu.prtQuBack'),
                             name: this.$t('system.menu.prtQuBack'),
                             router: '/home/evaluation/personalBank',
                             router: '/home/evaluation/personalBank',
-                            tag: '*',
+                            tag: '',
                             role: 'teacher|admin',
                             role: 'teacher|admin',
                             permission: '',
                             permission: '',
                         }
                         }
@@ -328,7 +294,7 @@ export default {
                             icon: 'iconfont icon-test',
                             icon: 'iconfont icon-test',
                             name: this.$t('system.menu.prtEv'),
                             name: this.$t('system.menu.prtEv'),
                             router: '/home/privateEvaluation',
                             router: '/home/privateEvaluation',
-                            tag: '*',
+                            tag: '',
                             role: 'teacher|admin',
                             role: 'teacher|admin',
                             permission: '',
                             permission: '',
                         },
                         },
@@ -336,7 +302,7 @@ export default {
                             icon: 'iconfont icon-vote',
                             icon: 'iconfont icon-vote',
                             name: this.$t('system.menu.prtVote'),
                             name: this.$t('system.menu.prtVote'),
                             router: '/home/personalVote',
                             router: '/home/personalVote',
-                            tag: '*',
+                            tag: '',
                             role: 'teacher|admin',
                             role: 'teacher|admin',
                             permission: '',
                             permission: '',
                         },
                         },
@@ -344,7 +310,7 @@ export default {
                             icon: 'iconfont icon-questionnaire',
                             icon: 'iconfont icon-questionnaire',
                             name: this.$t('system.menu.prtQu'),
                             name: this.$t('system.menu.prtQu'),
                             router: '/home/personalSurvey',
                             router: '/home/personalSurvey',
-                            tag: '*',
+                            tag: '',
                             role: 'teacher|admin',
                             role: 'teacher|admin',
                             permission: '',
                             permission: '',
                         },
                         },
@@ -387,7 +353,7 @@ export default {
                     icon: 'iconfont icon-course-self',
                     icon: 'iconfont icon-course-self',
                     name: this.$t('system.menu.myCus'),
                     name: this.$t('system.menu.myCus'),
                     router: '/home/myCourse',
                     router: '/home/myCourse',
-                    tag: '*',
+                    tag: '',
                     role: 'teacher',
                     role: 'teacher',
                     permission: '',
                     permission: '',
                     child: []
                     child: []

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

@@ -1,207 +1,207 @@
-export default{
-  //MgtSchoolEva.vue
-  mgtScEv:{
-      listLabel:'评测列表',
-      period:'学段:',
-      create:'新建',
-      delete:'删除',
-      edit:'编辑',
-      createTime:'施测时间:',
-      pending:'待发布',
-      going:'进行中',
-      finish:'已结束',
-      endTime:'结束时间:',
-      stop:'立即结束',
-      evType:'测试类型:',
-      stuCount:'施测人数:',
-      nodata:'暂无评测',
-      tab1:'评测数据',
-      tab2:'评测试卷',
-      autoTips1:'此功能仅用于展示情景快速模拟学生作答数据,且学生作答为随机生成,仅供参考!',
-      autoTips2:'此功能仅用于展示情景快速模拟教师评分数据,且分数为随机生成,仅供参考!',
-      autoScore:'一键评分',
-      autoAnswer:'一键作答',
-      evSubject:'测试科目:',
-      returnTop:'返回顶部',
-      mockOk:'模拟成功',
-      mockErr:'模拟失败',
-      stopTitle:'结束评测',
-      stopContent:'结束后学生将不能继续作答,是否立即结束',
-      stopOk:'评测已结束!',
-      deleteTitle:'删除评测',
-      deleteContent:'是否确认删除',
-      deleteOk:'删除成功',
-      deleteErr:'删除失败',
-      noJoin:'此账号暂未加入任何学校!',
-      myEv:'我发布的评测',
-      teaEv:'任课老师发布的评测'
-  },
+export default {
+    //MgtSchoolEva.vue
+    mgtScEv: {
+        listLabel: '评测列表',
+        period: '学段:',
+        create: '新建',
+        delete: '删除',
+        edit: '编辑',
+        createTime: '施测时间:',
+        pending: '待发布',
+        going: '进行中',
+        finish: '已结束',
+        endTime: '结束时间:',
+        stop: '立即结束',
+        evType: '测试类型:',
+        stuCount: '施测人数:',
+        nodata: '暂无评测',
+        tab1: '评测数据',
+        tab2: '评测试卷',
+        autoTips1: '此功能仅用于展示情景快速模拟学生作答数据,且学生作答为随机生成,仅供参考!',
+        autoTips2: '此功能仅用于展示情景快速模拟教师评分数据,且分数为随机生成,仅供参考!',
+        autoScore: '一键评分',
+        autoAnswer: '一键作答',
+        evSubject: '测试科目:',
+        returnTop: '返回顶部',
+        mockOk: '模拟成功',
+        mockErr: '模拟失败',
+        stopTitle: '结束评测',
+        stopContent: '结束后学生将不能继续作答,是否立即结束',
+        stopOk: '评测已结束!',
+        deleteTitle: '删除评测',
+        deleteContent: '是否确认删除',
+        deleteOk: '删除成功',
+        deleteErr: '删除失败',
+        noJoin: '此账号暂未加入任何学校!',
+        myEv: '我发布的评测',
+        teaEv: '任课老师发布的评测'
+    },
 
 
-  //CreateEv
-  createEv:{
-      createLabel:'创建评测',
-      publishEv:'发布评测',
-      return:'返回上级',
-      baseInfo:'基础信息',
-      evName:'评测名称',
-      evPeriod:'测试学段',
-      evMode:'评测模式',
-      evType:'评测类型',
-      examType:'考试类别',
-      courseType:'课程类别',
-      cusLabel1:'校本课程',
-      cusLabel2:'个人课程',
-      evTarget:'施测对象',
-      publishType:'发布方式',
-      startTime:'开始时间',
-      sTimeHolder:'请选择开始时间',
-      endTime:'结束时间',
-      eTimeHolder:'请选择结束时间',
-      addSubject:'添加学科',
-      noSubject:'暂无科目,请添加科目',
-      noSubject1:'* 请先选择测试学段',
-      papersLabel:'试卷库',
-      perviewLabel:'试卷预览',
-      importLabel:'导入说明',
-      answerPreview:'作答预览',
-      errTips1:'评测名称不能为空!',
-      errTips2:'测试类型不能为空!',
-      errTips3:'评量模式不能为空!',
-      errTips4:'请设置类别!',
-      errTips5:'请设置测试类型!',
-      errTips6:'请设置测试对象!',
-      errTips7:'请设置发布方式!',
-      errTips8:'请设置发布时间!',
-      errTips9:'请设置结束时间!',
-      errTips10:'请设置测试学段!',
-      stPaperTitle:'挑选试卷',
-      stPaperContent:'是否确认挑选',
-      inDev:'功能正在开发中,敬请期待!',
-      formWarning:'请先完善评测基础信息!',
-      paperWarning:'请挑选或导入试卷!',
-      paperWarning1:'还没有试卷,请挑选或导入试卷!',
-      pdWarning:'请添加测试科目!',
-      publishOk:'评测发布成功!',
-      togglePeriod:'切换学段',
-      togglePdTip1:'您已添加',
-      togglePdTip2:'的测试科目,如果现在切换学段会清空已选科目,确定切换学段吗?',
-      toggleOkText:'切换',
-      delPdTitle:'删除科目',
-      delPdContent:'是否确认删除',
-      delOk:'删除成功',
-      pdTips:'请先选择测试学段!',
-      defaultPaper:'(请先挑选或导入试卷)',
-  },
-  // ManualPaper.vue
-  manual:{
-      source:'来源:',
-      sourceP:'个人试卷库',
-      sourceS:'校本试卷库',
-      pdLabel:'学段:',
-      subjectLabel:'学科:',
-      gradeLabel:'年级:',
-      fitPd:'适用学段:',
-      fitSubject:'适用科目:',
-      quCount:'题量:',
-      useCount:'使用次数:',
-      stdPaper:'已选试卷',
-      stPaper:'选择试卷',
-      previewPaper:'预览试卷',
-      noPaper:'暂无对应的试卷',
-      noPaper1:'暂无试卷'
-  },
-  // PaperScore.vue、Scoring.vue
-  score:{
-      stuName:'学生姓名:',
-      score:'总分:',
-      scoreUnit:'分',
-      saveScore:'保存打分',
-      showAns:'显示答案',
-      hideAns:'隐藏答案',
-      showQu:'显示题干',
-      hideQu:'隐藏题干',
-      quIndex:'题号:',
-      quIndex1:'题号',
-      fullScore:'满分',
-      zeroScore:'零分',
-      zeroScore1:'0分',
-      stuAns:'【学 生 作 答】',
-      mark:'批注',
-      quAns:'【答ㅤ案】',
-      noAnswer:'未设置答案',
-      anaLabel:'【解ㅤ析】',
-      noAna:'暂无解析',
-      kdLabel:'【知识点】',
-      noKd:'暂未绑定知识点',
-      sQuLabel1:'【小题',
-      sQuLabel2:'】',
-      quIndexLabel:'【题号',
-      nextStu:'下一位学生>>>',
-      markOk:'批注成功!',
-      markErr:'批注失败!',
-      isFullTips:'已经是小题满分了',
-      isZeroTips:'已经是零分了',
-      saveScoreOk:'成绩保存成功!',
-      saveSocreErr:'成绩保存失败!',
-      zero:'零',
-      one:'一',
-      two:'二',
-      three:'三',
-      four:'四',
-      five:'五',
-      six:'六',
-      seven:'七',
-      eight:'八',
-      nine:'九',
-      ten:'十',
-      hundred:'百',
-      thousand:'千',
-      tenThd:'万',
-      hMillion:'亿',
-      noStuAns:'未作答',
-      noStuAns1:'暂未作答',
-      trueAns:'正确',
-      falseAns:'错误',
-      //Scoring.vue
-      subjectLabel:'学科:',
-      gradeLabel:'年级:',
-      classLabel:'班级:',
-      stuLabel:'学生:',
-      scoreView:'分数概览',
-      scoring:'试卷评分',
-      classNoStu:'班级暂无学生',
-      status1:'暂未作答',
-      status2:'前往评分',
-      status3:'查看分数',
-      column1:'姓名',
-      column2:'总分',
-      column3:'状态',
-      finishScore:'已完成所有学生作答的评分!',
-      unableScore:'学生尚未作答,无法评分',
-      stStuWarning: '请先选择学生!',
-      lastQu: '上一题',
-      nextQu: '下一题',
-  },
+    //CreateEv
+    createEv: {
+        createLabel: '创建评测',
+        publishEv: '发布评测',
+        return: '返回上级',
+        baseInfo: '基础信息',
+        evName: '评测名称',
+        evPeriod: '测试学段',
+        evMode: '评测模式',
+        evType: '评测类型',
+        examType: '考试类别',
+        courseType: '课程类别',
+        cusLabel1: '校本课程',
+        cusLabel2: '个人课程',
+        evTarget: '施测对象',
+        publishType: '发布方式',
+        startTime: '开始时间',
+        sTimeHolder: '请选择开始时间',
+        endTime: '结束时间',
+        eTimeHolder: '请选择结束时间',
+        addSubject: '添加学科',
+        noSubject: '暂无科目,请添加科目',
+        noSubject1: '* 请先选择测试学段',
+        papersLabel: '试卷库',
+        perviewLabel: '试卷预览',
+        importLabel: '导入说明',
+        answerPreview: '作答预览',
+        errTips1: '评测名称不能为空!',
+        errTips2: '测试类型不能为空!',
+        errTips3: '评量模式不能为空!',
+        errTips4: '请设置类别!',
+        errTips5: '请设置测试类型!',
+        errTips6: '请设置测试对象!',
+        errTips7: '请设置发布方式!',
+        errTips8: '请设置发布时间!',
+        errTips9: '请设置结束时间!',
+        errTips10: '请设置测试学段!',
+        stPaperTitle: '挑选试卷',
+        stPaperContent: '是否确认挑选',
+        inDev: '功能正在开发中,敬请期待!',
+        formWarning: '请先完善评测基础信息!',
+        paperWarning: '请挑选或导入试卷!',
+        paperWarning1: '还没有试卷,请挑选或导入试卷!',
+        pdWarning: '请添加测试科目!',
+        publishOk: '评测发布成功!',
+        togglePeriod: '切换学段',
+        togglePdTip1: '您已添加',
+        togglePdTip2: '的测试科目,如果现在切换学段会清空已选科目,确定切换学段吗?',
+        toggleOkText: '切换',
+        delPdTitle: '删除科目',
+        delPdContent: '是否确认删除',
+        delOk: '删除成功',
+        pdTips: '请先选择测试学段!',
+        defaultPaper: '(请先挑选或导入试卷)',
+    },
+    // ManualPaper.vue
+    manual: {
+        source: '来源:',
+        sourceP: '个人试卷库',
+        sourceS: '校本试卷库',
+        pdLabel: '学段:',
+        subjectLabel: '学科:',
+        gradeLabel: '年级:',
+        fitPd: '适用学段:',
+        fitSubject: '适用科目:',
+        quCount: '题量:',
+        useCount: '使用次数:',
+        stdPaper: '已选试卷',
+        stPaper: '选择试卷',
+        previewPaper: '预览试卷',
+        noPaper: '暂无对应的试卷',
+        noPaper1: '暂无试卷'
+    },
+    // PaperScore.vue、Scoring.vue
+    score: {
+        stuName: '学生姓名:',
+        score: '总分:',
+        scoreUnit: '分',
+        saveScore: '保存打分',
+        showAns: '显示答案',
+        hideAns: '隐藏答案',
+        showQu: '显示题干',
+        hideQu: '隐藏题干',
+        quIndex: '题号:',
+        quIndex1: '题号',
+        fullScore: '满分',
+        zeroScore: '零分',
+        zeroScore1: '0分',
+        stuAns: '【学 生 作 答】',
+        mark: '批注',
+        quAns: '【答ㅤ案】',
+        noAnswer: '未设置答案',
+        anaLabel: '【解ㅤ析】',
+        noAna: '暂无解析',
+        kdLabel: '【知识点】',
+        noKd: '暂未绑定知识点',
+        sQuLabel1: '【小题',
+        sQuLabel2: '】',
+        quIndexLabel: '【题号',
+        nextStu: '下一位学生>>>',
+        markOk: '批注成功!',
+        markErr: '批注失败!',
+        isFullTips: '已经是小题满分了',
+        isZeroTips: '已经是零分了',
+        saveScoreOk: '成绩保存成功!',
+        saveSocreErr: '成绩保存失败!',
+        zero: '零',
+        one: '一',
+        two: '二',
+        three: '三',
+        four: '四',
+        five: '五',
+        six: '六',
+        seven: '七',
+        eight: '八',
+        nine: '九',
+        ten: '十',
+        hundred: '百',
+        thousand: '千',
+        tenThd: '万',
+        hMillion: '亿',
+        noStuAns: '未作答',
+        noStuAns1: '暂未作答',
+        trueAns: '正确',
+        falseAns: '错误',
+        //Scoring.vue
+        subjectLabel: '学科:',
+        gradeLabel: '年级:',
+        classLabel: '班级:',
+        stuLabel: '学生:',
+        scoreView: '分数概览',
+        scoring: '试卷评分',
+        classNoStu: '班级暂无学生',
+        status1: '暂未作答',
+        status2: '前往评分',
+        status3: '查看分数',
+        column1: '姓名',
+        column2: '总分',
+        column3: '状态',
+        finishScore: '已完成所有学生作答的评分!',
+        unableScore: '学生尚未作答,无法评分',
+        stStuWarning: '请先选择学生!',
+        lastQu: '上一题',
+        nextQu: '下一题',
+    },
 
 
-  //SimpleAnalysis.vue
-  simple:{
-      total:'总人数',
-      missExam:'缺考数',
-      classLabel:'班级',
-      sjLabel:'学科',
-      avgScore:'平均分',
-      classStuCount:'班级人数',
-      answered:'已作答',
-      unanswer:'未作答',
-      scored:'已评分',
-      unscore:'未评分',
-      noPublish:'评测尚未发布,暂无统计数据',
-      calcing:'成绩数据结算中,',
-      clickFresh:'点此刷新',
-      inCalc:'数据结算中,请稍后查看',
-      total:'总分',
-      avgScore:'均分统计',
-      totalLabel:'总量',
-      scoreMat:'分数段统计'
-  }
+    //SimpleAnalysis.vue
+    simple: {
+        totalPeople: '总人数',
+        missExam: '缺考数',
+        classLabel: '班级',
+        sjLabel: '学科',
+        avgScore: '平均分',
+        classStuCount: '班级人数',
+        answered: '已作答',
+        unanswer: '未作答',
+        scored: '已评分',
+        unscore: '未评分',
+        noPublish: '评测尚未发布,暂无统计数据',
+        calcing: '成绩数据结算中,',
+        clickFresh: '点此刷新',
+        inCalc: '数据结算中,请稍后查看',
+        total: '总分',
+        avgScore: '均分统计',
+        totalLabel: '总量',
+        scoreMat: '分数段统计'
+    }
 }
 }

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

@@ -185,7 +185,7 @@ export default{
 
 
     //SimpleAnalysis.vue
     //SimpleAnalysis.vue
     simple:{
     simple:{
-        total:'总人数',
+        totalPeople:'总人数',
         missExam:'缺考数',
         missExam:'缺考数',
         classLabel:'班级',
         classLabel:'班级',
         sjLabel:'学科',
         sjLabel:'学科',

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

@@ -185,7 +185,7 @@ export default {
 
 
     //SimpleAnalysis.vue
     //SimpleAnalysis.vue
     simple: {
     simple: {
-        total: '總人數',
+        totalPeople: '總人數',
         missExam: '缺考數',
         missExam: '缺考數',
         classLabel: '班級',
         classLabel: '班級',
         sjLabel: '學科',
         sjLabel: '學科',

+ 4 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.less

@@ -59,11 +59,11 @@
             cursor: pointer;
             cursor: pointer;
 
 
             .evaluation-name {
             .evaluation-name {
-                font-size: 20px;
+                font-size: 16px;
             }
             }
 
 
             .evaluation-type {
             .evaluation-type {
-                color: #d9d9d9;
+                color: #AAA;
                 margin-top: 8px;
                 margin-top: 8px;
                 font-size: 12px;
                 font-size: 12px;
             }
             }
@@ -162,7 +162,8 @@
 
 
 .test-paper-detail {
 .test-paper-detail {
     width: 100%;
     width: 100%;
-    height: ~"calc(100% - 45px)";
+    // height: ~"calc(100% - 45px)";
+    height: 100%;
     color: white;
     color: white;
 }
 }
 
 

+ 4 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.less

@@ -58,11 +58,11 @@
             cursor: pointer;
             cursor: pointer;
 
 
             .evaluation-name {
             .evaluation-name {
-                font-size: 20px;
+                font-size: 16px;
             }
             }
 
 
             .evaluation-type {
             .evaluation-type {
-                color: #d9d9d9;
+                color: #AAA;
                 margin-top: 8px;
                 margin-top: 8px;
                 font-size: 12px;
                 font-size: 12px;
             }
             }
@@ -161,7 +161,8 @@
 
 
 .test-paper-detail {
 .test-paper-detail {
     width: 100%;
     width: 100%;
-    height: ~"calc(100% - 45px)";
+    // height: ~"calc(100% - 45px)";
+    height: 100%;
     color: white;
     color: white;
 }
 }
 
 

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/SimpleAnalysis.vue

@@ -6,7 +6,7 @@
                 <span class="count-subject-num">{{examInfo.stuCount}}</span>
                 <span class="count-subject-num">{{examInfo.stuCount}}</span>
                 <span class="count-subject-text">
                 <span class="count-subject-text">
                     <Icon type="ios-people" class="count-icon" />
                     <Icon type="ios-people" class="count-icon" />
-                    {{$t('learnActivity.simple.total')}}
+                    {{$t('learnActivity.simple.totalPeople')}}
                 </span>
                 </span>
             </div>
             </div>
             <!-- 缺考数 -->
             <!-- 缺考数 -->

+ 1 - 1
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less

@@ -88,7 +88,7 @@
         .course-name {
         .course-name {
             font-size: 16px;
             font-size: 16px;
             color: white;
             color: white;
-            font-weight: 600;
+            font-weight: 500;
             margin: 5px 0px;
             margin: 5px 0px;
         }
         }
 
 

+ 1 - 1
TEAMModelOS/ClientApp/src/view/schoolmgmt/SystemSetting/SystemSetting.vue

@@ -941,7 +941,7 @@ export default {
 }
 }
 
 
 .semester-name-label .ivu-input[disabled] {
 .semester-name-label .ivu-input[disabled] {
-    font-size: 20px !important;
+    font-size: 16px !important;
     font-weight: bold;
     font-weight: bold;
     color: white;
     color: white;
 }
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/view/teachcontent/index.less

@@ -227,7 +227,7 @@
 
 
             span {
             span {
                 color: white;
                 color: white;
-                font-size: 18px;
+                font-size: 16px;
                 font-weight: 500;
                 font-weight: 500;
                 /*letter-spacing: 5px;*/
                 /*letter-spacing: 5px;*/
                 margin-left: 18px;
                 margin-left: 18px;

+ 2 - 2
TEAMModelOS/ClientApp/src/view/teachcontent/index.vue

@@ -5,8 +5,8 @@
             <!--文件分类列表-->
             <!--文件分类列表-->
             <div class="content-type-list">
             <div class="content-type-list">
                 <div :class="item.type === activeType ? 'content-type-item content-type-item-active':'content-type-item'" v-for="(item,index) in contentTypeList" :key="index" @click="selectFileType(index)">
                 <div :class="item.type === activeType ? 'content-type-item content-type-item-active':'content-type-item'" v-for="(item,index) in contentTypeList" :key="index" @click="selectFileType(index)">
-                    <Icon v-if="item.icon.indexOf('iconfont') != -1" :custom="item.icon" color="white" size="26" />
-                    <Icon v-else :type="item.icon" color="white" size="26" />
+                    <Icon v-if="item.icon.indexOf('iconfont') != -1" :custom="item.icon" color="white" size="20" />
+                    <Icon v-else :type="item.icon" color="white" size="20" />
                     <span class="content-type-label">{{item.label}}</span>
                     <span class="content-type-label">{{item.label}}</span>
                     <Tooltip transfer theme="light" :content="$t('teachContent.resTips')" :max-width="248" placement="bottom" offset="-20">
                     <Tooltip transfer theme="light" :content="$t('teachContent.resTips')" :max-width="248" placement="bottom" offset="-20">
                         <Icon type="ios-alert-outline" color="#1cc0f3" size="20" v-if="index == 0" style="position:absolute;top:-16px;margin-left:5px;" />
                         <Icon type="ios-alert-outline" color="#1cc0f3" size="20" v-if="index == 0" style="position:absolute;top:-16px;margin-left:5px;" />

+ 0 - 78
TEAMModelOS/Controllers/Common/SurveyController.cs

@@ -27,7 +27,6 @@ using TEAMModelOS.SDK.Models.Cosmos;
 using Azure.Messaging.ServiceBus;
 using Azure.Messaging.ServiceBus;
 using Azure.Storage.Sas;
 using Azure.Storage.Sas;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
-using TEAMModelFunction;
 
 
 namespace TEAMModelOS.Controllers
 namespace TEAMModelOS.Controllers
 {
 {
@@ -486,83 +485,6 @@ namespace TEAMModelOS.Controllers
         }
         }
 
 
 
 
-        /// <summary>
-        /// 问卷记录 当活动没结算且没有BlobUrl时则调用此接口
-        /// </summary>
-        /// <redis>
-        /// {"C":2,"A":2,"other":2}
-        /// </redis>
-        /// <param name="request">
-        /// !"id":"aaaa"
-        /// !"code":"Survey-hbcn"/"code":"Survey-1606285227"
-        /// </param>
-        /// <returns>
-        /// </returns>
-        [ProducesDefaultResponseType]
-        [HttpPost("StuList")]
-        //[AuthToken(Roles = "teacher,student")]
-        public async Task<IActionResult> StuList(JsonElement request)
-        {
-            if (!request.TryGetProperty("id", out JsonElement id))
-            {
-                return BadRequest();
-            }
-            //活动分区
-            if (!request.TryGetProperty("code", out JsonElement code))
-            {
-                return BadRequest();
-            }
-            var client = _azureCosmos.GetCosmosClient();
-            Survey survey = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<Survey>($"{id}", new Azure.Cosmos.PartitionKey($"{code}"));
-           
-            (List<string> tmdids, List<Students> students) = await TriggerStuActivity.GetStuList(client, survey.classes, survey.school);
-            List<StuActivity> stuActivities = new List<StuActivity>();
-            List<StuActivity> tmdActivities = new List<StuActivity>();
-            if (tmdids.IsNotEmpty())
-            {
-                tmdids.ForEach(x => {
-                    tmdActivities.Add(new StuActivity
-                    {
-                        pk = "Activity",
-                        id = survey.id,
-                        code = $"Activity-{x}",
-                        type = "survey",
-                        name = survey.name,
-                        startTime = survey.startTime,
-                        endTime = survey.endTime,
-                        scode = survey.code,
-                        scope = survey.scope,
-                        school = survey.school,
-                        creatorId = survey.creatorId,
-                        subjects = new List<string> { "" }
-
-                    });
-                });
-            }
-            if (students.IsNotEmpty())
-            {
-                students.ForEach(x => {
-                    stuActivities.Add(new StuActivity
-                    {
-                        pk = "Activity",
-                        id = survey.id,
-                        code = $"Activity-{survey.school}-{x.id}",
-                        type = "survey",
-                        name = survey.name,
-                        startTime = survey.startTime,
-                        endTime = survey.endTime,
-                        scode = survey.code,
-                        scope = survey.scope,
-                        school = survey.school,
-                        creatorId = survey.creatorId,
-                        subjects = new List<string> { "" }
-                    });
-                });
-            }
-            await TriggerStuActivity.SaveStuActivity(client, stuActivities, tmdActivities);
-             
-            return Ok(new { tmdids });
-        }
     }
     }
     public class QuestionRecord
     public class QuestionRecord
     {
     {

+ 7 - 5
TEAMModelOS/Controllers/Common/TriggerStuActivity.cs

@@ -13,16 +13,18 @@ using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
 
 
-namespace TEAMModelFunction
+namespace OS.Funct
 {
 {
     public class TriggerStuActivity
     public class TriggerStuActivity
     {
     {
 
 
         public static async Task<string> SaveStuActivity(CosmosClient client,List<StuActivity> stuActivities,List<StuActivity> tmdActivities) {
         public static async Task<string> SaveStuActivity(CosmosClient client,List<StuActivity> stuActivities,List<StuActivity> tmdActivities) {
-            
-            if (stuActivities.IsNotEmpty()) {
-                foreach (var x in stuActivities) {
-                   await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(x,new PartitionKey (x.code));
+
+            if (stuActivities.IsNotEmpty())
+            {
+                foreach (var x in stuActivities)
+                {
+                    await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(x, new PartitionKey(x.code));
                 }
                 }
 
 
 
 

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

@@ -1,12 +1,20 @@
 using Azure.Cosmos;
 using Azure.Cosmos;
+using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using OS.Funct;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Linq;
 using System.Text.Json;
 using System.Text.Json;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Extension;
+using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
+using TEAMModelOS.SDK.Models;
+using TEAMModelOS.SDK.Models.Cosmos.Common;
+
 namespace TEAMModelOS.Controllers.XTest
 namespace TEAMModelOS.Controllers.XTest
 {
 {
     [Route("test")]
     [Route("test")]
@@ -107,5 +115,93 @@ namespace TEAMModelOS.Controllers.XTest
                 return BadRequest(e.StackTrace);
                 return BadRequest(e.StackTrace);
             }
             }
         }
         }
+
+
+        [ProducesDefaultResponseType]
+        //[AuthToken(Roles = "teacher")]
+        [HttpPost("fixExamActivity")]
+        public async Task<IActionResult> ExamActivity(JsonElement request)
+        {
+            
+           var datas = request.ToObject<List<string>>();
+            var client = _azureCosmos.GetCosmosClient();
+
+            var query = $"select  *  from c ";
+            foreach (string data in datas)
+            {
+                List<Vote> votes = new List<Vote>();
+                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
+                    queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Vote-{data}") }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                    {
+                        foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                        {
+                            votes.Add(obj.ToObject<Vote>());
+                        }
+                    }
+                }
+                foreach (var info in votes)
+                {
+                    if (info.id == "b93b0d86-4a26-43bd-bd5c-a2b44a32b362") {
+                        Console.WriteLine("");
+                    }
+                    if (info.classes.IsEmpty())
+                    {
+                        continue;
+                    }
+
+                    (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, info.classes, info.school);
+                    List<StuActivity> stuActivities = new List<StuActivity>();
+                    List<StuActivity> tmdActivities = new List<StuActivity>();
+                    if (tmdids.IsNotEmpty())
+                    {
+                        tmdids.ForEach(x => {
+                            tmdActivities.Add(new StuActivity
+                            {
+                                pk = "Activity",
+                                id = info.id,
+                                code = $"Activity-{x}",
+                                type = "vote",
+                                name = info.name,
+                                startTime = info.startTime,
+                                endTime = info.endTime,
+                                scode = info.code,
+                                scope = info.scope,
+                                school = info.school,
+                                creatorId = info.creatorId,
+                                subjects = new List<string>() { "" },
+                                blob = null
+
+                            });
+                        });
+                    }
+                    if (studentss.IsNotEmpty())
+                    {
+                        studentss.ForEach(x => {
+                            stuActivities.Add(new StuActivity
+                            {
+                                pk = "Activity",
+                                id = info.id,
+                                code = $"Activity-{info.school}-{x.id}",
+                                type = "vote",
+                                name = info.name,
+                                startTime = info.startTime,
+                                endTime = info.endTime,
+                                scode = info.code,
+                                scope = info.scope,
+                                school = info.school,
+                                creatorId = info.creatorId,
+                                subjects = new List<string>() { "" },
+                                blob = null
+                            });
+                        });
+                    }
+                    await TriggerStuActivity.SaveStuActivity(client, stuActivities, tmdActivities);
+                }
+            }
+            return new OkObjectResult(new { });
+        }
     }
     }
 }
 }