diff --git a/src/guanlixitong/common.go b/src/guanlixitong/common.go index a936a9c..ab1f4fe 100644 --- a/src/guanlixitong/common.go +++ b/src/guanlixitong/common.go @@ -20,6 +20,8 @@ func (s Table) Inputs(m *ice.Message, arg ...string) { s.InputsListRole(m, UserGroupRoleList, arg...) case model.GROUP_TYPE: s.InputsList(m, GroupTypeList, arg...) + case model.RECRUITMENT_TYPE: + s.InputsList(m, RecruitmentTypeList, arg...) case model.COMPANY_UID: m.Cmdy(company{}, s.Select).Cut(model.UID, model.NAME).RenameAppend(model.UID, arg[0]) m.DisplayInputKeyNameIconTitle() @@ -47,6 +49,8 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message { value = UserGroupRole(kit.Int(value)).String() case model.GROUP_TYPE: value = GroupType(kit.Int(value)).String() + case model.RECRUITMENT_TYPE: + value = RecruitmentType(kit.Int(value)).String() case model.RECRUITMENT_STATUS: value = RecruitmentStatus(kit.Int(value)).String() case model.INTERVIEW_STATUS: diff --git a/src/guanlixitong/model/model.go b/src/guanlixitong/model/model.go index 1db9177..0fba6ea 100644 --- a/src/guanlixitong/model/model.go +++ b/src/guanlixitong/model/model.go @@ -24,6 +24,7 @@ const ( MARKET_UID = "market_uid" RECRUITMENT_UID = "recruitment_uid" RECRUITMENT_STATUS = "recruitment_status" + RECRUITMENT_TYPE = "recruitment_type" INTERVIEW_STATUS = "interview_status" START_TIME = "start_time" STOP_TIME = "stop_time" @@ -57,15 +58,26 @@ type Recruitment struct { Salary string `gorm:"type:varchar(32)"` Total int `gorm:"default:0"` Count int `gorm:"default:0"` + Type uint8 `gorm:"default:0"` Status uint8 `gorm:"default:0"` } type Resume struct { db.ModelNameInfo RecruitmentUID string `gorm:"type:char(32);index"` GroupUID string `gorm:"type:char(32);index"` + Avatar string `gorm:"type:varchar(255)"` + Nick string `gorm:"type:varchar(32)"` + City string `gorm:"type:varchar(32)"` + Age int `gorm:"default:0"` + Work int `gorm:"default:0"` Email string `gorm:"type:varchar(32)"` Mobile string `gorm:"type:varchar(32)"` + Wechat string `gorm:"type:varchar(32)"` Degree string `gorm:"type:varchar(32)"` + School string `gorm:"type:varchar(64)"` + Major string `gorm:"type:varchar(64)"` + Year string `gorm:"type:varchar(32)"` + Link string `gorm:"type:varchar(255)"` } type Interview struct { db.ModelContent diff --git a/src/guanlixitong/portal.json b/src/guanlixitong/portal.json index 028b67d..c7fbbe1 100644 --- a/src/guanlixitong/portal.json +++ b/src/guanlixitong/portal.json @@ -22,9 +22,17 @@ "input": { "My Group": "我的团队", "user_group_role": "成员角色", + "wechat": "微信号", + "school": "学校", + "major": "专业", + "year": "学年", + "age": "年龄", + "work": "工龄", "group_name": "团队名称", "group_type": "团队类型", + "recruitment_type": "招聘类型", "recruitment_status": "招聘状态", + "recruitment_title": "招聘岗位", "interview_status": "面试状态", "icons": { "mobile": "bi bi-phone", @@ -96,6 +104,10 @@ "sales": "https://img.icons8.com/officel/80/administrator-male.png" } }, + "recruitment_type": { + "fullTime": "全职", + "partTime": "兼职" + }, "recruitment_status": { "create": "待启动", "start": "招聘中", diff --git a/src/guanlixitong/recruitment.go b/src/guanlixitong/recruitment.go index 0289f72..eee407d 100644 --- a/src/guanlixitong/recruitment.go +++ b/src/guanlixitong/recruitment.go @@ -10,13 +10,13 @@ import ( type recruitment struct { Table resume resume - fields string `data:"title,degree,seniority,salary,content,total,count,recruitment_status,user_uid"` - create string `name:"create title* degree* seniority* salary* content* total*=1" role:"leader,worker"` + fields string `data:"title,degree,seniority,salary,content,total,count,recruitment_type,recruitment_status"` + create string `name:"create recruitment_type* title* degree* seniority* salary* content* total*=1" role:"leader,worker"` modify string `name:"modify content*" role:"leader,worker"` 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:"resumeInsert name* info avatar@img nick wechat mobile email city age work degree school major year link" role:"leader"` } func (s recruitment) Inputs(m *ice.Message, arg ...string) { @@ -74,6 +74,7 @@ func (s recruitment) List(m *ice.Message, arg ...string) { } m.PushButton(button...) }).Display("") + m.Action(s.Create) kit.If(m.Length() == 0, func() { s.Button(m.SetResult(), "") }) } func (s recruitment) Start(m *ice.Message, arg ...string) { @@ -83,14 +84,33 @@ func (s recruitment) Stop(m *ice.Message, arg ...string) { s.ValueModify(m, model.STATUS, kit.Format(RecruitmentStop)) } func (s recruitment) ResumeInsert(m *ice.Message, arg ...string) { - if m.Warn(m.Cmd(s.resume, s.Select, model.RECRUITMENT_UID, m.Option(model.UID), m.OptionSimple(model.MOBILE)).Length() > 0, "已经投过简历,请勿重复投递,投递") { - return - } + /* + if m.Warn(m.Cmd(s.resume, s.Select, model.RECRUITMENT_UID, m.Option(model.UID), m.OptionSimple(model.MOBILE)).Length() > 0, "已经投过简历,请勿重复投递,投递") { + // return + } + */ m.Cmdy(s.resume, s.Insert, arg, m.OptionSimple(model.GROUP_UID, model.USER_UID), model.RECRUITMENT_UID, m.Option(model.UID)) } +func (s recruitment) Upload(m *ice.Message, arg ...string) { + m.Echo(kit.MergeURL("/p/"+m.UploadSave("usr/image/"), ice.POD, m.Option(ice.MSG_USERPOD))) +} func init() { ice.TeamCtxCmd(recruitment{}) } +type RecruitmentType int + +const ( + RecruitmentFullTime RecruitmentType = iota + RecruitmentPartTime +) + +var RecruitmentTypeList = map[RecruitmentType]string{ + RecruitmentFullTime: "fullTime", + RecruitmentPartTime: "partTime", +} + +func (s RecruitmentType) String() string { return RecruitmentTypeList[s] } + type RecruitmentStatus int const ( diff --git a/src/guanlixitong/recruitment.js b/src/guanlixitong/recruitment.js index 661e320..8124189 100644 --- a/src/guanlixitong/recruitment.js +++ b/src/guanlixitong/recruitment.js @@ -10,6 +10,7 @@ Volcanos(chat.ONIMPORT, { can.onimport.textView(can, value, "degree", "status"), can.onimport.textView(can, value, "seniority", "status"), can.onimport.textView(can, value, "salary", "status"), + can.onimport.textView(can, value, "recruitment_type", "type"), ]}, {view: html.OUTPUT, list: [value.content]}, ] }) diff --git a/src/guanlixitong/resume.go b/src/guanlixitong/resume.go index e18b6f1..608fbb6 100644 --- a/src/guanlixitong/resume.go +++ b/src/guanlixitong/resume.go @@ -2,6 +2,7 @@ package guanlixitong import ( "shylinux.com/x/ice" + kit "shylinux.com/x/toolkits" "shylinux.com/x/enterprise/src/guanlixitong/model" ) @@ -9,8 +10,8 @@ import ( 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"` + fields string `data:"avatar,name,info,nick,wechat,city,age,work,mobile,email,degree,school,major,year,link,recruitment_uid"` + create string `name:"create name* info nick wechat mobile email degree school major" 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"` } @@ -28,7 +29,14 @@ func (s resume) Inputs(m *ice.Message, arg ...string) { func (s resume) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Table(func(value ice.Maps) { m.PushButton(s.InterviewInsert) - }).Display("") + }).Action().Display("") + s.SelectJoin(m, recruitment{}, model.TITLE) + if len(arg) == 1 { + m.Sort("degree,age", []string{"博士", "硕士", "本科", "专科"}, ice.INT) + } +} +func (s resume) Upload(m *ice.Message, arg ...string) { + m.Echo(kit.MergeURL("/p/"+m.UploadSave("usr/image/"), ice.POD, m.Option(ice.MSG_USERPOD))) } func (s resume) InterviewInsert(m *ice.Message, arg ...string) { m.Cmdy(s.interview, s.interview.Insert, arg, m.OptionSimple(model.GROUP_UID, model.USER_UID)) diff --git a/src/guanlixitong/resume.js b/src/guanlixitong/resume.js index 9cffe6b..105bc73 100644 --- a/src/guanlixitong/resume.js +++ b/src/guanlixitong/resume.js @@ -2,14 +2,20 @@ 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, + (value.title||value.name||value.user_name)+" ("+value.nick+")", + can.onimport.textView(can, value, "recruitment_title", "status"), + can.onimport.textView(can, value, "city", "status"), + can.onimport.textView(can, value, "age", "status"), can.onimport.titleAction(can, value), ]}, {view: html.STATUS, list: [ - can.onimport.timeView(can, value), + // can.onimport.timeView(can, value), can.onimport.textView(can, value, "degree", "status"), + can.onimport.textView(can, value, "work", "status"), can.onimport.textView(can, value, "seniority", "status"), can.onimport.textView(can, value, "salary", "status"), + can.onimport.textView(can, value, "school", "status"), + can.onimport.textView(can, value, "major", "status"), ]}, {view: html.OUTPUT, list: [value.content||value.info]}, ] }) diff --git a/usr/local/export/web.team.gonganxitong.portal/hash.json b/usr/local/export/web.team.gonganxitong.portal/hash.json index de7af64..fb4da5a 100644 --- a/usr/local/export/web.team.gonganxitong.portal/hash.json +++ b/usr/local/export/web.team.gonganxitong.portal/hash.json @@ -28,7 +28,7 @@ "22574299a657140d473f0216b8d83710": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/documents.png", + "icons": "https://img.icons8.com/officel/80/documents.png", "index": "web.team.gonganxitong.document", "name": "在线文档", "order": "93", @@ -88,7 +88,7 @@ "882a999b4a72a9866d9e4eef110d335a": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/ios-photos.png", + "icons": "https://img.icons8.com/officel/80/ios-photos.png", "index": "web.team.gonganxitong.photo", "name": "在线相册", "order": "95", diff --git a/usr/local/export/web.team.gongyinglian.portal/hash.json b/usr/local/export/web.team.gongyinglian.portal/hash.json index 2d9a165..fcf18c3 100644 --- a/usr/local/export/web.team.gongyinglian.portal/hash.json +++ b/usr/local/export/web.team.gongyinglian.portal/hash.json @@ -31,7 +31,7 @@ "30d5192993edd954fbdc92e04d5c94cf": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/documents.png", + "icons": "https://img.icons8.com/officel/80/documents.png", "index": "web.team.gongyinglian.document", "name": "在线文档", "order": "94", @@ -320,7 +320,7 @@ "dcd78c4cec7021205b480f43cafde9c5": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/ios-photos.png", + "icons": "https://img.icons8.com/officel/80/ios-photos.png", "index": "web.team.gongyinglian.photo", "name": "在线相册", "order": "96", diff --git a/usr/local/export/web.team.guanlixitong.portal/hash.json b/usr/local/export/web.team.guanlixitong.portal/hash.json index 7f39607..4bad5fd 100644 --- a/usr/local/export/web.team.guanlixitong.portal/hash.json +++ b/usr/local/export/web.team.guanlixitong.portal/hash.json @@ -135,7 +135,7 @@ "8548d5ce3faee7bd508d2fb53d57f35b": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/ios-photos.png", + "icons": "https://img.icons8.com/officel/80/ios-photos.png", "index": "web.team.guanlixitong.photo", "name": "在线相册", "order": "96", @@ -244,7 +244,7 @@ "meta": { "auth": "issued", "enable": "true", - "icons": "https://img.icons8.com/officel/50/documents.png", + "icons": "https://img.icons8.com/officel/80/documents.png", "index": "web.team.guanlixitong.document", "name": "在线文档", "order": "94", diff --git a/usr/local/export/web.team.renzhengshouquan.portal/hash.json b/usr/local/export/web.team.renzhengshouquan.portal/hash.json index 29a5b54..b01ee63 100644 --- a/usr/local/export/web.team.renzhengshouquan.portal/hash.json +++ b/usr/local/export/web.team.renzhengshouquan.portal/hash.json @@ -2,7 +2,7 @@ "015b4784c16b63975824abbb3ff4ec9f": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/ios-photos.png", + "icons": "https://img.icons8.com/officel/80/ios-photos.png", "index": "web.team.renzhengshouquan.photo", "name": "在线相册", "order": "95", @@ -23,7 +23,7 @@ "1c4fee90e6a7bdb8ab6f1ccb23f3273f": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/documents.png", + "icons": "https://img.icons8.com/officel/80/documents.png", "index": "web.team.renzhengshouquan.document", "name": "在线文档", "order": "93", diff --git a/usr/local/export/web.team.shichangyingxiao.portal/hash.json b/usr/local/export/web.team.shichangyingxiao.portal/hash.json index 25cda45..4fd1133 100644 --- a/usr/local/export/web.team.shichangyingxiao.portal/hash.json +++ b/usr/local/export/web.team.shichangyingxiao.portal/hash.json @@ -29,7 +29,7 @@ "39279d47b7be3e41775b5d6f15fc03f7": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/ios-photos.png", + "icons": "https://img.icons8.com/officel/80/ios-photos.png", "index": "web.team.shichangyingxiao.photo", "name": "在线相册", "order": "96", @@ -107,7 +107,7 @@ "9f4bf74150934b311a43064340be98cc": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/documents.png", + "icons": "https://img.icons8.com/officel/80/documents.png", "index": "web.team.shichangyingxiao.document", "name": "在线文档", "order": "94", diff --git a/usr/local/export/web.team.zijinlian.portal/hash.json b/usr/local/export/web.team.zijinlian.portal/hash.json index 0c0df4d..bd5cfa6 100644 --- a/usr/local/export/web.team.zijinlian.portal/hash.json +++ b/usr/local/export/web.team.zijinlian.portal/hash.json @@ -2,7 +2,7 @@ "04ea3d52aa1b49611600630b546fd848": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/documents.png", + "icons": "https://img.icons8.com/officel/80/documents.png", "index": "web.team.zijinlian.document", "name": "在线文档", "order": "94", @@ -76,7 +76,7 @@ "74c96f6ac5566510d44c5e28ceb80765": { "meta": { "auth": "issued", - "icons": "https://img.icons8.com/officel/50/ios-photos.png", + "icons": "https://img.icons8.com/officel/80/ios-photos.png", "index": "web.team.zijinlian.photo", "name": "在线相册", "order": "96",