Переглянути джерело

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

jeff 1 рік тому
батько
коміт
e7b745a807
26 змінених файлів з 317 додано та 455 видалено
  1. 26 19
      TEAMModelBI/ClientApp/src/view/index/index.vue
  2. 28 24
      TEAMModelBI/ClientApp/src/view/schoolServe/school.vue
  3. 1 1
      TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue
  4. 2 5
      TEAMModelBI/ClientApp/src/view/userInquire/details.vue
  5. 0 113
      TEAMModelBI/Properties/ServiceDependencies/teammodelbi-rc - Web Deploy/profile.arm.json
  6. 3 3
      TEAMModelBI/TEAMModelBI.csproj
  7. 27 8
      TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs
  8. 0 174
      TEAMModelOS.FunctionV4/Properties/ServiceDependencies/TEAMModelFunction - Zip Deploy/profile.arm.json
  9. 0 3
      TEAMModelOS.FunctionV4/Properties/serviceDependencies.TEAMModelFunction - Zip Deploy.json
  10. 3 3
      TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj
  11. 29 74
      TEAMModelOS.SDK/DI/AzureCosmos/AzureCosmosExtensions.cs
  12. 144 3
      TEAMModelOS.SDK/Models/Service/StudentService.cs
  13. 3 3
      TEAMModelOS.SDK/TEAMModelOS.SDK.csproj
  14. 3 2
      TEAMModelOS/ClientApp/src/common/BaseLayout.vue
  15. 0 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/ArtView.vue
  16. 3 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue
  17. 6 4
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue
  18. 9 0
      TEAMModelOS/ClientApp/src/router/routes.js
  19. 1 0
      TEAMModelOS/ClientApp/src/view/artexam/Create.vue
  20. 1 4
      TEAMModelOS/ClientApp/src/view/artexam/Mgt.vue
  21. 15 0
      TEAMModelOS/ClientApp/src/view/dashboard/school/SchoolDashboard.vue
  22. 2 1
      TEAMModelOS/ClientApp/src/view/dashboardCenter/DashboardCenter.vue
  23. 5 3
      TEAMModelOS/ClientApp/src/view/student-web/AppNew.vue
  24. 4 4
      TEAMModelOS/TEAMModelOS.csproj
  25. 1 1
      TEAMModelOS/appsettings.Development.json
  26. 1 1
      TEAMModelOS/appsettings.json

+ 26 - 19
TEAMModelBI/ClientApp/src/view/index/index.vue

@@ -208,7 +208,7 @@
                 </div>
                 <div class="commonbox-versions" v-loading="loading.versions" element-loading-background="rgba(0, 0, 0, 0.2)">
                   <div class="commonbox-versions-title">
-                    <p class="versions-title-name">自訂版</p>
+                    <p class="versions-title-name">评测版</p>
                     <p class="versions-title-num">数量:
                       <span>{{ versionsData.custom.num }}</span>
                     </p>
@@ -3045,31 +3045,38 @@ export default {
       //    && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') 
       //    ? marjorArr.push(item) : '' }) : ''
       //  11.14日修正  关于学校版本问题   根据edition   current /1基础   /2标准   /3专业
-      schoolList ? schoolList.forEach((item) => {
-         item.edition  && !item.edition.scaleVersion && item.edition.current === 3 && item.code ==='BIRel' ? marjorArr.push(item):''
-        //  item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') &&  item.service.includes('YPXSJ6NJ') && item.code ==='BIRel'  ?  marjorArr.push(item):''
-       }) : ''
+      // schoolList ? schoolList.forEach((item) => {
+      //    item.edition   && item.edition.current === 3 && item.code ==='BIRel' ? marjorArr.push(item):''
+      //   //  item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') &&  item.service.includes('YPXSJ6NJ') && item.code ==='BIRel'  ?  marjorArr.push(item):''
+      //  }) : ''
        // 標準版
       //  schoolList ? schoolList.forEach((item) => { 
       //   (item.edition == null || item.edition.scaleVersion == null) && item.code ==='BIRel'
       //   && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? standardArr.push(item) : '' }) : ''
-      schoolList ? schoolList.forEach((item) => { 
-        item.edition  && !item.edition.scaleVersion && item.edition.current === 2 && item.code ==='BIRel' ? standardArr.push(item):''
-        // item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? standardArr.push(item):''
-      }) : ''
+      // schoolList ? schoolList.forEach((item) => { 
+      //   item.edition  && item.edition.current === 2 && item.code ==='BIRel' ? standardArr.push(item):''
+      //   // item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? standardArr.push(item):''
+      // }) : ''
        // 基礎版
       //  schoolList ? schoolList.forEach((item) => { 
       //   (item.edition == null || item.edition.scaleVersion == null) && item.code ==='BIRel'
       //   && !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') ? basicsArr.push(item) : '' }) : ''
-      schoolList ? schoolList.forEach((item) => { 
-        item.edition  && !item.edition.scaleVersion && item.edition.current === 1 && item.code ==='BIRel' ? basicsArr.push(item):
-        item.edition ==null && item.code ==='BIRel' ? basicsArr.push(item):''
-        // !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? basicsArr.push(item):''
-      }) : ''
-       // 自訂版
-       schoolList ? schoolList.forEach((item) => { 
-        item.edition !== null && item.edition.scaleVersion && item.code ==='BIRel' ? customArr.push(item) : '' }) : ''    
-        
+      // schoolList ? schoolList.forEach((item) => { 
+      //   item.edition  &&  item.edition.current === 1 && item.code ==='BIRel' && !item.service.includes('B6V5J6NP') ? basicsArr.push(item):
+      //   item.edition ==null && item.code ==='BIRel' ? basicsArr.push(item):''
+      //   // !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? basicsArr.push(item):''
+      // }) : ''
+       // 评测版
+      //  schoolList ? schoolList.forEach((item) => { 
+      //   item.edition !== null && item.edition.current === 1 && item.code ==='BIRel' && item.service.includes('B6V5J6NP') ? 
+      //   customArr.push(item) : '' }) : ''    
+
+        schoolList ? schoolList.forEach((item) => {
+          item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') && item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? marjorArr.push(item):
+          item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) && item.code ==='BIRel' ? standardArr.push(item):
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.service.includes('B6V5J6NP') && item.code ==='BIRel'   ? customArr.push(item):
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.code ==='BIRel'  ? basicsArr.push(item):''
+        }):''
         //计算版本占比
         console.log(basicsArr,standardArr,marjorArr,customArr,'数组')
         versionsData.value.basics.num = basicsArr.length >0 ?basicsArr.length :0
@@ -3335,7 +3342,7 @@ export default {
         }
         let dataCustom = {
               title: {
-                text: '{a|' + versionsData.value.custom.proportion + '}{c|%}' + '\n' + '自訂版占比',
+                text: '{a|' + versionsData.value.custom.proportion + '}{c|%}' + '\n' + '评测版占比',
                 x: 'center',
                 y: 'center',
                 textStyle: {

+ 28 - 24
TEAMModelBI/ClientApp/src/view/schoolServe/school.vue

@@ -565,10 +565,10 @@ export default {
         // sortable: true,
          cellRenderer: (data) => (
           <>
-            <div style="color:#000000;" v-show={data.rowData.versions !=='基础版' && data.rowData.versions !=='标准版' && data.rowData.versions !=='专业版'}>{data.rowData.versions}</div>
             <div style="color:#e6a23c;" v-show={data.rowData.versions ==='专业版' ? true:false}>专业版</div>
             <div style="color:#67C23A;" v-show={data.rowData.versions ==='标准版' ? true:false}>标准版</div>
             <div style="color:#409EFF;" v-show={data.rowData.versions ==='基础版' ? true:false}>基础版</div>
+            <div style="color:#fab6b6;" v-show={data.rowData.versions ==='评测版' ? true:false}>评测版</div>
           </>
         ),
       },
@@ -727,7 +727,7 @@ export default {
                       基础版
                     </ElCheckbox>
                     <ElCheckbox v-model={shouldFilter.value.custom} onChange={versionsEstimate}>
-                      自訂
+                      评测
                     </ElCheckbox>
                   </div>
                   {/* <div class="el-table-v2__demo-filter">
@@ -808,14 +808,18 @@ export default {
                 item.versions = item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版' : item.service.includes('YMPCVCIM') ? '标准版' : '基础版';
           } */
           //11.14日修正  关于学校版本问题   根据edition   current /1基础   /2标准   /3专业
-          if(item.edition !== null){
-            item.edition.scaleVersion ? item.versions='自訂版':
-            !item.edition.scaleVersion && item.edition.current === 3 ?  item.versions='专业版':
-            !item.edition.scaleVersion && item.edition.current === 2 ? item.versions='标准版':
-            !item.edition.scaleVersion && item.edition.current === 1 ? item.versions='基础版':''
+           /* if(item.edition !== null){
+            item.edition.current === 1 && item.service.includes('B6V5J6NP') ? item.versions='评测版':
+            item.edition.current === 3 ?  item.versions='专业版':
+            item.edition.current === 2 ? item.versions='标准版':
+            item.edition.current === 1 ? item.versions='基础版':''
           }else{
             item.versions='基础版'
-          }
+          } */
+          item.versions =item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') && item.service.includes('YMPCVCIM') ? '专业版':
+          item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? '标准版':
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.service.includes('B6V5J6NP')   ?'评测版':
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM')  ? '基础版':'基础版' 
         }),
         tableData.value.push(...res.scInfos),originalNum.value = res.scInfos.length,
         originalData.value = res.scInfos,tablesccnt.value = res.allCnt) 
@@ -1520,34 +1524,34 @@ export default {
       //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.major ? originalData.value.forEach((item) => {
+          item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') ? 
+          marjorArr.push(item) : '' }) : '' 
 
-         arrState.major ? originalData.value.forEach((item) => {
+         {/* arrState.major ? originalData.value.forEach((item) => {
           item.edition  && !item.edition.scaleVersion && item.edition.current === 3 ? 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.standard ? originalData.value.forEach((item) => { 
+        item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? 
+        standardArr.push(item) : '' }) : '' 
+        /* arrState.standard ? originalData.value.forEach((item) => { 
           item.edition  && !item.edition.scaleVersion && item.edition.current === 2  ? 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.basics ? originalData.value.forEach((item) => { 
+        !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && !item.service.includes('B6V5J6NP') ? 
+        basicsArr.push(item) : '' }) : '' 
 
-        arrState.basics ? originalData.value.forEach((item) => { 
+        /* arrState.basics ? originalData.value.forEach((item) => { 
           item.edition  && !item.edition.scaleVersion && item.edition.current === 1 ? basicsArr.push(item):
           item.edition ==null ? basicsArr.push(item):''
-        }) : ''
+        }) : '' */
        // 自訂版
        arrState.custom ? originalData.value.forEach((item) => { 
-        item.edition !== null && item.edition.scaleVersion !== null && item.edition.scaleVersion !== "" ? customArr.push(item) : '' }) : ''           
+        !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.service.includes('B6V5J6NP') ? customArr.push(item) : '' }) : ''   
+        console.log(marjorArr,standardArr,basicsArr,customArr,'重组')        
       let versionArr = [...marjorArr, ...standardArr, ...basicsArr, ...customArr]
       console.log(versionArr, '合并结果')
       tableData.value = versionArr

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

@@ -2832,7 +2832,7 @@ export default {
 .class-info,
 .class-total {
   width: 100%;
-  padding: 0.5% 1%;
+  padding: 1%;
   display: flex;
   flex-wrap: nowrap;
   justify-content: space-between;

+ 2 - 5
TEAMModelBI/ClientApp/src/view/userInquire/details.vue

@@ -1081,13 +1081,13 @@ watch(()=>transferNum.value,(newnum)=>{
 }
 
 .HiTeach{
-    background: linear-gradient(to top right, #7d82fe, #6fa5fe);
+    background: linear-gradient(to top right, #0093E9, #80D0C7);
 }
 .HiTA{
     background: linear-gradient(to top right, #ff6e72, #ff7390);
 }
 .IES5{
-    background: linear-gradient(to top right, #ff8f64, #ffaa64); 
+    background: linear-gradient(to top right, #FBAB7E, #F7CE68); 
 }
 .Sokrates{
     background: linear-gradient(to top right, #a55bfb, #bc5dfe); 
@@ -1509,9 +1509,6 @@ watch(()=>transferNum.value,(newnum)=>{
 .nextbtn:hover .btn-ls-text {
   opacity: 0.8;
 }
-.btn-ls {
-  /* width: 100%; */
-}
 .btn-ls-text {
   margin-top: 3px;
   color: #303a5d;

+ 0 - 113
TEAMModelBI/Properties/ServiceDependencies/teammodelbi-rc - Web Deploy/profile.arm.json

@@ -1,113 +0,0 @@
-{
-  "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
-  "contentVersion": "1.0.0.0",
-  "metadata": {
-    "_dependencyType": "compute.appService.windows"
-  },
-  "parameters": {
-    "resourceGroupName": {
-      "type": "string",
-      "defaultValue": "TEAMModelChengdu",
-      "metadata": {
-        "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
-      }
-    },
-    "resourceGroupLocation": {
-      "type": "string",
-      "defaultValue": "",
-      "metadata": {
-        "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
-      }
-    },
-    "resourceName": {
-      "type": "string",
-      "defaultValue": "rc",
-      "metadata": {
-        "description": "Name of the main resource to be created by this template."
-      }
-    },
-    "resourceLocation": {
-      "type": "string",
-      "defaultValue": "[parameters('resourceGroupLocation')]",
-      "metadata": {
-        "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
-      }
-    }
-  },
-  "variables": {
-    "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-    "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
-  },
-  "resources": [
-    {
-      "type": "Microsoft.Resources/resourceGroups",
-      "name": "[parameters('resourceGroupName')]",
-      "location": "[parameters('resourceGroupLocation')]",
-      "apiVersion": "2019-10-01"
-    },
-    {
-      "type": "Microsoft.Resources/deployments",
-      "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-      "resourceGroup": "[parameters('resourceGroupName')]",
-      "apiVersion": "2019-10-01",
-      "dependsOn": [
-        "[parameters('resourceGroupName')]"
-      ],
-      "properties": {
-        "mode": "Incremental",
-        "template": {
-          "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
-          "contentVersion": "1.0.0.0",
-          "resources": [
-            {
-              "location": "[parameters('resourceLocation')]",
-              "name": "[parameters('resourceName')]",
-              "type": "Microsoft.Web/sites",
-              "apiVersion": "2015-08-01",
-              "tags": {
-                "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
-              },
-              "dependsOn": [
-                "[variables('appServicePlan_ResourceId')]"
-              ],
-              "kind": "app",
-              "properties": {
-                "name": "[parameters('resourceName')]",
-                "kind": "app",
-                "httpsOnly": true,
-                "reserved": false,
-                "serverFarmId": "[variables('appServicePlan_ResourceId')]",
-                "siteConfig": {
-                  "metadata": [
-                    {
-                      "name": "CURRENT_STACK",
-                      "value": "dotnetcore"
-                    }
-                  ]
-                }
-              },
-              "identity": {
-                "type": "SystemAssigned"
-              }
-            },
-            {
-              "location": "[parameters('resourceLocation')]",
-              "name": "[variables('appServicePlan_name')]",
-              "type": "Microsoft.Web/serverFarms",
-              "apiVersion": "2015-08-01",
-              "sku": {
-                "name": "S1",
-                "tier": "Standard",
-                "family": "S",
-                "size": "S1"
-              },
-              "properties": {
-                "name": "[variables('appServicePlan_name')]"
-              }
-            }
-          ]
-        }
-      }
-    }
-  ]
-}

+ 3 - 3
TEAMModelBI/TEAMModelBI.csproj

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

+ 27 - 8
TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs

@@ -1587,22 +1587,25 @@ namespace TEAMModelOS.FunctionV4
                         index_json = await _azureStorage.GetBlobContainerClient($"{info.creatorId}").GetBlobClient($"{info.papers[no].blob}/index.json").DownloadContentAsync();
                     }
                     //BlobDownloadResult index_json = await _azureStorage.GetBlobContainerClient($"{info.school}").GetBlobClient($"{info.papers[no].blob}/index.json").DownloadContentAsync();
-                    JObject jo = JObject.Parse(index_json.Content.ToString());
-                    JArray array = jo.Value<JArray>("slides");
+                    //JObject jo = JObject.Parse(new MemoryStream(Encoding.UTF8.GetBytes(index_json.Content.ToString())).ToString());
+                    JsonElement RecordingJson = JsonDocument.Parse(new MemoryStream(Encoding.UTF8.GetBytes(index_json.Content.ToString()))).RootElement;
+                    RecordingJson.TryGetProperty("slides", out JsonElement slides);
+                    var sdes = slides.ToObject<List<Slides>>();
                     List<string> attachments = new List<string>();
                     if (info.qamode == 1) {
-                        attachments = jo.Value<JArray>("attachments")?.ToObject<List<string>>();
+                        attachments = RecordingJson.GetProperty("attachments").ToObject<List<string>>();
                         if (attachments.Count == 0)
                         {
                             return;
                         }
                     }
                     List<string> urls = new();
-                    foreach (var ne in array)
+                  
+                    foreach (var ne in sdes)
                     {
-                        if (!ne["type"].ToString().Equals("compose"))
+                        if (!ne.type.Equals("compose"))
                         {
-                            urls.Add(ne["url"].ToString());
+                            urls.Add(ne.url);
                         }
                     }
                     
@@ -1693,12 +1696,12 @@ namespace TEAMModelOS.FunctionV4
                         if(location.Equals("China")) //大陸正式站
                         {
                             urlAction = "https://malearn.teammodel.cn";
-                            accessKey = "QUzQqbqbnLsTDTeaJy4Br6wUuqPoAlKpzRK2S6PGImRHAzFuySGAeA==";
+                            accessKey = "2BcXFR_hvzG1pZjqIkaM7Dx74Hcu6m0PwwOacFpDpq44AzFuHJBRXA==";
                         }
                         else if(location.Equals("China-Dep") || location.Equals("China-Test")) //大陸測試站
                         {
                             urlAction = "https://malearn-rc.teammodel.cn";
-                            accessKey = "hESc0g7Q60FTEss4ZnVXPB61S1a8WlAXIq5ULl3T3oTxAzFunpLDwA==";
+                            accessKey = "lghWhJduNiAlo-e8isqEoROjdR7DAC-50XNtanIwHKYlAzFu1aog_A==";
                         }                        
                     }
                     else if (location.Contains("Global"))
@@ -1741,5 +1744,21 @@ namespace TEAMModelOS.FunctionV4
             public int total { get; set; }
             public double qrate { get; set; }
         }
+
+        public class Slides
+        {
+            public string url { get; set; }
+            public string type { get; set; }
+            public Scoring scoring { get; set; } = new Scoring();
+        }
+
+        public class Scoring
+        {
+            public double score { get; set; }
+            public List<string> knowledge { get; set; } = new List<string>();
+            public int field { get; set; } = new();
+            public List<string> ans { get; set; } = new List<string>();
+        }
+
     }
 }

+ 0 - 174
TEAMModelOS.FunctionV4/Properties/ServiceDependencies/TEAMModelFunction - Zip Deploy/profile.arm.json

@@ -1,174 +0,0 @@
-{
-  "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
-  "contentVersion": "1.0.0.0",
-  "metadata": {
-    "_dependencyType": "compute.function.windows.appService"
-  },
-  "parameters": {
-    "resourceGroupName": {
-      "type": "string",
-      "defaultValue": "TEAMModelChengdu",
-      "metadata": {
-        "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
-      }
-    },
-    "resourceGroupLocation": {
-      "type": "string",
-      "defaultValue": "",
-      "metadata": {
-        "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
-      }
-    },
-    "resourceName": {
-      "type": "string",
-      "defaultValue": "TEAMModelFunction",
-      "metadata": {
-        "description": "Name of the main resource to be created by this template."
-      }
-    },
-    "resourceLocation": {
-      "type": "string",
-      "defaultValue": "[parameters('resourceGroupLocation')]",
-      "metadata": {
-        "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
-      }
-    }
-  },
-  "resources": [
-    {
-      "type": "Microsoft.Resources/resourceGroups",
-      "name": "[parameters('resourceGroupName')]",
-      "location": "[parameters('resourceGroupLocation')]",
-      "apiVersion": "2019-10-01"
-    },
-    {
-      "type": "Microsoft.Resources/deployments",
-      "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-      "resourceGroup": "[parameters('resourceGroupName')]",
-      "apiVersion": "2019-10-01",
-      "dependsOn": [
-        "[parameters('resourceGroupName')]"
-      ],
-      "properties": {
-        "mode": "Incremental",
-        "expressionEvaluationOptions": {
-          "scope": "inner"
-        },
-        "parameters": {
-          "resourceGroupName": {
-            "value": "[parameters('resourceGroupName')]"
-          },
-          "resourceGroupLocation": {
-            "value": "[parameters('resourceGroupLocation')]"
-          },
-          "resourceName": {
-            "value": "[parameters('resourceName')]"
-          },
-          "resourceLocation": {
-            "value": "[parameters('resourceLocation')]"
-          }
-        },
-        "template": {
-          "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
-          "contentVersion": "1.0.0.0",
-          "parameters": {
-            "resourceGroupName": {
-              "type": "string"
-            },
-            "resourceGroupLocation": {
-              "type": "string"
-            },
-            "resourceName": {
-              "type": "string"
-            },
-            "resourceLocation": {
-              "type": "string"
-            }
-          },
-          "variables": {
-            "storage_name": "[toLower(concat('storage', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId))))]",
-            "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-            "storage_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Storage/storageAccounts/', variables('storage_name'))]",
-            "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]",
-            "function_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/sites/', parameters('resourceName'))]"
-          },
-          "resources": [
-            {
-              "location": "[parameters('resourceLocation')]",
-              "name": "[parameters('resourceName')]",
-              "type": "Microsoft.Web/sites",
-              "apiVersion": "2015-08-01",
-              "tags": {
-                "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
-              },
-              "dependsOn": [
-                "[variables('appServicePlan_ResourceId')]",
-                "[variables('storage_ResourceId')]"
-              ],
-              "kind": "functionapp",
-              "properties": {
-                "name": "[parameters('resourceName')]",
-                "kind": "functionapp",
-                "httpsOnly": true,
-                "reserved": false,
-                "serverFarmId": "[variables('appServicePlan_ResourceId')]",
-                "siteConfig": {
-                  "alwaysOn": true
-                }
-              },
-              "identity": {
-                "type": "SystemAssigned"
-              },
-              "resources": [
-                {
-                  "name": "appsettings",
-                  "type": "config",
-                  "apiVersion": "2015-08-01",
-                  "dependsOn": [
-                    "[variables('function_ResourceId')]"
-                  ],
-                  "properties": {
-                    "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage_name'), ';AccountKey=', listKeys(variables('storage_ResourceId'), '2017-10-01').keys[0].value, ';EndpointSuffix=', 'core.windows.net')]",
-                    "FUNCTIONS_EXTENSION_VERSION": "~3",
-                    "FUNCTIONS_WORKER_RUNTIME": "dotnet"
-                  }
-                }
-              ]
-            },
-            {
-              "location": "[parameters('resourceGroupLocation')]",
-              "name": "[variables('storage_name')]",
-              "type": "Microsoft.Storage/storageAccounts",
-              "apiVersion": "2017-10-01",
-              "tags": {
-                "[concat('hidden-related:', concat('/providers/Microsoft.Web/sites/', parameters('resourceName')))]": "empty"
-              },
-              "properties": {
-                "supportsHttpsTrafficOnly": true
-              },
-              "sku": {
-                "name": "Standard_LRS"
-              },
-              "kind": "Storage"
-            },
-            {
-              "location": "[parameters('resourceGroupLocation')]",
-              "name": "[variables('appServicePlan_name')]",
-              "type": "Microsoft.Web/serverFarms",
-              "apiVersion": "2015-08-01",
-              "sku": {
-                "name": "S1",
-                "tier": "Standard",
-                "family": "S",
-                "size": "S1"
-              },
-              "properties": {
-                "name": "[variables('appServicePlan_name')]"
-              }
-            }
-          ]
-        }
-      }
-    }
-  ]
-}

+ 0 - 3
TEAMModelOS.FunctionV4/Properties/serviceDependencies.TEAMModelFunction - Zip Deploy.json

@@ -1,3 +0,0 @@
-{
-  "dependencies": {}
-}

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

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

+ 29 - 74
TEAMModelOS.SDK/DI/AzureCosmos/AzureCosmosExtensions.cs

@@ -65,7 +65,7 @@ namespace TEAMModelOS.SDK.DI
             int totalCount = 0;
             await foreach (var item in container.GetItemQueryStreamIterator(
                 queryText: $"SELECT VALUE COUNT(1) From c {queryWhere}",
-                requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey(partitionkey), MaxItemCount = -1 }))
+                requestOptions: new QueryRequestOptions() { PartitionKey =!string.IsNullOrWhiteSpace(partitionkey) ? new PartitionKey(partitionkey) : null , MaxItemCount = -1 }))
             {
                 using var json = await JsonDocument.ParseAsync(item.ContentStream);
                 if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
@@ -114,17 +114,12 @@ namespace TEAMModelOS.SDK.DI
             }
             return responses;
         }
-        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, QueryDefinition  queryDefinition, string partitionkey, string? continuationToken = null, int? pageSize = null)
+        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, QueryDefinition  queryDefinition, string partitionkey= null, string continuationToken = null, int? pageSize = null)
         {
             List<T> list = new List<T>();
             double RU = 0;
-            if (string.IsNullOrWhiteSpace(partitionkey))
-            {
-                return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken });
-            }
-
             await foreach (var item in container.GetItemQueryStreamIterator(queryDefinition: queryDefinition, continuationToken: continuationToken,
-                requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey = new PartitionKey(partitionkey) }))
+                requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey =!string.IsNullOrWhiteSpace(partitionkey) ? new PartitionKey(partitionkey) : null }))
             {
                 using var json = await JsonDocument.ParseAsync(item.ContentStream);
                 if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
@@ -154,85 +149,45 @@ namespace TEAMModelOS.SDK.DI
             return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken }); ;
         }
 
-        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, string sql, string partitionkey, string? continuationToken = null, int? pageSize = null)
+        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, string sql, string partitionkey= null, string continuationToken = null, int? pageSize = null)
         {
             List<T> list = new List<T>();
             double RU = 0;
-            if (string.IsNullOrWhiteSpace(partitionkey))
+            try
             {
-                try
+
+                await foreach (var item in container.GetItemQueryStreamIterator(queryText: sql, continuationToken: continuationToken,
+                 requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey =!string.IsNullOrWhiteSpace(partitionkey)?new PartitionKey(partitionkey) : null}))
                 {
-                    await foreach (var item in container.GetItemQueryStreamIterator(queryText: sql, continuationToken: continuationToken,
-                     requestOptions: new QueryRequestOptions { MaxItemCount = pageSize }))
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
                     {
-                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
-                        {
-                            foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
-                            {
-                                list.Add(obj.ToObject<T>());
-                            }
-                        }
-                        if (sql.Contains(" distinct ", StringComparison.OrdinalIgnoreCase)
-                            || (sql.Contains("order ", StringComparison.OrdinalIgnoreCase)
-                            && !sql.Contains(".order ", StringComparison.OrdinalIgnoreCase)))
-                        {
-                            continuationToken = null;
-                        }
-                        else
-                        {
-                            continuationToken = item.GetContinuationToken();
-                        }
-                        RU += item.RU();
-                        if (pageSize.HasValue && pageSize.Value >= 0 && list.Count >= pageSize)
+                        foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
                         {
-                            break;
+                            list.Add(obj.ToObject<T>());
                         }
                     }
-                }
-                catch (Exception ex)
-                {
-                    Console.WriteLine(ex.ToString());
-                }
-            }
-            else {
-                try
-                {
-                    await foreach (var item in container.GetItemQueryStreamIterator(queryText: sql, continuationToken: continuationToken,
-                     requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey = new PartitionKey(partitionkey) }))
+                    if (sql.Contains(" distinct ", StringComparison.OrdinalIgnoreCase)
+                        || (sql.Contains("order ", StringComparison.OrdinalIgnoreCase)
+                        && !sql.Contains(".order ", StringComparison.OrdinalIgnoreCase)))
                     {
-                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
-                        {
-                            foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
-                            {
-                                list.Add(obj.ToObject<T>());
-                            }
-                        }
-                        if (sql.Contains(" distinct ", StringComparison.OrdinalIgnoreCase)
-                            || (sql.Contains("order ", StringComparison.OrdinalIgnoreCase)
-                            && !sql.Contains(".order ", StringComparison.OrdinalIgnoreCase)))
-                        {
-                            continuationToken = null;
-                        }
-                        else
-                        {
-                            continuationToken = item.GetContinuationToken();
-                        }
-                        RU += item.RU();
-                        if (pageSize.HasValue && pageSize.Value >= 0 && list.Count >= pageSize)
-                        {
-                            break;
-                        }
+                        continuationToken = null;
+                    }
+                    else
+                    {
+                        continuationToken = item.GetContinuationToken();
+                    }
+                    RU += item.RU();
+                    if (pageSize.HasValue && pageSize.Value >= 0 && list.Count >= pageSize)
+                    {
+                        break;
                     }
-                }
-                catch (Exception ex)
-                {
-                    Console.WriteLine(ex.ToString());
                 }
             }
-
-            
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+            }
             //记录日志,RU开销大于400(开发测试),1000(正式)
             return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken }); ;
         }

+ 144 - 3
TEAMModelOS.SDK/Models/Service/StudentService.cs

@@ -22,7 +22,48 @@ namespace TEAMModelOS.SDK
 {
     public class StudentService
     {
+        public class StudentActivity
+        {
+
+            public string id { get; set; }
+            public string code { get; set; }
 
+            /// <summary>
+            /// 源数据的发布层级 类型 school  teacher
+            /// </summary>
+            public string owner { get; set; }
+          
+            public string pk {  get; set; }
+            //评测模式
+            public string source { get; set; }
+            public string name { get; set; }
+            public long startTime { get; set; }
+            public long endTime { get; set; }
+            public string scope { get; set; }
+            public string school { get; set; }
+            public string creatorId { get; set; }
+        
+            public List<string> subjects { get; set; }
+         
+            public List<string> classes { get; set; }
+            public List<string> stuLists { get; set; }
+            public List<string> tchLists { get; set; }
+            public long createTime { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
+            public Dictionary<string, JsonElement> ext { get; set; } = new Dictionary<string, JsonElement>();
+            /// 评分状态,0,未评分, 1已评分
+            public int sStatus { get; set; } = 0;
+            //评测 纸本1或者书面问答0
+            public int qamode { get; set; } = 0;
+            //标记作业活动是否比交
+            public bool mustSubmit { get; set; } = false;
+            //标记问卷是否重复提交 0 否 1 是
+            public int isSub { get; set; } = 0;
+            /// <summary>
+            /// 任务完成状态,-1 未参与,0,未完成, 1已完成
+            /// </summary>
+            public int taskStatus { get; set; } = -1;
+            public string recordUrl { get; set; }
+        }
 
         /// <summary>
         ///
@@ -35,8 +76,9 @@ namespace TEAMModelOS.SDK
         /// <param name="types">Exam ,Vote,Homework,Survey</param>
         /// <param name="_azureCosmos"></param>
         /// <param name="azureRedis"></param>
-        public static async void FindActivity(JsonElement request,string userId ,string userType, List<string>groupListIds, string school,List<string> types, AzureCosmosFactory _azureCosmos, AzureRedisFactory azureRedis)
+        public static async void FindActivity(JsonElement request,string userId ,string userType, List<string>groupListIds,List<string> subjects, string school,List<string> types, AzureCosmosFactory _azureCosmos, AzureRedisFactory azureRedis)
         {
+            string filed = "c.id ,c.code,c.owner,c.pk,c.qamode,c.name,c.school,c.startTime,c.endTime,c.classes,c.stuLists,c.tchLists,c.createTime,c.creatorId,c.ext,c.isSub,c.mustSubmit,c.sStatus,c.scope,c.source,c.subjects";
             if (string.IsNullOrWhiteSpace(school))
             {
                 if (request.TryGetProperty("school", out JsonElement schooljson))
@@ -47,7 +89,7 @@ namespace TEAMModelOS.SDK
                     }
                 }
             }
-            long stime = 0, etime = 0; 
+            long stime = DateTimeOffset.UtcNow.AddDays(-30).ToUnixTimeMilliseconds(), etime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); 
             if (request.TryGetProperty("stime", out JsonElement _stime))
             {
                 if (!_stime.ValueKind.Equals(JsonValueKind.Undefined) && !_stime.ValueKind.Equals(JsonValueKind.Null) && _stime.TryGetInt64(out long data))
@@ -62,10 +104,109 @@ namespace TEAMModelOS.SDK
                     etime= data;
                 }
             }
+            string code = null;
+            string  groupListSQL =string .Empty ;
 
-        }
 
+            if (groupListIds.IsNotEmpty())
+            {
+                List<string >  arrayStr= new List<string>();
+                groupListIds.ForEach(z => {
+                    arrayStr.Add($"array_contains(c.classes,'{z}') ");
+                    arrayStr.Add($"array_contains(c.stuLists,'{z}') ");
+                    arrayStr.Add($"array_contains(c.tchLists,'{z}') ");
+                });
+                groupListSQL= $"and ({string.Join(" or ", arrayStr)})";
+            }
+            else
+            {
+                throw new Exception("名单为空");
+            }
+            
+            List<StudentActivity> activities = new List<StudentActivity>();
+            if (types.IsEmpty()|| types.Contains("Exam")) {
+                string subjectSQL = "";
+                string subjectJoin = "";
+                if (subjects.IsNotEmpty()) {
+                    subjectJoin = "join s in c.subjects";
+                    subjectSQL = $" and  c.id in ({string.Join(",",subjects.Select(z=>$"'{z}'"))}) ";
+                }
+                StringBuilder SQL = new StringBuilder( $"select { filed} from c {subjectJoin} where c.pk='Exam' {subjectSQL} {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && ! string.IsNullOrWhiteSpace(school)) {
+                   var resultSchool =   await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Exam-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+
+            if (types.IsEmpty()|| types.Contains("Vote"))
+            {
+               
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Vote' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Vote-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+            if (types.IsEmpty()|| types.Contains("Survey"))
+            {
+
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Survey' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Survey-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+            if (types.IsEmpty()|| types.Contains("Homework"))
+            {
+
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Homework' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Homework-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+            if (types.IsEmpty()|| types.Contains("Art"))
+            {
+
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Art' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.school='school' ", $"Art-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+            }
+            //作答 记录recordUrl  taskStatus
+        }
 
+       
 
 
 

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

@@ -2,9 +2,9 @@
 
   <PropertyGroup>
     <TargetFramework>net6.0</TargetFramework>
-    <Version>5.2311.8</Version>
-    <AssemblyVersion>5.2311.8.1</AssemblyVersion>
-    <FileVersion>5.2311.8.1</FileVersion>
+    <Version>5.2311.15</Version>
+    <AssemblyVersion>5.2311.15.1</AssemblyVersion>
+    <FileVersion>5.2311.15.1</FileVersion>
     <PackageReleaseNotes>发版</PackageReleaseNotes>
   </PropertyGroup>
 

+ 3 - 2
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -322,7 +322,7 @@
 					let hasStuDash = schoolVersions.productSum.service.find((i) => i.prodCode === "YPXSJ6NJ"); // 五育看板模块
 					let hasAnalysis = schoolVersions.productSum.service.find((i) => i.prodCode === "YMPCVCIM"); // 学情分析模块 代表至少是标准版
 					let isPro = hasStuDash && hasArtProd; // 同时购买了五育看板和艺术评测 代表是专业版本
-					let isArtTest = this.$store.state.user.schoolProfile.school_base.modules?.includes('art') // modules里面有art代表 必定为评测版本
+					// let isArtTest = this.$store.state.user.schoolProfile.school_base.modules?.includes('art') // modules里面有art代表 必定为评测版本
 					this.hasArtProd = hasArtProd;
 					if (isPro) {
 						this.isPro = true;
@@ -331,7 +331,7 @@
 					} else if (hasAnalysis) {
 						this.edition = "standard";
 						this.systemLevel = this.$t("system.advanced");
-					} else if (isArtTest) {
+					} else if (hasArtProd) {
 						this.edition = "artTest";
 						this.systemLevel = this.$t("system.artTest");
 					} else {
@@ -346,6 +346,7 @@
 					localStorage.setItem("edition", this.edition);
 					this.hasAnalysisAuth = this.getAnalysisAuth();
 				}
+
 				let bodyElement = document.body;
 				console.log(bodyElement.style, "body");
 				bodyElement.style.fontFamily = localStorage.local === "zh-tw" ? "微软雅黑" : "Hm";

+ 0 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/ArtView.vue

@@ -112,7 +112,6 @@
             </div>
 
           </div>
-
         </div>
       </template>
       <!-- </div> -->

+ 3 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue

@@ -578,7 +578,9 @@
                     this.activeIndex = index
                     if(isArt) {
                         this.examLists = item.exam
-                        this.hwLists = item.homework
+                        // this.hwLists = item.homework
+                        // 2023.11.15 #2985 C527 艺术评测只显示基本技能,其他材料通过小程序端上传
+                        this.hwLists = item.homework.filter(hws => hws.quotaId === "quota_22")
                         if(this.examLists.length) {
                             this.showPaper = 0
                             localStorage.setItem("quotaId", item.exam[0].quotaId)

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

@@ -469,7 +469,7 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                 isListNoItem: false, //清單為空
                 eventList: [], //活动数据
                 eventShow: [], //展示的活动数据
-                eventPageType: ["Learn", "Exam", "Homework", "Vote", "Survey"], //本頁出現的類型
+                eventPageType: ["Learn", "Exam", "Homework", "Vote", "Survey", "Art"], //本頁出現的類型
                 selectedEventStatusNow: {
                     type: "all",
                     status: this.$t('studentWeb.event.allStatus')
@@ -685,7 +685,7 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                                 })
                                 if(info) {
                                     this.nowSub = this.courseNow.subjectList.findIndex(item => {
-                                        return info.subjects.includes(item.id)
+                                        return info.subjects.includes(item.id) || info.subjects.includes(item.bindId)
                                     })
                                 }
                             }
@@ -869,8 +869,10 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                 if (currentfilterArray.length !== 0) {
                     if(this.nowTea) {
                         this.eventShow = currentfilterArray.filter(item => item.creatorId === this.teachers[this.nowTea - 1].id)
-                    } else if(this.courseNow.subjectList) {
-                        this.eventShow = currentfilterArray.filter(item => item.subjects.includes(this.courseNow.subjectList[this.nowSub].id))
+                    } else if(this.courseNow.subjectList && !this.showType.includes("Vote")) {
+                        this.eventShow = currentfilterArray.filter(item => {
+                            return item.subjects.includes(this.courseNow.subjectList[this.nowSub].id) || item.subjects.includes(this.courseNow.subjectList[this.nowSub].bindId)
+                        })
                     } else {
                         this.eventShow = [...currentfilterArray]
                     }

+ 9 - 0
TEAMModelOS/ClientApp/src/router/routes.js

@@ -1150,6 +1150,15 @@ export const routes = [{
                 middleware: ['login', 'ability:admin,dashboard-read'],
             }
         },
+        {
+            name: 'schoolDash',
+            path: '/schoolDash',
+            component: () => import('@/view/dashboard/school/SchoolDashboard.vue'),
+            meta: {
+                activeName: 'dashCenter',
+                middleware: ['login', 'ability:admin,dashboard-read'],
+            }
+        },
         {
         name: 'artDashboard',
         path: '/artDashboard',

+ 1 - 0
TEAMModelOS/ClientApp/src/view/artexam/Create.vue

@@ -460,6 +460,7 @@ export default {
                     setting.paper.forEach(paper => {
                       paper.infoId = infoId
                       paper.scope = 'school'
+                      paper.time = setting.time
                     })
                     this.examInfoList.push(...setting.paper)
                   })

+ 1 - 4
TEAMModelOS/ClientApp/src/view/artexam/Mgt.vue

@@ -201,7 +201,6 @@
 						if (task.type === 1 && task.infoId) {
 							try {
 								let simplePapers = this.examInfoList.filter((item) => item.infoId === task.infoId);
-								console.log(simplePapers);
 								let paperPromiseArr = [];
 								simplePapers.forEach((paper) => {
 									paperPromiseArr.push(this.getPaperInfo(paper));
@@ -323,8 +322,6 @@
 						simplePaper.scope = "school";
 						simplePaper.code = "hbcn";
 						let fullPaper = await this.$evTools.getStuPaper(simplePaper);
-						console.log(simplePaper);
-						console.log(fullPaper);
 						if (fullPaper) {
 							let apiPaper = {};
 							apiPaper.id = fullPaper.id;
@@ -339,7 +336,7 @@
 							apiPaper.point = [];
 							apiPaper.knowledge = [];
 							apiPaper.field = [];
-							apiPaper.time = fullPaper.time;
+							apiPaper.time = simplePaper.time;
 							apiPaper.type = []; //后面新增字段, 保存每个题目类型
 							for (let k = 0; k < fullPaper.slides.length; k++) {
 								if (fullPaper.slides[k].type !== "compose") {

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

@@ -0,0 +1,15 @@
+<template>
+    <div class="school-dash-container">
+        <!-- 这里放学校看板页面 -->
+    </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+
+</style>

+ 2 - 1
TEAMModelOS/ClientApp/src/view/dashboardCenter/DashboardCenter.vue

@@ -47,7 +47,8 @@
 			goDash(val) {
 				switch (val) {
 					case "school":
-						this.$Message.warning('即将开放~')
+						// this.$Message.warning('即将开放~')
+						this.$router.push("schoolDash");
 						break;
 					case "teacher":
 						this.$router.push("researchDashboard");

+ 5 - 3
TEAMModelOS/ClientApp/src/view/student-web/AppNew.vue

@@ -75,7 +75,8 @@
                     </Tooltip>
                     <!-- 作业 -->
                     <Tooltip :content="$t('studentWeb.type.homework')">
-                        <MenuItem name="6" to="/studentWeb/homeworkView" v-show="selectClass && !isScale">
+                        <MenuItem name="6" to="/studentWeb/homeworkView"
+                                v-show="getNowCourse && getNowCourse.id && !onlySystem && getNowCourse.subject && selectClass && !isScale">
                             <svg-icon icon-class="doc" class="tabIcon3" />
                             <span class="no-show" v-show="MyNo != 6">{{ $t('studentWeb.type.homework') }}</span>
                         </MenuItem>
@@ -116,7 +117,8 @@
                     </MenuItem> -->
                     <!-- 成绩 -->
                     <Tooltip :content="$t('studentWeb.type.achievement')">
-                        <MenuItem name="7" to="/studentWeb/achievement" v-show="getNowCourse && getNowCourse.id && !onlySystem && getNowCourse.subject && selectClass && !isScale">
+                        <MenuItem name="7" to="/studentWeb/achievement"
+                                v-show="getNowCourse && getNowCourse.id && !onlySystem && getNowCourse.subject && selectClass && !isScale">
                             <Icon custom="iconfont icon-chengjitongji" size="18" style="font-weight: bold" />
                             <span class="no-show" v-show="MyNo != 7">{{ $t('studentWeb.type.achievement') }}</span>
                         </MenuItem>
@@ -793,7 +795,7 @@ export default {
         classChange(value) {
             if(value) {
                 // 没有课程 && 行政班未加入课程
-                if((this.onlySystem || this.courseList[this.selectClass - 1].isSystem) && this.noJumpRouter.includes(this.$route.path)) {
+                if((this.onlySystem || this.courseList[this.selectClass - 1].subjectList) && this.noJumpRouter.includes(this.$route.path)) {
                     this.$router.push({
                         path: '/studentWeb/examView'
                     })

+ 4 - 4
TEAMModelOS/TEAMModelOS.csproj

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

+ 1 - 1
TEAMModelOS/appsettings.Development.json

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

+ 1 - 1
TEAMModelOS/appsettings.json

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