From 8d17a732f6b552b997dddf364005cdcf1e6b644e Mon Sep 17 00:00:00 2001 From: jingganjiaoyu Date: Sun, 18 Aug 2024 02:25:52 +0800 Subject: [PATCH] opt some --- src/gonganxitong/{order.go => allow.go} | 28 +++++----- src/gonganxitong/{order.js => allow.js} | 10 ++-- src/gonganxitong/apply.go | 4 +- src/gonganxitong/common.go | 20 +++++-- src/gonganxitong/model/model.go | 8 +-- src/gonganxitong/portal.css | 10 ++++ src/gonganxitong/portal.go | 27 ++++++++- src/gonganxitong/portal.json | 8 +-- src/gonganxitong/portal.shy | 7 +-- src/gonganxitong/service.go | 21 ++++--- src/gonganxitong/template/userClass.go | 2 +- src/yuehaoxitong/open.go | 3 + src/yuehaoxitong/reception.go | 1 - src/yuehaoxitong/schedule.go | 1 - src/yuehaoxitong/volume.go | 1 - usr/local/export/mdb.export/hash.json | 56 +++++++++++++++++++ .../export/web.chat.macos.desktop/hash.json | 8 +++ usr/local/export/web.chat.wx.menu/hash.json | 26 ++++++++- .../web.team.gonganxitong.portal/hash.json | 29 +++++++--- .../web.team.guanlixitong.portal/hash.json | 27 ++++++--- .../web.team.yuehaoxitong.portal/hash.json | 53 +++++++++--------- 21 files changed, 254 insertions(+), 96 deletions(-) rename src/gonganxitong/{order.go => allow.go} (80%) rename src/gonganxitong/{order.js => allow.js} (78%) diff --git a/src/gonganxitong/order.go b/src/gonganxitong/allow.go similarity index 80% rename from src/gonganxitong/order.go rename to src/gonganxitong/allow.go index 36f4dae..7f1156c 100644 --- a/src/gonganxitong/order.go +++ b/src/gonganxitong/allow.go @@ -7,7 +7,7 @@ import ( "shylinux.com/x/community/src/gonganxitong/model" ) -type order struct { +type allow struct { Table user user event event @@ -21,19 +21,19 @@ type order struct { approve string `name:"approve" role:"void"` } -func (s order) Create(m *ice.Message, arg ...string) { +func (s allow) Create(m *ice.Message, arg ...string) { s.Table.Create(m, arg...) s.sendTemplate(m, m.Trans("role order create", "权限审批 请处理")) } -func (s order) List(m *ice.Message, arg ...string) { +func (s allow) List(m *ice.Message, arg ...string) { s.Tables(m, s.apply, "left join users on applies.user_uid = users.uid").FieldsWithCreatedAT(m, s.apply, model.USER_AVATAR, model.USER_NAME, - model.PLACE_UID, s.AS(s.Key(s.apply, model.ROLE), s.Keys(s.UserPlace, model.ROLE)), model.ORDER_STATUS, - model.BEGIN_TIME, model.END_TIME, s.AS(s.Key(s, model.UID), model.ORDER_UID), + model.PLACE_UID, s.AS(s.Key(s.apply, model.ROLE), s.Keys(s.UserPlace, model.ROLE)), model.ALLOW_STATUS, + model.BEGIN_TIME, model.END_TIME, s.AS(s.Key(s, model.UID), model.ALLOW_UID), ) if len(arg) == 1 { s.Table.Select(m, s.Key(s, model.USER_UID), m.Option(model.USER_UID), model.PLACE_UID, arg[0]) - defer m.Sort(kit.Fields(model.ORDER_STATUS, model.CREATED_AT), []string{OrderCreate.String(), OrderApproved.String(), OrderRejected.String()}, ice.STR_R) + defer m.Sort(kit.Fields(model.ALLOW_STATUS, model.CREATED_AT), []string{OrderCreate.String(), OrderApproved.String(), OrderRejected.String()}, ice.STR_R) } else if len(arg) == 2 { s.Table.SelectDetail(m, s.Key(s, model.USER_UID), m.Option(model.USER_UID), model.PLACE_UID, arg[0], s.Key(s.apply, model.UID), arg[1]) } else { @@ -41,7 +41,7 @@ func (s order) List(m *ice.Message, arg ...string) { } s.RenameAppend(m, model.PLACE_UID, s.Keys(s.Place, model.UID)).SelectJoin(m, s.Place, model.NAME, model.TYPE) m.Table(func(value ice.Maps) { - if OrderStatus(kit.Int(value[model.ORDER_STATUS])) == OrderCreate { + if OrderStatus(kit.Int(value[model.ALLOW_STATUS])) == OrderCreate { m.PushButton(s.Reject, s.Approve) } else { m.PushButton() @@ -49,7 +49,7 @@ func (s order) List(m *ice.Message, arg ...string) { }).Action() s.UserPlace.RewriteAppend(m) } -func (s order) Reject(m *ice.Message, arg ...string) { +func (s allow) Reject(m *ice.Message, arg ...string) { defer m.ToastProcess()() if s.changeStatus(m, OrderCreate, OrderRejected); m.IsErr() { return @@ -58,7 +58,7 @@ func (s order) Reject(m *ice.Message, arg ...string) { s.RecordEvent(m, kit.JoinWord("❌", m.Trans("order rejected", "审批驳回"), s.TransRole(m), m.Option(model.USER_NAME)), m.Option(model.UID)) s.sendTemplate(m, m.Trans("role order rejected", "权限审批 已驳回")) } -func (s order) Approve(m *ice.Message, arg ...string) { +func (s allow) Approve(m *ice.Message, arg ...string) { defer m.ToastProcess()() if s.changeStatus(m, OrderCreate, OrderApproved); m.IsErr() { return @@ -68,18 +68,18 @@ func (s order) Approve(m *ice.Message, arg ...string) { s.sendTemplate(m, m.Trans("role order approved", "权限审批 已通过")) } -func init() { ice.TeamCtxCmd(order{Table: newTable()}) } +func init() { ice.TeamCtxCmd(allow{Table: newTable()}) } -func (s order) changeStatus(m *ice.Message, from, todo OrderStatus, arg ...string) *ice.Message { - msg := s.Table.Select(m.Spawn(), model.UID, m.Option(model.ORDER_UID), model.USER_UID, m.Option(model.USER_UID)) +func (s allow) changeStatus(m *ice.Message, from, todo OrderStatus, arg ...string) *ice.Message { + msg := s.Table.Select(m.Spawn(), model.UID, m.Option(model.ALLOW_UID), model.USER_UID, m.Option(model.USER_UID)) if !m.WarnNotFound(msg.Length() == 0, m.Option(model.UID)) { if status := OrderStatus(kit.Int(msg.Append(model.STATUS))); !m.WarnNotValid(status != from, status.String()) { - s.Table.Update(m, kit.Dict(model.STATUS, todo), model.UID, m.Option(model.ORDER_UID)) + s.Table.Update(m, kit.Dict(model.STATUS, todo), model.UID, m.Option(model.ALLOW_UID)) } } return msg } -func (s order) sendTemplate(m *ice.Message, info string) *ice.Message { +func (s allow) sendTemplate(m *ice.Message, info string) *ice.Message { s.Table.SendTemplate(m, m.Option(model.USER_NAME), m.Append(model.USER_UID), info) return m } diff --git a/src/gonganxitong/order.js b/src/gonganxitong/allow.js similarity index 78% rename from src/gonganxitong/order.js rename to src/gonganxitong/allow.js index c24fff1..5887803 100644 --- a/src/gonganxitong/order.js +++ b/src/gonganxitong/allow.js @@ -1,17 +1,17 @@ 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"), ORDER_STATUS = "order_status" - can.onimport.itemcards(can, msg, function(value) { value._style = [value[PLACE_TYPE], value[USER_PLACE_ROLE], value[ORDER_STATUS]] - var status = value[ORDER_STATUS] + 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) { value._style = [value[PLACE_TYPE], value[USER_PLACE_ROLE], value[ALLOW_STATUS]] + var status = value[ALLOW_STATUS] return [ {view: html.TITLE, list: [{text: value.user_name}, can.onimport.textView(can, value, USER_PLACE_ROLE, aaa.ROLE)]}, {view: html.STATUS, list: [{text: value.uid.slice(0, 6)}, {text: can.base.TimeTrim(value.created_at)}, - {text: [can.user.transValue(can, value, ORDER_STATUS)+" "+(status == "create" || status == "submit"? "🕑": status == "rejected"? "❌": "✅"), "", mdb.STATUS]}, + {text: [can.user.transValue(can, value, ALLOW_STATUS)+" "+(status == "create" || status == "submit"? "🕑": status == "rejected"? "❌": "✅"), "", mdb.STATUS]}, ]}, {view: html.STATUS, list: [{text: value.begin_time.split(" ")[0]}, {text: value.end_time.split(" ")[0]}]}, {view: html.STATUS, list: [{text: value.city_name}, {text: value[STREET_NAME]}]}, ] }) }, -}) \ No newline at end of file +}) diff --git a/src/gonganxitong/apply.go b/src/gonganxitong/apply.go index 8b29415..6fb835e 100644 --- a/src/gonganxitong/apply.go +++ b/src/gonganxitong/apply.go @@ -49,7 +49,7 @@ func (s apply) List(m *ice.Message, arg ...string) { } else if len(arg) == 2 { s.Table.SelectDetail(m, model.USER_UID, m.Option(model.USER_UID), model.PLACE_UID, arg[0], s.Key(s, model.UID), arg[1]) if ApplyStatus(kit.Int(m.Append(model.APPLY_STATUS))) == ApplySubmit { - m.EchoQRCode(Portal{}.Link(m, arg[0], m.Prefix("order"), arg[1])) + m.EchoQRCode(Portal{}.Link(m, arg[0], ice.GetTypeKey(allow{}), arg[1])) } } else { return @@ -85,7 +85,7 @@ func (s apply) Submit(m *ice.Message, arg ...string) { if m.WarnNotFound(msg.Length() == 0, role.String()) { return } - m.Cmd(m.Prefix("order"), s.Create, msg.AppendSimple(model.USER_UID), model.APPLY_UID, m.Option(model.UID), model.STATUS, OrderCreate) + m.Cmd(allow{}, s.Create, msg.AppendSimple(model.USER_UID), model.APPLY_UID, m.Option(model.UID), model.STATUS, OrderCreate) s.RecordEvent(m, "", kit.Format("🕑 %s"+m.Trans(" apply submit", "权限申请提交"), s.TransRole(m)), m.Option(model.UID)) s.sendTemplate(m, m.Trans("role apply submited", "权限申请 已提交")) } diff --git a/src/gonganxitong/common.go b/src/gonganxitong/common.go index c385bbc..47ee041 100644 --- a/src/gonganxitong/common.go +++ b/src/gonganxitong/common.go @@ -34,19 +34,26 @@ type Table struct { 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"` } func (s Table) Init(m *ice.Message, arg ...string) { s.Table.Init(m, arg...) - kit.If(m.Config(web.PORTAL) == ice.TRUE, func() { Portal{}.Show(m) }) + m.GoSleep("30ms", func() { + if m.Target().Commands[m.CommandKey()].Icon != "" { + Portal{}.Show(m) + } else { + kit.If(m.Config(web.PORTAL) == ice.TRUE, func() { Portal{}.Show(m) }) + } + }) } func (s Table) Exit(m *ice.Message, arg ...string) { s.Table.Exit(m, arg...) } func (s Table) AfterMigrate(m *ice.Message, arg ...string) { - kit.If(m.Config(web.PORTAL) == ice.TRUE, func() { Portal{}.Show(m, m.PrefixKey()) }) + // kit.If(m.Config(web.PORTAL) == ice.TRUE, func() { Portal{}.Show(m, m.PrefixKey()) }) } func (s Table) Inputs(m *ice.Message, arg ...string) { switch arg[0] { @@ -108,11 +115,14 @@ func (s Table) SelectJoinUser(m *ice.Message) *ice.Message { func (s Table) SelectJoinCity(m *ice.Message) *ice.Message { return s.SelectJoin(m, city{}, model.NAME) } +func (s Table) CheckRole(m *ice.Message, arg ...string) { + m.ErrorNotImplement() +} func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message { m.RewriteAppend(func(value, key string, index int) string { kit.If(key == model.PLACE_TYPE, func() { value = PlaceType(kit.Int(value)).String() }) kit.If(key == model.USER_PLACE_ROLE, func() { value = UserPlaceRole(kit.Int(value)).String() }) - kit.If(key == model.ORDER_STATUS, func() { value = OrderStatus(kit.Int(value)).String() }) + kit.If(key == model.ALLOW_STATUS, func() { value = OrderStatus(kit.Int(value)).String() }) kit.If(key == model.APPLY_STATUS, func() { value = ApplyStatus(kit.Int(value)).String() }) return value }) @@ -235,8 +245,8 @@ func PortalCmd(portal ice.Any) { cmd("portal", portal) cmd("qrcode", qrcode{Tables: Tables{Table: table}}) cmd("apply", apply{Table: table}) - cmd("order", order{Table: table}) + cmd("allow", allow{Table: table}) cmd("event", event{Table: table}) cmd("member", placeUser{Tables: Tables{Table: table}}) - cmd("service", service{}) + cmd("service", service{Table: table}) } diff --git a/src/gonganxitong/model/model.go b/src/gonganxitong/model/model.go index c6ead4a..c470aea 100644 --- a/src/gonganxitong/model/model.go +++ b/src/gonganxitong/model/model.go @@ -34,8 +34,8 @@ const ( EVENT_UID = "event_uid" APPLY_UID = "apply_uid" APPLY_STATUS = "apply_status" - ORDER_UID = "order_uid" - ORDER_STATUS = "order_status" + ALLOW_UID = "allow_uid" + ALLOW_STATUS = "allow_status" TABLES = "tables" EMAIL = "email" AVATAR = "avatar" @@ -100,7 +100,7 @@ type Apply struct { BeginTime db.Time EndTime db.Time } -type Order struct { +type Allow struct { db.ModelWithUID UserUID string `gorm:"type:char(32);index"` ApplyUID string `gorm:"type:char(32);index"` @@ -123,5 +123,5 @@ type Service struct { } func init() { - db.CmdModels("", &Sess{}, &User{}, &UserPlace{}, &Place{}, &Street{}, &City{}, Event{}, Apply{}, Order{}, Service{}) + db.CmdModels("", &Sess{}, &User{}, &UserPlace{}, &Place{}, &Street{}, &City{}, Event{}, Apply{}, Allow{}, Service{}) } diff --git a/src/gonganxitong/portal.css b/src/gonganxitong/portal.css index 52662f6..d52bbab 100644 --- a/src/gonganxitong/portal.css +++ b/src/gonganxitong/portal.css @@ -32,6 +32,16 @@ $output table.content.detail tr.action input.icons { display:unset; } $output table.content.detail tr.action i { display:none; } $output table.content td.action i { display:none; } $output table.content td.action input.icons { display:unset; } +$output fieldset.form>div.output>div.code>input[type=button] { + font-size:18px; margin:10px; height:36px; +} +$output fieldset>div.output>div.code>input[type=button] { + border-color:var(--notice-bg-color); color:var(--notice-bg-color); + margin-right:10px; min-width:80px; float:right; +} +$output fieldset>div.output>div.code>input[type=button][name=cancel] { + border-color:var(--danger-bg-color); color:var(--danger-bg-color); +} body.en $output>fieldset table.content td:first-child { max-width:180px; width:unset;} $output>fieldset table.content tr.uid { display:none; } $output>fieldset table.content tr.order_uid { display:none; } diff --git a/src/gonganxitong/portal.go b/src/gonganxitong/portal.go index 0473ea9..c792a2f 100644 --- a/src/gonganxitong/portal.go +++ b/src/gonganxitong/portal.go @@ -30,6 +30,7 @@ type Portal struct { func (s Portal) Init(m *ice.Message, arg ...string) { s.Hash.Init(m, arg...) + m.Design(s.List, "", kit.JoinWord(s.Keys(s.Place, model.UID), ctx.INDEX, model.UID, ice.AUTO)) } func (s Portal) Exit(m *ice.Message, arg ...string) { s.Hash.Exit(m, arg...) @@ -38,12 +39,35 @@ func (s Portal) BeforeMigrate(m *ice.Message, arg ...string) { } func (s Portal) AfterMigrate(m *ice.Message, arg ...string) { m.GoSleep("30ms", func() { - m.Cmdy(s.service, s.Table.Update, m.ConfigSimple(mdb.NAME), mdb.ICON, kit.Select(ice.Info.NodeIcon, m.Config(mdb.ICON)), ctx.INDEX, m.PrefixKey()) + cmd := m.Target().Commands[m.CommandKey()] + m.Cmdy(s.service, s.Table.Update, mdb.NAME, cmd.Help, mdb.ICON, kit.Select(ice.Info.NodeIcon, cmd.Icon), ctx.INDEX, m.PrefixKey()) }) } func (s Portal) Inputs(m *ice.Message, arg ...string) { m.Cmdy(s.Place, m.ActionKey(), arg) } +func (s Portal) Run(m *ice.Message, arg ...string) { + m.Search(arg[0], func(key string, cmd *ice.Command) { + role := cmd.Role + if len(arg) > 1 && arg[1] == ctx.ACTION { + if action, ok := cmd.Actions[arg[2]]; ok { + role = action.Role + } + } else { + if action, ok := cmd.Actions[arg[1]]; ok { + role = action.Role + } + } + if kit.IsIn(role, "", aaa.VOID) { + kit.If(!ctx.PodCmd(m.Message, arg) && aaa.Right(m.Message, arg), func() { m.Cmdy(arg) }) + } else { + if !m.Cmdy(arg[0], s.CheckRole, role).IsErr() { + m.Cmdy(arg) + } + } + s.Place.RewriteAppend(m) + }) +} func (s Portal) List(m *ice.Message, arg ...string) { if m.Option(mdb.VIEW) == mdb.TABLE { s.Hash.List(m, arg...).PushAction(mdb.DETAIL, s.SetIcons, s.Remove).SortInt(mdb.ORDER) @@ -63,6 +87,7 @@ func (s Portal) List(m *ice.Message, arg ...string) { } else { m.FieldsSetDetail().Cmdy(arg[1], mdb.SELECT, model.UID, arg[2]).PushAction().Action() } + s.Place.RewriteAppend(m) s.Display(m, "").DisplayCSS("") } func (s Portal) PlaceCreate(m *ice.Message, arg ...string) { diff --git a/src/gonganxitong/portal.json b/src/gonganxitong/portal.json index 0913f08..bd9b5eb 100644 --- a/src/gonganxitong/portal.json +++ b/src/gonganxitong/portal.json @@ -6,7 +6,7 @@ "placeRemove": "删除场景", "qrcode": "场景码", "apply": "权限申请", - "order": "权限审批", + "allow": "权限审批", "event": "事件流", "email": "邮箱配置", "placeUser": "服务人员", @@ -25,7 +25,7 @@ "icons": { "qrcode": "https://img.icons8.com/officel/80/qr-code.png", "apply": "https://img.icons8.com/officel/80/edit-property.png", - "order": "https://img.icons8.com/officel/80/receipt-approved.png", + "allow": "https://img.icons8.com/officel/80/receipt-approved.png", "event": "https://img.icons8.com/officel/80/property-with-timer.png", "email": "https://img.icons8.com/officel/80/reading-confirmation.png", "placeUser": "https://img.icons8.com/officel/80/person-at-home.png", @@ -50,7 +50,7 @@ "company_name": "公司名称", "city_name": "城市名称", "apply_status": "申请状态", - "order_status": "审批状态", + "allow_status": "审批状态", "begin_time": "起始时间", "end_time": "结束时间", "cancel_time": "取消时间", @@ -73,7 +73,7 @@ "rejected": "danger" } }, - "order_status": { + "allow_status": { "create": "待审批", "rejected": "已驳回", "approved": "已通过", diff --git a/src/gonganxitong/portal.shy b/src/gonganxitong/portal.shy index f2cd370..51e2b89 100644 --- a/src/gonganxitong/portal.shy +++ b/src/gonganxitong/portal.shy @@ -1,4 +1,4 @@ -chapter "公安系统" +chapter "用户场景" refer ` 公众号 https://mp.weixin.qq.com/cgi-bin/home?t=home/index&lang=zh_CN&token=494166701 ICON https://igoutu.cn/icons/officel @@ -7,7 +7,4 @@ GORM https://gorm.io/docs/indexes.html field web.chat.wx.access field web.chat.wx.menu field web.code.mysql.client -field web.code.mysql.query args `mysql gonganxitong` -field web.code.db.database -field web.code.db.driver -field web.code.db.models \ No newline at end of file +field web.code.mysql.query args `mysql gonganxitong` \ No newline at end of file diff --git a/src/gonganxitong/service.go b/src/gonganxitong/service.go index a4c952d..4fb85dd 100644 --- a/src/gonganxitong/service.go +++ b/src/gonganxitong/service.go @@ -6,7 +6,6 @@ import ( "shylinux.com/x/ice" "shylinux.com/x/icebergs/base/aaa" - // "shylinux.com/x/icebergs/base/cli" "shylinux.com/x/icebergs/base/ctx" "shylinux.com/x/icebergs/base/mdb" "shylinux.com/x/icebergs/base/nfs" @@ -54,18 +53,18 @@ func (s service) Autogen(m *ice.Message, arg ...string) { code.AutogenImport(m.Message, m.Option(mdb.NAME)) m.Option(nfs.MODULE, path.Join(code.AutogenMod(m.Message), nfs.SRC, m.Option(mdb.NAME))) p, from := path.Join(nfs.SRC, m.Option(mdb.NAME)), "template/" - m.Cmd(nfs.DEFS, path.Join(p, "model/model.go"), m.Template(from+"model/model.go")) - m.Cmd(nfs.DEFS, path.Join(p, "common.go"), m.Template(from+"common.go")) - m.Cmd(nfs.DEFS, path.Join(p, "portal.go"), m.Template(from+"portal.go")) - m.Cmd(nfs.DEFS, path.Join(p, "portal.json"), m.Template(from+"portal.json")) - m.Cmd(nfs.DEFS, path.Join(p, "user"+m.Option("Class")+".go"), m.Template(from+"userClass.go")) - m.Cmd(nfs.DEFS, path.Join(p, m.Option("class")+".go"), m.Template(from+"class.go")) + msg := m.Cmd("web.team.gonganxitong.service") + m.Cmd(nfs.DEFS, path.Join(p, "model/model.go"), msg.Template(from+"model/model.go")) + m.Cmd(nfs.DEFS, path.Join(p, "common.go"), msg.Template(from+"common.go")) + m.Cmd(nfs.DEFS, path.Join(p, "portal.go"), msg.Template(from+"portal.go")) + m.Cmd(nfs.DEFS, path.Join(p, "portal.json"), msg.Template(from+"portal.json")) + m.Cmd(nfs.DEFS, path.Join(p, "user"+m.Option("Class")+".go"), msg.Template(from+"userClass.go")) + m.Cmd(nfs.DEFS, path.Join(p, m.Option("class")+".go"), msg.Template(from+"class.go")) kit.For(kit.Split(m.Option(mdb.TABLE)), func(table string) { - m.Option(mdb.TABLE, kit.LowerCapital(table)) - m.Cmd(nfs.DEFS, path.Join(p, m.Option(mdb.TABLE)+".go"), m.Template(from+"homework.go")) - m.Cmd(nfs.DEFS, path.Join(p, m.Option(mdb.TABLE)+".js"), m.Template(from+"homework.js")) + msg.Option(mdb.TABLE, kit.LowerCapital(table)) + m.Cmd(nfs.DEFS, path.Join(p, m.Option(mdb.TABLE)+".go"), msg.Template(from+"homework.go")) + m.Cmd(nfs.DEFS, path.Join(p, m.Option(mdb.TABLE)+".js"), msg.Template(from+"homework.js")) }) - // m.Cmd(cli.SYSTEM, "gofmt", "-w", p) } func (s service) Compile(m *ice.Message, arg ...string) { m.Cmdy(code.VIMER, code.COMPILE) diff --git a/src/gonganxitong/template/userClass.go b/src/gonganxitong/template/userClass.go index bf3c599..b834922 100644 --- a/src/gonganxitong/template/userClass.go +++ b/src/gonganxitong/template/userClass.go @@ -16,7 +16,7 @@ func (s user{{.Option "Class"}}) User(m *ice.Message, arg ...string) { if len(arg) == 1 { s.Select(m, model.{{.Option "CLASS"}}_UID, arg[0]) } else if len(arg) == 2 { - s.Select(m, model.{{.Option "CLASS"}}_UID, arg[0], model.UID, arg[1]) + s.SelectDetail(m, model.{{.Option "CLASS"}}_UID, arg[0], model.UID, arg[1]) } else { return } diff --git a/src/yuehaoxitong/open.go b/src/yuehaoxitong/open.go index 3c4e436..6dd0955 100644 --- a/src/yuehaoxitong/open.go +++ b/src/yuehaoxitong/open.go @@ -20,6 +20,9 @@ func (s open) Create(m *ice.Message, arg ...string) { } } func (s open) List(m *ice.Message, arg ...string) { + if len(arg) == 0 { + return + } if s.checkRole(m.Options(model.QUEUE_UID, arg[0])) { if m.Cmdy(s.volume, arg); m.Length() == 0 { m.EchoInfoButton(m.Trans("please create open", "请创建放号"), s.Create) diff --git a/src/yuehaoxitong/reception.go b/src/yuehaoxitong/reception.go index a57502b..26aef30 100644 --- a/src/yuehaoxitong/reception.go +++ b/src/yuehaoxitong/reception.go @@ -9,7 +9,6 @@ import ( type reception struct { Table - portal string `data:"true"` create string `name:"create name*" role:"void"` rename string `name:"rename name*" role:"void"` delete string `name:"delete" role:"void"` diff --git a/src/yuehaoxitong/schedule.go b/src/yuehaoxitong/schedule.go index 2a8c628..73f1811 100644 --- a/src/yuehaoxitong/schedule.go +++ b/src/yuehaoxitong/schedule.go @@ -14,7 +14,6 @@ type schedule struct { userQueue userQueue reception reception volume volume - portal string `data:"true"` plan string `name:"plan begin_time@date end_time@date"` expire string `name:"expire" role:"void"` finish string `name:"finish" role:"void"` diff --git a/src/yuehaoxitong/volume.go b/src/yuehaoxitong/volume.go index 6014486..68cd2dd 100644 --- a/src/yuehaoxitong/volume.go +++ b/src/yuehaoxitong/volume.go @@ -9,7 +9,6 @@ import ( type volume struct { Table reception reception - portal string `data:"true"` } func (s volume) List(m *ice.Message, arg ...string) { diff --git a/usr/local/export/mdb.export/hash.json b/usr/local/export/mdb.export/hash.json index be49ec4..dcaa85e 100644 --- a/usr/local/export/mdb.export/hash.json +++ b/usr/local/export/mdb.export/hash.json @@ -20,6 +20,13 @@ "type": "hash" } }, + "03dd65a55edd011c4dee41bd0d834070": { + "meta": { + "index": "web.team.yuehaoxitong.take", + "time": "2024-08-13 18:24:20.039", + "type": "hash" + } + }, "04791d21e8f2f8427ac2ed53ca004acb": { "meta": { "index": "web.team.baoanxitong.member", @@ -181,6 +188,13 @@ "type": "hash" } }, + "30bfa47cab4cd689901fd2e1b87eb235": { + "meta": { + "index": "web.team.guanlixitong.allow", + "time": "2024-08-16 10:29:53.491", + "type": "hash" + } + }, "3374236e7ac5e4d1f8331fd0597cead3": { "meta": { "index": "web.team.ludengguanli.good", @@ -272,6 +286,13 @@ "type": "hash" } }, + "46f2ba39a0620f04aab46a999c359a2b": { + "meta": { + "index": "web.team.yuehaoxitong.allow", + "time": "2024-08-16 10:29:53.515", + "type": "hash" + } + }, "4b1e97b62a44419c00caf65e297abd18": { "meta": { "index": "web.team.guanlixitong.portal", @@ -377,6 +398,13 @@ "type": "hash" } }, + "75c5c1863c1bdaf0bcbd3065b661528d": { + "meta": { + "index": "web.team.yuehaoxitong.call", + "time": "2024-08-13 18:24:20.022", + "type": "hash" + } + }, "77292ee28548b56b474ecab95e3240ca": { "meta": { "index": "web.team.ludengguanli.event", @@ -440,6 +468,13 @@ "type": "hash" } }, + "8ce4dfb877e04e3be5144253fdd5d8ff": { + "meta": { + "index": "web.team.gonganxitong.allow", + "time": "2024-08-16 10:29:07.013", + "type": "hash" + } + }, "91cee3424c5c22b43ada80939393041a": { "meta": { "index": "web.team.ludengguanli.light", @@ -573,6 +608,20 @@ "type": "hash" } }, + "ba468c870a9645a8a162c31c4d860fbd": { + "meta": { + "index": "web.team.yuehaoxitong.open", + "time": "2024-08-13 18:24:20.008", + "type": "hash" + } + }, + "bb1119fef63479943de59398943c3580": { + "meta": { + "index": "web.team.yuehaoxitong.history", + "time": "2024-08-13 18:24:20.005", + "type": "hash" + } + }, "bbf8b57cb3991b245f3509cd1fc645ee": { "meta": { "index": "web.team.suseguangli.student", @@ -664,6 +713,13 @@ "type": "hash" } }, + "de85331c7182b286624303d7aca70618": { + "meta": { + "index": "web.team.yuehaoxitong.plan", + "time": "2024-08-13 18:24:19.998", + "type": "hash" + } + }, "e2117b53c036a72fe7e4885449488a6f": { "meta": { "index": "web.team.gonganxitong.qrcode", diff --git a/usr/local/export/web.chat.macos.desktop/hash.json b/usr/local/export/web.chat.macos.desktop/hash.json index 3de90cb..50f4102 100644 --- a/usr/local/export/web.chat.macos.desktop/hash.json +++ b/usr/local/export/web.chat.macos.desktop/hash.json @@ -1,4 +1,12 @@ { + "153c93456004ec2ca692d3bac2223167": { + "meta": { + "icon": "https://img.icons8.com/officel/80/activity-grid.png", + "index": "web.team.gonganxitong.service", + "name": "service", + "time": "2024-08-16 13:25:04.130" + } + }, "3a5880f6ddd07eb9fe27b3cb3afb3f7e": { "meta": { "icon": "usr/icons/Calendar.png", diff --git a/usr/local/export/web.chat.wx.menu/hash.json b/usr/local/export/web.chat.wx.menu/hash.json index 331049d..5adfbe9 100644 --- a/usr/local/export/web.chat.wx.menu/hash.json +++ b/usr/local/export/web.chat.wx.menu/hash.json @@ -45,6 +45,30 @@ "type": "view" } }, + "ad3c49c1bd59eaf07b2b98a703cd839c": { + "meta": { + "index": "web.team.guanlixitong.portal", + "name": "团队管理", + "river": "3", + "scene": "main", + "space": "20240724-enterprise", + "storm": "2", + "time": "2024-08-16 12:46:29.399", + "type": "view" + } + }, + "dd6b254ed82967e82736a0b16353dcf5": { + "meta": { + "index": "web.team.shengyixitong.portal", + "name": "供应链", + "river": "3", + "scene": "main", + "space": "20240724-enterprise", + "storm": "3", + "time": "2024-08-16 12:47:08.340", + "type": "view" + } + }, "f66067639088a9bba8ca15024752c221": { "meta": { "index": "web.team.guanlixitong.portal", @@ -54,7 +78,7 @@ "space": "20240724-enterprise", "storm": "1", "time": "2024-08-09 07:15:35.626", - "type": "view" + "type": "click" } } } diff --git a/usr/local/export/web.team.gonganxitong.portal/hash.json b/usr/local/export/web.team.gonganxitong.portal/hash.json index 37f949e..8836d17 100644 --- a/usr/local/export/web.team.gonganxitong.portal/hash.json +++ b/usr/local/export/web.team.gonganxitong.portal/hash.json @@ -2,7 +2,7 @@ "153c93456004ec2ca692d3bac2223167": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/activity-grid.png", @@ -16,7 +16,7 @@ "27c6988eeb07c78cbb49aa15c577cfa4": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/edit-property.png", @@ -30,7 +30,7 @@ "3c12d065a7b2fb9a8a09f47d87bd5bef": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/shipped.png", @@ -43,7 +43,7 @@ "58724bdcc3cae3e26700cb3199e0602c": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/person-at-home.png", @@ -54,10 +54,23 @@ "time": "2024-08-07 19:32:54.758" } }, + "8ce4dfb877e04e3be5144253fdd5d8ff": { + "meta": { + "_target": [ + "d21f8cd636d4b90986a476e4746c1b25" + ], + "icons": "https://img.icons8.com/officel/80/receipt-approved.png", + "index": "web.team.gonganxitong.allow", + "name": "权限审批", + "order": "4", + "role": "creator", + "time": "2024-08-16 10:29:07.314" + } + }, "91dd0e9590d3021944f14f3ec8653beb": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "5e5292ec8e95dedb5e23fa5a49ffc1f4" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/receipt-approved.png", @@ -71,7 +84,7 @@ "bdec92d5849b2a60a8811cff494f2391": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/property-with-timer.png", @@ -85,7 +98,7 @@ "e2117b53c036a72fe7e4885449488a6f": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/qr-code.png", @@ -99,7 +112,7 @@ "fd86aad80a667152781bb188fb1249a2": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/reading-confirmation.png", diff --git a/usr/local/export/web.team.guanlixitong.portal/hash.json b/usr/local/export/web.team.guanlixitong.portal/hash.json index 958eb79..900a9f4 100644 --- a/usr/local/export/web.team.guanlixitong.portal/hash.json +++ b/usr/local/export/web.team.guanlixitong.portal/hash.json @@ -2,7 +2,7 @@ "030e2a53ca3561a0d0d123c133a88b59": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "icons": "https://img.icons8.com/officel/80/qr-code.png", "index": "web.team.guanlixitong.qrcode", @@ -15,7 +15,7 @@ "057616b7366e1930ef4e4a921fe45f1f": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "306ed30ecb65122a0ccbad22ba1de6f9" ], "icons": "https://img.icons8.com/officel/80/activity-grid.png", "index": "web.team.guanlixitong.service", @@ -25,10 +25,23 @@ "time": "2024-08-07 08:09:16.496" } }, + "30bfa47cab4cd689901fd2e1b87eb235": { + "meta": { + "_target": [ + "d21f8cd636d4b90986a476e4746c1b25" + ], + "icons": "https://img.icons8.com/officel/80/receipt-approved.png", + "index": "web.team.guanlixitong.allow", + "name": "权限审批", + "order": "4", + "role": "creator", + "time": "2024-08-16 10:29:53.792" + } + }, "5695d50b28872804a01d7c923ee91cd1": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "icons": "https://img.icons8.com/officel/80/person-at-home.png", "index": "web.team.guanlixitong.member", @@ -46,7 +59,7 @@ "9c18032c5bc252f2986e1b20e7e77db7": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "icons": "https://img.icons8.com/officel/80/property-with-timer.png", "index": "web.team.guanlixitong.event", @@ -59,7 +72,7 @@ "a4e85767b176b6a07751156a6b73fa94": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "5e5292ec8e95dedb5e23fa5a49ffc1f4" ], "icons": "https://img.icons8.com/officel/80/receipt-approved.png", "index": "web.team.guanlixitong.order", @@ -78,7 +91,7 @@ "c36d47e2611b0d1e7a14088bc3293d04": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "icons": "https://img.icons8.com/officel/80/edit-property.png", "index": "web.team.guanlixitong.apply", @@ -91,7 +104,7 @@ "fa5ff99e330772f88b929de7762a36f1": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "index": "web.team.guanlixitong.target", "time": "2024-08-07 12:36:07.515" diff --git a/usr/local/export/web.team.yuehaoxitong.portal/hash.json b/usr/local/export/web.team.yuehaoxitong.portal/hash.json index a0a671c..67e410e 100644 --- a/usr/local/export/web.team.yuehaoxitong.portal/hash.json +++ b/usr/local/export/web.team.yuehaoxitong.portal/hash.json @@ -2,7 +2,7 @@ "03dd65a55edd011c4dee41bd0d834070": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/receipt.png", @@ -16,7 +16,7 @@ "1931ecf1d36391b72df54d374a91c8ed": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/meeting-room.png", @@ -30,7 +30,7 @@ "1da7b672d4dfc12166de36c4f0f1279c": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "5e5292ec8e95dedb5e23fa5a49ffc1f4" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/receipt-approved.png", @@ -44,7 +44,7 @@ "3b6da44aaf19fdb06c84fe352569359f": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/qr-code.png", @@ -55,10 +55,23 @@ "time": "2024-08-11 09:30:00.550" } }, + "46f2ba39a0620f04aab46a999c359a2b": { + "meta": { + "_target": [ + "d21f8cd636d4b90986a476e4746c1b25" + ], + "icons": "https://img.icons8.com/officel/80/receipt-approved.png", + "index": "web.team.yuehaoxitong.allow", + "name": "权限审批", + "order": "4", + "role": "creator", + "time": "2024-08-16 10:29:53.817" + } + }, "75c5c1863c1bdaf0bcbd3065b661528d": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/calling.png", @@ -72,7 +85,7 @@ "7792f1a5145ab9d894a1681f13729778": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/List-of-parts.png", @@ -86,7 +99,7 @@ "a56cb18131ff45616849e4555e29d35d": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/edit-property.png", @@ -100,7 +113,7 @@ "a947b7294674c071e22eac02d14508bc": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/combo-chart.png", @@ -114,7 +127,7 @@ "ba468c870a9645a8a162c31c4d860fbd": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/open-sign.png", @@ -128,7 +141,7 @@ "bb1119fef63479943de59398943c3580": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/order-history.png", @@ -142,8 +155,9 @@ "c14a5a400c933fe799ed10b069990865": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], + "enable": "true", "icons": "https://img.icons8.com/officel/80/person-at-home.png", "index": "web.team.yuehaoxitong.member", "name": "服务人员", @@ -151,21 +165,10 @@ "time": "2024-08-12 08:56:10.816" } }, - "cd97344d34e35e9db7407561d980415f": { - "meta": { - "enable": "true", - "icons": "https://img.icons8.com/officel/80/person-at-home.png", - "index": "web.team.yuehaoxitong.queueUser", - "name": "服务人员", - "order": "5", - "role": "creator,manager", - "time": "2024-08-11 09:30:00.534" - } - }, "d1e03d214890c9a4b9557d3f6a36c7e9": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "306ed30ecb65122a0ccbad22ba1de6f9" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/activity-grid.png", @@ -179,7 +182,7 @@ "de85331c7182b286624303d7aca70618": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/calendar-plus.png", @@ -193,7 +196,7 @@ "fa4365d6c914365e4b047c9266e9a02f": { "meta": { "_target": [ - "ed8d734a5433188db200e08f3f6bb049" + "d21f8cd636d4b90986a476e4746c1b25" ], "enable": "true", "icons": "https://img.icons8.com/officel/80/property-with-timer.png",