mirror of
https://shylinux.com/x/community
synced 2025-04-25 09:38:06 +08:00
add some
This commit is contained in:
parent
c2e75e5870
commit
e472396fb5
@ -13,7 +13,7 @@ type allow struct {
|
||||
apply apply
|
||||
event event
|
||||
portal Portal
|
||||
order string `data:"93"`
|
||||
order string `data:"503"`
|
||||
role string `data:"creator"`
|
||||
create string `name:"create apply_uid* place_uid* user_uid* status*"`
|
||||
reject string `name:"reject" role:"void"`
|
||||
|
@ -12,7 +12,7 @@ type apply struct {
|
||||
user user
|
||||
event event
|
||||
portal Portal
|
||||
order string `data:"92"`
|
||||
order string `data:"502"`
|
||||
role string `data:"creator"`
|
||||
create string `name:"create user_place_role*:select begin_time:select@date end_time:select@date" role:"void"`
|
||||
cancel string `name:"cancel" role:"void"`
|
||||
|
@ -382,13 +382,15 @@ func (s Table) SpaceCmd(m *ice.Message, space string, arg ...ice.Any) *ice.Messa
|
||||
}
|
||||
func (s Table) FindSpaceCmd(m *ice.Message, cmd ice.Any) ice.Any {
|
||||
route := map[string]string{
|
||||
"web.team.dashboard.portal": "20240903-operation",
|
||||
"web.team.dashboard.summary": "20240903-operation",
|
||||
"web.team.renzhengshouquan.portal": "20240724-community",
|
||||
web.TEAM_RENZHENGSHOUQUAN_AUTH: "20240724-community",
|
||||
"web.team.gonganxitong.domain": "20240724-community",
|
||||
web.TEAM_GONGANXITONG_USER: "20240724-community",
|
||||
web.CODE_MYSQL_CLIENT: "20240724-community",
|
||||
web.CODE_MYSQL_CLIENT: "20240724-community",
|
||||
web.TEAM_GONGANXITONG_USER: "20240724-community",
|
||||
web.TEAM_GONGANXITONG_DOMAIN: "20240724-community",
|
||||
web.TEAM_RENZHENGSHOUQUAN_PORTAL: "20240724-community",
|
||||
web.TEAM_RENZHENGSHOUQUAN_AUTH: "20240724-community",
|
||||
web.TEAM_DASHBOARD_PORTAL: "20240903-operation",
|
||||
web.TEAM_DASHBOARD_SUMMARY: "20240903-operation",
|
||||
web.TEAM_STORAGE_PORTAL: "20240903-operation",
|
||||
web.TEAM_STORAGE_FILE: "20240903-operation",
|
||||
}
|
||||
cmds := ice.GetTypeKey(cmd)
|
||||
if space, ok := route[cmds]; ok && space != ice.Info.NodeName {
|
||||
|
@ -30,7 +30,6 @@ func (s email) List(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s email) Apply(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess()()
|
||||
msg := m.Cmd(s.user, s.user.Select, model.UID, m.Option(model.USER_UID))
|
||||
if m.Warn(msg.Append(model.EMAIL) != "", m.Trans("email already exists", "邮箱已存在")) {
|
||||
return
|
||||
@ -42,7 +41,6 @@ func (s email) Apply(m *ice.Message, arg ...string) {
|
||||
kit.If(!m.IsErr(), func() { m.Cmdy(s.user, s.user.Email, m.Option(aaa.USERNAME)) })
|
||||
}
|
||||
func (s email) Reset(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess()()
|
||||
msg := m.Cmd(s.user, s.user.Select, model.UID, m.Option(model.USER_UID))
|
||||
if m.WarnNotFound(msg.Append(model.EMAIL) == "", model.EMAIL) {
|
||||
return
|
||||
|
@ -13,7 +13,7 @@ type event struct {
|
||||
user user
|
||||
command command
|
||||
service service
|
||||
order string `data:"94"`
|
||||
order string `data:"504"`
|
||||
role string `data:"creator"`
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ type market struct {
|
||||
thumb thumb
|
||||
comment comment
|
||||
favor favor
|
||||
order string `data:"101"`
|
||||
order string `data:"901"`
|
||||
create string `name:"create domain_uid* title* content" role:"void"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
thumbToggle string `name:"thumbToggle" role:"void"`
|
||||
|
@ -46,7 +46,4 @@ Volcanos(chat.ONIMPORT, {
|
||||
var target = can.page.SelectOne(can, event.currentTarget, html.SPAN)
|
||||
can.runAction(can.request(event, value), button, [], function(msg) { target.innerHTML = msg.Result() })
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.list && can.page.styleHeight(can, can.ui.list, can.ConfHeight()-can.ui.tabs.offsetHeight)
|
||||
},
|
||||
})
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
type member struct {
|
||||
Tables
|
||||
user user
|
||||
order string `data:"81"`
|
||||
order string `data:"101"`
|
||||
}
|
||||
|
||||
func (s member) List(m *ice.Message, arg ...string) {
|
||||
|
@ -12,7 +12,7 @@ type message struct {
|
||||
Table
|
||||
command command
|
||||
service service
|
||||
order string `data:"102"`
|
||||
order string `data:"902"`
|
||||
create string `name:"create from_user_uid to_user_uid"`
|
||||
read string `name:"read" role:"void"`
|
||||
done string `name:"done" role:"void"`
|
||||
|
@ -14,4 +14,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
]
|
||||
})
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.list && can.page.styleHeight(can, can.ui.list, can.ConfHeight()-can.ui.tabs.offsetHeight)
|
||||
},
|
||||
})
|
||||
|
@ -40,6 +40,11 @@ const (
|
||||
AUTH_TYPE = "auth_type"
|
||||
AUTH_STATUS = "auth_status"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
DASHBOARD_NAME = "dashboard_name"
|
||||
DASHBOARD_TYPE = "dashboard_type"
|
||||
STORAGE_UID = "storage_uid"
|
||||
STORAGE_NAME = "storage_name"
|
||||
STORAGE_TYPE = "storage_type"
|
||||
QRCODE_TYPE = "qrcode_type"
|
||||
APPLY_UID = "apply_uid"
|
||||
APPLY_STATUS = "apply_status"
|
||||
|
@ -2,7 +2,6 @@ package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
@ -10,7 +9,7 @@ import (
|
||||
|
||||
type notice struct {
|
||||
Table
|
||||
order string `data:"95"`
|
||||
order string `data:"505"`
|
||||
fields string `data:"title,content,user_uid"`
|
||||
create string `name:"create title* content*" role:"landlord,teacher,leader"`
|
||||
remove string `name:"remove" role:"landlord,teacher,leader"`
|
||||
@ -31,7 +30,6 @@ func (s notice) Remove(m *ice.Message, arg ...string) {
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s notice) List(m *ice.Message, arg ...string) {
|
||||
s.Table.FieldsWithCreatedAT(m, s, kit.TransArgs(kit.Split(m.Config(mdb.FIELDS), ",", ","))...)
|
||||
if len(arg) == 1 {
|
||||
s.Select(m, model.PLACE_UID, arg[0])
|
||||
} else if len(arg) == 2 {
|
||||
@ -40,6 +38,11 @@ func (s notice) List(m *ice.Message, arg ...string) {
|
||||
return
|
||||
}
|
||||
s.SelectJoinUser(m)
|
||||
kit.If(s.IsLeader(m), func() {
|
||||
m.PushAction(s.Remove)
|
||||
}, func() {
|
||||
m.Action()
|
||||
})
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(notice{Table: newTable()}) }
|
||||
|
@ -1,4 +1,9 @@
|
||||
body.dark { --plugin-bg-color:#0d1117; --output-bg-color:#171a22; }
|
||||
body.mobile fieldset.Action div.input.float { position:static; }
|
||||
body.mobile fieldset.Action div.input.float table { width:100%; }
|
||||
body.mobile div.upload.float div.action { display:flex; }
|
||||
body.mobile div.upload.float div.action div.item.upload { flex-grow:1; }
|
||||
body.mobile div.upload.float div.action div.item.upload input { width:100%; }
|
||||
$action { background-color:transparent; position:absolute; top:0; width:100%; z-index:1; }
|
||||
$action div.item.button { margin-right:5px; padding:0; height:48px; align-items:center; }
|
||||
$action div.item.button input { border:none; background-color:var(--plugin-bg-color); color:var(--notice-bg-color); min-width:60px; display:unset; }
|
||||
@ -12,6 +17,7 @@ $output>div>div.list { box-shadow:var(--box-shadow); border-radius:10px; backgro
|
||||
$output>div>div.list.mycount { min-height:105px; }
|
||||
$output>div>div.list>div.title { font-weight:bold; display:flex; align-items:center; }
|
||||
$output>div>div.list>div.title span:first-child { flex-grow:1; }
|
||||
$output>div>div.list>div.title div.action { overflow:hidden; }
|
||||
$output>div>div.list>div.title div.action div.item { margin-right:5px; }
|
||||
$output>div>div.list>div.title div.action div.item.button.icons input { display:none; }
|
||||
$output>div>div.list>div.role:not(.hide) { display:flex; align-items:center; justify-content:space-around; }
|
||||
@ -97,6 +103,9 @@ $output>fieldset.market>div.output>div.list div.item.card div.output div.action
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.output { padding:10px 0; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action div.item.done { color:var(--notice-bg-color); }
|
||||
body.mobile div.input.float { position:absolute; top:0 !important; margin:0; width:100% !important; max-width:100% !important; }
|
||||
fieldset.web.team.storage.file div.item.card div.title span:first-child {
|
||||
flex-grow:1;
|
||||
}
|
||||
body.mobile div.input.float input[name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body.light.mobile { --plugin-bg-color:#f4f5f9; --output-bg-color:#fefefd; }
|
||||
body.mobile fieldset.panel.Action>div.output { background-color:var(--plugin-bg-color); }
|
||||
|
@ -186,7 +186,7 @@ func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
|
||||
place_uid := m.Option(s.Keys(s.Place, model.UID))
|
||||
place_name := m.Option(s.Keys(s.Place, model.NAME))
|
||||
m.Option(model.COMPANY_NAME, m.Option(s.Keys(s.Street, model.NAME)))
|
||||
msg := m.Cmd(s.FindSpaceCmd(m, "web.team.renzhengshouquan.portal"), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME),
|
||||
msg := m.Cmd(s.FindSpaceCmd(m, web.TEAM_RENZHENGSHOUQUAN_PORTAL), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME),
|
||||
model.AUTH_TYPE, ice.AUTO, model.AUTH_NAME, place_name, model.FROM_UID, ice.AUTO)
|
||||
if msg.IsErr() {
|
||||
m.Copy(msg)
|
||||
@ -195,6 +195,7 @@ func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
|
||||
m.Cmd(s.Place, s.UpdateAuth, msg.Option(model.AUTH_UID), model.UID, place_uid)
|
||||
s.RecordEventWithName(m.Options(model.NAME, place_name, model.UID, place_uid), "")
|
||||
msg.Cmd(s.Prefix(m, s), s.AfterPlaceAuth)
|
||||
s.StorageCreate(m, "")
|
||||
} else {
|
||||
m.ProcessHold()
|
||||
}
|
||||
@ -262,23 +263,30 @@ func (s Portal) AfterPlaceRemove(m *ice.Message, arg ...string) {}
|
||||
func (s Portal) BeforePlaceAuth(m *ice.Message, arg ...string) {}
|
||||
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {}
|
||||
|
||||
func (s Portal) DashboardCreate(m *ice.Message, name string, arg ...string) *ice.Message {
|
||||
func (s Portal) DashboardCreate(m *ice.Message, name string, arg ...string) func() {
|
||||
kit.If(name == "", func() { name = m.Option(s.Keys(s.Place, model.NAME)) })
|
||||
m.Cmdy(s.FindSpaceCmd(m, "web.team.dashboard.portal"), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.CLIENT_NAME, name, model.CLIENT_TYPE, "0")
|
||||
m.Cmd(s.FindSpaceCmd(m, web.TEAM_RENZHENGSHOUQUAN_AUTH), "dashboard", m.Option(model.AUTH_UID), m.Option(model.CLIENT_UID))
|
||||
return m
|
||||
m.Cmdy(s.FindSpaceCmd(m, web.TEAM_DASHBOARD_PORTAL), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.DASHBOARD_NAME, name, model.DASHBOARD_TYPE, "0")
|
||||
m.Cmd(s.FindSpaceCmd(m, web.TEAM_RENZHENGSHOUQUAN_AUTH), "dashboard", m.Option(model.AUTH_UID), m.Option(model.DASHBOARD_UID))
|
||||
return func() { s.DashboardUpdate(m) }
|
||||
}
|
||||
func (s Portal) DashboardInsert(m *ice.Message, score, title string, index ice.Any, field string, arg ...ice.Any) *ice.Message {
|
||||
func (s Portal) DashboardInsert(m *ice.Message, score, title string, index ice.Any, field string, arg ...ice.Any) {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, s.Keys(s.Place, model.UID), m.Option(s.Keys(s.Place, model.UID))) })
|
||||
return m.Cmd(s.FindSpaceCmd(m, "web.team.dashboard.summary"), s.Insert,
|
||||
model.TITLE, title, model.SPACE, m.Option(ice.MSG_USERPOD), model.INDEX, s.Prefix(m, index), model.QUERY, kit.Format(arg), mdb.FIELD, field, model.SCORE, score,
|
||||
m.OptionSimple(model.CLIENT_UID))
|
||||
m.Cmd(s.FindSpaceCmd(m, web.TEAM_DASHBOARD_SUMMARY), s.Insert, model.SPACE, m.Option(ice.MSG_USERPOD), model.INDEX, s.Prefix(m, index),
|
||||
model.QUERY, kit.Format(arg), mdb.FIELD, field, model.TITLE, title, model.SCORE, score, m.OptionSimple(model.DASHBOARD_UID))
|
||||
}
|
||||
func (s Portal) DashboardUpdate(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.DASHBOARD_UID) != "" {
|
||||
m.Cmd(s.FindSpaceCmd(m, "web.team.dashboard.summary"), "scan", kit.Dict(model.CLIENT_UID, m.Option(model.DASHBOARD_UID)))
|
||||
m.Cmd(s.FindSpaceCmd(m, web.TEAM_DASHBOARD_SUMMARY), "scan", kit.Dict(m.OptionSimple(model.DASHBOARD_UID)))
|
||||
}
|
||||
}
|
||||
func (s Portal) StorageCreate(m *ice.Message, name string, arg ...string) {
|
||||
kit.If(name == "", func() { name = m.Option(s.Keys(s.Place, model.NAME)) })
|
||||
m.Cmdy(s.FindSpaceCmd(m, web.TEAM_STORAGE_PORTAL), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.STORAGE_NAME, name, model.STORAGE_TYPE, "0")
|
||||
m.Cmd(s.FindSpaceCmd(m, web.TEAM_RENZHENGSHOUQUAN_AUTH), "storage", m.Option(model.AUTH_UID), m.Option(model.STORAGE_UID))
|
||||
}
|
||||
func (s Portal) StorageInsert(m *ice.Message, title, content string) {
|
||||
m.Cmd(s.FindSpaceCmd(m, web.TEAM_STORAGE_FILE), s.Insert, model.TITLE, title, model.CONTENT, content, m.OptionSimple(model.STORAGE_UID, model.USER_UID))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(Portal{Table: newTable()}) }
|
||||
|
||||
|
@ -23,9 +23,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
if (can.db.hash.length > 1 && can.db.hash[1]) {
|
||||
msg.Table(function(value) {
|
||||
can.onimport.myTrans(can, value, PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME)
|
||||
if (value._uid == can.db.hash[0]) {
|
||||
can.onexport.value(can, value)
|
||||
}
|
||||
if (value._uid == can.db.hash[0]) { can.onexport.value(can, value) }
|
||||
})
|
||||
return can.run({}, [ctx.COMMAND, can.db.hash[1]], function(msg) { msg.Table(function(value) {
|
||||
value.args = [can.db.hash[0]].concat(can.db.hash.slice(2)), can.onimport.myStory(can, value)
|
||||
@ -42,7 +40,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
function showIndex(msg) { if (msg.Length() == 0) { return }
|
||||
can.onmotion.toggle(can, can.ui.mycount, true)
|
||||
can.onmotion.toggle(can, can.ui.myallow, true)
|
||||
|
||||
can.onimport.myDebug(can, msg, can.ui.mydebug)
|
||||
can.onimport.myCount(can, msg, can.ui.mycount)
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex, USER_PLACE_ROLE), can.onexport.index(can, can.sup.current)
|
||||
@ -54,7 +51,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
} else {
|
||||
var _msg = can.request({}); if (msg.Option(PLACE_NAME)) {
|
||||
_msg.Push(kit.Dict(UID, "", msg.OptionSimple(PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME, "auth_status", "dashboard_uid")))
|
||||
} _msg.Option(ice.MSG_ACTION, msg.Option(USER_PLACE_ROLE) == "visitor"? '[]': '["placeCreate","placeSearch"]')
|
||||
}
|
||||
// _msg.Option(ice.MSG_ACTION, msg.Option(USER_PLACE_ROLE) == "visitor"? '[]': '["placeCreate"]')
|
||||
can.onimport.myPlace(can, _msg, can.ui.myplace)
|
||||
if (_msg.Length() == 0) {
|
||||
can.onimport.myOrder(can, msg, can.ui.myorder)
|
||||
@ -116,19 +114,23 @@ Volcanos(chat.ONIMPORT, {
|
||||
var output = can.page.Append(can, target, [html.OUTPUT])._target; can.onimport.myList(can, _msg, output)
|
||||
},
|
||||
myIndex: function(can, msg, target, USER_PLACE_ROLE) { can.onimport.myTitle(can, "My Index", "我的应用", target)
|
||||
var role = can.page.Append(can, target, [{view: aaa.ROLE, list: can.core.Item(can.Conf("_trans.value."+USER_PLACE_ROLE), function(key, value) {
|
||||
var list = ["visitor", "creator", "leader", "worker", "server"]
|
||||
var _list = can.Conf("_trans.value."+USER_PLACE_ROLE)
|
||||
can.core.Item(_list, function(key) { list.indexOf(key) == -1 && list.push(key) })
|
||||
var role = can.page.Append(can, target, [{view: aaa.ROLE, list: can.core.List(list, function(key) {
|
||||
var value = _list[key]; if (!value) { return }
|
||||
if (can.base.isIn(key, ctx.STYLE, mdb.ICONS)) { return }
|
||||
return {text: [can.user.trans(can, key, value), "", key], onclick: function(event) {
|
||||
can.onexport.value(can, can.sup.current), can.onexport.index(can, can.sup.current, key), can.onmotion.select(can, role, html.SPAN, event.target)
|
||||
}}
|
||||
}) }])._target; can.ui.role = role
|
||||
can.onimport.mySplit(can, msg, target, 0, 90)
|
||||
can.onimport.mySplit(can, msg, target, 0, 500)
|
||||
},
|
||||
myAllow: function(can, msg, target) { can.onimport.myTitle(can, "My Allow", "我的权限", target)
|
||||
can.onimport.mySplit(can, msg, target, 89, 100)
|
||||
can.onimport.mySplit(can, msg, target, 500, 900)
|
||||
},
|
||||
myOrder: function(can, msg, target) { can.onimport.myTitle(can, "My Order", "我的系统", target)
|
||||
can.onimport.mySplit(can, msg, target, 99, 1000), can.onimport.layout(can), can.onexport.value(can, can.sup.current)
|
||||
can.onimport.mySplit(can, msg, target, 900, 1000), can.onimport.layout(can), can.onexport.value(can, can.sup.current)
|
||||
can.onmotion.delay(can, function() { can.onimport.layout(can) }, 30)
|
||||
can.onmotion.delay(can, function() { can.onimport.layout(can) }, 300)
|
||||
},
|
||||
@ -142,26 +144,28 @@ Volcanos(chat.ONIMPORT, {
|
||||
])
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.tabs && can.ui.list && can.page.styleHeight(can, can.ui.list, can.ConfHeight()-can.ui.tabs.offsetHeight)
|
||||
if (can.ui.action && can.ui.output) {
|
||||
can.page.style(can, can.ui.output, html.HEIGHT, can.ConfHeight() - can.ui.action.offsetHeight)
|
||||
can.user.isMobile && can.page.style(can, can.ui.output, html.HEIGHT, window.innerHeight - can.ui.action.offsetHeight)
|
||||
can.page.style(can, can.ui.output, html.HEIGHT, (can.user.isMobile? window.innerHeight: can.ConfHeight()) - can.ui.action.offsetHeight)
|
||||
}
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONACTION, {
|
||||
beforeInputs: function(event, can, button, target) {
|
||||
can.page.insertBefore(can, target._target, can._root.Header._target)
|
||||
beforeInputs: function(event, can, button, sub) {
|
||||
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)
|
||||
return
|
||||
target.Option("city_name", "深圳市", true)
|
||||
target.Option("street_name", "航城街道", true)
|
||||
target.Option("company_name", "宝安妇幼", true)
|
||||
target.Option("queue_name", "二楼产检")
|
||||
target.Option("reception_name", "科室1")
|
||||
target.Option("volume_amount", "100")
|
||||
sub.Option("city_name", "深圳市")
|
||||
sub.Option("street_name", "航城街道")
|
||||
sub.Option("company_name", "云境互联")
|
||||
sub.Option("queue_name", "二楼产检")
|
||||
sub.Option("reception_name", "科室1")
|
||||
sub.Option("volume_amount", "100")
|
||||
},
|
||||
afterInputs: function(event, can, button, target) {
|
||||
can.user.isMobile && can.onmotion.toggle(can, can._root.Action._target, true)
|
||||
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, {
|
||||
@ -173,7 +177,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
can.user.agent.init(can, value.city_name+" "+value._street)
|
||||
can.page.Select(can, can.ui._target, "div.item.card.uid-"+value._uid, function(item) { can.onmotion.select(can, can.ui._target, html.DIV_ITEM, item) })
|
||||
can.ui.mycount && can.onimport.myCount(can, value, can.ui.mycount), can.ui.myinit && can.onimport.myInit(can, can._index_msg, value, can.ui.myinit)
|
||||
can.ui.myallow && can.onmotion.toggle(can, can.ui.myallow, can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0)
|
||||
can.ui.myallow && can.onmotion.toggle(can, can.ui.myallow, value._role == "creator" || can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0)
|
||||
},
|
||||
index: function(can, value, role) { role = role||value._role
|
||||
can.ui.role && can.onmotion.toggle(can, can.ui.role, value._role == "creator")
|
||||
@ -181,7 +185,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
can.page.Select(can, can.ui.myindex, html.DIV_ITEM, function(target) { var list = target.className.split(" ")
|
||||
if (list.indexOf(mdb.TYPE) > -1 && list.indexOf(value._type) == -1) {
|
||||
can.onmotion.toggle(can, target, false)
|
||||
} else if (list.indexOf(aaa.ROLE) > -1 && list.indexOf(role) == -1) {
|
||||
} else if (list.indexOf(aaa.ROLE) > -1 && (list.indexOf(role) == -1 && role != "creator")) {
|
||||
can.onmotion.toggle(can, target, false)
|
||||
} else {
|
||||
can.onmotion.toggle(can, target, true)
|
||||
|
@ -96,6 +96,7 @@
|
||||
}
|
||||
},
|
||||
"message_status": {
|
||||
"all": "全部",
|
||||
"create": "未读",
|
||||
"read": "待办",
|
||||
"done": "完成",
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
type qrcode struct {
|
||||
Tables
|
||||
portal Portal
|
||||
order string `data:"91"`
|
||||
order string `data:"501"`
|
||||
role string `data:"creator"`
|
||||
apply string `name:"apply" role:"void"`
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
type recent struct {
|
||||
Table
|
||||
service service
|
||||
order string `data:"103"`
|
||||
order string `data:"903"`
|
||||
create string `name:"create service_uid args"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
open string `name:"open" role:"void"`
|
||||
|
@ -1,7 +1,7 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { var args = can.core.Split(value.args)
|
||||
value.icons = can.misc.Resource(can, value.service_icon, value.space); if (value.score > 0) { value._style = ["sticky"] }
|
||||
value.icons = can.misc.Resource(can, value.service_icon.split("?")[0], value.space); if (value.score > 0) { value._style = ["sticky"] }
|
||||
return [
|
||||
{view: html.TITLE, list: [value.place_name, can.onimport.authView(can, value), can.onimport.timeView(can, value)]},
|
||||
{view: html.STATUS, list: [value.city_name, value.street_name, value.service_name]},
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
type service struct {
|
||||
Table
|
||||
order string `data:"104"`
|
||||
order string `data:"904"`
|
||||
update string `name:"update index name icon"`
|
||||
autogen string `name:"autogen name* help* class* table*" icon:"bi bi-plus-square-dotted"`
|
||||
oauth string `name:"oauth" icon:"bi bi-shield-fill-check"`
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
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")]},
|
||||
{view: html.STATUS, list: [value.index]},
|
||||
{view: html.STATUS, list: [value.module, value.version]},
|
||||
|
@ -4,7 +4,7 @@ import "shylinux.com/x/ice"
|
||||
|
||||
type support struct {
|
||||
Table
|
||||
order string `data:"105"`
|
||||
order string `data:"905"`
|
||||
}
|
||||
|
||||
func (s support) List(m *ice.Message, arg ...string) {}
|
||||
|
@ -4,6 +4,7 @@ import "shylinux.com/x/ice"
|
||||
|
||||
type {{.Option "table"}} struct {
|
||||
Table
|
||||
order string `data:"1"`
|
||||
fields string `data:"title,content,user_uid"`
|
||||
create string `name:"create title* content*" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
|
@ -66,6 +66,9 @@ func (s auth) Revoke(m *ice.Message, arg ...string) {
|
||||
func (s auth) Dashboard(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(model.DASHBOARD_UID, arg[1]), model.UID, arg[0])
|
||||
}
|
||||
func (s auth) Storage(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(model.STORAGE_UID, arg[1]), model.UID, arg[0])
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(auth{}) }
|
||||
|
||||
|
@ -18,6 +18,7 @@ const (
|
||||
AUTH_TYPE = "auth_type"
|
||||
AUTH_STATUS = "auth_status"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
STORAGE_UID = "storage_uid"
|
||||
CERT_UID = "cert_uid"
|
||||
COMPANY_UID = "company_uid"
|
||||
COMPANY_NAME = "company_name"
|
||||
@ -33,6 +34,7 @@ type UserAuth struct {
|
||||
type Auth struct {
|
||||
db.ModelWithUID
|
||||
DashboardUID string `gorm:"type:char(32)"`
|
||||
StorageUID string `gorm:"type:char(32)"`
|
||||
CompanyUID string `gorm:"type:char(32);index"`
|
||||
FromUID string `gorm:"type:char(32);index"`
|
||||
Name string `gorm:"type:varchar(64)"`
|
||||
|
@ -24,7 +24,6 @@ type Schedule struct {
|
||||
}
|
||||
|
||||
func (s Schedule) Create(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess("约号中...")("约号成功")
|
||||
s.Transaction(m, func() {
|
||||
msg := m.Cmd(s.volume, s.SelectForUpdate, model.UID, m.Option(model.VOLUME_UID))
|
||||
if m.Warn(kit.Int(msg.Append(model.COUNT)) >= kit.Int(msg.Append(model.AMOUNT)), "本服务已约满") {
|
||||
@ -39,7 +38,6 @@ func (s Schedule) Create(m *ice.Message, arg ...string) {
|
||||
m.ProcessRefresh()
|
||||
}
|
||||
func (s Schedule) Call(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess("叫号中...")("叫号成功")
|
||||
user_uid := m.Option(model.USER_UID)
|
||||
s.Orders(m, model.TAKE_TIME).Limit(m, 1)
|
||||
if m.Option(model.RECEPTION_UID) != "" {
|
||||
@ -131,7 +129,6 @@ func (s Schedule) SelectByStatus(m *ice.Message, arg ...string) *ice.Message {
|
||||
return m
|
||||
}
|
||||
func (s Schedule) Cancel(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess("取消中...")("取消成功")
|
||||
args := m.OptionSimple(model.USER_UID, model.UID)
|
||||
if m.WarnNotFound(m.Cmdy(s, s.Select, args).Length() == 0) {
|
||||
return
|
||||
@ -143,7 +140,6 @@ func (s Schedule) Cancel(m *ice.Message, arg ...string) {
|
||||
m.ProcessRefresh()
|
||||
}
|
||||
func (s Schedule) Take(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess("取号中...")("取号成功")
|
||||
args := m.OptionSimple(model.USER_UID, model.UID)
|
||||
if m.WarnNotFound(m.Cmdy(s, s.Select, args).Length() == 0) {
|
||||
return
|
||||
@ -153,7 +149,6 @@ func (s Schedule) Take(m *ice.Message, arg ...string) {
|
||||
m.ProcessRefresh()
|
||||
}
|
||||
func (s Schedule) Expire(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess("过号中...")("过号成功")
|
||||
args := kit.Simple(model.CALL_UID, m.Option(model.USER_UID), m.OptionSimple(model.UID))
|
||||
if m.WarnNotFound(s.Select(m, args...).Length() == 0) {
|
||||
return
|
||||
@ -166,7 +161,6 @@ func (s Schedule) Expire(m *ice.Message, arg ...string) {
|
||||
s.sendTemplate(m, "已过号")
|
||||
}
|
||||
func (s Schedule) Finish(m *ice.Message, arg ...string) {
|
||||
defer m.ToastProcess("完成中...")("完成成功")
|
||||
args := kit.Simple(model.CALL_UID, m.Option(model.USER_UID), m.OptionSimple(model.UID))
|
||||
if m.WarnNotFound(s.Select(m, args...).Length() == 0) {
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user