This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-11-15 20:09:28 +08:00
parent 9c887b3fb3
commit 7277325f0a
4 changed files with 66 additions and 27 deletions

View File

@ -0,0 +1,15 @@
$option div.item.text input {
display:none;
}
$output fieldset.story>form.option>div.item.text {
display:none;
}
$output fieldset.story>form.option>div.item.icon.delete {
display:none;
}
$output fieldset.story>div.output>div.item>div.output div.title>div.action {
display:none;
}
$output fieldset.story>div.status {
display:none;
}

View File

@ -2,7 +2,6 @@ package guanlixitong
import ( import (
"shylinux.com/x/ice" "shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/ctx"
"shylinux.com/x/community/src/api" "shylinux.com/x/community/src/api"
"shylinux.com/x/enterprise/src/guanlixitong/model" "shylinux.com/x/enterprise/src/guanlixitong/model"
@ -39,13 +38,12 @@ func (s company) List(m *ice.Message, arg ...string) {
} else { } else {
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_AUTH, m.Append(model.AUTH_UID)) s.AutoCmdy(m, api.RENZHENGSHOUQUAN_AUTH, m.Append(model.AUTH_UID))
m.Cut("service_uid", "place_uid") m.Cut("service_uid", "place_uid")
defer m.Sort("service_name,place_name")
s.SelectJoinRecent(m, "") s.SelectJoinRecent(m, "")
s.SelectJoinService(m) s.SelectJoinService(m)
m.Sort("service_name,place_name")
} }
} }
m.Display("") m.Display("").DisplayCSS("")
ctx.Toolkit(m.Message, s.Prefix(m, Portal{}))
} }
func (s company) AuthCreate(m *ice.Message, arg ...string) { func (s company) AuthCreate(m *ice.Message, arg ...string) {
msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID)) msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID))

View File

@ -1,30 +1,53 @@
Volcanos(chat.ONIMPORT, { Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { _init: function(can, msg) {
if (can.Option("company_name")) { var list = {}; can.ui = can.onappend.layout(can) if (can.Option("company_name")) {
msg.Table(function(value) { if (list[value.service_uid]) { list[value.service_uid].push(value); return } list[value.service_uid] = [value] can.ui = can.onappend.layout(can), can.onimport.service(can, msg)
can.onimport.item(can, {icon: value.service_icon, name: value.service_name}, function(event, item, show, target) { if (show) { return }
can.runActionCommand(can.request(event, {view: "table", pod: value.nodename}), value.index, [], function(msg) {
can.onimport.itemlist(can, msg.Table(), function(event, item, show, target) { if (show) { return }
can.onimport.itemlist(can, can.core.List(list[value.service_uid], function(value) {
return {icon: value.service_icon, name: value.place_name,
service_uid: value.service_uid, place_uid: value.place_uid,
nodename: value.nodename,
index: value.index,
}
}), function(event, value, show, target) { if (show) { return }
if (can.onmotion.cache(can, function() { return [value.service_uid, value.place_uid, item.index] }, can.ui.content)) { return }
can.onappend.plugin(can, {space: value.nodename, index: item.index, args: [value.place_uid]}, function(sub) {
sub.run = function(event, cmds, cb) { can.request(event, {pod: value.nodename})
can._root.Action.run(event, ["a", "b", ctx.RUN, value.index, ctx.RUN, item.index].concat(cmds), cb)
}
}, can.ui.content)
}, null, target)
}, null, target)
})
})
}), can.db.list = list
} else { } else {
msg.Dump(can) msg.Dump(can)
} }
}, },
service: function(can, msg) { var list = {}
msg.Table(function(value) { if (list[value.service_uid]) { list[value.service_uid].push(value); return } list[value.service_uid] = [value]
can.onimport.item(can, {icon: value.service_icon, name: value.service_name, _hash: value.service_name.split(" ")[0]}, function(event, item, show, target) { if (show) { return }
can.runActionCommand(can.request(event, {view: "table", pod: value.nodename}), value.index, [], function(msg) {
can.onimport.index(can, msg, value, target)
})
})
}), can.db.list = list
},
index: function(can, msg, value, target) {
can.onimport.itemlist(can, msg.Table(function(item) {
item._hash = [value.service_name.split(" ")[0], item.name], item.__title = item.name
return item
}), function(event, item, show, target) {
if (show) { return }
var hash = [value.service_name.split(" ")[0], item.name]
can.onimport.itemlist(can, can.core.List(can.db.list[value.service_uid], function(value) {
value._hash = hash.concat(value.place_name), value.__title = [item.name, value.place_name].join(" ")
value.icon = value.service_icon, value.name = value.place_name
return value
}), function(event, value, show, target) { if (show) { return }
can.onimport.content(can, value, item)
}, null, target)
}, null, target)
},
content: function(can, value, item) {
if (can.onmotion.cache(can, function() { return [value.service_uid, value.place_uid, item.index] }, can.ui.content)) { return }
var uid = can.db.hash[3] && can.db.hash.slice(0, 3).join(",") == value._hash.join(",")? can.db.hash[3]: null
can.onappend.plugin(can, {space: value.nodename, index: item.index, args: [value.place_uid].concat(uid? [uid]: [])}, function(sub) {
sub.run = function(event, cmds, cb) { can.request(event, {pod: value.nodename})
can._root.Action.run(event, ["a", "b", ctx.RUN, value.index, ctx.RUN, item.index].concat(cmds), cb)
}
if (uid) { sub._history.push([value.place_uid]) }
sub.onexport.output = function(_sub, msg) { if (!can.isCmdMode()) { return }
if (msg.IsDetail()) {
can.user.title(value.__title+" "+(msg.Append("name")||msg.Append("title")))
can.onexport.hash(can, value._hash.concat(sub.Option(UID)))
} else {
can.user.title(value.__title)
can.onexport.hash(can, value._hash)
}
}
}, can.ui.content)
},
}) })

View File

@ -0,0 +1,3 @@
$output {
}