mirror of
https://shylinux.com/x/operation
synced 2025-07-01 13:14:43 +08:00
add some
This commit is contained in:
parent
b0f6f5ac82
commit
2c9aec52d5
@ -75,6 +75,7 @@ type Plan struct {
|
||||
StoryUID string `gorm:"type:char(32);index"`
|
||||
Version string `gorm:"type:varchar(16)"`
|
||||
Type uint8 `gorm:"default:0"`
|
||||
Score uint8 `gorm:"default:0"`
|
||||
Status uint8 `gorm:"default:0"`
|
||||
IssueCount int `gorm:"default:0"`
|
||||
BeginTime db.Time
|
||||
|
@ -10,12 +10,13 @@ import (
|
||||
type Plan struct {
|
||||
Table
|
||||
order string `data:"1"`
|
||||
fields string `data:"updated_at,title,content,version,plan_type,plan_status,issue_count AS issue_count,begin_time,end_time,process_time,finish_time,story_uid,user_uid"`
|
||||
fields string `data:"updated_at,title,content,version,plan_type,plan_status,score,issue_count AS issue_count,begin_time,end_time,process_time,finish_time,story_uid,user_uid"`
|
||||
create string `name:"create title* content plan_type:select version:select begin_time:select@date end_time:select@date" role:"leader"`
|
||||
modify string `name:"modify title* content begin_time:select@date end_time:select@date" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
process string `name:"process" role:"leader"`
|
||||
setType string `name:"setType plan_type" role:"creator"`
|
||||
setType string `name:"setType plan_type" help:"归类" role:"creator"`
|
||||
setScore string `name:"setScore score" help:"打分" role:"leader"`
|
||||
handover string `name:"handover to_user_uid*:select" role:"leader" style:"notice" help:"交接"`
|
||||
issueCreate string `name:"issueCreate title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||
}
|
||||
@ -42,7 +43,7 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
||||
s.SettingSelect(m)
|
||||
issue_max_create := kit.Int(m.Option(ISSUE_MAX_CREATE))
|
||||
msg := m.Cmd(Issue{}, s.Select, model.STORY_UID, arg[0], m.OptionSimple(model.USER_UID), model.STATUS, IssueCreate)
|
||||
s.Orders(m, model.STATUS, model.ISSUE_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||
s.Orders(m, model.STATUS, model.ISSUE_COUNT, s.Desc(model.SCORE), s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||
s.ValueList(m, arg).Table(func(value ice.Maps) {
|
||||
button := []ice.Any{}
|
||||
defer func() { m.PushButton(button...) }()
|
||||
@ -72,11 +73,14 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
||||
}
|
||||
case PlanFinish:
|
||||
if isLeader {
|
||||
button = append(button, s.Handover)
|
||||
button = append(button, s.SetScore)
|
||||
}
|
||||
if isCreator {
|
||||
button = append(button, s.SetType)
|
||||
}
|
||||
if isLeader {
|
||||
button = append(button, s.Handover)
|
||||
}
|
||||
kit.If(m.FieldsIsDetail(), func() { s.DoneMessage(m) })
|
||||
}
|
||||
}).Display("").DisplayCSS("")
|
||||
@ -97,6 +101,9 @@ func (s Plan) Finish(m *ice.Message, arg ...string) {
|
||||
func (s Plan) SetType(m *ice.Message, arg ...string) {
|
||||
s.Modify(m, m.OptionSimple(model.PLAN_TYPE)...)
|
||||
}
|
||||
func (s Plan) SetScore(m *ice.Message, arg ...string) {
|
||||
s.Modify(m, arg...)
|
||||
}
|
||||
func (s Plan) Handover(m *ice.Message, arg ...string) {
|
||||
m.OptionDefault(model.TO_USER_UID, m.Option(ice.MSG_USERUID))
|
||||
s.Modify(m, model.USER_UID, m.Option(model.TO_USER_UID))
|
||||
|
@ -1,7 +1,7 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myViewTabs(can, "plan_status", msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title, value.version, can.onimport.textView(can, value, "plan_type"), can.onimport.textView(can, value)]},
|
||||
{view: html.TITLE, list: [value.title, value.version, can.onimport.unitView(can, value, "score", "星"), can.onimport.textView(can, value, "plan_type"), can.onimport.textView(can, value)]},
|
||||
{view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.unitView(can, value, "issue_count", "个")]},
|
||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||
] })
|
||||
|
@ -5,7 +5,7 @@
|
||||
"process": "开始", "submit": "提交", "reback": "返工", "finish": "完成",
|
||||
"issueCreate": "原型设计", "designCreate": "界面设计", "taskCreate": "开发任务", "caseCreate": "测试用例",
|
||||
"issueList": "原型设计", "designList": "界面设计", "taskList": "开发任务", "caseList": "测试用例",
|
||||
"program": "编程", "discuss": "约会", "payfor": "支付", "setType": "设置类型", "bindPlan": "绑定计划",
|
||||
"program": "编程", "discuss": "约会", "payfor": "支付", "bindPlan": "绑定计划",
|
||||
"note": "验收备注",
|
||||
"addNote": "备注",
|
||||
"noteList": "验收备注", "fileList": "附件列表", "meetList": "会议安排", "dealList": "支付记录",
|
||||
|
Loading…
x
Reference in New Issue
Block a user