Преглед на файлове

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

zhouj1203@hotmail.com преди 1 година
родител
ревизия
33fde865ab
променени са 24 файла, в които са добавени 1180 реда и са изтрити 791 реда
  1. 18 13
      TEAMModelBI/ClientApp/src/view/areaServe/areamanage.vue
  2. 8 2
      TEAMModelBI/ClientApp/src/view/schoolServe/school.vue
  3. 72 33
      TEAMModelBI/ClientApp/src/view/userInquire/details.vue
  4. 2 2
      TEAMModelBI/ClientApp/src/view/userInquire/socrates.vue
  5. 118 1
      TEAMModelOS.SDK/Context/Constant/ResponseCode.cs
  6. 118 0
      TEAMModelOS.SDK/Helper/Common/ReflectorExtensions/ObjectCopyConvert.cs
  7. 12 3
      TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs
  8. 40 0
      TEAMModelOS.SDK/Models/Cosmos/Common/IotTeachingData.cs
  9. 5 0
      TEAMModelOS.SDK/Models/Cosmos/School/Elegant.cs
  10. 26 2
      TEAMModelOS.SDK/Models/Service/BI/BIProdAnalysis.cs
  11. 1 0
      TEAMModelOS/ClientApp/public/mw6hwxpgKz.txt
  12. 4 0
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.less
  13. 39 17
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue
  14. 3 3
      TEAMModelOS/ClientApp/src/router/routes.js
  15. 5 1
      TEAMModelOS/ClientApp/src/view/joinSchool/JoinSchool.vue
  16. 1 1
      TEAMModelOS/ClientApp/src/view/login/Index.vue
  17. 2 2
      TEAMModelOS/ClientApp/src/view/mycourse/MyCourse.vue
  18. 178 529
      TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue
  19. 306 143
      TEAMModelOS/ClientApp/src/view/signupActivity/infoActivity copy.vue
  20. 119 0
      TEAMModelOS/ClientApp/src/view/signupActivity/setActivity.vue
  21. 14 1
      TEAMModelOS/ClientApp/src/view/student-web/AppiView.less
  22. 3 2
      TEAMModelOS/Controllers/Both/CourseBaseController.cs
  23. 54 4
      TEAMModelOS/Controllers/Common/ActivityController.cs
  24. 32 32
      TEAMModelOS/appsettings.Development.json

+ 18 - 13
TEAMModelBI/ClientApp/src/view/areaServe/areamanage.vue

@@ -866,24 +866,29 @@ export default {
     function updateShortcode(data,index){
       let shortCodes=data;let dataIndex=index
       console.log(shortCodes.length,'长度')
-      if(shortCodes.length !==6 && shortCodes.length !==0){
-        ElMessage.error('简码需6位字母或数字,请重新填写')
-        optionData.value[dataIndex].shortCode=curTarget.value.text
-      }else if(shortCodes.length ===0){
-        let data={id:curTarget.value.id,name:curTarget.value.name,shortCode:shortCodes}
+      // if(shortCodes.length !==6 && shortCodes.length !==0){
+      //   ElMessage.error('简码需6位字母或数字,请重新填写')
+      //   optionData.value[dataIndex].shortCode=curTarget.value.text
+      // }else if(shortCodes.length ===0){
+      //   let data={id:curTarget.value.id,name:curTarget.value.name,shortCode:shortCodes}
+      //   proxy.$api.updateAreacode(data).then((res)=>{
+      //     console.log(res,'updateCode back')
+      //     res.state === 200 ? ElMessage.success('更新成功'):ElMessage.error('操作成功')
+      //   })
+      //   curTarget.value.index=-1
+      // }else{
+      //   let data={id:curTarget.value.id,name:curTarget.value.name,shortCode:shortCodes}
+      //   proxy.$api.updateAreacode(data).then((res)=>{
+      //     console.log(res,'updateCode back')
+      //     res.state === 200 ? ElMessage.success('更新成功'):ElMessage.error('操作成功')
+      //   })
+      //   curTarget.value.index=-1
+      // } let data={id:curTarget.value.id,name:curTarget.value.name,shortCode:shortCodes}
         proxy.$api.updateAreacode(data).then((res)=>{
           console.log(res,'updateCode back')
           res.state === 200 ? ElMessage.success('更新成功'):ElMessage.error('操作成功')
         })
         curTarget.value.index=-1
-      }else{
-        let data={id:curTarget.value.id,name:curTarget.value.name,shortCode:shortCodes}
-        proxy.$api.updateAreacode(data).then((res)=>{
-          console.log(res,'updateCode back')
-          res.state === 200 ? ElMessage.success('更新成功'):ElMessage.error('操作成功')
-        })
-        curTarget.value.index=-1
-      }
     }
     //table按钮
     async function operation (index, row, state) {

+ 8 - 2
TEAMModelBI/ClientApp/src/view/schoolServe/school.vue

@@ -1503,12 +1503,18 @@ export default {
         ElMessage.error('API异常,规模版本排序失败')
       })
     }
-    //版本筛选变化
+    //版本筛选变化 
+    // ※版本判定:1.學校管理(IPDYZYLC) + 學情分析(YMPCVCIM)=「標準版」 
+    //           2.學校管理(IPDYZYLC) + 學情分析(YMPCVCIM) + 五育看板(YPXSJ6NJ) =「專業版」
     function versionsEstimate (val) {
       console.log(shouldFilter.value)
       let arrState = shouldFilter.value
       let marjorArr = []; let standardArr = []; let basicsArr = []; let customArr = [];
-      debugger;
+      // debugger;
+      // arrState.major ? originalData.value.forEach((item) => { (item.edition == null || item.edition.scaleVersion == null || item.edition.scaleVersion == "") && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') ? marjorArr.push(item) : '' }) : ''
+      // arrState.standard ? originalData.value.forEach((item) => { (item.edition == null || item.edition.scaleVersion == null || item.edition.scaleVersion == "") && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? standardArr.push(item) : '' }) : ''
+      // arrState.basics ? originalData.value.forEach((item) => { (item.edition == null || item.edition.scaleVersion == null || item.edition.scaleVersion == "") && !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') ? basicsArr.push(item) : '' }) : ''
+      // arrState.custom ? originalData.value.forEach((item) => { item.edition !== null && item.edition.scaleVersion !== null && item.edition.scaleVersion !== "" ? customArr.push(item) : '' }) : ''
       // 專業版
       arrState.major ? originalData.value.forEach((item) => { 
         //debugger;

+ 72 - 33
TEAMModelBI/ClientApp/src/view/userInquire/details.vue

@@ -32,15 +32,10 @@
                             <p class="item-title">{{item.title}}</p>
                             <div class="item-content" v-show="item.state">
                                 <div class="content-left">
-                                    <p>{{item.subhead1}}</p>
-                                    <span>{{item.subhead1Value}}</span>
-                                </div>
-                                <div class="content-left">
-                                    <p>{{item.subhead2}}</p>
-                                    <span>{{item.subhead2Value}}</span>
+                                    <span>上次登陆时间:{{item.subhead2Value}}</span>
                                 </div>
                             </div>
-                            <div class="notenabled-title" v-show="!item.state">未使用</div>
+                            <div class="notenabled-title" v-show="!item.state">近期未使用</div>
                         </div>
                     </div>
         </div>
@@ -73,27 +68,34 @@
                     <div>空间与权益</div>
                     <div class="expire">到期日:XXXXX</div>
                 </div>
-                <el-divider />
-                <div class="size-label">
-                    <div class="size-item" v-for="item in gaugelabels" :key="item.id">
-                        <div class="size-value" :style="{'color':item.color}">{{item.value}}%</div>
-                        <div class="size-title">{{item.title}}</div>
+                <el-divider /> 
+                <div class="sizestate" v-if="sizeandequity ==='size'">
+                    <div class="size-label">
+                        <div class="size-item" v-for="item in gaugelabels" :key="item.id">
+                            <div class="size-value" :style="{'color':item.color}">{{item.value}}%</div>
+                            <div class="size-title">{{item.title}}</div>
+                        </div>
+                         </div>
+                        <el-divider />
+                        <div class="login-echart">
+                            <commonGaugeVue :gaugeData="gaugedata"></commonGaugeVue>
                     </div>
                 </div>
-                <el-divider />
-                <div class="login-echart">
-                    <commonGaugeVue :gaugeData="gaugedata"></commonGaugeVue>
-                </div>
-                <el-divider />
-                <div class="rightsbox">
-                    <p class="rightsbox-title">权益列表:</p>
-                    <div class="rightsbox-content">
-                        <div class="rightsbox-item" v-for="item in rightsdata" :key="item.key">
-                            <div class="rightsbox-item-name">{{item.name}}</div>
-                            <div class="rightsbox-item-time">到期日:{{item.time}}</div>
+                <div class="equitystate" v-else>
+                    <div class="rightsbox">
+                        <p class="rightsbox-title">权益列表:</p>
+                        <div class="rightsbox-content">
+                            <div class="rightsbox-item" v-for="item in rightsdata" :key="item.key">
+                                <div class="rightsbox-item-name">{{item.name}}</div>
+                                <div class="rightsbox-item-time">到期日:{{item.time}}</div>
+                            </div>
                         </div>
                     </div>
                 </div>
+                <div class="tab-state">
+                    <div :class="[sizeandequity ==='size' ? 'opts':'','tab-state-btn']" @click="sizeandequity='size'">我的空间</div>
+                    <div :class="[sizeandequity !=='size' ? 'opts':'','tab-state-btn']" @click="sizeandequity='equity'">我的权益</div>
+                </div>
             </div>
             <div class="iesdiv">
                 <div  class="common-header-title">
@@ -148,6 +150,7 @@ let { proxy } = getCurrentInstance()
 let activeName = ref('basics')
 let userdetailState=ref(false)
 let tabPosition = ref('left')
+let sizeandequity=ref('size')
 let usernames=ref('')
 let userdata = ref([
     { id: 1, icon: '#icon-ic_idcard', value: '0', title: '',key:'integral',check:false ,hint:'用户ID'},
@@ -158,10 +161,10 @@ let userdata = ref([
     { id: 6, icon: '#icon-shijian2', value: '2023-04-23', title: '', key: 'time', check: false ,hint:'上次登录时间' },
 ])
 let productdata = ref([
-    { id: 1, title: 'HiTeach', subhead1: '课堂总时长', subhead1Value: '13H', subhead2: '课堂数量', subhead2Value: 25,key:'HiTeach',state: false },
-    { id: 2, title: 'HiTA', subhead1: '使用时长', subhead1Value: '13H', subhead2: '协助课堂', subhead2Value: 199, key:'HiTA',state: false },
-    { id: 3, title: 'IES', subhead1: '使用资源课程', subhead1Value: '159', subhead2: '贡献资源数量', subhead2Value: 13, key:'IES', state: false },
-    { id: 4, title: '苏格拉底', subhead1: '上传影片', subhead1Value: '9', subhead2: '议课数量', subhead2Value: 15,key:'Socrates', state: false },
+    { id: 1, title: 'HiTeach', value:0,key:'HiTeach',state: false },
+    { id: 2, title: 'HiTA',value:0, key:'HiTA',state: false },
+    { id: 3, title: 'IES', value:0,key:'IES', state: false },
+    { id: 4, title: '苏格拉底', value:0,key:'Socrates', state: false },
 ])
 let tableData = ref([
     { time: '2023-07-05 15:33', ip: '222.209.14.199', location: '四川省成都市',platform:'HiTeach' },
@@ -443,11 +446,15 @@ function initdata() {
     userdata.value[4].value = 'XXXX'
     userdata.value[5].value = 'XXXX-XX-XX'
     //产品使用及安装情况
-    let {hiteach,hita,ies5,sokrates}=transmitData
-    transmitData.hasOwnProperty('hiteach') && Object.keys(hiteach).length !== 0 ? (productdata.value[0].state=true,productdata.value[0].subhead1Value=hiteach.subhead1Value,productdata.value[0].subhead2Value=hiteach.subhead2Value):productdata.value[0].state=false
-    transmitData.hasOwnProperty('hita') && Object.keys(hita).length !== 0 ? (productdata.value[1].state=true,productdata.value[1].subhead1Value=hita.subhead1Value,productdata.value[1].subhead2Value=hita.subhead2Value):productdata.value[1].state=false
-    transmitData.hasOwnProperty('ies5') && Object.keys(ies5).length !== 0 ? (productdata.value[2].state=true,productdata.value[2].subhead1Value='XXX',productdata.value[2].subhead2Value='XXX'):productdata.value[2].state=false
-    transmitData.hasOwnProperty('sokrates') && Object.keys(sokrates).length !== 0 ? (productdata.value[3].state=true,productdata.value[3].subhead1Value='XXX',productdata.value[3].subhead2Value='XXX'):productdata.value[3].state=false
+    let {login}=transmitData
+    if(login.length >0){
+       login.forEach(item => {
+         let typename=item.product
+         productdata.value.forEach(items=>{
+            typename === items.key ? items.value === 0 ? (items.value=item.time,items.state=true): item.time > items.value ? (items.value=item.time,items.state=true):'':''
+         })
+       })
+    }
     //空间与权益
     let {usedSize,teachSize,totalSize,surplusSize}=transmitData.ies5
     let usePercentum=parseInt(((Number(bytesToGB(usedSize))+Number(bytesToGB(teachSize)))/Number(bytesToGB(totalSize)))*100);let useGsize=proxy.$common.convertSize(usedSize)
@@ -569,7 +576,7 @@ onMounted(() => {
 .item-content{
     width:100%;
     display: flex;
-    justify-content: space-between;
+    justify-content: center;
 }
 .content-left,.content-right{
     margin-top:5px;
@@ -644,6 +651,38 @@ onMounted(() => {
     background-color: #fff;
     border-radius: 5px;
     box-shadow: rgba(0, 0, 0, 0.3) 0px 3px 8px;
+    position: relative;
+}
+.tab-state{
+    position:absolute;
+    width:18px;
+    right:-18px;
+    top:0px;
+    display: flex;
+    flex-wrap: wrap;
+}
+.tab-state-btn{
+    width:100%;
+    line-height: 14px;
+    font-size:14px;
+    padding: 2px;
+    border: 1px solid #ccc; /* 设置整个边框 */
+    border-left: none; /* 取消左边边框 */
+    border-radius: 0 5px 5px 0px;
+    color:#bbbecd;
+    cursor: pointer;
+    background-color: #c8c9cc;
+    color:#fff;
+    margin-top:1px;
+}
+.tab-state-btn:nth-child(2){
+    margin-top: 5px;
+}
+.opts{
+    background-color:#79bbff;
+    outline:none;
+    border-color:#79bbff;
+    color:#fff;
 }
 .size-label{
     width:100%;

+ 2 - 2
TEAMModelBI/ClientApp/src/view/userInquire/socrates.vue

@@ -189,9 +189,9 @@ let auxiliary=ref([
  function initdatas(){
     console.log(props,'苏格拉底')
     primary.value[0].value='XXX'
-    primary.value[1].value=props.sokratesdatas.t_green
+    primary.value[1].value='XXX'
     primary.value[2].value='XXX'
-    primary.value[3].value=props.sokratesdatas.t_data
+    primary.value[3].value='XXX'
 
     auxiliary.value[0].value='XXX'
     auxiliary.value[1].value='XXX'

+ 118 - 1
TEAMModelOS.SDK/Context/Constant/ResponseCode.cs

@@ -58,6 +58,123 @@ namespace TEAMModelOS
         /// 响应超时
         /// </summary>
         public readonly static int TIMEOUT_ERROR = 503;
-        
+
+        #region 返回状态码
+        /// <summary>
+        /// 成功  200
+        /// </summary>
+        public readonly static int _200Ok = 200;
+
+        /// <summary>
+        /// 部分创建成功  201
+        /// </summary>
+        public readonly static int _201Created = 201;
+
+        /// <summary>
+        /// 已接受请求,处理未完成  202
+        /// </summary>
+        public readonly static int _202Accepted = 202;
+
+        /// <summary>
+        /// 非授权信息  203
+        /// </summary>
+        public readonly static int _203NonUnauthorizedInfo = 203;
+
+        /// <summary>
+        ///  服务器成功处理了请求,但没有返回任何内容。  204
+        /// </summary>
+        public readonly static int _204NoContent = 204;
+
+        /// <summary>
+        /// 参数错误  400
+        /// </summary>
+        public readonly static int _400ParamsError = 400;
+
+        /// <summary>
+        /// 未授权 请求要求身份验证  401
+        /// </summary>
+        public readonly static int _401Unauthorized = 401;
+
+        /// <summary>
+        /// 需要付费  402
+        /// </summary>
+        public readonly static int _402PaymentRequired = 402;
+
+        /// <summary>
+        /// 服务器拒绝/禁用  403
+        /// </summary>
+        public readonly static int _403Forbidden = 403;
+
+        /// <summary>
+        /// 密码错误
+        /// </summary>
+        public readonly static int _40301ForbiddenPwd = 40301;
+
+        /// <summary>
+        /// 未找到    404
+        /// </summary>
+        public readonly static int _404NotFound = 404;
+
+        /// <summary>
+        /// 方法不可用  405
+        /// </summary>
+        public readonly static int _405NotAllow = 405;
+
+        /// <summary>
+        /// 请求超时   408
+        /// </summary>
+        public readonly static int _408RespondTimeOut = 408;
+
+        /// <summary>
+        /// 已存在   409
+        /// </summary>
+        public readonly static int _409Conflict = 409;
+
+        /// <summary>
+        /// 过期    410
+        /// </summary>
+        public readonly static int _410Gone = 410;
+
+        /// <summary>
+        /// 异常 411
+        /// </summary>
+        public readonly static int _411Abnormal = 411;
+
+        /// <summary>
+        /// 不支持的媒体类型  415
+        /// </summary>
+        public readonly static int _415NoMediaType = 415;
+
+        /// <summary>
+        /// 创建失败
+        /// </summary>
+        public readonly static int _417CreateFailed = 417;
+
+        /// <summary>
+        /// 服务器错误  500
+        /// </summary>
+        public readonly static int _500Error = 500;
+
+        /// <summary>
+        /// 服务器拒绝
+        /// </summary>
+        public readonly static int _501Refuse = 501;
+
+        /// <summary>
+        /// 网关错误 502
+        /// </summary>
+        public readonly static int _502GatewayError = 502;
+
+        /// <summary>
+        /// 网关超时  504
+        /// </summary>
+        public readonly static int _504GatewayTimeOut = 504;
+
+        /// <summary>
+        /// 存储不足   507
+        /// </summary>
+        public readonly static int _507InsufficientStorage = 507;
+        #endregion
+
     }
 }

+ 118 - 0
TEAMModelOS.SDK/Helper/Common/ReflectorExtensions/ObjectCopyConvert.cs

@@ -0,0 +1,118 @@
+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
+{
+    public static class ObjectCopyConvert
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <typeparam name="ST"></typeparam>
+        /// <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) {
+            ST? source = json.ToObject<ST>();
+            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);
+                var data_source = sourceProperty.GetValue(source);
+                if (targetProperty != null && sourceProperty.GetValue(source) != null)
+                {
+                    // JsonElement element_source = data_source!.ToJsonString().ToObject<JsonElement>();
+                    //var data_target = targetProperty.GetValue(target);
+                    //JsonElement element_target = data_target != null ? data_target.ToJsonString().ToObject<JsonElement>() : default;
+                    JsonElement temp = default;
+                    if (json.TryGetProperty(sourceProperty.Name, out temp)
+                        //驼峰命名,首字母小写
+                        || json.TryGetProperty($"{sourceProperty.Name.Substring(0, 1).ToLower()}{sourceProperty.Name.Substring(1)}", out temp))
+                    {
+                        if (filter.IsEmpty())
+                        {
+                            //只要传递了值才会运行此处
+                            targetProperty.SetValue(target, sourceProperty.GetValue(source));
+                        }
+                        else
+                        {
+                            if (filter!.Contains(targetProperty.Name))
+                            {
+                                targetProperty.SetValue(target, sourceProperty.GetValue(source));
+                            }
+                        }
+                    }
+                    else
+                    {
+                        // Console.WriteLine("默认值,如数字,bool类型下的默认值");
+                    }
+                    //var json=  sourceProperty.GetValue(source)!.ToJsonString().ToObject<JsonElement>();
+                    //判断数字类型,如果前后数字相同,则不赋值,防止出现0这种。
+                    //判断True ,如果相同,也不赋值,防止出现
+                }
+            }
+        }
+        /// <summary>
+        /// 复制类型
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <typeparam name="V"></typeparam>
+        /// <param name="json"></param>
+        /// <param name="target"></param>
+        /// <param name="filter"></param>
+        public static void CopyToSameProperty<S, T>(this JsonElement json, T target, List<string>? filter = null)
+        {
+            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 );
+                var data_source = sourceProperty.GetValue(source);
+                if (targetProperty != null && sourceProperty.GetValue(source) != null)
+                {
+                    // JsonElement element_source = data_source!.ToJsonString().ToObject<JsonElement>();
+                    //var data_target = targetProperty.GetValue(target);
+                    //JsonElement element_target = data_target != null ? data_target.ToJsonString().ToObject<JsonElement>() : default;
+                    JsonElement temp = default;
+                    if (json.TryGetProperty(sourceProperty.Name, out temp)
+                        //驼峰命名,首字母小写
+                        || json.TryGetProperty($"{sourceProperty.Name.Substring(0, 1).ToLower()}{sourceProperty.Name.Substring(1)}", out temp))
+                    {
+                        if (filter.IsEmpty())
+                        {
+                            //只要传递了值才会运行此处
+                            targetProperty.SetValue(target, sourceProperty.GetValue(source));
+                        }
+                        else {
+                            if (filter!.Contains(targetProperty.Name))
+                            {
+                                targetProperty.SetValue(target, sourceProperty.GetValue(source));
+                            }
+                        }
+                    }
+                    else {
+                       // Console.WriteLine("默认值,如数字,bool类型下的默认值");
+                    }
+                    //var json=  sourceProperty.GetValue(source)!.ToJsonString().ToObject<JsonElement>();
+                    //判断数字类型,如果前后数字相同,则不赋值,防止出现0这种。
+                    //判断True ,如果相同,也不赋值,防止出现
+                   
+                }
+            }
+        }
+    }
+}

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

@@ -2,10 +2,11 @@
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Linq;
+using System.Net.Mail;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace TEAMModelOS.SDK.Models.Cosmos.Common
+namespace TEAMModelOS.SDK.Models
 {
     public class Activity : CosmosEntity
     {
@@ -14,27 +15,32 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         public Activity() {
             pk="Activity";
         }
+        [Required(ErrorMessage = "Required")]
         public string name { get; set; }
+        [Required(ErrorMessage = "Required")]
         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<string> attachment { get; set; } = new List<string>();
+        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>
         /// "hbcn/区级id,areaId",
         /// </summary>
+        [Required(ErrorMessage = "Required")]
         public string owner { get; set; }
         /// <summary>
         /// "public公开/area区级/school校级",
         /// </summary>
+        [Required(ErrorMessage = "Required")]
         public string scope { get; set; }
         /// <summary>
         /// "enroll/报名制,invite/邀请制",
         /// </summary>
+        [Required(ErrorMessage = "Required")]
         public string joinMode { get; set; }
         /// <summary>
         /// //区级活动时允许参与的学校,如果为空则全部学校
@@ -60,7 +66,10 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         /// 创建时间
         /// </summary>
         public long createTime {  get; set; }
-
+        /// <summary>
+        /// 创建者
+        /// </summary>
+        public string creatorId { get; set; }
     }
 
     /// <summary>

+ 40 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/IotTeachingData.cs

@@ -105,6 +105,38 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         /// 是否送出小數據或SOK服務 0:false 1:true
         /// </summary>
         public string sendSok { get; set; }
+        /// <summary>
+        /// 學習型態-互評 0:false 1:true
+        /// </summary>
+        public string learnPeer { get; set; }
+        /// <summary>
+        /// 學習型態-協作 0:false 1:true
+        /// </summary>
+        public string learnCoop { get; set; }
+        /// <summary>
+        /// 課堂中有使用文字雲 0:false 1:true
+        /// </summary>
+        public string useWordCloud { get; set; }
+        /// <summary>
+        /// 課堂中有使用clouDAS 0:false 1:true
+        /// </summary>
+        public string useClouDAS { get; set; }
+        /// <summary>
+        /// 課堂中有使用GPT 0:false 1:true
+        /// </summary>
+        public string useGPT { get; set; }
+        /// <summary>
+        /// 課堂中有使用IES5測驗模式 0:false 1:true
+        /// </summary>
+        public string useIes5Test { get; set; }
+        /// <summary>
+        /// 課堂中有使用紙本測驗模式 0:false 1:true
+        /// </summary>
+        public string usePaperTest { get; set; }
+        /// <summary>
+        /// 課堂中有使用Excel測驗模式 0:false 1:true
+        /// </summary>
+        public string useExcelTest { get; set; }
     }
 
     /// <summary>
@@ -148,5 +180,13 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         public int item { get; set; } //題數
         public int interact { get; set; } //互動總次數
         public int sendSok { get; set; } //送出小數據或SOK服務
+        public int learnPeer { get; set; } //學習型態-互評
+        public int learnCoop { get; set; } //學習型態-協作
+        public int useWordCloud { get; set; } //課堂中有使用文字雲
+        public int useClouDAS { get; set; } //課堂中有使用clouDAS
+        public int useGPT { get; set; } //課堂中有使用GPT
+        public int useIes5Test { get; set; } //課堂中有使用IES5測驗模式
+        public int usePaperTest { get; set; } //課堂中有使用紙本測驗模式
+        public int useExcelTest { get; set; } //課堂中有使用Excel測驗模式
     }
 }

+ 5 - 0
TEAMModelOS.SDK/Models/Cosmos/School/Elegant.cs

@@ -46,6 +46,11 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public string type { get; set; }
         public List<string> classes { get; set; } = new List<string>();
+        public string target { get; set; }
         public List<Attachment> attachments { get; set; } = new List<Attachment>();
+        /// <summary>
+        /// 业务类型。elegant 德育, art 艺术
+        /// </summary>
+        public string bizCode { get; set; } = "elegant";
     }
 }

Файловите разлики са ограничени, защото са твърде много
+ 26 - 2
TEAMModelOS.SDK/Models/Service/BI/BIProdAnalysis.cs


+ 1 - 0
TEAMModelOS/ClientApp/public/mw6hwxpgKz.txt

@@ -0,0 +1 @@
+b695ac74b5189d16782294274ab65282

+ 4 - 0
TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.less

@@ -132,6 +132,10 @@
                 color: #03966a;
             }
         }
+
+        .course-box {
+            display: inline-block;
+        }
     }
 
     .no-data {

+ 39 - 17
TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue

@@ -2,26 +2,28 @@
     <div class="home-view">
         <Loading v-show="isLoading" bgColor="rgba(0, 0, 0, 0.3)"></Loading>
         <div class="home-head home-card">
-            <div class="home-title-name">
+            <div class="home-title-name title-one">
                 {{ $t("studentWeb.home.title.joinClass") }}
                 <Icon type="md-add-circle" color="#02B35A" size="17" :title="$t('studentWeb.home.joinClass')" @click="isScale ? false : addCourse = true" v-if="getAllCourse.length && !onlySystem" />
-                <div class="course-type" v-if="getAllCourse.length && $store.state.userInfo.scope === 'student'">
-                    <RadioGroup v-model="courseType" @on-change="searchCourse" size="small" type="button" button-style="solid">
-                        <Radio label="all">{{ $t('evaluation.filter.all') }}</Radio>
-                        <Radio label="school">{{ $t('answerSheet.dp.school') }}</Radio>
-                        <Radio label="private">{{ $t('cusMgt.private') }}</Radio>
-                    </RadioGroup>
-                    <!-- <Space direction="vertical" size="large">
-                        <Space> -->
-                            <Input v-model="searchText" :placeholder="$t('studentWeb.home.title.search')" size="small" style="width: 200px">
-                                <template #suffix>
-                                    <Icon type="ios-search" @click="searchCourse" />
-                                </template>
-                            </Input>
-                        <!-- </Space>
-                    </Space> -->
+                <div class="course-box">
+                    <div class="course-type" v-if="getAllCourse.length && $store.state.userInfo.scope === 'student'">
+                        <RadioGroup v-model="courseType" @on-change="searchCourse" size="small" type="button" button-style="solid">
+                            <Radio label="all">{{ $t('evaluation.filter.all') }}</Radio>
+                            <Radio label="school">{{ $t('answerSheet.dp.school') }}</Radio>
+                            <Radio label="private">{{ $t('cusMgt.private') }}</Radio>
+                        </RadioGroup>
+                        <!-- <Space direction="vertical" size="large">
+                            <Space> -->
+                                <Input v-model="searchText" :placeholder="$t('studentWeb.home.title.search')" size="small" style="width: 200px">
+                                    <template #suffix>
+                                        <Icon type="ios-search" @click="searchCourse" />
+                                    </template>
+                                </Input>
+                            <!-- </Space>
+                        </Space> -->
+                    </div>
+                    <Button style="margin-left: 10px;" size="small" type="success" ghost @click="getReview">{{ $t('studentWeb.home.applyList') }}</Button>
                 </div>
-                <Button style="margin-left: 10px;" size="small" type="success" ghost @click="getReview">{{ $t('studentWeb.home.applyList') }}</Button>
             </div>
             <div class="home-join" v-if="allCourseShow.length">
                 <vuescroll>
@@ -951,4 +953,24 @@ export default {
         }
     }
 }
+
+@media screen and (max-width: 520px) {
+    .home-view{
+        .title-one {
+            height: 100px;
+        }
+        .course-box {
+            .course-type {
+                margin-left: 0;
+                .ivu-input-wrapper {
+                    margin: 5px 0;
+                }
+            }
+            .ivu-btn {
+                margin-left: 0 !important;
+            }
+        }
+    }
+}
+
 </style>

+ 3 - 3
TEAMModelOS/ClientApp/src/router/routes.js

@@ -1497,9 +1497,9 @@ export const routes = [{
     {
         path: 'activitySet',
         name: 'activitySet',
-        component: () => import('@/view/signupActivity/manageActivity.vue'),
+        component: () => import('@/view/signupActivity/setActivity.vue'),
         meta: {
-            activeName: 'activityManage',
+            activeName: 'activitySet',
         }
     }
     ]
@@ -1956,7 +1956,7 @@ export const routes = [{
         {
             path: 'areaActivitySet',
             name: 'areaActivitySet',
-            component: () => import('@/view/signupActivity/manageActivity.vue'),
+            component: () => import('@/view/signupActivity/setActivity.vue'),
             meta: {
                 activeName: 'areaActivityManage',
             }

+ 5 - 1
TEAMModelOS/ClientApp/src/view/joinSchool/JoinSchool.vue

@@ -56,7 +56,11 @@ export default {
             this.isJoin = true
             this.$Message.success(this.$t('cusMgt.join.joinOk'))
           } else {
-            this.$Message.error(res.msg)
+            if(res.error === 3){
+              this.$Message.warning(this.$t('home.schoolSuccess'))
+            }else{
+              this.$Message.error(this.$t('cusMgt.join.joinErr'))
+            }
           }
         },
         err => {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/login/Index.vue

@@ -549,7 +549,7 @@ export default {
     }
 
     //TEAMModelID 社群登入資訊
-    this.userOauth.code = this.$route.query.code
+    this.userOauth.code = this.$route.query.code || this.$route.query.ticket
     this.userOauth.state = this.$route.query.state
 
     // 社群帳號登入

+ 2 - 2
TEAMModelOS/ClientApp/src/view/mycourse/MyCourse.vue

@@ -113,9 +113,9 @@
 						<span @click="selectTab('score')" :class="tabName == 'score' ? 'course-classroom-label pane active':'course-classroom-label pane'">
 							{{$t('cusMgt.cusTab7')}}
 						</span>
-						<span @click="selectTab('classSyllabus')" :class="tabName == 'classSyllabus' ? 'course-classroom-label pane active':'course-classroom-label pane'">
+						<!-- <span @click="selectTab('classSyllabus')" :class="tabName == 'classSyllabus' ? 'course-classroom-label pane active':'course-classroom-label pane'">
 							{{$t('cusMgt.cusTab13')}}
-						</span>
+						</span> -->
 					</div>
 					<!-- 评测活动 -->
 					<Exam v-if="tabName == 'exam'" v-model="fIds" :gradeParams="gradeParams" :students="students" :classInfo="teaClassList[curClassIndex]" :courseInfo="courseInfo" :teaClassList="teaClassList"> </Exam>

+ 178 - 529
TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue

@@ -101,12 +101,24 @@
                                                 <FormItem label="填报信息">
                                                     <CheckboxGroup v-model="activityData.infoArr">
                                                         <Checkbox v-for="(item, index) in infoArr" :key="index" :label="item.value">{{ item.label }}</Checkbox>
+                                                        <Icon type="md-add-circle" @click="addInfoType = true" v-show="!addInfoType" size="18" />
+                                                        <div v-show="addInfoType">
+                                                            <Input v-model="addInfo" placeholder="自定义填报的信息" style="width: 300px"></Input>
+                                                            <Icon type="md-checkmark-circle" size="18" style="margin: 0 10px;" @click="addInform()" />
+                                                            <Icon type="md-close-circle" size="18" @click="addInfoType = false" />
+                                                        </div>
                                                     </CheckboxGroup>
                                                 </FormItem>
                                                 <FormItem label="报名方式">
                                                     <RadioGroup v-model="activityData.applicationType">
                                                         <Radio :label="1">{{ '报名制' }}</Radio>
                                                         <Radio :label="2">{{ '邀请制' }}</Radio>
+                                                        <Select v-model="schoolChange" multiple filterable v-show="activityData.applicationType === 2 && isArea === 'area'" style="width: 500px" placeholder="选择参加活动的学校">
+                                                            <Option v-for="format in schoolList" :value="format.code" :key="format.code">{{ format.name }}</Option>
+                                                        </Select>
+                                                        <Select v-model="schoolChange" multiple filterable v-show="activityData.applicationType === 2 && isArea === 'school'" style="width: 500px" placeholder="选择参加活动的学校">
+                                                            <Option v-for="format in teacherList" :value="format.code" :key="format.code">{{ format.name }}</Option>
+                                                        </Select>
                                                     </RadioGroup>
                                                 </FormItem>
                                                 <!-- 邀请制且团队赛,按照教研组分组,组长为教研组组长 -->
@@ -182,13 +194,14 @@
                                                     <DatePicker :editable="false" @on-change="getReviewTime" type="datetimerange" format="yyyy-MM-dd HH:mm" :placeholder="$t('train.create.timeHolder')" style="width: 500px"></DatePicker>
                                                 </FormItem>
                                                 <FormItem label="评审规则">
-                                                    <Select v-model="activityData.review" style="width:200px">
+                                                    <Select v-model="activityData.review" transfer style="width:200px">
                                                         <Option v-for="item in reviewList" :value="item.value" :key="item.value">
                                                             {{ item.label }}
-                                                            <span @click="ruleDrawer = true">预览</span>
+                                                            <span @click.stop="ruleDrawer = true">预览</span>
+                                                            <span @click.stop="reviewEditRule()">编辑</span>
                                                         </Option>
                                                     </Select>
-                                                    <Icon size="20" type="md-add-circle" @click="ruleDrawerAdd = true" />
+                                                    <Icon size="20" type="md-add-circle" @click="drawerRule()" />
                                                 </FormItem>
                                             </div>
                                         </div>
@@ -242,7 +255,7 @@
                 <Table row-key="id" :columns="ruleColumns" :data="ruleInfo.children"></Table>
             </div>
         </Drawer>
-        <Drawer title="添加评审规则" :width="50" :closable="false" v-model="ruleDrawerAdd">
+        <Drawer title="添加评审规则" :width="50" :closable="false" v-model="ruleDrawerAdd" class="light-iview-form">
             <Form :model="processInfo" :label-width="80" class="create-form">
                 <FormItem label="规则名称">
                     <Input v-model="processInfo.name" placeholder="请输入规则名称"></Input>
@@ -250,23 +263,33 @@
                 <FormItem label="规则描述">
                     <Input v-model="processInfo.describe" placeholder="请输入规则描述"></Input>
                 </FormItem>
-                <FormItem label="规则分值">
+                <!-- <FormItem label="规则分值">
                     <Input v-model="processInfo.score" placeholder="请输入分值"></Input>
-                </FormItem>
+                </FormItem> -->
                 <div class="rule-header">
                     <span>分项</span>
                     <span>描述</span>
                     <span>分值</span>
                     <span>操作</span>
                 </div>
-                <Tree :data="ruleTree"></Tree>
+                <el-tree :data="processInfo.rule" node-key="id" default-expand-all :expand-on-click-node="false">
+                    <div class="custom-tree-node" slot-scope="{ node, data }">
+                        <Input v-model="data.name" placeholder="分项名称" style="width: 200px;"></Input>
+                        <Input v-model="data.describe" placeholder="对分项内容进行描述"></Input>
+                        <InputNumber v-model="data.score" :min="1" style="width: 100px;" :disabled="(data.children && data.children.length) ? true : false" @on-change="scoreChange(node, data)" />
+                        <span>
+                            <Button size="small" style="margin-right: 10px;" :disabled="data.isThree" @click="append(node, data)">添加子项</Button>
+                            <Button size="small" type='error' @click="remove(node, data)">删除</Button>
+                        </span>
+                    </div>
+                </el-tree>
             </Form>
-            <div style="margin: 10px 0; text-align: right;">
-                <!-- <span>总分:0</span> -->
-                <Button @click="addRule">添加分项</Button>
+            <div style="margin: 10px 0; display: flex; justify-content: space-between; align-items: center;">
+                <span style="font-size: 20px;">总分:{{ processInfo.score }}</span>
+                <Button @click="addRule()">添加分项</Button>
             </div>
             <div>
-                <Button @click="save">仅本次活动使用</Button>
+                <Button @click="save()">仅本次活动使用</Button>
                 <Button>保存为模板</Button>
             </div>
         </Drawer>
@@ -588,12 +611,13 @@ export default {
                 },
                 {
                     title: '描述',
-                    key: 'describe'
+                    key: 'describe',
                 },
                 {
                     title: '分值',
                     key: 'score',
                     width: 100,
+                    align: 'center',
                 },
             ],
             ruleInfo: {
@@ -644,334 +668,94 @@ export default {
                                 name: '教学过程',
                                 describe: '',
                                 score: 5,
+                                parentId: '106',
                             },
                             {
                                 id: '10601',
                                 name: '教学设计',
                                 describe: '',
                                 score: 5,
+                                parentId: '106',
                             },
                             {
                                 id: '10602',
                                 name: '融合创新',
                                 describe: '',
                                 score: 5,
+                                parentId: '106',
                             },
                             {
                                 id: '10603',
                                 name: '技术应用',
                                 describe: '',
                                 score: 5,
+                                parentId: '106',
                             },
                             {
                                 id: '10604',
                                 name: '教学效果',
                                 describe: '',
                                 score: 5,
+                                parentId: '106',
                             },
                         ],
                     },
                 ],
             },
-            processInfo: {
-                rule: [
-                    {
+            processInfo: {},
+            timer: null,
+            treeType: '',
+            editRule: false,
+            dataRuleMould: [{
+                id: 1,
+                name: '',
+                describe: '',
+                score: null,
+                children: [{
+                    id: 2,
+                    name: '',
+                    describe: '',
+                    score: null,
+                    children: [{
+                        id: 3,
                         name: '',
                         describe: '',
                         score: null,
-                        nodeKey: 0,
-                        children: [
-                            {
-                                name: '',
-                                describe: '',
-                                score: null,
-                                nodeKey: 1,
-                                children: [
-                                    {
-                                        name: '',
-                                        describe: '',
-                                        score: null,
-                                    }
-                                ],
-                            }
-                        ],
-                    }
-                ]
-            },
-            ruleTree: [
+                        isThree: true,
+                    }]
+                }]
+            }],
+            addInfoType: false,
+            addInfo: '',
+            schoolList: [
                 {
-                    title: '1',
-                    expand: true,
-                    name: '',
-                    describe: '',
-                    score: null,
-                    render: (h, { root, node, data }) => {
-                        return h('div', [
-                            h('Input', {
-                                props: {
-                                    value: data.name,
-                                    placeholder: '一级分项',
-                                },
-                                style: {
-                                    width: '20%',
-                                    marginRight: '10px',
-                                },
-                                on: {
-                                    'on-change': value => {
-                                        console.log(data, value);
-                                        if(value.data !== null) {
-                                            that.inputChange(data, value, 'name')
-                                        }
-                                    }
-                                },
-                            }),
-                            h('Input', {
-                                props: {
-                                    value: data.describe,
-                                    placeholder: '对分项内容进行描述',
-                                },
-                                style: {
-                                    width: '65%',
-                                    marginRight: '10px',
-                                },
-                                on: {
-                                    'on-change': value => {
-                                        console.log(data, value);
-                                        if(value.data !== null) {
-                                            that.inputChange(data, value, 'describe')
-                                        }
-                                    }
-                                },
-                            }),
-                            h('Input', {
-                                props: {
-                                    value: data.score,
-                                },
-                                style: {
-                                    width: '9%',
-                                    marginRight: '10px',
-                                },
-                                on: {
-                                    'on-change': value => {
-                                        console.log(data, value);
-                                        if(value.data !== null) {
-                                            that.inputChange(data, value, 'score')
-                                        }
-                                    }
-                                },
-                            }),
-                            h('span', [
-                                h('Button', {
-                                    props: {
-                                        // type: 'error',
-                                        size: 'small',
-                                    },
-                                    style: {
-                                        marginRight: '10px',
-                                    },
-                                    on: {
-                                        click:() => {
-                                            that.append(data)
-                                        }
-                                    },
-                                }, '插入'),
-                                h('Button', {
-                                    props: {
-                                        type: 'error',
-                                        size: 'small',
-                                    },
-                                    /* style: {
-                                        width: '13%',
-                                    }, */
-                                    on: {
-                                        click:() => {
-                                            that.remove(root, node, data)
-                                        }
-                                    },
-                                }, '删除'),
-                            ])
-                        ], data.title)
-                    },
-                    children: [
-                        {
-                            title: '101',
-                            expand: true,
-                            name: '',
-                            describe: '',
-                            score: null,
-                            render: (h, { root, node, data }) => {
-                                return h('div', [
-                                    h('Input', {
-                                        props: {
-                                            value: data.name,
-                                            placeholder: '二级分项',
-                                        },
-                                        style: {
-                                            width: '20%',
-                                            marginRight: '10px',
-                                        },
-                                        on: {
-                                            'on-change': value => {
-                                                console.log(data, value);
-                                                if(value.data !== null) {
-                                                    that.inputChange(data, value, 'name')
-                                                }
-                                            }
-                                        },
-                                    }),
-                                    h('Input', {
-                                        props: {
-                                            value: data.describe,
-                                            placeholder: '对分项内容进行描述',
-                                        },
-                                        style: {
-                                            width: '62.9%',
-                                            marginRight: '10px',
-                                        },
-                                        on: {
-                                            'on-change': value => {
-                                                console.log(data, value);
-                                                if(value.data !== null) {
-                                                    that.inputChange(data, value, 'describe')
-                                                }
-                                            }
-                                        },
-                                    }),
-                                    h('Input', {
-                                        props: {
-                                            value: data.score,
-                                        },
-                                        style: {
-                                            width: '9%',
-                                            marginRight: '10px',
-                                        },
-                                        on: {
-                                            'on-change': value => {
-                                                console.log(data, value);
-                                                if(value.data !== null) {
-                                                    that.inputChange(data, value, 'score')
-                                                }
-                                            }
-                                        },
-                                    }),
-                                    h('span', [
-                                        h('Button', {
-                                            props: {
-                                                // type: 'error',
-                                                size: 'small',
-                                            },
-                                            style: {
-                                                marginRight: '10px',
-                                            },
-                                            on: {
-                                                click:() => {
-                                                    that.append(data, true)
-                                                }
-                                            },
-                                        }, '插入'),
-                                        h('Button', {
-                                            props: {
-                                                type: 'error',
-                                                size: 'small',
-                                            },
-                                            /* style: {
-                                                width: '13%',
-                                            }, */
-                                            on: {
-                                                click:() => {
-                                                    that.remove(root, node, data)
-                                                }
-                                            },
-                                        }, '删除'),
-                                    ])
-                                ])
-                            },
-                            children: [
-                                {
-                                    title: '101',
-                                    expand: true,
-                                    name: '',
-                                    describe: '',
-                                    score: null,
-                                    render: (h, { root, node, data }) => {
-                                        return h('div', [
-                                            h('Input', {
-                                                props: {
-                                                    value: data.name,
-                                                    placeholder: '三级分项',
-                                                },
-                                                style: {
-                                                    width: '20%',
-                                                    marginRight: '10px',
-                                                },
-                                                on: {
-                                                    'on-change': value => {
-                                                        console.log(data, value);
-                                                        if(value.data !== null) {
-                                                            that.inputChange(data, value, 'name')
-                                                        }
-                                                    }
-                                                },
-                                            }),
-                                            h('Input', {
-                                                props: {
-                                                    value: data.describe,
-                                                    placeholder: '对分项内容进行描述',
-                                                },
-                                                style: {
-                                                    width: '61.3%',
-                                                    marginRight: '10px',
-                                                },
-                                                on: {
-                                                    'on-change': value => {
-                                                        console.log(data, value);
-                                                        if(value.data !== null) {
-                                                            that.inputChange(data, value, 'describe')
-                                                        }
-                                                    }
-                                                },
-                                            }),
-                                            h('Input', {
-                                                props: {
-                                                    value: data.score,
-                                                },
-                                                style: {
-                                                    width: '9%',
-                                                    marginRight: '10px',
-                                                },
-                                                on: {
-                                                    'on-change': value => {
-                                                        console.log(data, value);
-                                                        if(value.data !== null) {
-                                                            that.inputChange(data, value, 'score')
-                                                        }
-                                                    }
-                                                },
-                                            }),
-                                            h('Button', {
-                                                props: {
-                                                    type: 'error',
-                                                    size: 'small',
-                                                },
-                                                style: {
-                                                    marginLeft: '50px',
-                                                },
-                                                on: {
-                                                    click:() => {
-                                                        that.remove(root, node, data)
-                                                    }
-                                                },
-                                            }, '删除'),
-                                        ])
-                                    },
-                                }
-                            ],
-                        }
-                    ],
+                    code: '111',
+                    name: '醍摩豆学校'
+                },
+                {
+                    code: '222',
+                    name: '研发学校'
                 },
             ],
-            timer: null,
-            treeType: '',
+            teacherList: [
+                {
+                    code: '111',
+                    name: '教研组1'
+                },
+                {
+                    code: '222',
+                    name: '教研组2'
+                },
+            ],
+            schoolChange: [],
+        }
+    },
+    created () {
+        this.processInfo = {
+            name: '',
+            describe: '',
+            score: 0,
+            rule: this.dataRuleMould
         }
     },
     computed: {
@@ -1094,245 +878,83 @@ export default {
             this.createData.file.splice(index, 1)
         },
         addRule() {
-            this.ruleTree.push({
-                title: this.ruleTree.length,
-                expand: true,
+            this.processInfo.rule.push({
+                id: Math.random() * 1000000,
                 name: '',
                 describe: '',
                 score: null,
-                render: (h, { root, node, data }) => {
-                    return h('div', [
-                        h('Input', {
-                            props: {
-                                value: data.name,
-                                placeholder: '一级分项',
-                            },
-                            style: {
-                                width: '20%',
-                                marginRight: '10px',
-                            },
-                            on: {
-                                'on-change': value => {
-                                    console.log(data, value);
-                                    if(value.data !== null) {
-                                        this.inputChange(data, value, 'name')
-                                    }
-                                }
-                            },
-                        }),
-                        h('Input', {
-                            props: {
-                                value: data.describe,
-                                placeholder: '对分项内容进行描述',
-                            },
-                            style: {
-                                width: '65%',
-                                marginRight: '10px',
-                            },
-                            on: {
-                                'on-change': value => {
-                                    console.log(data, value);
-                                    if(value.data !== null) {
-                                        this.inputChange(data, value, 'describe')
-                                    }
-                                }
-                            },
-                        }),
-                        h('Input', {
-                            props: {
-                                value: data.score,
-                            },
-                            style: {
-                                width: '9%',
-                                marginRight: '10px',
-                            },
-                            on: {
-                                'on-change': value => {
-                                    console.log(data, value);
-                                    if(value.data !== null) {
-                                        this.inputChange(data, value, 'score')
-                                    }
-                                }
-                            },
-                        }),
-                        h('span', [
-                            h('Button', {
-                                props: {
-                                    // type: 'error',
-                                    size: 'small',
-                                },
-                                style: {
-                                    marginRight: '10px',
-                                },
-                                on: {
-                                    click:() => {
-                                        this.append(data)
-                                    }
-                                },
-                            }, '插入'),
-                            h('Button', {
-                                props: {
-                                    type: 'error',
-                                    size: 'small',
-                                },
-                                /* style: {
-                                    width: '13%',
-                                }, */
-                                on: {
-                                    click:() => {
-                                        this.remove(root, node, data)
-                                    }
-                                },
-                            }, '删除'),
-                        ])
-                    ])
-                },
             })
-            this.$forceUpdate()
         },
-        append(data, isThree) {
+        append(node, data) {
+            console.log(node.parent.parent);
             const children = data.children || [];
             children.push({
-                title: '101',
-                expand: true,
+                id: Math.random() * 1000000,
                 name: '',
                 describe: '',
                 score: null,
-                render: (h, { root, node, data }) => {
-                    return h('div', [
-                        h('Input', {
-                            props: {
-                                value: data.name,
-                                placeholder: isThree ? '三级分项' : '二级分项',
-                            },
-                            style: {
-                                width: '20%',
-                                marginRight: '10px',
-                            },
-                            on: {
-                                'on-change': value => {
-                                    console.log(data, value);
-                                    if(value.data !== null) {
-                                        this.inputChange(data, value, 'name')
-                                    }
-                                }
-                            },
-                        }),
-                        h('Input', {
-                            props: {
-                                value: data.describe,
-                                placeholder: '对分项内容进行描述',
-                            },
-                            style: {
-                                width: isThree ? '61.3%' : '62.9%',
-                                marginRight: '10px',
-                            },
-                            on: {
-                                'on-change': value => {
-                                    console.log(data, value);
-                                    if(value.data !== null) {
-                                        this.inputChange(data, value, 'describe')
-                                    }
-                                }
-                            },
-                        }),
-                        h('Input', {
-                            props: {
-                                value: data.score,
-                            },
-                            style: {
-                                width: '9%',
-                                marginRight: '10px',
-                            },
-                            on: {
-                                'on-change': value => {
-                                    console.log(data, value);
-                                    if(value.data !== null) {
-                                        this.inputChange(data, value, 'score')
-                                    }
-                                }
-                            },
-                        }),
-                        h('span', {
-                            style: {
-                                display: isThree ? 'none' : 'inline-block'
-                            },
-                        }, [
-                            h('Button', {
-                                props: {
-                                    // type: 'error',
-                                    size: 'small',
-                                },
-                                style: {
-                                    marginRight: '10px',
-                                },
-                                on: {
-                                    click:() => {
-                                        this.append(data, true)
-                                    }
-                                },
-                            }, '插入'),
-                            h('Button', {
-                                props: {
-                                    type: 'error',
-                                    size: 'small',
-                                },
-                                /* style: {
-                                    width: '13%',
-                                }, */
-                                on: {
-                                    click:() => {
-                                        this.remove(root, node, data)
-                                    }
-                                },
-                            }, '删除'),
-                        ]),
-                        
-                        h('Button', {
-                            props: {
-                                type: 'error',
-                                size: 'small',
-                            },
-                            style: {
-                                marginLeft: '50px',
-                                display: isThree ? 'inline-block' : 'none'
-                            },
-                            on: {
-                                click:() => {
-                                    this.remove(root, node, data)
-                                }
-                            },
-                        }, '删除'),
-                    ])
-                },
-            });
+                isThree: node.parent.parent ? true : false
+            })
             this.$set(data, 'children', children)
         },
-        remove(root, node, data) {
-            console.log(root, node, data);
-            const parentKey = root.find(el => el === node).parent;
-            console.log(parentKey);
-            if(parentKey === undefined) {
-                // this.ruleTree = this.ruleTree.filter(i => i.nodeKey !== data.nodeKey)
-                let index = this.ruleTree.findIndex(i => i.nodeKey === data.nodeKey)
-                this.$delete(this.ruleTree,index)
-                console.log(JSON.stringify(this.ruleTree))
-            } else {
-                const parent = root.find(el => el.nodeKey === parentKey).node;
-                console.log(parent);
-                const index = parent.children.indexOf(data);
-                console.log(index);
-                parent.children.splice(index, 1);
-                console.log(parent);
-            }
+        remove(node, data) {
+            const parent = node.parent;
+            const children = parent.data.children || parent.data;
+            const index = children.findIndex(d => d.id === data.id);
+            children.splice(index, 1);
         },
         save() {
-            console.log(this.ruleTree);
-            console.log(JSON.stringify(this.ruleTree))
+            console.log(this.processInfo);
+            console.log(JSON.stringify(this.processInfo))
         },
-        inputChange(data, value, type) {
-            console.log(data, value.target._value, value.data);
-            data[type] = (value.target._value === null ? '' : value.target._value) + (value.data === null ? '' : value.data)
+        reviewEditRule() {
+            this.processInfo = {
+                name: this.ruleInfo.name,
+                describe: this.ruleInfo.describe,
+                score: this.ruleInfo.score,
+                rule: this.ruleInfo.children
+            }
+            this.ruleDrawerAdd = true
+        },
+        drawerRule() {
+            this.processInfo = {
+                name: '',
+                describe: '',
+                score: 0,
+                rule: this.dataRuleMould
+            }
+            this.ruleDrawerAdd = true
+        },
+        addInform() {
+            this.infoArr.push({
+                value: this.addInfo,
+                label: this.addInfo,
+            })
+            this.addInfoType = false
+            this.addInfo = ''
+        },
+        scoreChange(node, data) {
+            // console.log(node, data);
+            this.setParentScore(node)
+        },
+        setParentScore(node) {
+            const parent = node.parent
+            if(!Array.isArray(parent.data)) {
+                let score = 0
+                parent.childNodes.forEach(item => {
+                    score += item.data.score
+                })
+                parent.data.score = score
+            } else {
+                let proScore = 0
+                this.processInfo.score = parent.data.forEach(item => {
+                    proScore += item.score
+                })
+                this.processInfo.score = proScore
+            }
+            if(parent.parent) {
+                this.setParentScore(parent)
+            }
         },
     },
 }
@@ -1388,6 +1010,7 @@ export default {
         }
     }
 
+
 }
 </style>
 <style lang="less">
@@ -1420,4 +1043,30 @@ export default {
         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;
+    }
+}
 </style>

+ 306 - 143
TEAMModelOS/ClientApp/src/view/signupActivity/infoActivity copy.vue

@@ -53,28 +53,32 @@
             <TabPane label="报名数据" name="1">
                 <div class="tab-header join-data">
                     <div>
-                        <p>报名制</p>
                         <p>报名方式</p>
+                        <p>报名制</p>
                     </div>
                     <div>
-                        <p>团队赛</p>
                         <p>参赛方式</p>
+                        <p>团队赛</p>
                     </div>
                     <div>
-                        <p>34/50</p>
                         <p>已报名</p>
+                        <p style="color: #14b53b;">
+                            34
+                            <span style="font-size: 16px; color: #737373;">/50</span>
+                        </p>
                     </div>
                     <div>
-                        <p>27</p>
                         <p>已上传</p>
+                        <p style="color: #4b93ff;">27</p>
                     </div>
                     <div>
-                        <p>10</p>
                         <p>已评审</p>
+                        <p style="color: #ff9900;">10</p>
                     </div>
                 </div>
-                <div>
-                    <Table :columns="applicationColumns" :data="applicationList">
+                <div class="data-box">
+                    <Input placeholder="搜索醍摩豆帐号" style="width: 300px" />
+                    <Table :columns="applicationColumns" :data="applicationList" row-key="id" stripe>
                         <template #action="{row, index}">
                             <Button type="error" size="small" @click="deleteApplica(row, index, 'join')">删除</Button>
                         </template>
@@ -83,7 +87,8 @@
             </TabPane>
             <TabPane label="评审管理" name="2">
                 <div class="tab-header">
-                    <Button>添加评审专家</Button>
+                    <Button @click="processShow = true">添加评审专家</Button>
+                    <Button style="margin-left: 20px;">自动分配评审作品</Button>
                     <Button style="float: right;" @click="ruleDrawer = true">评审规则</Button>
                 </div>
                 <div>
@@ -99,17 +104,37 @@
             </TabPane>
             <TabPane label="成绩统计" name="3">
                 <div class="tab-header">
-                    <Button>公示成绩</Button>
+                    <Button v-show="!awardsing" @click="setAwards()">设置奖项</Button>
+                    <Button v-show="awardsing" @click="awardsShow = true">批量设置</Button>
+                    <Button style="margin-left: 20px;">公示成绩</Button>
                 </div>
-                <div>
-                    <Table :columns="scoreColumns" :data="scoreList">
-                        <!-- <template #actions="{row, index}">
-                            <Button size="small" @click="deleteApplica(row, index, 'score')">修改</Button>
-                        </template> -->
+                <div style="height: 80%;">
+                    <Table :columns="scoreColumns" :data="scoreList" height="600">
+                        <template #awards="{row}">
+                            <span v-if="!awardsing">{{ row.awards }}</span>
+                            <div v-else>
+                                <Select v-model="row.awards" style="width:200px" :transfer="true">
+                                    <Option v-for="item in awardsList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+                                </Select>
+                            </div>
+                        </template>
                     </Table>
                 </div>
             </TabPane>
         </Tabs>
+        <Modal v-model="processShow" title="邀请评审专家" width="800" :footer-hide="true">
+            <Table :columns="inviteColumns" :data="processList">
+                <template #process="{row, index}">
+                    <Progress :percent="25" :stroke-width="10" />
+                </template>
+                <template #actions="{row, index}">
+                    <Button type="error" size="small" @click="deleteApplica(row, index, 'process')">删除</Button>
+                </template>
+            </Table>
+            <div style="margin: 30px 0 10px 0; text-align: center;">
+                <Button type="primary" long>邀请</Button>
+            </div>
+        </Modal>
         <Drawer title="评审规则" :width="50" :closable="false" v-model="ruleDrawer">
             <p style="font-size: 18px; font-weight: bold;">{{ ruleInfo.name }}</p>
             <p>描述:{{ ruleInfo.describe }}</p>
@@ -118,17 +143,11 @@
                 <Table row-key="id" :columns="ruleColumns" :data="ruleInfo.children"></Table>
             </div>
         </Drawer>
-        <!-- <Drawer title="评审规则" :width="50" :closable="false" v-model="ruleDrawer">
-            <p>名称:{{ ruleInfo.name }}</p>
-            <p>描述:{{ ruleInfo.describe }}</p>
-            <p>总分:{{ ruleInfo.score }}</p>
-            <div>
-                <Tree :data="ruleTree" :render="renderContent" @on-contextmenu="handleContextMenu"></Tree>
-            </div>
-        </Drawer> -->
-        <!-- <Modal v-model="modal" title="修改成绩" @on-ok="ok" @on-cancel="cancel">
-            <p></p>
-        </Modal> -->
+        <Modal v-model="awardsShow" title="批量设置奖项">
+            <Select v-model="awardsSel" style="width:200px">
+                <Option v-for="item in awardsList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+            </Select>
+        </Modal>
     </div>
 </template>
 
@@ -141,23 +160,30 @@ export default {
             applicationColumns: [
                 {
                     title: '姓名',
-                    key: 'name'
+                    key: 'name',
+                    tree: true,
+                    // width: 120,
+                    // fixed: 'left'
                 },
                 {
                     title: '性别',
-                    key: 'sex'
+                    key: 'sex',
+                    // width: 80,
                 },
                 {
                     title: '手机号码',
-                    key: 'phone'
+                    key: 'phone',
+                    // width: 100,
                 },
                 {
                     title: '电子邮箱',
-                    key: 'email'
+                    key: 'email',
+                    // width: 500,
                 },
                 {
                     title: '学校',
                     key: 'school',
+                    // width: 100,
                     filters: [
                         {
                             label: '醍摩豆学校',
@@ -175,23 +201,23 @@ export default {
                 },
                 {
                     title: '职务',
-                    key: 'zhiwu'
+                    key: 'zhiwu',
+                    // width: 100,
                 },
                 {
                     title: '学段',
-                    key: 'period'
+                    key: 'period',
+                    // width: 100,
                 },
                 {
                     title: '学科',
-                    key: 'subject'
-                },
-                {
-                    title: '报名时间',
-                    key: 'time'
+                    key: 'subject',
+                    // width: 100,
                 },
                 {
                     title: '组名',
                     key: 'team',
+                    // width: 100,
                     filters: [
                         {
                             label: '数学组',
@@ -210,6 +236,7 @@ export default {
                 {
                     title: '组内身份',
                     key: 'identity',
+                    // width: 100,
                     filters: [
                         {
                             label: '组长',
@@ -225,15 +252,23 @@ export default {
                         return row.identity === value
                     }
                 },
+                {
+                    title: '报名时间',
+                    key: 'time',
+                    // width: 100,
+                },
                 {
                     title: '作品',
-                    key: 'work'
+                    key: 'work',
+                    // width: 100,
+                    // fixed: 'right',
                 },
                 {
                     title: '操作',
                     slot: 'action',
-                    width: 150,
                     align: 'center',
+                    // width: 100,
+                    // fixed: 'right',
                 },
             ],
             processColumns: [
@@ -277,10 +312,41 @@ export default {
                     align: 'center',
                 },
             ],
+            inviteColumns: [
+                {
+                    type: 'selection',
+                    width: 60,
+                    align: 'center'
+                },
+                {
+                    title: '姓名',
+                    key: 'name'
+                },
+                {
+                    title: '性别',
+                    key: 'sex'
+                },
+                {
+                    title: '手机号码',
+                    key: 'phone'
+                },
+                {
+                    title: '电子邮箱',
+                    key: 'email'
+                },
+                /* {
+                    title: '擅长学段',
+                    key: 'period'
+                },
+                {
+                    title: '擅长学科',
+                    key: 'subject'
+                }, */
+            ],
             scoreColumns: [
                 {
                     title: '姓名/组名',
-                    key: 'name'
+                    key: 'name',
                 },
                 {
                     title: '专家评分',
@@ -290,6 +356,10 @@ export default {
                     title: '建议分数',
                     key: 'score1'
                 },
+                {
+                    title: '奖项',
+                    slot: 'awards'
+                },
                 /* {
                     title: '操作',
                     slot: 'actions',
@@ -299,6 +369,7 @@ export default {
             ],
             applicationList: [
                 {
+                    id: '000',
                     name: '张三',
                     sex: '男',
                     phone: '110',
@@ -311,22 +382,42 @@ export default {
                     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: '',
+                        },
+                    ],
                 },
                 {
-                    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',
@@ -339,21 +430,40 @@ export default {
                     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: '',
+                        },
+                    ],
                 },
-                {
-                    name: '李四',
-                    sex: '女',
-                    phone: '911',
-                    email: '331321@qq.com',
-                    school: '研发学校',
-                    zhiwu: '普通教师',
-                    period: '初中',
-                    subject: '数学',
-                    time: '2023-08-10',
-                    team: '数学组',
-                    identity: '组员',
-                    work: '',
-                },
+                
             ],
             processList: [
                 {
@@ -380,11 +490,85 @@ export default {
                     name: '数学组',
                     score: '67',
                     score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '语文组',
+                    score: '92',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '数学组',
+                    score: '67',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '语文组',
+                    score: '92',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '数学组',
+                    score: '67',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '语文组',
+                    score: '92',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '数学组',
+                    score: '67',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '语文组',
+                    score: '92',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '数学组',
+                    score: '67',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '语文组',
+                    score: '92',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '数学组',
+                    score: '67',
+                    score1: '85',
+                    awards: '',
                 },
                 {
                     name: '语文组',
                     score: '92',
                     score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '数学组',
+                    score: '67',
+                    score1: '85',
+                    awards: '',
+                },
+                {
+                    name: '语文组',
+                    score: '92',
+                    score1: '85',
+                    awards: '',
                 },
             ],
             ruleDrawer: false,
@@ -405,77 +589,6 @@ export default {
                     width: 100,
                 },
             ],
-            ruleTree: [
-                {
-                    title: 'parent 1',
-                    expand: true,
-                    render: (h, { root, node, data }) => {
-                        return h('span', {
-                            style: {
-                                display: 'inline-block',
-                                width: '100%'
-                            }
-                        }, [
-                            /* h('span', [
-                                h(resolveComponent('Icon'), {
-                                    type: 'ios-folder-outline',
-                                    style: {
-                                        marginRight: '8px'
-                                    }
-                                }),
-                                h('span', data.title)
-                            ]), */
-                            h('span', {
-                                style: {
-                                    display: 'inline-block',
-                                    float: 'right',
-                                    marginRight: '32px'
-                                }
-                            }, /* [
-                                h(resolveComponent('Button'), {
-                                    ...this.buttonProps,
-                                    icon: 'ios-add',
-                                    type: 'primary',
-                                    style: {
-                                        width: '64px'
-                                    },
-                                    onClick: () => { this.append(data) }
-                                })
-                            ] */)
-                        ]);
-                    },
-                    children: [
-                        {
-                            title: 'child 1-1',
-                            expand: true,
-                            children: [
-                                {
-                                    title: 'leaf 1-1-1',
-                                    expand: true
-                                },
-                                {
-                                    title: 'leaf 1-1-2',
-                                    expand: true
-                                }
-                            ]
-                        },
-                        {
-                            title: 'child 1-2',
-                            expand: true,
-                            children: [
-                                {
-                                    title: 'leaf 1-2-1',
-                                    expand: true
-                                },
-                                {
-                                    title: 'leaf 1-2-1',
-                                    expand: true
-                                }
-                            ]
-                        }
-                    ]
-                }
-            ],
             ruleInfo: {
                 id: '100',
                 name: '创新课堂评价标准',
@@ -557,7 +670,29 @@ export default {
             buttonProps: {
                 type: 'default',
                 size: 'small',
-            }
+            },
+            awardsing: false,
+            awardsList: [
+                {
+                    value: '特等奖',
+                    label: '特等奖'
+                },
+                {
+                    value: '一等奖',
+                    label: '一等奖'
+                },
+                {
+                    value: '二等奖',
+                    label: '二等奖'
+                },
+                {
+                    value: '三等奖',
+                    label: '三等奖'
+                },
+            ],
+            processShow: false,
+            awardsShow: false,
+            awardsSel: '',
         }
     },
     mounted () {
@@ -701,7 +836,16 @@ export default {
             const parent = root.find(el => el.nodeKey === parentKey).node;
             const index = parent.children.indexOf(data);
             parent.children.splice(index, 1);
-        }
+        },
+        setAwards() {
+            this.awardsing = true
+            this.scoreColumns.unshift({
+                type: 'selection',
+                width: 60,
+                align: 'center'
+            })
+            this.$forceUpdate()
+        },
     }
 }
 </script>
@@ -773,16 +917,35 @@ export default {
         display: flex;
         justify-content: space-around;
         width: 100%;
-        margin-bottom: 30px;
+        margin-bottom: 50px;
+        margin-top: 30px;
         &>div {
-            text-align: center;
+            // text-align: center;
             margin: 0 30px;
-            &>p:first-of-type{
+
+            &>p:first-of-type {
+                border-left: 5px solid #70B1F0;
+                padding-left: 5px;
+                height: 15px;
+                line-height: 15px;
+                margin-bottom: 5px;
+            }
+            &>p:nth-child(2){
                 font-size: 30px;
                 font-weight: bold;
+                color: #6a6a6a;
             }
         }
     }
+
+    .data-box {
+        border-top: 1px dashed #d0d0d0;
+        padding-top: 20px;
+
+        .ivu-input-wrapper {
+            margin-bottom: 10px;
+        }
+    }
 }
 </style>
 <style lang="less">

+ 119 - 0
TEAMModelOS/ClientApp/src/view/signupActivity/setActivity.vue

@@ -0,0 +1,119 @@
+<template>
+    <div>
+        <Tabs v-model="activeName">
+            <TabPane label="分站管理" name="subs">
+                <Form :model="formItem" :label-width="120" style="width: 98%;">
+                    <FormItem label="授权单位/组织">
+                        <Input v-model="formItem.unit" placeholder="请输入..." disabled></Input>
+                    </FormItem>
+                    <FormItem label="分站代码">
+                        <Input v-model="formItem.code" placeholder="请输入..." disabled></Input>
+                    </FormItem>
+                    <FormItem label="分站路由">
+                        <Input v-model="formItem.route" placeholder="请输入..." disabled></Input>
+                    </FormItem>
+                </Form>
+            </TabPane>
+            <TabPane label="首页管理" name="homepage">
+                <Table :columns="columns" :data="data" class="banner-set">
+                    <template #type="{row}">
+                        <span>{{ row.type ? '区级' : '公开' }}</span>
+                    </template>
+                    <template #state="{row}">
+                        <Alert :type="row.state === 1 ? 'success' : 'warning'" v-if="row.state">
+                            {{ row.state === 1 ? '进行中' : '已结束' }}
+                        </Alert>
+                        <Alert v-else>未开始</Alert>
+                    </template>
+                    <template #image="{row}">
+                        <img :src="row.image" alt="">
+                    </template>
+                    <template #action="{row}">
+                        <Button type="error" size="small">删除</Button>
+                    </template>
+                </Table>
+            </TabPane>
+        </Tabs>
+    </div>
+</template>
+
+
+<script>
+export default {
+    data () {
+        return {
+            activeName: 'subs',
+            formItem: {
+                unit: '醍摩豆(成都)信息技术有限公司',
+                code: 'TMD',
+                route: '/TeamModel',
+            },
+            columns: [
+                {
+                    title: '活动名称',
+                    key: 'name',
+                    align: 'center',
+                },
+                {
+                    title: '申办人',
+                    key: 'people',
+                    align: 'center',
+                    width: '100',
+                },
+                {
+                    title: '醍摩豆ID',
+                    key: 'tmdid',
+                    align: 'center',
+                    width: '200',
+                },
+                {
+                    title: '活动类型',
+                    slot: 'type',
+                    align: 'center',
+                    width: '100',
+                },
+                {
+                    title: '活动状态',
+                    slot: 'state',
+                    width: '150',
+                    align: 'center',
+                },
+                {
+                    title: '图片',
+                    slot: 'image',
+                    width: '200',
+                    align: 'center',
+                },
+                {
+                    title: '操作',
+                    slot: 'action',
+                    width: '100',
+                    align: 'center',
+                }
+            ],
+            data: [
+                {
+                    name: '2019第八届科技领导卓越奖',
+                    people: '罗老师',
+                    tmdid: '1595321354',
+                    type: 0,
+                    state: 0,
+                    image: require('./demo.jpeg'),
+                },
+            ]
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.banner-set {
+    img{
+        width: 100%;
+    }
+    .ivu-alert {
+        text-align: center;
+        padding: 5px 0;
+    }
+}
+</style>

+ 14 - 1
TEAMModelOS/ClientApp/src/view/student-web/AppiView.less

@@ -105,4 +105,17 @@
     .myNav .ivu-menu-horizontal .ivu-menu-item {
         padding: 0 11px !important;
     }
-}
+}
+
+@media screen and (max-width: 520px) {
+    .myNav .selectClass {
+        .ivu-select {
+            &:first-child {
+                width: 105px !important;
+            }
+            &:nth-child(2) {
+                width: 150px !important;
+            }
+        }
+    }
+}

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

@@ -20,6 +20,7 @@ using TEAMModelOS.SDK;
 using StackExchange.Redis;
 
 using System.Text.RegularExpressions;
+using Microsoft.AspNetCore.Authorization;
 
 namespace TEAMModelOS.Controllers.Both
 {
@@ -2034,9 +2035,9 @@ namespace TEAMModelOS.Controllers.Both
         [ProducesDefaultResponseType]
         [AuthToken(Roles = "teacher,admin")]
         [HttpPost("teacher")]
-#if !DEBUG
+ 
         [Authorize(Roles = "IES")]
-#endif
+ 
         public async Task<IActionResult> Teacher(JsonElement request)
         {
 

+ 54 - 4
TEAMModelOS/Controllers/Common/ActivityController.cs

@@ -20,6 +20,7 @@ using TEAMModelOS.SDK;
 using StackExchange.Redis;
 
 using System.Text.RegularExpressions;
+using Microsoft.AspNetCore.Authorization;
 
 namespace TEAMModelOS.Controllers
 {
@@ -59,18 +60,67 @@ namespace TEAMModelOS.Controllers
         [ProducesDefaultResponseType]
         [AuthToken(Roles = "teacher,admin,area")]
         [HttpPost("manage")]
-#if !DEBUG
         [Authorize(Roles = "IES")]
-#endif
+
         public async Task<IActionResult> Manage(JsonElement request)
         {
             try
             {
                 (string tmdid, _, _, string school) = HttpContext.GetAuthTokenInfo();
                 if (!request.TryGetProperty("grant_type", out JsonElement grant_type)) return BadRequest();
-                if (!request.TryGetProperty("scope", out JsonElement scope)) return BadRequest();
+               
                 var client = _azureCosmos.GetCosmosClient();
-                switch (true) { }
+                switch (true)
+                {
+                    case bool when $"{grant_type}".Equals("create", StringComparison.OrdinalIgnoreCase):
+                        {
+                            if (!request.TryGetProperty("Activity", out JsonElement _activity)) return Ok(new { error = ResponseCode._400ParamsError, msg = "活动信息参数错误" });
+
+                            Activity activity = _activity.ToObject<Activity>();
+                            activity.id=!string.IsNullOrWhiteSpace(activity.id)?activity.id: Guid.NewGuid().ToString();
+                            activity.code="Activity";
+                            activity.pk="Activity";
+                            ValidResult validResult = activity.Valid();
+                            if (validResult.isVaild)
+                            {
+                                activity.creatorId=tmdid;
+                                activity.createTime= DateTimeOffset.Now.ToUnixTimeMilliseconds();
+                                activity.year=DateTimeOffset.Now.Year;
+                                foreach (var module in activity.modules) {
+                                    switch (true) 
+                                    {
+                                        //赛课
+                                        case bool when module.Equals("Contest"):
+                                            {
+                                                if (!request.TryGetProperty("Contest", out JsonElement _contest)) return Ok(new { error = ResponseCode._400ParamsError, msg = "赛课信息参数错误" });
+                                                Contest contest = _activity.ToObject<Contest>();
+                                                contest.id=activity.id;
+                                                contest.code="Contest";
+                                                contest.pk="Contest";
+
+                                                break;
+                                            }
+                                        //培训
+                                        case bool when module.Equals("Training"):
+                                            {
+                                                break;
+                                            }
+                                        //教研
+                                        case bool when module.Equals("Research"):
+                                            {
+                                                break;
+                                            }
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                return Ok(validResult);
+                            }
+                            break;
+                        }
+                   
+                }
             }catch (Exception ex)
             {
 

+ 32 - 32
TEAMModelOS/appsettings.Development.json

@@ -22,48 +22,48 @@
   },
   "Azure": {
     // 测试站数据库
-    //"Storage": {
-    //  "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=O2W2vadCqexDxWO+px+QK7y1sHwsYj8f/WwKLdOdG5RwHgW/Dupz9dDUb4c1gi6ojzQaRpFUeAAmOu4N9E+37A==;EndpointSuffix=core.chinacloudapi.cn"
-    //},
-    //"Cosmos": {
-    //  "ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;"
-    //},
-    //"Redis": {
-    //  "ConnectionString": "52.130.252.100:6379,password=habook,ssl=false,abortConnect=False,writeBuffer=10240"
-    //},
-    //"ServiceBus": {
-    //  "ConnectionString": "Endpoint=sb://teammodelos.servicebus.chinacloudapi.cn/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sy4h4EQ8zP+7w/lOLi1X3tGord/7ShFHimHs1vC50Dc=",
-    //  "ActiveTask": "dep-active-task",
-    //  "ItemCondQueue": "dep-itemcond",
-    //  "GenPdfQueue": "dep-genpdf"
-    //},
-    //"SignalR": {
-    //  "ConnectionString": "Endpoint=https://channel.service.signalr.net;AccessKey=KrblW06tuA4a/GyqRPDU0ynFFmAWxbAvyJihHclSXbQ=;Version=1.0;"
-    //}
-    // 正式站数据库
     "Storage": {
-      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelos;AccountKey=Dl04mfZ9hE9cdPVO1UtqTUQYN/kz/dD/p1nGvSq4tUu/4WhiKcNRVdY9tbe8620nPXo/RaXxs+1F9sVrWRo0bg==;EndpointSuffix=core.chinacloudapi.cn"
+      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=O2W2vadCqexDxWO+px+QK7y1sHwsYj8f/WwKLdOdG5RwHgW/Dupz9dDUb4c1gi6ojzQaRpFUeAAmOu4N9E+37A==;EndpointSuffix=core.chinacloudapi.cn"
     },
     "Cosmos": {
-      "ConnectionString": "AccountEndpoint=https://teammodelos.documents.azure.cn:443/;AccountKey=clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==;"
+      "ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;"
     },
     "Redis": {
-      "ConnectionString": "CoreRedisCN.redis.cache.chinacloudapi.cn:6380,password=LyJWP1ORJdv+poXWofAF97lhCEQPg1wXWqvtzXGXQuE=,ssl=True,abortConnect=False"
+      "ConnectionString": "52.130.252.100:6379,password=habook,ssl=false,abortConnect=False,writeBuffer=10240"
     },
     "ServiceBus": {
-      "ConnectionString": "Endpoint=sb://coreiotservicebuscnpro.servicebus.chinacloudapi.cn/;SharedAccessKeyName=TEAMModelOS;SharedAccessKey=llRPBMDJG9w1Nnifj+pGhV0g4H2REcq0PjvX2qqpcOg=",
-      "ActiveTask": "active-task",
-      "ItemCondQueue": "itemcond",
-      "GenPdfQueue": "genpdf"
+      "ConnectionString": "Endpoint=sb://teammodelos.servicebus.chinacloudapi.cn/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sy4h4EQ8zP+7w/lOLi1X3tGord/7ShFHimHs1vC50Dc=",
+      "ActiveTask": "dep-active-task",
+      "ItemCondQueue": "dep-itemcond",
+      "GenPdfQueue": "dep-genpdf"
     },
     "SignalR": {
-      "ConnectionString": "Endpoint=https://channel.signalr.azure.cn;AccessKey=AtcB7JYFNUbUXb1rGxa3PVksQ2X5YSv3JOHZR9J88tw=;Version=1.0;"
-    },
-    "Speech": {
-      "SubscriptionKey": "a4f5f4e2e2e54c6e8b0a4a0b4a0a4a0b",
-      "Region": "chinanorth3",
-      "Endpoint": "https://chinanorth3.api.cognitive.azure.cn/sts/v1.0/issuetoken"
+      "ConnectionString": "Endpoint=https://channel.service.signalr.net;AccessKey=KrblW06tuA4a/GyqRPDU0ynFFmAWxbAvyJihHclSXbQ=;Version=1.0;"
     }
+    // 正式站数据库
+    //"Storage": {
+    //  "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelos;AccountKey=Dl04mfZ9hE9cdPVO1UtqTUQYN/kz/dD/p1nGvSq4tUu/4WhiKcNRVdY9tbe8620nPXo/RaXxs+1F9sVrWRo0bg==;EndpointSuffix=core.chinacloudapi.cn"
+    //},
+    //"Cosmos": {
+    //  "ConnectionString": "AccountEndpoint=https://teammodelos.documents.azure.cn:443/;AccountKey=clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==;"
+    //},
+    //"Redis": {
+    //  "ConnectionString": "CoreRedisCN.redis.cache.chinacloudapi.cn:6380,password=LyJWP1ORJdv+poXWofAF97lhCEQPg1wXWqvtzXGXQuE=,ssl=True,abortConnect=False"
+    //},
+    //"ServiceBus": {
+    //  "ConnectionString": "Endpoint=sb://coreiotservicebuscnpro.servicebus.chinacloudapi.cn/;SharedAccessKeyName=TEAMModelOS;SharedAccessKey=llRPBMDJG9w1Nnifj+pGhV0g4H2REcq0PjvX2qqpcOg=",
+    //  "ActiveTask": "active-task",
+    //  "ItemCondQueue": "itemcond",
+    //  "GenPdfQueue": "genpdf"
+    //},
+    //"SignalR": {
+    //  "ConnectionString": "Endpoint=https://channel.signalr.azure.cn;AccessKey=AtcB7JYFNUbUXb1rGxa3PVksQ2X5YSv3JOHZR9J88tw=;Version=1.0;"
+    //},
+    //"Speech": {
+    //  "SubscriptionKey": "a4f5f4e2e2e54c6e8b0a4a0b4a0a4a0b",
+    //  "Region": "chinanorth3",
+    //  "Endpoint": "https://chinanorth3.api.cognitive.azure.cn/sts/v1.0/issuetoken"
+    //}
   },
   "HaBookAuth": {
     "CoreId": {