diff --git a/src/production/care.go b/src/production/care.go index b672682..faf8bdc 100644 --- a/src/production/care.go +++ b/src/production/care.go @@ -61,7 +61,7 @@ func (s care) List(m *ice.Message, arg ...string) { } }) if m.Action().Display(""); m.FieldsIsDetail() { - s.OtherListCmd(m, s.IssueList, s.DesignList) + s.OtherListCmd(m, s.IssueList, s.DesignList, s.DealList) } else { m.Sort(kit.Fields("已支付", "原型已完成", "原型设计中", "界面已完成", "界面设计中"), ice.INT_R, ice.INT_R, ice.INT_R, ice.INT_R, ice.INT_R) } @@ -76,5 +76,10 @@ func (s care) DesignList(m *ice.Message, arg ...string) { s.OtherList(m, Design{}, model.USER_UID, m.Option(model.UID)) m.RenameAppend(model.STORY_UID, model.PLACE_UID) } +func (s care) DealList(m *ice.Message, arg ...string) { + s.Limit(m, 300) + s.OtherList(m, Deal{}, model.TO_USER_UID, m.Option(model.UID)) + m.RenameAppend(model.STORY_UID, model.PLACE_UID, model.TO_USER_UID, model.USER_UID) +} func init() { ice.TeamCtxCmd(care{}) } diff --git a/src/production/case.go b/src/production/case.go index d15cfa1..06b182a 100644 --- a/src/production/case.go +++ b/src/production/case.go @@ -13,7 +13,7 @@ type Case struct { role string `data:"leader,worker"` fields string `data:"title,content,status,space,index,begin_time,end_time,process_time,finish_time,task_uid,issue_uid,plan_uid,story_uid,user_uid"` create string `name:"create task_uid*:select title* content* space:select index:select begin_time:select@date end_time:select@date" role:"worker"` - modify string `name:"modify title* content* space:select index:select begin_time*:select@date end_time*:select@date" role:"worker"` + modify string `name:"modify title* content* space:select index:select" role:"worker"` finish string `name:"finish" role:"worker"` } diff --git a/src/production/coder.go b/src/production/coder.go index f1eeea5..cafb68e 100644 --- a/src/production/coder.go +++ b/src/production/coder.go @@ -2,6 +2,7 @@ package production import ( "shylinux.com/x/ice" + "shylinux.com/x/icebergs/base/aaa" "shylinux.com/x/icebergs/core/code" kit "shylinux.com/x/toolkits" @@ -10,18 +11,34 @@ import ( type coder struct { Tables - list string `name:"list path file line auto" help:"编辑器" role:"void"` - repos string `name:"repos" role:"void"` - render string `name:"render" role:"void"` - save string `name:"save" role:"void"` - compile string `name:"compile" role:"void"` + list string `name:"list path file line auto" help:"编辑器" role:"void"` + inputs string `name:"inputs" role:"void"` + repos string `name:"repos" role:"void"` + plugin string `name:"plugin" role:"void"` + render string `name:"render" role:"void"` + engine string `name:"engine" role:"void"` + create string `name:"create file*" role:"void"` + trash string `name:"trash" role:"void"` + complete string `name:"complete" role:"void"` + save string `name:"save" role:"void"` + compile string `name:"compile" role:"void"` } -func (s coder) Repos(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) } -func (s coder) Render(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) } -func (s coder) Save(m *ice.Message, arg ...string) { s.cmd(m, arg...) } -func (s coder) Compile(m *ice.Message, arg ...string) { s.cmd(m, arg...) } -func (s coder) List(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, arg) } +func (s coder) Inputs(m *ice.Message, arg ...string) { + m.Cmdy(code.VIMER, m.ActionKey(), arg, kit.Dict(ice.MSG_USERROLE, aaa.TECH)) +} +func (s coder) Repos(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) } +func (s coder) Plugin(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) } +func (s coder) Render(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) } +func (s coder) Engine(m *ice.Message, arg ...string) { s.cmd(m, arg...) } +func (s coder) Create(m *ice.Message, arg ...string) { s.cmd(m, arg...) } +func (s coder) Trash(m *ice.Message, arg ...string) { s.cmd(m, arg...) } +func (s coder) Complete(m *ice.Message, arg ...string) { s.cmd(m, arg...) } +func (s coder) Save(m *ice.Message, arg ...string) { s.cmd(m, arg...) } +func (s coder) Compile(m *ice.Message, arg ...string) { s.cmd(m, arg...) } +func (s coder) List(m *ice.Message, arg ...string) { + m.Cmdy(code.VIMER, arg).Option(ice.MSG_TOOLKIT, "") +} func init() { ice.TeamCtxCmd(coder{}) } diff --git a/src/production/common.go b/src/production/common.go index 225b275..2af50e6 100644 --- a/src/production/common.go +++ b/src/production/common.go @@ -30,16 +30,17 @@ type Table struct { cancel string `name:"cancel" role:"leader"` trash string `name:"trash" role:"leader"` list string `name:"list story_uid uid auto" role:"void"` + dateInsert string `name:"dateInsert" help:"约会" role:"leader"` + discuss string `name:"discuss meet_type*:select title* content meet_link* date* time*" role:"leader"` + addNote string `name:"addNote title content to_user_uid:select" help:"备注" role:"worker"` 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"` - addNote string `name:"addNote title content to_user_uid:select" help:"备注" role:"worker"` - setScore string `name:"setScore score" help:"评分" role:"leader"` - payfor string `name:"payfor price* title* content" role:"leader"` + join string `name:"join" help:"入会" style:"notice" role:"void"` 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"` - dateInsert string `name:"dateInsert" help:"约会" role:"leader"` + fileCreate string `name:"fileCreate title* content file_type*:select file_link*:select@upload" help:"上传附件" role:"worker"` + setScore string `name:"setScore score" help:"打分" role:"leader"` + payfor string `name:"payfor price*=500 title* content" role:"leader"` planList string `name:"planList" role:"worker"` issueList string `name:"issueList" role:"worker"` designList string `name:"designList" role:"worker"` @@ -74,29 +75,31 @@ func (s Table) Inputs(m *ice.Message, arg ...string) { s.InputsList(m, FileTypeList, arg...) case model.LEVEL: s.InputsList(m, LevelList, arg...) + case model.SCORE: + m.Push(arg[0], "1", "2", "3", "4", "5") case model.VERSION: m.Push(arg[0], "v1", "v2", "v3", "v4", "v5") - case nfs.PATH: - m.Option(ice.MSG_USERROLE, aaa.TECH) - m.Cmdy(web.SPACE, m.Option(web.SPACE), nfs.DIR, nfs.SRC, nfs.PATH) case ctx.INDEX: - msg := m.Spawn() - s.Table.Inputs(msg, arg...) - msg.Table(func(value ice.Maps) { - if strings.HasSuffix(value[arg[0]], ".portal") { - m.Push(arg[0], value[arg[0]]) - } - }) + if m.PrefixKey() == ice.GetTypeKey(Case{}) { + msg := m.Spawn() + s.Table.Inputs(msg, arg...) + msg.Table(func(value ice.Maps) { + if strings.HasPrefix(value[arg[0]], "web.team.") && strings.HasSuffix(value[arg[0]], ".portal") { + m.PushRecord(value, arg[0], mdb.HELP) + } + }) + } else { + s.Hash.Inputs(m, arg...) + } + case nfs.PATH: + if m.PrefixKey() == ice.GetTypeKey(Task{}) { + m.Option(ice.MSG_USERROLE, aaa.TECH) + m.Cmdy(web.SPACE, m.Option(web.SPACE), nfs.DIR, nfs.SRC, nfs.PATH, kit.Dict(nfs.DIR_TYPE, nfs.DIR)) + } else { + s.Hash.Inputs(m, arg...) + } default: switch m.Option(ctx.ACTION) { - case "addNote": - switch arg[0] { - case model.CONTENT: - m.Push(arg[0], "业务负责人已验收,请产研负责人验收~") - m.Push(arg[0], "产研负责人已验收,请研发负责人验收~") - default: - s.Table.Inputs(m, arg...) - } case "discuss": switch arg[0] { case "date": @@ -107,6 +110,36 @@ func (s Table) Inputs(m *ice.Message, arg ...string) { for i := 38; i < 48; i++ { m.Push(arg[0], kit.Format("%02d:%s", i/2, kit.Select("30", "00", i%2 == 0))) } + default: + s.Table.Inputs(m, arg...) + } + case "payfor": + switch arg[0] { + case model.PRICE: + m.Push(arg[0], "500") + m.Push(arg[0], "1000") + m.Push(arg[0], "1500") + m.Push(arg[0], "2000") + m.Push(arg[0], "2500") + m.Push(arg[0], "3000") + case model.TITLE: + title := m.Option(model.TITLE) + m.Push(arg[0], title+" PM 订金") + m.Push(arg[0], title+" PM 尾款") + m.Push(arg[0], title+" UI 订金") + m.Push(arg[0], title+" UI 尾款") + m.Push(arg[0], title+" PM+UI 订金") + m.Push(arg[0], title+" PM+UI 尾款") + default: + s.Table.Inputs(m, arg...) + } + case "addNote": + switch arg[0] { + case model.CONTENT: + m.Push(arg[0], "业务负责人已验收,请产研负责人验收~") + m.Push(arg[0], "产研负责人已验收,请研发负责人验收~") + default: + s.Table.Inputs(m, arg...) } default: s.Table.Inputs(m, arg...) @@ -196,12 +229,15 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) { button = append(button, s.Cancel) } case IssueSubmit: - if isWorker && value[model.LINK] != "" { - button = append(button, s.Preview) + if isLeader { + button = append(button, s.DateInsert) } if isLeader { button = append(button, s.AddNote) } + if isWorker && value[model.LINK] != "" { + button = append(button, s.Preview) + } if isWorker { button = append(button, s.FileCreate) } @@ -314,6 +350,9 @@ func (s Table) Cancel(m *ice.Message, arg ...string) { func (s Table) Trash(m *ice.Message, arg ...string) { s.Delete(m, m.OptionSimple(model.UID, model.STORY_UID)...) } +func (s Table) Join(m *ice.Message, arg ...string) { + m.ProcessOpen(m.Option(model.MEET_LINK)) +} 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)))) @@ -323,11 +362,9 @@ func (s Table) sendTemplate(m *ice.Message, from, to, title string, arg ...strin s.SendTemplate(m, from, msg.Append(model.USER_UID), title, arg...) } func (s Table) coderLink(m *ice.Message, arg ...string) string { - p := path.Base(m.Option(nfs.PATH)) - return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C("web.team.production.coder"), - nfs.PATH, nfs.SRC, nfs.FILE, path.Join(p, "portal.go"), - m.OptionSimple(model.STORY_UID, model.ISSUE_UID), - ) + return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C(ice.GetTypeKey(coder{})), + nfs.PATH, nfs.SRC, nfs.FILE, path.Join(path.Base(m.Option(nfs.PATH)), "portal.go"), + m.OptionSimple(model.STORY_UID, model.ISSUE_UID, model.TITLE)) } func (s Table) Program(m *ice.Message, arg ...string) { m.ProcessOpen(s.coderLink(m)) @@ -443,7 +480,7 @@ func (s Table) FileList(m *ice.Message, arg ...string) { } func (s Table) MeetList(m *ice.Message, arg ...string) { s.commonOtherList(m, Meet{}) - m.PushAction(s.Preview) + m.PushAction(Meet{}.Join) } func (s Table) DealList(m *ice.Message, arg ...string) { s.commonOtherList(m, Deal{}) diff --git a/src/production/date.go b/src/production/date.go index 13df3fd..8752df6 100644 --- a/src/production/date.go +++ b/src/production/date.go @@ -60,12 +60,13 @@ func (s Date) List(m *ice.Message, arg ...string) { func init() { ice.TeamCtxCmd(Date{}) } func (s Date) head(m *ice.Message, arg ...string) { + s.SettingSelect(m) head := []string{} - for i := -kit.Int(m.OptionDefault("date_begin", kit.Select("2", "0", m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", "3")); i++ { + for i := -kit.Int(m.OptionDefault("date_begin", kit.Select(m.Option(DATE_BEGIN_DAYS), "0", m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", m.Option(DATE_END_DAYS))); i++ { head = append(head, strings.Split(m.Time(kit.Format("%dh", i*24)), " ")[0]) } list := []string{} - for i := kit.Int(m.OptionDefault("date_start", "20")); i < kit.Int(m.OptionDefault("date_stop", "46")); i++ { + for i := kit.Int(m.OptionDefault("date_start", m.Option(DATE_START_HOURS))) * 2; i < kit.Int(m.OptionDefault("date_stop", m.Option(DATE_STOP_HOURS)))*2; i++ { if i%2 == 0 { list = append(list, kit.Format("%2d:00", i/2)) } else { diff --git a/src/production/date.js b/src/production/date.js index 14ade92..0620d0e 100644 --- a/src/production/date.js +++ b/src/production/date.js @@ -1,8 +1,8 @@ Volcanos(chat.ONIMPORT, { _init: function(can, msg) { var head = can.core.Split(msg.Option("head")), list = can.core.Split(msg.Option("list")) - can.page.Append(can, can._output, [{type: html.TABLE, className: "content full", list: [ - {type: html.THEAD, list: [{type: html.TR, list: [{type: html.TH, inner: "时间"}].concat(can.core.List(head, function(value) { - var today = can.base.beginWith(can.base.Time(), value)? "(今天)": "" + can.page.Append(can, can._output, [{type: html.TABLE, className: "content scroll full", list: [ + {type: html.THEAD, list: [{type: html.TR, list: [{type: html.TH, inner: can.user.trans(can, "time", "时间")}].concat(can.core.List(head, function(value) { + var today = can.base.beginWith(can.base.Time(), value)? can.user.trans(can, "(today)", "(今天)"): "" return {type: html.TH, inner: value+today} }))}]}, {type: html.TBODY, list: can.core.List(list, function(time) { diff --git a/src/production/deal.go b/src/production/deal.go index d8c9e7f..2e244eb 100644 --- a/src/production/deal.go +++ b/src/production/deal.go @@ -12,7 +12,7 @@ type Deal struct { order string `data:"11"` role string `data:"leader,worker"` fields string `data:"from_user_uid,to_user_uid,price,title,content,issue_uid"` - create string `name:"create issue_uid* from_user_uid* to_user_uid* price* title* content" role:"leader"` + create string `name:"create issue_uid*:select from_user_uid*:select to_user_uid*:select price* title* content" role:"leader"` modify string `name:"modify title* content" role:"leader"` } diff --git a/src/production/design.go b/src/production/design.go index 38f0143..86246ac 100644 --- a/src/production/design.go +++ b/src/production/design.go @@ -13,7 +13,7 @@ type Design struct { role string `data:"leader,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" role:"worker"` + modify string `name:"modify title* design_content* price*" role:"worker"` } func (s Design) Create(m *ice.Message, arg ...string) { diff --git a/src/production/design.js b/src/production/design.js index 4d0de0e..5d709f6 100644 --- a/src/production/design.js +++ b/src/production/design.js @@ -15,4 +15,10 @@ Volcanos(chat.ONIMPORT, { {view: html.OUTPUT, list: [value.design_content]}, can.onimport.titleAction(can, value), ] }) }, +}) +Volcanos(chat.ONACTION, { + _beforeInputs: function(event, can, button, sub) { var msg = can.request(event) + sub.Prompt("link", "请输入设计链接,设置权限为所有人可查看,访问期限为永久。提交链接后,请及时与项目负责人联系,并根据反馈意见作出修改。") + sub.Prompt("file_link", "请在项目验收完成之后,再上传设计文件。") + }, }) \ No newline at end of file diff --git a/src/production/file.go b/src/production/file.go index 2dc6f4b..c14bbc4 100644 --- a/src/production/file.go +++ b/src/production/file.go @@ -17,7 +17,7 @@ type File struct { order string `data:"11"` role string `data:"leader,worker"` 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"` + create string `name:"create issue_uid*:select title* content file_type*:select file_link*:select@upload" role:"worker"` } func (s File) Create(m *ice.Message, arg ...string) { diff --git a/src/production/issue.go b/src/production/issue.go index e3c6e09..15a0a08 100644 --- a/src/production/issue.go +++ b/src/production/issue.go @@ -13,9 +13,9 @@ type Issue struct { portal string `data:"true"` fields string `data:"updated_at,title,issue_content,issue_type,level,status,price,score,link,design_count AS design_count,task_count AS 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" role:"worker"` + modify string `name:"modify title* issue_content* price*" 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"` + taskCreate string `name:"taskCreate title* content* space:select path:select begin_time:select@date end_time:select@date" role:"leader"` bindPlan string `name:"bindPlan plan_uid*:select"` } @@ -72,7 +72,7 @@ func (s Issue) List(m *ice.Message, arg ...string) { button = append(button, s.TaskCreate) } s.PushIssueButton(m, value, button...) - }).Display("") + }).Display("").DisplayCSS("") 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) m.Sort("plan_status,status,design_count,updated_at", ice.STR, ice.STR, ice.STR, ice.STR_R) diff --git a/src/production/issue.js b/src/production/issue.js index d5626cf..decf44a 100644 --- a/src/production/issue.js +++ b/src/production/issue.js @@ -3,6 +3,7 @@ Volcanos(chat.ONIMPORT, { msg.IsDetail() && msg.Option("_share_content", msg.Append("issue_content")) can.onimport.myViewTabs(can, "status", msg, function(value) { return [ {view: html.TITLE, list: [value.title, + can.onimport.spaceView(can, value), // 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", "元"), @@ -19,4 +20,13 @@ Volcanos(chat.ONIMPORT, { {view: html.OUTPUT, list: [value.issue_content]}, can.onimport.titleAction(can, value), ] }) }, +}) +Volcanos(chat.ONACTION, { + _beforeInputs: function(event, can, button, sub) { var msg = can.request(event) + sub.Prompt("issue_content", "请输入五个功能名,每个功能简单明确,功能之间相互关联环环相扣,例如「工作职责、目标任务、工作报告、工作反馈、绩效评估」") + sub.Prompt("link", "请输入设计链接,设置权限为所有人可查看,访问期限为永久。提交链接后,请及时与项目负责人联系,并根据反馈意见作出修改。") + sub.Prompt("file_link", "请在项目验收完成之后,再上传设计文件。") + button == "designCreate" && sub.Prompt("end_time", "请在三天之内完善功能清单,在五天之内提交原型链接,需要符合云社区的规范与标准,并及时与项目负责人沟通。") + sub.Option("design_content", msg.Option("issue_content")) + }, }) \ No newline at end of file diff --git a/src/production/meet.go b/src/production/meet.go index 595ccaf..f9c2696 100644 --- a/src/production/meet.go +++ b/src/production/meet.go @@ -11,13 +11,12 @@ import ( type Meet struct { Table - order string `data:"10"` - role string `data:"leader,worker"` - 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"` - modify string `name:"modify" role:"leader"` - remove string `name:"remove" role:"leader"` - preview string `name:"preview" help:"入会" role:"void"` + order string `data:"10"` + role string `data:"leader,worker"` + 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*:select from_user_uid*:select to_user_uid*:select title* content* meet_type*:select meet_link* date time" role:"leader"` + modify string `name:"modify" role:"leader"` + remove string `name:"remove" role:"leader"` } func (s Meet) Create(m *ice.Message, arg ...string) { @@ -32,10 +31,10 @@ func (s Meet) Create(m *ice.Message, arg ...string) { func (s Meet) List(m *ice.Message, arg ...string) { if s.ValueList(m, arg).Display(""); s.IsLeader(m) { m.RenameAppend(model.TO_USER_UID, model.USER_UID) - m.PushAction(s.Preview, s.Remove) + m.PushAction(s.Join, s.Remove) } else { m.RenameAppend(model.FROM_USER_UID, model.USER_UID) - m.PushAction(s.Preview) + m.PushAction(s.Join) } kit.If(!s.IsLeader(m) && m.Length() == 0, func() { m.SetResult().Echo("请等待管理员创建会议") }) s.OtherListCmd(m, s.IssueList, s.DesignList) diff --git a/src/production/note.go b/src/production/note.go index 15881a2..a939811 100644 --- a/src/production/note.go +++ b/src/production/note.go @@ -7,7 +7,7 @@ import ( type Note struct { Table fields string `data:"to_user_uid,title,content,issue_uid,plan_uid,user_uid"` - create string `name:"create title content to_user_uid" role:"worker"` + create string `name:"create title* content* to_user_uid:select" role:"worker"` remove string `name:"remove" role:"leader"` } diff --git a/src/production/plan.css b/src/production/plan.css index b7dfb5c..68caf7c 100644 --- a/src/production/plan.css +++ b/src/production/plan.css @@ -1,2 +1,3 @@ -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 +// 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; } +body.width1 $output div.item.card>div.output input[type=button][name=issueCreate] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); } \ No newline at end of file diff --git a/src/production/plan.go b/src/production/plan.go index 3475c0f..9f8e804 100644 --- a/src/production/plan.go +++ b/src/production/plan.go @@ -15,9 +15,8 @@ type Plan struct { 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" help:"归类" role:"creator"` - setScore string `name:"setScore score" help:"打分" role:"leader"` - handover string `name:"handover to_user_uid*:select" role:"leader" style:"notice" help:"交接"` + setType string `name:"setType plan_type:select" help:"归类" role:"creator"` + handover string `name:"handover to_user_uid*:select" role:"leader" help:"交接"` issueCreate string `name:"issueCreate title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` } @@ -59,6 +58,9 @@ func (s Plan) List(m *ice.Message, arg ...string) { if isLeader && m.Option(model.MARKET_UID) == "" { button = append(button, s.MarketInsert) } + if isLeader { + button = append(button, s.SetScore) + } if isCreator { button = append(button, s.SetType) } diff --git a/src/production/plan.js b/src/production/plan.js index e934a30..6d3580c 100644 --- a/src/production/plan.js +++ b/src/production/plan.js @@ -1,9 +1,18 @@ 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.unitView(can, value, "score", "星"), can.onimport.textView(can, value, "plan_type"), can.onimport.textView(can, value)]}, + {view: html.TITLE, list: [value.title, value.version, can.onimport.spaceView(can, value), + 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), ] }) }, }) +Volcanos(chat.ONACTION, { + _beforeInputs: function(event, can, button, sub) { + button == "issueCreate" && sub.Prompt("issue_content", "请输入五个功能名,每个功能简单明确,功能之间相互关联环环相扣,例如「工作职责、目标任务、工作报告、工作反馈、绩效评估」。") + button == "issueCreate" && sub.Prompt("end_time", "请在三天之内完善功能清单,在五天之内提交原型链接,需要符合云社区的规范与标准,并及时与项目负责人沟通。") + sub.Option("plan_type", "") + sub.Option("score", "") + }, +}) diff --git a/src/production/portal.go b/src/production/portal.go index 3cec56b..7b9acdd 100644 --- a/src/production/portal.go +++ b/src/production/portal.go @@ -2,6 +2,7 @@ package production import ( "shylinux.com/x/ice" + "shylinux.com/x/icebergs/base/web/html" "shylinux.com/x/community/src/api" "shylinux.com/x/community/src/gonganxitong" @@ -12,18 +13,22 @@ import ( type Portal struct { guanlixitong.Portal placeCreate string `name:"placeCreate city_name* company_name* story_name*" role:"void"` - // placeCreate string `name:"placeCreate city_name* company_name* story_name* story_type:select" role:"void"` } func (s Plan) AfterMigrate(m *ice.Message, arg ...string) { s.Table.AfterMigrate(m, arg...) - s.SettingCreate(m, "auth", "title", "项目权限", "", "999") + s.SettingCreate(m, "auth", html.TITLE, "项目权限", "", "999") s.SettingCreate(m, LEADER_APPROVED, "", "允许管理人员审批项目", api.CREATOR, "1000") s.SettingCreate(m, LEADER_FINISH, "", "允许管理人员验收项目", api.CREATOR, "1001") s.SettingCreate(m, LEADER_PAYFOR, "", "允许管理人员支付项目", api.CREATOR, "1002") s.SettingCreate(m, LEADER_PROGRAM, "", "允许管理人员本地开发", api.TECH, "1003") s.SettingCreate(m, CREATOR_PROGRAM, "", "允许创建人本地开发", api.TECH, "1004") - s.SettingCreate(m, ISSUE_MAX_CREATE, "input", "每个人最多有多少个项目待审批", api.LEADER, "1005", "2") + s.SettingCreate(m, ISSUE_MAX_CREATE, html.INPUT, "每个人最多有多少个项目待审批", api.LEADER, "1005", "2") + s.SettingCreate(m, "date", html.TITLE, "约会配置", api.LEADER, "1010") + s.SettingCreate(m, DATE_START_HOURS, html.INPUT, "会议预约开始时间", api.LEADER, "1011", "14") + s.SettingCreate(m, DATE_STOP_HOURS, html.INPUT, "会议预约结束时间", api.LEADER, "1012", "23") + s.SettingCreate(m, DATE_BEGIN_DAYS, html.INPUT, "会议预约开始日期", api.LEADER, "1013", "2") + s.SettingCreate(m, DATE_END_DAYS, html.INPUT, "会议预约结束日期", api.LEADER, "1014", "3") } func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) { if m.PrefixKey() != ice.GetTypeKey(s) { @@ -45,4 +50,8 @@ const ( LEADER_PROGRAM = "leader_program" CREATOR_PROGRAM = "creator_program" ISSUE_MAX_CREATE = "issue_max_create" + DATE_START_HOURS = "date_start_hours" + DATE_STOP_HOURS = "date_stop_hours" + DATE_BEGIN_DAYS = "date_begin_days" + DATE_END_DAYS = "date_end_days" ) diff --git a/src/production/portal.js b/src/production/portal.js index 06b2bd2..5f1f704 100644 --- a/src/production/portal.js +++ b/src/production/portal.js @@ -1,2 +1,4 @@ Volcanos(chat.ONIMPORT, { +}) +Volcanos(chat.ONACTION, { }) \ No newline at end of file diff --git a/src/production/portal.json b/src/production/portal.json index a05c743..b3faa4b 100644 --- a/src/production/portal.json +++ b/src/production/portal.json @@ -13,9 +13,6 @@ "style": { "preview": "notice", "program": "notice", - "discuss": "notice", - "setScore": "notice", - "payfor": "notice", "process": "notice", "submit": "notice", "reback": "danger", diff --git a/src/production/stat.go b/src/production/stat.go index 347bc36..5769931 100644 --- a/src/production/stat.go +++ b/src/production/stat.go @@ -9,8 +9,11 @@ import ( type Stat struct { Tables - order string `data:"8"` - role string `data:"leader,worker"` + order string `data:"8"` + role string `data:"leader,worker"` + main string `name:"main" help:"主页" style:"notice" role:"void"` + info string `name:"info" help:"详情" style:"notice" role:"void"` + member string `name:"member" help:"成员" style:"notice" role:"void"` } func (s Stat) List(m *ice.Message, arg ...string) { @@ -70,6 +73,7 @@ func (s Stat) List(m *ice.Message, arg ...string) { kit.If(kit.Int(value["price"]) > 0, func() { good++ }) }) m.Push("已入门", good) + m.PushButton(s.Member, s.Info, s.Main) }) stat := map[string]int{} m.Table(func(value ice.Maps) { kit.For(value, func(key, value string) { stat[key] += kit.Int(value) }) }) @@ -91,5 +95,8 @@ func (s Table) Count(m *ice.Message, target ice.Any, field string, arg ...string m.Cmd(target, s.Select, arg).Table(func(value ice.Maps) { stats[value[field]] = value[model.COUNT] }) return stats } +func (s Stat) Member(m *ice.Message, arg ...string) {} +func (s Stat) Info(m *ice.Message, arg ...string) {} +func (s Stat) Main(m *ice.Message, arg ...string) {} func init() { ice.TeamCtxCmd(Stat{}) } diff --git a/src/production/stat.js b/src/production/stat.js index fe50378..4ee2adb 100644 --- a/src/production/stat.js +++ b/src/production/stat.js @@ -15,7 +15,16 @@ Volcanos(chat.ONIMPORT, { can.onimport.unitView(can, value, "界面设计中", "个"), ]}, ] }, function(event, value) { if (value.story_uid == "0") { return } - can.onimport.myStory(can, {index: "web.team.production.portal", args: [value.story_uid]}) + can.onimport._story(can.request(event, value), can, "web.team.production.portal") }) }, + _story: function(event, can, index) { + var msg = can.request(event); can.page.ClassList.del(can, can._fields, "_process") + can.onimport.myStory(can, {index: index, args: [msg.Option("story_uid")]}) + }, +}) +Volcanos(chat.ONACTION, { + main: function(event, can) { can.onimport._story(event, can, "web.team.production.portal") }, + info: function(event, can) { can.onimport._story(event, can, "web.team.production.issue") }, + member: function(event, can) { can.onimport._story(event, can, "web.team.production.member") }, }) \ No newline at end of file diff --git a/src/production/take.css b/src/production/take.css index 0f4c1b7..3aead25 100644 --- a/src/production/take.css +++ b/src/production/take.css @@ -1,9 +1,11 @@ -$output>div.tabs>div.item.select.PM待评审 { border-top:var(--box-danger) !important; } -$output>div.tabs>div.item.select.PM待提交 { border-top:var(--box-danger) !important; } +$output>div.tabs>div.item.select.PM待审批 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.PM待验收 { border-top:var(--box-danger) !important; } -$output>div.tabs>div.item.select.UI待评审 { border-top:var(--box-danger) !important; } -$output>div.tabs>div.item.select.UI待提交 { border-top:var(--box-danger) !important; } +$output>div.tabs>div.item.select.UI待审批 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.UI待验收 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.RD可接单 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.RD可编程 { border-top:var(--box-danger) !important; } -$output>div.tabs>div.item.select.QA可测试 { border-top:var(--box-danger) !important; } \ No newline at end of file +$output div.item.card span.status.PM待审批 { color:var(--danger-bg-color); } +$output div.item.card span.status.PM待验收 { color:var(--danger-bg-color); } +$output div.item.card span.status.UI待审批 { color:var(--danger-bg-color); } +$output div.item.card span.status.UI待验收 { color:var(--danger-bg-color); } +$output div.item.card span.status.RD可编程 { color:var(--danger-bg-color); } \ No newline at end of file diff --git a/src/production/take.js b/src/production/take.js index 861ccd9..7d07cf4 100644 --- a/src/production/take.js +++ b/src/production/take.js @@ -3,7 +3,7 @@ Volcanos(chat.ONIMPORT, { can.onimport.myViewTabs(can, TYPE, msg, function(value) { return [ {view: html.TITLE, list: [value.story_name, value.title, can.onimport.textView(can, value, TYPE, STATUS)]}, {view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), value.user_name]}, - {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), + value.content && {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), ] }, function(event, value) { var index = "web.team.production.issue" switch (value.type) { case "PM可接单": diff --git a/src/production/task.go b/src/production/task.go index d4dfea6..8c379e1 100644 --- a/src/production/task.go +++ b/src/production/task.go @@ -15,7 +15,7 @@ type Task struct { create string `name:"create issue_uid*:select title* content* space:select path:select begin_time:select@date end_time:select@date" role:"worker"` modify string `name:"modify title* content* space:select path:select begin_time*:select@date end_time*:select@date" role:"worker"` finish string `name:"finish" role:"worker"` - caseCreate string `name:"caseCreate title* content* space:select index:select" role:"worker"` + caseCreate string `name:"caseCreate title* content* space:select index:select" role:"leader"` } func (s Task) Create(m *ice.Message, arg ...string) { diff --git a/src/production/task.js b/src/production/task.js index 25f8607..e74edaa 100644 --- a/src/production/task.js +++ b/src/production/task.js @@ -9,6 +9,7 @@ Volcanos(chat.ONIMPORT, { ]}, {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), ] }) + return if (msg.IsDetail()) { can.onappend.plugin(can, { height: can.ConfHeight()/2,