mirror of
https://shylinux.com/x/operation
synced 2025-07-01 21:21:19 +08:00
add some
This commit is contained in:
parent
01bf28a044
commit
ec9ae2faa8
@ -31,6 +31,7 @@ func (s Case) Cancel(m *ice.Message, arg ...string) {
|
|||||||
s.taskCount(m)
|
s.taskCount(m)
|
||||||
}
|
}
|
||||||
func (s Case) List(m *ice.Message, arg ...string) {
|
func (s Case) List(m *ice.Message, arg ...string) {
|
||||||
|
defer kit.If(!s.IsLeader(m), func() { m.Action() })
|
||||||
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)
|
||||||
|
@ -36,6 +36,7 @@ type Table struct {
|
|||||||
preview string `name:"preview" role:"worker"`
|
preview string `name:"preview" role:"worker"`
|
||||||
program string `name:"program" role:"worker"`
|
program string `name:"program" role:"worker"`
|
||||||
join string `name:"join" help:"入会" style:"notice" role:"void"`
|
join string `name:"join" help:"入会" style:"notice" role:"void"`
|
||||||
|
replay string `name:"replay" help:"回放" style:"notice" role:"void"`
|
||||||
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*:select@upload" help:"上传附件" role:"worker"`
|
fileCreate string `name:"fileCreate title* content file_type*:select file_link*:select@upload" help:"上传附件" role:"worker"`
|
||||||
@ -98,6 +99,14 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
|||||||
} else {
|
} else {
|
||||||
s.Hash.Inputs(m, arg...)
|
s.Hash.Inputs(m, arg...)
|
||||||
}
|
}
|
||||||
|
case "date":
|
||||||
|
for i := 0; i < 5; i++ {
|
||||||
|
m.Push(arg[0], strings.Split(m.Time(kit.Format("%dh", i*24)), " ")[0])
|
||||||
|
}
|
||||||
|
case "time":
|
||||||
|
for i := 38; i < 48; i++ {
|
||||||
|
m.Push(arg[0], kit.Format("%02d:%s", i/2, kit.Select("30", "00", i%2 == 0)))
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
switch m.Option(ctx.ACTION) {
|
switch m.Option(ctx.ACTION) {
|
||||||
case "discuss":
|
case "discuss":
|
||||||
@ -207,7 +216,7 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
if isLeader {
|
if isLeader {
|
||||||
button = append(button, s.Reject)
|
button = append(button, s.Reject)
|
||||||
}
|
}
|
||||||
if user_uid == value[model.USER_UID] {
|
if value[model.USER_UID] == user_uid {
|
||||||
button = append(button, s.Modify, s.Remove)
|
button = append(button, s.Modify, s.Remove)
|
||||||
}
|
}
|
||||||
case IssueRejected:
|
case IssueRejected:
|
||||||
@ -215,16 +224,16 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
button = append(button, s.Trash)
|
button = append(button, s.Trash)
|
||||||
}
|
}
|
||||||
case IssueApproved:
|
case IssueApproved:
|
||||||
if user_uid == value[model.USER_UID] {
|
if isLeader || value[model.USER_UID] == user_uid {
|
||||||
button = append(button, s.Process)
|
button = append(button, s.Process)
|
||||||
}
|
}
|
||||||
case IssueProcess:
|
case IssueProcess:
|
||||||
if user_uid == value[model.USER_UID] {
|
|
||||||
button = append(button, s.Submit)
|
|
||||||
}
|
|
||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, arg...)
|
button = append(button, arg...)
|
||||||
}
|
}
|
||||||
|
if value[model.USER_UID] == user_uid {
|
||||||
|
button = append(button, s.Submit)
|
||||||
|
}
|
||||||
if isLeaderFinish {
|
if isLeaderFinish {
|
||||||
button = append(button, s.Cancel)
|
button = append(button, s.Cancel)
|
||||||
}
|
}
|
||||||
@ -238,7 +247,7 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
if isWorker && value[model.LINK] != "" {
|
if isWorker && value[model.LINK] != "" {
|
||||||
button = append(button, s.Preview)
|
button = append(button, s.Preview)
|
||||||
}
|
}
|
||||||
if isWorker {
|
if isLeader || value[model.USER_UID] == user_uid {
|
||||||
button = append(button, s.FileCreate)
|
button = append(button, s.FileCreate)
|
||||||
}
|
}
|
||||||
if isWorker {
|
if isWorker {
|
||||||
@ -254,7 +263,7 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
if isWorker && value[model.LINK] != "" {
|
if isWorker && value[model.LINK] != "" {
|
||||||
button = append(button, s.Preview)
|
button = append(button, s.Preview)
|
||||||
}
|
}
|
||||||
if value[model.USER_UID] == m.Option(ice.MSG_USERUID) && PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish {
|
if value[model.USER_UID] == user_uid && PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish {
|
||||||
button = append(button, s.FileCreate)
|
button = append(button, s.FileCreate)
|
||||||
} else if isLeader {
|
} else if isLeader {
|
||||||
button = append(button, s.FileCreate)
|
button = append(button, s.FileCreate)
|
||||||
@ -262,7 +271,7 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, arg ...ice.Any) {
|
|||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, arg...)
|
button = append(button, arg...)
|
||||||
}
|
}
|
||||||
if isLeaderPayfor && value[model.SCORE] == "0" {
|
if isLeaderPayfor {
|
||||||
button = append(button, s.SetScore)
|
button = append(button, s.SetScore)
|
||||||
}
|
}
|
||||||
if isLeaderPayfor && PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish {
|
if isLeaderPayfor && PlanStatus(kit.Int(value[model.PLAN_STATUS])) != PlanFinish {
|
||||||
@ -480,7 +489,15 @@ 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(Meet{}.Join)
|
m.Table(func(value ice.Maps) {
|
||||||
|
button := []ice.Any{}
|
||||||
|
defer func() { m.PushButton(button...) }()
|
||||||
|
if strings.Split(value[model.BEGIN_TIME], " ")[0] == strings.Split(m.Time(), " ")[0] {
|
||||||
|
button = append(button, s.Join)
|
||||||
|
} else if kit.Contains(value[model.CONTENT], "iframe", "http") {
|
||||||
|
button = append(button, s.Replay)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
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{})
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
$output th { box-shadow:none; color:var(--disable-fg-color); font-style:italic; padding:10px; }
|
$output th { box-shadow:none; color:var(--disable-fg-color); font-style:italic; padding:10px; }
|
||||||
$output td { border:var(--box-border); padding:0; cursor:pointer; }
|
|
||||||
$output th:first-child { position:sticky; left:2px; z-index:1; }
|
$output th:first-child { position:sticky; left:2px; z-index:1; }
|
||||||
|
$output td { border:var(--box-border); padding:0; cursor:pointer; }
|
||||||
|
$output div.item.card div.title div.space { flex-grow:1; }
|
||||||
|
$output div.item.card div.title span.type.项目验收 { color:var(--danger-bg-color); }
|
||||||
|
$output div.item.card div.title span.type.方向规划 { color:var(--danger-bg-color); }
|
@ -62,7 +62,7 @@ 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)
|
s.SettingSelect(m)
|
||||||
head := []string{}
|
head := []string{}
|
||||||
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++ {
|
for i := -kit.Int(m.OptionDefault("date_begin", kit.Select(m.Option(DATE_BEGIN_DAYS), "1", 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{}
|
||||||
|
@ -3,15 +3,15 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.page.Append(can, can._output, [{type: html.TABLE, className: "content scroll 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: can.user.trans(can, "time", "时间")}].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)? can.user.trans(can, "(today)", "(今天)"): ""
|
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, className: today? "today": "", inner: value+today}
|
||||||
}))}]},
|
}))}]},
|
||||||
{type: html.TBODY, list: can.core.List(list, function(time) {
|
{type: html.TBODY, list: can.core.List(list, function(time) {
|
||||||
return {type: html.TR, list: [{type: html.TH, inner: time}].concat(can.core.List(head, function(date) {
|
return {type: html.TR, list: [{type: html.TH, inner: time}].concat(can.core.List(head, function(date) {
|
||||||
return {type: html.TD, list: msg.Table(function(value) { if (!can.base.beginWith(value.begin_time, date+" "+time)) { return }
|
return {type: html.TD, list: msg.Table(function(value) { if (!can.base.beginWith(value.begin_time, date+" "+time)) { return }
|
||||||
return {view: html.ITEM, _init: function(target) { var msg = can.request({}); msg.Push(value)
|
return {view: html.ITEM, _init: function(target) { var msg = can.request({}); msg.Push(value)
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, value.meet_type]},
|
{view: html.TITLE, list: [value.title, can.onimport.spaceView(can, value), can.onimport.textView(can, value, "meet_type")]},
|
||||||
{view: html.STATUS, list: [value.story_name, value.user_name]},
|
{view: html.STATUS, list: [value.story_name, value.user_name.split("@")[0]]},
|
||||||
] }, function(event, value) { can.onkeymap.prevent(event)
|
] }, function(event, value) { can.onkeymap.prevent(event)
|
||||||
can.onimport.myStory(can, {index: "web.team.production.meet", args: [value.story_uid, value.uid]})
|
can.onimport.myStory(can, {index: "web.team.production.meet", args: [value.story_uid, value.uid]})
|
||||||
}, target)
|
}, target)
|
||||||
|
@ -22,23 +22,20 @@ func (s Deal) Create(m *ice.Message, arg ...string) {
|
|||||||
s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID))
|
s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID))
|
||||||
}
|
}
|
||||||
func (s Deal) List(m *ice.Message, arg ...string) {
|
func (s Deal) List(m *ice.Message, arg ...string) {
|
||||||
|
defer kit.If(!s.IsCreator(m), func() { m.Action() })
|
||||||
if s.IsLeader(m) {
|
if s.IsLeader(m) {
|
||||||
s.ValueList(m, arg).PushAction()
|
s.ValueList(m, arg)
|
||||||
s.StatusPrice(m, arg...)
|
|
||||||
} else {
|
} else {
|
||||||
if len(arg) == 1 {
|
if len(arg) == 1 {
|
||||||
s.Select(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID)).PushAction().Action()
|
s.Select(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID))
|
||||||
kit.If(m.Length() == 0, func() { m.Echo("请等待管理人员支付工钱") })
|
kit.If(m.Length() == 0, func() { m.Echo("请等待管理人员支付工钱") })
|
||||||
} else {
|
} else {
|
||||||
s.SelectDetail(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID), model.UID, arg[1]).PushAction().Action()
|
s.SelectDetail(m, model.STORY_UID, arg[0], model.TO_USER_UID, m.Option(model.USER_UID), model.UID, arg[1])
|
||||||
s.DoneMessage(m)
|
s.DoneMessage(m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if m.Display(""); s.IsLeader(m) {
|
m.PushAction()
|
||||||
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
m.RenameAppend(model.TO_USER_UID, model.USER_UID).Display("")
|
||||||
} else {
|
|
||||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
|
||||||
}
|
|
||||||
s.OtherListCmd(m, s.IssueList, s.DesignList)
|
s.OtherListCmd(m, s.IssueList, s.DesignList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ func (s Design) Submit(m *ice.Message, arg ...string) {
|
|||||||
s.sendTemplate(m, "", msg.Append(model.USER_UID), "")
|
s.sendTemplate(m, "", msg.Append(model.USER_UID), "")
|
||||||
}
|
}
|
||||||
func (s Design) List(m *ice.Message, arg ...string) {
|
func (s Design) List(m *ice.Message, arg ...string) {
|
||||||
|
defer kit.If(!s.IsLeader(m), func() { m.Action() })
|
||||||
s.Orders(m, model.STATUS, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
s.Orders(m, model.STATUS, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg)
|
||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
|
@ -3,6 +3,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
msg.IsDetail() && msg.Option("_share_content", msg.Append("design_content"))
|
msg.IsDetail() && msg.Option("_share_content", msg.Append("design_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),
|
||||||
// msg.IsTech() && value.price > 0 && can.onimport.unitView(can, value, "price", "元"),
|
// msg.IsTech() && value.price > 0 && can.onimport.unitView(can, value, "price", "元"),
|
||||||
value.score != "3" && can.onimport.unitView(can, value, "score", "星"),
|
value.score != "3" && can.onimport.unitView(can, value, "score", "星"),
|
||||||
can.onimport.textView(can, value, "status"),
|
can.onimport.textView(can, value, "status"),
|
||||||
|
@ -25,11 +25,17 @@ 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).Display(""); s.IsLeader(m) {
|
defer kit.If(!s.IsLeader(m), func() { m.Action() })
|
||||||
m.PushAction(s.Download, s.Remove)
|
s.ValueList(m, arg).Display("").Table(func(value ice.Maps) {
|
||||||
} else {
|
button := []ice.Any{}
|
||||||
m.PushAction()
|
defer func() { m.PushButton(button...) }()
|
||||||
|
if s.IsLeader(m) || value[model.USER_UID] == m.Option(ice.MSG_USERUID) {
|
||||||
|
button = append(button, s.Download)
|
||||||
}
|
}
|
||||||
|
if s.IsCreator(m) {
|
||||||
|
button = append(button, s.Remove)
|
||||||
|
}
|
||||||
|
})
|
||||||
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) {
|
||||||
|
@ -55,6 +55,7 @@ func (s Issue) List(m *ice.Message, arg ...string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
isCreator, isWorker := s.IsCreator(m), s.IsWorker(m)
|
isCreator, isWorker := s.IsCreator(m), s.IsWorker(m)
|
||||||
|
defer kit.If(!s.IsLeader(m), func() { m.Action() })
|
||||||
msg := m.Cmd(Design{}, s.Select, model.STORY_UID, arg[0], m.OptionSimple(model.USER_UID), model.STATUS, IssueCreate)
|
msg := m.Cmd(Design{}, s.Select, model.STORY_UID, arg[0], m.OptionSimple(model.USER_UID), model.STATUS, IssueCreate)
|
||||||
// s.Orders(m, model.STATUS, model.DESIGN_COUNT, model.TASK_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
// s.Orders(m, model.STATUS, model.DESIGN_COUNT, model.TASK_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||||
s.Orders(m, model.STATUS, model.DESIGN_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
s.Orders(m, model.STATUS, model.DESIGN_COUNT, s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
|
msg.IsDetail() && msg.Append("score") > 3 && msg.Option("_share_title", msg.Append("title")+" "+msg.Append("score")+"星")
|
||||||
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),
|
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"),
|
||||||
|
2
src/production/meet.css
Normal file
2
src/production/meet.css
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
$output div.item.card div.title span.type.项目验收 { color:var(--danger-bg-color); }
|
||||||
|
$output div.item.card div.title span.type.方向规划 { color:var(--danger-bg-color); }
|
@ -1,6 +1,7 @@
|
|||||||
package production
|
package production
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
@ -15,7 +16,7 @@ type Meet struct {
|
|||||||
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*:select from_user_uid*:select to_user_uid*:select title* content* meet_type*:select 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 title content meet_link" role:"leader"`
|
||||||
remove string `name:"remove" role:"leader"`
|
remove string `name:"remove" role:"leader"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,19 +30,28 @@ func (s Meet) Create(m *ice.Message, arg ...string) {
|
|||||||
s.SendTemplate(m, "", "", "")
|
s.SendTemplate(m, "", "", "")
|
||||||
}
|
}
|
||||||
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) {
|
defer kit.If(!s.IsLeader(m), func() { m.Action() })
|
||||||
|
s.Orders(m, s.Desc(model.BEGIN_TIME))
|
||||||
|
s.ValueList(m, arg).Display("").DisplayCSS("")
|
||||||
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
||||||
m.PushAction(s.Join, s.Remove)
|
m.Table(func(value ice.Maps) {
|
||||||
} else {
|
button := []ice.Any{}
|
||||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
defer func() { m.PushButton(button...) }()
|
||||||
m.PushAction(s.Join)
|
if kit.Contains(value[model.CONTENT], "iframe", "http") {
|
||||||
|
button = append(button, s.Replay)
|
||||||
|
} else if strings.Split(value[model.BEGIN_TIME], " ")[0] == strings.Split(m.Time(), " ")[0] {
|
||||||
|
button = append(button, s.Join, s.Modify, s.Remove)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Meet{}) }
|
func init() { ice.TeamCtxCmd(Meet{}) }
|
||||||
|
|
||||||
|
func (s Table) Replay(m *ice.Message, arg ...string) {
|
||||||
|
}
|
||||||
|
|
||||||
type MeetType int
|
type MeetType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,9 +5,22 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
msg.Option("_share_content", "时间: "+can.base.trimPrefix(value.begin_time, can.base.Time(null, "%y-")).slice(0, -3)+"\n"+value.content)
|
msg.Option("_share_content", "时间: "+can.base.trimPrefix(value.begin_time, can.base.Time(null, "%y-")).slice(0, -3)+"\n"+value.content)
|
||||||
}
|
}
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, value.meet_type, can.onimport.titleAction(can, value)]},
|
// {view: html.TITLE, list: [value.title, value.meet_type, can.onimport.titleAction(can, value)]},
|
||||||
{view: html.STATUS, list: [can.onimport.uidView(can, value), value.user_name, value.begin_time+" ~ "+value.end_time.split(" ")[1]]},
|
{view: html.TITLE, list: [value.title, can.onimport.spaceView(can, value), can.onimport.textView(can, value, "meet_type")]},
|
||||||
{view: html.OUTPUT, list: [value.content]},
|
{view: html.STATUS, list: [can.onimport.uidView(can, value), value.begin_time, value.user_name]},
|
||||||
|
// {view: html.STATUS, list: [can.onimport.uidView(can, value), value.user_name, value.begin_time+" ~ "+value.end_time.split(" ")[1]]},
|
||||||
|
// can.onimport.contentView(can, value),
|
||||||
|
can.onimport.titleAction(can, value),
|
||||||
] })
|
] })
|
||||||
|
can.page.Select(can, can._output, html.IFRAME, function(target) {
|
||||||
|
// can.page.style(can, target, html.HEIGHT, can.user.isMobile? 210: can.ConfHeight()-200)
|
||||||
|
can.page.style(can, target, html.HEIGHT, can.user.isMobile? 210: 540)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
Volcanos(chat.ONACTION, {
|
||||||
|
replay: function(event, can, button) { if (can.Option(UID)) { return }
|
||||||
|
var msg = can.request(event);
|
||||||
|
can.onimport.myStory(can, {index: "web.team.production.meet", args: [msg.Option("story_uid"), msg.Option("uid")]})
|
||||||
},
|
},
|
||||||
})
|
})
|
@ -1,3 +1,4 @@
|
|||||||
// 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; }
|
||||||
|
$output div.item.card>div.output span.status.待接单 { color:var(--danger-bg-color); }
|
||||||
body.width1 $output div.item.card>div.output input[type=button][name=issueCreate] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
body.width1 $output div.item.card>div.output input[type=button][name=issueCreate] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
@ -33,7 +33,7 @@ func (s Plan) Create(m *ice.Message, arg ...string) {
|
|||||||
s.SendMessage(m, "", "")
|
s.SendMessage(m, "", "")
|
||||||
}
|
}
|
||||||
func (s Plan) List(m *ice.Message, arg ...string) {
|
func (s Plan) List(m *ice.Message, arg ...string) {
|
||||||
isCreator, isLeader, isWorker := s.IsCreator(m), s.IsLeader(m), s.IsWorker(m)
|
isLeader, isWorker := s.IsLeader(m), s.IsWorker(m)
|
||||||
defer kit.If(!isLeader, func() {
|
defer kit.If(!isLeader, func() {
|
||||||
if m.Action(); m.Length() == 0 {
|
if m.Action(); m.Length() == 0 {
|
||||||
m.SetResult("请等待「管理员」创建迭代计划")
|
m.SetResult("请等待「管理员」创建迭代计划")
|
||||||
@ -42,14 +42,14 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
|||||||
s.SettingSelect(m)
|
s.SettingSelect(m)
|
||||||
issue_max_create := kit.Int(m.Option(ISSUE_MAX_CREATE))
|
issue_max_create := kit.Int(m.Option(ISSUE_MAX_CREATE))
|
||||||
msg := m.Cmd(Issue{}, s.Select, model.STORY_UID, arg[0], m.OptionSimple(model.USER_UID), model.STATUS, IssueCreate)
|
msg := m.Cmd(Issue{}, s.Select, model.STORY_UID, arg[0], m.OptionSimple(model.USER_UID), model.STATUS, IssueCreate)
|
||||||
s.Orders(m, model.STATUS, model.ISSUE_COUNT, s.Desc(model.SCORE), s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
s.Orders(m, model.STATUS, model.ISSUE_COUNT, s.Desc(model.TYPE), s.Desc(model.SCORE), s.Desc(model.UPDATED_AT)).Limit(m, 300)
|
||||||
s.ValueList(m, arg).Table(func(value ice.Maps) {
|
s.ValueList(m, arg).Table(func(value ice.Maps) {
|
||||||
button := []ice.Any{}
|
button := []ice.Any{}
|
||||||
defer func() { m.PushButton(button...) }()
|
defer func() { m.PushButton(button...) }()
|
||||||
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.Handover, s.Modify, s.Remove)
|
button = append(button, s.Process, s.Modify, s.Remove)
|
||||||
}
|
}
|
||||||
case PlanProcess:
|
case PlanProcess:
|
||||||
if isWorker && kit.Int(value[model.ISSUE_COUNT]) == 0 && msg.Length() < issue_max_create {
|
if isWorker && kit.Int(value[model.ISSUE_COUNT]) == 0 && msg.Length() < issue_max_create {
|
||||||
@ -61,7 +61,7 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
|||||||
if isLeader {
|
if isLeader {
|
||||||
button = append(button, s.SetScore)
|
button = append(button, s.SetScore)
|
||||||
}
|
}
|
||||||
if isCreator {
|
if isLeader {
|
||||||
button = append(button, s.SetType)
|
button = append(button, s.SetType)
|
||||||
}
|
}
|
||||||
if isLeader {
|
if isLeader {
|
||||||
@ -77,7 +77,7 @@ func (s Plan) List(m *ice.Message, arg ...string) {
|
|||||||
if isLeader {
|
if isLeader {
|
||||||
button = append(button, s.SetScore)
|
button = append(button, s.SetScore)
|
||||||
}
|
}
|
||||||
if isCreator {
|
if isLeader {
|
||||||
button = append(button, s.SetType)
|
button = append(button, s.SetType)
|
||||||
}
|
}
|
||||||
if isLeader {
|
if isLeader {
|
||||||
@ -102,9 +102,11 @@ 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)...)
|
||||||
|
m.ProcessHold()
|
||||||
}
|
}
|
||||||
func (s Plan) SetScore(m *ice.Message, arg ...string) {
|
func (s Plan) SetScore(m *ice.Message, arg ...string) {
|
||||||
s.Modify(m, arg...)
|
s.Modify(m, arg...)
|
||||||
|
m.ProcessHold()
|
||||||
}
|
}
|
||||||
func (s Plan) Handover(m *ice.Message, arg ...string) {
|
func (s Plan) Handover(m *ice.Message, arg ...string) {
|
||||||
m.OptionDefault(model.TO_USER_UID, m.Option(ice.MSG_USERUID))
|
m.OptionDefault(model.TO_USER_UID, m.Option(ice.MSG_USERUID))
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
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", "plan_type"], msg, function(value) {
|
||||||
|
if (value.plan_status == "process" && value.issue_count == "0") { value.plan_status = "待接单" }
|
||||||
|
return [
|
||||||
{view: html.TITLE, list: [value.title, value.version, can.onimport.spaceView(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)]},
|
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, {
|
Volcanos(chat.ONACTION, {
|
||||||
|
@ -28,15 +28,19 @@ func (s Task) Remove(m *ice.Message, arg ...string) {
|
|||||||
s.issueCount(m).DashboardUpdate(m)
|
s.issueCount(m).DashboardUpdate(m)
|
||||||
}
|
}
|
||||||
func (s Task) List(m *ice.Message, arg ...string) {
|
func (s Task) List(m *ice.Message, arg ...string) {
|
||||||
|
defer kit.If(!s.IsLeader(m), func() { m.Action() })
|
||||||
s.Orders(m, model.STATUS, model.CASE_COUNT, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
s.Orders(m, model.STATUS, model.CASE_COUNT, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
||||||
s.ValueList(m, arg)
|
s.ValueList(m, arg)
|
||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
m.Table(func(value ice.Maps) {
|
m.Table(func(value ice.Maps) {
|
||||||
if IssueStatus(kit.Int(value[model.STATUS])) == IssueFinish {
|
button := []ice.Any{}
|
||||||
s.PushTaskButton(m, value, s.Program)
|
if s.IsLeader(m) || value[model.USER_UID] == m.Option(ice.MSG_USERUID) {
|
||||||
} else {
|
button = append(button, s.Program)
|
||||||
s.PushTaskButton(m, value, s.Program, s.CaseCreate)
|
|
||||||
}
|
}
|
||||||
|
if IssueStatus(kit.Int(value[model.STATUS])) != IssueFinish {
|
||||||
|
button = append(button, s.CaseCreate)
|
||||||
|
}
|
||||||
|
s.PushTaskButton(m, value, button...)
|
||||||
}).RenameAppend(model.STATUS, model.TASK_STATUS).Display("")
|
}).RenameAppend(model.STATUS, model.TASK_STATUS).Display("")
|
||||||
s.OtherListCmd(m, s.IssueList, s.DesignList, s.CaseList)
|
s.OtherListCmd(m, s.IssueList, s.DesignList, s.CaseList)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user