mirror of
https://shylinux.com/x/operation
synced 2025-07-01 13:14:43 +08:00
add some
This commit is contained in:
parent
532cb23440
commit
ff74f7cbc6
@ -5,11 +5,11 @@ import (
|
|||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/dashboard/model"
|
"shylinux.com/x/operation/src/dashboard/model"
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Table struct {
|
type Table struct {
|
||||||
operation.Table
|
production.Table
|
||||||
list string `name:"list dashboard_uid uid auto" role:"leader,worker,server"`
|
list string `name:"list dashboard_uid uid auto" role:"leader,worker,server"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@ package dashboard
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/community/src/gonganxitong"
|
"shylinux.com/x/community/src/gonganxitong"
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Portal struct {
|
type Portal struct {
|
||||||
operation.Portal
|
production.Portal
|
||||||
placeCreate string `name:"placeCreate city_name* company_name* dashboard_name* dashboard_type:select" role:"void"`
|
placeCreate string `name:"placeCreate city_name* company_name* dashboard_name* dashboard_type:select" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
gonganxitong.PortalCmd(Portal{Portal: operation.NewPortal(userDashboard{}, dashboard{})})
|
gonganxitong.PortalCmd(Portal{Portal: production.NewPortal(userDashboard{}, dashboard{})})
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,13 @@ package dashboard
|
|||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type userDashboard struct{ Table }
|
type userDashboard struct{ Table }
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userDashboard{}) }
|
func init() { ice.TeamCtxCmd(userDashboard{}) }
|
||||||
|
|
||||||
type UserDashboardRole = operation.UserCloudRole
|
type UserDashboardRole = production.UserStoryRole
|
||||||
|
|
||||||
var UserDashboardRoleList = operation.UserCloudRoleList
|
var UserDashboardRoleList = production.UserStoryRoleList
|
||||||
|
@ -9,11 +9,11 @@ import (
|
|||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/development/model"
|
"shylinux.com/x/operation/src/development/model"
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Table struct {
|
type Table struct {
|
||||||
operation.Table
|
production.Table
|
||||||
list string `name:"list repos_uid uid auto" role:"void"`
|
list string `name:"list repos_uid uid auto" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@ import (
|
|||||||
|
|
||||||
"shylinux.com/x/community/src/gonganxitong"
|
"shylinux.com/x/community/src/gonganxitong"
|
||||||
"shylinux.com/x/operation/src/development/model"
|
"shylinux.com/x/operation/src/development/model"
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Portal struct {
|
type Portal struct {
|
||||||
operation.Portal
|
production.Portal
|
||||||
placeCreate string `name:"placeCreate city_name* company_name* repos_type*:select repos_name* repos_link" role:"void"`
|
placeCreate string `name:"placeCreate city_name* company_name* repos_type*:select repos_name* repos_link" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,4 +27,4 @@ func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
|
|||||||
s.Portal.PlaceCreate(m, arg...)
|
s.Portal.PlaceCreate(m, arg...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { gonganxitong.PortalCmd(Portal{Portal: operation.NewPortal(userRepos{}, repos{})}) }
|
func init() { gonganxitong.PortalCmd(Portal{Portal: production.NewPortal(userRepos{}, repos{})}) }
|
||||||
|
@ -3,13 +3,13 @@ package development
|
|||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type userRepos struct{ Table }
|
type userRepos struct{ Table }
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userRepos{}) }
|
func init() { ice.TeamCtxCmd(userRepos{}) }
|
||||||
|
|
||||||
type UserReposRole = operation.UserCloudRole
|
type UserReposRole = production.UserStoryRole
|
||||||
|
|
||||||
var UserReposRoleList = operation.UserCloudRoleList
|
var UserReposRoleList = production.UserStoryRoleList
|
||||||
|
@ -4,13 +4,12 @@ import (
|
|||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
"shylinux.com/x/community/src/gonganxitong"
|
|
||||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
|
||||||
"shylinux.com/x/operation/src/operation/model"
|
"shylinux.com/x/operation/src/operation/model"
|
||||||
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Table struct {
|
type Table struct {
|
||||||
guanlixitong.Table
|
production.Table
|
||||||
list string `name:"list cloud_uid uid auto" role:"void"`
|
list string `name:"list cloud_uid uid auto" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,15 +43,7 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
})
|
})
|
||||||
return s.Table.RewriteAppend(m)
|
return s.Table.RewriteAppend(m)
|
||||||
}
|
}
|
||||||
func (s Table) CheckRole(m *ice.Message, arg ...string) {
|
|
||||||
role := UserCloudRole(s.UserPlaceRole(m))
|
|
||||||
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserCloudCreator.String())...), role.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
type Tables struct{ Table }
|
type Tables struct{ Table }
|
||||||
|
|
||||||
func (s Tables) BeforeMigrate(m *ice.Message, arg ...string) {}
|
func (s Tables) BeforeMigrate(m *ice.Message, arg ...string) {}
|
||||||
|
|
||||||
func NewPortal(userPlace gonganxitong.UserPlacer, place gonganxitong.Placer) Portal {
|
|
||||||
return Portal{Portal: guanlixitong.NewPortal(userPlace, place)}
|
|
||||||
}
|
|
||||||
|
@ -1,27 +1,15 @@
|
|||||||
package operation
|
package operation
|
||||||
|
|
||||||
import "shylinux.com/x/ice"
|
import (
|
||||||
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
|
"shylinux.com/x/operation/src/production"
|
||||||
|
)
|
||||||
|
|
||||||
type userCloud struct{ Table }
|
type userCloud struct{ Table }
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userCloud{}) }
|
func init() { ice.TeamCtxCmd(userCloud{}) }
|
||||||
|
|
||||||
type UserCloudRole int
|
type UserCloudRole = production.UserStoryRole
|
||||||
|
|
||||||
const (
|
var UserCloudRoleList = production.UserStoryRoleList
|
||||||
UserCloudVisitor UserCloudRole = iota
|
|
||||||
UserCloudCreator
|
|
||||||
UserCloudLeader
|
|
||||||
UserCloudWorker
|
|
||||||
UserCloudServer
|
|
||||||
)
|
|
||||||
|
|
||||||
var UserCloudRoleList = map[UserCloudRole]string{
|
|
||||||
UserCloudVisitor: "visitor",
|
|
||||||
UserCloudCreator: "creator",
|
|
||||||
UserCloudLeader: "leader",
|
|
||||||
UserCloudWorker: "worker",
|
|
||||||
UserCloudServer: "server",
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s UserCloudRole) String() string { return UserCloudRoleList[s] }
|
|
||||||
|
@ -2,8 +2,9 @@ package production
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
"shylinux.com/x/operation/src/production/model"
|
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
|
"shylinux.com/x/operation/src/production/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type care struct {
|
type care struct {
|
||||||
@ -14,9 +15,8 @@ type care struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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, m.OptionSimple(model.STORY_UID), model.USER_UID, m.Option(model.UID))
|
||||||
m.Option(model.UID, msg.Append(model.UID))
|
m.Cmdy(s.PrefixMember(m), m.ActionKey(), arg, kit.Dict(msg.AppendSimple(model.UID)))
|
||||||
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) {
|
||||||
isLeader := s.IsLeader(m)
|
isLeader := s.IsLeader(m)
|
||||||
|
@ -2,7 +2,6 @@ package production
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
"shylinux.com/x/icebergs/base/web"
|
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/production/model"
|
"shylinux.com/x/operation/src/production/model"
|
||||||
@ -27,12 +26,16 @@ func (s Case) Remove(m *ice.Message, arg ...string) {
|
|||||||
s.ValueRemove(m, arg...)
|
s.ValueRemove(m, arg...)
|
||||||
s.taskCount(m)
|
s.taskCount(m)
|
||||||
}
|
}
|
||||||
|
func (s Case) Cancel(m *ice.Message, arg ...string) {
|
||||||
|
s.ChangeStatus(m, int(IssueProcess), int(IssueCancel))
|
||||||
|
s.taskCount(m)
|
||||||
|
}
|
||||||
func (s Case) List(m *ice.Message, arg ...string) {
|
func (s Case) List(m *ice.Message, arg ...string) {
|
||||||
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)
|
||||||
m.Table(func(value ice.Maps) {
|
m.Table(func(value ice.Maps) {
|
||||||
if value[web.SPACE] == "" {
|
if value[model.SPACE] == "" {
|
||||||
s.PushTaskButton(m, value)
|
s.PushTaskButton(m, value)
|
||||||
} else {
|
} else {
|
||||||
s.PushTaskButton(m, value, s.Preview)
|
s.PushTaskButton(m, value, s.Preview)
|
||||||
|
@ -11,14 +11,14 @@ import (
|
|||||||
type coder struct {
|
type coder struct {
|
||||||
Tables
|
Tables
|
||||||
list string `name:"list path file line auto" help:"编辑器" role:"void"`
|
list string `name:"list path file line auto" help:"编辑器" role:"void"`
|
||||||
render string `name:"render" role:"void"`
|
|
||||||
repos string `name:"repos" role:"void"`
|
repos string `name:"repos" role:"void"`
|
||||||
|
render string `name:"render" role:"void"`
|
||||||
save string `name:"save" role:"void"`
|
save string `name:"save" role:"void"`
|
||||||
compile string `name:"compile" role:"void"`
|
compile string `name:"compile" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s coder) Render(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) }
|
|
||||||
func (s coder) Repos(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) }
|
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) 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) 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) List(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, arg) }
|
||||||
@ -31,9 +31,9 @@ func (s coder) cmd(m *ice.Message, arg ...string) {
|
|||||||
func (s coder) check(m *ice.Message, arg ...string) bool {
|
func (s coder) check(m *ice.Message, arg ...string) bool {
|
||||||
s.SettingSelect(m.Options(model.PLACE_UID, m.Option(model.STORY_UID)))
|
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 := m.Cmd(userStory{}, s.Select, m.OptionSimple(model.STORY_UID, model.USER_UID))
|
||||||
if m.Option("creator_program") == "on" && msg.Append("role") == "1" {
|
if s.SettingIsOn(m, CREATOR_PROGRAM) && msg.Append(model.ROLE) == "1" {
|
||||||
return true
|
return true
|
||||||
} else if m.Option("leader_program") == "on" && msg.Append("role") == "2" {
|
} else if s.SettingIsOn(m, LEADER_PROGRAM) && msg.Append(model.ROLE) == "2" {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
m.WarnNotRight(true)
|
m.WarnNotRight(true)
|
||||||
|
@ -12,12 +12,13 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/web"
|
"shylinux.com/x/icebergs/base/web"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/operation"
|
"shylinux.com/x/community/src/gonganxitong"
|
||||||
|
"shylinux.com/x/enterprise/src/guanlixitong"
|
||||||
"shylinux.com/x/operation/src/production/model"
|
"shylinux.com/x/operation/src/production/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Table struct {
|
type Table struct {
|
||||||
operation.Table
|
guanlixitong.Table
|
||||||
remove string `name:"remove" role:"worker"`
|
remove string `name:"remove" role:"worker"`
|
||||||
reject string `name:"reject" role:"leader"`
|
reject string `name:"reject" role:"leader"`
|
||||||
approve string `name:"approve" role:"leader"`
|
approve string `name:"approve" role:"leader"`
|
||||||
@ -130,18 +131,21 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
})
|
})
|
||||||
return s.Table.RewriteAppend(m)
|
return s.Table.RewriteAppend(m)
|
||||||
}
|
}
|
||||||
|
func (s Table) CheckRole(m *ice.Message, arg ...string) {
|
||||||
|
role := UserStoryRole(s.UserPlaceRole(m))
|
||||||
|
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserStoryCreator.String())...), role.String())
|
||||||
|
}
|
||||||
func (s Table) DateInsert(m *ice.Message, arg ...string) {
|
func (s Table) DateInsert(m *ice.Message, arg ...string) {
|
||||||
m.ProcessField(Date{}, []string{m.Option(model.STORY_UID)}, m.OptionSimple(model.ISSUE_UID)...)
|
m.ProcessField(Date{}, []string{m.Option(model.STORY_UID)}, m.OptionSimple(model.ISSUE_UID)...)
|
||||||
}
|
}
|
||||||
func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
||||||
user_uid := m.Option(ice.MSG_USERUID)
|
user_uid := m.Option(ice.MSG_USERUID)
|
||||||
// button := []ice.Any{s.Remove}
|
|
||||||
button := []ice.Any{}
|
button := []ice.Any{}
|
||||||
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 && s.SettingIsOn(m, LEADER_APPROVED))
|
||||||
isLeaderFinish := isCreator || (isLeader && m.Option("leader_finish") == "on")
|
isLeaderFinish := isCreator || (isLeader && s.SettingIsOn(m, LEADER_FINISH))
|
||||||
isLeaderPayfor := isCreator || (isLeader && m.Option("leader_payfor") == "on")
|
isLeaderPayfor := isCreator || (isLeader && s.SettingIsOn(m, LEADER_PAYFOR))
|
||||||
kit.If(value[model.PLAN_TITLE] == "", func() { button = append(button, s.BindPlan) })
|
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:
|
||||||
@ -226,7 +230,8 @@ func (s Table) PushTaskButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
user_uid := m.Option(ice.MSG_USERUID)
|
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)
|
isCreator, isLeader, isWorker := s.IsCreator(m), s.IsLeader(m), s.IsWorker(m)
|
||||||
|
isLeaderFinish := isCreator || (isLeader && s.SettingIsOn(m, LEADER_FINISH))
|
||||||
switch IssueStatus(kit.Int(value[model.STATUS])) {
|
switch IssueStatus(kit.Int(value[model.STATUS])) {
|
||||||
case IssueCreate:
|
case IssueCreate:
|
||||||
if user_uid == value[model.USER_UID] {
|
if user_uid == value[model.USER_UID] {
|
||||||
@ -239,6 +244,9 @@ func (s Table) PushTaskButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
if user_uid == value[model.USER_UID] {
|
if user_uid == value[model.USER_UID] {
|
||||||
button = append(button, s.Finish)
|
button = append(button, s.Finish)
|
||||||
}
|
}
|
||||||
|
if isLeaderFinish {
|
||||||
|
button = append(button, s.Cancel)
|
||||||
|
}
|
||||||
case IssueFinish:
|
case IssueFinish:
|
||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, arg...)
|
button = append(button, arg...)
|
||||||
@ -258,21 +266,6 @@ func (s Table) StatusPrice(m *ice.Message, arg ...string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (s Table) StatusCount(m *ice.Message, arg ...string) {
|
|
||||||
if m.Length() > 0 && len(arg) < 2 {
|
|
||||||
msg := m.Spawn()
|
|
||||||
s.Fields(msg, "status, count(*) AS count").Groups(msg, model.STATUS).Orders(msg, model.STATUS)
|
|
||||||
s.Select(msg, model.STORY_UID, arg[0]).Table(func(value ice.Maps) {
|
|
||||||
switch status := kit.Int(value[model.STATUS]); m.CommandKey() {
|
|
||||||
case "plan":
|
|
||||||
m.Echo(PlanStatus(status).String()).Echo(": ")
|
|
||||||
case "issue", "design", "task", "case":
|
|
||||||
m.Echo(IssueStatus(status).String()).Echo(": ")
|
|
||||||
}
|
|
||||||
m.Echo(value[model.COUNT]).Echo("\n")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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...)
|
||||||
}
|
}
|
||||||
@ -301,10 +294,6 @@ func (s Table) Reback(m *ice.Message, arg ...string) {
|
|||||||
s.ChangeStatus(m, int(IssueSubmit), int(IssueProcess))
|
s.ChangeStatus(m, int(IssueSubmit), int(IssueProcess))
|
||||||
s.sendTemplate(m, "", "", "")
|
s.sendTemplate(m, "", "", "")
|
||||||
}
|
}
|
||||||
func (s Table) sendTemplate(m *ice.Message, from, to, title string, arg ...string) {
|
|
||||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.UID)...)
|
|
||||||
s.SendTemplate(m, from, msg.Append(model.USER_UID), title, arg...)
|
|
||||||
}
|
|
||||||
func (s Table) Cancel(m *ice.Message, arg ...string) {
|
func (s Table) Cancel(m *ice.Message, arg ...string) {
|
||||||
s.ChangeStatus(m, int(IssueProcess), int(IssueCancel))
|
s.ChangeStatus(m, int(IssueProcess), int(IssueCancel))
|
||||||
s.sendTemplate(m, "", "", "")
|
s.sendTemplate(m, "", "", "")
|
||||||
@ -316,6 +305,10 @@ func (s Table) Preview(m *ice.Message, arg ...string) {
|
|||||||
m.OptionDefault(model.LINK, m.Option(model.MEET_LINK))
|
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))))
|
m.ProcessOpen(m.OptionDefault(model.LINK, web.S(m.Option(web.SPACE))+web.C(m.Option(ctx.INDEX))))
|
||||||
}
|
}
|
||||||
|
func (s Table) sendTemplate(m *ice.Message, from, to, title string, arg ...string) {
|
||||||
|
msg := s.Select(m.Spawn(), m.OptionSimple(model.UID)...)
|
||||||
|
s.SendTemplate(m, from, msg.Append(model.USER_UID), title, arg...)
|
||||||
|
}
|
||||||
func (s Table) coderLink(m *ice.Message, arg ...string) string {
|
func (s Table) coderLink(m *ice.Message, arg ...string) string {
|
||||||
p := path.Base(m.Option(nfs.PATH))
|
p := path.Base(m.Option(nfs.PATH))
|
||||||
return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C("web.team.production.coder"),
|
return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C("web.team.production.coder"),
|
||||||
@ -477,3 +470,7 @@ func (s Table) taskCount(m *ice.Message) Table { return s.addCount(m, Task{}) }
|
|||||||
type Tables struct{ Table }
|
type Tables struct{ Table }
|
||||||
|
|
||||||
func (s Tables) BeforeMigrate(m *ice.Message, arg ...string) {}
|
func (s Tables) BeforeMigrate(m *ice.Message, arg ...string) {}
|
||||||
|
|
||||||
|
func NewPortal(userPlace gonganxitong.UserPlacer, place gonganxitong.Placer) Portal {
|
||||||
|
return Portal{Portal: guanlixitong.NewPortal(userPlace, place)}
|
||||||
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package production
|
package production
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
|
||||||
"shylinux.com/x/operation/src/production/model"
|
|
||||||
kit "shylinux.com/x/toolkits"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"shylinux.com/x/ice"
|
||||||
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
|
"shylinux.com/x/operation/src/production/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Date struct {
|
type Date struct {
|
||||||
@ -18,7 +20,7 @@ func (s Date) Inputs(m *ice.Message, arg ...string) {
|
|||||||
switch arg[0] {
|
switch arg[0] {
|
||||||
case model.ISSUE_UID:
|
case model.ISSUE_UID:
|
||||||
args := m.OptionSimple(model.STORY_UID)
|
args := m.OptionSimple(model.STORY_UID)
|
||||||
switch MeetType(kit.Int(m.Option("meet_type"))) {
|
switch MeetType(kit.Int(m.Option(model.MEET_TYPE))) {
|
||||||
case MeetTalk:
|
case MeetTalk:
|
||||||
args = append(args, model.STATUS, kit.Format(IssueCreate))
|
args = append(args, model.STATUS, kit.Format(IssueCreate))
|
||||||
case MeetValue:
|
case MeetValue:
|
||||||
@ -59,11 +61,11 @@ 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", !m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", "3")); i++ {
|
for i := -kit.Int(m.OptionDefault("date_begin", kit.Select("2", "0", m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", "3")); 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{}
|
||||||
for i := kit.Int(m.OptionDefault("date_start", "18")); i < kit.Int(m.OptionDefault("date_stop", "48")); i++ {
|
for i := kit.Int(m.OptionDefault("date_start", "20")); i < kit.Int(m.OptionDefault("date_stop", "46")); i++ {
|
||||||
if i%2 == 0 {
|
if i%2 == 0 {
|
||||||
list = append(list, kit.Format("%2d:00", i/2))
|
list = append(list, kit.Format("%2d:00", i/2))
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,8 +2,9 @@ package production
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
"shylinux.com/x/operation/src/production/model"
|
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
|
"shylinux.com/x/operation/src/production/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Deal struct {
|
type Deal struct {
|
||||||
|
@ -58,6 +58,7 @@ const (
|
|||||||
TO_USER_UID = "to_user_uid"
|
TO_USER_UID = "to_user_uid"
|
||||||
BEGIN_TIME = "begin_time"
|
BEGIN_TIME = "begin_time"
|
||||||
END_TIME = "end_time"
|
END_TIME = "end_time"
|
||||||
|
SPACE = "space"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserStory struct {
|
type UserStory struct {
|
||||||
@ -107,6 +108,27 @@ type Case struct {
|
|||||||
Space string `gorm:"type:varchar(64)"`
|
Space string `gorm:"type:varchar(64)"`
|
||||||
Index string `gorm:"type:varchar(64)"`
|
Index string `gorm:"type:varchar(64)"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Note 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"`
|
||||||
|
FromUserUID string `gorm:"type:char(32);index"`
|
||||||
|
ToUserUID string `gorm:"type:char(32);index"`
|
||||||
|
}
|
||||||
|
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"`
|
||||||
|
}
|
||||||
type Meet struct {
|
type Meet struct {
|
||||||
db.ModelContent
|
db.ModelContent
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
@ -130,29 +152,9 @@ 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"`
|
|
||||||
}
|
|
||||||
type Note 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"`
|
|
||||||
FromUserUID string `gorm:"type:char(32);index"`
|
|
||||||
ToUserUID string `gorm:"type:char(32);index"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
db.CmdModels("", &UserStory{}, &Story{}, &Plan{}, &Issue{}, &Design{}, &Task{}, &Case{}, &Meet{}, &Deal{}, &File{}, &Note{})
|
db.CmdModels("", &UserStory{}, &Story{}, &Plan{}, &Issue{}, &Design{}, &Task{}, &Case{}, &Note{}, &File{}, &Meet{}, &Deal{})
|
||||||
}
|
}
|
||||||
|
|
||||||
type Common struct {
|
type Common struct {
|
||||||
|
@ -14,9 +14,8 @@ func (s Note) Create(m *ice.Message, arg ...string) {
|
|||||||
s.SendTemplate(m, "", "", "")
|
s.SendTemplate(m, "", "", "")
|
||||||
}
|
}
|
||||||
func (s Note) List(m *ice.Message, arg ...string) {
|
func (s Note) List(m *ice.Message, arg ...string) {
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg).PushAction()
|
||||||
s.OtherListCmd(m, s.IssueList, s.DesignList)
|
s.OtherListCmd(m, s.IssueList, s.DesignList)
|
||||||
// s.ValueList(m, arg).Display("")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Note{}) }
|
func init() { ice.TeamCtxCmd(Note{}) }
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
// $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; }
|
@ -11,11 +11,12 @@ 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,story_uid,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:select begin_time:select@date end_time:select@date" role:"leader"`
|
create string `name:"create title* content plan_type:select version:select begin_time:select@date end_time:select@date" role:"leader"`
|
||||||
modify string `name:"modify title* content version:select begin_time:select@date end_time:select@date" role:"leader"`
|
modify string `name:"modify title* content 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"`
|
||||||
setType string `name:"setType plan_type" role:"creator"`
|
setType string `name:"setType plan_type" role:"creator"`
|
||||||
|
handover string `name:"handover to_user_uid*:select" role:"leader" style:"notice" help:"交接"`
|
||||||
issueCreate string `name:"issueCreate title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
issueCreate string `name:"issueCreate title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
|||||||
switch PlanStatus(kit.Int(value[model.PLAN_STATUS])) {
|
switch PlanStatus(kit.Int(value[model.PLAN_STATUS])) {
|
||||||
case PlanCreate:
|
case PlanCreate:
|
||||||
if isLeader {
|
if isLeader {
|
||||||
button = append(button, s.Process, s.Modify, s.Remove)
|
button = append(button, s.Process, s.Handover, s.Modify, s.Remove)
|
||||||
}
|
}
|
||||||
case PlanProcess:
|
case PlanProcess:
|
||||||
if isWorker && kit.Int(value[model.ISSUE_COUNT]) == 0 {
|
if isWorker && kit.Int(value[model.ISSUE_COUNT]) == 0 {
|
||||||
@ -57,6 +58,9 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
|||||||
if isCreator {
|
if isCreator {
|
||||||
button = append(button, s.SetType)
|
button = append(button, s.SetType)
|
||||||
}
|
}
|
||||||
|
if isLeader {
|
||||||
|
button = append(button, s.Handover)
|
||||||
|
}
|
||||||
if isLeader && kit.Int(value[model.ISSUE_COUNT]) > 0 {
|
if isLeader && kit.Int(value[model.ISSUE_COUNT]) > 0 {
|
||||||
button = append(button, s.Finish)
|
button = append(button, s.Finish)
|
||||||
}
|
}
|
||||||
@ -64,6 +68,9 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
|||||||
button = append(button, s.Remove)
|
button = append(button, s.Remove)
|
||||||
}
|
}
|
||||||
case PlanFinish:
|
case PlanFinish:
|
||||||
|
if isLeader {
|
||||||
|
button = append(button, s.Handover)
|
||||||
|
}
|
||||||
if isCreator {
|
if isCreator {
|
||||||
button = append(button, s.SetType)
|
button = append(button, s.SetType)
|
||||||
}
|
}
|
||||||
@ -87,7 +94,15 @@ func (s Plan) Finish(m *ice.Message, arg ...string) {
|
|||||||
func (s Plan) SetType(m *ice.Message, arg ...string) {
|
func (s Plan) SetType(m *ice.Message, arg ...string) {
|
||||||
s.Modify(m, m.OptionSimple(model.PLAN_TYPE)...)
|
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) Handover(m *ice.Message, arg ...string) {
|
||||||
|
m.OptionDefault(model.TO_USER_UID, m.Option(ice.MSG_USERUID))
|
||||||
|
s.Modify(m, model.USER_UID, m.Option(model.TO_USER_UID))
|
||||||
|
s.SendTemplate(m, "", "", "")
|
||||||
|
m.ProcessHold()
|
||||||
|
}
|
||||||
|
func (s Plan) IssueCreate(m *ice.Message, arg ...string) {
|
||||||
|
s.commonOtherCreate(m, Issue{}, arg...)
|
||||||
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Plan{}) }
|
func init() { ice.TeamCtxCmd(Plan{}) }
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package production
|
|||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
|
"shylinux.com/x/community/src/api"
|
||||||
"shylinux.com/x/community/src/gonganxitong"
|
"shylinux.com/x/community/src/gonganxitong"
|
||||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
"shylinux.com/x/enterprise/src/guanlixitong"
|
||||||
"shylinux.com/x/operation/src/production/model"
|
"shylinux.com/x/operation/src/production/model"
|
||||||
@ -15,13 +16,16 @@ 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", "", "允许管理人员审批项目", "creator", "100")
|
s.SettingCreate(m, LEADER_APPROVED, "", "允许管理人员审批项目", api.CREATOR, "100")
|
||||||
s.SettingCreate(m, "leader_finish", "", "允许管理人员验收项目", "creator", "101")
|
s.SettingCreate(m, LEADER_FINISH, "", "允许管理人员验收项目", api.CREATOR, "101")
|
||||||
s.SettingCreate(m, "leader_payfor", "", "允许管理人员支付项目", "creator", "102")
|
s.SettingCreate(m, LEADER_PAYFOR, "", "允许管理人员支付项目", api.CREATOR, "102")
|
||||||
s.SettingCreate(m, "leader_program", "", "允许管理人员本地开发", "tech", "103")
|
s.SettingCreate(m, LEADER_PROGRAM, "", "允许管理人员本地开发", api.TECH, "103")
|
||||||
s.SettingCreate(m, "creator_program", "", "允许创建人本地开发", "tech", "104")
|
s.SettingCreate(m, CREATOR_PROGRAM, "", "允许创建人本地开发", api.TECH, "104")
|
||||||
}
|
}
|
||||||
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
|
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
|
||||||
|
if m.PrefixKey() != ice.GetTypeKey(s) {
|
||||||
|
return
|
||||||
|
}
|
||||||
defer s.DashboardCreate(m, "")()
|
defer s.DashboardCreate(m, "")()
|
||||||
s.DashboardInsert(m, 1, "需求总量", "个", Issue{}, "")
|
s.DashboardInsert(m, 1, "需求总量", "个", Issue{}, "")
|
||||||
s.DashboardInsert(m, 2, "需求待办", "个", Issue{}, "", "story_uid = ? AND status != ? AND status != ?", m.Option(model.STORY_UID), IssueRejected, IssueFinish)
|
s.DashboardInsert(m, 2, "需求待办", "个", Issue{}, "", "story_uid = ? AND status != ? AND status != ?", m.Option(model.STORY_UID), IssueRejected, IssueFinish)
|
||||||
@ -30,3 +34,11 @@ func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userStory{}, story{})}) }
|
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userStory{}, story{})}) }
|
||||||
|
|
||||||
|
const (
|
||||||
|
LEADER_APPROVED = "leader_approved"
|
||||||
|
LEADER_FINISH = "leader_finish"
|
||||||
|
LEADER_PAYFOR = "leader_payfor"
|
||||||
|
LEADER_PROGRAM = "leader_program"
|
||||||
|
CREATOR_PROGRAM = "creator_program"
|
||||||
|
)
|
||||||
|
@ -1,5 +1,2 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
beginTime: function(can, value) {
|
|
||||||
return (value.process_time||value.begin_time).split(" ")[0]+" ~ "+(value.finish_time||value.end_time).split(" ")[0]
|
|
||||||
},
|
|
||||||
})
|
})
|
@ -2,8 +2,9 @@ package production
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
"shylinux.com/x/operation/src/production/model"
|
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
|
"shylinux.com/x/operation/src/production/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Stat struct {
|
type Stat struct {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
// msg.Dump(can)
|
|
||||||
// return
|
|
||||||
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.name, value["已入门"]+"人"+" / "+value["成员人数"]+"人",
|
value.name, value["已入门"]+"人"+" / "+value["成员人数"]+"人",
|
||||||
|
@ -3,7 +3,6 @@ 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, "task_status")]},
|
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "task_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"),
|
||||||
can.onimport.unitView(can, value, "case_count", "个"),
|
can.onimport.unitView(can, value, "case_count", "个"),
|
||||||
|
@ -2,14 +2,28 @@ package production
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
"shylinux.com/x/operation/src/operation"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type userStory struct{ Table }
|
type userStory struct{ Table }
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userStory{}) }
|
func init() { ice.TeamCtxCmd(userStory{}) }
|
||||||
|
|
||||||
type UserStoryRole = operation.UserCloudRole
|
type UserStoryRole int
|
||||||
|
|
||||||
var UserStoryRoleList = operation.UserCloudRoleList
|
const (
|
||||||
|
UserStoryVisitor UserStoryRole = iota
|
||||||
|
UserStoryCreator
|
||||||
|
UserStoryLeader
|
||||||
|
UserStoryWorker
|
||||||
|
UserStoryServer
|
||||||
|
)
|
||||||
|
|
||||||
|
var UserStoryRoleList = map[UserStoryRole]string{
|
||||||
|
UserStoryVisitor: "visitor",
|
||||||
|
UserStoryCreator: "creator",
|
||||||
|
UserStoryLeader: "leader",
|
||||||
|
UserStoryWorker: "worker",
|
||||||
|
UserStoryServer: "server",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s UserStoryRole) String() string { return UserStoryRoleList[s] }
|
||||||
|
@ -4,12 +4,12 @@ import (
|
|||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
"shylinux.com/x/operation/src/production"
|
||||||
"shylinux.com/x/operation/src/storage/model"
|
"shylinux.com/x/operation/src/storage/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Table struct {
|
type Table struct {
|
||||||
guanlixitong.Table
|
production.Table
|
||||||
list string `name:"list storage_uid uid auto" role:"void"`
|
list string `name:"list storage_uid uid auto" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
"shylinux.com/x/community/src/gonganxitong"
|
"shylinux.com/x/community/src/gonganxitong"
|
||||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Portal struct {
|
type Portal struct {
|
||||||
guanlixitong.Portal
|
production.Portal
|
||||||
placeCreate string `name:"placeCreate city_name* company_name* storage_name* storage_type:select" role:"void"`
|
placeCreate string `name:"placeCreate city_name* company_name* storage_name* storage_type:select" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,4 +18,4 @@ func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
|
|||||||
s.DashboardInsert(m, 2, "文件大小", "size", file{}, "SUM(size)")
|
s.DashboardInsert(m, 2, "文件大小", "size", file{}, "SUM(size)")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userStorage{}, storage{})}) }
|
func init() { gonganxitong.PortalCmd(Portal{Portal: production.NewPortal(userStorage{}, storage{})}) }
|
||||||
|
@ -3,13 +3,13 @@ package storage
|
|||||||
import (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
"shylinux.com/x/operation/src/production"
|
||||||
)
|
)
|
||||||
|
|
||||||
type userStorage struct{ Table }
|
type userStorage struct{ Table }
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userStorage{}) }
|
func init() { ice.TeamCtxCmd(userStorage{}) }
|
||||||
|
|
||||||
type UserStorageRole = guanlixitong.UserGroupRole
|
type UserStorageRole = production.UserStoryRole
|
||||||
|
|
||||||
var UserStorageRoleList = guanlixitong.UserGroupRoleList
|
var UserStorageRoleList = production.UserStoryRoleList
|
||||||
|
Loading…
x
Reference in New Issue
Block a user