This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-06-02 19:13:16 +08:00
parent 19ecc5f68d
commit 2a8587f61a
8 changed files with 38 additions and 21 deletions

View File

@ -19,9 +19,8 @@ func (s care) SetInfo(m *ice.Message, arg ...string) {
m.Cmdy(s.PrefixMember(m), 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)
isLeader := s.IsLeader(m) isLeader := s.IsLeader(m)
if s.Fields(m, model.USER_UID, model.INFO); isLeader { if s.Fields(m, model.USER_UID, model.INFO).Limit(m, 300); 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 {

View File

@ -2,6 +2,9 @@ package production
import ( import (
"shylinux.com/x/ice" "shylinux.com/x/ice"
"shylinux.com/x/icebergs/core/code"
kit "shylinux.com/x/toolkits"
"shylinux.com/x/operation/src/production/model" "shylinux.com/x/operation/src/production/model"
) )
@ -14,23 +17,20 @@ type coder struct {
compile string `name:"compile" 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(code.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(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("vimer", arg) } func (s coder) List(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, arg) }
func init() { ice.TeamCtxCmd(coder{}) } func init() { ice.TeamCtxCmd(coder{}) }
func (s coder) cmd(m *ice.Message, arg ...string) { func (s coder) cmd(m *ice.Message, arg ...string) {
if s.check(m) { kit.If(s.check(m), func() { m.Cmdy(code.VIMER, m.ActionKey(), arg) })
m.Cmdy("vimer", m.ActionKey(), arg)
}
} }
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))
msg.Info("what %v", m.FormatChain())
if m.Option("creator_program") == "on" && msg.Append("role") == "1" { if m.Option("creator_program") == "on" && msg.Append("role") == "1" {
return true return true
} else if m.Option("leader_program") == "on" && msg.Append("role") == "2" { } else if m.Option("leader_program") == "on" && msg.Append("role") == "2" {

View File

@ -359,10 +359,6 @@ func (s Table) commonOtherList(m *ice.Message, target ice.Any, arg ...string) *i
m.RenameAppend(model.TO_USER_UID, model.USER_UID) m.RenameAppend(model.TO_USER_UID, model.USER_UID)
return m return m
} }
func (s Table) OtherListCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
kit.If(m.FieldsIsDetail() && m.Length() > 0 && s.IsWorker(m), func() { m.Option("otherList", kit.Fields(arg...)) })
return m
}
func (s Table) otherListButton(m *ice.Message, arg ...string) { func (s Table) otherListButton(m *ice.Message, arg ...string) {
m.Table(func(value ice.Maps) { m.Table(func(value ice.Maps) {
switch IssueStatus(kit.Int(value[model.STATUS])) { switch IssueStatus(kit.Int(value[model.STATUS])) {

View File

@ -11,12 +11,35 @@ type Date struct {
Tables Tables
order string `data:"9"` order string `data:"9"`
role string `data:"leader,worker"` role string `data:"leader,worker"`
discuss string `name:"discuss issue_uid*:select meet_type*:select meet_link* begin_time*:select@date" role:"leader"` discuss string `name:"discuss meet_type*:select issue_uid*:select meet_link* begin_time*:select@date" role:"leader"`
} }
func (s Date) Inputs(m *ice.Message, arg ...string) {
switch arg[0] {
case model.ISSUE_UID:
args := m.OptionSimple(model.STORY_UID)
switch MeetType(kit.Int(m.Option("meet_type"))) {
case MeetTalk:
args = append(args, model.STATUS, kit.Format(IssueCreate))
case MeetValue:
args = append(args, model.STATUS, kit.Format(IssueSubmit))
case MeetCheck:
s.Fields(m, model.ISSUE_UID, model.TITLE, model.USER_UID).Limit(m, 300)
m.Cmdy(Design{}, s.Select, args, model.STATUS, IssueSubmit)
m.RenameAppend(model.ISSUE_UID, arg[0])
m.DisplayInputKeyNameIconTitle()
return
case MeetPlan:
args = append(args, model.STATUS, kit.Format(IssueCreate))
}
s.InputsUID(m, arg, Issue{}, args...)
default:
s.Tables.Inputs(m, arg...)
}
}
func (s Date) Discuss(m *ice.Message, arg ...string) { func (s Date) Discuss(m *ice.Message, arg ...string) {
msg := m.Cmd(Issue{}, s.Select, model.UID, m.Option(model.ISSUE_UID), m.OptionSimple(model.STORY_UID)) msg := m.Cmd(Issue{}, s.Select, model.UID, m.Option(model.ISSUE_UID), m.OptionSimple(model.STORY_UID))
m.Cmdy(Meet{}, s.Create, arg, model.FROM_USER_UID, m.Option(model.USER_UID), model.TO_USER_UID, msg.Append(model.USER_UID), m.Cmdy(Meet{}, s.Create, m.OptionSimple(model.ISSUE_UID), arg, model.FROM_USER_UID, m.Option(model.USER_UID), model.TO_USER_UID, msg.Append(model.USER_UID),
msg.AppendSimple(model.TITLE), model.CONTENT, msg.Append(model.ISSUE_CONTENT)) msg.AppendSimple(model.TITLE), model.CONTENT, msg.Append(model.ISSUE_CONTENT))
} }
func (s Date) List(m *ice.Message, arg ...string) { func (s Date) List(m *ice.Message, arg ...string) {
@ -40,7 +63,7 @@ func (s Date) head(m *ice.Message, arg ...string) {
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", "38")); i < kit.Int(m.OptionDefault("date_stop", "48")); i++ { for i := kit.Int(m.OptionDefault("date_start", "40")); i < kit.Int(m.OptionDefault("date_stop", "44")); 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 {

View File

@ -9,6 +9,7 @@ import (
type Deal struct { type Deal struct {
Table Table
order string `data:"11"` order string `data:"11"`
role string `data:"leader,worker"`
fields string `data:"from_user_uid,to_user_uid,price,title,content,issue_uid"` fields string `data:"from_user_uid,to_user_uid,price,title,content,issue_uid"`
create string `name:"create issue_uid* from_user_uid* to_user_uid* price* title* content" role:"leader"` create string `name:"create issue_uid* from_user_uid* to_user_uid* price* title* content" role:"leader"`
modify string `name:"modify title* content" role:"leader"` modify string `name:"modify title* content" role:"leader"`

View File

@ -25,12 +25,11 @@ func (s File) Create(m *ice.Message, arg ...string) {
s.ValueCreate(m, kit.Simple(arg, msg.AppendSimple(model.NAME, model.SIZE))...) s.ValueCreate(m, kit.Simple(arg, msg.AppendSimple(model.NAME, model.SIZE))...)
} }
func (s File) List(m *ice.Message, arg ...string) { func (s File) List(m *ice.Message, arg ...string) {
if s.ValueList(m, arg); s.IsLeader(m) { if s.ValueList(m, arg).Display(""); s.IsLeader(m) {
m.PushAction(s.Download, s.Remove) m.PushAction(s.Download, s.Remove)
} else { } else {
m.PushAction() m.PushAction()
} }
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) {

View File

@ -38,7 +38,7 @@ func (s Task) List(m *ice.Message, arg ...string) {
s.PushTaskButton(m, value, 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.IssueList, s.DesignList, s.CaseList)
} }
func (s Task) Process(m *ice.Message, arg ...string) { func (s Task) Process(m *ice.Message, arg ...string) {
s.changeStatus(m, IssueCreate, IssueProcess) s.changeStatus(m, IssueCreate, IssueProcess)

View File

@ -1,8 +1,7 @@
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: [value.title||value.name||value.user_name, can.onimport.titleAction(can, value)]}, {view: html.TITLE, list: [value.title||value.name||value.user_name, can.onimport.titleAction(can, value)]}, can.onimport.metaView(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]}, {view: html.OUTPUT, list: [value.content||value.info]},
] }) ] })
}, },