mirror of
https://shylinux.com/x/enterprise
synced 2025-07-02 04:51:20 +08:00
add some
This commit is contained in:
parent
63a7d791c6
commit
4d4621fa80
@ -3,18 +3,18 @@ package model
|
||||
import "shylinux.com/x/mysql-story/src/db"
|
||||
|
||||
const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
INFO = "info"
|
||||
TYPE = "type"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
USER_UID = "user_uid"
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
INFO = "info"
|
||||
TYPE = "type"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
USER_UID = "user_uid"
|
||||
USER_WEBSITE_ROLE = "user_website_role"
|
||||
WEBSITE_UID = "website_uid"
|
||||
WEBSITE_NAME = "website_name"
|
||||
WEBSITE_TYPE = "website_type"
|
||||
PORTAL_UID = "portal_uid"
|
||||
PORTAL_UID = "portal_uid"
|
||||
)
|
||||
|
||||
type UserWebsite struct {
|
||||
@ -30,5 +30,4 @@ type Portal struct {
|
||||
WebsiteUID string `gorm:"type:char(32);index"`
|
||||
}
|
||||
|
||||
|
||||
func init() { db.CmdModels("", &UserWebsite{}, &Website{}, &Portal{}) }
|
||||
func init() { db.CmdModels("", &UserWebsite{}, &Website{}, &Portal{}) }
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Portal struct {
|
||||
guanlixitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* website_name* website_type:select" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* company_name* website_name*" role:"void"`
|
||||
}
|
||||
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userWebsite{}, website{})}) }
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userWebsite{}, website{})}) }
|
||||
|
@ -1,9 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title||value.name]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content||value.info]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -1,14 +1,13 @@
|
||||
{
|
||||
"portal": "官方网站",
|
||||
"portal": "场景应用",
|
||||
"icons": {
|
||||
"portal": "https://img.icons8.com/officel/80/activity-grid.png"
|
||||
"website": "https://img.icons8.com/officel/80/activity-grid.png"
|
||||
},
|
||||
"input": {
|
||||
"My Website": "我的场景",
|
||||
"My Website": "我的网站",
|
||||
"user_website_role": "成员角色",
|
||||
"website_name": "场景名称",
|
||||
"website_type": "场景类型"
|
||||
"website_name": "网站名称",
|
||||
"website_type": "网站类型"
|
||||
},
|
||||
"value": {
|
||||
"user_website_role": {
|
||||
|
@ -12,4 +12,4 @@ func init() { ice.TeamCtxCmd(userWebsite{}) }
|
||||
|
||||
type UserWebsiteRole = guanlixitong.UserGroupRole
|
||||
|
||||
var UserWebsiteRoleList = guanlixitong.UserGroupRoleList
|
||||
var UserWebsiteRoleList = guanlixitong.UserGroupRoleList
|
||||
|
@ -20,4 +20,4 @@ var WebsiteTypeList = map[WebsiteType]string{
|
||||
WebsiteHR: "HR",
|
||||
}
|
||||
|
||||
func (s WebsiteType) String() string { return WebsiteTypeList[s] }
|
||||
func (s WebsiteType) String() string { return WebsiteTypeList[s] }
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
kit "shylinux.com/x/toolkits"
|
||||
"strconv"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong"
|
||||
"shylinux.com/x/enterprise/src/guanlixitong/model"
|
||||
)
|
||||
@ -25,8 +26,9 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
case model.COMPANY_UID:
|
||||
m.Cmdy(company{}, s.Select).Cut(model.UID, model.NAME).RenameAppend(model.UID, arg[0])
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
case model.COMPANY_NAME, model.CITY_NAME:
|
||||
m.Cmdy(Portal{}, Portal{}.PlaceList, m.Option(model.USER_UID)).Cut(arg[0])
|
||||
case model.COMPANY_NAME:
|
||||
msg := m.Cmd(api.GONGANXITONG_CITY, s.Select, model.NAME, m.Option(model.CITY_NAME))
|
||||
m.Cmdy(company{}, s.Select, "auth_uid IS NOT NULL AND auth_uid != '' AND city_uid = ?", msg.Append(model.UID)).CutTo(model.NAME, model.COMPANY_NAME)
|
||||
case model.DEGREE:
|
||||
m.Push(arg[0], "博士")
|
||||
m.Push(arg[0], "硕士")
|
||||
|
@ -9,9 +9,7 @@ import (
|
||||
|
||||
type company struct {
|
||||
Table
|
||||
modify string `name:"modify info" role:"tech"`
|
||||
list string `name:"list city_name company_name auto" role:"void"`
|
||||
authCreate string `name:"authCreate" role:"tech"`
|
||||
list string `name:"list uid auto"`
|
||||
}
|
||||
|
||||
func (s company) FindOrCreateByName(m *ice.Message, arg ...string) {
|
||||
@ -22,28 +20,41 @@ func (s company) FindOrCreateByName(m *ice.Message, arg ...string) {
|
||||
arg[2], arg[3] = model.COMPANY_UID, msg.Append(model.UID)
|
||||
}
|
||||
}
|
||||
func (s company) Modify(m *ice.Message, arg ...string) {
|
||||
s.Update(m, m.OptionSimple(model.INFO), m.OptionSimple(model.UID)...)
|
||||
}
|
||||
func (s company) List(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.AUTH_UID) != "" {
|
||||
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_AUTH, m.Option(model.AUTH_UID)).Cut(model.SERVICE_UID, model.PLACE_UID)
|
||||
s.SelectJoinRecent(m, "")
|
||||
s.SelectJoinService(m)
|
||||
m.Display("").DisplayCSS("").Sort("service_name,place_name")
|
||||
return
|
||||
}
|
||||
if len(arg) == 0 {
|
||||
s.CityList(m)
|
||||
} else if msg := s.CityList(m.Spawn(), arg[0]); len(arg) == 1 {
|
||||
s.Select(m, model.CITY_UID, msg.Append(model.UID)).RenameAppend(model.NAME, model.COMPANY_NAME)
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1])
|
||||
s.Select(m)
|
||||
s.SelectJoinAuth(m)
|
||||
m.Table(func(value ice.Maps) {
|
||||
switch value[model.AUTH_STATUS] {
|
||||
case "create":
|
||||
m.PushButton(s.AuthInfo, s.AuthMember, s.AuthClean)
|
||||
case "issued":
|
||||
m.PushButton(s.AuthInfo, s.AuthMember)
|
||||
default:
|
||||
m.PushButton(s.AuthCreate, s.Delete)
|
||||
}
|
||||
}).Action()
|
||||
m.Sort("auth_status", []string{"issued", "create"})
|
||||
} else {
|
||||
s.SelectDetail(m, model.UID, arg[0])
|
||||
if m.Append(model.AUTH_UID) == "" && m.IsTech() {
|
||||
m.EchoInfoButton("请申请公司认证", s.AuthCreate)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s company) AuthCreate(m *ice.Message, arg ...string) {
|
||||
msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID))
|
||||
s.Table.AuthCreate(m, 4, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
|
||||
s.Table.AuthCreate(m, api.AuthCompany, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
|
||||
}
|
||||
func (s company) AuthInfo(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(s.SpaceLink(m, "20240724-community", api.RENZHENGSHOUQUAN_PORTAL, m.Option(model.AUTH_UID)))
|
||||
}
|
||||
func (s company) AuthMember(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(s.SpaceLink(m, "20240724-community", api.RENZHENGSHOUQUAN_PORTAL, m.Option(model.AUTH_UID), api.RENZHENGSHOUQUAN_MEMBER))
|
||||
}
|
||||
func (s company) AuthClean(m *ice.Message, arg ...string) {
|
||||
s.Update(m, ice.Map{model.AUTH_UID: ""})
|
||||
m.Cmd(api.RENZHENGSHOUQUAN_CLEAN, "prune", m.Option(model.AUTH_UID))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(company{}) }
|
||||
|
@ -27,6 +27,7 @@ const (
|
||||
RECRUITMENT_TYPE = "recruitment_type"
|
||||
INTERVIEW_STATUS = "interview_status"
|
||||
START_TIME = "start_time"
|
||||
AUTH_STATUS = "auth_status"
|
||||
STOP_TIME = "stop_time"
|
||||
MOBILE = "mobile"
|
||||
DEGREE = "degree"
|
||||
|
16
src/main.go
16
src/main.go
@ -4,24 +4,20 @@ import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
_ "shylinux.com/x/enterprise/src/gongyinglian"
|
||||
_ "shylinux.com/x/enterprise/src/guanfangwangzhan"
|
||||
_ "shylinux.com/x/enterprise/src/guanlixitong"
|
||||
_ "shylinux.com/x/enterprise/src/kehuguanli"
|
||||
_ "shylinux.com/x/enterprise/src/peixunguanli"
|
||||
_ "shylinux.com/x/enterprise/src/rongzijihua"
|
||||
_ "shylinux.com/x/enterprise/src/shichangyingxiao"
|
||||
_ "shylinux.com/x/enterprise/src/xiangmuguanli"
|
||||
_ "shylinux.com/x/enterprise/src/yingxiaotuiguang"
|
||||
_ "shylinux.com/x/enterprise/src/zijinlian"
|
||||
_ "shylinux.com/x/operation/src/production"
|
||||
|
||||
_ "shylinux.com/x/enterprise/src/guanfangwangzhan"
|
||||
|
||||
_ "shylinux.com/x/enterprise/src/kehuguanli"
|
||||
|
||||
_ "shylinux.com/x/enterprise/src/rongzijihua"
|
||||
)
|
||||
|
||||
func main() { print(ice.Run()) }
|
||||
|
||||
func init() {
|
||||
ice.Info.CodeMain = "src/guanlixitong/portal.go"
|
||||
ice.Info.NodeMain = "web.team.guanlixitong.portal"
|
||||
}
|
||||
ice.Info.CodeMain = "src/yingxiaotuiguang/portal.go"
|
||||
ice.Info.NodeMain = "web.team.yingxiaotuiguang.portal"
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ func (s invite) List(m *ice.Message, arg ...string) {
|
||||
button := []ice.Any{s.Enter, s.Publish}
|
||||
defer func() { m.PushButton(button...) }()
|
||||
if value[model.USER_UID] == m.Option(ice.MSG_USERUID) || s.IsLeader(m) {
|
||||
if button = append(button, s.Modify); kit.Int(value[model.VISITE_COUNT]) == 0 {
|
||||
if button = append(button, s.MarketInsert, s.Modify); kit.Int(value[model.VISITE_COUNT]) == 0 {
|
||||
button = append(button, s.Remove)
|
||||
}
|
||||
}
|
||||
@ -52,5 +52,9 @@ func (s invite) Enter(m *ice.Message, arg ...string) {
|
||||
func (s invite) Publish(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(publish{}, []string{m.Option(model.PLACE_UID), m.Option(model.UID)}, arg...)
|
||||
}
|
||||
func (s invite) MarketInsert(m *ice.Message, arg ...string) {
|
||||
s.GetCommandUID(m, s.Prefix(m, publish{}))
|
||||
s.Table.MarketInsert(m, arg...)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(invite{}) }
|
||||
|
@ -7,7 +7,8 @@ import (
|
||||
|
||||
type Portal struct {
|
||||
guanlixitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* promotion_name* promotion_type:select" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* company_name* promotion_name*" role:"void"`
|
||||
// placeCreate string `name:"placeCreate city_name* company_name* promotion_name* promotion_type:select" role:"void"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -7,6 +7,7 @@
|
||||
"product": "product.png",
|
||||
"channel": "channel.png",
|
||||
"invite": "invite.png",
|
||||
"publish": "invite.png",
|
||||
"bonus": "bonus.png",
|
||||
"stat": "stat.png"
|
||||
},
|
||||
|
@ -4,6 +4,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
{view: html.TITLE, list: [value.title||value.name]}, can.onimport.metaView(can, value),
|
||||
{view: html.STATUS, list: [can.onimport.unitView(can, value, "invite_count"), "推广期:", can.onimport.beginTime(can, value)]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
can.onimport.titleAction(can, value),
|
||||
] })
|
||||
},
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user