This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-09-29 22:21:02 +08:00
parent 6953299e1e
commit 03e3dd1a21
25 changed files with 219 additions and 162 deletions

View File

@ -41,6 +41,6 @@ func (s city) List(m *ice.Message, arg ...string) {
}
}
func (s city) AuthCreate(m *ice.Message, arg ...string) {
s.Table.AuthCreate(m, 1, "")
s.Table.AuthCreate(m, 1, "", m.OptionSimple(model.NAME)...)
}
func init() { ice.TeamCtxCmd(city{}) }

View File

@ -174,6 +174,9 @@ func (s Table) SelectJoinCity(m *ice.Message, arg ...string) *ice.Message {
return s.SelectJoin(m, city{}, arg...)
}
func (s Table) SelectJoinAuth(m *ice.Message, arg ...string) *ice.Message {
if kit.IndexOf(m.Appendv(model.AUTH_TYPE), model.AUTH_TYPE) > -1 {
return m
}
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME, model.AUTH_TYPE, model.AUTH_STATUS, model.DASHBOARD_UID) })
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
return s.SelectJoin(m, s.findSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), arg...)
@ -187,7 +190,6 @@ func (s Table) SelectJoinRecent(m *ice.Message, PLACE_UID string, arg ...string)
m.Table(func(value ice.Maps) { kit.If(value[PLACE_UID], func(v string) { list = kit.AddUniq(list, v) }) })
msg := m.Spawn()
recents := msg.CmdMap(recent{}, s.SelectList, model.PLACE_UID, list, model.PLACE_UID)
m.Info("what %v", recents)
m.Table(func(value ice.Maps) {
recent := recents[value[PLACE_UID]]
kit.For(arg, func(k string) { m.Push(k, recent[k]) })
@ -316,7 +318,7 @@ func (s Table) CityList(m *ice.Message, arg ...string) *ice.Message {
}
func (s Table) AuthCreate(m *ice.Message, authType int, fromUID string, arg ...string) {
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_PORTAL, Portal{}.PlaceCreate,
model.AUTH_NAME, kit.Select(m.Option(model.NAME), arg, 0), model.AUTH_INFO, kit.Select(m.Option(model.INFO), arg, 1),
model.AUTH_NAME, m.Option(model.NAME), model.AUTH_INFO, m.Option(model.INFO),
model.AUTH_TYPE, authType, model.FROM_UID, kit.Select(ice.AUTO, fromUID))
s.Update(m, kit.Dict(m.OptionSimple(model.AUTH_UID)), arg...)
}
@ -332,8 +334,8 @@ func (s Table) MarketInsert(m *ice.Message, arg ...string) {
func (s Table) ServiceList(m *ice.Message, arg ...string) *ice.Message {
return m.Cmd(s.Prefix(m, service{}), arg)
}
func (s Table) GetCommandUID(m *ice.Message) {
m.Option(model.COMMAND_UID, CommandUID(m, m.PrefixKey()))
func (s Table) GetCommandUID(m *ice.Message, arg ...string) {
m.Option(model.COMMAND_UID, CommandUID(m, kit.Select(m.PrefixKey(), arg, 0)))
}
func (s Table) SendMessage(m *ice.Message, from, to string, arg ...string) {
if m.IsErr() {
@ -476,6 +478,7 @@ func PortalCmd(portal ice.Any) {
h := kit.FileLine(-1, 100)
p := kit.Keys("web.team", kit.ModPath(-1))
table := portal.(interface{ getTable() Table }).getTable()
tables := Tables{Table: table}
cmd := func(name string, data ice.Any) {
_, cmd := ice.Cmd(kit.Keys(p, name), data)
cmd.RawHand = path.Join(path.Dir(h), name+".go")
@ -485,14 +488,15 @@ func PortalCmd(portal ice.Any) {
}, cmd.Actions[ice.CTX_INIT].Hand)
}
cmd("portal", portal)
cmd("search", search{Tables: Tables{Table: table}})
cmd("qrcode", qrcode{Tables: Tables{Table: table}})
cmd("search", search{Tables: tables})
cmd("qrcode", qrcode{Tables: tables})
cmd("event", event{Table: table})
cmd("apply", apply{Table: table})
cmd("allow", allow{Table: table})
cmd("notice", notice{Table: table})
cmd("setting", setting{Table: table})
cmd("member", member{Tables: Tables{Table: table}})
cmd("member", member{Tables: tables})
cmd("credit", credit{Tables: tables})
cmd("market", market{Table: table})
cmd("message", message{Table: table})
cmd("recent", recent{Table: table})

View File

@ -0,0 +1,72 @@
package gonganxitong
import (
"shylinux.com/x/ice"
kit "shylinux.com/x/toolkits"
"shylinux.com/x/community/src/api"
"shylinux.com/x/community/src/gonganxitong/model"
)
type credit struct {
Tables
user user
city city
order string `data:"102"`
authCity string `name:"authCity" role:"void"`
authPersonal string `name:"authPersonal" role:"void"`
authService string `name:"authService" role:"void"`
authCompany string `name:"authCompany" role:"void"`
}
func (s credit) List(m *ice.Message, arg ...string) {
msg := m.Cmd(s.Place, s.Select, model.UID, arg[0])
if msg.Append(model.AUTH_UID) != "" {
m.ProcessField(api.RENZHENGSHOUQUAN_PROFILE, msg.Append(model.AUTH_UID))
return
}
m.SetResult().EchoInfoButton("请申请服务认证", s.AuthService)
/*
if msg := m.Cmd(s.user, s.Select, model.UID, m.Option(model.USER_UID)); msg.Append(model.AUTH_UID) == "" {
m.SetResult().EchoInfoButton("请申请个人认证", s.AuthPersonal)
return
}
*/
msg = m.Cmd(s.Street, s.Select, model.UID, msg.Append(s.Keys(s.Street, model.UID)))
if msg.Append(model.AUTH_UID) != "" {
return
}
m.SetResult().EchoInfoButton("请申请公司认证", s.AuthCompany)
msg = m.Cmd(s.city, s.Select, model.UID, msg.Append(model.CITY_UID))
if msg.Append(model.AUTH_UID) != "" {
return
}
m.SetResult().EchoInfoButton("请申请城市认证", s.AuthCity)
}
func (s credit) AuthService(m *ice.Message, arg ...string) {
m.Cmdy(s.PrefixPortal(m), Portal{}.PlaceAuth, kit.Dict(s.placeInfo(m).AppendSimple())).ProcessRefresh()
}
func (s credit) AuthPersonal(m *ice.Message, arg ...string) {
m.Cmdy(s.user, s.AuthCreate, kit.Dict(model.AUTH_UID, s.cityInfo(m).Append(model.AUTH_UID)))
}
func (s credit) AuthCompany(m *ice.Message, arg ...string) {
m.Cmdy(s.Street, s.AuthCreate, kit.Dict(s.streetInfo(m).AppendSimple(model.NAME, model.INFO, model.UID, model.CITY_UID)))
}
func (s credit) AuthCity(m *ice.Message, arg ...string) {
m.Cmdy(s.city, s.AuthCreate, kit.Dict(s.cityInfo(m).AppendSimple(model.NAME, model.INFO)))
}
func init() { ice.TeamCtxCmd(credit{Tables: newTables()}) }
func (s credit) placeInfo(m *ice.Message, arg ...string) *ice.Message {
return m.Cmd(s.Place, s.Select, model.UID, m.Option(s.Keys(s.Place, model.UID)))
}
func (s credit) streetInfo(m *ice.Message, arg ...string) *ice.Message {
return m.Cmd(s.Street, s.Select, model.UID, s.placeInfo(m).Append(s.Keys(s.Street, model.UID)))
}
func (s credit) cityInfo(m *ice.Message, arg ...string) *ice.Message {
return m.Cmd(s.city, s.Select, model.UID, s.streetInfo(m).Append(model.CITY_UID))
}

View File

@ -39,10 +39,12 @@ func (s member) List(m *ice.Message, arg ...string) {
return
}
m.Table(func(value ice.Maps) {
if user_uid == value[model.USER_UID] {
m.Push("who", "myself")
} else {
m.Push("who", "")
if !m.FieldsIsDetail() {
if user_uid == value[model.USER_UID] {
m.Push("who", "myself")
} else {
m.Push("who", "")
}
}
if isLeader {
if user_uid == value[model.USER_UID] {

View File

@ -1,9 +1,6 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
if (msg.IsDetail()) {
msg.Option("_share_title", msg.Append("user_name"))
}
var USER_PLACE_ROLE = msg.Option("_user_place_role")
_init: function(can, msg) { var USER_PLACE_ROLE = msg.Option("_user_place_role")
if (msg.IsDetail()) { msg.Option("_share_title", msg.Append("user_name")) }
can.onimport.myView(can, msg, function(value) { value._style = [value.who, value.member_status]
return [
{view: html.TITLE, list: [value.user_name,

View File

@ -46,6 +46,7 @@ $output div.tabs span.select { background-color:var(--output-bg-color); color:va
$output div.item.card { margin-bottom:2px; }
$output div.item.card>div.output>div { width:100%; }
$output div.item.card div.title { width:100%; display:flex; align-items:center; }
body:not(.mobile) $output div.item.card div.title div.action { display:none; }
$output div.item.card div.title span.auth { font-size:14px; }
$output div.item.card div.title span.time { position:absolute; right:0; font-size:12px; color:gray; }
$output div.item.card div.status span { word-break:break-all; }

View File

@ -114,17 +114,7 @@ func (s Portal) List(m *ice.Message, arg ...string) {
}
m.Option(model.SERVICE_UID, ServiceUID(m))
if len(arg) == 0 {
USER_PLACE_ROLE := s.Keys(s.UserPlace, model.ROLE)
m.Cmdy(m.PrefixKey(), s.PlaceList, m.Option(model.USER_UID)).Table(func(value ice.Maps) {
button := []ice.Any{}
switch UserPlaceRole(kit.Int(value[USER_PLACE_ROLE])) {
case UserPlaceCreator, UserPlaceLandlord:
if value[model.AUTH_STATUS] == "" {
button = append(button, s.PlaceAuth)
}
}
m.PushButton(append(button, s.PlaceRemove)...)
}).Action(s.PlaceCreate)
m.Cmdy(m.PrefixKey(), s.PlaceList, m.Option(model.USER_UID)).PushAction(s.PlaceRemove).Action(s.PlaceCreate)
s.Button(m, "", s.PlaceCreate)
} else {
if msg := s.PlaceListOption(m, arg...); arg[0] != "" && msg.Length() > 0 {
@ -202,17 +192,14 @@ func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
if m.Option(model.AUTH_UID) != "" {
return
}
msg := m.Cmd(s.Street, s.Table.Select, model.UID, m.Option(s.Keys(s.Street, model.UID)))
if m.WarnNotValid(msg.Append(model.AUTH_UID) == "") {
return
}
place_uid, place_name := m.Option(s.Keys(s.Place, model.UID)), m.Option(s.Keys(s.Place, model.NAME))
msg := m.Cmd(s.Place, s.Table.Select, model.UID, m.Option(s.Keys(s.Place, model.UID)))
street := m.Cmd(s.Street, s.Table.Select, model.UID, msg.Append(s.Keys(s.Street, model.UID)))
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_PORTAL, s.PlaceCreate,
model.AUTH_NAME, place_name, model.AUTH_TYPE, ice.AUTO, model.FROM_UID, msg.Append(model.AUTH_UID),
model.SERVICE_UID, ServiceUID(m), model.PLACE_UID, place_uid,
model.AUTH_NAME, msg.Append(model.NAME), model.AUTH_TYPE, 3, model.FROM_UID, street.Append(model.AUTH_UID),
model.SERVICE_UID, ServiceUID(m), model.PLACE_UID, msg.Append(model.UID),
)
m.Cmd(s.Place, s.UpdateField, msg.OptionSimple(model.AUTH_UID), model.UID, place_uid)
s.RecordEventWithName(m.Options(model.NAME, place_name, model.UID, place_uid), "")
m.Cmd(s.Place, s.UpdateField, m.OptionSimple(model.AUTH_UID), model.UID, msg.Append(model.UID))
s.RecordEventWithName(m.Options(msg.AppendSimple(model.NAME, model.UID)), "")
msg.Cmd(s.Prefix(msg, s), s.AfterPlaceAuth)
s.StorageCreate(m, "")
}

View File

@ -13,13 +13,16 @@ Volcanos(chat.ONIMPORT, {
can.onimport.cityView(can, value), can.onimport.streetView(can, value),
]},
] },
myTrans: function(can, value, PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME) {
value.icons = value.icons||can.Conf(can.core.Keys("_trans.value", PLACE_TYPE, mdb.ICONS, value[PLACE_TYPE]))
myTrans: function(can, value) {
var PLACE_UID = can.Conf("_place_uid"), PLACE_NAME = can.Conf("_place_name"), PLACE_TYPE = can.Conf("_place_type")
var USER_PLACE_ROLE = can.Conf("_user_place_role"), STREET_NAME = can.Conf("_street_name")
value.icons = value.icons||can.Conf(can.core.Keys("_trans.value", PLACE_TYPE, mdb.ICONS, value[PLACE_TYPE]||"what"))
value._uid = value[PLACE_UID], value._name = value[PLACE_NAME], value._street = value[STREET_NAME]
value._type = value[PLACE_TYPE], value.__type = can.user.transValue(can, value, PLACE_TYPE)
value._role = value[USER_PLACE_ROLE], value.__role = can.user.transValue(can, value, USER_PLACE_ROLE)
value._role_style = can.onimport.roleStyle(can, value, USER_PLACE_ROLE)
value._type_style = can.onimport.typeStyle(can, value, PLACE_TYPE)
return value
},
myPortal: function(can, msg) { can.sup.current = {}
can.core.List(["_place_uid", "_place_name", "_place_type", "_user_place_role", "_street_name"], function(key) { can.Conf(key, msg.Option(key)) })
@ -28,28 +31,21 @@ Volcanos(chat.ONIMPORT, {
can.user.isMobile && (can.db.hash = [])
can.isCmdMode() && (can.db.hash = can.base.Obj(can.misc.SearchHash(can), can.db.hash)), can.db.hash[0] && can.onexport.place(can, can.db.hash[0])
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) }
})
can.sup.current = can.onimport.myTrans(can, kit.Dict(msg.OptionSimple(PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME)))
return can.runAction({}, 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)
}) })
}
can.ui = can.page.Append(can, can._output, [{view: html.HEADER},
{view: html.OUTPUT, list: ["mydebug.list", "myplace.list", "mycount.list", "myinit.list", "myindex.list", "myallow.list"]},
{view: html.OUTPUT, list: ["myplace.list", "myinit.list", "mycount.list", "myindex.list", "myallow.list"]},
{view: html.ACTION, list: ["myorder.list"]},
])
can.onmotion.hidden(can, can.ui.mydebug)
can.onmotion.hidden(can, can.ui.mycount)
can.onmotion.hidden(can, can.ui.myinit)
can.onmotion.hidden(can, can.ui.mycount)
can.onmotion.hidden(can, can.ui.myallow)
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)
can.onimport.myIndex(can, msg, can.ui.myindex), can.onexport.index(can, can.sup.current)
can.onimport.myAllow(can, msg, can.ui.myallow)
can.onimport.myOrder(can, msg, can.ui.myorder)
}
@ -58,25 +54,16 @@ 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"]')
can.onimport.myPlace(can, _msg, can.ui.myplace)
if (_msg.Length() == 0) {
can.onimport.myOrder(can, msg, can.ui.myorder)
} else {
showIndex(can._index_msg = msg)
}
} can.onimport.myPlace(can, _msg, can.ui.myplace)
if (_msg.Length() == 0) { can.onimport.myOrder(can, msg, can.ui.myorder) } else { showIndex(can._index_msg = msg) }
}
},
myPlace: function(can, msg, target) { var place_uid
var PLACE_UID = can.Conf("_place_uid"), PLACE_NAME = can.Conf("_place_name"), PLACE_TYPE = can.Conf("_place_type")
var USER_PLACE_ROLE = can.Conf("_user_place_role"), STREET_NAME = can.Conf("_street_name")
can.page.Append(can, target, [{view: html.TITLE, list: [
{text: can.user.trans(can, "My "+can.base.capital(PLACE_NAME.replace("_name", "")), null, html.INPUT)},
{text: can.user.trans(can, "My "+can.base.capital(can.Conf("_place_name").replace("_name", "")), null, html.INPUT)},
msg.Option(ice.MSG_ACTION) && {view: html.ACTION, _init: function(target) { can.onappend._action(can, msg.Option(ice.MSG_ACTION), target) }}
]}]), can.ui._target = can.page.Append(can, target||can._output, [html.OUTPUT])._target
msg.Length() > 0 && can.page.Append(can, can.ui._target, msg.Table(function(value) {
can.onimport.myTrans(can, value, PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME)
msg.Length() > 0 && can.page.Append(can, can.ui._target, msg.Table(function(value) { can.onimport.myTrans(can, value)
place_uid = place_uid||value._uid, value._uid == can.onexport.place(can) && (place_uid = value._uid), place_uid == value._uid && (can.sup.current = value)
return can.onimport.itemcard(can, value, can.onimport.myValue(can, value), function(event) { can.onexport.value(can, value) })
})), msg.Result() && can.onappend.board(can, msg.Result(), can.ui._target)
@ -96,13 +83,10 @@ Volcanos(chat.ONIMPORT, {
myInit: function(can, msg, value, target) { if (!msg) { return } can.onmotion.toggle(can, target, !!value._init)
if (can.onmotion.cache(can, function() { return value._uid }, target)) { return } can.onimport.myTitle(can, "My Init", "我的初始化", target)
msg.Table(function(val) { if (parseInt(val.init) == parseInt(value.init)+1) { value._init = true, val.args = [value._uid]
can.onappend.plugin(can, val, function(sub) { var run = sub.run; sub.run = function(event, cmds, cb) {
can.onimport.myField(can, sub)
can.onappend.plugin(can, val, function(sub) { var run = sub.run; sub.run = function(event, cmds, cb) { can.onimport.myField(can, sub)
run(can.request(event, {place_uid: value._uid, place_init: value.init}), cmds, function(msg) {
if (cmds[1] == mdb.CREATE || cmds.length == 1 && msg.Length() > 0) {
can._root.Inputs && can.onmotion.clear(can, can._root.Inputs)
can.onmotion.clearInput(can)
can.Update()
can._root.Inputs && can.onmotion.clear(can, can._root.Inputs), can.onmotion.clearInput(can), can.Update()
} else {
cb(msg)
}
@ -118,8 +102,7 @@ Volcanos(chat.ONIMPORT, {
)], style: {width: width}, list: [
{img: can.misc.ResourceIcons(can, value.icons)}, {text: can.user.trans(can, value.index.split(".").pop(), value.name)},
], onclick: function(event) {
if (value.index.split(".").pop() == "recent") {
}
if (value.index.split(".").pop() == "recent") {}
can.onimport.myStory(can, {space: can.ConfSpace(), index: value.index, args: [can.onexport.place(can)||can.misc.Search(can, can.Conf("_place_uid"))]})
}}
}))
@ -128,9 +111,9 @@ Volcanos(chat.ONIMPORT, {
var _msg = can.request(); msg.Table(function(value) { if (min < value.order && value.order < max) { _msg.Push(value) } })
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)
myIndex: function(can, msg, target) { can.onimport.myTitle(can, "My Index", "我的应用", target)
var list = ["visitor", "creator", "landlord", "teacher", "leader", "boss", "tenant", "student", "worker", "custom", "admin", "parent", "server"]
var _list = can.Conf("_trans.value."+USER_PLACE_ROLE)
var _list = can.Conf("_trans.value."+can.Conf("_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 }
@ -149,13 +132,6 @@ Volcanos(chat.ONIMPORT, {
can.onmotion.delay(can, function() { can.onimport.layout(can) }, 30)
can.onmotion.delay(can, function() { can.onimport.layout(can) }, 300)
},
myDebug: function(can, msg, target) {
can.onimport.myTitle(can, "My Debug", "我的调试", target)
can.page.Append(can, target, [
{text: ""+window.innerHeight+"\n"},
{text: ""+can.ConfHeight()+"\n"},
])
},
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) {
@ -185,15 +161,13 @@ Volcanos(chat.ONACTION, {
})
Volcanos(chat.ONEXPORT, {
place: function(can, value) { return can.onexport.session(can, PLACE_UID, value) },
value: function(can, value) {
if (!value || !value._uid) { return }
can.onmotion.toggle(can, can.ui.myindex, !value.member_status || value.member_status == "normal")
can.sup.current = value, can.onexport.index(can, can.sup.current)
value: function(can, value) { if (!value || !value._uid) { return } can.sup.current = value, can.onexport.index(can, can.sup.current)
can.onexport.place(can, value._uid), can.onexport.hash(can, value._uid), can.onexport.title(can, value._name, can.ConfHelp())
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, value._role == "creator" || can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0)
can.onmotion.toggle(can, can.ui.myindex, !value.member_status || value.member_status == "normal")
},
index: function(can, value, role) { role = role||value._role
can.ui.role && can.onmotion.toggle(can, can.ui.role, value._role == "creator")

View File

@ -3,7 +3,9 @@
"placeCreate": "创建", "placeRemove": "删除", "placeAuth": "认证",
"placeSearch": "搜索", "scanQRCode": "扫码",
"qrcode": "场景码", "event": "事件流", "apply": "权限申请", "allow": "权限审批", "notice": "通知公告",
"member": "场景成员", "setting": "配置", "email": "邮箱配置",
"member": "场景成员",
"credit": "实名认证",
"setting": "配置", "email": "邮箱配置",
"domain": "领域分类", "market": "人民广场", "message": "消息待办", "recent": "最近访问", "service": "服务发现", "support": "客服支持",
"cancel": "取消", "submit": "提交", "finish": "完成", "reject": "驳回", "approve": "通过",
"read": "已读", "done": "完成", "sticky": "置顶", "unSticky": "取消置顶",
@ -12,6 +14,7 @@
"user": "用户信息", "city": "城市信息", "street": "街道信息", "school": "学校信息", "company": "公司信息",
"auth": "认证",
"authCreate": "认证申请",
"authCity": "城市认证", "authPersonal": "个人认证", "authService": "服务认证", "authCompany": "公司认证",
"icons": {
"user": "https://img.icons8.com/officel/80/qr-code.png",
"city": "https://img.icons8.com/officel/80/qr-code.png",
@ -24,6 +27,7 @@
"notice": "https://img.icons8.com/officel/80/commercial.png",
"setting": "https://img.icons8.com/officel/80/settings--v1.png",
"member": "https://img.icons8.com/officel/80/person-at-home.png",
"credit": "https://img.icons8.com/officel/80/passport.png",
"domain": "https://img.icons8.com/officel/80/categorize.png",
"market": "https://img.icons8.com/officel/80/square.png",
"message": "https://img.icons8.com/officel/80/test-partial-passed.png",
@ -36,8 +40,8 @@
"approve": "notice",
"disable": "danger",
"enable": "notice",
"placeAuth": "notice",
"placeRemove": "danger"
"placeRemove": "danger",
"authPersonal": "notice"
},
"input": {
"My Place": "我的场景",

View File

@ -89,10 +89,10 @@ func (s service) List(m *ice.Message, arg ...string) {
s.DisplayBase(m, "")
}
func (s service) Open(m *ice.Message, arg ...string) {
m.ProcessOpen(web.S(m.Option(tcp.NODENAME)) + web.C(m.Option(ctx.INDEX)))
m.ProcessOpen(web.S(m.Option(web.SPACE)) + web.C(m.Option(ctx.INDEX)))
}
func (s service) Conf(m *ice.Message, arg ...string) {
m.ProcessOpen(web.S(m.Option(tcp.NODENAME)) + web.C(m.Option(ctx.INDEX)) + "?view=table")
m.ProcessOpen(web.S(m.Option(web.SPACE)) + web.C(m.Option(ctx.INDEX)) + "?view=table")
}
func init() { ice.TeamCtxCmd(service{}) }

View File

@ -1,6 +1,6 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
can.onimport.myView(can, msg, function(value) { value.icon = value.icon.split("?")[0]; return [
can.onimport.myView(can, msg, function(value) { return [
{view: html.TITLE, list: [value.name]},
{view: html.STATUS, list: [value.index]},
{view: html.STATUS, list: [value.module, value.version]},

View File

@ -19,7 +19,7 @@ type user struct {
modify string `name:"modify user_name* user_info" role:"void"`
email string `name:"email email*"`
list string `name:"list uid auto" role:"void"`
authCreate string `name:"authCreate city_uid*" role:"void"`
authCreate string `name:"authCreate" role:"void"`
}
func (s user) Create(m *ice.Message, arg ...string) {
@ -62,8 +62,8 @@ func (s user) SetCookie(m *ice.Message, arg ...string) {
m.ProcessCookie(model.USER_UID, m.Option(model.UID))
}
func (s user) AuthCreate(m *ice.Message, arg ...string) {
msg := s.Select(m.Spawn(), m.OptionSimple(model.CITY_UID)...)
s.Table.AuthCreate(m, 2, msg.Append(model.AUTH_UID), m.Option(model.USER_NAME), m.Option(model.USER_INFO))
m.Options(s.Select(m.Spawn(), model.UID, m.Option(model.USER_UID)).AppendSimple(model.NAME, model.INFO))
s.Table.AuthCreate(m, 2, m.Option(model.AUTH_UID))
}
func (s user) SendTemplate(m *ice.Message, arg ...string) { // from uid url type name hash
msg := s.Select(m, model.UID, kit.Select(m.Option(model.USER_UID), arg, 1))

View File

@ -4,6 +4,7 @@ import (
"strconv"
"shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/aaa"
kit "shylinux.com/x/toolkits"
"shylinux.com/x/community/src/renzhengshouquan/model"
@ -23,6 +24,10 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
s.InputsListSkip(m, AuthTypeList, kit.Select("0", "-1", m.IsTech()), arg...)
case model.AUTH_STATUS:
s.InputsList(m, AuthStatusList, arg...)
case model.FROM_UID:
if AuthType(kit.Int(m.Option(model.AUTH_TYPE))) == AuthRoot {
m.Push(arg[0], aaa.ROOT)
}
default:
s.Table.Inputs(m, arg...)
}

View File

@ -26,16 +26,16 @@ func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
return
}
arg = append(arg, model.STATUS, kit.Format(AuthIssued))
m.Option(model.FROM_UID, aaa.ROOT)
arg = append(arg, model.FROM_UID, aaa.ROOT)
case AuthCity:
m.Option(model.FROM_UID, s.findAuthFrom(m, AuthRoot))
arg = append(arg, model.FROM_UID, s.findAuthFrom(m, AuthRoot))
}
arg = kit.TransArgKeys(arg, s.Keys(s.Place, model.NAME), model.NAME, s.Keys(s.Place, model.INFO), model.INFO, s.Keys(s.Place, model.TYPE), model.TYPE)
arg = kit.TransArgKeys(arg, model.AUTH_NAME, model.NAME, model.AUTH_INFO, model.INFO, model.AUTH_TYPE, model.TYPE)
if m.Options(arg).Cmdy(s.Place, s.Insert, arg).IsErr() {
return
}
m.Cmd(s.UserPlace, s.Insert, kit.Simple(m.OptionSimple(s.Keys(s.Place, model.UID), model.USER_UID), model.ROLE, 1))
s.RecordEventWithName(m.Options(s.Keys(s.Place, model.UID), m.Result()), "")
m.Cmd(s.UserPlace, s.Insert, kit.Simple(model.AUTH_UID, m.Result(), m.OptionSimple(model.USER_UID), model.ROLE, 1))
s.RecordEventWithName(m.Options(model.AUTH_UID, m.Result()), "")
}
func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
s.Tables(m, s.Place).FieldsWithCreatedAT(m, s.UserPlace,

View File

@ -12,12 +12,13 @@ import (
type profile struct {
Auth
order string `data:"3"`
modify string `name:"modify info" role:"leader,worker"`
upload string `name:"upload" role:"leader,worker"`
authList string `name:"authList" role:"void"`
memberList string `name:"memberList" role:"void"`
systemList string `name:"systemList" role:"void"`
order string `data:"3"`
modify string `name:"modify info" role:"leader,worker"`
upload string `name:"upload" role:"leader,worker"`
authList string `name:"authList" role:"void"`
memberList string `name:"memberList" role:"void"`
systemList string `name:"systemList" role:"void"`
authPersonal string `name:"authPersonal" role:"void"`
}
func (s profile) Modify(m *ice.Message, arg ...string) {
@ -46,10 +47,20 @@ func (s profile) AuthList(m *ice.Message, arg ...string) {
s.SelectJoinService(m)
s.RewriteAppend(m)
}
func (s profile) AuthPersonal(m *ice.Message, arg ...string) {
m.Cmdy(m.Prefix("credit"), m.ActionKey())
}
func (s profile) MemberList(m *ice.Message, arg ...string) {
msg := s.Select(m.Spawn(), model.UID, m.Option(model.AUTH_UID))
service := s.ServiceList(m, msg.Append(model.PLACE_UID), msg.Append(model.SERVICE_UID))
m.Cmdy(web.SPACE, service.Append(model.SPACE), service.Append(model.INDEX), m.ActionKey(), msg.Append(model.PLACE_UID))
m.Table(func(value ice.Maps) {
if value[model.AUTH_STATUS] == "" && value[model.USER_UID] == m.Option(model.USER_UID) {
m.PushButton(s.AuthPersonal)
} else {
m.PushButton()
}
})
s.RewriteAppend(m)
}
func (s profile) SystemList(m *ice.Message, arg ...string) {
@ -59,7 +70,6 @@ func (s profile) SystemList(m *ice.Message, arg ...string) {
s.SelectJoinService(m).PushAction(s.Enter)
s.RewriteAppend(m)
}
func (s profile) Enter(m *ice.Message, arg ...string) {
}
func (s profile) Enter(m *ice.Message, arg ...string) {}
func init() { ice.TeamCtxCmd(profile{}) }

View File

@ -31,8 +31,10 @@ Volcanos(chat.ONIMPORT, {
can.runAction(can.request({}, {auth_uid: msg.Append(UID)}), "memberList", [], function(msg) {
can.onimport.myView(can, msg, function(value) { value.avatar = value.user_avatar||html.AVATAR_JPG
return [
{view: html.TITLE, list: [value.auth_name, can.onimport.authView(can, value), can.onimport.textView(can, value, AUTH_TYPE)]},
{view: html.STATUS, list: [value.user_info]},
{view: html.TITLE, list: [value.auth_name||value.user_name, can.onimport.authView(can, value), can.onimport.textView(can, value, AUTH_TYPE),
can.onimport.titleAction(can, value),
]},
{view: html.STATUS, list: [value.auth_info||value.user_info]},
]
}, function(event, value) {
if (value.auth_uid) {

View File

@ -14,18 +14,16 @@ type call struct {
list string `name:"list queue_uid reception_uid uid auto" role:"leader,worker"`
}
func (s call) Call(m *ice.Message, arg ...string) { m.Cmdy(s.Schedule, m.ActionKey(), arg) }
func (s call) List(m *ice.Message, arg ...string) {
if len(arg) == 1 {
m.Cmdy(s.reception, arg).RenameAppend(model.UID, model.RECEPTION_UID).PushAction().Action()
m.Echo("请选择服务场所")
} else if len(arg) == 2 {
s.SelectByStatus(m.Options(mdb.ORDER, model.TAKE_TIME), arg[0], kit.Format(ScheduleTake), s.Key(s.Schedule, model.RECEPTION_UID), arg[1])
s.SelectByStatus(m.Options(mdb.ORDER, model.TAKE_TIME), arg[0], kit.Format(ScheduleTake), model.RECEPTION_UID, arg[1])
kit.If(m.Length() == 0, func() { m.Echo(m.Trans("wait take", "等待取号")) }, func() { m.Action(s.Call) })
} else if len(arg) == 3 {
s.Schedule.List(m, arg[0], arg[2]).Action(s.Call)
}
}
func (s call) Expire(m *ice.Message, arg ...string) { m.Cmdy(s.Schedule, m.ActionKey(), arg) }
func (s call) Finish(m *ice.Message, arg ...string) { m.Cmdy(s.Schedule, m.ActionKey(), arg) }
func init() { ice.TeamCtxCmd(call{}) }

View File

@ -3,6 +3,6 @@ $output>div.reception { max-width:50%; }
$output>div.reception div.item { padding:var(--item-padding); }
$output>div.reception div.item.select { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
$output>div.volume { flex-grow:1; }
$output>div.volume div.item { background-color:var(--output-bg-color); padding:var(--item-padding); margin-bottom:5px; position:relative; }
$output>div.volume div.item { background-color:var(--output-bg-color); padding:var(--item-padding); margin:10px; position:relative; }
$output>div.volume div.item div.status { display:flex; align-items:center; }
$output>div.volume div.item div.action { position:absolute; right:var(--item-padding); top:13px; }

View File

@ -14,14 +14,14 @@ type plan struct {
}
func (s plan) Create(m *ice.Message) {
s.Schedule.Create(m, m.OptionSimple(model.QUEUE_UID, model.RECEPTION_UID, model.VOLUME_UID, model.USER_UID)...)
s.Schedule.Create(m, m.OptionSimple(model.QUEUE_UID, model.VOLUME_UID, model.USER_UID)...)
}
func (s plan) Cancel(m *ice.Message) {
s.Schedule.Cancel(m.Options(model.UID, m.Option(model.SCHEDULE_UID)))
func (s plan) List(m *ice.Message, arg ...string) {
m.Cmdy(s.reception, arg).Action().Display("").DisplayCSS("")
}
func (s plan) VolumeList(m *ice.Message) {
s.Tables(m, "LEFT JOIN schedules ON schedules.volume_uid = volumes.uid AND status = 0")
s.Fields(m, s.Key(s.volume, model.UID), model.BEGIN_TIME, model.END_TIME, model.STATUS, s.AS(s.Key(s.Schedule, model.UID), model.SCHEDULE_UID)).Orders(m, model.BEGIN_TIME)
s.Fields(m, s.AS(s.Key(s.volume, model.UID), model.VOLUME_UID), model.BEGIN_TIME, model.END_TIME, model.STATUS, s.Key(s.Schedule, model.UID)).Orders(m, model.BEGIN_TIME)
m.Cmdy(s.volume, s.Select, "volumes.queue_uid = ? AND volumes.reception_uid = ? AND end_time > ?", m.Option(model.QUEUE_UID), m.Option(model.RECEPTION_UID), m.Time())
m.Table(func(value ice.Maps) {
if value[model.STATUS] == "0" {
@ -31,8 +31,5 @@ func (s plan) VolumeList(m *ice.Message) {
}
})
}
func (s plan) List(m *ice.Message, arg ...string) {
m.Cmdy(s.reception, arg).Action().Display("").DisplayCSS("")
}
func init() { ice.TeamCtxCmd(plan{}) }

View File

@ -2,25 +2,36 @@ Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
can.ui = can.page.Append(can, can._output, ["reception", "volume"]), can.onimport.reception(can, msg)
},
reception: function(can, msg) {
can.page.Append(can, can.ui.reception, msg.Table(function(value) {
return {view: [html.ITEM, "", value.name], onclick: function(event) { can.onmotion.select(can, can.ui.reception, html.DIV_ITEM, event.target)
reception: function(can, msg) { var select, last = can.onexport.reception(can)
can.page.Append(can, can.ui.reception, msg.Table(function(value, index) {
return {view: [html.ITEM, "", value.name], onclick: function(event) {
can.onexport.reception(can, value), can.onmotion.select(can, can.ui.reception, html.DIV_ITEM, event.target)
if (can.onmotion.cache(can, function() { return value.name }, can.ui.volume)) { return } can.onimport.volume(can, value)
}, _init: function(target) {
(index == 0 || value.uid == last) && (select = target)
}}
})); var list = can.page.Select(can, can.ui.reception, html.DIV_ITEM); list[0] && list[0].click()
})), select && (select.click())
},
volume: function(can, reception) {
can.runAction(can.request({}, {reception_uid: reception.uid}), "volumeList", [], function(msg) {
can.page.Append(can, can.ui.volume, msg.Table(function(value) { value.reception_uid = reception.uid, value.volume_uid = value.uid
if (msg.Length() == 0) { can.onmotion.clear(can, can.ui.volume), can.onappend.board(can, "暂未放号", can.ui.volume) }
can.page.Appends(can, can.ui.volume, msg.Table(function(value) { value.reception_uid = reception.uid
return {view: html.ITEM, list: [
{view: html.STATUS, list: [{text: "开始时间: "+value.begin_time}]},
{view: html.STATUS, list: [{text: "结束时间: "+value.end_time}]},
can.onimport.titleAction(can, value, "create", "cancel"),
{view: html.STATUS, list: [can.onimport.unitView(can, value, mdb.BEGIN_TIME)]},
{view: html.STATUS, list: [can.onimport.unitView(can, value, mdb.END_TIME)]},
can.onimport.titleAction(can, value, mdb.CREATE, mdb.CANCEL),
]}
}))
})
},
})
Volcanos(chat.ONACTION, {
create: function(event, can, button) { can.runAction(event, button) },
create: function(event, can, button) { can.runAction(event, button, [], function(msg) { can.onimport.volume(can, can.db.reception) }) },
cancel: function(event, can, button) { can.runAction(event, button, [], function(msg) { can.onimport.volume(can, can.db.reception) }) },
})
Volcanos(chat.ONEXPORT, {
reception: function(can, value) {
if (value) { return can.db.reception = value, can.onexport.session(can, "reception", value.uid) }
return can.onexport.session(can, "reception")
},
})

View File

@ -14,6 +14,7 @@
"history": "https://img.icons8.com/officel/80/order-history.png"
},
"style": {
"create": "notice",
"cancel": "danger",
"take": "notice",
"call": "notice",

View File

@ -39,23 +39,22 @@ func (s Schedule) Create(m *ice.Message, arg ...string) {
func (s Schedule) Call(m *ice.Message, arg ...string) {
user_uid := m.Option(model.USER_UID)
s.Orders(m, model.TAKE_TIME).Limit(m, 1)
s.SelectByStatus(m, kit.Simple(m.Option(model.QUEUE_UID), kit.Format(ScheduleTake), s.Key(s, model.RECEPTION_UID), m.Option(model.RECEPTION_UID))...).PushAction(s.Expire, s.Finish)
s.SelectByStatus(m, kit.Simple(m.Option(model.QUEUE_UID), kit.Format(ScheduleTake), m.OptionSimple(model.RECEPTION_UID))...).PushAction(s.Expire, s.Finish)
if m.Length() == 0 {
m.ProcessRewrite(model.UID, "")
return
}
s.changeStatus(m, ScheduleTake, ScheduleCall, model.CALL_UID, user_uid)
m.Info("what %v %v", arg, m.FormatMeta())
arg = append(arg[0:1], m.Append(model.UID))
s.GetCommandUID(m, s.Prefix(m, s))
s.SendMessage(m, m.Append(model.USER_UID), user_uid, arg...)
s.GetCommandUID(m)
s.SendMessage(m, user_uid, m.Append(model.USER_UID), arg...)
s.sendTemplate(m, "已叫号", m.Append(model.UID))
m.ProcessRewrite(model.UID, m.Append(model.UID))
}
func (s Schedule) List(m *ice.Message, arg ...string) *ice.Message {
s.Tables(m, s.volume).FieldsWithCreatedAT(m, s,
s.Key(s, model.RECEPTION_UID), model.VOLUME_UID, model.BEGIN_TIME, model.END_TIME,
model.RECEPTION_UID, model.VOLUME_UID, model.BEGIN_TIME, model.END_TIME,
model.CANCEL_TIME, model.TAKE_TIME, model.CALL_TIME, model.EXPIRE_TIME, model.FINISH_TIME,
model.SCHEDULE_STATUS, model.CALL_UID, model.USER_UID,
)
@ -115,7 +114,7 @@ func (s Schedule) List(m *ice.Message, arg ...string) *ice.Message {
func (s Schedule) SelectByStatus(m *ice.Message, arg ...string) *ice.Message {
order := m.Option(mdb.ORDER)
s.Tables(m, s.volume).FieldsWithCreatedAT(m, s,
s.Key(s, model.RECEPTION_UID), model.VOLUME_UID, model.BEGIN_TIME, model.END_TIME,
model.RECEPTION_UID, model.VOLUME_UID, model.BEGIN_TIME, model.END_TIME,
model.CANCEL_TIME, model.TAKE_TIME, model.CALL_TIME, model.EXPIRE_TIME, model.FINISH_TIME,
model.SCHEDULE_STATUS, model.CALL_UID, model.USER_UID,
)
@ -154,6 +153,7 @@ func (s Schedule) Expire(m *ice.Message, arg ...string) {
s.changeStatus(m, ScheduleCall, ScheduleExpire)
})
s.Select(m.FieldsSetDetail(), args...)
s.GetCommandUID(m, s.Prefix(m, s))
s.sendTemplate(m, "已过号")
s.DashboardUpdate(m)
}
@ -167,6 +167,7 @@ func (s Schedule) Finish(m *ice.Message, arg ...string) {
s.changeStatus(m, ScheduleCall, ScheduleFinish)
})
s.Select(m.FieldsSetDetail(), args...)
s.GetCommandUID(m, s.Prefix(m, s))
s.sendTemplate(m, "已完成")
s.DashboardUpdate(m)
}

View File

@ -1,23 +1,10 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
can.onimport.myView(can, msg, function(value) {
var time = {view: html.STATUS, list: [can.user.trans(can, "begin_time:", "开始时间:"), value.begin_time]}
if (value.finish_time) {
time = {view: html.STATUS, list: [can.user.trans(can, "finish_time:", "完成时间:"), value.finish_time]}
} else if (value.expire_time) {
time = {view: html.STATUS, list: [can.user.trans(can, "expired_time:", "过号时间:"), value.expire_time]}
} else if (value.call_time) {
time = {view: html.STATUS, list: [can.user.trans(can, "call_time:", "叫号时间:"), value.call_time]}
} else if (value.take_time) {
time = {view: html.STATUS, list: [can.user.trans(can, "take_time:", "取号时间:"), value.take_time]}
} else {
var _time = {view: html.STATUS, list: [can.user.trans(can, "end_time:", "结束时间:"), value.end_time]}
}
return [
{view: html.TITLE, list:[value.user_name, can.onimport.textView(can, value), can.onimport.titleAction(can, value)]},
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.reception_name]},
time, _time,
]
})
can.onimport.myView(can, msg, function(value) { return [
{view: html.TITLE, list:[value.user_name, can.onimport.textView(can, value), can.onimport.titleAction(can, value)]},
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.reception_name]},
{view: html.STATUS, list: [can.onimport.unitView(can, value, value.finish_time? mdb.FINISH_TIME: value.expire_time? mdb.EXPIRE_TIME: value.call_time? "call_time": value.take_time? "take_time": value.cancel_time? mdb.CANCEL_TIME: mdb.BEGIN_TIME)]},
value.schedule_status == mdb.CREATE && {view: html.STATUS, list: [can.onimport.unitView(can, value, mdb.END_TIME)]},
] })
},
})

View File

@ -18,7 +18,7 @@ func (s Volume) Create(m *ice.Message, arg ...string) {
arg = kit.TransArgKeys(arg, model.VOLUME_TOTAL, model.TOTAL)
arg = kit.ArgDef(arg, model.BEGIN_TIME, m.Time(), model.END_TIME, m.Time("24h"))
s.Insert(m.Options(arg), kit.Simple(arg, m.OptionSimple(model.QUEUE_UID))...)
s.RecordEvent(m, "✅ "+m.Trans("create volume", "创建服务计划")+" "+kit.JoinKV(": ", "\n", m.OptionSimple(model.VOLUME_TOTAL, model.BEGIN_TIME, model.END_TIME)...))
s.RecordEvent(m, "✅ "+m.Trans("volume create", "创建服务计划")+" "+kit.JoinKV(": ", "\n", m.OptionSimple(model.VOLUME_TOTAL, model.BEGIN_TIME, model.END_TIME)...))
}
func (s Volume) List(m *ice.Message, arg ...string) *ice.Message {
s.Tables(m, s.reception).FieldsWithCreatedAT(m, s,
@ -29,10 +29,11 @@ func (s Volume) List(m *ice.Message, arg ...string) *ice.Message {
s.Select(m, s.Key(s, model.QUEUE_UID), arg[0]).Action()
} else if len(arg) == 2 {
s.SelectDetail(m, s.Key(s, model.QUEUE_UID), arg[0], s.Key(s, model.UID), arg[1])
} else {
return m
}
s.SelectJoinUser(m)
m.Display("")
return m
return m.Display("")
}
func init() { ice.TeamCtxCmd(Volume{}) }

View File

@ -1,11 +1,14 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
can.onimport.myView(can, msg, function(value) { return [
{view: html.TITLE, list: [value.reception_name]},
{view: html.STATUS, list: [can.user.trans(can, "begin_time:", "开始时间:"), value.begin_time]},
{view: html.STATUS, list: [can.user.trans(can, "end_time:", "结束时间:"), value.end_time]},
{view: html.STATUS, list: [can.user.trans(can, "open:", "放号量:"), value.total, can.user.trans(can, "plan:", "预约量:"), value.count]},
{view: html.STATUS, list: [can.user.trans(can, "expired:", "过号量:"), value.expire||"0", can.user.trans(can, "finish:", "完成量:"), value.finish||"0"]},
] })
can.onimport.myView(can, msg, function(value) {
function view(key) { return can.onimport.unitView(can, value, key) }
return [
{view: html.TITLE, list: [value.reception_name]},
{view: html.STATUS, list: [view(mdb.BEGIN_TIME)]},
{view: html.STATUS, list: [view(mdb.END_TIME)]},
{view: html.STATUS, list: [view(mdb.TOTAL), view(mdb.COUNT)]},
{view: html.STATUS, list: [view(mdb.EXPIRE), view(mdb.FINISH)]},
]
})
},
})