mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 17:18:06 +08:00
add some
This commit is contained in:
parent
7c9e9abc92
commit
9406833239
@ -8,6 +8,10 @@ import (
|
||||
"shylinux.com/x/enterprise/src/guanlixitong/model"
|
||||
)
|
||||
|
||||
type Tables struct {
|
||||
gonganxitong.Tables
|
||||
list string `name:"list group_uid uid auto" role:"void"`
|
||||
}
|
||||
type Table struct {
|
||||
gonganxitong.Table
|
||||
list string `name:"list group_uid uid auto" role:"void"`
|
||||
|
@ -1,20 +1,12 @@
|
||||
package guanlixitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/enterprise/src/guanlixitong/model"
|
||||
)
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
type groupUser struct {
|
||||
portal portal
|
||||
Tables
|
||||
userGroup userGroup
|
||||
list string `name:"list group_uid uid auto" help:"团队成员" icon:"https://img.icons8.com/officel/80/crowd.png" role:"void"`
|
||||
}
|
||||
|
||||
func (s groupUser) Init(m *ice.Message, arg ...string) {
|
||||
s.portal.Show(m, model.ROLE, "creator,leader")
|
||||
}
|
||||
func (s groupUser) List(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.userGroup, s.userGroup.User, arg).Display("")
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
if (msg.IsDetail()) { can.onexport.share_title(can, msg, "user_group_role"); return msg.Show(can) }
|
||||
can.onimport.itemcards(can, msg, function(value) { value._style = [value.user_group_role]
|
||||
_init: function(can, msg) { var USER_GROUP_ROLE = "user_group_role"
|
||||
if (msg.IsDetail()) { can.onexport.share_title(can, msg, USER_GROUP_ROLE); return msg.Show(can) }
|
||||
can.onimport.itemcards(can, msg, function(value) { value._style = [value[USER_GROUP_ROLE]]
|
||||
return [
|
||||
{view: html.TITLE, list: [{text: value.user_name},
|
||||
{text: [can.user.transValue(can, value, "user_group_role"), "", aaa.ROLE]},
|
||||
{text: [can.user.transValue(can, value, USER_GROUP_ROLE), "", [aaa.ROLE, value[USER_GROUP_ROLE]]]},
|
||||
]},
|
||||
{view: html.STATUS, list: [{text: value.uid.slice(0, 6)}, {text: can.base.TimeTrim(value.created_at)}]},
|
||||
]
|
||||
|
@ -3,32 +3,31 @@
|
||||
"scanQRCode": "扫码添加",
|
||||
"placeCreate": "创建团队",
|
||||
"placeRemove": "解散团队",
|
||||
"groupUser": "团队成员",
|
||||
"target": "目标计划",
|
||||
"icons": {
|
||||
"groupUser": "https://img.icons8.com/officel/80/crowd.png",
|
||||
"target": "https://img.icons8.com/officel/80/goal--v1.png"
|
||||
},
|
||||
"input": {
|
||||
"My Group": "我的团队",
|
||||
"user_name": "用户昵称",
|
||||
"user_avatar": "用户头像",
|
||||
"user_group_role": "用户角色",
|
||||
"group_uid": "团队",
|
||||
"group_name": "团队名称",
|
||||
"group_type": "团队类型",
|
||||
"company_name": "公司名称"
|
||||
},
|
||||
"value": {
|
||||
"group_type": {
|
||||
"RD": "研发",
|
||||
"icons": {
|
||||
"RD": "https://img.icons8.com/officel/80/code.png"
|
||||
}
|
||||
},
|
||||
"user_group_role": {
|
||||
"creator": "创建人",
|
||||
"visitor": "访客",
|
||||
"leader": "领导",
|
||||
"member": "组员"
|
||||
},
|
||||
"group_type": {
|
||||
"RD": "研发",
|
||||
"icons": {
|
||||
"RD": "https://img.icons8.com/officel/80/code.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,14 +1,15 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
if (msg.IsDetail()) { var value = msg.TableDetail(); msg.Option("_share_content", value.content)
|
||||
msg.Option("_share_title", can.base.trimPrefix(value.created_at.split(" ")[0], can.base.Time(null, "%y-")))
|
||||
return msg.Show(can)
|
||||
}
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [{text: value.user_name},
|
||||
{text: [can.user.transValue(can, value, "user_group_role"), "", aaa.ROLE]},
|
||||
{text: can.base.TimeTrim(value.created_at)},
|
||||
]},
|
||||
{view: html.STATUS, list: [{text: value.content}]},
|
||||
{view: html.STATUS, list: [{text: value.uid.slice(0, 6)}, {text: can.base.TimeTrim(value.created_at)},]},
|
||||
{view: html.OUTPUT, list: [{text: value.content}]},
|
||||
] })
|
||||
if (msg.IsDetail()) { var value = msg.TableDetail(); msg.Option("_share_content", value.content)
|
||||
msg.Option("_share_title", can.base.trimPrefix(value.created_at.split(" ")[0], can.base.Time(null, "%y-")))
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user