mirror of
https://shylinux.com/x/operation
synced 2025-07-02 05:31:20 +08:00
add some
This commit is contained in:
parent
4f044fee10
commit
93201d7992
@ -12,7 +12,7 @@ type Case struct {
|
|||||||
Table
|
Table
|
||||||
order string `data:"5"`
|
order string `data:"5"`
|
||||||
role string `data:"leader,worker"`
|
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,user_uid"`
|
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* title* content* space index begin_time:select@date end_time:select@date" role:"worker"`
|
create string `name:"create task_uid* title* content* space index begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
modify string `name:"modify title* content* space index begin_time*:select@date end_time*:select@date" role:"worker"`
|
modify string `name:"modify title* content* space index begin_time*:select@date end_time*:select@date" role:"worker"`
|
||||||
finish string `name:"finish" role:"worker"`
|
finish string `name:"finish" role:"worker"`
|
||||||
|
@ -1,18 +1,42 @@
|
|||||||
package production
|
package production
|
||||||
|
|
||||||
import "shylinux.com/x/ice"
|
import (
|
||||||
|
"shylinux.com/x/ice"
|
||||||
|
"shylinux.com/x/operation/src/production/model"
|
||||||
|
)
|
||||||
|
|
||||||
type coder struct {
|
type coder struct {
|
||||||
list string `name:"list path file line auto" help:"编辑器" role:"void"`
|
Tables
|
||||||
render string `name:"render" role:"void"`
|
list string `name:"list path file line auto" help:"编辑器" role:"void"`
|
||||||
repos string `name:"repos" role:"void"`
|
render string `name:"render" role:"void"`
|
||||||
|
repos string `name:"repos" role:"void"`
|
||||||
|
save string `name:"save" role:"void"`
|
||||||
|
compile string `name:"compile" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s coder) Render(m *ice.Message, arg ...string) { m.Cmdy("vimer", m.ActionKey(), arg) }
|
func (s coder) Render(m *ice.Message, arg ...string) { m.Cmdy("vimer", m.ActionKey(), arg) }
|
||||||
func (s coder) Repos(m *ice.Message, arg ...string) { m.Cmdy("vimer", m.ActionKey(), arg) }
|
func (s coder) Repos(m *ice.Message, arg ...string) { m.Cmdy("vimer", m.ActionKey(), arg) }
|
||||||
func (s coder) Save(m *ice.Message, arg ...string) {
|
func (s coder) Save(m *ice.Message, arg ...string) { s.cmd(m, arg...) }
|
||||||
m.Cmdy("vimer", m.ActionKey(), 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("vimer", arg) }
|
||||||
func (s coder) List(m *ice.Message, arg ...string) { m.Cmdy("vimer", arg) }
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(coder{}) }
|
func init() { ice.TeamCtxCmd(coder{}) }
|
||||||
|
|
||||||
|
func (s coder) cmd(m *ice.Message, arg ...string) {
|
||||||
|
if s.check(m) {
|
||||||
|
m.Cmdy("vimer", m.ActionKey(), arg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (s coder) check(m *ice.Message, arg ...string) bool {
|
||||||
|
s.SettingSelect(m.Options(model.PLACE_UID, m.Option(model.STORY_UID)))
|
||||||
|
msg := m.Cmd(userStory{}, s.Select, m.OptionSimple(model.STORY_UID, model.USER_UID))
|
||||||
|
msg.Info("what %v", m.FormatChain())
|
||||||
|
if m.Option("creator_program") == "on" && msg.Append("role") == "1" {
|
||||||
|
return true
|
||||||
|
} else if m.Option("leader_program") == "on" && msg.Append("role") == "2" {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
m.WarnNotRight(true)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -36,7 +36,7 @@ func init() { ice.TeamCtxCmd(Date{}) }
|
|||||||
|
|
||||||
func (s Date) head(m *ice.Message, arg ...string) {
|
func (s Date) head(m *ice.Message, arg ...string) {
|
||||||
head := []string{}
|
head := []string{}
|
||||||
for i := -kit.Int(m.OptionDefault("date_begin", kit.Select("0", "2", s.IsCreator(m)))); i < kit.Int(m.OptionDefault("date_end", "2")); i++ {
|
for i := -kit.Int(m.OptionDefault("date_begin", kit.Select("0", "2", !m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", "2")); i++ {
|
||||||
head = append(head, strings.Split(m.Time(kit.Format("%dh", i*24)), " ")[0])
|
head = append(head, strings.Split(m.Time(kit.Format("%dh", i*24)), " ")[0])
|
||||||
}
|
}
|
||||||
list := []string{}
|
list := []string{}
|
||||||
|
@ -13,7 +13,7 @@ type Design struct {
|
|||||||
role string `data:"leader,worker"`
|
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"`
|
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"`
|
create string `name:"create issue_uid*:select title* design_content* price*=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
modify string `name:"modify title* design_content* price* link begin_time*:select@date end_time*:select@date" role:"worker"`
|
modify string `name:"modify title* design_content* price* 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,11 +33,13 @@ func (s File) List(m *ice.Message, arg ...string) {
|
|||||||
m.Display("")
|
m.Display("")
|
||||||
s.OtherListCmd(m, s.IssueList, s.DesignList)
|
s.OtherListCmd(m, s.IssueList, s.DesignList)
|
||||||
}
|
}
|
||||||
func (s Table) Download(m *ice.Message, arg ...string) {}
|
func (s Table) Download(m *ice.Message, arg ...string) {
|
||||||
|
m.Cmdy(File{}, m.ActionKey(), arg)
|
||||||
|
}
|
||||||
func (s File) 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)...)
|
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,
|
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))))
|
mdb.NAME, m.Append(model.FILE_NAME), mdb.TEXT, kit.Path(m.Append(model.FILE_LINK)), kit.Dict(ice.MSG_USERROLE, aaa.TECH)))
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(File{}) }
|
func init() { ice.TeamCtxCmd(File{}) }
|
||||||
|
@ -12,7 +12,7 @@ type Issue struct {
|
|||||||
order string `data:"2"`
|
order string `data:"2"`
|
||||||
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"`
|
fields string `data:"updated_at,title,issue_content,issue_type,level,status,price,score,link,design_count,task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"`
|
||||||
create string `name:"create plan_uid*:select title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
create string `name:"create plan_uid*:select title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
modify string `name:"modify title* issue_content* price* link begin_time:select@date end_time:select@date" role:"worker"`
|
modify string `name:"modify title* issue_content* price* 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"`
|
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"`
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
type Plan struct {
|
type Plan struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"1"`
|
order string `data:"1"`
|
||||||
fields string `data:"updated_at,title,content,version,plan_type,plan_status,issue_count,begin_time,end_time,process_time,finish_time,user_uid"`
|
fields string `data:"updated_at,title,content,version,plan_type,plan_status,issue_count,begin_time,end_time,process_time,finish_time,story_uid,user_uid"`
|
||||||
create string `name:"create title* content version begin_time:select@date end_time:select@date" role:"leader"`
|
create string `name:"create 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"`
|
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"`
|
||||||
@ -20,7 +20,7 @@ type Plan struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s Plan) Create(m *ice.Message, arg ...string) {
|
func (s Plan) Create(m *ice.Message, arg ...string) {
|
||||||
m.Options(kit.ArgDef(arg, kit.Simple(model.VERSION, "v1.0", model.BEGIN_TIME, m.Time(), model.END_TIME, m.Time("168h"))...))
|
m.Options(kit.ArgDef(arg, kit.Simple(model.VERSION, "v1.0", model.BEGIN_TIME, m.Time(), model.END_TIME, m.Time("120h"))...))
|
||||||
s.Transaction(m, func() {
|
s.Transaction(m, func() {
|
||||||
if m.WarnNotValid(s.Select(m, m.OptionSimple(model.STORY_UID, model.TITLE, model.VERSION)...).Length() > 0, "项目已经存在") {
|
if m.WarnNotValid(s.Select(m, m.OptionSimple(model.STORY_UID, model.TITLE, model.VERSION)...).Length() > 0, "项目已经存在") {
|
||||||
return
|
return
|
||||||
|
@ -15,9 +15,11 @@ type Portal struct {
|
|||||||
|
|
||||||
func (s Plan) AfterMigrate(m *ice.Message, arg ...string) {
|
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", "允许管理人员审批项目", "role", "creator")
|
||||||
s.SettingCreate(m, "leader_finish", "radio", "help", "允许管理人员验收项目", "scope", "place")
|
s.SettingCreate(m, "leader_finish", "radio", "help", "允许管理人员验收项目", "role", "creator")
|
||||||
s.SettingCreate(m, "leader_payfor", "radio", "help", "允许管理人员支付项目", "scope", "place")
|
s.SettingCreate(m, "leader_payfor", "radio", "help", "允许管理人员支付项目", "role", "creator")
|
||||||
|
s.SettingCreate(m, "leader_program", "radio", "help", "允许管理人员本地开发", "role", "tech")
|
||||||
|
s.SettingCreate(m, "creator_program", "radio", "help", "允许创建人本地开发", "role", "tech")
|
||||||
}
|
}
|
||||||
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, "")()
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
"meet_type": "会议类型",
|
"meet_type": "会议类型",
|
||||||
"meet_link": "会议链接",
|
"meet_link": "会议链接",
|
||||||
"file_type": "文件类型",
|
"file_type": "文件类型",
|
||||||
"file_link": "文件链接",
|
"file_link": "文件上传",
|
||||||
"file_name": "文件名称",
|
"file_name": "文件名称",
|
||||||
"file_size": "文件大小",
|
"file_size": "文件大小",
|
||||||
"from_user_uid": "付款人",
|
"from_user_uid": "付款人",
|
||||||
|
@ -2,8 +2,11 @@ package production
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
"shylinux.com/x/operation/src/production/model"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
|
"shylinux.com/x/icebergs/base/web"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
|
"shylinux.com/x/operation/src/production/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type take struct {
|
type take struct {
|
||||||
@ -29,7 +32,7 @@ func (s take) List(m *ice.Message, arg ...string) {
|
|||||||
m.Push(model.CONTENT, kit.Select(val[model.CONTENT], val[model.ISSUE_CONTENT], val[model.DESIGN_CONTENT]))
|
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.LINK, val[model.LINK])
|
||||||
m.Push(model.STORY_NAME, value[model.NAME])
|
m.Push(model.STORY_NAME, value[model.NAME])
|
||||||
m.Push(model.STORY_UID, value[model.UID])
|
m.Push(model.STORY_UID, val[model.STORY_UID])
|
||||||
m.Push(model.USER_UID, val[model.USER_UID])
|
m.Push(model.USER_UID, val[model.USER_UID])
|
||||||
if val[model.LINK] == "" {
|
if val[model.LINK] == "" {
|
||||||
m.PushButton(s.Info, s.Main)
|
m.PushButton(s.Info, s.Main)
|
||||||
@ -84,7 +87,10 @@ func (s take) List(m *ice.Message, arg ...string) {
|
|||||||
val[model.LINK] = s.coderLink(m.Spawn(val))
|
val[model.LINK] = s.coderLink(m.Spawn(val))
|
||||||
push(val, "RD可编程")
|
push(val, "RD可编程")
|
||||||
})
|
})
|
||||||
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) {
|
||||||
|
val[model.LINK] = web.S(val[web.SPACE]) + web.C(val[ctx.INDEX])
|
||||||
|
push(val, "QA可测试")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
m.Display("").DisplayCSS("").Sort(kit.Fields(model.TYPE, model.UPDATED_AT), []string{
|
m.Display("").DisplayCSS("").Sort(kit.Fields(model.TYPE, model.UPDATED_AT), []string{
|
||||||
|
@ -11,7 +11,7 @@ type Task struct {
|
|||||||
Table
|
Table
|
||||||
order string `data:"4"`
|
order string `data:"4"`
|
||||||
role string `data:"leader,worker"`
|
role string `data:"leader,worker"`
|
||||||
fields string `data:"title,content,status,space,path,case_count,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,user_uid"`
|
fields string `data:"title,content,status,space,path,case_count,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,story_uid,user_uid"`
|
||||||
create string `name:"create issue_uid* title* content* space path begin_time:select@date end_time:select@date" role:"worker"`
|
create string `name:"create issue_uid* title* content* space path begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
modify string `name:"modify title* content* space path begin_time*:select@date end_time*:select@date" role:"worker"`
|
modify string `name:"modify title* content* space path begin_time*:select@date end_time*:select@date" role:"worker"`
|
||||||
finish string `name:"finish" role:"worker"`
|
finish string `name:"finish" role:"worker"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user