zouyuxuan 5 years ago
parent
commit
328107bddb

+ 3 - 0
core/src/qfw/manage/structured_data.go

@@ -56,6 +56,9 @@ func (t *Structed_data)GetData(){
 
 		listQuery := "select * " + sql + fmt.Sprintf(" order by submit_time asc limit %d,%d", (currentPage-1)*perPage, perPage)
 		res := util.Mysql.Query(listQuery, val...)
+		for k, v := range *res {
+			v["index"] = k + 1
+		}
 		t.ServeJson(map[string]interface{}{
 			"currentPage": currentPage,
 			"data":        res,

+ 1 - 3
core/src/web/templates/manage/structed/index.html

@@ -160,9 +160,7 @@
             , url: '/manage/structed/getdata'
             , columns: [
                 {
-                    title: "序号", field: "user_name",callback:function(){
-                        return r+=1
-                    }
+                    title: "序号", field: "index"
                 },
                 {
                     title: "状态",field: "status",callback:function(r){