This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-03-22 12:57:45 +08:00
parent f55256dee2
commit 29d61783d2
17 changed files with 69 additions and 35 deletions

View File

@ -28,8 +28,6 @@ type Gateway struct {
func (s Gateway) List(m *ice.Message, arg ...string) { func (s Gateway) List(m *ice.Message, arg ...string) {
if s.ValueList(m, arg); s.IsLeader(m) { if s.ValueList(m, arg); s.IsLeader(m) {
m.PushAction(s.CreateProject, s.ScanProject, s.Open, s.Modify) m.PushAction(s.CreateProject, s.ScanProject, s.Open, s.Modify)
} else if s.IsWorker(m) {
m.PushAction(s.CreateProject)
} else { } else {
m.PushAction() m.PushAction()
} }

View File

@ -29,7 +29,7 @@ func (s product) Scan(m *ice.Message, arg ...string) {
}) })
} }
func (s product) List(m *ice.Message, arg ...string) { func (s product) List(m *ice.Message, arg ...string) {
if s.ValueList(m, arg); s.IsWorker(m) { if s.ValueList(m, arg); s.IsLeader(m) {
m.PushAction(s.Open, s.Remove) m.PushAction(s.Open, s.Remove)
} else { } else {
m.PushAction(s.Open) m.PushAction(s.Open)

View File

@ -40,8 +40,10 @@ func (s project) Scan(m *ice.Message, arg ...string) {
}) })
} }
func (s project) List(m *ice.Message, arg ...string) { func (s project) List(m *ice.Message, arg ...string) {
if s.ValueList(m, arg); s.IsWorker(m) { if s.ValueList(m, arg); s.IsLeader(m) {
m.PushAction(s.ScanProduct, s.Open, s.Remove) m.PushAction(s.ScanProduct, s.Open, s.Remove)
} else if s.IsWorker(m) {
m.PushAction(s.ScanProduct, s.Open)
} else { } else {
m.PushAction() m.PushAction()
} }

View File

@ -19,7 +19,7 @@ type studio struct {
} }
func (s studio) List(m *ice.Message, arg ...string) { func (s studio) List(m *ice.Message, arg ...string) {
m.Cmdy(s.PrefixPortal(m)).Action().Display("") m.Cmdy(s.PrefixPortal(m)).Action().Display("").DisplayCSS("")
} }
func (s studio) Gateway(m *ice.Message, arg ...string) { func (s studio) Gateway(m *ice.Message, arg ...string) {
if len(arg) < 3 { if len(arg) < 3 {

View File

@ -4,16 +4,21 @@ Volcanos(chat.ONIMPORT, {
}, },
place: function(can, msg) { place: function(can, msg) {
msg.Table(function(value) { msg.Table(function(value) {
can.onimport.item(can, {name: value.cloud_name, _hash: [value.cloud_uid.slice(0, 12)]}, function(event, item, show, target) { can.db.cloud_uid = value.cloud_uid can.onimport.item(can, {icon: "bi bi-phone", name: value.cloud_name, _hash: [value.cloud_uid.slice(0, 12)]}, function(event, item, show, target) { can.db.cloud_uid = value.cloud_uid
show === undefined && can.runAction(event, "gateway", [value.cloud_uid], function(msg) { show === undefined && can.runAction(event, "gateway", [value.cloud_uid], function(msg) {
can.onimport.gateway(can, msg, target, value.cloud_uid) can.onimport.gateway(can, msg, target, value.cloud_uid)
}) })
return true
}, function(event, item, target) {
return {meta: {
open: function() { can.user.open("/s/"+can.misc.Search(can, ice.POD)+"/c/"+"web.team.operation.portal"+"?cloud_uid="+value.cloud_uid) },
}}
}) })
}) })
}, },
gateway: function(can, msg, target, cloud_uid) { gateway: function(can, msg, target, cloud_uid) {
can.onimport.itemlist(can, msg.Table(function(value) { can.onimport.itemlist(can, msg.Table(function(value) {
return {name: value.title, _hash: target._item._hash.concat([value.space.slice(0, 12)]), action: "gateway", cloud_uid: cloud_uid, uid: value.uid, space: can.core.Keys(value.cluster_space, value.space)} return {icon: "bi bi-window-desktop", name: value.title, _hash: target._item._hash.concat([value.space.slice(0, 12)]), action: "gateway", cloud_uid: cloud_uid, uid: value.uid, space: can.core.Keys(value.cluster_space, value.space)}
}), function(event, item, show, target) { can.db.gateway_uid = item.uid }), function(event, item, show, target) { can.db.gateway_uid = item.uid
show === undefined && can.runAction(event, "project", [cloud_uid, item.uid], function(msg) { show === undefined && can.runAction(event, "project", [cloud_uid, item.uid], function(msg) {
if (msg.Length() == 0) { if (msg.Length() == 0) {
@ -22,13 +27,14 @@ Volcanos(chat.ONIMPORT, {
can.onimport.project(can, msg, target, cloud_uid) can.onimport.project(can, msg, target, cloud_uid)
} }
}) })
return true
}, function(event, item, target) { }, function(event, item, target) {
return can.onimport.contexts(can, item, target) return can.onimport.contexts(can, item, target)
}, target) }, target)
}, },
project: function(can, msg, target, cloud_uid) { project: function(can, msg, target, cloud_uid) {
can.onimport.itemlist(can, msg.Table(function(value) { can.onimport.itemlist(can, msg.Table(function(value) {
return {name: value.name, _hash: target._item._hash.concat([value.name]), action: "project", cloud_uid: cloud_uid, uid: value.uid, space: can.core.Keys(target._item.space, value.name)} return {icon: "bi bi-window-sidebar", name: value.name, _hash: target._item._hash.concat([value.name]), action: "project", cloud_uid: cloud_uid, uid: value.uid, space: can.core.Keys(target._item.space, value.name)}
}), function(event, item, show, target) { can.db.project_uid = item.uid }), function(event, item, show, target) { can.db.project_uid = item.uid
show === undefined && can.runAction(event, "product", [cloud_uid, item.uid], function(msg) { show === undefined && can.runAction(event, "product", [cloud_uid, item.uid], function(msg) {
if (msg.Length() == 0) { if (msg.Length() == 0) {
@ -37,22 +43,27 @@ Volcanos(chat.ONIMPORT, {
can.onimport.product(can, msg, target, cloud_uid) can.onimport.product(can, msg, target, cloud_uid)
} }
}) })
return true
}, function(event, item, target) { }, function(event, item, target) {
return can.onimport.contexts(can, item, target) return can.onimport.contexts(can, item, target)
}, target) }, target)
}, },
product: function(can, msg, target, cloud_uid) { product: function(can, msg, target, cloud_uid) {
can.onimport.itemlist(can, msg.Table(function(value) { can.onimport.itemlist(can, msg.Table(function(value) {
return {name: value.name, _hash: target._item._hash.concat([value.index]), action: "product", cloud_uid: cloud_uid, uid: value.uid, space: target._item.space, index: value.index} return {icon: "bi bi-phone", name: value.name, _hash: target._item._hash.concat([value.index]), action: "product", cloud_uid: cloud_uid, uid: value.uid, space: target._item.space, index: value.index}
}), function(event, item, show, target) { can.db.product_uid = item.uid }), function(event, item, show, target) { can.db.product_uid = item.uid
can.onimport.plugin(can, item, target) can.onimport.plugin(can, item, target)
}, function() {}, target) }, function(event, item, target) {
return {meta: {
open: function() { can.user.open("/s/"+item.space+"/c/"+item.index) },
}}
}, target)
}, },
contexts: function(can, item, target) { contexts: function(can, item, target) {
return {meta: { return {meta: {
portal: function() { can.onappend.plugin(can._root.Action, {index: web.CHAT_IFRAME, args: "/s/"+item.space+"/c/portal", style: html.FLOAT, title: item.name}) }, portal: function() { can.onappend.plugin(can._root.Action, {index: web.CHAT_IFRAME, args: "/s/"+item.space+"/c/portal", style: html.FLOAT, title: item.name}) },
desktop: function() { can.onimport.plugin(can, item, target, web.DESKTOP) }, desktop: function() { can.onimport.plugin(can, item, target, web.DESKTOP) },
admin: function() { can.onappend.plugin(can._root.Action, {index: web.CHAT_IFRAME, args: "/s/"+item.space, style: html.FLOAT, title: item.name}) }, admin: function() { can.onappend.plugin(can._root.Action, {index: web.CHAT_IFRAME, args: "/s/"+item.space+"/c/admin", style: html.FLOAT, title: item.name}) },
word: function() { can.onimport.plugin(can, item, target, web.WORD) }, word: function() { can.onimport.plugin(can, item, target, web.WORD) },
vimer: function() { can.onimport.plugin(can, item, target, web.VIMER) }, vimer: function() { can.onimport.plugin(can, item, target, web.VIMER) },
runtime: function() { can.onimport.plugin(can, item, target, cli.RUNTIME) }, runtime: function() { can.onimport.plugin(can, item, target, cli.RUNTIME) },
@ -72,7 +83,9 @@ Volcanos(chat.ONIMPORT, {
height: can.ConfHeight(), width: can.ConfWidth()-can.ui.project.offsetWidth, style: can.base.isIn(index, cli.XTERM, web.DESKTOP)? html.OUTPUT: "", height: can.ConfHeight(), width: can.ConfWidth()-can.ui.project.offsetWidth, style: can.base.isIn(index, cli.XTERM, web.DESKTOP)? html.OUTPUT: "",
title: index == web.DESKTOP? item.name: "", title: index == web.DESKTOP? item.name: "",
}, function(sub) { }, function(sub) {
sub.run = function(event, cmds, cb) { can.runAction(event, item.action, [item.cloud_uid, item.uid, index].concat(cmds), cb) } sub.run = function(event, cmds, cb) { var msg = can.request(event); delete(msg.pod)
can.runAction(event, item.action, [item.cloud_uid, item.uid, index].concat(cmds), cb)
}
can._plugins = (can._plugins||[]).concat(sub) can._plugins = (can._plugins||[]).concat(sub)
}, can.ui.content) }, can.ui.content)
}) })

View File

@ -9,7 +9,7 @@ import (
type Case struct { type Case struct {
Table Table
order string `data:"3"` order string `data:"4"`
fields string `data:"title,content,case_status,process_time,finish_time,plan_uid,user_uid"` fields string `data:"title,content,case_status,process_time,finish_time,plan_uid,user_uid"`
create string `name:"create title* content*" role:"leader,worker"` create string `name:"create title* content*" role:"leader,worker"`
modify string `name:"modify title* content*" role:"leader,worker"` modify string `name:"modify title* content*" role:"leader,worker"`

View File

@ -1,6 +1,6 @@
{ {
"portal": "产品迭代", "member": "项目成员", "portal": "产品迭代", "member": "项目成员",
"plan": "迭代计划", "issue": "产品需求", "task": "开发任务", "case": "测试用例", "plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例",
"planBind": "绑定计划", "process": "开始", "planBind": "绑定计划", "process": "开始",
"issueCreate": "创建需求", "taskCreate": "创建任务", "caseCreate": "创建用例", "issueCreate": "创建需求", "taskCreate": "创建任务", "caseCreate": "创建用例",
"style": { "style": {
@ -13,6 +13,7 @@
"icons": { "icons": {
"plan": "https://img.icons8.com/officel/80/timeline-week.png", "plan": "https://img.icons8.com/officel/80/timeline-week.png",
"issue": "https://img.icons8.com/officel/80/communication.png", "issue": "https://img.icons8.com/officel/80/communication.png",
"design": "https://img.icons8.com/officel/80/web-design.png",
"task": "https://img.icons8.com/officel/80/tasks.png", "task": "https://img.icons8.com/officel/80/tasks.png",
"case": "https://img.icons8.com/officel/80/faq.png" "case": "https://img.icons8.com/officel/80/faq.png"
}, },

View File

@ -10,7 +10,7 @@ import (
type task struct { type task struct {
Table Table
Case Case Case Case
order string `data:"3"` order string `data:"4"`
fields string `data:"title,content,task_status,case_count,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,user_uid"` fields string `data:"title,content,task_status,case_count,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,user_uid"`
create string `name:"create title* content* begin_time:select@date end_time:select@date" role:"leader,worker"` create string `name:"create title* content* begin_time:select@date end_time:select@date" role:"leader,worker"`
modify string `name:"modify title* content* begin_time*:select@date end_time*:select@date" role:"leader,worker"` modify string `name:"modify title* content* begin_time*:select@date end_time*:select@date" role:"leader,worker"`

View File

@ -1,4 +1,4 @@
package gonganxitong package {{.Option "zone"}}
import "shylinux.com/x/ice" import "shylinux.com/x/ice"

View File

@ -103,7 +103,7 @@
"85e9ad5c568cceaa0aa273431f2cfcc2": { "85e9ad5c568cceaa0aa273431f2cfcc2": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.dashboard.document", "index": "web.team.dashboard.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",
@ -176,7 +176,7 @@
"e3b889de9ace6b7f42008f8e0732effc": { "e3b889de9ace6b7f42008f8e0732effc": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.dashboard.photo", "index": "web.team.dashboard.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",

View File

@ -89,7 +89,7 @@
"8922cdd711b3060411b079fa8f39ba72": { "8922cdd711b3060411b079fa8f39ba72": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.development.photo", "index": "web.team.development.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",
@ -180,7 +180,7 @@
"e347aded50c684b8e3118ba359a56039": { "e347aded50c684b8e3118ba359a56039": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.development.document", "index": "web.team.development.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",

View File

@ -21,7 +21,7 @@
"22574299a657140d473f0216b8d83710": { "22574299a657140d473f0216b8d83710": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.gonganxitong.document", "index": "web.team.gonganxitong.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",
@ -73,7 +73,7 @@
"882a999b4a72a9866d9e4eef110d335a": { "882a999b4a72a9866d9e4eef110d335a": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.gonganxitong.photo", "index": "web.team.gonganxitong.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",

View File

@ -128,7 +128,7 @@
"8548d5ce3faee7bd508d2fb53d57f35b": { "8548d5ce3faee7bd508d2fb53d57f35b": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.guanlixitong.photo", "index": "web.team.guanlixitong.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",
@ -240,7 +240,7 @@
"e595a0bbefbcfaa89f45dd875cc6fe0b": { "e595a0bbefbcfaa89f45dd875cc6fe0b": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.guanlixitong.document", "index": "web.team.guanlixitong.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",

View File

@ -1,4 +1,15 @@
{ {
"03acc6ed03fa47e9639f1e5c459c3b50": {
"meta": {
"auth": "issued",
"icons": "https://img.icons8.com/officel/80/activity-grid.png",
"index": "web.team.operation.template",
"name": "云模板",
"order": "2",
"role": "leader,worker",
"time": "2025-03-14 20:51:15.546"
}
},
"03f7f410d292fb30026cbcd99290e943": { "03f7f410d292fb30026cbcd99290e943": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
@ -48,7 +59,7 @@
"icons": "https://img.icons8.com/officel/80/activity-grid.png", "icons": "https://img.icons8.com/officel/80/activity-grid.png",
"index": "web.team.operation.product", "index": "web.team.operation.product",
"name": "云服务", "name": "云服务",
"order": "4", "order": "5",
"time": "2025-03-05 10:40:39.748" "time": "2025-03-05 10:40:39.748"
} }
}, },
@ -80,7 +91,7 @@
"icons": "https://img.icons8.com/officel/80/activity-grid.png", "icons": "https://img.icons8.com/officel/80/activity-grid.png",
"index": "web.team.operation.project", "index": "web.team.operation.project",
"name": "云项目", "name": "云项目",
"order": "3", "order": "4",
"role": "leader,worker", "role": "leader,worker",
"time": "2025-03-05 10:40:39.740" "time": "2025-03-05 10:40:39.740"
} }
@ -99,7 +110,7 @@
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"enable": "false", "enable": "false",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.operation.photo", "index": "web.team.operation.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",
@ -171,7 +182,7 @@
"icons": "https://img.icons8.com/officel/80/activity-grid.png", "icons": "https://img.icons8.com/officel/80/activity-grid.png",
"index": "web.team.operation.gateway", "index": "web.team.operation.gateway",
"name": "云主机", "name": "云主机",
"order": "2", "order": "3",
"portal": "true", "portal": "true",
"time": "2025-03-05 12:13:06.405" "time": "2025-03-05 12:13:06.405"
} }
@ -180,7 +191,7 @@
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"enable": "false", "enable": "false",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.operation.document", "index": "web.team.operation.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",

View File

@ -98,10 +98,19 @@
"time": "2024-09-03 15:44:28.507" "time": "2024-09-03 15:44:28.507"
} }
}, },
"73b81840f26d2885c065d19e08e923f1": {
"meta": {
"icons": "https://img.icons8.com/officel/80/web-design.png",
"index": "web.team.production.design",
"name": "界面设计",
"order": "3",
"time": "2025-03-21 08:49:22.166"
}
},
"7cf76afacb83fabb3d6a6ffaf48b6066": { "7cf76afacb83fabb3d6a6ffaf48b6066": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.production.document", "index": "web.team.production.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",
@ -180,7 +189,7 @@
"c9559beab992f8b46b9cfa4a196e61e8": { "c9559beab992f8b46b9cfa4a196e61e8": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.production.photo", "index": "web.team.production.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",

View File

@ -2,7 +2,7 @@
"015b4784c16b63975824abbb3ff4ec9f": { "015b4784c16b63975824abbb3ff4ec9f": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.renzhengshouquan.photo", "index": "web.team.renzhengshouquan.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",
@ -23,7 +23,7 @@
"1c4fee90e6a7bdb8ab6f1ccb23f3273f": { "1c4fee90e6a7bdb8ab6f1ccb23f3273f": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.renzhengshouquan.document", "index": "web.team.renzhengshouquan.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",

View File

@ -129,7 +129,7 @@
"ceaca87cf0d112aec124ad24298e189e": { "ceaca87cf0d112aec124ad24298e189e": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/ios-photos.png", "icons": "https://img.icons8.com/officel/80/ios-photos.png",
"index": "web.team.storage.photo", "index": "web.team.storage.photo",
"name": "在线相册", "name": "在线相册",
"order": "95", "order": "95",
@ -190,7 +190,7 @@
"f6f77c7a5e247a742c2699564c4507a1": { "f6f77c7a5e247a742c2699564c4507a1": {
"meta": { "meta": {
"auth": "issued", "auth": "issued",
"icons": "https://img.icons8.com/officel/50/documents.png", "icons": "https://img.icons8.com/officel/80/documents.png",
"index": "web.team.storage.document", "index": "web.team.storage.document",
"name": "在线文档", "name": "在线文档",
"order": "93", "order": "93",