mirror of
https://shylinux.com/x/community
synced 2025-04-25 17:48:06 +08:00
add some
This commit is contained in:
parent
a62ada0350
commit
81369d373b
@ -20,14 +20,6 @@ type allow struct {
|
||||
approve string `name:"approve" role:"void"`
|
||||
}
|
||||
|
||||
func (s Table) placeInfo(m *ice.Message) {
|
||||
msg := m.Cmd(s.Place, s.Select, model.UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
s.SelectJoin(msg, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(msg)
|
||||
m.Option(model.CITY_NAME, msg.Append(model.CITY_NAME))
|
||||
m.Option(model.STREET_NAME, msg.Append(s.Keys(s.Street, model.NAME)))
|
||||
m.Option(model.PLACE_NAME, msg.Append(model.NAME))
|
||||
}
|
||||
func (s allow) Create(m *ice.Message, arg ...string) {
|
||||
s.Insert(m.Spawn(), arg...)
|
||||
s.GetCommandUID(m)
|
||||
|
@ -83,7 +83,7 @@ func (s apply) Submit(m *ice.Message, arg ...string) {
|
||||
if m.WarnNotFound(msg.Length() == 0, role.String()) {
|
||||
return
|
||||
}
|
||||
s.placeInfo(m)
|
||||
s.PlaceInfo(m)
|
||||
m.Option(model.FROM_USER_UID, m.Option(model.USER_UID))
|
||||
m.Cmd(s.Prefix(m, allow{}), s.Create, model.APPLY_UID, m.Option(model.UID), model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)), msg.AppendSimple(model.USER_UID), model.STATUS, AllowCreate)
|
||||
s.RecordEvent(m, kit.JoinWord("🕑", m.Trans("role apply submit", "权限申请 已提交"), kit.Cut(m.Option(model.UID), 6), s.TransRole(m), m.Option(model.USER_NAME)), m.Option(model.UID))
|
||||
|
@ -229,6 +229,9 @@ func (s Table) IsLeader(m *ice.Message) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) PlaceInfo(m *ice.Message) {
|
||||
m.Cmdy(s.Prefix(m, Portal{}), s.PlaceInfo)
|
||||
}
|
||||
func (s Table) UserPlaceRole(m *ice.Message) int {
|
||||
return kit.Int(m.Cmdx(s.Prefix(m, Portal{}), s.UserPlaceRole))
|
||||
}
|
||||
|
@ -14,7 +14,4 @@ Volcanos(chat.ONIMPORT, {
|
||||
]
|
||||
})
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.list && can.page.styleHeight(can, can.ui.list, can.ConfHeight()-can.ui.tabs.offsetHeight)
|
||||
},
|
||||
})
|
||||
|
@ -181,6 +181,14 @@ func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.SelectJoinAuth(m)
|
||||
return m
|
||||
}
|
||||
func (s Portal) PlaceInfo(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(s.Place, s.Table.Select, model.UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
s.SelectJoin(msg, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(msg)
|
||||
m.Option(model.CITY_NAME, msg.Append(model.CITY_NAME))
|
||||
m.Option(model.STREET_NAME, msg.Append(s.Keys(s.Street, model.NAME)))
|
||||
m.Option(model.PLACE_NAME, msg.Append(model.NAME))
|
||||
}
|
||||
func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.AUTH_UID) == "" {
|
||||
place_uid := m.Option(s.Keys(s.Place, model.UID))
|
||||
|
@ -1,6 +1,8 @@
|
||||
var UID = "uid", PLACE_UID = "place_uid", PLACE_NAME = "place_name", PLACE_TYPE = "place_type", STREET_NAME = "street_name", CITY_NAME = "city_name"
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.onappend.style(can, html.OUTPUT), can.onimport.myPortal(can, msg) },
|
||||
_init: function(can, msg) {
|
||||
can.onappend.style(can, html.OUTPUT), can.onimport.myPortal(can, msg)
|
||||
},
|
||||
myValue: function(can, value) { return [
|
||||
{view: html.TITLE, list: [value._name, can.onimport.authView(can, value),
|
||||
{text: [value.__type, "", [mdb.TYPE, value._type, value._type_style]]}, value._role != "visitor" && {text: [value.__role, "", [aaa.ROLE, value._role, value._role_style]]},
|
||||
@ -135,8 +137,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onmotion.delay(can, function() { can.onimport.layout(can) }, 300)
|
||||
},
|
||||
myDebug: function(can, msg, target) {
|
||||
can.onmotion.hidden(can, target)
|
||||
return
|
||||
can.onimport.myTitle(can, "My Debug", "我的调试", target)
|
||||
can.page.Append(can, target, [
|
||||
{text: ""+window.innerHeight+"\n"},
|
||||
@ -152,10 +152,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
})
|
||||
Volcanos(chat.ONACTION, {
|
||||
beforeInputs: function(event, can, button, sub) {
|
||||
can._root.Inputs.appendChild(sub._target)
|
||||
can.user.isMobile && can._root.Inputs.appendChild(sub._target)
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._output, html.VISIBILITY, html.HIDDEN)
|
||||
// can.page.insertBefore(can, sub._target, can._root.Action._output)
|
||||
// can.user.isMobile && can.onmotion.toggle(can, can._root.Action._output, false)
|
||||
sub.Option("city_name", "深圳市")
|
||||
sub.Option("street_name", "航城街道")
|
||||
sub.Option("company_name", "云境互联")
|
||||
@ -165,7 +163,6 @@ Volcanos(chat.ONACTION, {
|
||||
},
|
||||
afterInputs: function(event, can, button, target) {
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._output, html.VISIBILITY, "")
|
||||
// can.user.isMobile && can.onmotion.toggle(can, can._root.Action._output, true)
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONEXPORT, {
|
||||
|
@ -1,11 +1,12 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { value.icon = value.icon.split("?")[0]; return [
|
||||
{view: html.TITLE, list: [value.name, can.onimport.textView(can, value, "service_type"), can.onimport.textView(can, value, "service_status")]},
|
||||
can.onimport.myView(can, msg, function(value) { value.icon = value.icon.split("?")[0]; return value.service_status == "online" && [
|
||||
// {view: html.TITLE, list: [value.name, can.onimport.textView(can, value, "service_type"), can.onimport.textView(can, value, "service_status")]},
|
||||
{view: html.TITLE, list: [value.name]},
|
||||
{view: html.STATUS, list: [value.index]},
|
||||
{view: html.STATUS, list: [value.module, value.version]},
|
||||
] }, function(event, value) { can.onaction._goback(can)
|
||||
can.onimport.myPlugin(can, {space: value.space||value.nodename, index: value.index})
|
||||
})
|
||||
},
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user