diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go
index 48b9205c6..2d7592baf 100644
--- a/models/user_business_analysis.go
+++ b/models/user_business_analysis.go
@@ -815,7 +815,7 @@ func setUserMetrics(userMetrics map[string]int, user *User, start_time int64, en
userMetrics["TotalActivateRegistUser"] = getMapKeyStringValue("TotalActivateRegistUser", userMetrics) + 1
}
- if dateRecord.UserIndex > 0 || dateRecord.LoginCount > 0 {
+ if getUserActivate(dateRecord) > 0 {
userMetrics["HasActivityUser"] = getMapKeyStringValue("HasActivityUser", userMetrics) + 1
}
@@ -865,6 +865,34 @@ func getUserIndexFromAnalysisAll(dateRecord UserBusinessAnalysisAll, ParaWeight
result += float64(dateRecord.CommitModelCount) * getParaWeightValue("CommitModelCount", ParaWeight, 0.2)
result += dateRecord.OpenIIndex * getParaWeightValue("OpenIIndex", ParaWeight, 0.1)
+ result += float64(dateRecord.CollectDataset) * getParaWeightValue("CollectDataset", ParaWeight, 0.1)
+ result += float64(dateRecord.CollectedDataset) * getParaWeightValue("CollectedDataset", ParaWeight, 0.1)
+ result += float64(dateRecord.RecommendDataset) * getParaWeightValue("RecommendDataset", ParaWeight, 0.2)
+ result += float64(dateRecord.CollectImage) * getParaWeightValue("CollectImage", ParaWeight, 0.1)
+ result += float64(dateRecord.CollectedImage) * getParaWeightValue("CollectedImage", ParaWeight, 0.1)
+ result += float64(dateRecord.RecommendImage) * getParaWeightValue("RecommendImage", ParaWeight, 0.2)
+
+ return result
+}
+
+func getUserActivate(dateRecord UserBusinessAnalysis) int {
+ var result int
+ result += dateRecord.CodeMergeCount
+ result += dateRecord.CommitCount
+ result += dateRecord.IssueCount
+ result += dateRecord.CommentCount
+ result += dateRecord.FocusRepoCount
+ result += dateRecord.StarRepoCount
+ result += dateRecord.SolveIssueCount
+ result += dateRecord.EncyclopediasCount
+ result += dateRecord.CreateRepoCount
+ result += dateRecord.CloudBrainTaskNum
+ result += dateRecord.CommitModelCount
+ result += dateRecord.CommitDatasetNum
+ result += dateRecord.FocusOtherUser
+ result += dateRecord.CollectDataset
+ result += dateRecord.CollectImage
+ result += dateRecord.CommitCodeSize
return result
}
@@ -899,6 +927,13 @@ func getUserIndex(dateRecord UserBusinessAnalysis, ParaWeight map[string]float64
result += float64(dateRecord.CommitModelCount) * getParaWeightValue("CommitModelCount", ParaWeight, 0.2)
result += dateRecord.OpenIIndex * getParaWeightValue("OpenIIndex", ParaWeight, 0.1)
+ result += float64(dateRecord.CollectDataset) * getParaWeightValue("CollectDataset", ParaWeight, 0.1)
+ result += float64(dateRecord.CollectedDataset) * getParaWeightValue("CollectedDataset", ParaWeight, 0.1)
+ result += float64(dateRecord.RecommendDataset) * getParaWeightValue("RecommendDataset", ParaWeight, 0.2)
+ result += float64(dateRecord.CollectImage) * getParaWeightValue("CollectImage", ParaWeight, 0.1)
+ result += float64(dateRecord.CollectedImage) * getParaWeightValue("CollectedImage", ParaWeight, 0.1)
+ result += float64(dateRecord.RecommendImage) * getParaWeightValue("RecommendImage", ParaWeight, 0.2)
+
return result
}
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index f53bea7b1..c96e6af3f 100755
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -507,8 +507,16 @@ static.CloudBrainTaskNum=CloudBrain Task Count
static.CloudBrainRunTime=CloudBrain Run Time
static.CommitDatasetNum=Commit Dataset Count
static.CommitModelCount=Commit Model Count
-static.UserIndex=User Index
+static.UserIndex=Normalized user index
+static.UserIndexPrimitive=User Index
static.countdate=Count Date
+static.FocusOtherUser=Focus Other User Count
+static.CollectDataset=Collect Dataset Count
+static.CollectedDataset=Collected Dataset Count
+static.RecommendDataset=Recommended Dataset Count
+static.CollectImage=Collect Image Count
+static.CollectedImage=Collected Image Count
+static.RecommendImage=Recommended Image Count
static.all=All
static.public.user_business_analysis_current_month=Current_Month
static.public.user_business_analysis_current_week=Current_Week
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index c82347d5e..27ba96c51 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -512,8 +512,16 @@ static.CloudBrainTaskNum=云脑任务数
static.CloudBrainRunTime=云脑运行时间(小时)
static.CommitDatasetNum=上传(提交)数据集文件数
static.CommitModelCount=提交模型数
-static.UserIndex=用户指数
+static.UserIndex=归一化用户指数
+static.UserIndexPrimitive=用户指数
static.countdate=系统统计时间
+static.FocusOtherUser=关注他人数
+static.CollectDataset=收藏数据集
+static.CollectedDataset=被收藏数据集
+static.RecommendDataset=被推荐数据集数
+static.CollectImage=收藏镜像数
+static.CollectedImage=被收藏镜像数
+static.RecommendImage=被推荐镜像数
static.all=所有
static.public.user_business_analysis_current_month=本月
static.public.user_business_analysis_current_week=本周
diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go
index 995465b09..bfc85bb80 100755
--- a/routers/repo/user_data_analysis.go
+++ b/routers/repo/user_data_analysis.go
@@ -19,6 +19,125 @@ const (
PAGE_SIZE = 2000
)
+func getExcelHeader(ctx *context.Context) map[string]string {
+ excelHeader := make([]string, 0)
+ excelHeader = append(excelHeader, ctx.Tr("user.static.id"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.name"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.UserIndex"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.UserIndexPrimitive"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.codemergecount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.commitcount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.issuecount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.commentcount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.focusrepocount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.starrepocount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.logincount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.watchedcount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.commitcodesize"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.solveissuecount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.encyclopediascount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.createrepocount"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.openiindex"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CloudBrainTaskNum"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CloudBrainRunTime"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CommitDatasetNum"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CommitModelCount"))
+
+ excelHeader = append(excelHeader, ctx.Tr("user.static.FocusOtherUser"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CollectDataset"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CollectedDataset"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.RecommendDataset"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CollectImage"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.CollectedImage"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.RecommendImage"))
+
+ excelHeader = append(excelHeader, ctx.Tr("user.static.registdate"))
+ excelHeader = append(excelHeader, ctx.Tr("user.static.countdate"))
+
+ excelHeaderMap := make(map[string]string, 0)
+ var i, tmp byte
+ tmp = 'A'
+ i = 0
+ for j, value := range excelHeader {
+ excelColumn := string(tmp+i) + fmt.Sprint(j+1)
+ log.Info("excelColumn=" + excelColumn)
+ excelHeaderMap[excelColumn] = value
+ i++
+ }
+ return excelHeaderMap
+}
+
+func writeExcel(row int, xlsx *excelize.File, sheetName string, userRecord *models.UserBusinessAnalysisAll) {
+ rows := fmt.Sprint(row)
+ var tmp byte
+ tmp = 'A'
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.ID)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.Name)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, fmt.Sprintf("%.2f", userRecord.UserIndexPrimitive))
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CodeMergeCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CommitCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.IssueCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CommentCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.FocusRepoCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.StarRepoCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.LoginCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.WatchedCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CommitCodeSize)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.SolveIssueCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.EncyclopediasCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CreateRepoCount)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex))
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CloudBrainTaskNum)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CommitDatasetNum)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CommitModelCount)
+ tmp = tmp + 1
+
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.FocusOtherUser)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CollectDataset)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CollectedDataset)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.RecommendDataset)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CollectImage)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.CollectedImage)
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, userRecord.RecommendImage)
+ tmp = tmp + 1
+
+ formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05")
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, formatTime[0:len(formatTime)-3])
+ formatTime = userRecord.DataDate
+ tmp = tmp + 1
+ xlsx.SetCellValue(sheetName, string(tmp)+rows, formatTime)
+
+}
+
func queryUserDataPage(ctx *context.Context, tableName string, queryObj interface{}) {
page := ctx.QueryInt("page")
if page <= 0 {
@@ -37,30 +156,7 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac
sheetName := ctx.Tr("user.static.sheetname")
index := xlsx.NewSheet(sheetName)
xlsx.DeleteSheet("Sheet1")
- dataHeader := map[string]string{
- "A1": ctx.Tr("user.static.id"),
- "B1": ctx.Tr("user.static.name"),
- "C1": ctx.Tr("user.static.UserIndex"),
- "D1": ctx.Tr("user.static.codemergecount"),
- "E1": ctx.Tr("user.static.commitcount"),
- "F1": ctx.Tr("user.static.issuecount"),
- "G1": ctx.Tr("user.static.commentcount"),
- "H1": ctx.Tr("user.static.focusrepocount"),
- "I1": ctx.Tr("user.static.starrepocount"),
- "J1": ctx.Tr("user.static.logincount"),
- "K1": ctx.Tr("user.static.watchedcount"),
- "L1": ctx.Tr("user.static.commitcodesize"),
- "M1": ctx.Tr("user.static.solveissuecount"),
- "N1": ctx.Tr("user.static.encyclopediascount"),
- "O1": ctx.Tr("user.static.createrepocount"),
- "P1": ctx.Tr("user.static.openiindex"),
- "Q1": ctx.Tr("user.static.CloudBrainTaskNum"),
- "R1": ctx.Tr("user.static.CloudBrainRunTime"),
- "S1": ctx.Tr("user.static.CommitDatasetNum"),
- "T1": ctx.Tr("user.static.CommitModelCount"),
- "U1": ctx.Tr("user.static.registdate"),
- "V1": ctx.Tr("user.static.countdate"),
- }
+ dataHeader := getExcelHeader(ctx)
for k, v := range dataHeader {
//设置单元格的值
xlsx.SetCellValue(sheetName, k, v)
@@ -74,31 +170,32 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac
log.Info("return count=" + fmt.Sprint(count))
for _, userRecord := range re {
row++
- rows := fmt.Sprint(row)
- xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID)
- xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name)
- xlsx.SetCellValue(sheetName, "C"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
- xlsx.SetCellValue(sheetName, "D"+rows, userRecord.CodeMergeCount)
- xlsx.SetCellValue(sheetName, "E"+rows, userRecord.CommitCount)
- xlsx.SetCellValue(sheetName, "F"+rows, userRecord.IssueCount)
- xlsx.SetCellValue(sheetName, "G"+rows, userRecord.CommentCount)
- xlsx.SetCellValue(sheetName, "H"+rows, userRecord.FocusRepoCount)
- xlsx.SetCellValue(sheetName, "I"+rows, userRecord.StarRepoCount)
- xlsx.SetCellValue(sheetName, "J"+rows, userRecord.LoginCount)
- xlsx.SetCellValue(sheetName, "K"+rows, userRecord.WatchedCount)
- xlsx.SetCellValue(sheetName, "L"+rows, userRecord.CommitCodeSize)
- xlsx.SetCellValue(sheetName, "M"+rows, userRecord.SolveIssueCount)
- xlsx.SetCellValue(sheetName, "N"+rows, userRecord.EncyclopediasCount)
- xlsx.SetCellValue(sheetName, "O"+rows, userRecord.CreateRepoCount)
- xlsx.SetCellValue(sheetName, "P"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex))
- xlsx.SetCellValue(sheetName, "Q"+rows, userRecord.CloudBrainTaskNum)
- xlsx.SetCellValue(sheetName, "R"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
- xlsx.SetCellValue(sheetName, "S"+rows, userRecord.CommitDatasetNum)
- xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitModelCount)
- formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05")
- xlsx.SetCellValue(sheetName, "U"+rows, formatTime[0:len(formatTime)-3])
- formatTime = userRecord.DataDate
- xlsx.SetCellValue(sheetName, "V"+rows, formatTime)
+ writeExcel(row, xlsx, sheetName, userRecord)
+ // rows := fmt.Sprint(row)
+ // xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID)
+ // xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name)
+ // xlsx.SetCellValue(sheetName, "C"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
+ // xlsx.SetCellValue(sheetName, "D"+rows, userRecord.CodeMergeCount)
+ // xlsx.SetCellValue(sheetName, "E"+rows, userRecord.CommitCount)
+ // xlsx.SetCellValue(sheetName, "F"+rows, userRecord.IssueCount)
+ // xlsx.SetCellValue(sheetName, "G"+rows, userRecord.CommentCount)
+ // xlsx.SetCellValue(sheetName, "H"+rows, userRecord.FocusRepoCount)
+ // xlsx.SetCellValue(sheetName, "I"+rows, userRecord.StarRepoCount)
+ // xlsx.SetCellValue(sheetName, "J"+rows, userRecord.LoginCount)
+ // xlsx.SetCellValue(sheetName, "K"+rows, userRecord.WatchedCount)
+ // xlsx.SetCellValue(sheetName, "L"+rows, userRecord.CommitCodeSize)
+ // xlsx.SetCellValue(sheetName, "M"+rows, userRecord.SolveIssueCount)
+ // xlsx.SetCellValue(sheetName, "N"+rows, userRecord.EncyclopediasCount)
+ // xlsx.SetCellValue(sheetName, "O"+rows, userRecord.CreateRepoCount)
+ // xlsx.SetCellValue(sheetName, "P"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex))
+ // xlsx.SetCellValue(sheetName, "Q"+rows, userRecord.CloudBrainTaskNum)
+ // xlsx.SetCellValue(sheetName, "R"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
+ // xlsx.SetCellValue(sheetName, "S"+rows, userRecord.CommitDatasetNum)
+ // xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitModelCount)
+ // formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05")
+ // xlsx.SetCellValue(sheetName, "U"+rows, formatTime[0:len(formatTime)-3])
+ // formatTime = userRecord.DataDate
+ // xlsx.SetCellValue(sheetName, "V"+rows, formatTime)
}
indexTotal += PAGE_SIZE
@@ -236,62 +333,40 @@ func QueryUserStaticDataPage(ctx *context.Context) {
sheetName := ctx.Tr("user.static.sheetname")
index := xlsx.NewSheet(sheetName)
xlsx.DeleteSheet("Sheet1")
- dataHeader := map[string]string{
- "A1": ctx.Tr("user.static.id"),
- "B1": ctx.Tr("user.static.name"),
- "C1": ctx.Tr("user.static.UserIndex"),
- "D1": ctx.Tr("user.static.codemergecount"),
- "E1": ctx.Tr("user.static.commitcount"),
- "F1": ctx.Tr("user.static.issuecount"),
- "G1": ctx.Tr("user.static.commentcount"),
- "H1": ctx.Tr("user.static.focusrepocount"),
- "I1": ctx.Tr("user.static.starrepocount"),
- "J1": ctx.Tr("user.static.logincount"),
- "K1": ctx.Tr("user.static.watchedcount"),
- "L1": ctx.Tr("user.static.commitcodesize"),
- "M1": ctx.Tr("user.static.solveissuecount"),
- "N1": ctx.Tr("user.static.encyclopediascount"),
- "O1": ctx.Tr("user.static.createrepocount"),
- "P1": ctx.Tr("user.static.openiindex"),
- "Q1": ctx.Tr("user.static.CloudBrainTaskNum"),
- "R1": ctx.Tr("user.static.CloudBrainRunTime"),
- "S1": ctx.Tr("user.static.CommitDatasetNum"),
- "T1": ctx.Tr("user.static.CommitModelCount"),
- "U1": ctx.Tr("user.static.registdate"),
- "V1": ctx.Tr("user.static.countdate"),
- }
+
+ dataHeader := getExcelHeader(ctx)
for k, v := range dataHeader {
//设置单元格的值
xlsx.SetCellValue(sheetName, k, v)
}
for i, userRecord := range re {
- rows := fmt.Sprint(i + 2)
-
- xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID)
- xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name)
- xlsx.SetCellValue(sheetName, "C"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
- xlsx.SetCellValue(sheetName, "D"+rows, userRecord.CodeMergeCount)
- xlsx.SetCellValue(sheetName, "E"+rows, userRecord.CommitCount)
- xlsx.SetCellValue(sheetName, "F"+rows, userRecord.IssueCount)
- xlsx.SetCellValue(sheetName, "G"+rows, userRecord.CommentCount)
- xlsx.SetCellValue(sheetName, "H"+rows, userRecord.FocusRepoCount)
- xlsx.SetCellValue(sheetName, "I"+rows, userRecord.StarRepoCount)
- xlsx.SetCellValue(sheetName, "J"+rows, userRecord.LoginCount)
- xlsx.SetCellValue(sheetName, "K"+rows, userRecord.WatchedCount)
- xlsx.SetCellValue(sheetName, "L"+rows, userRecord.CommitCodeSize)
- xlsx.SetCellValue(sheetName, "M"+rows, userRecord.SolveIssueCount)
- xlsx.SetCellValue(sheetName, "N"+rows, userRecord.EncyclopediasCount)
- xlsx.SetCellValue(sheetName, "O"+rows, userRecord.CreateRepoCount)
- xlsx.SetCellValue(sheetName, "P"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex))
- xlsx.SetCellValue(sheetName, "Q"+rows, userRecord.CloudBrainTaskNum)
- xlsx.SetCellValue(sheetName, "R"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
- xlsx.SetCellValue(sheetName, "S"+rows, userRecord.CommitDatasetNum)
- xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitModelCount)
- formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05")
- xlsx.SetCellValue(sheetName, "U"+rows, formatTime[0:len(formatTime)-3])
- formatTime = userRecord.DataDate
- xlsx.SetCellValue(sheetName, "V"+rows, formatTime)
+ row := i + 2
+ writeExcel(row, xlsx, sheetName, userRecord)
+ // xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID)
+ // xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name)
+ // xlsx.SetCellValue(sheetName, "C"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
+ // xlsx.SetCellValue(sheetName, "D"+rows, userRecord.CodeMergeCount)
+ // xlsx.SetCellValue(sheetName, "E"+rows, userRecord.CommitCount)
+ // xlsx.SetCellValue(sheetName, "F"+rows, userRecord.IssueCount)
+ // xlsx.SetCellValue(sheetName, "G"+rows, userRecord.CommentCount)
+ // xlsx.SetCellValue(sheetName, "H"+rows, userRecord.FocusRepoCount)
+ // xlsx.SetCellValue(sheetName, "I"+rows, userRecord.StarRepoCount)
+ // xlsx.SetCellValue(sheetName, "J"+rows, userRecord.LoginCount)
+ // xlsx.SetCellValue(sheetName, "K"+rows, userRecord.WatchedCount)
+ // xlsx.SetCellValue(sheetName, "L"+rows, userRecord.CommitCodeSize)
+ // xlsx.SetCellValue(sheetName, "M"+rows, userRecord.SolveIssueCount)
+ // xlsx.SetCellValue(sheetName, "N"+rows, userRecord.EncyclopediasCount)
+ // xlsx.SetCellValue(sheetName, "O"+rows, userRecord.CreateRepoCount)
+ // xlsx.SetCellValue(sheetName, "P"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex))
+ // xlsx.SetCellValue(sheetName, "Q"+rows, userRecord.CloudBrainTaskNum)
+ // xlsx.SetCellValue(sheetName, "R"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
+ // xlsx.SetCellValue(sheetName, "S"+rows, userRecord.CommitDatasetNum)
+ // xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitModelCount)
+ // formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05")
+ // xlsx.SetCellValue(sheetName, "U"+rows, formatTime[0:len(formatTime)-3])
+ // formatTime = userRecord.DataDate
+ // xlsx.SetCellValue(sheetName, "V"+rows, formatTime)
}
//设置默认打开的表单
diff --git a/web_src/js/components/UserAnalysis.vue b/web_src/js/components/UserAnalysis.vue
index 117984f95..c0e8c7411 100755
--- a/web_src/js/components/UserAnalysis.vue
+++ b/web_src/js/components/UserAnalysis.vue
@@ -64,13 +64,22 @@
{{scope.row.UserIndex | rounding}}
+
+
+ {{scope.row.UserIndexPrimitive | rounding}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+