mirror of
https://shylinux.com/x/community
synced 2025-04-25 09:38:06 +08:00
add some
This commit is contained in:
parent
5a5e119e7c
commit
9426bd8fc8
@ -13,7 +13,7 @@ type allow struct {
|
||||
apply apply
|
||||
event event
|
||||
portal Portal
|
||||
order string `data:"92"`
|
||||
order string `data:"93"`
|
||||
role string `data:"creator"`
|
||||
create string `name:"create apply_uid* place_uid* user_uid* status*"`
|
||||
reject string `name:"reject" role:"void"`
|
||||
|
@ -2,10 +2,10 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.onimport.shareTitle(can, msg)
|
||||
var PLACE_NAME = msg.Option("_place_name"), PLACE_TYPE = msg.Option("_place_type")
|
||||
var USER_PLACE_ROLE = msg.Option("_user_place_role"), STREET_NAME = msg.Option("_street_name"), ALLOW_STATUS = "allow_status"
|
||||
can.onimport.itemcards(can, msg, function(value) { var status = value[ALLOW_STATUS]; return [
|
||||
can.onimport.myView(can, msg, function(value) { var status = value[ALLOW_STATUS]; return [
|
||||
{view: html.TITLE, list: [
|
||||
value.user_name, can.onimport.textView(can, value, USER_PLACE_ROLE),
|
||||
{view: html.ACTION, _init: function(target) { can.page.appendAction(can, value, target) }},
|
||||
can.user.isMobile && {view: html.ACTION, _init: function(target) { can.page.appendAction(can, value, target) }},
|
||||
]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), can.onimport.textView(can, value, ALLOW_STATUS)]},
|
||||
{view: html.STATUS, list: [value.begin_time.split(" ")[0], value.end_time.split(" ")[0]]},
|
||||
|
@ -12,7 +12,7 @@ type apply struct {
|
||||
user user
|
||||
event event
|
||||
portal Portal
|
||||
order string `data:"91"`
|
||||
order string `data:"92"`
|
||||
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"`
|
||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
var PLACE_NAME = msg.Option("_place_name"), PLACE_TYPE = msg.Option("_place_type")
|
||||
var USER_PLACE_ROLE = msg.Option("_user_place_role"), STREET_NAME = msg.Option("_street_name"), APPLY_STATUS = "apply_status"
|
||||
can.onimport.itemcards(can, msg, function(value) { var status = value[APPLY_STATUS]; return [
|
||||
can.onimport.myView(can, msg, function(value) { var status = value[APPLY_STATUS]; return [
|
||||
{view: html.TITLE, list: [value.user_name, can.onimport.textView(can, value, USER_PLACE_ROLE)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), can.onimport.textView(can,value, APPLY_STATUS)]},
|
||||
{view: html.STATUS, list: [value.begin_time.split(" ")[0], value.end_time.split(" ")[0]]},
|
||||
@ -13,7 +13,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.page.Append(can, target, [{view: ["info", "", "请创建权限申请"]}])
|
||||
can.run({}, [ctx.ACTION, mdb.INPUTS, USER_PLACE_ROLE], function(msg) {
|
||||
msg.Table(function(value) {
|
||||
can.onappend.input(can, {type: html.BUTTON, name: value.name, value: "我是"+can.user.trans(can, value.name, null, "value."+USER_PLACE_ROLE), onclick: function(event) {
|
||||
can.onappend.input(can, {type: html.BUTTON, name: value.name, style: value[USER_PLACE_ROLE] == "2"? "danger": "notice", value: "我是"+can.user.trans(can, value.name, null, "value."+USER_PLACE_ROLE), onclick: function(event) {
|
||||
can.run(can.request(event, {_handle: ice.TRUE}), [ctx.ACTION, mdb.CREATE, USER_PLACE_ROLE, value[USER_PLACE_ROLE]])
|
||||
}}, "", target)
|
||||
})
|
||||
|
@ -35,13 +35,14 @@ type Container interface {
|
||||
|
||||
type Table struct {
|
||||
db.Table
|
||||
UserPlace UserPlacer
|
||||
Place Placer
|
||||
Street Container
|
||||
checkRole string `name:"checkRole role"`
|
||||
inputs string `name:"inputs" role:"void"`
|
||||
list string `name:"list place_uid uid auto" role:"void"`
|
||||
market string `name:"market domain_uid* title* content" role:"leader"`
|
||||
UserPlace UserPlacer
|
||||
Place Placer
|
||||
Street Container
|
||||
checkRole string `name:"checkRole role"`
|
||||
inputs string `name:"inputs" role:"void"`
|
||||
list string `name:"list place_uid uid auto" role:"void"`
|
||||
market string `name:"market domain_uid* title* content" role:"leader"`
|
||||
marketInsert string `name:"market domain_uid* title* content" role:"leader"`
|
||||
}
|
||||
|
||||
func (s Table) LoadTrans(m *ice.Message, arg ...string) {
|
||||
@ -72,6 +73,9 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
s.InputsListRole(m, UserPlaceRoleList, arg...)
|
||||
case model.PLACE_TYPE:
|
||||
s.InputsList(m, PlaceTypeList, arg...)
|
||||
case model.DOMAIN_UID:
|
||||
m.Cmdy(s.FindSpaceCmd(m, "web.team.gonganxitong.domain"))
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
default:
|
||||
s.Table.Inputs(m, arg...)
|
||||
}
|
||||
@ -139,7 +143,10 @@ func (s Table) ValueList(m *ice.Message, arg []string, fields ...ice.Any) *ice.M
|
||||
defer m.Options(db.FIELDS, fields).Set(ice.MSG_OPTION, db.FIELDS)
|
||||
}
|
||||
defer m.Options(db.TARGET, m.CommandKey()).Set(ice.MSG_OPTION, db.TARGET)
|
||||
s.ValueModel(m, s.ValueList, arg...).PushAction(s.Remove).Action(s.Create)
|
||||
s.ValueModel(m, s.ValueList, arg...).PushAction(s.Remove)
|
||||
if len(arg) == 1 {
|
||||
m.Action(s.Create)
|
||||
}
|
||||
if len(arg) > 0 {
|
||||
kit.If(m.Length() > 0, func() { s.UserPlaceInit(m) })
|
||||
s.Button(m, "")
|
||||
@ -228,9 +235,9 @@ func (s Table) Update(m *ice.Message, data ice.Map, arg ...string) {
|
||||
func (s Table) UpdateAuth(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(model.AUTH_UID, arg[0]), arg[1:]...)
|
||||
}
|
||||
func (s Table) ChangeStatus(m *ice.Message, uid string, from, to int, arg ...string) *ice.Message {
|
||||
msg := s.Select(m.Spawn(), model.UID, uid)
|
||||
if !m.WarnNotValid(kit.Int(msg.Append(mdb.STATUS)) != int(from)) {
|
||||
func (s Table) ChangeStatus(m *ice.Message, place_uid, uid string, from, to int, arg ...string) *ice.Message {
|
||||
msg := s.ValueList(m.Spawn(), []string{place_uid, uid}, model.STATUS)
|
||||
if !m.WarnNotValid(msg.Length() == 0 || kit.Int(msg.Append(mdb.STATUS)) != int(from)) {
|
||||
s.Update(m, kit.Dict(mdb.STATUS, to, arg), model.UID, uid)
|
||||
}
|
||||
return m
|
||||
@ -259,6 +266,12 @@ func (s Portal) MarketInsert(m *ice.Message, arg ...string) {
|
||||
m.Option(ctx.ARGS, kit.Join([]string{m.Option(model.PLACE_UID), m.Option(model.UID)}))
|
||||
m.Cmdy(s.Prefix(m, market{}), s.Create, arg)
|
||||
}
|
||||
func (s Table) DashboardUpdate(m *ice.Message, arg ...string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.Prefix(m, Portal{}), s.DashboardUpdate)
|
||||
}
|
||||
func (s Table) RecordEvent(m *ice.Message, info string, arg ...string) {
|
||||
m.Cmd(s.Prefix(m, Portal{}), s.RecordEvent, info, arg)
|
||||
}
|
||||
@ -281,7 +294,14 @@ func (s Table) GetCommands(m *ice.Message, key string, arg ...string) []string {
|
||||
return kit.Simple(m.OptionSimple(key), ctx.ARGS, kit.Join(arg), m.OptionSimple(model.CITY_NAME, model.STREET_NAME, model.PLACE_NAME))
|
||||
}
|
||||
func (s Table) SendMessage(m *ice.Message, from_user_uid, to_user_uid string, arg ...string) {
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(s.Prefix(m, message{}), s.Create, model.FROM_USER_UID, from_user_uid, model.TO_USER_UID, to_user_uid, s.GetCommands(m, model.COMMAND_UID, arg...))
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(s.Prefix(m, message{}), s.Create,
|
||||
model.FROM_USER_UID, kit.Select(m.Option(model.USER_UID), from_user_uid), model.TO_USER_UID, kit.Select(m.Option(model.USER_UID), to_user_uid),
|
||||
model.DETAIL_NAME, kit.Select(m.Option(model.NAME), m.Option(model.TITLE)),
|
||||
s.GetCommands(m, model.COMMAND_UID, arg...),
|
||||
)
|
||||
}
|
||||
func (s Table) DoneMessage(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.MESSAGE_UID) != "" {
|
||||
@ -387,6 +407,7 @@ func (s Table) FindSpaceCmd(m *ice.Message, cmd ice.Any) ice.Any {
|
||||
"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",
|
||||
}
|
||||
@ -436,7 +457,6 @@ func PortalCmd(portal ice.Any) {
|
||||
cmd("apply", apply{Table: table})
|
||||
cmd("allow", allow{Table: table})
|
||||
cmd("notice", notice{Table: table})
|
||||
cmd("domain", domain{Table: table})
|
||||
cmd("member", member{Tables: Tables{Table: table}})
|
||||
cmd("market", market{Table: table})
|
||||
cmd("message", message{Table: table})
|
||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
var PLACE_NAME = msg.Option("_place_name"), PLACE_TYPE = msg.Option("_place_type"), USER_PLACE_ROLE = msg.Option("_user_place_role")
|
||||
PLACE_TYPE || can.core.List(msg.append, function(key) { can.base.endWith(key, "_type") && (PLACE_TYPE = key), can.base.endWith(key, "_role") && (USER_PLACE_ROLE = key) })
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list:[value.title||value.name||value.user_name, can.onimport.textView(can, value, PLACE_TYPE), can.onimport.textView(can, value, USER_PLACE_ROLE)]},
|
||||
{view: html.STATUS, list: [value.city_name, value.street_name, value.company_name||value.place_name]},
|
||||
{view: html.STATUS, list: [value.uid && value.uid.slice(0, 6), can.base.TimeTrim(value.created_at||value.updated_at)]},
|
||||
|
@ -14,6 +14,7 @@ type domain struct {
|
||||
|
||||
func (s domain) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
s.Fields(m, s.AS(s.Key(s, model.UID), model.DOMAIN_UID), model.NAME)
|
||||
s.Select(m)
|
||||
} else if len(arg) == 1 {
|
||||
s.Select(m)
|
||||
|
@ -13,7 +13,7 @@ type event struct {
|
||||
user user
|
||||
command command
|
||||
service service
|
||||
order string `data:"93"`
|
||||
order string `data:"94"`
|
||||
role string `data:"creator"`
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.onimport.shareTitle(can, msg)
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.user_name, can.onimport.timeView(can, value)]},
|
||||
// {view: html.STATUS, list: [value.city_name, value.street_name, value.service_name]},
|
||||
{view: html.OUTPUT, list: [value.info]},
|
||||
|
@ -15,7 +15,7 @@ type market struct {
|
||||
thumb thumb
|
||||
comment comment
|
||||
favor favor
|
||||
order string `data:"100"`
|
||||
order string `data:"101"`
|
||||
create string `name:"create domain_uid* title* content" role:"void"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
thumbToggle string `name:"thumbToggle" role:"void"`
|
||||
|
@ -1,15 +1,14 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.ui = can.page.Append(can, can._output, ["tabs", "list"])
|
||||
_init: function(can, msg) { can.ui = can.page.Append(can, can._output, [html.TABS, html.LIST])
|
||||
can.run({}, [ctx.ACTION, ctx.RUN, "web.team.gonganxitong.domain"], function(msg) {
|
||||
var domain_uid = can.misc.Cookie(can, "domain_uid")
|
||||
can.page.Append(can, can.ui.tabs, [{view: [[html.ITEM, domain_uid? "": "select"], "", "全部"], onclick: function(event) {
|
||||
can.page.Append(can, can.ui.tabs, [{view: [[html.ITEM, domain_uid? "": html.SELECT], "", "全部"], onclick: function(event) {
|
||||
can.misc.Cookie(can, "domain_uid", "")
|
||||
can.onmotion.select(can, can.ui.tabs, html.DIV_ITEM, event.target)
|
||||
can.run(event, [], function(msg) { can.onimport._data(can, msg) })
|
||||
}}])
|
||||
can.page.Append(can, can.ui.tabs, msg.Table(function(value) {
|
||||
return {view: [[html.ITEM, value.uid == domain_uid? "select": ""], "", value.name], onclick: function(event) {
|
||||
return {view: [[html.ITEM, value.uid == domain_uid? html.SELECT: ""], "", value.name], onclick: function(event) {
|
||||
can.misc.Cookie(can, "domain_uid", value.uid)
|
||||
can.onmotion.select(can, can.ui.tabs, html.DIV_ITEM, event.target)
|
||||
can.run(event, [], function(msg) { can.onimport._data(can, msg) })
|
||||
@ -21,19 +20,18 @@ Volcanos(chat.ONIMPORT, {
|
||||
_data: function(can, msg) { can.onmotion.clear(can, can.ui.list)
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
{view: html.STATUS, list: [
|
||||
{text: [value.user_name, "", "username"], onclick: function(event) {
|
||||
can.onkeymap.prevent(event)
|
||||
can.onappend.plugin(can, {index: "web.team.gonganxitong.profile", args: [value.user_uid]})
|
||||
{text: [value.user_name, "", aaa.USERNAME], onclick: function(event) { can.onkeymap.prevent(event)
|
||||
can.onimport.myStory(can, {index: "web.team.gonganxitong.profile", args: [value.user_uid]})
|
||||
}},
|
||||
can.onimport.authView(can, value), can.onimport.timeView(can, value),
|
||||
]},
|
||||
{view: html.STATUS, list: [
|
||||
// {text: [value.city_name, "", "street"]},
|
||||
// {text: [value.service_name.split(" ")[0], "", "service"]},
|
||||
{text: [value.service_name.split(" ")[0], "", "service"]},
|
||||
{text: [value.place_name, "", "place"]},
|
||||
{text: ["@"+value.street_name, "", "street"]},
|
||||
]},
|
||||
// {view: html.TITLE, list: [value.title]},
|
||||
{view: html.OUTPUT, list: [value.title]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
{view: html.ACTION, list: [
|
||||
{view: html.ITEM, list: [{icon: "bi bi-hand-thumbs-up"}, {text: value.thumb_count||"点赞"}], onclick: function(event) {
|
||||
@ -52,7 +50,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
] }, null, can.ui.list)
|
||||
},
|
||||
thumbs: function(event, can, value, button) { can.onkeymap.prevent(event)
|
||||
var target = can.page.SelectOne(can, event.currentTarget, "span")
|
||||
var target = can.page.SelectOne(can, event.currentTarget, html.SPAN)
|
||||
can.run(can.request(event, value), [ctx.ACTION, button], function(msg) { target.innerHTML = msg.Result() })
|
||||
},
|
||||
layout: function(can) {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
type member struct {
|
||||
Tables
|
||||
user user
|
||||
order string `data:"80"`
|
||||
order string `data:"81"`
|
||||
}
|
||||
|
||||
func (s member) List(m *ice.Message, arg ...string) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
var PLACE_NAME = msg.Option("_place_name"), PLACE_TYPE = msg.Option("_place_type"), USER_PLACE_ROLE = msg.Option("_user_place_role")
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.user_name, value.auth_name, can.onimport.authView(can, value), can.onimport.textView(can, value, USER_PLACE_ROLE)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at)]},
|
||||
{view: html.OUTPUT, list: [value.info||value.content]},
|
||||
|
@ -12,7 +12,7 @@ type message struct {
|
||||
Table
|
||||
command command
|
||||
service service
|
||||
order string `data:"103"`
|
||||
order string `data:"102"`
|
||||
create string `name:"create from_user_uid to_user_uid"`
|
||||
read string `name:"read" role:"void"`
|
||||
done string `name:"done" role:"void"`
|
||||
@ -22,7 +22,7 @@ type message struct {
|
||||
|
||||
func (s message) Create(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Option(ctx.ARGS) == "", func() {
|
||||
arg = append(arg, ctx.ARGS, kit.Join([]string{m.Option(s.Keys(s.Place, model.UID)), m.Option(model.UID)}))
|
||||
arg = append(arg, ctx.ARGS, kit.JoinFields(m.Option(s.Keys(s.Place, model.UID)), m.Option(model.UID)))
|
||||
})
|
||||
s.Table.Create(m, arg...)
|
||||
}
|
||||
@ -30,7 +30,7 @@ func (s message) List(m *ice.Message, arg ...string) {
|
||||
s.Tables(m, s.command, s.service).FieldsWithCreatedAT(m, s,
|
||||
model.FROM_USER_UID, s.Key(s, model.PLACE_NAME), s.Key(s.command, model.NAME), model.SCORE, model.MESSAGE_STATUS,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.OPERATE, model.ARGS,
|
||||
s.Key(s, model.CITY_NAME), s.Key(s, model.STREET_NAME), model.SERVICE_NAME,
|
||||
s.Key(s, model.CITY_NAME), s.Key(s, model.STREET_NAME), model.SERVICE_NAME, s.Key(s, model.DETAIL_NAME),
|
||||
)
|
||||
if len(arg) < 2 {
|
||||
s.Orders(m, s.Desc(model.SCORE), s.Desc(model.CREATED_AT))
|
||||
@ -65,7 +65,7 @@ func (s message) List(m *ice.Message, arg ...string) {
|
||||
} else if len(arg) == 2 {
|
||||
msg := s.SelectDetail(m.Spawn(), model.TO_USER_UID, m.Option(model.USER_UID), s.Key(s, model.UID), arg[1])
|
||||
s.ProcessPodCmd(m, msg, model.MESSAGE_UID, arg[1])
|
||||
if m.Option(model.MESSAGE_STATUS) == MessageCreate.String() {
|
||||
if MessageStatus(kit.Int(msg.Append(model.STATUS))) == MessageCreate {
|
||||
s.update(m.Spawn(kit.Dict(model.UID, arg[1])), kit.Dict(model.STATUS, MessageRead), model.STATUS, MessageCreate)
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,17 @@
|
||||
var MESSAGE_STATUS = "message_status"
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.ui = can.page.Append(can, can._output, [html.TABS, html.LIST])
|
||||
can.onimport.myTabs(can, MESSAGE_STATUS, ["all", "create", "read", "done"], can.ui.tabs)
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myTabs(can, MESSAGE_STATUS, ["all", "create", "read", "done"])
|
||||
can.onimport.myView(can, msg, function(value) { var args = can.core.Split(value.args)
|
||||
value.icons = value.user_avatar||value.icons; if (value.score > 0) { value._style = ["sticky"] }
|
||||
return [
|
||||
{view: html.TITLE, list: [value.place_name, value.name, (args[1]||"").slice(0, 6), value.message_status != "done" && can.onimport.textView(can, value, MESSAGE_STATUS, mdb.STATUS)]},
|
||||
{view: html.TITLE, list: [value.place_name, value.name, value.detail_name||(args[1]||"").slice(0, 6),
|
||||
value.message_status != "done" && can.onimport.textView(can, value, MESSAGE_STATUS)
|
||||
]},
|
||||
{view: html.STATUS, list: [value.city_name, value.street_name, value.service_name]},
|
||||
{view: html.STATUS, list: [can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
value.info && {view: html.OUTPUT, list: [value.info]},
|
||||
]
|
||||
}, null, can.ui.list)
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.list && can.page.styleHeight(can, can.ui.list, can.ConfHeight()-can.ui.tabs.offsetHeight)
|
||||
})
|
||||
},
|
||||
})
|
||||
|
@ -10,6 +10,8 @@ const (
|
||||
TYPE = "type"
|
||||
ROLE = "role"
|
||||
STATUS = "status"
|
||||
LEVEL = "level"
|
||||
SCORE = "score"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
CREATOR = "creator"
|
||||
@ -36,19 +38,21 @@ const (
|
||||
AUTH_NAME = "auth_name"
|
||||
AUTH_TYPE = "auth_type"
|
||||
AUTH_STATUS = "auth_status"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
QRCODE_TYPE = "qrcode_type"
|
||||
APPLY_UID = "apply_uid"
|
||||
APPLY_STATUS = "apply_status"
|
||||
ALLOW_UID = "allow_uid"
|
||||
ALLOW_STATUS = "allow_status"
|
||||
EVENT_UID = "event_uid"
|
||||
PORTAL_NAME = "portal_name"
|
||||
MARKET_UID = "market_uid"
|
||||
DOMAIN_UID = "domain_uid"
|
||||
DOMAIN_NAME = "domain_name"
|
||||
DETAIL_NAME = "detail_name"
|
||||
COMMAND_UID = "command_uid"
|
||||
COMMAND_ICON = "command_icon"
|
||||
COMMAND_NAME = "command_name"
|
||||
MARKET_UID = "market_uid"
|
||||
PORTAL_NAME = "portal_name"
|
||||
MESSAGE_UID = "message_uid"
|
||||
MESSAGE_STATUS = "message_status"
|
||||
SERVICE_UID = "service_uid"
|
||||
@ -56,7 +60,6 @@ const (
|
||||
SERVICE_NAME = "service_name"
|
||||
SERVICE_TYPE = "service_type"
|
||||
SERVICE_STATUS = "service_status"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
THUMB_COUNT = "thumb_count"
|
||||
FAVOR_COUNT = "favor_count"
|
||||
COMMENT_COUNT = "comment_count"
|
||||
@ -83,7 +86,6 @@ const (
|
||||
QUERY = "query"
|
||||
ARGS = "args"
|
||||
INIT = "init"
|
||||
SCORE = "score"
|
||||
)
|
||||
|
||||
type Sess struct {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
type notice struct {
|
||||
Table
|
||||
order string `data:"94"`
|
||||
order string `data:"95"`
|
||||
create string `name:"create title* content*" role:"landlord,teacher,leader"`
|
||||
remove string `name:"remove" role:"landlord,teacher,leader"`
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
body.dark { --plugin-bg-color:#0d1117; --output-bg-color:#171a22; }
|
||||
$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; color:var(--notice-bg-color); min-width:60px; display:unset; }
|
||||
$action div.item.button input { border:none; background-color:var(--plugin-bg-color); color:var(--notice-bg-color); min-width:60px; display:unset; }
|
||||
$action div.item.button input:hover { background-color:var(--hover-bg-color); }
|
||||
$action div.item.button span { display:none; }
|
||||
$action div.item.button i { display:none; }
|
||||
@ -47,18 +47,17 @@ $output table.content td.action i { display:none; }
|
||||
$output table.content.detail tr.action input.icons { display:unset; }
|
||||
$output table.content.detail tr.action i { display:none; }
|
||||
$output table.content.detail tr.uid { display:none; }
|
||||
|
||||
$action div.item.notice input[type=button] { border:var(--box-notice); color:var(--notice-bg-color); }
|
||||
$action div.item.danger input[type=button] { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
|
||||
$output input.notice[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output input.danger[type=button] { border:var(--box-danger); background-color:var(--output-bg-color); color:var(--danger-bg-color); }
|
||||
$output input.danger[type=button] { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output input[type=button][name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
|
||||
$output span.type { border:var(--box-notice); color:var(--notice-bg-color); padding:0 3px; }
|
||||
$output span.role { border:var(--box-notice); color:var(--notice-bg-color); padding:0 3px; }
|
||||
$output span.level { border:var(--box-notice); color:var(--notice-bg-color); padding:0 3px; font-size:12px; }
|
||||
$output span.type.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output span.role.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output span.level.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output span.status.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output>fieldset.story { margin-top:48px; }
|
||||
$output fieldset.story { box-shadow:none; }
|
||||
@ -69,14 +68,15 @@ $output fieldset.story>div.status { display:none; }
|
||||
$output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output table.content td { box-shadow:none; }
|
||||
$output fieldset.story>div.output table.content td img { max-width:100%; }
|
||||
$output fieldset.story>div.output table.content tr.user_avatar td img { max-width:128px; }
|
||||
$output fieldset.story>div.output>div.code { text-align:center; }
|
||||
$output fieldset.story>div.output>div.code>img { display:block; margin:auto; width:100%; max-width:390px; }
|
||||
$output fieldset.story>div.output>div.code>input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); margin-right:10px; float:right; }
|
||||
$output fieldset.story>div.output>div.code>input[type=button].danger { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story>div.output>div.code>input[type=button][name=cancel] { border:var(--box-border); background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story>div.output>div.code div.item.button { margin-top:10px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button { margin-top:20px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; min-width:240px; height:36px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button].danger { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story>div.output>div.code div.item.button.danger input[type=button] { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button][name=cancel] { border:var(--box-border); background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output>fieldset.story>div.output div.item.card>div.output { padding:10px; }
|
||||
$output>fieldset.story>div.output div.item.card>div.output div.output { padding:5px 0; white-space:pre-line; }
|
||||
@ -96,7 +96,7 @@ $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.action i { margin-right:5px; }
|
||||
$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:unset; margin:0; width:100% !important; max-width:100% !important; }
|
||||
body.mobile div.input.float { position:absolute; top:0 !important; margin:0; width:100% !important; max-width:100% !important; }
|
||||
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); }
|
||||
|
@ -89,7 +89,7 @@ func (s Portal) Run(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(arg)
|
||||
}
|
||||
}
|
||||
if sub != mdb.INPUTS {
|
||||
if sub != mdb.INPUTS && kit.IndexOf(arg, mdb.INPUTS) == -1 {
|
||||
s.Place.RewriteAppend(m)
|
||||
}
|
||||
})
|
||||
@ -234,8 +234,11 @@ func (s Portal) RecordEvent(m *ice.Message, arg ...string) {
|
||||
s.event.Record(m.Spawn(kit.Dict(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))), arg[0], arg[1:]...)
|
||||
}
|
||||
func (s Portal) ValueCreate(m *ice.Message, arg ...string) {
|
||||
arg = kit.TransArgKeys(arg, s.Keys(m.Option(db.TARGET), model.TYPE), model.TYPE)
|
||||
arg = kit.TransArgKeys(arg, s.Keys(m.Option(db.TARGET), model.NAME), model.NAME)
|
||||
arg = kit.TransArgKeys(arg, s.Keys(m.Option(db.TARGET), model.TYPE), model.TYPE)
|
||||
arg = kit.TransArgKeys(arg, s.Keys(m.Option(db.TARGET), model.LEVEL), model.LEVEL)
|
||||
arg = kit.TransArgKeys(arg, s.Keys(m.Option(db.TARGET), model.TITLE), model.TITLE)
|
||||
arg = kit.TransArgKeys(arg, s.Keys(m.Option(db.TARGET), model.CONTENT), model.CONTENT)
|
||||
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.USER_UID, s.Keys(s.Place, model.UID)))...)
|
||||
}
|
||||
func (s Portal) ValueRemove(m *ice.Message, arg ...string) {
|
||||
|
@ -17,8 +17,16 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
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)) })
|
||||
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.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)
|
||||
}
|
||||
})
|
||||
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)
|
||||
}) })
|
||||
@ -38,8 +46,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex, USER_PLACE_ROLE), can.onexport.index(can, can.sup.current)
|
||||
can.onimport.myAllow(can, msg, can.ui.myallow), can.onimport.myOrder(can, msg, can.ui.myorder)
|
||||
}
|
||||
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")
|
||||
if (can.Option(PLACE_UID) == "") { var uid = can.onimport.myPlace(can, msg, can.ui.myplace)
|
||||
msg.Length() > 0? can.run({}, [uid], function(msg) { showIndex(can._index_msg = msg) }): can.run({}, [uid], function(msg) { can.onimport.myOrder(can, can._index_msg = msg, can.ui.myorder) })
|
||||
} else {
|
||||
@ -135,7 +141,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
})
|
||||
Volcanos(chat.ONACTION, {
|
||||
beforeInputs: function(event, can, button, target) {
|
||||
can.onmotion.toggle(can, can._root.Action._target, false)
|
||||
can.page.insertBefore(can, target._target, can._root.Header._target)
|
||||
// can.user.isMobile && can.onmotion.toggle(can, can._root.Action._output, false)
|
||||
target.Option("city_name", "深圳市", true)
|
||||
target.Option("company_name", "宝安妇幼", true)
|
||||
target.Option("queue_name", "二楼产检")
|
||||
@ -143,7 +150,7 @@ Volcanos(chat.ONACTION, {
|
||||
target.Option("volume_amount", "100")
|
||||
},
|
||||
afterInputs: function(event, can, button, target) {
|
||||
can.onmotion.toggle(can, can._root.Action._target, true)
|
||||
can.user.isMobile && can.onmotion.toggle(can, can._root.Action._target, true)
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONEXPORT, {
|
||||
@ -151,11 +158,11 @@ Volcanos(chat.ONEXPORT, {
|
||||
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)
|
||||
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.onimport.myCount(can, value, can.ui.mycount), can.onimport.myInit(can, can._index_msg, value, can.ui.myinit)
|
||||
can.onmotion.toggle(can, can.ui.myindex, true)
|
||||
can.onmotion.toggle(can, can.ui.myallow, can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0)
|
||||
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)
|
||||
},
|
||||
index: function(can, value, role) { role = role||value._role
|
||||
can.ui.role && can.onmotion.toggle(can, can.ui.role, value._role == "creator")
|
||||
|
@ -9,6 +9,8 @@
|
||||
"cancel": "取消", "submit": "提交", "finish": "完成", "reject": "驳回", "approve": "通过",
|
||||
"read": "已读", "done": "完成", "sticky": "置顶", "unSticky": "取消置顶",
|
||||
"autogen": "生成", "compile": "编译", "oauth": "授权", "project": "项目",
|
||||
"marketInsert": "推广",
|
||||
"commentCreate": "评论",
|
||||
"icons": {
|
||||
"qrcode": "https://img.icons8.com/officel/80/qr-code.png",
|
||||
"event": "https://img.icons8.com/officel/80/property-with-timer.png",
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
type qrcode struct {
|
||||
Tables
|
||||
portal Portal
|
||||
order string `data:"90"`
|
||||
order string `data:"91"`
|
||||
role string `data:"creator"`
|
||||
apply string `name:"apply" role:"void"`
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
type recent struct {
|
||||
Table
|
||||
service service
|
||||
order string `data:"102"`
|
||||
order string `data:"103"`
|
||||
create string `name:"create service_uid args"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
open string `name:"open" role:"void"`
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.onimport.shareTitle(can, msg)
|
||||
can.onimport.itemcards(can, msg, function(value) {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) {
|
||||
return [
|
||||
{view: html.TITLE, list: [value.name||value.title||value.user_name]},
|
||||
{view: html.STATUS, list: [value.uid && value.uid.slice(0, 6), can.base.TimeTrim(value.created_at||value.updated_at)]},
|
||||
@ -8,7 +8,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
{view: html.OUTPUT, list: [value.info||value.content]},
|
||||
]
|
||||
}, function(event, value) {
|
||||
// can.onaction._goback(can)
|
||||
can.onaction._goback(can)
|
||||
can.onimport.plugin(can, {args: [value.uid]})
|
||||
})
|
||||
},
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
|
||||
type service struct {
|
||||
Table
|
||||
order string `data:"102"`
|
||||
order string `data:"104"`
|
||||
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"`
|
||||
|
@ -28,5 +28,11 @@ func (s sess) Check(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_AVATAR, msg.Append(model.AVATAR))
|
||||
m.Option(model.USER_UID, msg.Append(model.UID))
|
||||
}
|
||||
func (s sess) List(m *ice.Message, arg ...string) {
|
||||
if m.IsTech() {
|
||||
s.Table.List(m, arg...)
|
||||
m.PushAction(s.Remove)
|
||||
}
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(sess{}) }
|
||||
|
@ -4,7 +4,7 @@ import "shylinux.com/x/ice"
|
||||
|
||||
type support struct {
|
||||
Table
|
||||
order string `data:"104"`
|
||||
order string `data:"105"`
|
||||
}
|
||||
|
||||
func (s support) List(m *ice.Message, arg ...string) {}
|
||||
|
@ -9,14 +9,8 @@ type {{.Option "table"}} struct {
|
||||
remove string `name:"remove" role:"leader"`
|
||||
}
|
||||
|
||||
func (s {{.Option "table"}}) Create(m *ice.Message, arg ...string) {
|
||||
s.Table.ValueCreate(m, arg...)
|
||||
}
|
||||
func (s {{.Option "table"}}) Remove(m *ice.Message, arg ...string) {
|
||||
s.Table.ValueRemove(m, arg...)
|
||||
}
|
||||
func (s {{.Option "table"}}) List(m *ice.Message, arg ...string) {
|
||||
s.Table.ValueList(m, arg).Display("")
|
||||
}
|
||||
func (s {{.Option "table"}}) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s {{.Option "table"}}) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s {{.Option "table"}}) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
||||
func init() { ice.TeamCtxCmd({{.Option "table"}}{}) }
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.name||value.title||value.user_name, can.onimport.textView(can, value, "auth_type")]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), can.onimport.textView(can, value, "auth_status")]},
|
||||
{view: html.OUTPUT, list: [value.info||value.content]},
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
|
@ -76,4 +76,4 @@ type Value struct {
|
||||
func (s Value) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s Value) Modify(m *ice.Message, arg ...string) { s.ValueModify(m, arg...) }
|
||||
func (s Value) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s Value) List(m *ice.Message, arg ...string) { s.ValueList(m, arg, model.TITLE, model.CONTENT) }
|
||||
func (s Value) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
|
||||
type Portal struct {
|
||||
guanlixitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* auth_type*:select auth_name*" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* company_name* auth_name* auth_type*:select" role:"void"`
|
||||
}
|
||||
|
||||
func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
|
@ -1,10 +1,16 @@
|
||||
package gonganxitong
|
||||
package {{.Option "zone"}}
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
type {{.Option "name"}} struct{ Tables }
|
||||
|
||||
func (s {{.Option "name"}}) List(m *ice.Message, arg ...string) {
|
||||
type {{.Option "name"}} struct {
|
||||
Table
|
||||
fields string `data:"title,content"`
|
||||
create string `name:"create title* content*" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
}
|
||||
|
||||
func (s {{.Option "name"}}) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s {{.Option "name"}}) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s {{.Option "name"}}) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
||||
func init() { ice.TeamCtxCmd({{.Option "name"}}{}) }
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.name||value.title||value.user_name]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at)]},
|
||||
{view: html.OUTPUT, list: [value.info||value.content]},
|
||||
|
@ -30,7 +30,7 @@ func (s Schedule) Create(m *ice.Message, arg ...string) {
|
||||
})
|
||||
s.SendMessage(m, m.Option(model.USER_UID), m.Option(model.USER_UID))
|
||||
s.sendTemplate(m, "约号成功", m.Result())
|
||||
Portal{}.DashboardUpdate(m)
|
||||
s.DashboardUpdate(m)
|
||||
m.ProcessRefresh()
|
||||
}
|
||||
func (s Schedule) Call(m *ice.Message, arg ...string) {
|
||||
@ -181,7 +181,7 @@ func (s Schedule) addCount(m *ice.Message, key, count string) {
|
||||
}
|
||||
func (s Schedule) changeStatus(m *ice.Message, from, to ScheduleStatus, arg ...string) *ice.Message {
|
||||
key := m.ActionKey() + "_time"
|
||||
s.Table.ChangeStatus(m, m.Option(model.UID), int(from), int(to), append(arg, key, m.Time())...)
|
||||
s.Table.ChangeStatus(m, m.Option(model.QUEUE_UID), m.Option(model.UID), int(from), int(to), append(arg, key, m.Time())...)
|
||||
return m
|
||||
}
|
||||
func (s Schedule) sendTemplate(m *ice.Message, title string, arg ...string) *ice.Message {
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) {
|
||||
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]}
|
||||
@ -14,9 +14,9 @@ Volcanos(chat.ONIMPORT, {
|
||||
var _time = {view: html.STATUS, list: [can.user.trans(can, "finish_time:", "结束时间:"), value.end_time]}
|
||||
}
|
||||
return [
|
||||
{view: html.TITLE, list:[
|
||||
value.name||value.user_name, value.schedule_status != "finish" && can.onimport.textView(can, value, "schedule_status"),
|
||||
can.user.isMobile && {view: html.ACTION, _init: function(target) { can.page.appendAction(can, value, target) }},
|
||||
{view: html.TITLE, list:[value.name||value.user_name,
|
||||
value.schedule_status != "finish" && can.onimport.textView(can, value, "schedule_status"),
|
||||
can.onimport.titleAction(can, value),
|
||||
]},
|
||||
{view: html.STATUS, list: [value.uid && value.uid.slice(0, 6), can.base.TimeTrim(value.created_at||value.updated_at), value.reception_name]},
|
||||
time, _time,
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.reception_name]},
|
||||
{view: html.STATUS, list: [can.user.trans(can, "open:", "放号量:"), value.amount, 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"]},
|
||||
|
Loading…
x
Reference in New Issue
Block a user