mirror of
https://shylinux.com/x/operation
synced 2025-07-01 13:14:43 +08:00
add some
This commit is contained in:
parent
10279183a2
commit
44dfa01275
@ -9,27 +9,25 @@ import (
|
|||||||
type care struct {
|
type care struct {
|
||||||
Tables
|
Tables
|
||||||
order string `data:"6"`
|
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) {
|
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))
|
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.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) {
|
func (s care) List(m *ice.Message, arg ...string) {
|
||||||
s.Limit(m, 300)
|
s.Limit(m, 300)
|
||||||
user_uid, isLeader := m.Option(model.USER_UID), s.IsLeader(m)
|
isLeader := s.IsLeader(m)
|
||||||
if s.Fields(m, model.USER_UID, model.INFO); s.IsLeader(m) {
|
if s.Fields(m, model.USER_UID, model.INFO); isLeader {
|
||||||
if len(arg) == 1 {
|
if len(arg) == 1 {
|
||||||
m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0])
|
m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0])
|
||||||
} else {
|
} else {
|
||||||
m.FieldsSetDetail()
|
m.FieldsSetDetail().Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, arg[1])
|
||||||
m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, arg[1])
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m.FieldsSetDetail()
|
m.FieldsSetDetail().Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, m.Option(model.USER_UID))
|
||||||
m.Cmdy(userStory{}, s.Select, model.STORY_UID, arg[0], model.USER_UID, m.Option(model.USER_UID))
|
|
||||||
}
|
}
|
||||||
m.Table(func(value ice.Maps) {
|
m.Table(func(value ice.Maps) {
|
||||||
var stats = map[string]string{}
|
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{}, 1)+check(Design{}, 1))
|
||||||
m.Push("五星", check(Issue{}, 5)+check(Design{}, 5))
|
m.Push("五星", check(Issue{}, 5)+check(Design{}, 5))
|
||||||
m.Push(model.UID, value[model.USER_UID])
|
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)
|
m.PushButton(s.SetInfo)
|
||||||
} else {
|
} else {
|
||||||
m.PushButton()
|
m.PushButton()
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [
|
{view: html.TITLE, list: [value.user_name,
|
||||||
value.user_name,
|
|
||||||
can.onimport.unitView(can, value, "已支付", "元"),
|
can.onimport.unitView(can, value, "已支付", "元"),
|
||||||
can.onimport.unitView(can, value, "一星", "个"),
|
can.onimport.unitView(can, value, "一星", "个"),
|
||||||
|
can.onimport.unitView(can, value, "五星", "个"),
|
||||||
can.onimport.titleAction(can, value),
|
can.onimport.titleAction(can, value),
|
||||||
]},
|
]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [
|
||||||
@ -15,9 +15,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.onimport.unitView(can, value, "界面已完成", "个"),
|
can.onimport.unitView(can, value, "界面已完成", "个"),
|
||||||
can.onimport.unitView(can, value, "界面设计中", "个"),
|
can.onimport.unitView(can, value, "界面设计中", "个"),
|
||||||
]},
|
]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [value.info]},
|
||||||
value.info
|
|
||||||
]},
|
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
})
|
})
|
@ -27,18 +27,16 @@ func (s Case) Remove(m *ice.Message, arg ...string) {
|
|||||||
s.taskCount(m)
|
s.taskCount(m)
|
||||||
}
|
}
|
||||||
func (s Case) List(m *ice.Message, arg ...string) {
|
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.Orders(m, model.STATUS, s.Desc(model.CREATED_AT))
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg)
|
||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
s.StatusCount(m, arg...)
|
|
||||||
m.Table(func(value ice.Maps) {
|
m.Table(func(value ice.Maps) {
|
||||||
if value[web.SPACE] == "" {
|
if value[web.SPACE] == "" {
|
||||||
s.PushTaskButton(m, value, user_uid)
|
s.PushTaskButton(m, value)
|
||||||
} else {
|
} 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) {
|
func (s Case) Process(m *ice.Message, arg ...string) {
|
||||||
s.changeStatus(m, IssueCreate, IssueProcess)
|
s.changeStatus(m, IssueCreate, IssueProcess)
|
||||||
|
@ -3,11 +3,10 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "case_status")]},
|
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "case_status")]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [
|
||||||
// can.onimport.beginTime(can, value),
|
|
||||||
(value.process_time||value.begin_time).split(" ")[0],
|
(value.process_time||value.begin_time).split(" ")[0],
|
||||||
can.onimport.unitView(can, value, "plan_title"),
|
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),
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
})
|
})
|
@ -22,23 +22,28 @@ type Table struct {
|
|||||||
reject string `name:"reject" role:"leader"`
|
reject string `name:"reject" role:"leader"`
|
||||||
approve string `name:"approve" role:"leader"`
|
approve string `name:"approve" role:"leader"`
|
||||||
process string `name:"process" role:"worker"`
|
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"`
|
finish string `name:"finish" role:"leader"`
|
||||||
reback string `name:"reback" role:"leader"`
|
reback string `name:"reback" role:"leader"`
|
||||||
cancel string `name:"cancel" role:"leader"`
|
cancel string `name:"cancel" role:"leader"`
|
||||||
trash string `name:"trash" 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"`
|
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"`
|
issueList string `name:"issueList" role:"worker"`
|
||||||
designList string `name:"designList" role:"worker"`
|
designList string `name:"designList" role:"worker"`
|
||||||
taskList string `name:"taskList" role:"worker"`
|
taskList string `name:"taskList" role:"worker"`
|
||||||
caseList string `name:"caseList" role:"worker"`
|
caseList string `name:"caseList" role:"worker"`
|
||||||
|
fileList string `name:"fileList" role:"worker"`
|
||||||
meetList string `name:"meetList" role:"worker"`
|
meetList string `name:"meetList" role:"worker"`
|
||||||
dealList string `name:"dealList" 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) {
|
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...)
|
s.InputsListRole(m, UserStoryRoleList, arg...)
|
||||||
case model.STORY_TYPE:
|
case model.STORY_TYPE:
|
||||||
s.InputsList(m, StoryTypeList, arg...)
|
s.InputsList(m, StoryTypeList, arg...)
|
||||||
case model.PLAN_TYPE:
|
|
||||||
s.InputsList(m, PlanTypeList, arg...)
|
|
||||||
case model.PLAN_UID:
|
case model.PLAN_UID:
|
||||||
s.InputsUID(m, arg, Plan{}, m.OptionSimple(model.STORY_UID)...)
|
s.InputsUID(m, arg, Plan{}, m.OptionSimple(model.STORY_UID)...)
|
||||||
|
case model.PLAN_TYPE:
|
||||||
|
s.InputsList(m, PlanTypeList, arg...)
|
||||||
case model.ISSUE_UID:
|
case model.ISSUE_UID:
|
||||||
s.InputsUID(m, arg, Issue{}, m.OptionSimple(model.STORY_UID)...)
|
s.InputsUID(m, arg, Issue{}, m.OptionSimple(model.STORY_UID)...)
|
||||||
case model.ISSUE_TYPE:
|
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)...)
|
s.InputsUID(m, arg, Task{}, m.OptionSimple(model.STORY_UID)...)
|
||||||
case model.MEET_TYPE:
|
case model.MEET_TYPE:
|
||||||
s.InputsList(m, MeetTypeList, arg...)
|
s.InputsList(m, MeetTypeList, arg...)
|
||||||
|
case model.FILE_TYPE:
|
||||||
|
s.InputsList(m, FileTypeList, arg...)
|
||||||
case model.LEVEL:
|
case model.LEVEL:
|
||||||
s.InputsList(m, LevelList, arg...)
|
s.InputsList(m, LevelList, arg...)
|
||||||
case nfs.PATH:
|
case nfs.PATH:
|
||||||
@ -107,6 +114,10 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
value = IssueStatus(kit.Int(value)).String()
|
value = IssueStatus(kit.Int(value)).String()
|
||||||
case model.MEET_TYPE:
|
case model.MEET_TYPE:
|
||||||
value = MeetType(kit.Int(value)).String()
|
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:
|
case model.LEVEL:
|
||||||
value = Level(kit.Int(value)).String()
|
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)
|
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{}
|
||||||
// button := []ice.Any{s.Remove}
|
|
||||||
if value[model.PLAN_TITLE] == "" {
|
|
||||||
button = append(button, s.BindPlan)
|
|
||||||
}
|
|
||||||
defer func() { m.PushButton(button...) }()
|
defer func() { m.PushButton(button...) }()
|
||||||
isCreator, isLeader, isWorker := s.IsCreator(m), s.IsLeader(m), s.IsWorker(m)
|
isCreator, isLeader, isWorker := s.IsCreator(m), s.IsLeader(m), s.IsWorker(m)
|
||||||
isLeaderApproved := isCreator || (isLeader && m.Option("leader_approved") == "on")
|
isLeaderApproved := isCreator || (isLeader && m.Option("leader_approved") == "on")
|
||||||
isLeaderFinish := isCreator || (isLeader && m.Option("leader_finish") == "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])) {
|
switch IssueStatus(kit.Int(value[model.STATUS])) {
|
||||||
case IssueCreate:
|
case IssueCreate:
|
||||||
if isCreator {
|
|
||||||
button = append(button, s.Payfor)
|
|
||||||
}
|
|
||||||
if isLeaderApproved {
|
if isLeaderApproved {
|
||||||
button = append(button, s.Approve)
|
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)
|
button = append(button, s.Process)
|
||||||
}
|
}
|
||||||
case IssueProcess:
|
case IssueProcess:
|
||||||
if isCreator {
|
|
||||||
button = append(button, s.Payfor)
|
|
||||||
}
|
|
||||||
if user_uid == value[model.USER_UID] {
|
if user_uid == value[model.USER_UID] {
|
||||||
button = append(button, s.Submit)
|
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...)
|
button = append(button, arg...)
|
||||||
}
|
}
|
||||||
case IssueSubmit:
|
case IssueSubmit:
|
||||||
if isCreator {
|
|
||||||
button = append(button, s.Payfor)
|
|
||||||
}
|
|
||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, s.Preview)
|
button = append(button, s.Preview)
|
||||||
}
|
}
|
||||||
|
if isWorker {
|
||||||
|
button = append(button, s.FileCreate)
|
||||||
|
}
|
||||||
|
if isWorker {
|
||||||
|
button = append(button, arg...)
|
||||||
|
}
|
||||||
if isLeaderFinish {
|
if isLeaderFinish {
|
||||||
button = append(button, s.Finish, s.Reback, s.Cancel)
|
button = append(button, s.Finish, s.Reback, s.Cancel)
|
||||||
}
|
}
|
||||||
if isWorker {
|
|
||||||
button = append(button, arg...)
|
|
||||||
}
|
|
||||||
case IssueFinish:
|
case IssueFinish:
|
||||||
if PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish {
|
|
||||||
if isCreator {
|
|
||||||
button = append(button, s.Payfor)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, s.Preview)
|
button = append(button, s.Preview)
|
||||||
}
|
}
|
||||||
if isCreator && value[model.SCORE] == "0" {
|
if isLeader {
|
||||||
button = append(button, s.SetScore)
|
button = append(button, s.FileCreate)
|
||||||
}
|
}
|
||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, arg...)
|
button = append(button, arg...)
|
||||||
}
|
}
|
||||||
kit.If(m.FieldsIsDetail(), func() { s.DoneMessage(m) })
|
if isLeaderPayfor && value[model.SCORE] == "0" {
|
||||||
case IssueCancel:
|
|
||||||
if isCreator && value[model.SCORE] == "0" {
|
|
||||||
button = append(button, s.SetScore)
|
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 {
|
if isLeaderApproved {
|
||||||
button = append(button, s.Trash)
|
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{}
|
button := []ice.Any{}
|
||||||
defer func() { m.PushButton(button...) }()
|
defer func() { m.PushButton(button...) }()
|
||||||
isWorker := s.IsWorker(m)
|
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) {
|
func (s Table) UserInfo(m *ice.Message, arg ...string) {
|
||||||
m.ProcessField(care{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
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))
|
s.ChangeStatus(m, int(IssueSubmit), int(IssueCancel))
|
||||||
}
|
}
|
||||||
func (s Table) Trash(m *ice.Message, arg ...string) {
|
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) {
|
func (s Table) Program(m *ice.Message, arg ...string) {
|
||||||
p := path.Base(m.Option(nfs.PATH))
|
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")))
|
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) {
|
func (s Table) Discuss(m *ice.Message, arg ...string) {
|
||||||
m.ProcessOpen(m.OptionDefault(model.LINK, web.S(m.Option(web.SPACE))+web.C(m.Option(ctx.INDEX))))
|
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) {
|
func (s Table) Payfor(m *ice.Message, arg ...string) {
|
||||||
s.issueOtherCreate(m, Deal{}, arg...)
|
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) {
|
func (s Issue) Payfor(m *ice.Message, arg ...string) {
|
||||||
s.commonOtherCreate(m, Deal{}, arg...)
|
s.commonOtherCreate(m, Deal{}, arg...)
|
||||||
}
|
}
|
||||||
func (s Table) Discuss(m *ice.Message, arg ...string) {
|
func (s Table) Upload(m *ice.Message, arg ...string) {
|
||||||
s.issueOtherCreate(m, Meet{}, arg...)
|
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) {
|
func (s Table) FileCreate(m *ice.Message, arg ...string) {
|
||||||
s.commonOtherCreate(m, Meet{}, arg...)
|
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) {
|
func (s Table) issueOtherCreate(m *ice.Message, target ice.Any, arg ...string) {
|
||||||
s.OtherCreate(m, target, kit.Simple(m.OptionSimple(model.ISSUE_UID), arg)...)
|
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) {
|
func (s Table) IssueList(m *ice.Message, arg ...string) {
|
||||||
s.commonOtherList(m, Issue{})
|
s.commonOtherList(m, Issue{})
|
||||||
s.otherListButton(m)
|
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)
|
s.commonOtherList(m, Case{}).RenameAppend(model.STATUS, model.CASE_STATUS)
|
||||||
m.PushAction(s.Preview)
|
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) {
|
func (s Table) MeetList(m *ice.Message, arg ...string) {
|
||||||
s.commonOtherList(m, Meet{})
|
s.commonOtherList(m, Meet{})
|
||||||
m.PushAction(s.Preview)
|
m.PushAction(s.Preview)
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
type Date struct {
|
type Date struct {
|
||||||
Tables
|
Tables
|
||||||
order string `data:"9"`
|
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) {
|
func (s Date) Discuss(m *ice.Message, arg ...string) {
|
||||||
|
@ -16,7 +16,8 @@ type Deal struct {
|
|||||||
|
|
||||||
func (s Deal) Create(m *ice.Message, arg ...string) {
|
func (s Deal) Create(m *ice.Message, arg ...string) {
|
||||||
s.ValueCreate(m, arg...)
|
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) {
|
func (s Deal) List(m *ice.Message, arg ...string) {
|
||||||
if s.IsLeader(m) {
|
if s.IsLeader(m) {
|
||||||
@ -25,7 +26,7 @@ func (s Deal) List(m *ice.Message, arg ...string) {
|
|||||||
} else {
|
} else {
|
||||||
if len(arg) == 1 {
|
if len(arg) == 1 {
|
||||||
s.Select(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID)).PushAction().Action()
|
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 {
|
} 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.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)
|
s.DoneMessage(m)
|
||||||
@ -36,7 +37,7 @@ func (s Deal) List(m *ice.Message, arg ...string) {
|
|||||||
} else {
|
} else {
|
||||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
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{}) }
|
func init() { ice.TeamCtxCmd(Deal{}) }
|
||||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, can.onimport.moneyView(can, value)]},
|
{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]},
|
{view: html.OUTPUT, list: [value.content]},
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
|
@ -10,9 +10,9 @@ import (
|
|||||||
type Design struct {
|
type Design struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"3"`
|
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"`
|
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* content* price*=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
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* content* price* link 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) {
|
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)
|
s.issueCount(m)
|
||||||
}
|
}
|
||||||
func (s Design) List(m *ice.Message, arg ...string) {
|
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.Orders(m, model.STATUS, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg)
|
||||||
s.SelectJoinPlan(m)
|
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) })
|
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{}) }
|
func init() { ice.TeamCtxCmd(Design{}) }
|
||||||
|
@ -2,15 +2,16 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myViewTabs(can, "status", msg, function(value) { return [
|
can.onimport.myViewTabs(can, "status", msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title,
|
{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", "星"),
|
value.score != "3" && can.onimport.unitView(can, value, "score", "星"),
|
||||||
can.onimport.textView(can, value, "status"),
|
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.timeView(can, value),
|
||||||
can.onimport.unitView(can, value, "plan_title"),
|
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.design_content]}, can.onimport.titleAction(can, value),
|
||||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
})
|
})
|
58
src/production/file.go
Normal file
58
src/production/file.go
Normal file
@ -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] }
|
10
src/production/file.js
Normal file
10
src/production/file.js
Normal file
@ -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]},
|
||||||
|
] })
|
||||||
|
},
|
||||||
|
})
|
@ -10,10 +10,10 @@ import (
|
|||||||
type Issue struct {
|
type Issue struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"2"`
|
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"`
|
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* content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
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* content* price* link 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* content* price=1000 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"`
|
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"`
|
bindPlan string `name:"bindPlan plan_uid*:select"`
|
||||||
}
|
}
|
||||||
@ -44,27 +44,27 @@ func (s Issue) List(m *ice.Message, arg ...string) {
|
|||||||
s.ApplyCheck(m, arg...)
|
s.ApplyCheck(m, arg...)
|
||||||
return
|
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.Orders(m, model.STATUS, model.DESIGN_COUNT, model.TASK_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg)
|
||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
s.SettingSelect(m)
|
s.SettingSelect(m)
|
||||||
m.Table(func(value ice.Maps) {
|
m.Table(func(value ice.Maps) {
|
||||||
button := []ice.Any{}
|
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)
|
button = append(button, s.DesignCreate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if isCreator {
|
if isCreator {
|
||||||
button = append(button, s.TaskCreate)
|
button = append(button, s.TaskCreate)
|
||||||
}
|
}
|
||||||
s.PushIssueButton(m, value, user_uid, button...)
|
s.PushIssueButton(m, value, button...)
|
||||||
}).Display("")
|
}).Display("")
|
||||||
kit.If(len(arg) == 1, func() {
|
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,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) 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...) }
|
func (s Issue) TaskCreate(m *ice.Message, arg ...string) { s.commonOtherCreate(m, Task{}, arg...) }
|
||||||
|
@ -4,18 +4,18 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
{view: html.TITLE, list: [value.title,
|
{view: html.TITLE, list: [value.title,
|
||||||
// value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"),
|
// value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"),
|
||||||
// value.level != "level-3" && can.onimport.textView(can, value, "level"),
|
// 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", "星"),
|
value.score != "3" && can.onimport.unitView(can, value, "score", "星"),
|
||||||
can.onimport.textView(can, value, "status"),
|
can.onimport.textView(can, value, "status"),
|
||||||
]},
|
]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [
|
||||||
value.uid.slice(0, 6),
|
can.onimport.uidView(can, value),
|
||||||
can.onimport.timeView(can, value),
|
can.onimport.timeView(can, value),
|
||||||
can.onimport.unitView(can, value, "plan_title"),
|
can.onimport.unitView(can, value, "plan_title"),
|
||||||
can.onimport.unitView(can, value, "design_count", "个"),
|
can.onimport.unitView(can, value, "design_count", "个"),
|
||||||
can.onimport.unitView(can, value, "task_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.issue_content]}, can.onimport.titleAction(can, value),
|
||||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
})
|
})
|
@ -12,8 +12,8 @@ import (
|
|||||||
type Meet struct {
|
type Meet struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"10"`
|
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"`
|
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* meet_type* title* content* link* date time" role:"leader"`
|
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"`
|
remove string `name:"remove" role:"leader"`
|
||||||
preview string `name:"preview" help:"入会" role:"worker"`
|
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)
|
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.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))
|
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.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))
|
s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID))
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}
|
}
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, value.meet_type, can.onimport.titleAction(can, value)]},
|
{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]},
|
{view: html.OUTPUT, list: [value.content]},
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
|
@ -8,12 +8,13 @@ const (
|
|||||||
INFO = "info"
|
INFO = "info"
|
||||||
LINK = "link"
|
LINK = "link"
|
||||||
TYPE = "type"
|
TYPE = "type"
|
||||||
|
SIZE = "size"
|
||||||
ROLE = "role"
|
ROLE = "role"
|
||||||
LEVEL = "level"
|
LEVEL = "level"
|
||||||
STATUS = "status"
|
STATUS = "status"
|
||||||
COUNT = "count"
|
|
||||||
PRICE = "price"
|
PRICE = "price"
|
||||||
SCORE = "score"
|
SCORE = "score"
|
||||||
|
COUNT = "count"
|
||||||
TITLE = "title"
|
TITLE = "title"
|
||||||
CONTENT = "content"
|
CONTENT = "content"
|
||||||
VERSION = "version"
|
VERSION = "version"
|
||||||
@ -30,12 +31,14 @@ const (
|
|||||||
PLAN_TYPE = "plan_type"
|
PLAN_TYPE = "plan_type"
|
||||||
PLAN_UID = "plan_uid"
|
PLAN_UID = "plan_uid"
|
||||||
PLAN_STATUS = "plan_status"
|
PLAN_STATUS = "plan_status"
|
||||||
DESIGN_STATUS = "design_status"
|
|
||||||
DESIGN_COUNT = "design_count"
|
|
||||||
ISSUE_UID = "issue_uid"
|
ISSUE_UID = "issue_uid"
|
||||||
ISSUE_TYPE = "issue_type"
|
ISSUE_TYPE = "issue_type"
|
||||||
|
ISSUE_CONTENT = "issue_content"
|
||||||
ISSUE_STATUS = "issue_status"
|
ISSUE_STATUS = "issue_status"
|
||||||
ISSUE_COUNT = "issue_count"
|
ISSUE_COUNT = "issue_count"
|
||||||
|
DESIGN_CONTENT = "design_content"
|
||||||
|
DESIGN_STATUS = "design_status"
|
||||||
|
DESIGN_COUNT = "design_count"
|
||||||
TASK_UID = "task_uid"
|
TASK_UID = "task_uid"
|
||||||
TASK_STATUS = "task_status"
|
TASK_STATUS = "task_status"
|
||||||
TASK_COUNT = "task_count"
|
TASK_COUNT = "task_count"
|
||||||
@ -43,6 +46,11 @@ const (
|
|||||||
CASE_STATUS = "case_status"
|
CASE_STATUS = "case_status"
|
||||||
CASE_COUNT = "case_count"
|
CASE_COUNT = "case_count"
|
||||||
MEET_TYPE = "meet_type"
|
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"
|
MARKET_UID = "market_uid"
|
||||||
CREATED_AT = "created_at"
|
CREATED_AT = "created_at"
|
||||||
UPDATED_AT = "updated_at"
|
UPDATED_AT = "updated_at"
|
||||||
@ -122,9 +130,20 @@ type Deal struct {
|
|||||||
ToUserUID string `gorm:"type:char(32);index"`
|
ToUserUID string `gorm:"type:char(32);index"`
|
||||||
Price int `gorm:"default:0"`
|
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() {
|
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 {
|
type Common struct {
|
||||||
|
@ -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.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 span.type { margin-left:auto; }
|
@ -15,8 +15,8 @@ type Plan struct {
|
|||||||
modify string `name:"modify title* content version begin_time*:select@date end_time*:select@date" role:"leader"`
|
modify string `name:"modify title* content version begin_time*:select@date end_time*:select@date" role:"leader"`
|
||||||
remove string `name:"remove" role:"leader"`
|
remove string `name:"remove" role:"leader"`
|
||||||
process string `name:"process" 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"`
|
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) {
|
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)
|
button = append(button, s.SetType)
|
||||||
}
|
}
|
||||||
}).Display("").DisplayCSS("")
|
}).Display("").DisplayCSS("")
|
||||||
s.OtherListCmd(m, s.IssueList, s.DesignList, s.TaskList, s.CaseList, s.MeetList, s.DealList)
|
s.OtherListCmd(m, s.IssueList, s.DesignList, s.TaskList, s.CaseList)
|
||||||
}
|
|
||||||
func (s Plan) SetType(m *ice.Message, arg ...string) {
|
|
||||||
s.Modify(m, m.OptionSimple(model.PLAN_TYPE)...)
|
|
||||||
}
|
}
|
||||||
func (s Plan) Process(m *ice.Message, arg ...string) {
|
func (s Plan) Process(m *ice.Message, arg ...string) {
|
||||||
s.changeStatus(m, PlanCreate, PlanProcess)
|
s.changeStatus(m, PlanCreate, PlanProcess)
|
||||||
@ -76,6 +73,9 @@ func (s Plan) Finish(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
s.changeStatus(m, PlanProcess, PlanFinish)
|
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 (s Plan) IssueCreate(m *ice.Message, arg ...string) { s.commonOtherCreate(m, Issue{}, arg...) }
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Plan{}) }
|
func init() { ice.TeamCtxCmd(Plan{}) }
|
||||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myViewTabs(can, "plan_status", msg, function(value) { return [
|
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.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),
|
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||||
] })
|
] })
|
||||||
},
|
},
|
||||||
|
@ -17,6 +17,7 @@ func (s Plan) AfterMigrate(m *ice.Message, arg ...string) {
|
|||||||
s.Table.AfterMigrate(m, arg...)
|
s.Table.AfterMigrate(m, arg...)
|
||||||
s.SettingCreate(m, "leader_approved", "radio", "help", "允许管理人员审批项目", "scope", "place")
|
s.SettingCreate(m, "leader_approved", "radio", "help", "允许管理人员审批项目", "scope", "place")
|
||||||
s.SettingCreate(m, "leader_finish", "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) {
|
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
|
||||||
defer s.DashboardCreate(m, "")()
|
defer s.DashboardCreate(m, "")()
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
{
|
{
|
||||||
"portal": "产品迭代", "member": "项目成员",
|
"portal": "产品迭代", "member": "项目成员",
|
||||||
"plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例",
|
"plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例", "file": "文件附件",
|
||||||
"care": "新人帮助", "take": "项目接单", "stat": "项目统计", "date": "会议预约", "meet": "会议安排", "deal": "支付记录",
|
"care": "新人帮助", "take": "项目接单", "stat": "项目统计", "date": "会议预约", "meet": "会议安排", "deal": "支付记录",
|
||||||
"process": "开始", "submit": "提交", "reback": "返工", "finish": "完成",
|
"process": "开始", "submit": "提交", "reback": "返工", "finish": "完成",
|
||||||
"issueCreate": "原型设计", "designCreate": "界面设计", "taskCreate": "开发任务", "caseCreate": "测试用例",
|
"issueCreate": "原型设计", "designCreate": "界面设计", "taskCreate": "开发任务", "caseCreate": "测试用例",
|
||||||
"issueList": "原型设计", "designList": "界面设计", "taskList": "开发任务", "caseList": "测试用例",
|
"issueList": "原型设计", "designList": "界面设计", "taskList": "开发任务", "caseList": "测试用例",
|
||||||
"discuss": "约会", "payfor": "支付", "program": "编程", "bindPlan": "绑定计划",
|
"program": "编程", "discuss": "约会", "payfor": "支付", "setType": "设置类型", "bindPlan": "绑定计划",
|
||||||
"meetList": "会议安排", "dealList": "支付记录",
|
"planList": "迭代计划", "fileList": "附件列表", "meetList": "会议安排", "dealList": "支付记录",
|
||||||
"setType": "设置类型",
|
|
||||||
"style": {
|
"style": {
|
||||||
"discuss": "notice",
|
|
||||||
"payfor": "notice",
|
|
||||||
"preview": "notice",
|
"preview": "notice",
|
||||||
"program": "notice",
|
"program": "notice",
|
||||||
|
"discuss": "notice",
|
||||||
|
"setScore": "notice",
|
||||||
|
"payfor": "notice",
|
||||||
"process": "notice",
|
"process": "notice",
|
||||||
"submit": "notice",
|
"submit": "notice",
|
||||||
"reback": "danger",
|
"reback": "danger",
|
||||||
"finish": "notice",
|
"finish": "notice",
|
||||||
"setScore": "notice",
|
|
||||||
"issueCreate": "notice",
|
"issueCreate": "notice",
|
||||||
"designCreate": "notice",
|
"designCreate": "notice",
|
||||||
"taskCreate": "notice",
|
"taskCreate": "notice",
|
||||||
@ -29,6 +28,7 @@
|
|||||||
"design": "design.png",
|
"design": "design.png",
|
||||||
"task": "task.png",
|
"task": "task.png",
|
||||||
"case": "case.png",
|
"case": "case.png",
|
||||||
|
"file": "meet.png",
|
||||||
"care": "meet.png",
|
"care": "meet.png",
|
||||||
"take": "meet.png",
|
"take": "meet.png",
|
||||||
"stat": "meet.png",
|
"stat": "meet.png",
|
||||||
@ -43,13 +43,15 @@
|
|||||||
"story_name": "产品名称",
|
"story_name": "产品名称",
|
||||||
"story_type": "产品类型",
|
"story_type": "产品类型",
|
||||||
"plan_uid": "产品计划",
|
"plan_uid": "产品计划",
|
||||||
"plan_type": "产品类型",
|
|
||||||
"plan_title": "产品计划",
|
"plan_title": "产品计划",
|
||||||
|
"plan_type": "产品类型",
|
||||||
"plan_status": "计划状态",
|
"plan_status": "计划状态",
|
||||||
"issue_uid": "产品需求",
|
"issue_uid": "产品需求",
|
||||||
|
"issue_content": "功能清单",
|
||||||
"issue_type": "需求类型",
|
"issue_type": "需求类型",
|
||||||
"issue_status": "需求状态",
|
"issue_status": "需求状态",
|
||||||
"issue_count": "需求数量",
|
"issue_count": "需求数量",
|
||||||
|
"design_content": "功能清单",
|
||||||
"design_status": "设计状态",
|
"design_status": "设计状态",
|
||||||
"design_count": "设计数量",
|
"design_count": "设计数量",
|
||||||
"task_uid": "开发任务",
|
"task_uid": "开发任务",
|
||||||
@ -58,12 +60,17 @@
|
|||||||
"case_status": "用例状态",
|
"case_status": "用例状态",
|
||||||
"case_count": "用例数量",
|
"case_count": "用例数量",
|
||||||
"meet_type": "会议类型",
|
"meet_type": "会议类型",
|
||||||
|
"meet_link": "会议链接",
|
||||||
|
"file_type": "文件类型",
|
||||||
|
"file_link": "文件链接",
|
||||||
|
"file_name": "文件名称",
|
||||||
|
"file_size": "文件大小",
|
||||||
"from_user_uid": "付款人",
|
"from_user_uid": "付款人",
|
||||||
"to_user_uid": "收款人",
|
"to_user_uid": "收款人",
|
||||||
"process_time": "开始时间",
|
"process_time": "开始时间",
|
||||||
"finish_time": "完成时间",
|
"finish_time": "完成时间",
|
||||||
"score": "评分",
|
|
||||||
"date": "日期",
|
"date": "日期",
|
||||||
|
"score": "评分",
|
||||||
"comment": "备注",
|
"comment": "备注",
|
||||||
"level": "优先级"
|
"level": "优先级"
|
||||||
},
|
},
|
||||||
@ -112,6 +119,16 @@
|
|||||||
"create": "danger"
|
"create": "danger"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"level": {
|
||||||
|
"level-1": "紧急",
|
||||||
|
"level-2": "优先",
|
||||||
|
"level-3": "普通",
|
||||||
|
"level-4": "稍后",
|
||||||
|
"level-5": "不急",
|
||||||
|
"style": {
|
||||||
|
"level-1": "danger"
|
||||||
|
}
|
||||||
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"create": "待评审",
|
"create": "待评审",
|
||||||
"rejected": "已驳回",
|
"rejected": "已驳回",
|
||||||
@ -143,16 +160,6 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"create": "danger"
|
"create": "danger"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"level": {
|
|
||||||
"level-1": "紧急",
|
|
||||||
"level-2": "优先",
|
|
||||||
"level-3": "普通",
|
|
||||||
"level-4": "稍后",
|
|
||||||
"level-5": "不急",
|
|
||||||
"style": {
|
|
||||||
"level-1": "danger"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -74,7 +74,7 @@ func (s Stat) List(m *ice.Message, arg ...string) {
|
|||||||
kit.For(stat, func(key string, value int) {
|
kit.For(stat, func(key string, value int) {
|
||||||
m.Push(key, kit.Select(kit.Format(value), "ContextOS 汇总数据", key == model.NAME))
|
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 {
|
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)))
|
msg := s.SelectJoinAuth(m.Cmd(target, s.Select, model.UID, m.Option(model.STORY_UID)))
|
||||||
|
@ -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{}) }
|
|
@ -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]},
|
|
||||||
] })
|
|
||||||
},
|
|
||||||
})
|
|
@ -20,14 +20,20 @@ func (s take) List(m *ice.Message, arg ...string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
push := func(val ice.Maps, t 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.TYPE, t)
|
||||||
m.Push(model.UID, val[model.UID])
|
m.Push(model.UID, val[model.UID])
|
||||||
m.Push(model.TITLE, val[model.TITLE])
|
m.Push(model.TITLE, val[model.TITLE])
|
||||||
m.Push(model.CONTENT, val[model.CONTENT])
|
m.Push(model.CONTENT, kit.Select(val[model.CONTENT], val[model.ISSUE_CONTENT], val[model.DESIGN_CONTENT]))
|
||||||
m.Push(model.USER_UID, val[model.USER_UID])
|
m.Push(model.LINK, val[model.LINK])
|
||||||
m.Push(model.STORY_UID, value[model.UID])
|
|
||||||
m.Push(model.STORY_NAME, value[model.NAME])
|
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) {
|
m.Cmd(Plan{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) {
|
||||||
switch PlanStatus(kit.Int(val[model.PLAN_STATUS])) {
|
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 {
|
if kit.Int(val[model.ISSUE_COUNT]) == 0 {
|
||||||
push(val, "PM可接单")
|
push(val, "PM可接单")
|
||||||
} else {
|
} 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) {
|
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) {
|
||||||
push(val, "UI可接单")
|
switch IssueStatus(kit.Int(val[model.STATUS])) {
|
||||||
|
case IssueProcess, IssueFinish:
|
||||||
|
push(val, "UI可接单")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
case PlanFinish:
|
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.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可接单", "UI可接单", "PM优秀项目", "UI优秀项目",
|
||||||
"PM待评审", "PM待提交", "PM待验收",
|
"PM待评审", "PM待提交", "PM待验收",
|
||||||
"UI待评审", "UI待提交", "UI待验收",
|
"UI待评审", "UI待提交", "UI待验收",
|
||||||
|
@ -27,16 +27,14 @@ func (s Task) Remove(m *ice.Message, arg ...string) {
|
|||||||
s.issueCount(m).DashboardUpdate(m)
|
s.issueCount(m).DashboardUpdate(m)
|
||||||
}
|
}
|
||||||
func (s Task) List(m *ice.Message, arg ...string) {
|
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.Orders(m, model.STATUS, model.CASE_COUNT, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg)
|
||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
// s.StatusCount(m, arg...)
|
|
||||||
m.Table(func(value ice.Maps) {
|
m.Table(func(value ice.Maps) {
|
||||||
if IssueStatus(kit.Int(value[model.STATUS])) == IssueFinish {
|
if IssueStatus(kit.Int(value[model.STATUS])) == IssueFinish {
|
||||||
s.PushTaskButton(m, value, user_uid, s.Program)
|
s.PushTaskButton(m, value, s.Program)
|
||||||
} else {
|
} 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("")
|
}).RenameAppend(model.STATUS, model.TASK_STATUS).Display("")
|
||||||
s.OtherListCmd(m, s.CaseList)
|
s.OtherListCmd(m, s.CaseList)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user