初步完成

This commit is contained in:
hoteas 2022-03-28 04:52:10 +08:00
parent 38d3d77c59
commit 5d8227d8bb
3 changed files with 141 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ {
"id": "f8350c6049369d77d9e9d17c7a516c44", "id": "f4067d842b0f724d7e322e544ad7506b",
"label": "HoTime管理平台", "label": "HoTime管理平台",
"menus": [ "menus": [
{ {
@ -82,6 +82,10 @@
{ {
"label": "用章管理", "label": "用章管理",
"table": "seal_tag" "table": "seal_tag"
},
{
"label": "考勤管理",
"table": "time_tag"
} }
], ],
"name": "sys" "name": "sys"
@ -3149,6 +3153,13 @@
"sortable": true, "sortable": true,
"type": "number", "type": "number",
"value": "name" "value": "name"
},
{
"label": "考勤",
"link": "time_tag",
"name": "time_tag_id",
"type": "time",
"value": "name"
} }
], ],
"label": "任务管理", "label": "任务管理",
@ -3686,6 +3697,13 @@
"sortable": true, "sortable": true,
"type": "number", "type": "number",
"value": "name" "value": "name"
},
{
"label": "考勤",
"link": "time_tag",
"name": "time_tag_id",
"type": "time",
"value": "name"
} }
], ],
"label": "任务执行", "label": "任务执行",
@ -3922,6 +3940,116 @@
], ],
"table": "task_admin" "table": "task_admin"
}, },
"time_tag": {
"auth": [
"show",
"add",
"delete",
"edit",
"info"
],
"columns": [
{
"add": false,
"edit": false,
"label": "ID",
"name": "id",
"sortable": true,
"type": "number"
},
{
"label": "名称",
"name": "name",
"type": "text"
},
{
"add": false,
"edit": false,
"label": "创建时间",
"list": false,
"name": "create_time",
"type": "time"
},
{
"add": false,
"edit": false,
"label": "变更时间",
"name": "modify_time",
"type": "time"
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
}
],
"type": "select"
},
{
"label": "描述",
"list": false,
"name": "description",
"type": "text"
}
],
"label": "考勤管理",
"search": [
{
"label": "请输入关键词",
"name": "keyword",
"type": "search",
"value": null
},
{
"label": "时间段",
"name": "daterange",
"type": "search",
"value": null
},
{
"label": "排序",
"name": "sort",
"type": "search",
"value": null
},
{
"label": "状态",
"name": "state",
"options": [
{
"name": "已启用",
"value": "0"
},
{
"name": "未启用",
"value": "1"
},
{
"name": "异常",
"value": "2"
},
{
"name": "全部",
"value": null
}
],
"type": "select",
"value": null
}
],
"table": "time_tag"
},
"user": { "user": {
"auth": [ "auth": [
"show", "show",

View File

@ -82,7 +82,18 @@ func main() {
} }
} }
//查询详情插入
if that.HandlerStr == "/app/task_admin/time" && that.Req.Method == "GET" {
adminId := that.Session("admin_id").ToCeilInt()
todayTime, _ := time.Parse("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:05")
taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime, "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"})
//如果当天还未签到
that.Display(0, taskAdmin)
return true
}
//查询列表插入 //查询列表插入
if that.HandlerStr == "/app/task_admin" && that.Req.Method == "GET" { if that.HandlerStr == "/app/task_admin" && that.Req.Method == "GET" {
that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr()) that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr())
@ -188,7 +199,7 @@ func main() {
approverData := ObjToMap(that.Req.FormValue("approver_data")) approverData := ObjToMap(that.Req.FormValue("approver_data"))
readerData := ObjToMap(that.Req.FormValue("reader_data")) readerData := ObjToMap(that.Req.FormValue("reader_data"))
taskId := that.RespData.GetCeilInt("result") taskId := that.RespData.GetCeilInt("result")
task := that.Db.Get("task", "admin_id,name,create_time,modify_time,state,company_id,proj_id,reward,reward_money,reward_description,type,zone_id,extend_data,city_id,status,user_id,zone_id,out_tag_id,visit_tag_id,car_id,seal_tag_id", Map{"id": taskId}) task := that.Db.Get("task", "admin_id,name,create_time,modify_time,state,company_id,proj_id,reward,reward_money,reward_description,type,zone_id,extend_data,city_id,status,user_id,zone_id,out_tag_id,visit_tag_id,car_id,seal_tag_id,time_tag_id", Map{"id": taskId})
task["task_id"] = taskId task["task_id"] = taskId
that.Log["task_id"] = taskId that.Log["task_id"] = taskId

Binary file not shown.