This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-06-23 21:48:40 +08:00
parent 3edaaa9f0c
commit 88b7b33049
26 changed files with 201 additions and 87 deletions

View File

@ -61,7 +61,7 @@ func (s care) List(m *ice.Message, arg ...string) {
} }
}) })
if m.Action().Display(""); m.FieldsIsDetail() { if m.Action().Display(""); m.FieldsIsDetail() {
s.OtherListCmd(m, s.IssueList, s.DesignList) s.OtherListCmd(m, s.IssueList, s.DesignList, s.DealList)
} else { } else {
m.Sort(kit.Fields("已支付", "原型已完成", "原型设计中", "界面已完成", "界面设计中"), ice.INT_R, ice.INT_R, ice.INT_R, ice.INT_R, ice.INT_R) m.Sort(kit.Fields("已支付", "原型已完成", "原型设计中", "界面已完成", "界面设计中"), ice.INT_R, ice.INT_R, ice.INT_R, ice.INT_R, ice.INT_R)
} }
@ -76,5 +76,10 @@ func (s care) DesignList(m *ice.Message, arg ...string) {
s.OtherList(m, Design{}, model.USER_UID, m.Option(model.UID)) s.OtherList(m, Design{}, model.USER_UID, m.Option(model.UID))
m.RenameAppend(model.STORY_UID, model.PLACE_UID) m.RenameAppend(model.STORY_UID, model.PLACE_UID)
} }
func (s care) DealList(m *ice.Message, arg ...string) {
s.Limit(m, 300)
s.OtherList(m, Deal{}, model.TO_USER_UID, m.Option(model.UID))
m.RenameAppend(model.STORY_UID, model.PLACE_UID, model.TO_USER_UID, model.USER_UID)
}
func init() { ice.TeamCtxCmd(care{}) } func init() { ice.TeamCtxCmd(care{}) }

View File

@ -13,7 +13,7 @@ type Case struct {
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,story_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*:select title* content* space:select index:select begin_time:select@date end_time:select@date" role:"worker"` create string `name:"create task_uid*:select title* content* space:select index:select begin_time:select@date end_time:select@date" role:"worker"`
modify string `name:"modify title* content* space:select index:select begin_time*:select@date end_time*:select@date" role:"worker"` modify string `name:"modify title* content* space:select index:select" role:"worker"`
finish string `name:"finish" role:"worker"` finish string `name:"finish" role:"worker"`
} }

View File

@ -2,6 +2,7 @@ package production
import ( import (
"shylinux.com/x/ice" "shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/aaa"
"shylinux.com/x/icebergs/core/code" "shylinux.com/x/icebergs/core/code"
kit "shylinux.com/x/toolkits" kit "shylinux.com/x/toolkits"
@ -11,17 +12,33 @@ 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"`
inputs string `name:"inputs" role:"void"`
repos string `name:"repos" role:"void"` repos string `name:"repos" role:"void"`
plugin string `name:"plugin" role:"void"`
render string `name:"render" role:"void"` render string `name:"render" role:"void"`
engine string `name:"engine" role:"void"`
create string `name:"create file*" role:"void"`
trash string `name:"trash" role:"void"`
complete string `name:"complete" 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) Inputs(m *ice.Message, arg ...string) {
m.Cmdy(code.VIMER, m.ActionKey(), arg, kit.Dict(ice.MSG_USERROLE, aaa.TECH))
}
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) Plugin(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) Render(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, m.ActionKey(), arg) }
func (s coder) Engine(m *ice.Message, arg ...string) { s.cmd(m, arg...) }
func (s coder) Create(m *ice.Message, arg ...string) { s.cmd(m, arg...) }
func (s coder) Trash(m *ice.Message, arg ...string) { s.cmd(m, arg...) }
func (s coder) Complete(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) 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).Option(ice.MSG_TOOLKIT, "")
}
func init() { ice.TeamCtxCmd(coder{}) } func init() { ice.TeamCtxCmd(coder{}) }

View File

@ -30,16 +30,17 @@ type Table struct {
cancel string `name:"cancel" role:"leader"` cancel string `name:"cancel" role:"leader"`
trash string `name:"trash" role:"leader"` trash string `name:"trash" role:"leader"`
list string `name:"list story_uid uid auto" role:"void"` list string `name:"list story_uid uid auto" role:"void"`
dateInsert string `name:"dateInsert" help:"约会" role:"leader"`
discuss string `name:"discuss meet_type*:select title* content meet_link* date* time*" role:"leader"`
addNote string `name:"addNote title content to_user_uid:select" help:"备注" role:"worker"`
preview string `name:"preview" role:"worker"` preview string `name:"preview" role:"worker"`
program string `name:"program" role:"worker"` program string `name:"program" role:"worker"`
discuss string `name:"discuss meet_type* title* content meet_link* date* time*" role:"leader"` join string `name:"join" help:"入会" style:"notice" role:"void"`
addNote string `name:"addNote title content to_user_uid:select" help:"备注" role:"worker"`
setScore string `name:"setScore score" help:"评分" role:"leader"`
payfor string `name:"payfor price* title* content" role:"leader"`
upload string `name:"upload" role:"worker"` upload string `name:"upload" role:"worker"`
download string `name:"download" style:"notice" 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"` fileCreate string `name:"fileCreate title* content file_type*:select file_link*:select@upload" help:"上传附件" role:"worker"`
dateInsert string `name:"dateInsert" help:"约会" role:"leader"` setScore string `name:"setScore score" help:"打分" role:"leader"`
payfor string `name:"payfor price*=500 title* content" role:"leader"`
planList string `name:"planList" 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"`
@ -74,29 +75,31 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
s.InputsList(m, FileTypeList, arg...) s.InputsList(m, FileTypeList, arg...)
case model.LEVEL: case model.LEVEL:
s.InputsList(m, LevelList, arg...) s.InputsList(m, LevelList, arg...)
case model.SCORE:
m.Push(arg[0], "1", "2", "3", "4", "5")
case model.VERSION: case model.VERSION:
m.Push(arg[0], "v1", "v2", "v3", "v4", "v5") m.Push(arg[0], "v1", "v2", "v3", "v4", "v5")
case nfs.PATH:
m.Option(ice.MSG_USERROLE, aaa.TECH)
m.Cmdy(web.SPACE, m.Option(web.SPACE), nfs.DIR, nfs.SRC, nfs.PATH)
case ctx.INDEX: case ctx.INDEX:
if m.PrefixKey() == ice.GetTypeKey(Case{}) {
msg := m.Spawn() msg := m.Spawn()
s.Table.Inputs(msg, arg...) s.Table.Inputs(msg, arg...)
msg.Table(func(value ice.Maps) { msg.Table(func(value ice.Maps) {
if strings.HasSuffix(value[arg[0]], ".portal") { if strings.HasPrefix(value[arg[0]], "web.team.") && strings.HasSuffix(value[arg[0]], ".portal") {
m.Push(arg[0], value[arg[0]]) m.PushRecord(value, arg[0], mdb.HELP)
} }
}) })
} else {
s.Hash.Inputs(m, arg...)
}
case nfs.PATH:
if m.PrefixKey() == ice.GetTypeKey(Task{}) {
m.Option(ice.MSG_USERROLE, aaa.TECH)
m.Cmdy(web.SPACE, m.Option(web.SPACE), nfs.DIR, nfs.SRC, nfs.PATH, kit.Dict(nfs.DIR_TYPE, nfs.DIR))
} else {
s.Hash.Inputs(m, arg...)
}
default: default:
switch m.Option(ctx.ACTION) { switch m.Option(ctx.ACTION) {
case "addNote":
switch arg[0] {
case model.CONTENT:
m.Push(arg[0], "业务负责人已验收,请产研负责人验收~")
m.Push(arg[0], "产研负责人已验收,请研发负责人验收~")
default:
s.Table.Inputs(m, arg...)
}
case "discuss": case "discuss":
switch arg[0] { switch arg[0] {
case "date": case "date":
@ -107,6 +110,36 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
for i := 38; i < 48; i++ { for i := 38; i < 48; i++ {
m.Push(arg[0], kit.Format("%02d:%s", i/2, kit.Select("30", "00", i%2 == 0))) m.Push(arg[0], kit.Format("%02d:%s", i/2, kit.Select("30", "00", i%2 == 0)))
} }
default:
s.Table.Inputs(m, arg...)
}
case "payfor":
switch arg[0] {
case model.PRICE:
m.Push(arg[0], "500")
m.Push(arg[0], "1000")
m.Push(arg[0], "1500")
m.Push(arg[0], "2000")
m.Push(arg[0], "2500")
m.Push(arg[0], "3000")
case model.TITLE:
title := m.Option(model.TITLE)
m.Push(arg[0], title+" PM 订金")
m.Push(arg[0], title+" PM 尾款")
m.Push(arg[0], title+" UI 订金")
m.Push(arg[0], title+" UI 尾款")
m.Push(arg[0], title+" PM+UI 订金")
m.Push(arg[0], title+" PM+UI 尾款")
default:
s.Table.Inputs(m, arg...)
}
case "addNote":
switch arg[0] {
case model.CONTENT:
m.Push(arg[0], "业务负责人已验收,请产研负责人验收~")
m.Push(arg[0], "产研负责人已验收,请研发负责人验收~")
default:
s.Table.Inputs(m, arg...)
} }
default: default:
s.Table.Inputs(m, arg...) s.Table.Inputs(m, arg...)
@ -196,12 +229,15 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
button = append(button, s.Cancel) button = append(button, s.Cancel)
} }
case IssueSubmit: case IssueSubmit:
if isWorker && value[model.LINK] != "" { if isLeader {
button = append(button, s.Preview) button = append(button, s.DateInsert)
} }
if isLeader { if isLeader {
button = append(button, s.AddNote) button = append(button, s.AddNote)
} }
if isWorker && value[model.LINK] != "" {
button = append(button, s.Preview)
}
if isWorker { if isWorker {
button = append(button, s.FileCreate) button = append(button, s.FileCreate)
} }
@ -314,6 +350,9 @@ func (s Table) Cancel(m *ice.Message, arg ...string) {
func (s Table) Trash(m *ice.Message, arg ...string) { func (s Table) Trash(m *ice.Message, arg ...string) {
s.Delete(m, m.OptionSimple(model.UID, model.STORY_UID)...) s.Delete(m, m.OptionSimple(model.UID, model.STORY_UID)...)
} }
func (s Table) Join(m *ice.Message, arg ...string) {
m.ProcessOpen(m.Option(model.MEET_LINK))
}
func (s Table) Preview(m *ice.Message, arg ...string) { 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))))
@ -323,11 +362,9 @@ func (s Table) sendTemplate(m *ice.Message, from, to, title string, arg ...strin
s.SendTemplate(m, from, msg.Append(model.USER_UID), title, arg...) 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)) return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C(ice.GetTypeKey(coder{})),
return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C("web.team.production.coder"), nfs.PATH, nfs.SRC, nfs.FILE, path.Join(path.Base(m.Option(nfs.PATH)), "portal.go"),
nfs.PATH, nfs.SRC, nfs.FILE, path.Join(p, "portal.go"), m.OptionSimple(model.STORY_UID, model.ISSUE_UID, model.TITLE))
m.OptionSimple(model.STORY_UID, model.ISSUE_UID),
)
} }
func (s Table) Program(m *ice.Message, arg ...string) { func (s Table) Program(m *ice.Message, arg ...string) {
m.ProcessOpen(s.coderLink(m)) m.ProcessOpen(s.coderLink(m))
@ -443,7 +480,7 @@ func (s Table) FileList(m *ice.Message, arg ...string) {
} }
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(Meet{}.Join)
} }
func (s Table) DealList(m *ice.Message, arg ...string) { func (s Table) DealList(m *ice.Message, arg ...string) {
s.commonOtherList(m, Deal{}) s.commonOtherList(m, Deal{})

View File

@ -60,12 +60,13 @@ func (s Date) List(m *ice.Message, arg ...string) {
func init() { ice.TeamCtxCmd(Date{}) } func init() { ice.TeamCtxCmd(Date{}) }
func (s Date) head(m *ice.Message, arg ...string) { func (s Date) head(m *ice.Message, arg ...string) {
s.SettingSelect(m)
head := []string{} head := []string{}
for i := -kit.Int(m.OptionDefault("date_begin", kit.Select("2", "0", m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", "3")); i++ { for i := -kit.Int(m.OptionDefault("date_begin", kit.Select(m.Option(DATE_BEGIN_DAYS), "0", m.IsMobileUA()))); i < kit.Int(m.OptionDefault("date_end", m.Option(DATE_END_DAYS))); 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", "20")); i < kit.Int(m.OptionDefault("date_stop", "46")); i++ { for i := kit.Int(m.OptionDefault("date_start", m.Option(DATE_START_HOURS))) * 2; i < kit.Int(m.OptionDefault("date_stop", m.Option(DATE_STOP_HOURS)))*2; 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

@ -1,8 +1,8 @@
Volcanos(chat.ONIMPORT, { Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { var head = can.core.Split(msg.Option("head")), list = can.core.Split(msg.Option("list")) _init: function(can, msg) { var head = can.core.Split(msg.Option("head")), list = can.core.Split(msg.Option("list"))
can.page.Append(can, can._output, [{type: html.TABLE, className: "content full", list: [ can.page.Append(can, can._output, [{type: html.TABLE, className: "content scroll full", list: [
{type: html.THEAD, list: [{type: html.TR, list: [{type: html.TH, inner: "时间"}].concat(can.core.List(head, function(value) { {type: html.THEAD, list: [{type: html.TR, list: [{type: html.TH, inner: can.user.trans(can, "time", "时间")}].concat(can.core.List(head, function(value) {
var today = can.base.beginWith(can.base.Time(), value)? "(今天)": "" var today = can.base.beginWith(can.base.Time(), value)? can.user.trans(can, "(today)", "(今天)"): ""
return {type: html.TH, inner: value+today} return {type: html.TH, inner: value+today}
}))}]}, }))}]},
{type: html.TBODY, list: can.core.List(list, function(time) { {type: html.TBODY, list: can.core.List(list, function(time) {

View File

@ -12,7 +12,7 @@ type Deal struct {
order string `data:"11"` order string `data:"11"`
role string `data:"leader,worker"` 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*:select from_user_uid*:select to_user_uid*:select price* title* content" role:"leader"`
modify string `name:"modify title* content" role:"leader"` modify string `name:"modify title* content" role:"leader"`
} }

View File

@ -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" role:"worker"` modify string `name:"modify title* design_content* price*" role:"worker"`
} }
func (s Design) Create(m *ice.Message, arg ...string) { func (s Design) Create(m *ice.Message, arg ...string) {

View File

@ -16,3 +16,9 @@ Volcanos(chat.ONIMPORT, {
] }) ] })
}, },
}) })
Volcanos(chat.ONACTION, {
_beforeInputs: function(event, can, button, sub) { var msg = can.request(event)
sub.Prompt("link", "请输入设计链接,设置权限为所有人可查看,访问期限为永久。提交链接后,请及时与项目负责人联系,并根据反馈意见作出修改。")
sub.Prompt("file_link", "请在项目验收完成之后,再上传设计文件。")
},
})

View File

@ -17,7 +17,7 @@ type File struct {
order string `data:"11"` order string `data:"11"`
role string `data:"leader,worker"` role string `data:"leader,worker"`
fields string `data:"title,content,file_type,file_link,file_name,file_size,issue_uid,user_uid"` 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"` create string `name:"create issue_uid*:select title* content file_type*:select file_link*:select@upload" role:"worker"`
} }
func (s File) Create(m *ice.Message, arg ...string) { func (s File) Create(m *ice.Message, arg ...string) {

View File

@ -13,9 +13,9 @@ type Issue struct {
portal string `data:"true"` portal string `data:"true"`
fields string `data:"updated_at,title,issue_content,issue_type,level,status,price,score,link,design_count AS design_count,task_count AS task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"` fields string `data:"updated_at,title,issue_content,issue_type,level,status,price,score,link,design_count AS design_count,task_count AS task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"`
create string `name:"create plan_uid*:select title* issue_content* price=1000 begin_time:select@date end_time:select@date" role:"worker"` 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" role:"worker"` modify string `name:"modify title* issue_content* price*" 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:select path:select begin_time:select@date end_time:select@date" role:"leader"`
bindPlan string `name:"bindPlan plan_uid*:select"` bindPlan string `name:"bindPlan plan_uid*:select"`
} }
@ -72,7 +72,7 @@ func (s Issue) List(m *ice.Message, arg ...string) {
button = append(button, s.TaskCreate) button = append(button, s.TaskCreate)
} }
s.PushIssueButton(m, value, button...) s.PushIssueButton(m, value, button...)
}).Display("") }).Display("").DisplayCSS("")
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)
m.Sort("plan_status,status,design_count,updated_at", ice.STR, ice.STR, ice.STR, ice.STR_R) m.Sort("plan_status,status,design_count,updated_at", ice.STR, ice.STR, ice.STR, ice.STR_R)

View File

@ -3,6 +3,7 @@ Volcanos(chat.ONIMPORT, {
msg.IsDetail() && msg.Option("_share_content", msg.Append("issue_content")) msg.IsDetail() && msg.Option("_share_content", msg.Append("issue_content"))
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,
can.onimport.spaceView(can, value),
// 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", "元"), // msg.IsTech() && value.price > 0 && can.onimport.unitView(can, value, "price", "元"),
@ -20,3 +21,12 @@ Volcanos(chat.ONIMPORT, {
] }) ] })
}, },
}) })
Volcanos(chat.ONACTION, {
_beforeInputs: function(event, can, button, sub) { var msg = can.request(event)
sub.Prompt("issue_content", "请输入五个功能名,每个功能简单明确,功能之间相互关联环环相扣,例如「工作职责、目标任务、工作报告、工作反馈、绩效评估」")
sub.Prompt("link", "请输入设计链接,设置权限为所有人可查看,访问期限为永久。提交链接后,请及时与项目负责人联系,并根据反馈意见作出修改。")
sub.Prompt("file_link", "请在项目验收完成之后,再上传设计文件。")
button == "designCreate" && sub.Prompt("end_time", "请在三天之内完善功能清单,在五天之内提交原型链接,需要符合云社区的规范与标准,并及时与项目负责人沟通。")
sub.Option("design_content", msg.Option("issue_content"))
},
})

View File

@ -14,10 +14,9 @@ type Meet struct {
order string `data:"10"` order string `data:"10"`
role string `data:"leader,worker"` role string `data:"leader,worker"`
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"` 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* title* content* meet_type* meet_link* date time" role:"leader"` create string `name:"create issue_uid*:select from_user_uid*:select to_user_uid*:select title* content* meet_type*:select meet_link* date time" role:"leader"`
modify string `name:"modify" role:"leader"` modify string `name:"modify" role:"leader"`
remove string `name:"remove" role:"leader"` remove string `name:"remove" role:"leader"`
preview string `name:"preview" help:"入会" role:"void"`
} }
func (s Meet) Create(m *ice.Message, arg ...string) { func (s Meet) Create(m *ice.Message, arg ...string) {
@ -32,10 +31,10 @@ func (s Meet) Create(m *ice.Message, arg ...string) {
func (s Meet) List(m *ice.Message, arg ...string) { func (s Meet) List(m *ice.Message, arg ...string) {
if s.ValueList(m, arg).Display(""); s.IsLeader(m) { if s.ValueList(m, arg).Display(""); s.IsLeader(m) {
m.RenameAppend(model.TO_USER_UID, model.USER_UID) m.RenameAppend(model.TO_USER_UID, model.USER_UID)
m.PushAction(s.Preview, s.Remove) m.PushAction(s.Join, s.Remove)
} else { } else {
m.RenameAppend(model.FROM_USER_UID, model.USER_UID) m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
m.PushAction(s.Preview) m.PushAction(s.Join)
} }
kit.If(!s.IsLeader(m) && m.Length() == 0, func() { m.SetResult().Echo("请等待管理员创建会议") }) kit.If(!s.IsLeader(m) && m.Length() == 0, func() { m.SetResult().Echo("请等待管理员创建会议") })
s.OtherListCmd(m, s.IssueList, s.DesignList) s.OtherListCmd(m, s.IssueList, s.DesignList)

View File

@ -7,7 +7,7 @@ import (
type Note struct { type Note struct {
Table Table
fields string `data:"to_user_uid,title,content,issue_uid,plan_uid,user_uid"` fields string `data:"to_user_uid,title,content,issue_uid,plan_uid,user_uid"`
create string `name:"create title content to_user_uid" role:"worker"` create string `name:"create title* content* to_user_uid:select" role:"worker"`
remove string `name:"remove" role:"leader"` remove string `name:"remove" role:"leader"`
} }

View File

@ -1,2 +1,3 @@
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; }
body.width1 $output div.item.card>div.output input[type=button][name=issueCreate] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }

View File

@ -15,9 +15,8 @@ type Plan struct {
modify string `name:"modify title* content 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" help:"归类" role:"creator"` setType string `name:"setType plan_type:select" help:"归类" role:"creator"`
setScore string `name:"setScore score" help:"打分" role:"leader"` handover string `name:"handover to_user_uid*:select" role:"leader" help:"交接"`
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"`
} }
@ -59,6 +58,9 @@ func (s Plan) List(m *ice.Message, arg ...string) {
if isLeader && m.Option(model.MARKET_UID) == "" { if isLeader && m.Option(model.MARKET_UID) == "" {
button = append(button, s.MarketInsert) button = append(button, s.MarketInsert)
} }
if isLeader {
button = append(button, s.SetScore)
}
if isCreator { if isCreator {
button = append(button, s.SetType) button = append(button, s.SetType)
} }

View File

@ -1,9 +1,18 @@
Volcanos(chat.ONIMPORT, { 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.unitView(can, value, "score", "星"), can.onimport.textView(can, value, "plan_type"), can.onimport.textView(can, value)]}, {view: html.TITLE, list: [value.title, value.version, can.onimport.spaceView(can, value),
can.onimport.unitView(can, value, "score", "星"), can.onimport.textView(can, value, "plan_type"), can.onimport.textView(can, value)]},
{view: html.STATUS, list: [can.onimport.uidView(can, value), 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),
] }) ] })
}, },
}) })
Volcanos(chat.ONACTION, {
_beforeInputs: function(event, can, button, sub) {
button == "issueCreate" && sub.Prompt("issue_content", "请输入五个功能名,每个功能简单明确,功能之间相互关联环环相扣,例如「工作职责、目标任务、工作报告、工作反馈、绩效评估」。")
button == "issueCreate" && sub.Prompt("end_time", "请在三天之内完善功能清单,在五天之内提交原型链接,需要符合云社区的规范与标准,并及时与项目负责人沟通。")
sub.Option("plan_type", "")
sub.Option("score", "")
},
})

View File

@ -2,6 +2,7 @@ package production
import ( import (
"shylinux.com/x/ice" "shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/web/html"
"shylinux.com/x/community/src/api" "shylinux.com/x/community/src/api"
"shylinux.com/x/community/src/gonganxitong" "shylinux.com/x/community/src/gonganxitong"
@ -12,18 +13,22 @@ import (
type Portal struct { type Portal struct {
guanlixitong.Portal guanlixitong.Portal
placeCreate string `name:"placeCreate city_name* company_name* story_name*" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* story_name*" role:"void"`
// placeCreate string `name:"placeCreate city_name* company_name* story_name* story_type:select" role:"void"`
} }
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, "auth", "title", "项目权限", "", "999") s.SettingCreate(m, "auth", html.TITLE, "项目权限", "", "999")
s.SettingCreate(m, LEADER_APPROVED, "", "允许管理人员审批项目", api.CREATOR, "1000") s.SettingCreate(m, LEADER_APPROVED, "", "允许管理人员审批项目", api.CREATOR, "1000")
s.SettingCreate(m, LEADER_FINISH, "", "允许管理人员验收项目", api.CREATOR, "1001") s.SettingCreate(m, LEADER_FINISH, "", "允许管理人员验收项目", api.CREATOR, "1001")
s.SettingCreate(m, LEADER_PAYFOR, "", "允许管理人员支付项目", api.CREATOR, "1002") s.SettingCreate(m, LEADER_PAYFOR, "", "允许管理人员支付项目", api.CREATOR, "1002")
s.SettingCreate(m, LEADER_PROGRAM, "", "允许管理人员本地开发", api.TECH, "1003") s.SettingCreate(m, LEADER_PROGRAM, "", "允许管理人员本地开发", api.TECH, "1003")
s.SettingCreate(m, CREATOR_PROGRAM, "", "允许创建人本地开发", api.TECH, "1004") s.SettingCreate(m, CREATOR_PROGRAM, "", "允许创建人本地开发", api.TECH, "1004")
s.SettingCreate(m, ISSUE_MAX_CREATE, "input", "每个人最多有多少个项目待审批", api.LEADER, "1005", "2") s.SettingCreate(m, ISSUE_MAX_CREATE, html.INPUT, "每个人最多有多少个项目待审批", api.LEADER, "1005", "2")
s.SettingCreate(m, "date", html.TITLE, "约会配置", api.LEADER, "1010")
s.SettingCreate(m, DATE_START_HOURS, html.INPUT, "会议预约开始时间", api.LEADER, "1011", "14")
s.SettingCreate(m, DATE_STOP_HOURS, html.INPUT, "会议预约结束时间", api.LEADER, "1012", "23")
s.SettingCreate(m, DATE_BEGIN_DAYS, html.INPUT, "会议预约开始日期", api.LEADER, "1013", "2")
s.SettingCreate(m, DATE_END_DAYS, html.INPUT, "会议预约结束日期", api.LEADER, "1014", "3")
} }
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) { func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
if m.PrefixKey() != ice.GetTypeKey(s) { if m.PrefixKey() != ice.GetTypeKey(s) {
@ -45,4 +50,8 @@ const (
LEADER_PROGRAM = "leader_program" LEADER_PROGRAM = "leader_program"
CREATOR_PROGRAM = "creator_program" CREATOR_PROGRAM = "creator_program"
ISSUE_MAX_CREATE = "issue_max_create" ISSUE_MAX_CREATE = "issue_max_create"
DATE_START_HOURS = "date_start_hours"
DATE_STOP_HOURS = "date_stop_hours"
DATE_BEGIN_DAYS = "date_begin_days"
DATE_END_DAYS = "date_end_days"
) )

View File

@ -1,2 +1,4 @@
Volcanos(chat.ONIMPORT, { Volcanos(chat.ONIMPORT, {
}) })
Volcanos(chat.ONACTION, {
})

View File

@ -13,9 +13,6 @@
"style": { "style": {
"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",

View File

@ -11,6 +11,9 @@ type Stat struct {
Tables Tables
order string `data:"8"` order string `data:"8"`
role string `data:"leader,worker"` role string `data:"leader,worker"`
main string `name:"main" help:"主页" style:"notice" role:"void"`
info string `name:"info" help:"详情" style:"notice" role:"void"`
member string `name:"member" help:"成员" style:"notice" role:"void"`
} }
func (s Stat) List(m *ice.Message, arg ...string) { func (s Stat) List(m *ice.Message, arg ...string) {
@ -70,6 +73,7 @@ func (s Stat) List(m *ice.Message, arg ...string) {
kit.If(kit.Int(value["price"]) > 0, func() { good++ }) kit.If(kit.Int(value["price"]) > 0, func() { good++ })
}) })
m.Push("已入门", good) m.Push("已入门", good)
m.PushButton(s.Member, s.Info, s.Main)
}) })
stat := map[string]int{} stat := map[string]int{}
m.Table(func(value ice.Maps) { kit.For(value, func(key, value string) { stat[key] += kit.Int(value) }) }) m.Table(func(value ice.Maps) { kit.For(value, func(key, value string) { stat[key] += kit.Int(value) }) })
@ -91,5 +95,8 @@ func (s Table) Count(m *ice.Message, target ice.Any, field string, arg ...string
m.Cmd(target, s.Select, arg).Table(func(value ice.Maps) { stats[value[field]] = value[model.COUNT] }) m.Cmd(target, s.Select, arg).Table(func(value ice.Maps) { stats[value[field]] = value[model.COUNT] })
return stats return stats
} }
func (s Stat) Member(m *ice.Message, arg ...string) {}
func (s Stat) Info(m *ice.Message, arg ...string) {}
func (s Stat) Main(m *ice.Message, arg ...string) {}
func init() { ice.TeamCtxCmd(Stat{}) } func init() { ice.TeamCtxCmd(Stat{}) }

View File

@ -15,7 +15,16 @@ Volcanos(chat.ONIMPORT, {
can.onimport.unitView(can, value, "界面设计中", "个"), can.onimport.unitView(can, value, "界面设计中", "个"),
]}, ]},
] }, function(event, value) { if (value.story_uid == "0") { return } ] }, function(event, value) { if (value.story_uid == "0") { return }
can.onimport.myStory(can, {index: "web.team.production.portal", args: [value.story_uid]}) can.onimport._story(can.request(event, value), can, "web.team.production.portal")
}) })
}, },
_story: function(event, can, index) {
var msg = can.request(event); can.page.ClassList.del(can, can._fields, "_process")
can.onimport.myStory(can, {index: index, args: [msg.Option("story_uid")]})
},
})
Volcanos(chat.ONACTION, {
main: function(event, can) { can.onimport._story(event, can, "web.team.production.portal") },
info: function(event, can) { can.onimport._story(event, can, "web.team.production.issue") },
member: function(event, can) { can.onimport._story(event, can, "web.team.production.member") },
}) })

View File

@ -1,9 +1,11 @@
$output>div.tabs>div.item.select.PM待评审 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.PM待审批 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.PM待提交 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.PM待验收 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.PM待验收 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.UI待评审 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.UI待审批 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.UI待提交 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.UI待验收 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.UI待验收 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.RD可接单 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.RD可接单 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.RD可编程 { border-top:var(--box-danger) !important; } $output>div.tabs>div.item.select.RD可编程 { border-top:var(--box-danger) !important; }
$output>div.tabs>div.item.select.QA可测试 { border-top:var(--box-danger) !important; } $output div.item.card span.status.PM待审批 { color:var(--danger-bg-color); }
$output div.item.card span.status.PM待验收 { color:var(--danger-bg-color); }
$output div.item.card span.status.UI待审批 { color:var(--danger-bg-color); }
$output div.item.card span.status.UI待验收 { color:var(--danger-bg-color); }
$output div.item.card span.status.RD可编程 { color:var(--danger-bg-color); }

View File

@ -3,7 +3,7 @@ Volcanos(chat.ONIMPORT, {
can.onimport.myViewTabs(can, TYPE, msg, function(value) { return [ can.onimport.myViewTabs(can, TYPE, msg, function(value) { return [
{view: html.TITLE, list: [value.story_name, value.title, can.onimport.textView(can, value, TYPE, STATUS)]}, {view: html.TITLE, list: [value.story_name, value.title, can.onimport.textView(can, value, TYPE, STATUS)]},
{view: html.STATUS, list: [can.onimport.uidView(can, value), 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]}, can.onimport.titleAction(can, value), value.content && {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
] }, function(event, value) { var index = "web.team.production.issue" ] }, function(event, value) { var index = "web.team.production.issue"
switch (value.type) { switch (value.type) {
case "PM可接单": case "PM可接单":

View File

@ -15,7 +15,7 @@ type Task struct {
create string `name:"create issue_uid*:select title* content* space:select path:select begin_time:select@date end_time:select@date" role:"worker"` create string `name:"create issue_uid*:select title* content* space:select path:select begin_time:select@date end_time:select@date" role:"worker"`
modify string `name:"modify title* content* space:select path:select begin_time*:select@date end_time*:select@date" role:"worker"` modify string `name:"modify title* content* space:select path:select begin_time*:select@date end_time*:select@date" role:"worker"`
finish string `name:"finish" role:"worker"` finish string `name:"finish" role:"worker"`
caseCreate string `name:"caseCreate title* content* space:select index:select" role:"worker"` caseCreate string `name:"caseCreate title* content* space:select index:select" role:"leader"`
} }
func (s Task) Create(m *ice.Message, arg ...string) { func (s Task) Create(m *ice.Message, arg ...string) {

View File

@ -9,6 +9,7 @@ Volcanos(chat.ONIMPORT, {
]}, ]},
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value), {view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
] }) ] })
return
if (msg.IsDetail()) { if (msg.IsDetail()) {
can.onappend.plugin(can, { can.onappend.plugin(can, {
height: can.ConfHeight()/2, height: can.ConfHeight()/2,