Browse Source

no message

Jianghan 3 years ago
parent
commit
edea095904

+ 9 - 0
src/front/user.go

@@ -294,6 +294,7 @@ func (f *Front) UserState() {
 func (f *Front) UserAll() {
 	defer qu.Catch()
 	if f.Method() == "POST" {
+
 		start, _ := f.GetInteger("start")
 		limit, _ := f.GetInteger("length")
 		draw, _ := f.GetInteger("draw")
@@ -302,6 +303,14 @@ func (f *Front) UserAll() {
 		query := map[string]interface{}{
 			"b_delete": false,
 		}
+		user := f.GetSession("user").(map[string]interface{})
+		gid := qu.ObjToString(user["s_groupid"])
+		if user["i_role"] == "0" || user["i_role"] == "1" {
+
+		} else {
+			query["s_groupid"] = gid
+		}
+
 		if search != "" {
 			query["$or"] = []interface{}{
 				bson.M{"s_login": bson.M{"$regex": search}},

+ 3 - 3
src/web/templates/project/project_clear.html

@@ -362,7 +362,7 @@
                 data: {"s_groupid": groupid, "s_sourceinfo": sourceinfo, "taskid": id, "s_status": status},
                 success: function (r) {
                     if (r.success) {
-                        ttable.api().ajax.reload()
+                        location.reload()
                     } else {
                         showTip(r.msg);
                     }
@@ -382,7 +382,7 @@
                 data: {"s_groupid": groupid, "s_sourceinfo": sourceinfo, "taskid": id},
                 success: function (r) {
                     if (r.success) {
-                        ttable.api().ajax.reload()
+                        location.reload()
                     } else {
                         showTip(r.msg);
                     }
@@ -401,7 +401,7 @@
                 data: {"s_status": status, "id": val},
                 success: function (r) {
                     if (r.success) {
-                        ttable.api().ajax.reload()
+                        location.reload()
                     } else {
                         showTip(r.msg);
                     }

+ 2 - 2
src/web/templates/project/task_detail.html

@@ -193,7 +193,7 @@
                         }else {
                             var dt = new Date()
                             dt.setTime(parseInt(val) * 1000);
-                            return dt.format("yyyy-MM-dd")
+                            return dt.format("yyyy-MM-dd hh:mm:ss")
                         }
                     }},
                 {"data": "i_completetime", width: "4%", render: function (val) {
@@ -202,7 +202,7 @@
                         }else {
                             var dt = new Date()
                             dt.setTime(parseInt(val) * 1000);
-                            return dt.format("yyyy-MM-dd")
+                            return dt.format("yyyy-MM-dd hh:mm:ss")
                         }
                     }},
                 {

+ 7 - 3
src/web/templates/user/user_list.html

@@ -153,9 +153,13 @@
                 {"data": "s_login", width: "9%"},
                 {"data": "s_name", width: "9%"},
                 {"data": "i_role", width:"9%", render: function (val) {
-                        if (val === "1") {
-                            return "管理员"
+                        if (val === "0") {
+                            return "超级管理员"
+                        }else if (val === "1") {
+                            return "系统管理员"
                         }else if (val === "2") {
+                            return "管理员"
+                        }else if (val === "3") {
                             return "质检员"
                         }else {
                             return "普通用户"
@@ -173,7 +177,7 @@
                 {"data": "i_createtime",width:"9%", render: function (val) {
                         var dt = new Date()
                         dt.setTime(parseInt(val) * 1000);
-                        return dt.format("yyyy-MM-dd")
+                        return dt.format("yyyy-MM-dd ")
                     }},
                 {"data": "i_updatetime",width:"9%", render: function (val) {
                         var dt = new Date()