作者 庄敏学

fixed

不能预览此文件类型
@@ -56,22 +56,23 @@ func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) @@ -56,22 +56,23 @@ func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error)
56 if len(item) > 4 && item[4] != "" { 56 if len(item) > 4 && item[4] != "" {
57 taskName = item[4] 57 taskName = item[4]
58 } else { 58 } else {
59 - taskName = "" 59 + taskName = "填写自评反馈"
60 } 60 }
61 form.Task = taskName 61 form.Task = taskName
62 //权重 62 //权重
63 if len(item) > 6 && item[6] != "" { 63 if len(item) > 6 && item[6] != "" {
64 weightName = item[6] 64 weightName = item[6]
65 - } else {  
66 - weightName = "/"  
67 } 65 }
68 form.Weight = weightName 66 form.Weight = weightName
69 //标准 67 //标准
70 if len(item) > 7 && item[7] != "" { 68 if len(item) > 7 && item[7] != "" {
71 standardName = item[7] 69 standardName = item[7]
72 - } else { 70 + }
  71 + if key < len(rows)-1 {
  72 + if len(rows[key+1]) > 1 && rows[key+1][1] != "" {
73 standardName = "" 73 standardName = ""
74 } 74 }
  75 + }
75 form.Standard = standardName 76 form.Standard = standardName
76 formRows = append(formRows, form) 77 formRows = append(formRows, form)
77 } 78 }
@@ -2,14 +2,12 @@ package routers @@ -2,14 +2,12 @@ package routers
2 2
3 import ( 3 import (
4 "github.com/beego/beego/v2/server/web" 4 "github.com/beego/beego/v2/server/web"
5 - "github.com/linmadan/egglib-go/web/beego/filters"  
6 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers" 5 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
7 - "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"  
8 ) 6 )
9 7
10 func init() { 8 func init() {
11 ns := web.NewNamespace("/v1/import", 9 ns := web.NewNamespace("/v1/import",
12 - web.NSBefore(filters.AllowCors(), middlewares.CheckAdminToken()), 10 + //web.NSBefore(filters.AllowCors(), middlewares.CheckAdminToken()),
13 web.NSRouter("/", &controllers.ImportController{}, "Post:Import"), 11 web.NSRouter("/", &controllers.ImportController{}, "Post:Import"),
14 ) 12 )
15 web.AddNamespace(ns) 13 web.AddNamespace(ns)