瀏覽代碼

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

jeff 1 年之前
父節點
當前提交
de17966257
共有 25 個文件被更改,包括 1405 次插入1224 次删除
  1. 1 1
      TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue
  2. 3 3
      TEAMModelBI/TEAMModelBI.csproj
  3. 3 3
      TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj
  4. 12 13
      TEAMModelOS.SDK/Helper/Common/ReflectorExtensions/ObjectCopyConvert.cs
  5. 90 12
      TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs
  6. 1 0
      TEAMModelOS.SDK/Models/Cosmos/Teacher/Teacher.cs
  7. 39 1
      TEAMModelOS.SDK/Models/Service/Common/ActivityService.cs
  8. 3 0
      TEAMModelOS.SDK/Models/Service/Common/TeacherService.cs
  9. 1 1
      TEAMModelOS.SDK/Models/Service/IESActivityService.cs
  10. 3 3
      TEAMModelOS.SDK/TEAMModelOS.SDK.csproj
  11. 1 1
      TEAMModelOS/ClientApp/src/common/BaseLayout.vue
  12. 12 8
      TEAMModelOS/ClientApp/src/view/assessment/ArtAssessment.vue
  13. 1 1
      TEAMModelOS/ClientApp/src/view/dashboard/school/SchoolDashboard.vue
  14. 45 75
      TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue
  15. 105 5
      TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/ruleDrawer.vue
  16. 200 216
      TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/skContent.vue
  17. 67 400
      TEAMModelOS/ClientApp/src/view/signupActivity/infoGoing.vue
  18. 79 83
      TEAMModelOS/ClientApp/src/view/signupActivity/infoReleased.vue
  19. 1 1
      TEAMModelOS/ClientApp/src/view/signupActivity/processActivity.vue
  20. 22 3
      TEAMModelOS/Controllers/Analysis/ClassAnalysisController.cs
  21. 710 385
      TEAMModelOS/Controllers/Common/ActivityController.cs
  22. 0 3
      TEAMModelOS/Controllers/Common/ArtController.cs
  23. 4 4
      TEAMModelOS/TEAMModelOS.csproj
  24. 1 1
      TEAMModelOS/appsettings.Development.json
  25. 1 1
      TEAMModelOS/appsettings.json

+ 1 - 1
TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue

@@ -2122,7 +2122,7 @@ export default {
           schoolDeatils.value.versions = ''
           anSchool.value.teachNum = res.scStats.tch
           anSchool.value.studentNum = res.scStats.stu
-          anSchool.value.classNum = res.scStats.room
+          anSchool.value.classNum = res.scStats.witRoom
           anSchool.value.classInfoNum = res.scStats.lessStats.all
           detailsLoding.value.header = false
           //处理柱状图

+ 3 - 3
TEAMModelBI/TEAMModelBI.csproj

@@ -65,9 +65,9 @@
 		<SpaRoot>ClientApp\</SpaRoot>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-		<Version>5.2312.13</Version>
-		<AssemblyVersion>5.2312.13.1</AssemblyVersion>
-		<FileVersion>5.2312.13.1</FileVersion>
+		<Version>5.2312.20</Version>
+		<AssemblyVersion>5.2312.20.1</AssemblyVersion>
+		<FileVersion>5.2312.20.1</FileVersion>
 		<Description>TEAMModelBI(BI)</Description>
 		<PackageReleaseNotes>BI版本说明版本切换标记2022000908</PackageReleaseNotes>
 		<PackageId>TEAMModelBI</PackageId>

+ 3 - 3
TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj

@@ -5,9 +5,9 @@
 		<OutputType>Exe</OutputType>
 		<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
 		<SignAssembly>true</SignAssembly>
-		<Version>5.2312.13</Version>
-		<AssemblyVersion>5.2312.13.1</AssemblyVersion>
-		<FileVersion>5.2312.13.1</FileVersion>
+		<Version>5.2312.20</Version>
+		<AssemblyVersion>5.2312.20.1</AssemblyVersion>
+		<FileVersion>5.2312.20.1</FileVersion>
 		<PackageId>TEAMModelOS.FunctionV4</PackageId>
 		<Authors>teammodel</Authors>
 		<Company>醍摩豆(成都)信息技术有限公司</Company>

+ 12 - 13
TEAMModelOS.SDK/Helper/Common/ReflectorExtensions/ObjectCopyConvert.cs

@@ -1,12 +1,8 @@
 using HTEXLib.COMM.Helpers;
-using Microsoft.IdentityModel.Tokens;
-using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
-using System.Text;
 using System.Text.Json;
-using System.Threading.Tasks;
 using TEAMModelOS.SDK.Extension;
 
 namespace SDK.Helpers
@@ -20,7 +16,8 @@ namespace SDK.Helpers
         /// <param name="json"></param>
         /// <param name="target"></param>
         /// <param name="filter">只修改部分指定的属性</param>
-        public static void CopyToSameProperty<ST>(this JsonElement json, ST target, List<string>? filter = null) {
+        public static void CopyToSameProperty<ST>(this JsonElement json, ST target, List<string>? filter = null)
+        {
             ST? source = json.ToObject<ST>();
             PropertyInfo[] sourceProperties = source!.GetType().GetProperties();
             PropertyInfo[] targetProperties = target!.GetType().GetProperties();
@@ -40,7 +37,7 @@ namespace SDK.Helpers
                         //驼峰命名,首字母小写
                         || json.TryGetProperty($"{sourceProperty.Name.Substring(0, 1).ToLower()}{sourceProperty.Name.Substring(1)}", out temp))
                     {
-                        if (filter.IsEmpty())
+                        if (!filter.IsNotEmpty())
                         {
                             //只要传递了值才会运行此处
                             targetProperty.SetValue(target, sourceProperty.GetValue(source));
@@ -73,14 +70,14 @@ namespace SDK.Helpers
         /// <param name="filter"></param>
         public static void CopyToSameProperty<S, T>(this JsonElement json, T target, List<string>? filter = null)
         {
-            S? source=json.ToObject<S>();
+            S? source = json.ToObject<S>();
             PropertyInfo[] sourceProperties = source!.GetType().GetProperties();
             PropertyInfo[] targetProperties = target!.GetType().GetProperties();
 
             foreach (PropertyInfo sourceProperty in sourceProperties)
             {
                 //数据类型相同,属性名称相同,可能存在赋值关系。
-                PropertyInfo? targetProperty = targetProperties.FirstOrDefault(p => p.Name == sourceProperty.Name  && p.PropertyType==sourceProperty.PropertyType );
+                PropertyInfo? targetProperty = targetProperties.FirstOrDefault(p => p.Name == sourceProperty.Name  && p.PropertyType==sourceProperty.PropertyType);
                 var data_source = sourceProperty.GetValue(source);
                 if (targetProperty != null && sourceProperty.GetValue(source) != null)
                 {
@@ -92,25 +89,27 @@ namespace SDK.Helpers
                         //驼峰命名,首字母小写
                         || json.TryGetProperty($"{sourceProperty.Name.Substring(0, 1).ToLower()}{sourceProperty.Name.Substring(1)}", out temp))
                     {
-                        if (filter.IsEmpty())
+                        if (!filter.IsNotEmpty())
                         {
                             //只要传递了值才会运行此处
                             targetProperty.SetValue(target, sourceProperty.GetValue(source));
                         }
-                        else {
+                        else
+                        {
                             if (filter!.Contains(targetProperty.Name))
                             {
                                 targetProperty.SetValue(target, sourceProperty.GetValue(source));
                             }
                         }
                     }
-                    else {
-                       // Console.WriteLine("默认值,如数字,bool类型下的默认值");
+                    else
+                    {
+                        // Console.WriteLine("默认值,如数字,bool类型下的默认值");
                     }
                     //var json=  sourceProperty.GetValue(source)!.ToJsonString().ToObject<JsonElement>();
                     //判断数字类型,如果前后数字相同,则不赋值,防止出现0这种。
                     //判断True ,如果相同,也不赋值,防止出现
-                   
+
                 }
             }
         }

+ 90 - 12
TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs

@@ -90,11 +90,30 @@ namespace TEAMModelOS.SDK.Models
         public int publish { get; set; }
 
     }
+
+    public record ActivityUpdate {
+        public string name { get; set; }
+        public string subject { get; set; }
+        public string description { get; set; }
+        public string address { get; set; }
+        public long stime { get; set; }
+        public long etime { get; set; }
+        public string poster { get; set; }
+        public List<Attachment> attachment { get; set; } = new List<Attachment>();
+        public List<string> zb { get; set; } = new List<string>();
+        public List<string> cb { get; set; } = new List<string>();
+        /// <summary>
+        /// 免责声明
+        /// </summary>
+        public string mzsm { get; set; }
+    }
     public class ActivityDto : Activity
     {
         public string sas { get; set; }
     }
-
+    /// <summary>
+    /// Normal  分站
+    /// </summary>
     public class ActivityWebsite : CosmosEntity {
         // id(区级id,校级id)
         //code:ActivityWebsite
@@ -221,7 +240,7 @@ namespace TEAMModelOS.SDK.Models
     }
 
     /// <summary>
-    /// //赛课模块的数据结构
+    /// //赛课模块的数据结构, Common
     /// </summary>
     public class Contest : CosmosEntity
     {
@@ -348,6 +367,29 @@ namespace TEAMModelOS.SDK.Models
         public int upsertAsTemplate { get; set; } = 0;
         public string sourceName { get; set; }
         public List<RuleConfigTree> trees { get; set; }
+        /// <summary>
+        /// 一个作品需要被评审多少次,作品被分配给多少个专家评审
+        /// </summary>
+        public int taskCount { get; set; }
+        /// <summary>
+        /// 统分规则 
+        /// only        分配一次的情况直接获取分数=1
+        /// avg         按平均分,>=2
+        /// top         按最高分,>=2
+        /// rmLowAvg    去掉最低分的平均分(分配次数至少3次)>=3
+        /// rmTopAvg    去掉最高分的平均分(分配次数至少3次),>=3
+        /// rmLowTopAvg 去掉最高分和最低分的平均分(分配次数至少4次)>=4
+        /// </summary>
+        public string scoreRule { get; set; }
+
+        /// <summary>
+        /// 作品分配匹配规则(专家的 学段,学科是否与报名教师填写的学段学科匹配) 
+        /// none            不需要匹配,
+        /// period          只匹配学段,
+        /// subject         只匹配学科,不分学段,
+        /// periodAndSubject同时匹配学科和学段
+        /// </summary>
+        public string distribute { get; set; }
 
     }
     public class RuleConfigTree : RuleConfig
@@ -355,6 +397,26 @@ namespace TEAMModelOS.SDK.Models
 
         public List<RuleConfigTree> children { get; set; } = new List<RuleConfigTree>();
     }
+    //public class ContestUpdate {
+    //    public long signStime { get; set; }
+    //    public long signEtime { get; set; }
+    //    /// <summary>
+    //    /// //报名人数限制
+    //    /// </summary>
+    //    public int limit { get; set; }
+    //    public long uploadStime { get; set; }
+    //    public long uploadEtime { get; set; }
+    //    public string desc { get; set; }
+    //    /// <summary>
+    //    /// ["file"], 提交作品的格式
+    //    /// </summary>
+    //    public List<string> fileType { get; set; } = new List<string>();
+    //    public long reviewStime { get; set; }
+    //    public long reviewEtime { get; set; }
+    //    public long scoreStime { get; set; }
+    //    public long scoreEtime { get; set; }
+    //}
+
     public class ContestUpload
     {
         public long stime { get; set; }
@@ -376,7 +438,7 @@ namespace TEAMModelOS.SDK.Models
     public class ContestSign
     {
 
-        public List<string> field { get; set; } = new List<string>();
+        //public List<string> field { get; set; } = new List<string>();
         /// <summary>
         /// 报名类型,0个人,1团队
         /// </summary>
@@ -387,6 +449,9 @@ namespace TEAMModelOS.SDK.Models
         /// //报名人数限制
         /// </summary>
         public int limit { get; set; }
+        /// <summary>
+        /// 表单
+        /// </summary>
 
         public List<ContestSignField> fields { get; set; } = new List<ContestSignField>();
     }
@@ -668,8 +733,6 @@ namespace TEAMModelOS.SDK.Models
         /// 表单填报信息
         /// </summary>
         public List<EnrollInfo> enrollInfos { get; set; } = new List<EnrollInfo>();
-
-
     }
 
     public class TeacherEnrollContestDto
@@ -756,6 +819,18 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public string uploadId { get; set; }
         /// <summary>
+        /// 个人:{schoolName}-{tmdname},团队{teamname!=""?{schoolName}-{teamname}:{schoolName}-{tmdname}}({members.count()})
+        /// </summary>
+        public string name { get; set; }
+        /// <summary>
+        /// sokrates 苏格拉底 ,file 作品
+        /// </summary>
+        public List<string> uploadTypes { get; set; } = new List<string>();
+        /// <summary>
+        /// 上传文件和苏格拉底链接的数量
+        /// </summary>
+        public int count { get; set; }
+        /// <summary>
         /// 组队口令
         /// </summary>
         public string cipher { get; set; }
@@ -771,7 +846,7 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         /// 队员醍摩豆id ,包含队长,id,name(填报信息的name,真实姓名),code ,nickname 醍摩豆名称
         /// </summary>
-        public List<IdNameCode> members { get; set; }
+        public List<IdNameCode> members { get; set; } = new List<IdNameCode>();
         /// <summary>
         /// 如果是个人组,则是个人的tmdid, 如果是团队组,则是队长的tmdid
         /// </summary>
@@ -780,7 +855,7 @@ namespace TEAMModelOS.SDK.Models
         //public string picture { get; set; }
         //public string nickname { get; set; }
         /// <summary>
-        /// 评分状态
+        /// 评分状态 -1 未评分,1已评分。
         /// </summary>
         public int status { get; set; } = -1;
         public double score { get; set; } = -1;
@@ -789,18 +864,21 @@ namespace TEAMModelOS.SDK.Models
     
     public class ExpertDto : Expert
     {
+      
         /// <summary>
-        /// 任务数量
+        /// 任务数量,-1未分配任务
         /// </summary>
-        public int taskCount {  get; set; }
+        public int taskCount { get; set; } = -1;
         /// <summary>
-        /// 完成数量
+        /// 完成数量,-1未分配任务
         /// </summary>
-        public int completeCount {  get; set; }
+        public int completeCount { get; set; } = -1;
         /// <summary>
         /// 
         /// </summary>
-        public int teacherCount { get; set; }
+        public int teacherCount { get; set; } = -1;
+
+        public List<IdCodeCount> uploads { get; set; } = new List<IdCodeCount>();
 
     }
 

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Teacher/Teacher.cs

@@ -51,6 +51,7 @@ namespace TEAMModelOS.SDK.Models
             public long time { get; set; }
             public string picture { get; set; }
             public string areaId { get; set; }
+            public List<string> roles { get; set; } = new List<string>();
         }
         public class TeacherArea
         {

+ 39 - 1
TEAMModelOS.SDK/Models/Service/Common/ActivityService.cs

@@ -4,6 +4,7 @@ using Azure.Storage.Sas;
 using HTEXLib.COMM.Helpers;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Text;
 using System.Text.Json;
@@ -12,11 +13,45 @@ using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.Services;
+using Activity = TEAMModelOS.SDK.Models.Activity;
 
 namespace TEAMModelOS.SDK
 {
     public static class ActivityService
     {
+
+        /// <summary>
+        /// 删除活动关联的数据
+        /// </summary>
+        /// <param name="_azureCosmos"></param>
+        /// <param name="activity"></param>
+        /// <returns></returns>
+        public static async Task DeleteActivityRelated(AzureCosmosFactory _azureCosmos,Activity activity)
+        {
+            //删除模块,Contest, Training ,Research, ReviewRule规则(ReviewRule-disposable"; 存为活动)
+            await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).DeleteItemStreamAsync(activity.id, new PartitionKey("Contest"));
+            await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).DeleteItemStreamAsync(activity.id, new PartitionKey("Training"));
+            await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).DeleteItemStreamAsync(activity.id, new PartitionKey("Research"));
+            await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).DeleteItemStreamAsync(activity.id, new PartitionKey("ReviewRule-disposable"));
+            //删除邀请教师 ActivityTeacher,
+            var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+               .GetList<IdCode>("select c.id ,c.code from c where c.pk='ActivityEnroll' and c.", $"ActivityTeacher-{activity.id}");
+            if (resultTeacher.list.IsNotEmpty())
+            {
+                await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).DeleteItemsStreamAsync(resultTeacher.list.Select(z => z.id).ToList(), $"ActivityTeacher-{activity.id}");
+            }
+            //删除报名数据 ActivityEnroll
+            var resultEnroll = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
+                .GetList<IdCode>("select c.id ,c.code from c where c.pk='ActivityEnroll' and c.", $"ActivityEnroll-{activity.id}");
+            if (resultEnroll.list.IsNotEmpty())
+            {
+                await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).DeleteItemsStreamAsync(resultEnroll.list.Select(z => z.id).ToList(), $"ActivityEnroll-{activity.id}");
+            }
+            //删除专家数据 ActivityExpert
+            await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).DeleteItemStreamAsync(activity.id, new PartitionKey("ActivityExpert"));
+        }
+
+
         /// <summary>
         /// 生成组队口令
         /// </summary>
@@ -171,7 +206,10 @@ namespace TEAMModelOS.SDK
                 owner=activity.owner,
                 type="disposable",
                 configs=nodes,
-                sourceName=activity.name
+                sourceName=activity.name,
+                taskCount=reviewRuleTree.taskCount,
+                scoreRule=reviewRuleTree.scoreRule,
+                distribute=reviewRuleTree.distribute
             };
             await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS,Constant.Normal).UpsertItemAsync(reviewRule,new Azure.Cosmos.PartitionKey(reviewRule.code));
             if (reviewRuleTree.upsertAsTemplate==1) {

+ 3 - 0
TEAMModelOS.SDK/Models/Service/Common/TeacherService.cs

@@ -358,6 +358,7 @@ namespace TEAMModelOS.Services
                             {
                                 var jsonDoc = await JsonDocument.ParseAsync(sctch.ContentStream);
                                 SchoolTeacher schoolTeacher = jsonDoc.RootElement.ToObject<SchoolTeacher>();
+                                sc.roles=schoolTeacher.roles;
                                 if (schoolTeacher.name == null || schoolTeacher.picture == null || !schoolTeacher.name.Equals($"{name}") || !schoolTeacher.picture.Equals($"{picture}"))
                                 {
                                     schoolTeacher.name = $"{name}";
@@ -379,6 +380,8 @@ namespace TEAMModelOS.Services
                             //{
                             //    await TmdUserService.JoinSchool(client, teacher.id, teacher.picture, teacher.name, sc.schoolId, sc.name);
                             //}
+
+                            schoolExtobj.roles= sc.roles;
                             schools.Add(schoolExtobj);
                         }
                     }

+ 1 - 1
TEAMModelOS.SDK/Models/Service/IESActivityService.cs

@@ -634,7 +634,7 @@ namespace TEAMModelOS.SDK
 
                 if (tasks.Count > 0)
                 {
-                    await tasks.TaskPage(50);
+                    await tasks.TaskPage(10);
                 }
             }
             catch (Exception ex)

+ 3 - 3
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -2,9 +2,9 @@
 
   <PropertyGroup>
     <TargetFramework>net6.0</TargetFramework>
-    <Version>5.2312.13</Version>
-    <AssemblyVersion>5.2312.13.1</AssemblyVersion>
-    <FileVersion>5.2312.13.1</FileVersion>
+    <Version>5.2312.20</Version>
+    <AssemblyVersion>5.2312.20.1</AssemblyVersion>
+    <FileVersion>5.2312.20.1</FileVersion>
     <PackageReleaseNotes>发版</PackageReleaseNotes>
   </PropertyGroup>
 

+ 1 - 1
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -754,7 +754,7 @@
 									permission: "dashboard-read",
 									menuName: "dashCenter",
 									child: [],
-									isShow: true,
+									isShow: this.IES5Menu,
 								},
 								// 学校管理
 								{

+ 12 - 8
TEAMModelOS/ClientApp/src/view/assessment/ArtAssessment.vue

@@ -416,7 +416,7 @@ export default {
       rateTips: [],
       scoreArr: [],
       checkQuotaIdArr: [],
-      continueToken: null
+      continuationToken: null
     }
   },
   created() {
@@ -553,21 +553,21 @@ export default {
     },
     /* 班级切换 */
     onClassChange(val) {
-      this.continueToken = null
+      this.continuationToken = null
       this.assessmentList = [];
       this.originList = []
       this.doFilter()
     },
     /* 科目切换 */
     onSubjectChange() {
-      this.continueToken = null
+      this.continuationToken = null
       this.assessmentList = [];
       this.originList = []
       this.doFilter()
     },
     /* 搜索名称 */
     onSearch() {
-      this.continueToken = null
+      this.continuationToken = null
       this.assessmentList = [];
       this.originList = []
       this.doFilter()
@@ -583,11 +583,11 @@ export default {
         "subjects": [this.subjectList[this.curSubjectIndex].id],
         "classIds": this.curClassId === 'all' ? [] : [this.curClassId],
         "studentName": this.searchVal,
-        // "continueToken": this.continueToken
+        "continuationToken": this.continuationToken
       }).then(res => {
         if (!res.error) {
           let stuResults = res.results
-          this.continueToken = res.continuationToken
+          this.continuationToken = res.continuationToken
           this.tableLoading = false
           this.assessmentList = this.assessmentList.concat(stuResults)
           this.originList = this._.cloneDeep(this.assessmentList)
@@ -753,13 +753,17 @@ export default {
       let clientHeight = document.getElementsByClassName('ivu-table-body')[0].clientHeight;
       let scrollHeight = document.getElementsByClassName('ivu-table-body')[0].scrollHeight;
       if (scrollTop + clientHeight === scrollHeight) {//判断滚动条是否滚动到底部
-        this.doFilter()
+        if(this.continuationToken){
+          this.doFilter()
+        }else{
+          this.$Message.warning('没有更多了')
+        }
       }
     },
 
   },
   mounted() {
-    // document.getElementsByClassName('ivu-table-body')[0].addEventListener('scroll', this.myScroll);
+    document.getElementsByClassName('ivu-table-body')[0].addEventListener('scroll', this.myScroll);
   },
   computed: {
     /* 是否可以手动打分 */

+ 1 - 1
TEAMModelOS/ClientApp/src/view/dashboard/school/SchoolDashboard.vue

@@ -669,7 +669,7 @@ export default {
                 this.schoolDeatils.picture=school.picture
                 this.anSchool.teachNum=scStats.tch
                 this.anSchool.studentNum=scStats.stu
-                this.anSchool.classNum=scStats.room
+                this.anSchool.classNum=scStats.witRoom
                 this.anSchool.classInfoNum=lessonStats.resourcesCount
                 //header data
                 this.classroomsData.attend[0].value=lessonStats.cnt

+ 45 - 75
TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue

@@ -65,7 +65,7 @@
                         <FormItem label="报名" prop="joinMode">
                             <RadioGroup v-model="createData.joinMode">
                                 <Radio label="enroll">{{ '报名制' }}</Radio>
-                                <Radio label="invite">{{ '邀请制' }}</Radio>
+                                <Radio label="invite" :disabled="createData.scope === 'public' && !selSchools.length">{{ '邀请制' }}</Radio>
                                 <span v-show="createData.joinMode === 'invite'" v-if="isArea">
                                     <Icon type="md-alert" color="#ffad16" size="18" />
                                     由学校选择老师参与活动
@@ -160,13 +160,13 @@
                                         </div>
                                     </div>
                                     <div class="content-box">
-                                        <p>
+                                        <!-- <p>
                                             <Checkbox v-model="skWork" @on-change="contestChange('upload', skWork)">上传作品</Checkbox>
-                                        </p>
+                                        </p> -->
                                         <div v-show="skWork">
                                             <Form ref="contestUpload" :model="contestUpload" :rules="contestRuleUpload" :label-width="80">
                                                 <FormItem label="上传时间" prop="stime">
-                                                    <DatePicker v-model="actAllTime[2]" :editable="false" :options="beforeAct" @on-change="getWorkTime" type="datetimerange" format="yyyy-MM-dd HH:mm" :placeholder="$t('train.create.timeHolder')" style="width: 500px"></DatePicker>
+                                                    <DatePicker v-model="actAllTime[2]" ref="workPicker" :editable="false" :options="beforeAct" @on-change="getWorkTime" type="datetimerange" format="yyyy-MM-dd HH:mm" :placeholder="$t('train.create.timeHolder')" style="width: 500px"></DatePicker>
                                                 </FormItem>
                                                 <FormItem label="作品类型">
                                                     <RadioGroup v-model="contestUpload.type">
@@ -208,7 +208,9 @@
                                         <div v-show="skReview">
                                             <Form ref="contestReview" :model="contestReview" :rules="contestRuleReview" :label-width="80">
                                                 <FormItem label="评审时间" prop="stime">
-                                                    <DatePicker v-model="actAllTime[3]" :editable="false" :options="beforeAct" @on-change="getReviewTime" type="datetimerange" format="yyyy-MM-dd HH:mm" :placeholder="$t('train.create.timeHolder')" transfer style="width: 500px"></DatePicker>
+                                                    <DatePicker v-model="actAllTime[3]" ref="reviewPicker" :editable="false" :options="beforeAct" type="datetimerange" format="yyyy-MM-dd HH:mm"
+                                                        :placeholder="$t('train.create.timeHolder')" transfer style="width: 500px" @on-change="getReviewTime">
+                                                    </DatePicker>
                                                 </FormItem>
                                                 <FormItem label="评审规则" prop="rule">
                                                     <Select v-model="reviewSel" transfer style="width: calc(100% - 30px);" clearable>
@@ -228,12 +230,13 @@
                                     </div>
                                     <div class="content-box">
                                         <p>
-                                            <Checkbox v-model="skPublic" @on-change="contestChange('score', skPublic)">成绩公示</Checkbox>
+                                            <Checkbox v-model="skPublic" :disabled="!skReview" @on-change="contestChange('score', skPublic)">成绩公示</Checkbox>
+                                            <span v-show="!skReview" style="color: #cd0000; font-size: 13px;">请先勾选作品评审</span>
                                         </p>
                                         <div v-show="skPublic">
                                             <Form ref="contestScore" :model="contestScore" :rules="contestRuleUpload" :label-width="80">
                                                 <FormItem label="公示时间" prop="stime">
-                                                    <DatePicker v-model="actAllTime[4]" :editable="false" :options="beforeAct" @on-change="getPublicTime" type="datetimerange" format="yyyy-MM-dd HH:mm" :placeholder="$t('train.create.timeHolder')" transfer style="width: 500px"></DatePicker>
+                                                    <DatePicker v-model="actAllTime[4]" ref="scorePicker" :editable="false" :options="beforeAct" @on-change="getPublicTime" type="datetimerange" format="yyyy-MM-dd HH:mm" :placeholder="$t('train.create.timeHolder')" transfer style="width: 500px"></DatePicker>
                                                 </FormItem>
                                             </Form>
                                         </div>
@@ -521,7 +524,7 @@ export default {
             },
             actAllTime: [[], [], [], [], []],
             contestData: {
-                modules: ['sign'],
+                modules: ['sign', 'upload'],
                 sign: {
                     fields: [], //填报信息
                     stime: '',
@@ -569,7 +572,7 @@ export default {
                 stime: '',
                 etime: '',
             },
-            skWork: false,
+            skWork: true,
             skReview: false,
             skPublic: false,
             allSchools: [], //所有学校
@@ -774,7 +777,7 @@ export default {
                         modules: [], //Contest/赛课活动 Training/教培活动 Research/教研活动
                     }
                     this.contestData = {
-                        modules: ['sign'],
+                        modules: ['sign', 'upload'],
                         sign: {
                             fields: [], //填报信息
                             stime: '',
@@ -1187,6 +1190,16 @@ export default {
             let workTime = data.filter(item => {
                 return item
             })
+            if(workTime.length > 1 && !this.contestData.sign.etime) {
+                this.$refs.workPicker[0].handleClear()
+                this.$Message.warning('请先设置报名时间')
+                return
+            }
+            if(workTime.length > 1 && (new Date(workTime[1])).getTime() < this.contestData.sign.etime) {
+                this.$refs.workPicker[0].handleClear()
+                this.$Message.warning('上传结束时间不能早于报名时间')
+                return
+            }
             this.contestUpload.stime = workTime.length > 1 ? (new Date(workTime[0])).getTime() : null
             this.contestUpload.etime = workTime.length > 1 ? (new Date(workTime[1])).getTime() : null
         },
@@ -1195,6 +1208,16 @@ export default {
             let reviewTime = data.filter(item => {
                 return item
             })
+            if(reviewTime.length > 1 && (!this.contestData.sign.etime || !this.contestUpload.etime)) {
+                this.$refs.reviewPicker[0].handleClear()
+                this.$Message.warning('请先设置报名时间、上传时间')
+                return
+            }
+            if(reviewTime.length > 1 && ((new Date(reviewTime[0])).getTime() < this.contestData.sign.etime || (new Date(reviewTime[0])).getTime() < this.contestUpload.etime)) {
+                this.$refs.reviewPicker[0].handleClear()
+                this.$Message.warning('评审必须在报名、上传结束后进行')
+                return
+            }
             this.contestReview.stime = reviewTime.length > 1 ? (new Date(reviewTime[0])).getTime() : null
             this.contestReview.etime = reviewTime.length > 1 ? (new Date(reviewTime[1])).getTime() : null
         },
@@ -1203,6 +1226,16 @@ export default {
             let publicTime = data.filter(item => {
                 return item
             })
+            if(publicTime.length > 1 && !this.contestReview.etime) {
+                this.$refs.scorePicker[0].handleClear()
+                this.$Message.warning('请先设置评审时间')
+                return
+            }
+            if(publicTime.length > 1 && (new Date(publicTime[0])).getTime() < this.contestReview.etime) {
+                this.$refs.scorePicker[0].handleClear()
+                this.$Message.warning('公示必须在评审结束后进行')
+                return
+            }
             this.contestScore.stime = publicTime.length > 1 ? (new Date(publicTime[0])).getTime() : null
             this.contestScore.etime = publicTime.length > 1 ? (new Date(publicTime[1])).getTime() : null
         },
@@ -1355,8 +1388,9 @@ export default {
                 this.contestData.modules.push(modules)
             } else {
                 this.contestData.modules = this.contestData.modules.filter(item => {
-                    return item != modules
+                    return modules === 'review' ? item != modules && item != 'score' : item != modules
                 })
+                if(modules === 'review') this.skPublic = false
             }
         },
         // 编辑评审规则
@@ -1430,70 +1464,6 @@ export default {
 @import "./createActivity.less";
 </style>
 <style lang="less">
-.rule-header {
-    height: 40px;
-    line-height: 40px;
-    margin-top: 10px;
-    margin-bottom: 2px;
-    padding: 0 10px;
-    padding-left: 25px;
-    display: flex;
-    background: rgba(56,114,235,.1);
-    span {
-        display: block;
-        font-weight: 600;
-    }
-    &>span:first-child {
-        width: 21%;
-    }
-    span:nth-child(2) {
-        width: 66%;
-        padding-left: 5px;
-    }
-    span:nth-child(3) {
-        width: 10%;
-        padding-left: 10px;
-    }
-    span:nth-child(4) {
-        width: 12%;
-        padding-left: 10px;
-    }
-}
-
-.rule-box {
-    .edit-title {
-        display: flex;
-        align-items: center;
-        margin-bottom: 10px;
-
-        &>span {
-            width: 100px;
-            text-align: right;
-        }
-    }
-}
-.el-tree-node__content {
-    height: 40px;
-}
-.custom-tree-node {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    width: 100%;
-    .ivu-input-wrapper,
-    .ivu-input-number {
-        margin-right: 10px;
-    }
-}
-
-.see-rule .custom-tree-node {
-    // font-size: 15px;
-
-    &>div:first-child {
-        font-size: 16px;
-    }
-}
-
 .review-sel {
     .ivu-icon {
         margin-left: 7px;

+ 105 - 5
TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/ruleDrawer.vue

@@ -14,14 +14,16 @@
                     <el-tree :data="ruleInfo.trees" node-key="id" default-expand-all :expand-on-click-node="false">
                         <div class="custom-tree-node" slot-scope="{ data }">
                             <div style="width: 275px;">{{ data.label }}</div>
-                            <div style="width: 100%;">{{ data.desc }}</div>
-                            <div style="width: 150px;">{{ data.score }}</div>
+                            <div style="width: 100%; white-space: normal; word-break: break-word; margin-right: 20px;">
+                                <span>{{ data.desc }}</span>
+                            </div>
+                            <div style="width: 150px; font-size: 20px;">{{ data.score }}</div>
                         </div>
                     </el-tree>
                 </div>
             </div>
             <template v-else>
-                <Form :model="ruleInfo" :label-width="80" class="create-form">
+                <Form :model="ruleInfo" :label-width="80" class="create-form light-iview-form">
                     <FormItem label="规则名称">
                         <Input v-special-char v-model="ruleInfo.name" placeholder="请输入规则名称" />
                     </FormItem>
@@ -80,7 +82,7 @@ export default {
         // 0(展示) 1(编辑) 2(新增)
         ruleDrawerAdd: {
             type: Number,
-            default: 0,
+            default: -1,
         },
         // 新增则传活动名称
         ruleInfoParent: {
@@ -96,10 +98,20 @@ export default {
         }
     },
     created () {
+        this.ruleInfo = this.ruleDrawerAdd === 2 && !this.ruleInfoParent?.id ? {
+            name: '',
+            desc: null,
+            owner: this.isArea ? this.areaId : this.$store.state.userInfo.schoolCode,
+            sourceName: this.ruleInfoParent?.name,
+            upsertAsTemplate: 0, //是否存为模板 0否  1是
+            trees: this.dataRuleMould,
+            isAdd: true, //判断是否为新增
+        } : this.ruleInfoParent
     },
     watch: {
         ruleDrawerAdd: {
             handler(n, o) {
+                console.log('00000000');
                 this.ruleInfo = n === 2 && !this.ruleInfoParent?.id ? {
                     name: '',
                     desc: null,
@@ -113,6 +125,7 @@ export default {
         },
         ruleInfoParent: {
             handler(n, o) {
+                console.log('11111111');
                 this.ruleInfo = this.ruleDrawerAdd === 2 && !n?.id ? {
                     name: '',
                     desc: null,
@@ -241,5 +254,92 @@ export default {
 }
 </script>
 
-<style>
+<style lang="less" scoped>
+.create-form {
+    margin: 30px 30px 30px 10px;
+    // height: 100%;
+
+    .tab-check {
+        margin-bottom: 15px;
+
+        .file-box {
+            display: flex;
+
+            &>label {
+                width: 100px;
+
+            }
+        }
+    }
+
+    .unit-box {
+        position: relative;
+
+        .ivu-icon-md-add-circle {
+            position: absolute;
+            top: 6px;
+            right: 0;
+        }
+
+        .ivu-icon {
+            margin-left: 10px;
+            cursor: pointer;
+        }
+    }
+}
+</style>
+<style lang="less">
+.rule-header {
+    height: 40px;
+    line-height: 40px;
+    margin-top: 10px;
+    margin-bottom: 2px;
+    padding: 0 10px;
+    padding-left: 25px;
+    display: flex;
+    background: rgba(56,114,235,.1);
+    span {
+        display: block;
+        font-weight: 600;
+    }
+    &>span:first-child {
+        width: 21%;
+    }
+    span:nth-child(2) {
+        width: 66%;
+        padding-left: 5px;
+    }
+    span:nth-child(3) {
+        width: 10%;
+        padding-left: 10px;
+    }
+    span:nth-child(4) {
+        width: 12%;
+        padding-left: 10px;
+    }
+}
+
+.el-tree-node__content {
+    height: auto;
+    margin: 5px 0;
+}
+.custom-tree-node {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    width: 100%;
+    .ivu-input-wrapper,
+    .ivu-input-number {
+        margin-right: 10px;
+    }
+}
+
+.see-rule .custom-tree-node {
+    // font-size: 15px;
+
+    &>div:first-child {
+        font-size: 16px;
+    }
+}
+
 </style>

+ 200 - 216
TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/skContent.vue

@@ -34,16 +34,38 @@
                 </div>
                 <div style="margin-bottom: 10px;">
                     <Input placeholder="搜索醍摩豆帐号" style="width: 300px; margin-right: 10px;" />
-                    <Button type="success" @click="getTeacherList()" v-show="actInfo.scope === 'area' && !isArea">邀请老师</Button>
+                    <Button type="success" @click="getTeacherList()" v-show="actInfo.joinMode === 'invite' && !isArea">邀请老师</Button>
                 </div>
-                <Table :columns="applicationColumns" :data="applicationList" row-key="id" stripe>
-                    <template #action="{row, index}">
-                        <Button type="error" size="small" @click="deleteApplica(row, index, 'join')">删除</Button>
+                <Table :columns="applicationColumns" :data="applicationList" stripe row-key="id">
+                    <template #head="{}">
+                        <span> </span>
+                    </template>
+                    <template #poster="{row}">
+                        <PersonalPhoto :name="row.name || row.iname" :picture="row.picture" />
+                    </template>
+                    <template #joinStatus="{row}">
+                        <Tag color="success" v-if="row.inviteStatus && row.signContestStatus === 1">已报名</Tag>
+                        <template v-else-if="!row.inviteStatus">
+                            <Tag color="green">已邀请</Tag>
+                            <Tag color="orange" v-show="!row.signContestStatus">未报名</Tag>
+                            <Tag color="default" v-show="row.signContestStatus === -2">未到报名时间</Tag>
+                        </template>
+                        <span v-else-if="row.inviteStatus != -2">-</span>
+                    </template>
+                    <template #uploadContestType="{row}">
+                        <span>{{ row.uploadContestType === 'file' ? '文件' : (row.uploadContestType ? '苏格拉底' : '-') }}</span>
+                    </template>
+                    <template #uploadContestScore="{row}">
+                        <span>{{ row.uploadContestScore === -1 ? '-' : row.uploadContestScore }}</span>
+                    </template>
+                    <template #action="{row}">
+                        <Button type="success" size="small" style="margin-right: 10px;" @click="getTeaInfo(row)" v-show="row.inviteStatus != -2">查看</Button>
+                        <!-- <Button type="error" size="small" @click="deleteApplica(row, index, 'join')">删除</Button> -->
                     </template>
                 </Table>
             </div>
         </div>
-        <template v-if="actInfo.scope === 'area' && isArea || actInfo.scope === 'school'">
+        <template v-if="actInfo.scope != 'school' && isArea || actInfo.scope === 'school'">
             <div class="data-box">
                 <div class="module-title">评审管理</div>
                 <div class="module-data">
@@ -105,6 +127,24 @@
                 </div>
             </div>
         </template>
+        <Drawer title="评审规则" :width="50" v-model="ruleDrawer">
+            <RuleDrawer :ruleDrawerAdd="0" :ruleInfoParent="ruleInfo" @saveRule="saveRule" />
+        </Drawer>
+        <Drawer title="教师报名信息" :width="25" v-model="teaDrawer">
+            <Form :model="teaSignInfo" :label-width="80">
+                <FormItem v-for="(item, index) in teaSignInfo.contest.enrollInfos" :key="index" :label="infoArr[item.code]">
+                    <p>{{ item.code === 'sex' ? (item.val === 'secrecy' ? '保密' : (item.val === 'male' ? '男' : '女')) : item.val }}</p>
+                </FormItem>
+                <template v-if="contestInfo.sign.type">
+                    <FormItem label="团队名称">
+                        <p>{{ teaSignInfo.contest.teamName }}</p>
+                    </FormItem>
+                    <FormItem label="团队编码">
+                        <p>{{ teaSignInfo.contest.cipher }}</p>
+                    </FormItem>
+                </template>
+            </Form>
+        </Drawer>
         <Modal v-model="teacherModal" title="邀请老师" width="650" :footer-hide="true">
             <Table :columns="teacherCloumns" :data="showTeachers" height="500" @on-selection-change="getSelTea">
                 <template #poster="{row}">
@@ -118,23 +158,6 @@
             <Button type="success" long @click="saveInviteTea()">保存</Button>
         </Modal>
         <Modal v-model="processShow" title="邀请评审专家" width="1000" :footer-hide="true">
-            <!-- <div style="margin-bottom: 10px;">
-                <Input search enter-button placeholder="输入手机号查找" @on-search="searchPro" />
-            </div>
-            <template v-if="isSearch">
-                <div style="display: flex; justify-content: space-between; align-items: center; margin: 20px; margin-bottom: 30px;" v-show="isTmd">
-                    <img src="./demo.jpeg" alt="" style="width: 50px; height: 50px; border-radius: 50px;">
-                    <p>罗老师</p>
-                    <p>1595321354</p>
-                    <Button type="success" size="small">邀请</Button>
-                </div>
-                <div style="text-align: center; margin: 30px 0;" v-show="!isTmd">
-                    <p style="font-size: 20px; margin-bottom: 10px;">手机号未创建醍摩豆帐号,是否邀请该手机号并创建醍摩豆帐号?</p>
-                    <Button type="success" size="small" style="margin-right: 10px;">邀请并创建</Button>
-                    <Button size="small">取消</Button>
-                </div>
-            </template>
-            <Button type="primary" long>邀请</Button> -->
             <expertImport :actInfo="actInfo" @processList="setProList"></expertImport>
         </Modal>
         <Modal v-model="awardsShow" title="批量设置奖项">
@@ -157,9 +180,11 @@
 
 <script>
 import expertImport from './expertImport.vue'
+import RuleDrawer from './ruleDrawer.vue'
 export default {
     components: {
         expertImport,
+        RuleDrawer
     },
     props: {
         actInfo: {
@@ -174,112 +199,84 @@ export default {
             type: Array,
             default: [],
         },
+        ruleInfo: {
+            type: Object,
+            default: {},
+        },
     },
     data () {
         return {
             applicationColumns: [
                 {
-                    title: '姓名',
-                    key: 'name',
-                    tree: true,
+                    title: ' ',
+                    slot: 'head',
+                    align: 'center',
+                    width: 40,
+                    tree: true
                 },
                 {
-                    title: '性别',
-                    key: 'sex',
-                    // width: 80,
+                    title: ' ',
+                    slot: 'poster',
+                    align: 'center',
+                    width: 50,
                 },
                 {
-                    title: '手机号码',
-                    key: 'phone',
-                    // width: 100,
+                    title: '姓名',
+                    key: 'name',
+                    // tree: true,
+                    align: 'center'
                 },
                 {
-                    title: '电子邮箱',
-                    key: 'email',
-                    // width: 500,
+                    title: '醍摩豆ID',
+                    key: 'id',
+                    // width: 80,
+                    align: 'center'
                 },
                 {
                     title: '学校',
-                    key: 'school',
-                    // width: 100,
-                    filters: [
-                        {
-                            label: '醍摩豆学校',
-                            value: '醍摩豆学校'
-                        },
-                        {
-                            label: '研发学校',
-                            value: '研发学校'
-                        },
-                    ],
-                    filterMultiple: false,
-                    filterMethod (value, row) {
-                        return row.school === value
-                    }
+                    key: 'schoolName',
+                    align: 'center'
                 },
                 {
-                    title: '职务',
-                    key: 'zhiwu',
-                    // width: 100,
+                    title: '组名',
+                    key: 'teamNameContest',
+                    align: 'center'
                 },
                 {
-                    title: '学',
-                    key: 'period',
-                    // width: 100,
+                    title: '学校',
+                    key: 'schoolName',
+                    align: 'center'
                 },
                 {
-                    title: '学科',
-                    key: 'subject',
+                    title: '参赛状态',
+                    slot: 'joinStatus',
+                    align: 'center'
                     // width: 100,
                 },
                 {
-                    title: '组名',
-                    key: 'team',
+                    title: '报名时间',
+                    key: 'joinTime',
+                    align: 'center'
                     // width: 100,
-                    filters: [
-                        {
-                            label: '数学组',
-                            value: '数学组'
-                        },
-                        {
-                            label: '语文组',
-                            value: '语文组'
-                        },
-                    ],
-                    filterMultiple: false,
-                    filterMethod (value, row) {
-                        return row.team === value
-                    }
                 },
-                {
-                    title: '组内身份',
-                    key: 'identity',
+                /* {
+                    title: '作品',
+                    slot: 'uploadContestType',
+                    align: 'center'
                     // width: 100,
-                    filters: [
-                        {
-                            label: '组长',
-                            value: '组长'
-                        },
-                        {
-                            label: '组员',
-                            value: '组员'
-                        },
-                    ],
-                    filterMultiple: false,
-                    filterMethod (value, row) {
-                        return row.identity === value
-                    }
-                },
+                    // fixed: 'right',
+                }, */
                 {
-                    title: '报名时间',
-                    key: 'time',
+                    title: '上传时间',
+                    key: 'uploadTime',
+                    align: 'center'
                     // width: 100,
                 },
                 {
-                    title: '作品',
-                    key: 'work',
+                    title: '分数',
+                    slot: 'uploadContestScore',
+                    align: 'center'
                     // width: 100,
-                    // fixed: 'right',
                 },
                 {
                     title: '操作',
@@ -289,104 +286,7 @@ export default {
                     // fixed: 'right',
                 },
             ],
-            applicationList: [
-                {
-                    id: '000',
-                    name: '张三',
-                    sex: '男',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    school: '醍摩豆学校',
-                    zhiwu: '年级主任',
-                    period: '初中',
-                    subject: '数学',
-                    time: '2023-08-08',
-                    team: '数学组',
-                    identity: '组长',
-                    work: '',
-                    _showChildren: true,
-                    children: [
-                        {
-                            id: '001',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '醍摩豆学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                        {
-                            id: '002',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '醍摩豆学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                    ],
-                },
-                {
-                    id: '010',
-                    name: '柳五',
-                    sex: '女',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    school: '醍摩豆学校',
-                    zhiwu: '语文组长',
-                    period: '初中',
-                    subject: '语文',
-                    time: '2023-08-09',
-                    team: '语文组',
-                    identity: '组长',
-                    work: '',
-                    children: [
-                        {
-                            id: '011',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '研发学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                        {
-                            id: '012',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '研发学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                    ],
-                },
-                
-            ],
+            applicationList: [],
             processShow: false,
             isTmd: false,
             workPro: false,
@@ -432,26 +332,7 @@ export default {
                     align: 'center',
                 },
             ],
-            processList: [
-                {
-                    name: '张专家',
-                    sex: '男',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    period: '初中',
-                    subject: '英语、数学',
-                    num: 4,
-                },
-                {
-                    name: '赵专家',
-                    sex: '女',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    period: '初中',
-                    subject: '语文、生物',
-                    num: 3,
-                },
-            ],
+            processList: [],
             awardsList: [
                 {
                     value: '特等奖',
@@ -578,15 +459,34 @@ export default {
                 }, */
             ],
             showTeachers: [],
+            teaDrawer: false,
+            teaSignInfo: {
+                contest: {
+                    enrollInfos: []
+                }
+            }, //教师报名信息
+            infoArr: {
+                name: '姓名',
+                sex: '性别',
+                phone: '手机号码',
+                email: '电子邮箱',
+                period: '学段',
+                subject: '学科',
+            },
         }
     },
     computed: {
         isArea() {
             return localStorage.getItem('platform') === 'area'
         },
+        areaId() {
+            return sessionStorage.getItem('areaId')
+        },
     },
     created () {
+        // this.applicationColumns[2].filters = this.actInfo.invitedSchools
         this.getProList()
+        this.actTeaList()
     },
     methods: {
         // 获取老师列表
@@ -659,6 +559,9 @@ export default {
                     // this.inviteTeachers = res.inviteTeachers
                     this.$emit('inviTea', res.inviteTeachers)
                     this.teacherModal = false
+                    this.$Message.warning('邀请成功')
+                } else {
+                    this.$Message.warning('邀请失败')
                 }
             })
         },
@@ -670,7 +573,7 @@ export default {
             this.$api.areaActivity.manageAct(params).then(res => {
                 console.log(res);
                 if(res.code === 200) {
-                    this.processList = res?.activityExpert.experts.map(item => {
+                    this.processList = res?.activityExpert?.experts.map(item => {
                         item.num = 0
                         return item
                     })
@@ -708,6 +611,87 @@ export default {
                 }
             })
         },
+        actTeaList() {
+            let params = {
+                grant_type: 'invited-and-enroll-teachers',
+                activityId: this.actInfo.id,
+                activityOwner: this.isArea ? this.areaId : '', //选填(默认当前学校) 区级id:活动所有老师 校级id:本校邀请的老师
+            }
+            this.$api.areaActivity.manageAct(params).then(res => {
+                if(res.code === 200) {
+                    let lists = res?.inviteEnrollTeachers.map(item => {
+                        item.joinTime = item.signContestTime ? this.$tools.formatTime(item.signContestTime, 'yyyy-MM-dd') : '-'
+                        item.uploadTime = item.uploadContestTime ? this.$tools.formatTime(item.uploadContestTime, 'yyyy-MM-dd') : '-'
+                        item.teamNameContest = item.teamNameContest || '-'
+                        return item
+                    })
+                    if(this.contestInfo.sign.type) {
+                        lists.forEach(item => {
+                            if(item.teamCipherContest) {
+                                let isTeam = this.applicationList.findIndex(list => list.teamCipherContest === item.teamCipherContest)
+                                if(isTeam != -1) {
+                                    if(item.teamLeaderContest) {
+                                        item._showChildren = true
+                                        item.children = this.applicationList[isTeam].children
+                                        this.applicationList[isTeam] = item
+                                    } else {
+                                        this.applicationList[isTeam].children.push(item)
+                                    }
+                                } else {
+                                    if(item.teamLeaderContest) {
+                                        item._showChildren = true
+                                        item.children = []
+                                        this.applicationList.push(item)
+                                    } else {
+                                        this.applicationList.push({
+                                            inviteStatus: -2, // -2表示当前队员未找到队长
+                                            teamCipherContest: item.teamCipherContest,
+                                            _showChildren: true,
+                                            children: [item]
+                                        })
+                                    }
+                                }
+                            } else {
+                                item.children = []
+                                this.applicationList.push(item)
+                            }
+                        })
+                    } else {
+                        this.applicationColumns.splice(4, 1)
+                        this.applicationList = lists
+                    }
+                }
+            })
+        },
+        saveRule(data) {
+            let {info, isEdit} = data
+            /* if(isEdit) {
+                this.reviewList[this.reviewSel] = info
+            } else {
+                this.reviewList.push(info)
+            } */
+            this.ruleDrawer = false
+        },
+        getTeaInfo(data) {
+            this.$parent.isLoading = true
+            let params = {
+                grant_type: 'get-teacher-enroll',
+                teacherId: data.id,
+                activityId: this.actInfo.id,
+            }
+            this.$api.areaActivity.manageAct(params).then(res => {
+                if(res.code === 1) {
+                    this.$Message.warning('暂无报名信息')
+                } else if(res.code === 200) {
+                    this.teaSignInfo = res?.enroll
+                    this.teaDrawer = true
+                }
+            }).finally(() => {
+                this.$parent.isLoading = false
+            })
+        },
+
+
         deleteApplica(data, index, type) {
             console.log(data, index);
             if(type === 'join') {

+ 67 - 400
TEAMModelOS/ClientApp/src/view/signupActivity/infoGoing.vue

@@ -14,6 +14,7 @@
                     {{ actInfo.name }}
                 </p>
                 <div class="btn-box" v-show="isArea || actInfo.scope === 'school'">
+                    <Button type="primary" size="small" @click="editAct()" style="margin-right: 10px;">编辑</Button>
                     <Button type="warning" size="small" @click="delAct()">删除</Button>
                 </div>
                 <!-- <div class="btn-box">
@@ -32,14 +33,14 @@
                         <div class="sk-info">
                             <!-- <div class="info-title">基本信息</div> -->
                             <p>主题:{{ actInfo.subject }}</p>
-                            <p>简介:{{ actInfo.description }}</p>
-                            <p>地点:{{ actInfo.address }}</p>
+                            <p>简介:{{ actInfo.description || '-' }}</p>
+                            <p>地点:{{ actInfo.address || '-' }}</p>
                             <p>时间:{{ actInfo.startTime }} - {{ actInfo.endTime }}</p>
                             <p>主办:
-                                <span v-for="(item, index) in actInfo.zb" :key="index" style="margin-right: 10px;">{{ item }}</span>
+                                <span v-for="(item, index) in actInfo.zb" :key="index" style="margin-right: 10px;">{{ item || '-' }}</span>
                             </p>
                             <p>承办:
-                                <span v-for="(item, index) in actInfo.cb" :key="index" style="margin-right: 10px;">{{ item }}</span>
+                                <span v-for="(item, index) in actInfo.cb" :key="index" style="margin-right: 10px;">{{ item || '-' }}</span>
                             </p>
                             <p v-if="actInfo.scope != 'school' && isArea">学校:
                                 <span v-if="actInfo.invitedSchools.length">
@@ -55,10 +56,14 @@
                                     <span v-for="item in inviteTeachers" :key="item.id" style="margin-right: 10px;">{{ item.name }}</span>
                                 </span>
                             </p>
-                            <p>免责声明:{{ actInfo.mzsm }}</p>
-                            <p>附件:
-                                <span v-for="item in actInfo.attachment" :key="item.blob">{{ item.name }}</span>
-                            </p>
+                            <p>免责声明:{{ actInfo.mzsm || '-' }}</p>
+                            <div style="display: flex;">
+                                <p style="min-width: 50px;">附件:</p>
+                                <div v-if="actInfo.attachment.length">
+                                    <p v-for="item in actInfo.attachment" :key="item.blob" @click="onPreview(item)" class="attach-name">{{ item.name }}</p>
+                                </div>
+                                <span v-else>-</span>
+                            </div>
                         </div>
                         <div class="sk-info" v-if="contestInfo">
                             <div class="info-title">赛课活动</div>
@@ -97,14 +102,30 @@
                         </Steps>
                     </div> -->
                     <vuescroll>
-                        <skContent :actInfo="actInfo" :contestInfo="contestInfo" :inviteTeachers="inviteTeachers" @inviTea="inviteTeaChange" />
+                        <skContent :actInfo="actInfo" :contestInfo="contestInfo" :inviteTeachers="inviteTeachers" :ruleInfo="ruleInfo" @inviTea="inviteTeaChange" />
                     </vuescroll>
                 </TabPane>
             </Tabs>
         </div>
+		<div v-if="previewStatus" class="image-viewer">
+			<div style="width:fit-content;position:relative;margin:auto;">
+				<Icon type="md-close" class="close-icon" @click="previewStatus = false" />
+				<video v-if="previewFile.type == 'video'" id="previewVideo" :src="previewFile.url" width="870"
+					controls="controls" style="max-height: 800px;">
+					{{$t('teachContent.tips8')}}
+				</video>
+				<audio v-else-if="previewFile.type == 'audio'" controls>
+					<source :src="previewFile.url">
+					{{$t('teachContent.notAudio')}}
+				</audio>
+			</div>
+		</div>
         <Modal v-model="schoolModal" title="参与本次活动的学校">
             <Table :columns="schoolCloumns" :data="schoolList"></Table>
         </Modal>
+        <Modal v-model="editModal" title="编辑活动基本信息">
+            
+        </Modal>
     </div>
 </template>
 
@@ -156,395 +177,22 @@ export default {
                 },
             ],
             inviteTeachers: [],
+            previewStatus: false,
+            previewFile: null,
 
-
-            applicationColumns: [
-                {
-                    title: '姓名',
-                    key: 'name',
-                    tree: true,
-                    // width: 120,
-                    // fixed: 'left'
-                },
-                {
-                    title: '性别',
-                    key: 'sex',
-                    // width: 80,
-                },
-                {
-                    title: '手机号码',
-                    key: 'phone',
-                    // width: 100,
-                },
-                {
-                    title: '电子邮箱',
-                    key: 'email',
-                    // width: 500,
-                },
-                {
-                    title: '学校',
-                    key: 'school',
-                    // width: 100,
-                    filters: [
-                        {
-                            label: '醍摩豆学校',
-                            value: '醍摩豆学校'
-                        },
-                        {
-                            label: '研发学校',
-                            value: '研发学校'
-                        },
-                    ],
-                    filterMultiple: false,
-                    filterMethod (value, row) {
-                        return row.school === value
-                    }
-                },
-                {
-                    title: '职务',
-                    key: 'zhiwu',
-                    // width: 100,
-                },
-                {
-                    title: '学段',
-                    key: 'period',
-                    // width: 100,
-                },
-                {
-                    title: '学科',
-                    key: 'subject',
-                    // width: 100,
-                },
-                {
-                    title: '组名',
-                    key: 'team',
-                    // width: 100,
-                    filters: [
-                        {
-                            label: '数学组',
-                            value: '数学组'
-                        },
-                        {
-                            label: '语文组',
-                            value: '语文组'
-                        },
-                    ],
-                    filterMultiple: false,
-                    filterMethod (value, row) {
-                        return row.team === value
-                    }
-                },
-                {
-                    title: '组内身份',
-                    key: 'identity',
-                    // width: 100,
-                    filters: [
-                        {
-                            label: '组长',
-                            value: '组长'
-                        },
-                        {
-                            label: '组员',
-                            value: '组员'
-                        },
-                    ],
-                    filterMultiple: false,
-                    filterMethod (value, row) {
-                        return row.identity === value
-                    }
-                },
-                {
-                    title: '报名时间',
-                    key: 'time',
-                    // width: 100,
-                },
-                {
-                    title: '作品',
-                    key: 'work',
-                    // width: 100,
-                    // fixed: 'right',
-                },
-                {
-                    title: '操作',
-                    slot: 'action',
-                    align: 'center',
-                    // width: 100,
-                    // fixed: 'right',
-                },
-            ],
-            applicationList: [
-                {
-                    id: '000',
-                    name: '张三',
-                    sex: '男',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    school: '醍摩豆学校',
-                    zhiwu: '年级主任',
-                    period: '初中',
-                    subject: '数学',
-                    time: '2023-08-08',
-                    team: '数学组',
-                    identity: '组长',
-                    work: '',
-                    _showChildren: true,
-                    children: [
-                        {
-                            id: '001',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '醍摩豆学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                        {
-                            id: '002',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '醍摩豆学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                    ],
-                },
-                {
-                    id: '010',
-                    name: '柳五',
-                    sex: '女',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    school: '醍摩豆学校',
-                    zhiwu: '语文组长',
-                    period: '初中',
-                    subject: '语文',
-                    time: '2023-08-09',
-                    team: '语文组',
-                    identity: '组长',
-                    work: '',
-                    children: [
-                        {
-                            id: '011',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '研发学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                        {
-                            id: '012',
-                            name: '李四',
-                            sex: '女',
-                            phone: '911',
-                            email: '331321@qq.com',
-                            school: '研发学校',
-                            zhiwu: '普通教师',
-                            period: '初中',
-                            subject: '数学',
-                            time: '2023-08-10',
-                            team: '数学组',
-                            identity: '组员',
-                            work: '',
-                        },
-                    ],
-                },
-                
-            ],
-            processColumns: [
-                {
-                    title: '姓名',
-                    key: 'name'
-                },
-                {
-                    title: '性别',
-                    key: 'sex'
-                },
-                {
-                    title: '手机号码',
-                    key: 'phone'
-                },
-                {
-                    title: '电子邮箱',
-                    key: 'email'
-                },
-                /* {
-                    title: '擅长学段',
-                    key: 'period'
-                },
-                {
-                    title: '擅长学科',
-                    key: 'subject'
-                }, */
-                {
-                    title: '评审数量',
-                    key: 'num'
-                },
-                {
-                    title: '评审进度',
-                    slot: 'process',
-                    align: 'center',
-                },
-                {
-                    title: '操作',
-                    slot: 'actions',
-                    width: 150,
-                    align: 'center',
-                },
-            ],
-            processList: [
-                {
-                    name: '张专家',
-                    sex: '男',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    period: '初中',
-                    subject: '英语、数学',
-                    num: 4,
-                },
-                {
-                    name: '赵专家',
-                    sex: '女',
-                    phone: '110',
-                    email: '111222@qq.com',
-                    period: '初中',
-                    subject: '语文、生物',
-                    num: 3,
-                },
-            ],
-            scoreColumns: [
-                {
-                    title: '姓名/组名',
-                    key: 'name',
-                },
-                {
-                    title: '专家评分',
-                    key: 'score'
-                },
-                {
-                    title: '建议分数',
-                    slot: 'score1'
-                },
-                {
-                    title: '奖项',
-                    slot: 'awards'
-                },
-                /* {
-                    title: '操作',
-                    slot: 'actions',
-                    width: 150,
-                    align: 'center',
-                }, */
-            ],
-            scoreList: [
-                {
-                    name: '数学组',
-                    score: '67',
-                    score1: 85,
-                    awards: '',
-                    edit: false,
-                },
-                {
-                    name: '语文组',
-                    score: '92',
-                    score1: 85,
-                    awards: '',
-                    edit: false,
-                },
-                {
-                    name: '数学组',
-                    score: '67',
-                    score1: 85,
-                    awards: '',
-                    edit: false,
-                },
-                {
-                    name: '语文组',
-                    score: '92',
-                    score1: 75,
-                    awards: '',
-                    edit: false,
-                },
-                {
-                    name: '数学组',
-                    score: '67',
-                    score1: 45,
-                    awards: '',
-                    edit: false,
-                },
-                {
-                    name: '语文组',
-                    score: '92',
-                    score1: 68,
-                    awards: '',
-                    edit: false,
-                },
-            ],
             sasData: {
                 sas: ''
             },
-            awardsing: false,
             schoolModal: false,
-            teacherModal: false,
             schoolCloumns: [
                 {
                     title: 'Name',
                     key: 'name'
                 },
             ],
-            teacherCloumns: [
-                {
-                    type: 'selection',
-                    width: 60,
-                    align: 'center'
-                },
-                {
-                    title: ' ',
-                    slot: 'poster',
-                    align: 'center'
-                },
-                {
-                    title: '姓名',
-                    key: 'name',
-                    align: 'center'
-                },
-                {
-                    title: 'ID',
-                    key: 'id',
-                    align: 'center'
-                },
-                {
-                    title: '学科',
-                    key: 'subject',
-                    align: 'center'
-                },
-                /* {
-                    title: '操作',
-                    slot: 'action',
-                    align: 'center'
-                }, */
-            ],
-            showTeachers: [],
             schoolList: [],
+            editModal: false,
+            editInfo: {},
         }
     },
     created () {
@@ -580,20 +228,8 @@ export default {
             }
             this.$api.areaActivity.manageAct(params).then(res => {
                 if(res.code === 200) {
+                    this.editInfo = this.actInfo
                     res.contest.modules.forEach(item => {
-                        if(item === 'sign') {
-                            res.contest[item].fieldName = []
-                            res.contest[item].field.forEach(field => {
-                                let existing = this.infoArr.find(info => {
-                                    return info.value === field
-                                })
-                                if(existing) {
-                                    res.contest[item].fieldName.push(existing.label)
-                                } else {
-                                    res.contest[item].fieldName.push(field)
-                                }
-                            })
-                        }
                         res.contest[item].startTime = this.$tools.formatTime(res.contest[item].stime, 'yyyy-MM-dd')
                         res.contest[item].endTime = this.$tools.formatTime(res.contest[item].etime, 'yyyy-MM-dd')
                     })
@@ -616,6 +252,7 @@ export default {
                 }
             })
         },
+        editAct() {},
         delAct() {
             this.$Modal.confirm({
                 title: '确定删除本次活动吗?',
@@ -649,6 +286,27 @@ export default {
         inviteTeaChange(list) {
             this.inviteTeachers = list
         },
+        /* 预览 */
+        async onPreview(item) {
+            let url = item.url
+            if (this.$tools.getSuffix(item.name) === 'pdf') {
+                window.open('/web/viewer.html?file=' + encodeURIComponent(url));
+            } else if(item.type === 'doc') {
+                window.open('https://view.officeapps.live.com/op/view.aspx?src=' + escape(url));
+            } else if(item.type === 'image') {
+                this.$hevueImgPreview(url)
+            } else if(item.type === 'link') {
+				window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url)
+            } else {
+                this.previewFile = item
+                this.previewStatus = true
+                console.log(this.previewFile.type);
+            }
+        },
+        /* 下载 */
+        async onDownload(item) {
+            this.$tools.doDownloadByUrl(item.url, item.name)
+        },
     }
 }
 </script>
@@ -710,7 +368,8 @@ export default {
     }
     .sk-info{
         // padding: 0 10px;
-        &>p {
+        &>p,
+        &>div {
             margin: 10px;
         }
         .info-title {
@@ -719,6 +378,14 @@ export default {
             margin-bottom: 10px;
             margin-top: 25px;
         }
+
+        .attach-name {
+            cursor: pointer;
+            &:hover {
+                color: #135ead;
+                font-weight: bold;
+            }
+        }
     }
 }
 </style>

+ 79 - 83
TEAMModelOS/ClientApp/src/view/signupActivity/infoReleased.vue

@@ -35,11 +35,11 @@
                         </div>
                         <div>
                             <span>简介:</span>
-                            <span>{{ actInfo.description }}</span>
+                            <span>{{ actInfo.description || '-' }}</span>
                         </div>
                         <div>
                             <span>地点:</span>
-                            <span>{{ actInfo.address }}</span>
+                            <span>{{ actInfo.address || '-' }}</span>
                         </div>
                         <div>
                             <span>时间:</span>
@@ -47,14 +47,16 @@
                         </div>
                         <div>
                             <span>主办:</span>
-                            <span>
-                                <span v-for="(item, index) in actInfo.zb" :key="index" style="margin-right: 10px;">{{ item }}</span>
+                            <span v-if="!actInfo.zb.length">-</span>
+                            <span v-else>
+                                <span v-for="(item, index) in actInfo.zb" :key="index" style="margin-right: 10px;">{{ item || '-' }}</span>
                             </span>
                         </div>
                         <div>
                             <span>承办:</span>
-                            <span>
-                                <span v-for="(item, index) in actInfo.cb" :key="index" style="margin-right: 10px;">{{ item }}</span>
+                            <span v-if="!actInfo.cb.length">-</span>
+                            <span v-else>
+                                <span v-for="(item, index) in actInfo.cb" :key="index" style="margin-right: 10px;">{{ item || '-' }}</span>
                             </span>
                         </div>
                         <div v-if="actInfo.scope != 'school' && isArea">
@@ -66,33 +68,34 @@
                         </div>
                         <div>
                             <span>免责声明:</span>
-                            <span>{{ actInfo.mzsm }}</span>
+                            <span>{{ actInfo.mzsm || '-' }}</span>
                         </div>
                         <div style="display: flex;">
                             <p style="min-width: 50px;">附件:</p>
                             <div v-if="actInfo.attachment.length">
-                                <p v-for="item in actInfo.attachment" :key="item.blob">{{ item.name }}</p>
+                                <p v-for="item in actInfo.attachment" :key="item.blob" @click="onPreview(item)" class="attach-name">{{ item.name }}</p>
                             </div>
-                            <span v-else>暂无</span>
+                            <span v-else>-</span>
                         </div>
                     </template>
                 </div>
                 <div class="check-module">
                     <Tabs value="sk" class="sk-box">
                         <TabPane key="sk" label="优课评选" name="sk" v-if="contestInfo">
+                            <p class="sk-title">
+                                <span>报名时间</span>
+                                <span class="time-border">
+                                    {{ contestInfo.sign.startTime }} - {{ contestInfo.sign.endTime }}
+                                </span>
+                            </p>
                             <div class="sk-info">
-                                <p>报名时间:
-                                    <span class="time-border">
-                                        {{ contestInfo.sign.startTime }} - {{ contestInfo.sign.endTime }}
-                                    </span>
-                                </p>
                                 <p>填报信息:
-                                    <span class="info-border" v-for="(item, index) in contestInfo.sign.fields" :key="index">{{ item.field }}</span>
+                                    <span class="info-border" v-for="(item, index) in contestInfo.sign.fields" :key="index">{{ item.label }}</span>
                                 </p>
                                 <p>报名人数:
                                     <!-- <span class="info-border">{{ '28' }}人</span> -->
                                     <span v-if="contestInfo.sign.limit">{{ contestInfo.sign.limit }}人</span>
-                                    <span v-else>-</span>
+                                    <span v-else>不限制</span>
                                 </p>
                                 <p>参赛方式:
                                     <!-- <span class="info-border">{{ '团队赛' }}</span> -->
@@ -119,7 +122,7 @@
                                         </span>
                                         <span v-else>苏格拉底影片</span>
                                     </p>
-                                    <p>作品要求:{{ contestInfo.upload.desc }}</p>
+                                    <p>作品要求:{{ contestInfo.upload.desc || '-' }}</p>
                                     <p>上传方式:{{ contestInfo.upload.captainUpload ? '由队长统一上传' : '个人上传作品' }}</p>
                                 </div>
                             </template>
@@ -156,78 +159,47 @@
                         <!-- <TabPane key="jy" label="教研活动" name="jy">
                             暂未填写内容
                         </TabPane> -->
+                        <div v-if="previewStatus" class="image-viewer">
+                            <div style="width:fit-content;position:relative;margin:auto;">
+                                <Icon type="md-close" class="close-icon" @click="previewStatus = false" />
+                                <video v-if="previewFile.type == 'video'" id="previewVideo" :src="previewFile.url" width="870"
+                                    controls="controls" style="max-height: 800px;">
+                                    {{$t('teachContent.tips8')}}
+                                </video>
+                                <audio v-else-if="previewFile.type == 'audio'" controls>
+                                    <source :src="previewFile.url">
+                                    {{$t('teachContent.notAudio')}}
+                                </audio>
+                            </div>
+                        </div>
                     </Tabs>
                 </div>
             </div>
         </div>
-        <Drawer title="评审规则" :width="50" :closable="false" v-model="ruleDrawer" class="light-iview-form" @on-close="closeRule()">
-            <p style="font-size: 18px; font-weight: bold;">{{ ruleInfo.name }}</p>
-            <p style="margin: 5px 0 10px 0;">描述:{{ ruleInfo.desc }}</p>
-            <!-- <p style="margin: 5px 0;">总分:{{ ruleInfo.score }}</p> -->
-            <div class="create-form">
-                <div class="rule-header">
-                    <span>分项</span>
-                    <span>描述</span>
-                    <span>分值</span>
-                </div>
-                <el-tree :data="ruleInfo.trees" node-key="id" default-expand-all :expand-on-click-node="false">
-                    <div class="custom-tree-node" slot-scope="{ data }">
-                        <div style="width: 275px;">{{ data.label }}</div>
-                        <div style="width: 100%;">{{ data.desc }}</div>
-                        <div style="width: 150px;">{{ data.score }}</div>
-                    </div>
-                </el-tree>
-            </div>
+        <Drawer title="评审规则" :width="50" v-model="ruleDrawer">
+            <RuleDrawer :ruleDrawerAdd="0" :ruleInfoParent="ruleInfo" />
         </Drawer>
     </div>
 </template>
 
 <script>
+import RuleDrawer from './infoComponent/ruleDrawer.vue'
 export default {
+    components: {
+        RuleDrawer,
+    },
     data () {
         return {
             isLoading: false,
             contestInfo: undefined,
-            infoArr: [
-                {
-                    value: 'name',
-                    label: '姓名',
-                },
-                {
-                    value: 'sex',
-                    label: '性别',
-                },
-                {
-                    value: 'phone',
-                    label: '手机号码',
-                },
-                {
-                    value: 'email',
-                    label: '电子邮箱',
-                },
-                {
-                    value: 'school',
-                    label: '学校',
-                },
-                {
-                    value: 'duties',
-                    label: '职务',
-                },
-                {
-                    value: 'period',
-                    label: '学段',
-                },
-                {
-                    value: 'subject',
-                    label: '学科',
-                },
-            ],
             ruleInfo: {
                 name: '',
                 desc: '',
                 trees: [],
             },
             ruleDrawer: false,
+            previewStatus: false,
+            previewFile: null,
         }
     },
     created () {
@@ -255,19 +227,6 @@ export default {
             this.$api.areaActivity.manageAct(params).then(res => {
                 if(res.code === 200) {
                     res.contest.modules.forEach(item => {
-                        if(item === 'sign') {
-                            res.contest[item].fieldName = []
-                            res.contest[item].field.forEach(field => {
-                                let existing = this.infoArr.find(info => {
-                                    return info.value === field
-                                })
-                                if(existing) {
-                                    res.contest[item].fieldName.push(existing.label)
-                                } else {
-                                    res.contest[item].fieldName.push(field)
-                                }
-                            })
-                        }
                         res.contest[item].startTime = this.$tools.formatTime(res.contest[item].stime, 'yyyy-MM-dd')
                         res.contest[item].endTime = this.$tools.formatTime(res.contest[item].etime, 'yyyy-MM-dd')
                     })
@@ -343,7 +302,6 @@ export default {
         },
         confirmedJoin(type) {
             this.$Modal.confirm({
-                // title: '删除专家',
                 content: `确认加入本次活动吗?`,
                 onOk: () => {
                     let params = {
@@ -354,11 +312,41 @@ export default {
                     this.$api.areaActivity.manageAct(params).then(res => {
                         if(res.code === 200) {
                             this.actInfo.needConfirmed = 0
+                            this.$Message.success('成功加入活动')
+                            this.$router.push({
+                                name: this.isArea ? 'areaInfoActivity' : 'infoActivity',
+                                params: {
+                                    info: res.activity
+                                }
+                            })
+                        } else {
+                            this.$Message.warning('加入失败')
                         }
                     })
                 }
             })
         },
+        /* 预览 */
+        async onPreview(item) {
+            let url = item.url
+            if (this.$tools.getSuffix(item.name) === 'pdf') {
+                window.open('/web/viewer.html?file=' + encodeURIComponent(url));
+            } else if(item.type === 'doc') {
+                window.open('https://view.officeapps.live.com/op/view.aspx?src=' + escape(url));
+            } else if(item.type === 'image') {
+                this.$hevueImgPreview(url)
+            } else if(item.type === 'link') {
+				window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url)
+            } else {
+                this.previewFile = item
+                this.previewStatus = true
+                console.log(this.previewFile.type);
+            }
+        },
+        /* 下载 */
+        async onDownload(item) {
+            this.$tools.doDownloadByUrl(item.url, item.name)
+        },
     },
 }
 </script>
@@ -440,6 +428,14 @@ export default {
                 margin: 10px 0;
                 font-size: 16px;
             }
+            
+            .attach-name {
+                cursor: pointer;
+                &:hover {
+                    color: #135ead;
+                    font-weight: bold;
+                }
+            }
         }
 
         .check-module {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/signupActivity/processActivity.vue

@@ -115,7 +115,7 @@ export default {
                         // 校级确认参加: confirmedSchools[0].status = 0(没确认)/1(已确认)
                         // 区级都需要确认,公开只有选择了学校才需确认
                         if(!this.isArea && ((item.scope === 'public' && item.invitedSchools.length) || item.scope === 'area')) {
-                            item.needConfirmed = !item.confirmedSchools[0].status
+                            item.needConfirmed = !(item.confirmedSchools.find(sch => sch.id === this.$store.state.userInfo.schoolCode)?.status)
                             // item.confirmed = item.confirmedSchools[0].status
                         }
                         return item

+ 22 - 3
TEAMModelOS/Controllers/Analysis/ClassAnalysisController.cs

@@ -31,6 +31,9 @@ using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
 using System.Net;
 using System.Net.Http.Json;
+using TEAMModelOS.SDK.Models.Dtos;
+using FastJSON;
+using HTEXLib.COMM.Helpers;
 
 namespace TEAMModelOS.Controllers.Analysis
 {
@@ -98,21 +101,37 @@ namespace TEAMModelOS.Controllers.Analysis
 
                 }
                 double teacherCount = 0;
-                await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: $"SELECT count(1) as teachers FROM c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Teacher-{code}") }))
+                List<string> ids = new();
+                await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: $"SELECT c.id FROM c where c.status = 'join'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Teacher-{code}") }))
                 {
                     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())
                         {
-                            if (obj.TryGetProperty("teachers", out JsonElement teachers))
+                            if (obj.TryGetProperty("id", out JsonElement id))
                             {
-                                teacherCount = teachers.GetDouble();
+                                ids .Add(id.GetString());
                             }
                         }
                     }
 
                 }
+                var content = new StringContent(ids.ToJsonString(), Encoding.UTF8, "application/json");
+                string userJosn = await _coreAPIHttpService.GetUserInfos(content);
+                List<ufo> tmdInfos = new();
+                if (!string.IsNullOrWhiteSpace(userJosn)) {
+                    try
+                    {
+                        tmdInfos = userJosn.ToObject<List<ufo>>();
+                        
+                    }
+                    catch (Exception ex)
+                    {
+                        await _dingDing.SendBotMsg($"{_coreAPIHttpService.options.location}用户转换失败:{_coreAPIHttpService.options.coreUrl}{userJosn}\n ", GroupNames.醍摩豆服務運維群組);
+                    }
+                }
+                teacherCount = tmdInfos.Count;
                 double studentCount = 0;
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Student").GetItemQueryStreamIterator(queryText: $"SELECT count(1) as stus FROM c where c.periodId = '{pId}' and (c.graduate = 0 OR IS_DEFINED(c.graduate) = false) ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base-{code}") }))
                 {

文件差異過大導致無法顯示
+ 710 - 385
TEAMModelOS/Controllers/Common/ActivityController.cs


+ 0 - 3
TEAMModelOS/Controllers/Common/ArtController.cs

@@ -880,9 +880,6 @@ namespace TEAMModelOS.Controllers.Common
                     {
                         return Ok(new { art, classes, music, count = rmembers.Count, code = 200 });
                     }
-
-
-
                 }
                 else
                 {

+ 4 - 4
TEAMModelOS/TEAMModelOS.csproj

@@ -74,11 +74,11 @@
     <SpaRoot>ClientApp\</SpaRoot>
     <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
     <UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-    <Version>5.2312.13</Version>
-    <AssemblyVersion>5.2312.13.1</AssemblyVersion>
-    <FileVersion>5.2312.13.1</FileVersion>
+    <Version>5.2312.20</Version>
+    <AssemblyVersion>5.2312.20.1</AssemblyVersion>
+    <FileVersion>5.2312.20.1</FileVersion>
     <Description>TEAMModelOS(IES5)</Description>
-    <PackageReleaseNotes>IES版本说明版本切换标记5.2312.13.1</PackageReleaseNotes>
+    <PackageReleaseNotes>IES版本说明版本切换标记5.2312.20.1</PackageReleaseNotes>
     <PackageId>TEAMModelOS</PackageId>
     <Authors>teammodel</Authors>
     <Company>醍摩豆(成都)信息技术有限公司</Company>

+ 1 - 1
TEAMModelOS/appsettings.Development.json

@@ -18,7 +18,7 @@
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction-test.chinacloudsites.cn/api/",
     //"HttpTrigger": "http://localhost:7071/api/"
-    "Version": "5.2312.13.1"
+    "Version": "5.2312.20.1"
   },
   "Azure": {
     // 测试站数据库

+ 1 - 1
TEAMModelOS/appsettings.json

@@ -18,7 +18,7 @@
     "Exp": 86400,
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction.chinacloudsites.cn/api/",
-    "Version": "5.2312.13.1"
+    "Version": "5.2312.20.1"
   },
   "Azure": {
     "Storage": {