mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 09:08:06 +08:00
add some
This commit is contained in:
parent
6f5c93d3be
commit
9c887b3fb3
@ -25,6 +25,14 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
case model.COMPANY_NAME, model.CITY_NAME:
|
||||
m.Cmdy(Portal{}, Portal{}.PlaceList, m.Option(model.USER_UID)).Cut(arg[0])
|
||||
case model.DEGREE:
|
||||
m.Push(arg[0], "博士")
|
||||
m.Push(arg[0], "硕士")
|
||||
m.Push(arg[0], "本科")
|
||||
m.Push(arg[0], "大专")
|
||||
m.Push(arg[0], "高中")
|
||||
m.Push(arg[0], "中专")
|
||||
m.Push(arg[0], "初中")
|
||||
default:
|
||||
s.Table.Inputs(m, arg...)
|
||||
}
|
||||
@ -41,6 +49,8 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
value = GroupType(kit.Int(value)).String()
|
||||
case model.RECRUITMENT_STATUS:
|
||||
value = RecruitmentStatus(kit.Int(value)).String()
|
||||
case model.INTERVIEW_STATUS:
|
||||
value = InterviewStatus(kit.Int(value)).String()
|
||||
}
|
||||
return value
|
||||
})
|
||||
|
@ -2,7 +2,9 @@ package guanlixitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/ctx"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/enterprise/src/guanlixitong/model"
|
||||
)
|
||||
|
||||
@ -29,12 +31,21 @@ func (s company) List(m *ice.Message, arg ...string) {
|
||||
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))
|
||||
m.RenameAppend("name", "company_name")
|
||||
} else if len(arg) == 2 {
|
||||
s.Select(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1])
|
||||
if m.Append(model.AUTH_UID) == "" {
|
||||
m.EchoInfoButton("请申请公司认证", s.AuthCreate)
|
||||
} else {
|
||||
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_AUTH, m.Append(model.AUTH_UID))
|
||||
m.Cut("service_uid", "place_uid")
|
||||
s.SelectJoinRecent(m, "")
|
||||
s.SelectJoinService(m)
|
||||
m.Sort("service_name,place_name")
|
||||
}
|
||||
}
|
||||
m.Display("")
|
||||
ctx.Toolkit(m.Message, s.Prefix(m, Portal{}))
|
||||
}
|
||||
func (s company) AuthCreate(m *ice.Message, arg ...string) {
|
||||
msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID))
|
||||
|
30
src/guanlixitong/company.js
Normal file
30
src/guanlixitong/company.js
Normal file
@ -0,0 +1,30 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
if (can.Option("company_name")) { var list = {}; can.ui = can.onappend.layout(can)
|
||||
msg.Table(function(value) { if (list[value.service_uid]) { list[value.service_uid].push(value); return } list[value.service_uid] = [value]
|
||||
can.onimport.item(can, {icon: value.service_icon, name: value.service_name}, function(event, item, show, target) { if (show) { return }
|
||||
can.runActionCommand(can.request(event, {view: "table", pod: value.nodename}), value.index, [], function(msg) {
|
||||
can.onimport.itemlist(can, msg.Table(), function(event, item, show, target) { if (show) { return }
|
||||
can.onimport.itemlist(can, can.core.List(list[value.service_uid], function(value) {
|
||||
return {icon: value.service_icon, name: value.place_name,
|
||||
service_uid: value.service_uid, place_uid: value.place_uid,
|
||||
nodename: value.nodename,
|
||||
index: value.index,
|
||||
}
|
||||
}), function(event, value, show, target) { if (show) { return }
|
||||
if (can.onmotion.cache(can, function() { return [value.service_uid, value.place_uid, item.index] }, can.ui.content)) { return }
|
||||
can.onappend.plugin(can, {space: value.nodename, index: item.index, args: [value.place_uid]}, function(sub) {
|
||||
sub.run = function(event, cmds, cb) { can.request(event, {pod: value.nodename})
|
||||
can._root.Action.run(event, ["a", "b", ctx.RUN, value.index, ctx.RUN, item.index].concat(cmds), cb)
|
||||
}
|
||||
}, can.ui.content)
|
||||
}, null, target)
|
||||
}, null, target)
|
||||
})
|
||||
})
|
||||
}), can.db.list = list
|
||||
} else {
|
||||
msg.Dump(can)
|
||||
}
|
||||
},
|
||||
})
|
7
src/guanlixitong/interview.css
Normal file
7
src/guanlixitong/interview.css
Normal file
@ -0,0 +1,7 @@
|
||||
$output span.status.start {
|
||||
color:var(--danger-bg-color);
|
||||
}
|
||||
$output input.notice[name=stop][type=button]:not(:hover) {
|
||||
border:var(--danger-bg-color);
|
||||
background-color:var(--danger-bg-color); color:var(--danger-fg-color);
|
||||
}
|
@ -1,10 +1,15 @@
|
||||
package guanlixitong
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/enterprise/src/guanlixitong/model"
|
||||
)
|
||||
|
||||
type interview struct {
|
||||
Table
|
||||
fields string `data:"title,content,address,begin_time,end_time,user_uid"`
|
||||
fields string `data:"title,content,address,interview_status,begin_time,end_time,start_time,stop_time,user_uid"`
|
||||
create string `name:"create title* content* address* begin_time*@date end_time*@date" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
start string `name:"start" role:"leader"`
|
||||
@ -13,10 +18,37 @@ type interview struct {
|
||||
|
||||
func (s interview) List(m *ice.Message, arg ...string) {
|
||||
s.ValueList(m, arg).Table(func(value ice.Maps) {
|
||||
m.PushButton(s.Start)
|
||||
})
|
||||
switch InterviewStatus(kit.Int(value[model.INTERVIEW_STATUS])) {
|
||||
case InterviewCreate:
|
||||
m.PushButton(s.Start)
|
||||
case InterviewStart:
|
||||
m.PushButton(s.Stop)
|
||||
case InterviewStop:
|
||||
m.PushButton()
|
||||
}
|
||||
}).Display("").DisplayCSS("")
|
||||
}
|
||||
func (s interview) Start(m *ice.Message, arg ...string) {
|
||||
s.ChangeStatus(m, m.Option(model.GROUP_UID), m.Option(model.UID), int(InterviewCreate), int(InterviewStart), model.START_TIME, m.Time())
|
||||
}
|
||||
func (s interview) Stop(m *ice.Message, arg ...string) {
|
||||
s.ChangeStatus(m, m.Option(model.GROUP_UID), m.Option(model.UID), int(InterviewStart), int(InterviewStop), model.STOP_TIME, m.Time())
|
||||
}
|
||||
func (s interview) Start(m *ice.Message, arg ...string) {}
|
||||
func (s interview) Stop(m *ice.Message, arg ...string) {}
|
||||
|
||||
func init() { ice.TeamCtxCmd(interview{}) }
|
||||
|
||||
type InterviewStatus int
|
||||
|
||||
const (
|
||||
InterviewCreate InterviewStatus = iota
|
||||
InterviewStart
|
||||
InterviewStop
|
||||
)
|
||||
|
||||
var InterviewStatusList = map[InterviewStatus]string{
|
||||
InterviewCreate: "create",
|
||||
InterviewStart: "start",
|
||||
InterviewStop: "stop",
|
||||
}
|
||||
|
||||
func (s InterviewStatus) String() string { return InterviewStatusList[s] }
|
||||
|
18
src/guanlixitong/interview.js
Normal file
18
src/guanlixitong/interview.js
Normal file
@ -0,0 +1,18 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title||value.name||value.user_name, can.onimport.textView(can, value), can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
||||
value.start_time? {view: html.STATUS, list: [
|
||||
"开始时间",
|
||||
can.base.trimSuffix(value.start_time, ":00", true), "~",
|
||||
can.base.trimSuffix(value.stop_time.split(" ").pop(), ":00", true),
|
||||
]}: {view: html.STATUS, list: [
|
||||
"预约时间",
|
||||
can.base.trimSuffix(value.begin_time, ":00", true), "~",
|
||||
can.base.trimSuffix(value.end_time.split(" ").pop(), ":00", true),
|
||||
]},
|
||||
{view: html.OUTPUT, list: [value.content||value.info]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -22,11 +22,14 @@ const (
|
||||
AUTH_UID = "auth_uid"
|
||||
RECRUITMENT_STATUS = "recruitment_status"
|
||||
RECRUITMENT_UID = "recruitment_uid"
|
||||
INTERVIEW_STATUS = "interview_status"
|
||||
SALARY = "salary"
|
||||
SENIORITY = "seniority"
|
||||
MOBILE = "mobile"
|
||||
DEGREE = "degree"
|
||||
COUNT = "count"
|
||||
START_TIME = "start_time"
|
||||
STOP_TIME = "stop_time"
|
||||
)
|
||||
|
||||
type UserGroup struct {
|
||||
@ -66,8 +69,11 @@ type Interview struct {
|
||||
db.ModelContent
|
||||
GroupUID string `gorm:"type:char(32);index"`
|
||||
Address string `gorm:"type:varchar(255)"`
|
||||
Status uint8 `gorm:"default:0"`
|
||||
BeginTime db.Time
|
||||
EndTime db.Time
|
||||
StartTime db.Time
|
||||
StopTime db.Time
|
||||
}
|
||||
type Employee struct {
|
||||
db.ModelContent
|
||||
|
@ -4,7 +4,6 @@
|
||||
"inventory": "库存物资", "procurement": "采购清单", "equipment": "办公用品",
|
||||
"conference": "在线会议", "document": "在线文档",
|
||||
"resumeInsert": "投简历", "interviewInsert": "约面试",
|
||||
"start": "开启",
|
||||
"icons": {
|
||||
"recruitment": "https://img.icons8.com/officel/80/set-as-resume.png",
|
||||
"resume": "https://img.icons8.com/officel/80/parse-from-clipboard.png",
|
||||
@ -29,6 +28,15 @@
|
||||
"group_name": "团队名称",
|
||||
"group_type": "团队类型",
|
||||
"recruitment_status": "招聘状态",
|
||||
"interview_status": "面试状态",
|
||||
"icons": {
|
||||
"mobile": "bi bi-phone",
|
||||
"email": "bi bi-envelope",
|
||||
"degree": "bi bi-mortarboard-fill",
|
||||
"seniority": "bi bi-stickies",
|
||||
"total": "bi bi-people",
|
||||
"salary": "bi bi-cash-stack"
|
||||
},
|
||||
"recruitment": {
|
||||
"title": "招聘岗位",
|
||||
"degree": "学历要求",
|
||||
@ -38,16 +46,30 @@
|
||||
"total": "招聘人数",
|
||||
"name": "姓名",
|
||||
"info": "简介",
|
||||
"count": "已招人数"
|
||||
"count": "已招人数",
|
||||
"start": "开启招聘"
|
||||
},
|
||||
"resume": {
|
||||
"name": "姓名",
|
||||
"info": "简介",
|
||||
"degree": "学历",
|
||||
"title": "面试轮次",
|
||||
"content": "面试内容",
|
||||
"address": "面试地址"
|
||||
},
|
||||
"interview": {
|
||||
"start": "开始面试"
|
||||
"title": "面试轮次",
|
||||
"content": "面试内容",
|
||||
"address": "面试地址",
|
||||
"begin_time": "预约时间",
|
||||
"end_time": "结束时间",
|
||||
"start_time": "面试时间",
|
||||
"stop_time": "完成时间",
|
||||
"start": "开始面试",
|
||||
"stop": "结束面试",
|
||||
"style": {
|
||||
"stop": "notice"
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
@ -85,6 +107,11 @@
|
||||
"create": "danger",
|
||||
"stop": "danger"
|
||||
}
|
||||
},
|
||||
"interview_status": {
|
||||
"create": "待开始",
|
||||
"start": "面试中",
|
||||
"stop": "面试结束"
|
||||
}
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ type recruitment struct {
|
||||
remove string `name:"remove" role:"leader,worker"`
|
||||
start string `name:"start" role:"leader"`
|
||||
stop string `name:"stop" role:"leader"`
|
||||
resumeInsert string `name:"create name* info* mobile* email degree*" role:"void"`
|
||||
resumeInsert string `name:"create name* info mobile* email degree*" role:"void"`
|
||||
}
|
||||
|
||||
func (s recruitment) Inputs(m *ice.Message, arg ...string) {
|
||||
@ -25,14 +25,6 @@ func (s recruitment) Inputs(m *ice.Message, arg ...string) {
|
||||
m.Push(arg[0], "高级销售")
|
||||
m.Push(arg[0], "中级销售")
|
||||
m.Push(arg[0], "初级销售")
|
||||
case model.DEGREE:
|
||||
m.Push(arg[0], "博士")
|
||||
m.Push(arg[0], "硕士")
|
||||
m.Push(arg[0], "本科")
|
||||
m.Push(arg[0], "大专")
|
||||
m.Push(arg[0], "高中")
|
||||
m.Push(arg[0], "中专")
|
||||
m.Push(arg[0], "初中")
|
||||
case model.SENIORITY:
|
||||
m.Push(arg[0], "10年以上")
|
||||
m.Push(arg[0], "5-10年")
|
||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [
|
||||
value.title, can.onimport.textView(can, value, "recruitment_status"), can.onimport.titleAction(can, value),
|
||||
value.title, can.onimport.textView(can, value), can.onimport.titleAction(can, value),
|
||||
// can.onimport.textView(can, value, "count", "status"), can.onimport.textView(can, value, "total", "status"),
|
||||
]},
|
||||
// {view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
||||
|
@ -10,9 +10,9 @@ type resume struct {
|
||||
interview interview
|
||||
Table
|
||||
fields string `data:"name,info,mobile,email,degree,user_uid"`
|
||||
create string `name:"create name* info* mobile* email degree" role:"leader"`
|
||||
create string `name:"create name* info mobile* email degree" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
interviewInsert string `name:"create title* content* begin_time*:select@date end_time*:select@date address*" role:"leader"`
|
||||
interviewInsert string `name:"create title* content begin_time*:select@date end_time*:select@date address" role:"leader"`
|
||||
}
|
||||
|
||||
func (s resume) Inputs(m *ice.Message, arg ...string) {
|
||||
@ -21,6 +21,8 @@ func (s resume) Inputs(m *ice.Message, arg ...string) {
|
||||
m.Push(arg[0], "一面")
|
||||
m.Push(arg[0], "二面")
|
||||
m.Push(arg[0], "三面")
|
||||
default:
|
||||
s.Table.Inputs(m, arg...)
|
||||
}
|
||||
}
|
||||
func (s resume) List(m *ice.Message, arg ...string) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title||value.name||value.user_name]},
|
||||
{view: html.TITLE, list: [value.title||value.name||value.user_name, can.onimport.textView(can, value), can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content||value.info]},
|
||||
] })
|
||||
|
Loading…
x
Reference in New Issue
Block a user