Bläddra i källkod

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

liqk 4 år sedan
förälder
incheckning
9e3daeb164

+ 175 - 0
TEAMModelFunction/Properties/ServiceDependencies/teammodelosfunction__test - 压缩部署/profile.arm.json

@@ -0,0 +1,175 @@
+{
+  "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+  "contentVersion": "1.0.0.0",
+  "metadata": {
+    "_dependencyType": "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": "test",
+      "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": {
+                    "AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage_name'), ';AccountKey=', listKeys(variables('storage_ResourceId'), '2017-10-01').keys[0].value, ';EndpointSuffix=', 'core.windows.net')]",
+                    "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')]"
+              }
+            }
+          ]
+        }
+      }
+    }
+  ]
+}

+ 6 - 0
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseMyTable.vue

@@ -473,6 +473,12 @@
 				this.pageChange(1)
 				this.isFirst = false
 			},
+			columns:{
+				handler(n,o){
+					this.tableColumns = n
+				},
+				deep:true
+			},
 			exportTableRefs: {
 				handler(n) {
 					// 如果导出的表格包含当前表格 则直接运行下载

+ 5 - 2
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseScoreRateBar.vue

@@ -195,14 +195,17 @@
 
 			/* 根据学生总体数据来换取得分率区间分布数据 */
 			doRender(list,isAll) {
-				let sRateArr = isAll ? list.map(i => i.sRate) : list.map(i => i.subjects[this.subjectIndex].sRate)
+				let sRateArr = isAll ? list.map(i => i.sRate * 100) : list.map(i => i.subjects[this.subjectIndex].sRate * 100)
 				let splitArr = [...new Array(10).keys()]
 				let result = new Array(10).fill(0)
 				sRateArr.forEach(rate => {
 					splitArr.forEach((j, index) => {
-						if (rate.toString().slice(0, 1) === j.toString()) {
+						if(rate.toString().length === 3){
+							result[9]++
+						}else if(rate.toString().slice(0, 1) === j.toString()) {
 							result[index]++
 						}
+						
 					})
 				})
 				this.scoreRateCountArr = result

+ 1 - 1
TEAMModelOS/ClientApp/src/utils/public.js

@@ -683,7 +683,7 @@ export default {
 			stuResult[item] = this.getLevelStuPercent(val, subjectIndex, index)
 			classResult[item] = this.getLevelClassPercent(val, subjectIndex, index)
 		})
-		stuResult.grade = val.fieldAllPer[subjectIndex].value.map((score,index) => Number(score / val.fieldwrong[subjectIndex].value[index][1]) * 100)
+		stuResult.grade = val.fieldAllPer[subjectIndex].value.map((score,index) => (Number(score / val.fieldwrong[subjectIndex].value[index][1]).toFixed(2)) * 100)
 		stuResult.keys = val.knowKey
 		classResult.keys = val.knowkey
 		classResult.className = val.classes.map(i => i.className)

+ 2 - 0
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseFilter.vue

@@ -281,12 +281,14 @@
 
 	.filter-wrap .filter-item {
 		margin-top: 10px;
+		display: flex;
 	}
 
 	.filter-wrap .filter-title {
 		font-size: 16px;
 		font-weight: bold;
 		margin-right: 10px;
+		min-width: 40px;
 	}
 
 	.filter-wrap .ivu-radio-group {

+ 2 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/CommonExercise.less

@@ -346,6 +346,7 @@
   background: #fff;
   .filter-item {
     margin-top: 10px;
+	display: flex;
     &:first-child {
       margin-top: 0px;
     }
@@ -354,6 +355,7 @@
     font-size: 16px;
     font-weight: bold;
     margin-right: 10px;
+	min-width: 40px;
   }
   .ivu-radio-group {
     padding-bottom: 4px;

+ 2 - 3
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue

@@ -1,7 +1,5 @@
 <template>
     <div class="achievement-container">
-		<!-- 进线情况统计 -->
-		<EntryTables ref="entryTable" :subjectIndex="curSubjectIndex"></EntryTables>
         <!-- 及格率统计 -->
 		<Row>
             <span class="component-title" style="margin-top:40px">{{$t('totalAnalysis.ach_title1')}}</span>
@@ -53,7 +51,8 @@
 				
 			</Col>
 		</Row>
-		
+		<!-- 进线情况统计 -->
+        <EntryTables ref="entryTable" :subjectIndex="curSubjectIndex"></EntryTables>
     </div>
 </template>
 

+ 5 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue

@@ -107,7 +107,10 @@
 					{
 						title: this.$t('totalAnalysis.base_id'),
 						key: 'setNo',
-						minWidth:100
+						minWidth:100,
+						renderType: function(h, params) {
+						    return h('span', params.row.setNo || '-')
+						}
 					},
 					{
 						title: this.$t('totalAnalysis.ach_table_text2'),
@@ -373,7 +376,7 @@
 							margin: 15,
 							color: '#989898'
 						},
-						data: echartData.map(item => item.setNo)
+						data: echartData.map(item => item.setNo || '-')
 					},
 					yAxis: {
 						name: this.$t('totalAnalysis.ach_table_text2'),

+ 6 - 16
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/EntryTables.vue

@@ -133,15 +133,12 @@
 		created() {
 			this.originNumberColumns = JSON.parse(JSON.stringify(this.entryNumberColumns))
 			this.originRateColumns = JSON.parse(JSON.stringify(this.entryRateColumns))
-			// console.log(this.originRateColumns)
-			// console.log(JSON.stringify(this.originRateColumns))
 			
 			let scatter = this.$store.state.totalAnalysis.scatter
 			this.classList = this.$store.state.totalAnalysis.classList
 
 			this.analysisJson = this.getAnalysisJson
 			console.log(this.analysisJson)
-
 			
 		},
 
@@ -164,17 +161,14 @@
 				})
 				// 清除之前的科目columns 添加当前评测的科目columns
 				let fixColumns = this.isAllSubject ? 4 : 3
-				this.entryNumberColumns.splice(fixColumns, this.entryNumberColumns.length - fixColumns, ...subjectColumns)
 				if (!this.isAllSubject) {
-					console.log(this.entryRateColumns.map(i => i.key).includes('entryNum'))
-					this.entryRateColumns.map(i => i.key).includes('entryNum') && this.entryRateColumns.splice(3,1)
+					this.entryRateColumns = this.entryRateColumns.filter(i => i.key !== 'entryNum')
+					this.entryNumberColumns = this.entryNumberColumns.filter(i => i.key !== 'score')
 				} else {
-					this.entryRateColumns = this.originRateColumns
+					this.entryRateColumns = JSON.parse(JSON.stringify(this.originRateColumns))
+					this.entryNumberColumns = JSON.parse(JSON.stringify(this.originNumberColumns))
 				}
-				console.log('更新后的',this.entryRateColumns)
-
-				// this.entryTableData = this.getTableDatas(data)
-				// this.entryBarData = this.getEntryBarData(data)
+				this.entryNumberColumns.splice(fixColumns, this.entryNumberColumns.length - fixColumns, ...subjectColumns)
 
 			},
 
@@ -208,7 +202,6 @@
 
 			/* 获取进线率统计数据 */
 			getEntryBarData(analysisJson) {
-				console.log(this.isAllSubject)
 				let result = []
 				analysisJson.classes.forEach((classItem, classIndex) => {
 					result.push({
@@ -253,8 +246,7 @@
 				})
 				this.entryRateColumns[1].filters = filterArr
 				this.entryNumberColumns[1].filters = filterArr
-				this.renderColumns(this.getAnalysisJson) // 渲染科目表头
-				
+				this.renderColumns(this.getAnalysisJson)
 			}
 
 		},
@@ -278,8 +270,6 @@
 					this.renderColumns(val)
 					this.entryTableData = this.getTableDatas(val)
 					this.entryBarData = this.getEntryBarData(val)
-					console.log(this.isAllSubject)
-					console.log(this.curSubjectIndex)
 				},
 			}
 		}

+ 5 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue

@@ -100,7 +100,10 @@
                         title: this.$t('totalAnalysis.base_id'),
                         key: 'no',
                         sortable: 'custom',
-                        minWidth: 50
+                        minWidth: 50,
+						renderType: function(h, params) {
+						    return h('span', params.row.no || '-')
+						}
                     },
 					{
 					    title: this.$t('totalAnalysis.sca_chart_text1'),
@@ -108,7 +111,7 @@
 					    sortable: 'custom',
 					    minWidth: 50,
 						renderType: function(h, params) {
-						    return h('span', (Number(params.row.sRate)).toFixed(2) + '%')
+						    return h('span', (Number(params.row.sRate) * 100).toFixed(2) + '%')
 						},
 					},
 					{

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.less

@@ -188,7 +188,7 @@ body, html, .total-container {
   .data-select {
     padding: 25px 0 0 22px;
     color: #9e9e9e;
-    font-size: 16px;
+    font-size: 14px;
     .data-select-active {
       color: #fff;
       border-bottom: 3px solid #42beda;

+ 5 - 5
TEAMModelOS/Controllers/Analysis/AnalysisController.cs

@@ -384,7 +384,7 @@ namespace TEAMModelOS.Controllers.Analysis
                         }
                         //班级全科的pr
                         int index = stuTotals.IndexOf(x.total);
-                        double CPR = stuCount > 0 ? 100 - (100 * (index + 1) - 50) / stuCount : 0;
+                        double CPR = stuCount > 0 ? Math.Floor(100 - (100 * (index + 1) - 50) * 1.0 / stuCount) : 0;
                         //double CPR = 100 - (100 * (index + 1) - 50) / stuCount;
                         x.cpr = CPR;
                         x.csort = index + 1;
@@ -396,7 +396,7 @@ namespace TEAMModelOS.Controllers.Analysis
                             var subjectT = classStudents.SelectMany(s => s.subjects).Where(sub => sub.id == y.id).Select(scr => scr.score).ToList();
                             subjectT.Sort((s1, s2) => { return s2.CompareTo(s1); });
                             int index = subjectT.IndexOf(y.score);
-                            double CPR = stuCount > 0 ? 100 - (100 * (index + 1) - 50) / stuCount : 0;
+                            double CPR = stuCount > 0 ? Math.Floor(100 - (100 * (index + 1) - 50) * 1.0 / stuCount) : 0;
                             //double CPR = 100 - (100 * (index + 1) - 50) / stuCount;
                             y.cpr = CPR;
                             y.csort = index + 1;
@@ -537,8 +537,8 @@ namespace TEAMModelOS.Controllers.Analysis
                     studentAys.ForEach(x =>
                     {
                         //年级全科的pr
-                        int index = stuGradeTotal.IndexOf(476);
-                        double GPR = stuCount > 0 ? 100 - (100 * (index + 1) - 50) / stuCount : 0;
+                        int index = stuGradeTotal.IndexOf(x.total);
+                        double GPR = stuCount > 0 ? Math.Floor(100 - (100 * (index + 1) - 50)*1.0 / stuCount) : 0;
                         //double GPR = 100 - (100 * (index + 1) - 50) / stuCount;
                         x.gpr = GPR;
                         x.gsort = index + 1;
@@ -548,7 +548,7 @@ namespace TEAMModelOS.Controllers.Analysis
                             var subjectT = studentAys.SelectMany(s => s.subjects).Where(sub => sub.id == y.id).Select(scr => scr.score).ToList();
                             subjectT.Sort((s1, s2) => { return s2.CompareTo(s1); });
                             int index = subjectT.IndexOf(y.score);
-                            double GPR = stuCount > 0 ? 100 - (100 * (index + 1) - 50) / stuCount : 0;
+                            double GPR = stuCount > 0 ? Math.Floor(100 - (100 * (index + 1) - 50) * 1.0 / stuCount) : 0;
                             //double GPR = 100 - (100 * (index + 1) - 50) / stuCount;
                             y.gpr = GPR;
                             y.gsort = index + 1;