From 44dfa01275e6163a2e3672132c9e4bd9f5e150b4 Mon Sep 17 00:00:00 2001 From: shy Date: Mon, 19 May 2025 18:57:41 +0800 Subject: [PATCH] add some --- src/production/care.go | 16 ++--- src/production/care.js | 8 +-- src/production/case.go | 8 +-- src/production/case.js | 3 +- src/production/common.go | 116 ++++++++++++++++++++-------------- src/production/date.go | 2 +- src/production/deal.go | 7 +- src/production/deal.js | 2 +- src/production/design.go | 11 ++-- src/production/design.js | 7 +- src/production/file.go | 58 +++++++++++++++++ src/production/file.js | 10 +++ src/production/issue.go | 18 +++--- src/production/issue.js | 6 +- src/production/meet.go | 6 +- src/production/meet.js | 2 +- src/production/model/model.go | 27 ++++++-- src/production/plan.css | 2 +- src/production/plan.go | 10 +-- src/production/plan.js | 2 +- src/production/portal.go | 1 + src/production/portal.json | 45 +++++++------ src/production/stat.go | 2 +- src/production/studio.go | 17 ----- src/production/studio.js | 9 --- src/production/take.go | 23 +++++-- src/production/task.go | 6 +- 27 files changed, 257 insertions(+), 167 deletions(-) create mode 100644 src/production/file.go create mode 100644 src/production/file.js delete mode 100644 src/production/studio.go delete mode 100644 src/production/studio.js diff --git a/src/production/care.go b/src/production/care.go index ce728d5..3df2736 100644 --- a/src/production/care.go +++ b/src/production/care.go @@ -9,27 +9,25 @@ import ( type care struct { Tables order string `data:"6"` - setInfo string `name:"setInfo info" help:"备注" role:"void"` + setInfo string `name:"setInfo info" help:"备注" role:"worker"` } func (s care) SetInfo(m *ice.Message, arg ...string) { msg := m.Cmd(userStory{}, s.Select, model.STORY_UID, m.Option(model.STORY_UID), model.USER_UID, m.Option(model.UID)) m.Option(model.UID, msg.Append(model.UID)) - m.Cmdy(s.Prefix(m, "member"), m.ActionKey(), arg) + m.Cmdy(s.PrefixMember(m), m.ActionKey(), arg) } func (s care) List(m *ice.Message, arg ...string) { s.Limit(m, 300) - user_uid, isLeader := m.Option(model.USER_UID), s.IsLeader(m) - if s.Fields(m, model.USER_UID, model.INFO); s.IsLeader(m) { + isLeader := s.IsLeader(m) + if s.Fields(m, model.USER_UID, model.INFO); isLeader { if len(arg) == 1 { m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0]) } else { - m.FieldsSetDetail() - m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, arg[1]) + m.FieldsSetDetail().Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, arg[1]) } } else { - m.FieldsSetDetail() - m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, m.Option(model.USER_UID)) + m.FieldsSetDetail().Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, m.Option(model.USER_UID)) } m.Table(func(value ice.Maps) { var stats = map[string]string{} @@ -55,7 +53,7 @@ func (s care) List(m *ice.Message, arg ...string) { m.Push("一星", check(Issue{}, 1)+check(Design{}, 1)) m.Push("五星", check(Issue{}, 5)+check(Design{}, 5)) m.Push(model.UID, value[model.USER_UID]) - if value[model.USER_UID] == user_uid || isLeader { + if isLeader || value[model.USER_UID] == m.Option(ice.MSG_USERUID) { m.PushButton(s.SetInfo) } else { m.PushButton() diff --git a/src/production/care.js b/src/production/care.js index a6d64ba..c793a63 100644 --- a/src/production/care.js +++ b/src/production/care.js @@ -1,10 +1,10 @@ Volcanos(chat.ONIMPORT, { _init: function(can, msg) { can.onimport.myView(can, msg, function(value) { return [ - {view: html.TITLE, list: [ - value.user_name, + {view: html.TITLE, list: [value.user_name, can.onimport.unitView(can, value, "已支付", "元"), can.onimport.unitView(can, value, "一星", "个"), + can.onimport.unitView(can, value, "五星", "个"), can.onimport.titleAction(can, value), ]}, {view: html.STATUS, list: [ @@ -15,9 +15,7 @@ Volcanos(chat.ONIMPORT, { can.onimport.unitView(can, value, "界面已完成", "个"), can.onimport.unitView(can, value, "界面设计中", "个"), ]}, - {view: html.STATUS, list: [ - value.info - ]}, + {view: html.STATUS, list: [value.info]}, ] }) }, }) \ No newline at end of file diff --git a/src/production/case.go b/src/production/case.go index ca4df3b..97e6cf6 100644 --- a/src/production/case.go +++ b/src/production/case.go @@ -27,18 +27,16 @@ func (s Case) Remove(m *ice.Message, arg ...string) { s.taskCount(m) } func (s Case) List(m *ice.Message, arg ...string) { - user_uid := m.Option(model.USER_UID) s.Orders(m, model.STATUS, s.Desc(model.CREATED_AT)) s.ValueList(m, arg) s.SelectJoinPlan(m) - s.StatusCount(m, arg...) m.Table(func(value ice.Maps) { if value[web.SPACE] == "" { - s.PushTaskButton(m, value, user_uid) + s.PushTaskButton(m, value) } else { - s.PushTaskButton(m, value, user_uid, s.Preview) + s.PushTaskButton(m, value, s.Preview) } - }).Display("").RenameAppend(model.STATUS, model.CASE_STATUS) + }).RenameAppend(model.STATUS, model.CASE_STATUS).Display("") } func (s Case) Process(m *ice.Message, arg ...string) { s.changeStatus(m, IssueCreate, IssueProcess) diff --git a/src/production/case.js b/src/production/case.js index cdd17e3..c89f7b6 100644 --- a/src/production/case.js +++ b/src/production/case.js @@ -3,11 +3,10 @@ Volcanos(chat.ONIMPORT, { can.onimport.myView(can, msg, function(value) { return [ {view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "case_status")]}, {view: html.STATUS, list: [ - // can.onimport.beginTime(can, value), (value.process_time||value.begin_time).split(" ")[0], can.onimport.unitView(can, value, "plan_title"), ]}, - {view: html.OUTPUT, list: [value.content||value.info]}, can.onimport.titleAction(can, value), + {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), ] }) }, }) \ No newline at end of file diff --git a/src/production/common.go b/src/production/common.go index 3acfe2c..5b9080c 100644 --- a/src/production/common.go +++ b/src/production/common.go @@ -22,23 +22,28 @@ type Table struct { reject string `name:"reject" role:"leader"` approve string `name:"approve" role:"leader"` process string `name:"process" role:"worker"` - submit string `name:"submit link" role:"worker"` + submit string `name:"submit link*" role:"worker"` finish string `name:"finish" role:"leader"` reback string `name:"reback" role:"leader"` cancel string `name:"cancel" role:"leader"` trash string `name:"trash" role:"leader"` - payfor string `name:"payfor price* title* content" role:"leader"` - discuss string `name:"discuss meet_type* title* content link* date* time*" role:"leader"` list string `name:"list story_uid uid auto" role:"void"` + preview string `name:"preview" role:"worker"` + program string `name:"program" role:"worker"` + discuss string `name:"discuss meet_type* title* content meet_link* date* time*" role:"leader"` + setScore string `name:"setScore score" help:"评分" role:"leader"` + payfor string `name:"payfor price* title* content" role:"leader"` + upload string `name:"upload" role:"worker"` + download string `name:"download" style:"notice" role:"worker"` + fileCreate string `name:"fileCreate title* content file_type*:select file_link*@upload" help:"上传附件" role:"worker"` + planList string `name:"planList" role:"worker"` issueList string `name:"issueList" role:"worker"` designList string `name:"designList" role:"worker"` taskList string `name:"taskList" role:"worker"` caseList string `name:"caseList" role:"worker"` + fileList string `name:"fileList" role:"worker"` meetList string `name:"meetList" role:"worker"` dealList string `name:"dealList" role:"worker"` - preview string `name:"preview" role:"worker"` - program string `name:"program" role:"worker"` - setScore string `name:"setScore score" role:"leader" help:"评分"` } func (s Table) Inputs(m *ice.Message, arg ...string) { @@ -47,10 +52,10 @@ func (s Table) Inputs(m *ice.Message, arg ...string) { s.InputsListRole(m, UserStoryRoleList, arg...) case model.STORY_TYPE: s.InputsList(m, StoryTypeList, arg...) - case model.PLAN_TYPE: - s.InputsList(m, PlanTypeList, arg...) case model.PLAN_UID: s.InputsUID(m, arg, Plan{}, m.OptionSimple(model.STORY_UID)...) + case model.PLAN_TYPE: + s.InputsList(m, PlanTypeList, arg...) case model.ISSUE_UID: s.InputsUID(m, arg, Issue{}, m.OptionSimple(model.STORY_UID)...) case model.ISSUE_TYPE: @@ -59,6 +64,8 @@ func (s Table) Inputs(m *ice.Message, arg ...string) { s.InputsUID(m, arg, Task{}, m.OptionSimple(model.STORY_UID)...) case model.MEET_TYPE: s.InputsList(m, MeetTypeList, arg...) + case model.FILE_TYPE: + s.InputsList(m, FileTypeList, arg...) case model.LEVEL: s.InputsList(m, LevelList, arg...) case nfs.PATH: @@ -107,6 +114,10 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message { value = IssueStatus(kit.Int(value)).String() case model.MEET_TYPE: value = MeetType(kit.Int(value)).String() + case model.FILE_TYPE: + value = FileType(kit.Int(value)).String() + case model.FILE_SIZE: + value = kit.FmtSize(kit.Int(value)) case model.LEVEL: value = Level(kit.Int(value)).String() } @@ -114,21 +125,17 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message { }) return s.Table.RewriteAppend(m) } -func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, user_uid string, arg ...ice.Any) { +func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) { + user_uid := m.Option(ice.MSG_USERUID) button := []ice.Any{} - // button := []ice.Any{s.Remove} - if value[model.PLAN_TITLE] == "" { - button = append(button, s.BindPlan) - } defer func() { m.PushButton(button...) }() isCreator, isLeader, isWorker := s.IsCreator(m), s.IsLeader(m), s.IsWorker(m) isLeaderApproved := isCreator || (isLeader && m.Option("leader_approved") == "on") isLeaderFinish := isCreator || (isLeader && m.Option("leader_finish") == "on") + isLeaderPayfor := isCreator || (isLeader && m.Option("leader_payfor") == "on") + kit.If(value[model.PLAN_TITLE] == "", func() { button = append(button, s.BindPlan) }) switch IssueStatus(kit.Int(value[model.STATUS])) { case IssueCreate: - if isCreator { - button = append(button, s.Payfor) - } if isLeaderApproved { button = append(button, s.Approve) } @@ -147,9 +154,6 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, user_uid string, button = append(button, s.Process) } case IssueProcess: - if isCreator { - button = append(button, s.Payfor) - } if user_uid == value[model.USER_UID] { button = append(button, s.Submit) } @@ -157,44 +161,43 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, user_uid string, button = append(button, arg...) } case IssueSubmit: - if isCreator { - button = append(button, s.Payfor) - } if isWorker { button = append(button, s.Preview) } + if isWorker { + button = append(button, s.FileCreate) + } + if isWorker { + button = append(button, arg...) + } if isLeaderFinish { button = append(button, s.Finish, s.Reback, s.Cancel) } - if isWorker { - button = append(button, arg...) - } case IssueFinish: - if PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish { - if isCreator { - button = append(button, s.Payfor) - } - } if isWorker { button = append(button, s.Preview) } - if isCreator && value[model.SCORE] == "0" { - button = append(button, s.SetScore) + if isLeader { + button = append(button, s.FileCreate) } if isWorker { button = append(button, arg...) } - kit.If(m.FieldsIsDetail(), func() { s.DoneMessage(m) }) - case IssueCancel: - if isCreator && value[model.SCORE] == "0" { + if isLeaderPayfor && value[model.SCORE] == "0" { button = append(button, s.SetScore) } + if isLeaderPayfor && PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish { + button = append(button, s.Payfor) + } + kit.If(m.FieldsIsDetail(), func() { s.DoneMessage(m) }) + case IssueCancel: if isLeaderApproved { button = append(button, s.Trash) } } } -func (s Table) PushTaskButton(m *ice.Message, value ice.Maps, user_uid string, arg ...ice.Any) { +func (s Table) PushTaskButton(m *ice.Message, value ice.Maps, arg ...ice.Any) { + user_uid := m.Option(ice.MSG_USERUID) button := []ice.Any{} defer func() { m.PushButton(button...) }() isWorker := s.IsWorker(m) @@ -244,9 +247,6 @@ func (s Table) StatusCount(m *ice.Message, arg ...string) { }) } } -func (s Table) SetScore(m *ice.Message, arg ...string) { - s.Update(m, arg, m.OptionSimple(model.UID, model.STORY_UID)...) -} func (s Table) UserInfo(m *ice.Message, arg ...string) { m.ProcessField(care{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...) } @@ -275,16 +275,24 @@ func (s Table) Cancel(m *ice.Message, arg ...string) { s.ChangeStatus(m, int(IssueSubmit), int(IssueCancel)) } func (s Table) Trash(m *ice.Message, arg ...string) { - if s.IsLeader(m) { - s.Delete(m, m.OptionSimple(model.UID, model.STORY_UID)...) - } + s.Delete(m, m.OptionSimple(model.UID, model.STORY_UID)...) +} +func (s Table) Preview(m *ice.Message, arg ...string) { + m.OptionDefault(model.LINK, m.Option(model.MEET_LINK)) + m.ProcessOpen(m.OptionDefault(model.LINK, web.S(m.Option(web.SPACE))+web.C(m.Option(ctx.INDEX)))) } func (s Table) Program(m *ice.Message, arg ...string) { p := path.Base(m.Option(nfs.PATH)) m.ProcessOpen(kit.MergeURL(web.S(m.Option(web.SPACE))+web.C(web.VIMER), nfs.PATH, nfs.SRC, nfs.FILE, path.Join(p, "portal.go"))) } -func (s Table) Preview(m *ice.Message, arg ...string) { - m.ProcessOpen(m.OptionDefault(model.LINK, web.S(m.Option(web.SPACE))+web.C(m.Option(ctx.INDEX)))) +func (s Table) Discuss(m *ice.Message, arg ...string) { + s.issueOtherCreate(m, Meet{}, arg...) +} +func (s Issue) Discuss(m *ice.Message, arg ...string) { + s.commonOtherCreate(m, Meet{}, arg...) +} +func (s Table) SetScore(m *ice.Message, arg ...string) { + s.Update(m, arg, m.OptionSimple(model.UID, model.STORY_UID)...) } func (s Table) Payfor(m *ice.Message, arg ...string) { s.issueOtherCreate(m, Deal{}, arg...) @@ -292,11 +300,15 @@ func (s Table) Payfor(m *ice.Message, arg ...string) { func (s Issue) Payfor(m *ice.Message, arg ...string) { s.commonOtherCreate(m, Deal{}, arg...) } -func (s Table) Discuss(m *ice.Message, arg ...string) { - s.issueOtherCreate(m, Meet{}, arg...) +func (s Table) Upload(m *ice.Message, arg ...string) { + up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)) + m.Echo(m.UploadSave("usr/local/storage/" + up[0])) } -func (s Issue) Discuss(m *ice.Message, arg ...string) { - s.commonOtherCreate(m, Meet{}, arg...) +func (s Table) FileCreate(m *ice.Message, arg ...string) { + s.issueOtherCreate(m, File{}, arg...) +} +func (s Issue) FileCreate(m *ice.Message, arg ...string) { + s.commonOtherCreate(m, File{}, arg...) } func (s Table) issueOtherCreate(m *ice.Message, target ice.Any, arg ...string) { s.OtherCreate(m, target, kit.Simple(m.OptionSimple(model.ISSUE_UID), arg)...) @@ -346,6 +358,9 @@ func (s Table) otherListButton(m *ice.Message, arg ...string) { } }) } +func (s Table) PlanList(m *ice.Message, arg ...string) { + s.OtherList(m, Plan{}, model.UID, m.Option(model.PLAN_UID)) +} func (s Table) IssueList(m *ice.Message, arg ...string) { s.commonOtherList(m, Issue{}) s.otherListButton(m) @@ -362,6 +377,11 @@ func (s Table) CaseList(m *ice.Message, arg ...string) { s.commonOtherList(m, Case{}).RenameAppend(model.STATUS, model.CASE_STATUS) m.PushAction(s.Preview) } +func (s Table) FileList(m *ice.Message, arg ...string) { + if s.commonOtherList(m, File{}); s.IsLeader(m) { + m.PushAction(s.Download) + } +} func (s Table) MeetList(m *ice.Message, arg ...string) { s.commonOtherList(m, Meet{}) m.PushAction(s.Preview) diff --git a/src/production/date.go b/src/production/date.go index aaa733f..33d4cd0 100644 --- a/src/production/date.go +++ b/src/production/date.go @@ -10,7 +10,7 @@ import ( type Date struct { Tables order string `data:"9"` - discuss string `name:"discuss issue_uid*:select meet_type*:select link* begin_time*" role:"leader"` + discuss string `name:"discuss issue_uid*:select meet_type*:select meet_link* begin_time*" role:"leader"` } func (s Date) Discuss(m *ice.Message, arg ...string) { diff --git a/src/production/deal.go b/src/production/deal.go index 0c5ce38..e4371a6 100644 --- a/src/production/deal.go +++ b/src/production/deal.go @@ -16,7 +16,8 @@ type Deal struct { func (s Deal) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) - s.SendMessage(s.GetCommandUID(m), "", m.Option(model.TO_USER_UID)) + s.SendMessage(s.GetCommandUID(m), m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID)) + s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID)) } func (s Deal) List(m *ice.Message, arg ...string) { if s.IsLeader(m) { @@ -25,7 +26,7 @@ func (s Deal) List(m *ice.Message, arg ...string) { } else { if len(arg) == 1 { s.Select(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID)).PushAction().Action() - kit.If(m.Length() == 0, func() { m.Echo("请等待管理员支付工钱") }) + kit.If(m.Length() == 0, func() { m.Echo("请等待管理人员支付工钱") }) } else { s.SelectDetail(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID), model.UID, arg[1]).PushAction().Action() s.DoneMessage(m) @@ -36,7 +37,7 @@ func (s Deal) List(m *ice.Message, arg ...string) { } else { m.RenameAppend(model.FROM_USER_UID, model.USER_UID) } - s.OtherListCmd(m, s.IssueList, s.DesignList, s.MeetList) + s.OtherListCmd(m, s.IssueList, s.DesignList) } func init() { ice.TeamCtxCmd(Deal{}) } diff --git a/src/production/deal.js b/src/production/deal.js index 9f2c8b2..425e7f5 100644 --- a/src/production/deal.js +++ b/src/production/deal.js @@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, { _init: function(can, msg) { can.onimport.myView(can, msg, function(value) { return [ {view: html.TITLE, list: [value.title, can.onimport.moneyView(can, value)]}, - {view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]}, + {view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), value.user_name]}, {view: html.OUTPUT, list: [value.content]}, ] }) }, diff --git a/src/production/design.go b/src/production/design.go index 2b938e8..40208da 100644 --- a/src/production/design.go +++ b/src/production/design.go @@ -10,9 +10,9 @@ import ( type Design struct { Table order string `data:"3"` - fields string `data:"updated_at,title,content,status,price,score,link,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,story_uid,user_uid"` - create string `name:"create issue_uid*:select title* content* price*=1000 begin_time:select@date end_time:select@date" role:"worker"` - modify string `name:"modify title* content* price* link begin_time*:select@date end_time*:select@date" role:"worker"` + fields string `data:"updated_at,title,design_content,status,price,score,link,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,story_uid,user_uid"` + create string `name:"create issue_uid*:select title* design_content* price*=1000 begin_time:select@date end_time:select@date" role:"worker"` + modify string `name:"modify title* design_content* price* link begin_time*:select@date end_time*:select@date" role:"worker"` } func (s Design) Create(m *ice.Message, arg ...string) { @@ -33,13 +33,12 @@ func (s Design) Cancel(m *ice.Message, arg ...string) { s.issueCount(m) } func (s Design) List(m *ice.Message, arg ...string) { - user_uid := m.Option(model.USER_UID) s.Orders(m, model.STATUS, s.Desc(model.UPDATED_AT)).Limit(m, 300) s.ValueList(m, arg) s.SelectJoinPlan(m) - m.Table(func(value ice.Maps) { s.PushIssueButton(m, value, user_uid) }).Display("") + m.Table(func(value ice.Maps) { s.PushIssueButton(m, value) }).Display("") kit.If(len(arg) == 1, func() { m.Sort("plan_status,status,updated_at", ice.STR, ice.STR, ice.STR_R) }) - s.OtherListCmd(m, s.IssueList, s.MeetList, s.DealList) + s.OtherListCmd(m, s.IssueList, s.FileList, s.MeetList, s.DealList) } func init() { ice.TeamCtxCmd(Design{}) } diff --git a/src/production/design.js b/src/production/design.js index 8f822e6..218d2ca 100644 --- a/src/production/design.js +++ b/src/production/design.js @@ -2,15 +2,16 @@ Volcanos(chat.ONIMPORT, { _init: function(can, msg) { can.onimport.myViewTabs(can, "status", msg, function(value) { return [ {view: html.TITLE, list: [value.title, + // msg.IsTech() && value.price > 0 && can.onimport.unitView(can, value, "price", "元"), value.score != "3" && can.onimport.unitView(can, value, "score", "星"), can.onimport.textView(can, value, "status"), ]}, - {view: html.STATUS, list: [value.uid.slice(0, 6), + {view: html.STATUS, list: [ + can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.unitView(can, value, "plan_title"), ]}, - // msg.IsTech() && value.price > 0 && {view: html.OUTPUT, list: [can.onimport.unitView(can, value, "price", "元")]}, - {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), + {view: html.OUTPUT, list: [value.design_content]}, can.onimport.titleAction(can, value), ] }) }, }) \ No newline at end of file diff --git a/src/production/file.go b/src/production/file.go new file mode 100644 index 0000000..c386d8b --- /dev/null +++ b/src/production/file.go @@ -0,0 +1,58 @@ +package production + +import ( + "path" + + "shylinux.com/x/ice" + "shylinux.com/x/icebergs/base/aaa" + "shylinux.com/x/icebergs/base/mdb" + "shylinux.com/x/icebergs/base/web" + kit "shylinux.com/x/toolkits" + + "shylinux.com/x/operation/src/production/model" +) + +type File struct { + Table + order string `data:"11"` + fields string `data:"title,content,file_type,file_link,file_name,file_size,issue_uid,user_uid"` + create string `name:"create issue_uid* title* content file_type*:select file_link*@upload" role:"worker"` +} + +func (s File) Create(m *ice.Message, arg ...string) { + msg := m.Cmd(web.SPACE, ice.OPS, web.CACHE, path.Base(m.Option(model.FILE_LINK)), kit.Dict(ice.MSG_USERROLE, aaa.TECH)) + s.ValueCreate(m, kit.Simple(arg, msg.AppendSimple(model.NAME, model.SIZE))...) +} +func (s File) List(m *ice.Message, arg ...string) { + if s.ValueList(m, arg); s.IsLeader(m) { + m.PushAction(s.Download, s.Remove) + } else { + m.PushAction() + } + m.Display("") + s.OtherListCmd(m, s.IssueList, s.DesignList) +} +func (s Table) Download(m *ice.Message, arg ...string) {} +func (s File) Download(m *ice.Message, arg ...string) { + s.Select(m, m.OptionSimple(model.UID, model.STORY_UID)...) + m.ProcessOpen("/share/" + m.Cmdx(web.SPACE, ice.OPS, web.SHARE, mdb.CREATE, mdb.TYPE, web.DOWNLOAD, + mdb.NAME, m.Append(model.FILE_NAME), mdb.TEXT, kit.Path(m.Append(model.FILE_LINK)))) +} + +func init() { ice.TeamCtxCmd(File{}) } + +type FileType int + +const ( + FileIcon FileType = iota + FileYuanXing + FileSheji +) + +var FileTypeList = map[FileType]string{ + FileIcon: "图标文件", + FileYuanXing: "原型文件", + FileSheji: "设计文件", +} + +func (s FileType) String() string { return FileTypeList[s] } diff --git a/src/production/file.js b/src/production/file.js new file mode 100644 index 0000000..29de1ab --- /dev/null +++ b/src/production/file.js @@ -0,0 +1,10 @@ +Volcanos(chat.ONIMPORT, { + _init: function(can, msg) { + can.onimport.myView(can, msg, function(value) { return [ + {view: html.TITLE, list: [value.title, value.file_type, value.file_size, can.onimport.titleAction(can, value)]}, + {view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), value.user_name]}, + {view: html.OUTPUT, list: [value.file_name]}, + {view: html.OUTPUT, list: [value.content]}, + ] }) + }, +}) \ No newline at end of file diff --git a/src/production/issue.go b/src/production/issue.go index 4968b46..3929c0d 100644 --- a/src/production/issue.go +++ b/src/production/issue.go @@ -10,10 +10,10 @@ import ( type Issue struct { Table order string `data:"2"` - fields string `data:"updated_at,title,content,issue_type,level,status,price,score,link,design_count,task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"` - create string `name:"create plan_uid*:select title* content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` - modify string `name:"modify title* content* price* link begin_time:select@date end_time:select@date" role:"worker"` - designCreate string `name:"designCreate title* content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` + fields string `data:"updated_at,title,issue_content,issue_type,level,status,price,score,link,design_count,task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"` + create string `name:"create plan_uid*:select title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` + modify string `name:"modify title* issue_content* price* link begin_time:select@date end_time:select@date" role:"worker"` + designCreate string `name:"designCreate title* design_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` taskCreate string `name:"taskCreate title* content* space path begin_time:select@date end_time:select@date" role:"worker"` bindPlan string `name:"bindPlan plan_uid*:select"` } @@ -44,27 +44,27 @@ func (s Issue) List(m *ice.Message, arg ...string) { s.ApplyCheck(m, arg...) return } - user_uid, isCreator, isWorker := m.Option(model.USER_UID), s.IsCreator(m), s.IsWorker(m) + isCreator, isWorker := s.IsCreator(m), s.IsWorker(m) s.Orders(m, model.STATUS, model.DESIGN_COUNT, model.TASK_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300) s.ValueList(m, arg) s.SelectJoinPlan(m) s.SettingSelect(m) m.Table(func(value ice.Maps) { button := []ice.Any{} - if PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish { - if isWorker && kit.Int(value[model.DESIGN_COUNT]) == 0 { + if isWorker && kit.Int(value[model.DESIGN_COUNT]) == 0 { + if PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish { button = append(button, s.DesignCreate) } } if isCreator { button = append(button, s.TaskCreate) } - s.PushIssueButton(m, value, user_uid, button...) + s.PushIssueButton(m, value, button...) }).Display("") kit.If(len(arg) == 1, func() { m.Sort("plan_status,status,design_count,task_count,updated_at", ice.STR, ice.STR, ice.STR, ice.STR, ice.STR_R) }) - s.OtherListCmd(m, s.DesignList, s.TaskList, s.CaseList, s.MeetList, s.DealList) + s.OtherListCmd(m, s.PlanList, s.DesignList, s.TaskList, s.CaseList, s.FileList, s.MeetList, s.DealList) } func (s Issue) DesignCreate(m *ice.Message, arg ...string) { s.commonOtherCreate(m, Design{}, arg...) } func (s Issue) TaskCreate(m *ice.Message, arg ...string) { s.commonOtherCreate(m, Task{}, arg...) } diff --git a/src/production/issue.js b/src/production/issue.js index ecfdda0..e96cfd9 100644 --- a/src/production/issue.js +++ b/src/production/issue.js @@ -4,18 +4,18 @@ Volcanos(chat.ONIMPORT, { {view: html.TITLE, list: [value.title, // value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"), // value.level != "level-3" && can.onimport.textView(can, value, "level"), + // msg.IsTech() && value.price > 0 && can.onimport.unitView(can, value, "price", "元"), value.score != "3" && can.onimport.unitView(can, value, "score", "星"), can.onimport.textView(can, value, "status"), ]}, {view: html.STATUS, list: [ - value.uid.slice(0, 6), + can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.unitView(can, value, "plan_title"), can.onimport.unitView(can, value, "design_count", "个"), can.onimport.unitView(can, value, "task_count", "个"), ]}, - // msg.IsTech() && value.price > 0 && {view: html.OUTPUT, list: [can.onimport.unitView(can, value, "price", "元")]}, - {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), + {view: html.OUTPUT, list: [value.issue_content]}, can.onimport.titleAction(can, value), ] }) }, }) \ No newline at end of file diff --git a/src/production/meet.go b/src/production/meet.go index fcbecdb..33533b7 100644 --- a/src/production/meet.go +++ b/src/production/meet.go @@ -12,8 +12,8 @@ import ( type Meet struct { Table order string `data:"10"` - fields string `data:"from_user_uid,to_user_uid,meet_type,title,content,link,begin_time,end_time,issue_uid,plan_uid,story_uid,company_uid"` - create string `name:"create issue_uid* from_user_uid* to_user_uid* meet_type* title* content* link* date time" role:"leader"` + fields string `data:"from_user_uid,to_user_uid,title,content,meet_type,meet_link,begin_time,end_time,issue_uid,plan_uid,story_uid,company_uid"` + create string `name:"create issue_uid* from_user_uid* to_user_uid* title* content* meet_type* meet_link* date time" role:"leader"` remove string `name:"remove" role:"leader"` preview string `name:"preview" help:"入会" role:"worker"` } @@ -22,7 +22,7 @@ func (s Meet) Create(m *ice.Message, arg ...string) { t := time.Unix(kit.Time(kit.Select(m.Option("date")+" "+m.Option("time")+":00", m.Option(model.BEGIN_TIME)))/int64(time.Second), 0) m.OptionDefault(model.BEGIN_TIME, t.Format(ice.MOD_TIME), model.END_TIME, t.Add(30*time.Minute).Format(ice.MOD_TIME)) m.Option(model.COMPANY_UID, m.Cmd(story{}, s.Select, model.UID, m.Option(model.STORY_UID)).Append(model.COMPANY_UID)) - s.ValueCreate(m, m.OptionSimple("issue_uid,from_user_uid,to_user_uid,meet_type,title,content,link,begin_time,end_time,plan_uid,company_uid")...) + s.ValueCreate(m, m.OptionSimple("issue_uid,from_user_uid,to_user_uid,title,content,meet_type,meet_link,begin_time,end_time,plan_uid,company_uid")...) s.SendMessage(s.GetCommandUID(m), m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID)) s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID)) } diff --git a/src/production/meet.js b/src/production/meet.js index f00d30e..a8ab706 100644 --- a/src/production/meet.js +++ b/src/production/meet.js @@ -6,7 +6,7 @@ Volcanos(chat.ONIMPORT, { } can.onimport.myView(can, msg, function(value) { return [ {view: html.TITLE, list: [value.title, value.meet_type, can.onimport.titleAction(can, value)]}, - {view: html.STATUS, list: [value.uid.slice(0, 6), value.user_name, value.begin_time+" ~ "+value.end_time.split(" ")[1]]}, + {view: html.STATUS, list: [can.onimport.uidView(can, value), value.user_name, value.begin_time+" ~ "+value.end_time.split(" ")[1]]}, {view: html.OUTPUT, list: [value.content]}, ] }) }, diff --git a/src/production/model/model.go b/src/production/model/model.go index 06b2742..cf46454 100644 --- a/src/production/model/model.go +++ b/src/production/model/model.go @@ -8,12 +8,13 @@ const ( INFO = "info" LINK = "link" TYPE = "type" + SIZE = "size" ROLE = "role" LEVEL = "level" STATUS = "status" - COUNT = "count" PRICE = "price" SCORE = "score" + COUNT = "count" TITLE = "title" CONTENT = "content" VERSION = "version" @@ -30,12 +31,14 @@ const ( PLAN_TYPE = "plan_type" PLAN_UID = "plan_uid" PLAN_STATUS = "plan_status" - DESIGN_STATUS = "design_status" - DESIGN_COUNT = "design_count" ISSUE_UID = "issue_uid" ISSUE_TYPE = "issue_type" + ISSUE_CONTENT = "issue_content" ISSUE_STATUS = "issue_status" ISSUE_COUNT = "issue_count" + DESIGN_CONTENT = "design_content" + DESIGN_STATUS = "design_status" + DESIGN_COUNT = "design_count" TASK_UID = "task_uid" TASK_STATUS = "task_status" TASK_COUNT = "task_count" @@ -43,6 +46,11 @@ const ( CASE_STATUS = "case_status" CASE_COUNT = "case_count" MEET_TYPE = "meet_type" + MEET_LINK = "meet_link" + FILE_LINK = "file_link" + FILE_NAME = "file_name" + FILE_TYPE = "file_type" + FILE_SIZE = "file_size" MARKET_UID = "market_uid" CREATED_AT = "created_at" UPDATED_AT = "updated_at" @@ -122,9 +130,20 @@ type Deal struct { ToUserUID string `gorm:"type:char(32);index"` Price int `gorm:"default:0"` } +type File struct { + db.ModelContent + CompanyUID string `gorm:"type:char(32);index"` + StoryUID string `gorm:"type:char(32);index"` + PlanUID string `gorm:"type:char(32);index"` + IssueUID string `gorm:"type:char(32);index"` + Link string `gorm:"type:varchar(255)"` + Name string `gorm:"type:varchar(128)"` + Type uint8 `gorm:"default:0"` + Size int `gorm:"default:0"` +} func init() { - db.CmdModels("", &UserStory{}, &Story{}, &Plan{}, &Issue{}, &Design{}, &Task{}, &Case{}, &Meet{}, &Deal{}) + db.CmdModels("", &UserStory{}, &Story{}, &Plan{}, &Issue{}, &Design{}, &Task{}, &Case{}, &Meet{}, &Deal{}, &File{}) } type Common struct { diff --git a/src/production/plan.css b/src/production/plan.css index 292dcd9..d600c17 100644 --- a/src/production/plan.css +++ b/src/production/plan.css @@ -1,3 +1,3 @@ -$output div.item.card>div.output span.status.create { color:var(--danger-bg-color); } +// $output div.item.card>div.output span.status.create { color:var(--danger-bg-color); } body.width1 $output div.item.card>div.output span.status { margin-left:unset !important; } body.width1 $output div.item.card>div.output span.type { margin-left:auto; } \ No newline at end of file diff --git a/src/production/plan.go b/src/production/plan.go index ca15551..3705b46 100644 --- a/src/production/plan.go +++ b/src/production/plan.go @@ -15,8 +15,8 @@ type Plan struct { modify string `name:"modify title* content version begin_time*:select@date end_time*:select@date" role:"leader"` remove string `name:"remove" role:"leader"` process string `name:"process" role:"leader"` - issueCreate string `name:"issueCreate title* content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` setType string `name:"setType plan_type" role:"creator"` + issueCreate string `name:"issueCreate title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` } func (s Plan) Create(m *ice.Message, arg ...string) { @@ -59,10 +59,7 @@ func (s Plan) List(m *ice.Message, arg ...string) { button = append(button, s.SetType) } }).Display("").DisplayCSS("") - s.OtherListCmd(m, s.IssueList, s.DesignList, s.TaskList, s.CaseList, s.MeetList, s.DealList) -} -func (s Plan) SetType(m *ice.Message, arg ...string) { - s.Modify(m, m.OptionSimple(model.PLAN_TYPE)...) + s.OtherListCmd(m, s.IssueList, s.DesignList, s.TaskList, s.CaseList) } func (s Plan) Process(m *ice.Message, arg ...string) { s.changeStatus(m, PlanCreate, PlanProcess) @@ -76,6 +73,9 @@ func (s Plan) Finish(m *ice.Message, arg ...string) { } s.changeStatus(m, PlanProcess, PlanFinish) } +func (s Plan) SetType(m *ice.Message, arg ...string) { + s.Modify(m, m.OptionSimple(model.PLAN_TYPE)...) +} func (s Plan) IssueCreate(m *ice.Message, arg ...string) { s.commonOtherCreate(m, Issue{}, arg...) } func init() { ice.TeamCtxCmd(Plan{}) } diff --git a/src/production/plan.js b/src/production/plan.js index cce3f97..3140b5e 100644 --- a/src/production/plan.js +++ b/src/production/plan.js @@ -2,7 +2,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.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), can.onimport.unitView(can, value, "issue_count", "个")]}, + {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), ] }) }, diff --git a/src/production/portal.go b/src/production/portal.go index 270836c..a83a6c2 100644 --- a/src/production/portal.go +++ b/src/production/portal.go @@ -17,6 +17,7 @@ func (s Plan) AfterMigrate(m *ice.Message, arg ...string) { s.Table.AfterMigrate(m, arg...) s.SettingCreate(m, "leader_approved", "radio", "help", "允许管理人员审批项目", "scope", "place") s.SettingCreate(m, "leader_finish", "radio", "help", "允许管理人员验收项目", "scope", "place") + s.SettingCreate(m, "leader_payfor", "radio", "help", "允许管理人员支付项目", "scope", "place") } func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) { defer s.DashboardCreate(m, "")() diff --git a/src/production/portal.json b/src/production/portal.json index ebefb78..bb68fab 100644 --- a/src/production/portal.json +++ b/src/production/portal.json @@ -1,23 +1,22 @@ { "portal": "产品迭代", "member": "项目成员", - "plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例", + "plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例", "file": "文件附件", "care": "新人帮助", "take": "项目接单", "stat": "项目统计", "date": "会议预约", "meet": "会议安排", "deal": "支付记录", "process": "开始", "submit": "提交", "reback": "返工", "finish": "完成", "issueCreate": "原型设计", "designCreate": "界面设计", "taskCreate": "开发任务", "caseCreate": "测试用例", "issueList": "原型设计", "designList": "界面设计", "taskList": "开发任务", "caseList": "测试用例", - "discuss": "约会", "payfor": "支付", "program": "编程", "bindPlan": "绑定计划", - "meetList": "会议安排", "dealList": "支付记录", - "setType": "设置类型", + "program": "编程", "discuss": "约会", "payfor": "支付", "setType": "设置类型", "bindPlan": "绑定计划", + "planList": "迭代计划", "fileList": "附件列表", "meetList": "会议安排", "dealList": "支付记录", "style": { - "discuss": "notice", - "payfor": "notice", "preview": "notice", "program": "notice", + "discuss": "notice", + "setScore": "notice", + "payfor": "notice", "process": "notice", "submit": "notice", "reback": "danger", "finish": "notice", - "setScore": "notice", "issueCreate": "notice", "designCreate": "notice", "taskCreate": "notice", @@ -29,6 +28,7 @@ "design": "design.png", "task": "task.png", "case": "case.png", + "file": "meet.png", "care": "meet.png", "take": "meet.png", "stat": "meet.png", @@ -43,13 +43,15 @@ "story_name": "产品名称", "story_type": "产品类型", "plan_uid": "产品计划", - "plan_type": "产品类型", "plan_title": "产品计划", + "plan_type": "产品类型", "plan_status": "计划状态", "issue_uid": "产品需求", + "issue_content": "功能清单", "issue_type": "需求类型", "issue_status": "需求状态", "issue_count": "需求数量", + "design_content": "功能清单", "design_status": "设计状态", "design_count": "设计数量", "task_uid": "开发任务", @@ -58,12 +60,17 @@ "case_status": "用例状态", "case_count": "用例数量", "meet_type": "会议类型", + "meet_link": "会议链接", + "file_type": "文件类型", + "file_link": "文件链接", + "file_name": "文件名称", + "file_size": "文件大小", "from_user_uid": "付款人", "to_user_uid": "收款人", "process_time": "开始时间", "finish_time": "完成时间", - "score": "评分", "date": "日期", + "score": "评分", "comment": "备注", "level": "优先级" }, @@ -112,6 +119,16 @@ "create": "danger" } }, + "level": { + "level-1": "紧急", + "level-2": "优先", + "level-3": "普通", + "level-4": "稍后", + "level-5": "不急", + "style": { + "level-1": "danger" + } + }, "status": { "create": "待评审", "rejected": "已驳回", @@ -143,16 +160,6 @@ "style": { "create": "danger" } - }, - "level": { - "level-1": "紧急", - "level-2": "优先", - "level-3": "普通", - "level-4": "稍后", - "level-5": "不急", - "style": { - "level-1": "danger" - } } } } \ No newline at end of file diff --git a/src/production/stat.go b/src/production/stat.go index 6534837..dcdc2ce 100644 --- a/src/production/stat.go +++ b/src/production/stat.go @@ -74,7 +74,7 @@ func (s Stat) List(m *ice.Message, arg ...string) { kit.For(stat, func(key string, value int) { m.Push(key, kit.Select(kit.Format(value), "ContextOS 汇总数据", key == model.NAME)) }) - m.Display("").SortIntR("成员人数") + m.Display("").SortIntR("已支付") } func (s Table) SelectAuthPlace(m *ice.Message, target ice.Any, arg ...string) *ice.Message { msg := s.SelectJoinAuth(m.Cmd(target, s.Select, model.UID, m.Option(model.STORY_UID))) diff --git a/src/production/studio.go b/src/production/studio.go deleted file mode 100644 index e439b30..0000000 --- a/src/production/studio.go +++ /dev/null @@ -1,17 +0,0 @@ -package production - -import "shylinux.com/x/ice" - -type studio struct { - Tables - fields string `data:"title,content"` - create string `name:"create title* content*" role:"leader"` - remove string `name:"remove" role:"leader"` - list string `name:"list city_name company_name auto"` -} - -func (s studio) List(m *ice.Message, arg ...string) { - m.Cmdy("city") -} - -func init() { ice.TeamCtxCmd(studio{}) } diff --git a/src/production/studio.js b/src/production/studio.js deleted file mode 100644 index 308755b..0000000 --- a/src/production/studio.js +++ /dev/null @@ -1,9 +0,0 @@ -Volcanos(chat.ONIMPORT, { - _init: function(can, msg) { - can.onimport.myView(can, msg, function(value) { return [ - {view: html.TITLE, list: [value.title||value.name||value.user_name, can.onimport.titleAction(can, value)]}, - {view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]}, - {view: html.OUTPUT, list: [value.content||value.info]}, - ] }) - }, -}) \ No newline at end of file diff --git a/src/production/take.go b/src/production/take.go index 0345750..0ef3281 100644 --- a/src/production/take.go +++ b/src/production/take.go @@ -20,14 +20,20 @@ func (s take) List(m *ice.Message, arg ...string) { return } push := func(val ice.Maps, t string) { + m.Push(model.UPDATED_AT, kit.Select(val[model.CREATED_AT], val[model.UPDATED_AT])) m.Push(model.TYPE, t) m.Push(model.UID, val[model.UID]) m.Push(model.TITLE, val[model.TITLE]) - m.Push(model.CONTENT, val[model.CONTENT]) - m.Push(model.USER_UID, val[model.USER_UID]) - m.Push(model.STORY_UID, value[model.UID]) + m.Push(model.CONTENT, kit.Select(val[model.CONTENT], val[model.ISSUE_CONTENT], val[model.DESIGN_CONTENT])) + m.Push(model.LINK, val[model.LINK]) m.Push(model.STORY_NAME, value[model.NAME]) - m.Push(model.UPDATED_AT, kit.Select(val[model.CREATED_AT], val[model.UPDATED_AT])) + m.Push(model.STORY_UID, value[model.UID]) + m.Push(model.USER_UID, val[model.USER_UID]) + if val[model.LINK] == "" { + m.PushButton(s.Info, s.Main) + } else { + m.PushButton(s.Preview, s.Info, s.Main) + } } m.Cmd(Plan{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) { switch PlanStatus(kit.Int(val[model.PLAN_STATUS])) { @@ -35,8 +41,11 @@ func (s take) List(m *ice.Message, arg ...string) { if kit.Int(val[model.ISSUE_COUNT]) == 0 { push(val, "PM可接单") } else { - m.Cmd(Issue{}, s.Select, model.STORY_UID, value[model.UID], model.PLAN_UID, val[model.UID], model.STATUS, IssueProcess, model.DESIGN_COUNT, "0").Table(func(val ice.Maps) { - push(val, "UI可接单") + m.Cmd(Issue{}, s.Select, model.STORY_UID, value[model.UID], model.PLAN_UID, val[model.UID], model.DESIGN_COUNT, "0").Table(func(val ice.Maps) { + switch IssueStatus(kit.Int(val[model.STATUS])) { + case IssueProcess, IssueFinish: + push(val, "UI可接单") + } }) } case PlanFinish: @@ -73,7 +82,7 @@ func (s take) List(m *ice.Message, arg ...string) { m.Cmd(Case{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) { push(val, "QA可测试") }) } }) - m.PushAction(s.Info, s.Main).Display("").DisplayCSS("").Sort(kit.Fields(model.TYPE, model.UPDATED_AT), []string{ + m.Display("").DisplayCSS("").Sort(kit.Fields(model.TYPE, model.UPDATED_AT), []string{ "PM可接单", "UI可接单", "PM优秀项目", "UI优秀项目", "PM待评审", "PM待提交", "PM待验收", "UI待评审", "UI待提交", "UI待验收", diff --git a/src/production/task.go b/src/production/task.go index 3b92271..0ae5477 100644 --- a/src/production/task.go +++ b/src/production/task.go @@ -27,16 +27,14 @@ func (s Task) Remove(m *ice.Message, arg ...string) { s.issueCount(m).DashboardUpdate(m) } func (s Task) List(m *ice.Message, arg ...string) { - user_uid := m.Option(model.USER_UID) s.Orders(m, model.STATUS, model.CASE_COUNT, s.Desc(model.CREATED_AT)).Limit(m, 300) s.ValueList(m, arg) s.SelectJoinPlan(m) - // s.StatusCount(m, arg...) m.Table(func(value ice.Maps) { if IssueStatus(kit.Int(value[model.STATUS])) == IssueFinish { - s.PushTaskButton(m, value, user_uid, s.Program) + s.PushTaskButton(m, value, s.Program) } else { - s.PushTaskButton(m, value, user_uid, s.Program, s.CaseCreate) + s.PushTaskButton(m, value, s.Program, s.CaseCreate) } }).RenameAppend(model.STATUS, model.TASK_STATUS).Display("") s.OtherListCmd(m, s.CaseList)