mirror of
https://shylinux.com/x/community
synced 2025-07-01 21:21:19 +08:00
add some
This commit is contained in:
parent
1ea755b709
commit
f4704d36b9
@ -87,6 +87,18 @@ func (s Table) InputsList(m *ice.Message, list ice.Any, arg ...string) {
|
||||
}
|
||||
m.SortInt(arg[0]).DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) InputsListRole(m *ice.Message, list ice.Any, arg ...string) {
|
||||
s.InputsListSkip(m, list, "1", arg...)
|
||||
}
|
||||
func (s Table) InputsListSkip(m *ice.Message, list ice.Any, skip string, arg ...string) {
|
||||
it := reflect.ValueOf(list).MapRange()
|
||||
for it.Next() {
|
||||
if it.Key().Int() > kit.Int64(skip) {
|
||||
m.Push(arg[0], it.Key().Int()).Push(model.NAME, it.Value().String())
|
||||
}
|
||||
}
|
||||
m.SortInt(arg[0]).DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) InputsListValue(m *ice.Message, list ice.Any, key string) string {
|
||||
k, e := strconv.ParseInt(key, 10, 64)
|
||||
if e != nil {
|
||||
@ -100,15 +112,6 @@ func (s Table) InputsListValue(m *ice.Message, list ice.Any, key string) string
|
||||
}
|
||||
return ""
|
||||
}
|
||||
func (s Table) InputsListRole(m *ice.Message, list ice.Any, arg ...string) {
|
||||
it := reflect.ValueOf(list).MapRange()
|
||||
for it.Next() {
|
||||
if it.Key().Int() > 1 {
|
||||
m.Push(arg[0], it.Key().Int()).Push(model.NAME, it.Value().String())
|
||||
}
|
||||
}
|
||||
m.SortInt(arg[0]).DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) ValueModel(m *ice.Message, action ice.Any, arg ...string) *ice.Message {
|
||||
defer m.Options(db.TARGET, kit.Select(m.CommandKey(), m.Config(db.MODELS))).Set(ice.MSG_OPTION, db.TARGET)
|
||||
defer m.Options(db.MODEL, m.Configv(db.MODEL)).Set(ice.MSG_OPTION, db.MODEL)
|
||||
@ -135,7 +138,6 @@ 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)
|
||||
}
|
||||
if s.ValueModel(m, s.ValueList, arg...); len(arg) > 0 {
|
||||
kit.If(m.Length() > 0, func() { s.UserPlaceInit(m) })
|
||||
s.Button(m, "")
|
||||
}
|
||||
return m
|
||||
@ -242,9 +244,10 @@ func (s Table) UserPlaceRole(m *ice.Message) int {
|
||||
return kit.Int(m.Cmdy(s.Prefix(m, Portal{}), s.UserPlaceRole).Option(model.USER_ROLE))
|
||||
}
|
||||
func (s Table) UserPlaceInit(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.PLACE_INIT) == "" {
|
||||
if m.Option(model.PLACE_INIT) == "" || m.PrefixKey() != m.Option(ice.MSG_INDEX) {
|
||||
return
|
||||
}
|
||||
m.Info("what %v %v %v", m.Length(), m.PrefixKey(), m.Option(ice.MSG_INDEX))
|
||||
m.Cmd(s.Prefix(m, Portal{}), "placeCmd", "addCount", model.INIT, 1, m.Option(model.PLACE_UID), m.Option(model.PLACE_INIT))
|
||||
}
|
||||
func (s Table) DashboardUpdate(m *ice.Message, arg ...string) {
|
||||
|
@ -92,6 +92,7 @@ const (
|
||||
QUERY = "query"
|
||||
ARGS = "args"
|
||||
INIT = "init"
|
||||
UNIT = "unit"
|
||||
)
|
||||
|
||||
type Sess struct {
|
||||
|
@ -40,6 +40,7 @@ func (s notice) List(m *ice.Message, arg ...string) {
|
||||
s.SelectJoinUser(m)
|
||||
kit.If(s.IsLeader(m), func() {
|
||||
m.PushAction(s.Remove)
|
||||
s.Button(m, "")
|
||||
}, func() {
|
||||
m.Action()
|
||||
})
|
||||
|
@ -77,13 +77,17 @@ $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-height:128px; 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>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 {
|
||||
border:var(--box-danger); background-color:transparent; color:var(--danger-bg-color);
|
||||
}
|
||||
$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.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.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.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; }
|
||||
$output fieldset.story.form>div.output>div.code>input[type=button] { font-size:18px; margin:10px; height:36px; }
|
||||
|
@ -289,10 +289,10 @@ func (s Portal) DashboardCreate(m *ice.Message, name string, arg ...string) func
|
||||
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) {
|
||||
func (s Portal) DashboardInsert(m *ice.Message, score, title, unit 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))) })
|
||||
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))
|
||||
model.QUERY, kit.Format(arg), mdb.FIELD, field, model.TITLE, title, model.SCORE, score, model.UNIT, unit, m.OptionSimple(model.DASHBOARD_UID))
|
||||
}
|
||||
func (s Portal) DashboardUpdate(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.DASHBOARD_UID) != "" {
|
||||
|
@ -161,9 +161,12 @@ Volcanos(chat.ONACTION, {
|
||||
can.user.isMobile && can._root.Inputs.appendChild(sub._target)
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._output, html.VISIBILITY, html.HIDDEN)
|
||||
sub.Option("city_name", "深圳市")
|
||||
// sub.Option("city_name", "邹城市")
|
||||
sub.Option("street_name", "航城街道")
|
||||
sub.Option("school_name", "深圳中学")
|
||||
sub.Option("company_name", "云境互联")
|
||||
// sub.Option("company_name", "老邵木器加工")
|
||||
sub.Option("store_name", "老邵木器加工")
|
||||
sub.Option("place_name", "易尚三维")
|
||||
sub.Option("queue_name", "二楼产检")
|
||||
sub.Option("reception_name", "科室1")
|
||||
|
@ -6,7 +6,6 @@ const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
TYPE = "type"
|
||||
ROLE = "role"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
USER_UID = "user_uid"
|
||||
|
@ -6,7 +6,6 @@ const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
TYPE = "type"
|
||||
ROLE = "role"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
USER_UID = "user_uid"
|
||||
|
@ -19,14 +19,7 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
case model.USER_AUTH_ROLE:
|
||||
s.InputsListRole(m, UserAuthRoleList, arg...)
|
||||
case model.AUTH_TYPE:
|
||||
if m.IsTech() {
|
||||
s.InputsList(m, AuthTypeList, arg...)
|
||||
} else {
|
||||
for i, v := range AuthTypeList {
|
||||
kit.If(i > 0, func() { m.Push(arg[0], i).Push(model.NAME, v) })
|
||||
}
|
||||
m.SortInt(arg[0]).DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
s.InputsListSkip(m, AuthTypeList, kit.Select("0", "-1", m.IsTech()), arg...)
|
||||
case model.AUTH_STATUS:
|
||||
s.InputsList(m, AuthStatusList, arg...)
|
||||
case model.FROM_UID:
|
||||
|
@ -6,7 +6,6 @@ const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
TYPE = "type"
|
||||
ROLE = "role"
|
||||
STATUS = "status"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
|
@ -50,13 +50,13 @@ func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
|
||||
}
|
||||
func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Tables(m, "left join auths on user_auths.auth_uid = auths.uid").FieldsWithCreatedAT(m, s.UserPlace,
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.Place, model.STATUS), s.Keys(s.UserPlace, model.ROLE),
|
||||
s.AS(s.Key(s.Place, model.UID), s.Keys(s.Place, model.UID)), s.Keys(s.Street, model.UID),
|
||||
model.AUTH_NAME, model.AUTH_TYPE, model.AUTH_STATUS, model.USER_AUTH_ROLE,
|
||||
s.AS(s.Key(s.Place, model.UID), model.AUTH_UID), model.COMPANY_UID,
|
||||
)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0])
|
||||
} else if len(arg) == 2 {
|
||||
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0], s.Key(s.UserPlace, s.Keys(s.Place, model.UID)), arg[1])
|
||||
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0], s.Key(s.UserPlace, model.AUTH_UID), arg[1])
|
||||
} else {
|
||||
return m
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
TYPE = "type"
|
||||
ROLE = "role"
|
||||
STATUS = "status"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
|
@ -15,9 +15,9 @@ type Portal struct {
|
||||
|
||||
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {
|
||||
defer s.DashboardCreate(m, "")()
|
||||
s.DashboardInsert(m, "1", "订单总量", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID))
|
||||
s.DashboardInsert(m, "2", "订单已预约", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID), model.STATUS, SchedulePlan)
|
||||
s.DashboardInsert(m, "3", "订单已取号", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID), model.STATUS, ScheduleTake)
|
||||
s.DashboardInsert(m, "4", "订单已完成", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID), model.STATUS, ScheduleFinish)
|
||||
s.DashboardInsert(m, "1", "订单总量", "order", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID))
|
||||
s.DashboardInsert(m, "2", "订单已预约", "order", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID), model.STATUS, SchedulePlan)
|
||||
s.DashboardInsert(m, "3", "订单已取号", "order", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID), model.STATUS, ScheduleTake)
|
||||
s.DashboardInsert(m, "4", "订单已完成", "order", Schedule{}, "", model.QUEUE_UID, m.Option(model.QUEUE_UID), model.STATUS, ScheduleFinish)
|
||||
}
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userQueue{}, queue{})}) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user