mirror of
https://shylinux.com/x/operation
synced 2025-07-01 21:21:19 +08:00
add some
This commit is contained in:
parent
ec9ae2faa8
commit
6bd50be073
@ -19,9 +19,13 @@ func (s care) SetInfo(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(userStory{}, s.Select, m.OptionSimple(model.STORY_UID), model.USER_UID, m.Option(model.UID))
|
||||
m.Cmdy(s.PrefixMember(m), m.ActionKey(), arg, kit.Dict(msg.AppendSimple(model.UID)))
|
||||
}
|
||||
func (s care) SetScore(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(userStory{}, s.Select, m.OptionSimple(model.STORY_UID), model.USER_UID, m.Option(model.UID))
|
||||
m.Cmdy(s.PrefixMember(m), m.ActionKey(), arg, kit.Dict(msg.AppendSimple(model.UID)))
|
||||
}
|
||||
func (s care) List(m *ice.Message, arg ...string) {
|
||||
isLeader := s.IsLeader(m)
|
||||
if s.Fields(m, model.USER_UID, model.INFO).Limit(m, 300); isLeader {
|
||||
if s.Fields(m, model.USER_UID, model.INFO, model.SCORE).Limit(m, 300); isLeader {
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0])
|
||||
} else {
|
||||
@ -54,11 +58,14 @@ 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 isLeader || value[model.USER_UID] == m.Option(ice.MSG_USERUID) {
|
||||
m.PushButton(s.SetInfo)
|
||||
} else {
|
||||
m.PushButton()
|
||||
button := []ice.Any{}
|
||||
if isLeader {
|
||||
button = append(button, s.SetScore)
|
||||
}
|
||||
if isLeader || value[model.USER_UID] == m.Option(ice.MSG_USERUID) {
|
||||
button = append(button, s.SetInfo)
|
||||
}
|
||||
m.PushButton(button...)
|
||||
})
|
||||
if m.Action().Display(""); m.FieldsIsDetail() {
|
||||
s.OtherListCmd(m, s.IssueList, s.DesignList, s.DealList)
|
||||
|
@ -3,6 +3,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.user_name,
|
||||
can.onimport.unitView(can, value, "已支付", "元"),
|
||||
can.onimport.unitView(can, value, "score", "星"),
|
||||
can.onimport.unitView(can, value, "一星", "个"),
|
||||
can.onimport.unitView(can, value, "五星", "个"),
|
||||
can.onimport.titleAction(can, value),
|
||||
|
@ -28,7 +28,6 @@ func (s Date) Inputs(m *ice.Message, arg ...string) {
|
||||
case MeetCheck:
|
||||
s.Fields(m, model.ISSUE_UID, model.TITLE, model.USER_UID).Limit(m, 300)
|
||||
m.Cmdy(Design{}, s.Select, args, model.STATUS, IssueSubmit)
|
||||
m.RenameAppend(model.ISSUE_UID, arg[0])
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
return
|
||||
case MeetPlan:
|
||||
|
@ -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*" role:"worker"`
|
||||
modify string `name:"modify title* design_content* price* link" role:"worker"`
|
||||
}
|
||||
|
||||
func (s Design) Create(m *ice.Message, arg ...string) {
|
||||
|
@ -13,7 +13,7 @@ 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*" role:"worker"`
|
||||
modify string `name:"modify title* issue_content* price* link" 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:select path:select begin_time:select@date end_time:select@date" role:"leader"`
|
||||
bindPlan string `name:"bindPlan plan_uid*:select"`
|
||||
|
@ -106,8 +106,7 @@
|
||||
"solution": "方案型",
|
||||
"style": {
|
||||
"func": "danger",
|
||||
"matrix": "danger",
|
||||
"solution": "danger"
|
||||
"matrix": "danger"
|
||||
}
|
||||
},
|
||||
"plan_status": {
|
||||
|
@ -26,9 +26,10 @@ func (s take) List(m *ice.Message, arg ...string) {
|
||||
}
|
||||
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.STATUS, t)
|
||||
m.Push(model.UID, val[model.UID])
|
||||
m.Push(model.TITLE, val[model.TITLE])
|
||||
m.Push(model.SCORE, val[model.SCORE])
|
||||
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])
|
||||
@ -95,16 +96,16 @@ func (s take) List(m *ice.Message, arg ...string) {
|
||||
})
|
||||
}
|
||||
})
|
||||
m.Display("").DisplayCSS("").Sort(kit.Fields(model.TYPE, model.UPDATED_AT), []string{
|
||||
m.Display("").DisplayCSS("").Sort(kit.Fields(model.STATUS, model.SCORE, model.UPDATED_AT), []string{
|
||||
"PM可接单", "UI可接单", "PM优秀项目", "UI优秀项目",
|
||||
"PM待审批", "PM待提交", "PM待验收",
|
||||
"UI待审批", "UI待提交", "UI待验收",
|
||||
"RD可接单", "RD可编程", "QA可测试",
|
||||
}, ice.STR_R)
|
||||
}, ice.INT_R, ice.STR_R)
|
||||
}
|
||||
func (s take) Info(m *ice.Message, arg ...string) {
|
||||
var target ice.Any
|
||||
switch m.Option(model.TYPE) {
|
||||
switch m.Option(model.STATUS) {
|
||||
case "PM可接单", "RD可接单":
|
||||
target = Plan{}
|
||||
case "UI可接单", "PM优秀项目", "PM待审批", "PM待提交", "PM待验收":
|
||||
|
@ -1,11 +1,14 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
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)]},
|
||||
can.onimport.myViewTabs(can, STATUS, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.story_name, value.title,
|
||||
can.onimport.unitView(can, value, "score", "星"),
|
||||
can.onimport.textView(can, value, STATUS),
|
||||
]},
|
||||
{view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), value.user_name]},
|
||||
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) {
|
||||
switch (value.status) {
|
||||
case "PM可接单":
|
||||
case "RD可接单": index = "web.team.production.plan"; break
|
||||
case "UI优秀项目":
|
||||
|
Loading…
x
Reference in New Issue
Block a user