|
|
/**
|
|
|
* 如果是null '' 'null' 'undefined'
|
|
|
* @param item
|
|
|
* @returns
|
|
|
*/
|
|
|
export function isEmptyCheck(value) {
|
|
|
if (
|
|
|
value == null ||
|
|
|
value === "" ||
|
|
|
value == "null" ||
|
|
|
typeof value == "undefined"
|
|
|
) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
/**
|
|
|
* 如果不是是null '' 'null' 'undefined'
|
|
|
* @param item
|
|
|
* @returns
|
|
|
*/
|
|
|
|
|
|
export function isNotEmptyCheck(value) {
|
|
|
return !isEmptyCheck(value);
|
|
|
}
|
|
|
/**
|
|
|
* 根据状态工单类型ID获取名称
|
|
|
*/
|
|
|
|
|
|
export function getDistanceName(distance) {
|
|
|
let str = "";
|
|
|
|
|
|
if (isNotEmptyCheck(distance)) {
|
|
|
if (distance > 1000) {
|
|
|
var dis = distance / 1000;
|
|
|
dis = dis.toFixed(1);
|
|
|
str = dis + "km";
|
|
|
} else {
|
|
|
str = distance + "m";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return str;
|
|
|
}
|
|
|
/**
|
|
|
* 业务类型
|
|
|
*/
|
|
|
|
|
|
export function jobTypeArray() {
|
|
|
let jobTypeArray = [
|
|
|
{
|
|
|
id: "0",
|
|
|
name: "代理招聘",
|
|
|
name2: "代理招聘",
|
|
|
value: "0",
|
|
|
text: "代理招聘",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: "1",
|
|
|
name: "劳务派遣",
|
|
|
name2: "全职",
|
|
|
value: "1",
|
|
|
text: "劳务派遣",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: "2",
|
|
|
name: "劳务外包",
|
|
|
name2: "兼职",
|
|
|
value: "2",
|
|
|
text: "劳务外包",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: "4",
|
|
|
name: "劳务外包挂靠",
|
|
|
name2: "劳务外包挂靠",
|
|
|
value: "4",
|
|
|
text: "劳务外包挂靠",
|
|
|
checked: false,
|
|
|
},
|
|
|
];
|
|
|
return jobTypeArray;
|
|
|
}
|
|
|
/**
|
|
|
* 根据业务类型ID获取名称
|
|
|
*/
|
|
|
|
|
|
export function getJobTypeById(id) {
|
|
|
let str = "";
|
|
|
let array = jobTypeArray();
|
|
|
array.forEach((item) => {
|
|
|
if (item.id == id) {
|
|
|
str = item.name;
|
|
|
}
|
|
|
});
|
|
|
return str;
|
|
|
}
|
|
|
/**
|
|
|
* 工种类型
|
|
|
*/
|
|
|
|
|
|
export function workTypeArray() {
|
|
|
let workTypeArray = [
|
|
|
{
|
|
|
id: 0,
|
|
|
name: "全职",
|
|
|
value: "0",
|
|
|
text: "全职",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: 1,
|
|
|
name: "兼职",
|
|
|
value: "1",
|
|
|
text: "兼职",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
name: "寒暑假工",
|
|
|
value: "2",
|
|
|
text: "寒暑假工",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
name: "实习生",
|
|
|
value: "3",
|
|
|
text: "实习生",
|
|
|
checked: false,
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
name: "零工",
|
|
|
value: "4",
|
|
|
text: "零工",
|
|
|
checked: false,
|
|
|
},
|
|
|
];
|
|
|
return workTypeArray;
|
|
|
}
|
|
|
/**
|
|
|
* 根据工种类型ID获取名称
|
|
|
*/
|
|
|
|
|
|
export function getWorkTypeById(id) {
|
|
|
let str = "";
|
|
|
let array = workTypeArray();
|
|
|
array.forEach((item) => {
|
|
|
if (item.id == id) {
|
|
|
str = item.name;
|
|
|
}
|
|
|
});
|
|
|
return str;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据传递的scene参数,获取里面的内容
|
|
|
*/
|
|
|
export function sceneToJson(sceneStr) {
|
|
|
let json = {};
|
|
|
let array = sceneStr.split(",");
|
|
|
array.forEach((item) => {
|
|
|
let arr = item.split("=");
|
|
|
let key = arr[0];
|
|
|
let value = arr[1];
|
|
|
json[key] = value;
|
|
|
});
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
var isMarry = [
|
|
|
// { id: "", name: "请选择"},
|
|
|
{ id: "未婚", name: "未婚" },
|
|
|
{ id: "已婚", name: "已婚" },
|
|
|
{ id: "离异", name: "离异" },
|
|
|
{ id: "其它", name: "其它" },
|
|
|
];
|
|
|
|
|
|
var isMarry2 = [
|
|
|
{ id: "", name: "请选择" },
|
|
|
{ id: "未婚", name: "未婚" },
|
|
|
{ id: "已婚", name: "已婚" },
|
|
|
{ id: "离异", name: "离异" },
|
|
|
{ id: "其它", name: "其它" },
|
|
|
];
|
|
|
|
|
|
var education = [
|
|
|
// { id: "", name: "请选择"},
|
|
|
{ id: "初中", name: "初中" },
|
|
|
{ id: "中专", name: "中专" },
|
|
|
{ id: "高中", name: "高中" },
|
|
|
{ id: "大专", name: "大专" },
|
|
|
{ id: "本科及以上", name: "本科及以上" },
|
|
|
];
|
|
|
// { id: "-1", name: "请选择" },
|
|
|
var sex = [
|
|
|
{ id: "1", name: "男" },
|
|
|
{ id: "2", name: "女" },
|
|
|
];
|
|
|
|
|
|
var attendanceStatus = [
|
|
|
{ id: "-1", name: "请选择" },
|
|
|
{ id: "1", name: "旷工" },
|
|
|
{ id: "2", name: "正常出勤" },
|
|
|
// { id: "3", name: "上班缺卡"},
|
|
|
// { id: "4", name: "下班缺卡"}
|
|
|
];
|
|
|
|
|
|
var attendanceStatus2 = [
|
|
|
{ id: "-1", name: "请选择" },
|
|
|
{ id: "1", name: "旷工" },
|
|
|
{ id: "2", name: "正常出勤" },
|
|
|
{ id: "3", name: "上班缺卡" },
|
|
|
{ id: "4", name: "下班缺卡" },
|
|
|
{ id: "5", name: "请假" },
|
|
|
{ id: "6", name: "休息" },
|
|
|
];
|
|
|
|
|
|
var signatoryTypeArray = [
|
|
|
{ id: "0", name: "甲方" },
|
|
|
{ id: "1", name: "乙方" },
|
|
|
{ id: "2", name: "丙方" },
|
|
|
{ id: "3", name: "丁方" },
|
|
|
{ id: "4", name: "午方" },
|
|
|
{ id: "5", name: "己方" },
|
|
|
{ id: "6", name: "庚方" },
|
|
|
{ id: "7", name: "辛方" },
|
|
|
{ id: "8", name: "壬方" },
|
|
|
{ id: "9", name: "癸方" },
|
|
|
];
|
|
|
|
|
|
var contractTypeArray = [
|
|
|
{ id: "0", name: "个人" },
|
|
|
{ id: "1", name: "企业" },
|
|
|
];
|
|
|
|
|
|
var hourArray = [
|
|
|
"00",
|
|
|
"01",
|
|
|
"02",
|
|
|
"03",
|
|
|
"04",
|
|
|
"05",
|
|
|
"06",
|
|
|
"07",
|
|
|
"08",
|
|
|
"09",
|
|
|
"10",
|
|
|
"11",
|
|
|
"12",
|
|
|
"13",
|
|
|
"14",
|
|
|
"15",
|
|
|
"16",
|
|
|
"17",
|
|
|
"18",
|
|
|
"19",
|
|
|
"20",
|
|
|
"21",
|
|
|
"22",
|
|
|
"23",
|
|
|
];
|
|
|
|
|
|
var timeArray1 = [
|
|
|
[
|
|
|
"00",
|
|
|
"01",
|
|
|
"02",
|
|
|
"03",
|
|
|
"04",
|
|
|
"05",
|
|
|
"06",
|
|
|
"07",
|
|
|
"08",
|
|
|
"09",
|
|
|
"10",
|
|
|
"11",
|
|
|
"12",
|
|
|
"13",
|
|
|
"14",
|
|
|
"15",
|
|
|
"16",
|
|
|
"17",
|
|
|
"18",
|
|
|
"19",
|
|
|
"20",
|
|
|
"21",
|
|
|
"22",
|
|
|
"23",
|
|
|
],
|
|
|
["00", "30"],
|
|
|
["-"],
|
|
|
[
|
|
|
"00",
|
|
|
"01",
|
|
|
"02",
|
|
|
"03",
|
|
|
"04",
|
|
|
"05",
|
|
|
"06",
|
|
|
"07",
|
|
|
"08",
|
|
|
"09",
|
|
|
"10",
|
|
|
"11",
|
|
|
"12",
|
|
|
"13",
|
|
|
"14",
|
|
|
"15",
|
|
|
"16",
|
|
|
"17",
|
|
|
"18",
|
|
|
"19",
|
|
|
"20",
|
|
|
"21",
|
|
|
"22",
|
|
|
"23",
|
|
|
],
|
|
|
["00", "30"],
|
|
|
];
|
|
|
//是否可以面试
|
|
|
var interviewArray = [
|
|
|
{ id: "0", name: "请选择" },
|
|
|
{ id: "1", name: "可以面试" },
|
|
|
{ id: "2", name: "不能面试" },
|
|
|
];
|
|
|
|
|
|
//面试反馈状态
|
|
|
var interviewStatusArray = [
|
|
|
{ id: "0", name: "请选择", checked: false },
|
|
|
{ id: "1", name: "不缺人", checked: false },
|
|
|
{ id: "2", name: "候选人不合适", checked: false },
|
|
|
{ id: "3", name: "面试时间不合适", checked: false },
|
|
|
{ id: "4", name: "面试地点不合适", checked: false },
|
|
|
{ id: "10", name: "爽约", checked: false },
|
|
|
{ id: "11", name: "未通过-形象不符", checked: false },
|
|
|
{ id: "12", name: "未通过-能力不匹配", checked: false },
|
|
|
{ id: "13", name: "放弃", checked: false },
|
|
|
{ id: "21", name: "通过-无法安置", checked: false },
|
|
|
{ id: "20", name: "通过-候选人考虑中", checked: false },
|
|
|
{ id: "29", name: "通过-安排入职", checked: false },
|
|
|
];
|
|
|
//面试反馈状态
|
|
|
var interviewStatusArray1 = [
|
|
|
{ id: "0", name: "请选择", checked: false },
|
|
|
{ id: "1", name: "不缺人", checked: false },
|
|
|
{ id: "2", name: "候选人不合适", checked: false },
|
|
|
{ id: "3", name: "面试时间不合适", checked: false },
|
|
|
{ id: "4", name: "面试地点不合适", checked: false },
|
|
|
];
|
|
|
//面试反馈状态
|
|
|
var interviewStatusArray2 = [
|
|
|
{ id: "0", name: "请选择", checked: false },
|
|
|
{ id: "10", name: "爽约", checked: false },
|
|
|
{ id: "13", name: "放弃", checked: false },
|
|
|
{ id: "11", name: "未通过-形象不符", checked: false },
|
|
|
{ id: "12", name: "未通过-能力不匹配", checked: false },
|
|
|
{ id: "21", name: "通过-无法安置", checked: false },
|
|
|
{ id: "20", name: "通过-候选人考虑中", checked: false },
|
|
|
{ id: "29", name: "通过-安排入职", checked: false },
|
|
|
];
|
|
|
//入职反馈状态
|
|
|
var entryStatusArray = [
|
|
|
{ id: "0", name: "请选择", checked: false },
|
|
|
{ id: "1", name: "候选人主动放弃", checked: false },
|
|
|
{ id: "2", name: "候选人被淘汰", checked: false },
|
|
|
{ id: "10", name: "已入职", checked: false },
|
|
|
];
|
|
|
|
|
|
var workType = [
|
|
|
{ id: "1", name: "全职" },
|
|
|
{ id: "2", name: "兼职" },
|
|
|
{ id: "3", name: "小时工" },
|
|
|
];
|
|
|
var workType2 = [
|
|
|
{ id: "0", name: "请选择" },
|
|
|
{ id: "1", name: "全职" },
|
|
|
{ id: "2", name: "兼职" },
|
|
|
{ id: "3", name: "小时工" },
|
|
|
];
|
|
|
var workType3 = [
|
|
|
{ id: "0", name: "长期工" },
|
|
|
{ id: "1", name: "短期工" },
|
|
|
{ id: "2", name: "寒暑假工" },
|
|
|
{ id: "3", name: "实习生" },
|
|
|
];
|
|
|
var workType4 = [
|
|
|
{ id: "-1", name: "请选择" },
|
|
|
{ id: "0", name: "长期工" },
|
|
|
{ id: "1", name: "短期工" },
|
|
|
{ id: "2", name: "寒暑假工" },
|
|
|
{ id: "3", name: "实习生" },
|
|
|
];
|
|
|
//职位工资结算周期
|
|
|
var settlementCycleArray = [
|
|
|
{ id: "0", name: "月结", checked: false },
|
|
|
{ id: "1", name: "半月结", checked: false },
|
|
|
{ id: "2", name: "周结", checked: false },
|
|
|
{ id: "3", name: "日结", checked: false },
|
|
|
{ id: "4", name: "次结", checked: false },
|
|
|
];
|
|
|
|
|
|
//职位计薪方式
|
|
|
var salaryTypeArray = [
|
|
|
{ id: "0", name: "按月计薪", subName: "月计", checked: false, type: 1 },
|
|
|
{ id: "1", name: "按日计薪", subName: "日计", checked: false, type: 1 },
|
|
|
{ id: "2", name: "按时计薪", subName: "时计", checked: false, type: 1 },
|
|
|
{ id: "3", name: "按次计薪", subName: "次计", checked: false, type: 1 },
|
|
|
];
|
|
|
|
|
|
var hopeLive = [
|
|
|
{ id: "", name: "请选择" },
|
|
|
{ id: "住宿舍", name: "住宿舍" },
|
|
|
{ id: "不住宿舍", name: "不住宿舍" },
|
|
|
];
|
|
|
|
|
|
var workExp = [
|
|
|
// { id: "", name: "请选择"},
|
|
|
{ id: "无工作经验", name: "无工作经验" },
|
|
|
{ id: "餐饮管理经验", name: "餐饮管理经验" },
|
|
|
{ id: "餐饮服务岗经验", name: "餐饮服务岗经验" },
|
|
|
{ id: "非餐饮岗位经验", name: "非餐饮岗位经验" },
|
|
|
{ id: "星级酒店前厅岗位经验", name: "星级酒店前厅岗位经验" },
|
|
|
{ id: "其他", name: "其他" },
|
|
|
];
|
|
|
|
|
|
var education2 = [
|
|
|
{ id: "", name: "请选择" },
|
|
|
{ id: "初中", name: "初中" },
|
|
|
{ id: "中专", name: "中专" },
|
|
|
{ id: "高中", name: "高中" },
|
|
|
{ id: "大专", name: "大专" },
|
|
|
{ id: "本科及以上", name: "本科及以上" },
|
|
|
];
|
|
|
|
|
|
var bankAuth = [
|
|
|
{ id: "0", name: "未认证" },
|
|
|
{ id: "1", name: "已认证" },
|
|
|
{ id: "2", name: "审核中" },
|
|
|
];
|
|
|
|
|
|
var auth = [
|
|
|
{ id: "0", name: "未认证" },
|
|
|
{ id: "1", name: "已认证" },
|
|
|
];
|
|
|
|
|
|
var healthAuth = [
|
|
|
{ id: "0", name: "未绑定" },
|
|
|
{ id: "1", name: "已绑定" },
|
|
|
];
|
|
|
|
|
|
// function CommonUtil(){}
|
|
|
|
|
|
export function getHealthArray() {
|
|
|
return healthAuth;
|
|
|
}
|
|
|
|
|
|
export function getAuthArray() {
|
|
|
return auth;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initAuthPicker(id) {
|
|
|
for (var i = 0; i < auth.length; i++) {
|
|
|
if (auth[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getAuthValue(index) {
|
|
|
return auth[index].id;
|
|
|
}
|
|
|
|
|
|
export function getIsMarryArray() {
|
|
|
return isMarry;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initIsMarryPicker(name) {
|
|
|
for (var i = 0; i < isMarry.length; i++) {
|
|
|
if (isMarry[i].name == name) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getIsMarryValue(index) {
|
|
|
return isMarry[index].id;
|
|
|
}
|
|
|
|
|
|
export function getEducationArray() {
|
|
|
return education;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initEducationPicker(name) {
|
|
|
for (var i = 0; i < education.length; i++) {
|
|
|
if (education[i].name == name) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getEducationValue(index) {
|
|
|
return education[index].id;
|
|
|
}
|
|
|
|
|
|
export function getSexValue(index) {
|
|
|
return sex[index].id;
|
|
|
}
|
|
|
|
|
|
export function getSexArray() {
|
|
|
return sex;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initSexPicker(id) {
|
|
|
for (var i = 0; i < sex.length; i++) {
|
|
|
if (sex[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
export function getAttendanceStatus() {
|
|
|
return attendanceStatus;
|
|
|
}
|
|
|
export function getAttendanceStatusValue(index) {
|
|
|
return attendanceStatus[index].id;
|
|
|
}
|
|
|
export function getAttendanceStatusIndex(id) {
|
|
|
for (var i = 0; i < attendanceStatus.length; i++) {
|
|
|
if (attendanceStatus[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getAttendanceStatusName(id) {
|
|
|
for (var i = 0; i < attendanceStatus.length; i++) {
|
|
|
if (attendanceStatus[i].id == id) {
|
|
|
return attendanceStatus[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getAttendanceStatusNameOfIndex(index) {
|
|
|
for (var i = 0; i < attendanceStatus.length; i++) {
|
|
|
if (index == i) {
|
|
|
return attendanceStatus[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getAttendanceStatus2() {
|
|
|
return attendanceStatus2;
|
|
|
}
|
|
|
export function getAttendanceStatusValue2(index) {
|
|
|
return attendanceStatus2[index].id;
|
|
|
}
|
|
|
export function getAttendanceStatusIndex2(id) {
|
|
|
for (var i = 0; i < attendanceStatus2.length; i++) {
|
|
|
if (attendanceStatus2[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getAttendanceStatusName2(id) {
|
|
|
for (var i = 0; i < attendanceStatus2.length; i++) {
|
|
|
if (attendanceStatus2[i].id == id) {
|
|
|
return attendanceStatus2[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getAttendanceStatusNameOfIndex2(index) {
|
|
|
for (var i = 0; i < attendanceStatus2.length; i++) {
|
|
|
if (index == i) {
|
|
|
return attendanceStatus2[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getSignatoryTypeArray() {
|
|
|
return signatoryTypeArray;
|
|
|
}
|
|
|
|
|
|
export function getContractTypeArrayArray() {
|
|
|
return contractTypeArray;
|
|
|
}
|
|
|
|
|
|
export function getHourArray() {
|
|
|
return hourArray;
|
|
|
}
|
|
|
|
|
|
export function getTimeArray1() {
|
|
|
return timeArray1;
|
|
|
}
|
|
|
|
|
|
export function getInterviewArray() {
|
|
|
return interviewArray;
|
|
|
}
|
|
|
export function getInterviewArrayName(id) {
|
|
|
for (var i = 0; i < interviewArray.length; i++) {
|
|
|
if (interviewArray[i].id == id) {
|
|
|
return interviewArray[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getInterviewStatusArray() {
|
|
|
return interviewStatusArray;
|
|
|
}
|
|
|
export function getInterviewStatusName(id) {
|
|
|
for (var i = 0; i < interviewStatusArray.length; i++) {
|
|
|
if (interviewStatusArray[i].id == id) {
|
|
|
return interviewStatusArray[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getInterviewStatusArray1() {
|
|
|
return interviewStatusArray1;
|
|
|
}
|
|
|
export function getInterviewStatusName1(id) {
|
|
|
for (var i = 0; i < interviewStatusArray1.length; i++) {
|
|
|
if (interviewStatusArray1[i].id == id) {
|
|
|
return interviewStatusArray1[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getInterviewStatusIndex1(id) {
|
|
|
for (var i = 0; i < interviewStatusArray1.length; i++) {
|
|
|
if (interviewStatusArray1[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
export function getInterviewStatusArray2() {
|
|
|
return interviewStatusArray2;
|
|
|
}
|
|
|
export function getInterviewStatusName2(id) {
|
|
|
for (var i = 0; i < interviewStatusArray2.length; i++) {
|
|
|
if (interviewStatusArray2[i].id == id) {
|
|
|
return interviewStatusArray2[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getInterviewStatusIndex2(id) {
|
|
|
for (var i = 0; i < interviewStatusArray2.length; i++) {
|
|
|
if (interviewStatusArray2[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
export function getEntryStatusArray() {
|
|
|
return entryStatusArray;
|
|
|
}
|
|
|
|
|
|
export function getEntryStatusName(id) {
|
|
|
for (var i = 0; i < entryStatusArray.length; i++) {
|
|
|
if (entryStatusArray[i].id == id) {
|
|
|
return entryStatusArray[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getEntryStatusIndex(id) {
|
|
|
for (var i = 0; i < entryStatusArray.length; i++) {
|
|
|
if (entryStatusArray[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
export function getWorkTypeArray() {
|
|
|
return workType;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initWorkTypePicker(id) {
|
|
|
for (var i = 0; i < workType.length; i++) {
|
|
|
if (workType[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getWorkTypeValue(index) {
|
|
|
return workType[index].id;
|
|
|
}
|
|
|
|
|
|
export function getWorkType2Array() {
|
|
|
return workType2;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initWorkType2Picker(id) {
|
|
|
for (var i = 0; i < workType2.length; i++) {
|
|
|
if (workType2[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getWorkType2Value(index) {
|
|
|
return workType2[index].id;
|
|
|
}
|
|
|
|
|
|
export function getWorkType3Array() {
|
|
|
return workType3;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initWorkType3Picker(id) {
|
|
|
for (var i = 0; i < workType3.length; i++) {
|
|
|
if (workType3[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getWorkType3Value(index) {
|
|
|
return workType3[index].id;
|
|
|
}
|
|
|
export function getWorkType3Name(id) {
|
|
|
for (var i = 0; i < workType3.length; i++) {
|
|
|
if (workType3[i].id == id) {
|
|
|
return workType3[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getWorkType4Array() {
|
|
|
return workType4;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initWorkType4Picker(id) {
|
|
|
for (var i = 0; i < workType4.length; i++) {
|
|
|
if (workType4[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getWorkType4Value(index) {
|
|
|
return workType4[index].id;
|
|
|
}
|
|
|
export function getWorkType4Name(id) {
|
|
|
for (var i = 0; i < workType4.length; i++) {
|
|
|
if (workType4[i].id == id) {
|
|
|
return workType4[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getSettlementCycleArray() {
|
|
|
return settlementCycleArray;
|
|
|
}
|
|
|
export function getSettlementCycleName(id) {
|
|
|
for (var i = 0; i < settlementCycleArray.length; i++) {
|
|
|
if (settlementCycleArray[i].id == id) {
|
|
|
return settlementCycleArray[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getSalaryTypeArray() {
|
|
|
return salaryTypeArray;
|
|
|
}
|
|
|
export function getSalaryTypeName(id) {
|
|
|
for (var i = 0; i < salaryTypeArray.length; i++) {
|
|
|
if (salaryTypeArray[i].id == id) {
|
|
|
return salaryTypeArray[i].name;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
export function getSalaryTypeSubName(id) {
|
|
|
for (var i = 0; i < salaryTypeArray.length; i++) {
|
|
|
if (salaryTypeArray[i].id == id) {
|
|
|
return salaryTypeArray[i].subName;
|
|
|
}
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
export function getHopeLiveArray() {
|
|
|
return hopeLive;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initHopeLivePicker(name) {
|
|
|
for (var i = 0; i < hopeLive.length; i++) {
|
|
|
if (hopeLive[i].id == name) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getHopeLiveValue(index) {
|
|
|
return hopeLive[index].id;
|
|
|
}
|
|
|
|
|
|
export function getWorkExpArray() {
|
|
|
return workExp;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initWorkExpPicker(name) {
|
|
|
for (var i = 0; i < workExp.length; i++) {
|
|
|
if (workExp[i].name == name) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getWorkExpValue(index) {
|
|
|
return workExp[index].id;
|
|
|
}
|
|
|
|
|
|
export function getEducation2Array() {
|
|
|
return education2;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initEducation2Picker(name) {
|
|
|
for (var i = 0; i < education2.length; i++) {
|
|
|
if (education2[i].name == name) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getEducation2Value(index) {
|
|
|
return education2[index].id;
|
|
|
}
|
|
|
|
|
|
export function getIsMarry2Array() {
|
|
|
return isMarry2;
|
|
|
}
|
|
|
//初始化picker选中项
|
|
|
export function initIsMarry2Picker(name) {
|
|
|
for (var i = 0; i < isMarry2.length; i++) {
|
|
|
if (isMarry2[i].name == name) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getIsMarry2Value(index) {
|
|
|
return isMarry2[index].id;
|
|
|
}
|
|
|
|
|
|
export function getBankAuthArray() {
|
|
|
return bankAuth;
|
|
|
}
|
|
|
|
|
|
//初始化picker选中项
|
|
|
export function initBankAuthPicker(id) {
|
|
|
for (var i = 0; i < bankAuth.length; i++) {
|
|
|
if (bankAuth[i].id == id) {
|
|
|
return i;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
export function getBankAuthValue(index) {
|
|
|
return bankAuth[index].id;
|
|
|
}
|
|
|
/**
|
|
|
*
|
|
|
* @param district 省市县
|
|
|
* @param detailPosition 详细地址
|
|
|
* @returns {string}
|
|
|
*/
|
|
|
export function getStoreAddress(district, detailPosition) {
|
|
|
var res = "";
|
|
|
if (isNotEmptyCheck(district)) {
|
|
|
var tmpArr = district.split(",");
|
|
|
if (tmpArr.length == 3 && tmpArr[0] == tmpArr[1]) {
|
|
|
res += tmpArr[1] + tmpArr[2];
|
|
|
} else {
|
|
|
res += district.replace(/,/g, "");
|
|
|
}
|
|
|
}
|
|
|
if (isNotEmptyCheck(detailPosition)) {
|
|
|
res += detailPosition;
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 代理推广明细事件
|
|
|
*/
|
|
|
export function agencyPromotionDetailEventArray() {
|
|
|
let agencyPromotionDetailEventArray = [
|
|
|
{ id: "10", name: "扫码", value: "10", text: "扫码", checked: false },
|
|
|
{ id: "20", name: "报名", value: "20", text: "报名", checked: false },
|
|
|
{ id: "30", name: "面试", value: "30", text: "面试", checked: false },
|
|
|
{ id: "40", name: "入职", value: "40", text: "入职", checked: false },
|
|
|
{ id: "50", name: "离职", value: "50", text: "离职", checked: false },
|
|
|
];
|
|
|
return agencyPromotionDetailEventArray;
|
|
|
}
|
|
|
/**
|
|
|
* 根据代理推广明细事件ID获取名称
|
|
|
*/
|
|
|
export function getAgencyPromotionDetailEventNameId(id) {
|
|
|
let str = "";
|
|
|
let array = agencyPromotionDetailEventArray();
|
|
|
array.forEach((item) => {
|
|
|
if (item.id == id) {
|
|
|
str = item.name;
|
|
|
}
|
|
|
});
|
|
|
return str;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 代理推广明细佣金状态
|
|
|
*/
|
|
|
export function agencyPromotionDetailMoneyStatusArray() {
|
|
|
let agencyPromotionDetailMoneyStatusArray = [
|
|
|
{ id: "0", name: "无佣金", value: "0", text: "无佣金", checked: false },
|
|
|
{ id: "10", name: "待结算", value: "10", text: "待结算", checked: false },
|
|
|
{ id: "20", name: "已结算", value: "20", text: "已结算", checked: false },
|
|
|
{ id: "30", name: "已失效", value: "30", text: "已失效", checked: false },
|
|
|
];
|
|
|
return agencyPromotionDetailMoneyStatusArray;
|
|
|
}
|
|
|
/**
|
|
|
* 根据代理推广明细佣金状态ID获取名称
|
|
|
*/
|
|
|
export function getAgencyPromotionDetailMoneyStatusNameId(id) {
|
|
|
let str = "";
|
|
|
let array = agencyPromotionDetailMoneyStatusArray();
|
|
|
array.forEach((item) => {
|
|
|
if (item.id == id) {
|
|
|
str = item.name;
|
|
|
}
|
|
|
});
|
|
|
return str;
|
|
|
}
|
|
|
|
|
|
export function moneyToFixed(money, fixed = 2, multiplicator = 100) {
|
|
|
if (money != 0 && money != null && money != "" && money != undefined) {
|
|
|
return cutZero(new Number(money / multiplicator).toFixed(fixed));
|
|
|
}
|
|
|
return "0";
|
|
|
}
|
|
|
export function cutZero(old) {
|
|
|
//拷贝一份 返回去掉零的新串
|
|
|
let newstr = old;
|
|
|
//循环变量 小数部分长度
|
|
|
var leng = old.length - old.indexOf(".") - 1;
|
|
|
//判断是否有效数
|
|
|
if (old.indexOf(".") > -1) {
|
|
|
//循环小数部分
|
|
|
for (var i = leng; i > 0; i--) {
|
|
|
//如果newstr末尾有0
|
|
|
if (
|
|
|
newstr.lastIndexOf("0") > -1 &&
|
|
|
newstr.substr(newstr.length - 1, 1) == 0
|
|
|
) {
|
|
|
var k = newstr.lastIndexOf("0");
|
|
|
//如果小数点后只有一个0 去掉小数点
|
|
|
if (newstr.charAt(k - 1) == ".") {
|
|
|
return newstr.substring(0, k - 1);
|
|
|
} else {
|
|
|
//否则 去掉一个0
|
|
|
newstr = newstr.substring(0, k);
|
|
|
}
|
|
|
} else {
|
|
|
//如果末尾没有0
|
|
|
return newstr;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return old;
|
|
|
}
|
|
|
// export function getCurrentPageUrlWithArgs() {
|
|
|
// // const pages = getCurrentPages()
|
|
|
// const currentPage = pages[pages.length - 1]
|
|
|
// const url = currentPage.route
|
|
|
// const options = currentPage.options
|
|
|
// let urlWithArgs = `/${url}?`
|
|
|
// for (let key in options) {
|
|
|
// const value = options[key]
|
|
|
// urlWithArgs += `${key}=${value}&`
|
|
|
// }
|
|
|
// urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1)
|
|
|
// return urlWithArgs
|
|
|
// }
|
|
|
|
|
|
export function getDateArrayOfScope() {
|
|
|
// var multiArray = [['2000年', '2001年'], ['01月', '02月', '03月', '04月', '05月'], ['-'],['2000年', '2001年'], ['01月', '02月', '03月', '04月', '05月']];
|
|
|
var multiArray = [
|
|
|
[],
|
|
|
[
|
|
|
"01月",
|
|
|
"02月",
|
|
|
"03月",
|
|
|
"04月",
|
|
|
"05月",
|
|
|
"06月",
|
|
|
"07月",
|
|
|
"08月",
|
|
|
"09月",
|
|
|
"10月",
|
|
|
"11月",
|
|
|
"12月",
|
|
|
],
|
|
|
["-"],
|
|
|
[],
|
|
|
[
|
|
|
"01月",
|
|
|
"02月",
|
|
|
"03月",
|
|
|
"04月",
|
|
|
"05月",
|
|
|
"06月",
|
|
|
"07月",
|
|
|
"08月",
|
|
|
"09月",
|
|
|
"10月",
|
|
|
"11月",
|
|
|
"12月",
|
|
|
],
|
|
|
];
|
|
|
|
|
|
var date = new Date();
|
|
|
var end = date.getFullYear();
|
|
|
|
|
|
var yearArray = [];
|
|
|
for (var i = 1990; i <= end; i++) {
|
|
|
yearArray.push(i + "年");
|
|
|
}
|
|
|
|
|
|
multiArray[0] = yearArray;
|
|
|
multiArray[3] = yearArray;
|
|
|
|
|
|
return multiArray;
|
|
|
}
|
|
|
|
|
|
export function educationArray() {
|
|
|
let educationArray = [
|
|
|
{ id: "初中", name: "初中" },
|
|
|
{ id: "高中", name: "高中" },
|
|
|
{ id: "大专", name: "大专" },
|
|
|
{ id: "本科", name: "本科" },
|
|
|
{ id: "硕士", name: "硕士" },
|
|
|
{ id: "博士", name: "博士" },
|
|
|
];
|
|
|
return educationArray;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 时间格式化 2017-01-01
|
|
|
* @param val
|
|
|
* @returns {string}
|
|
|
*/
|
|
|
export function formatDateYMD(val) {
|
|
|
if (val == null || val == "") {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
if ((val != null || val == "") && typeof val == "string") {
|
|
|
if (val.indexOf("T")) {
|
|
|
val = val.replace("T", " "); //原来L端可能返回的时间格式有带T的格式,处理一下
|
|
|
}
|
|
|
val = val.replace("-", "/").replace("-", "/");
|
|
|
}
|
|
|
var value = new Date(val);
|
|
|
//console.log(val);
|
|
|
var fmt = "yyyy-MM-dd";
|
|
|
var o = {
|
|
|
"M+": value.getMonth() + 1, //月份
|
|
|
"d+": value.getDate(), //日
|
|
|
};
|
|
|
if (/(y+)/.test(fmt))
|
|
|
fmt = fmt.replace(
|
|
|
RegExp.$1,
|
|
|
(value.getFullYear() + "").substr(4 - RegExp.$1.length)
|
|
|
);
|
|
|
for (var k in o) {
|
|
|
if (new RegExp("(" + k + ")").test(fmt)) {
|
|
|
fmt = fmt.replace(
|
|
|
RegExp.$1,
|
|
|
RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
return fmt;
|
|
|
}
|
|
|
function getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
|
|
|
if (isNotEmptyCheck(jobSpecialLabelNames)) {
|
|
|
return jobSpecialLabelNames.split(", ");
|
|
|
}
|
|
|
return [];
|
|
|
}
|
|
|
|
|
|
// 处理职位列表的方法
|
|
|
export function disposeJobListData(jobList) {
|
|
|
if (jobList !== undefined) {
|
|
|
if (Array.isArray(jobList)) {
|
|
|
jobList.forEach((item) => {
|
|
|
item["workType"] = getWorkTypeById(item.workTypeMulti);
|
|
|
|
|
|
if (isNotEmptyCheck(item.distance)) {
|
|
|
item["distanceKm"] = getDistanceName(item.distance);
|
|
|
}
|
|
|
|
|
|
//年龄
|
|
|
// console.log(jobList);
|
|
|
var ageStr = "";
|
|
|
if (isNotEmptyCheck(item.minAge) && isNotEmptyCheck(item.maxAge)) {
|
|
|
ageStr = "丨" + item.minAge + "-" + item.maxAge + "岁";
|
|
|
} else if (isNotEmptyCheck(item.minAge)) {
|
|
|
ageStr = "丨" + item.minAge + "岁以上";
|
|
|
} else if (isNotEmptyCheck(item.maxAge)) {
|
|
|
ageStr = "丨" + item.maxAge + "岁以下";
|
|
|
}
|
|
|
item["age"] = ageStr;
|
|
|
//时薪
|
|
|
// var hourlyPayStr = "";
|
|
|
// var hasHourlyPay = false;
|
|
|
// if (isNotEmptyCheck(item.hourlyPay)) {
|
|
|
// hourlyPayStr = item.hourlyPay + "元/小时";
|
|
|
// hasHourlyPay = true;
|
|
|
// } else if (isNotEmptyCheck(item.dayPay)) {
|
|
|
// hourlyPayStr = item.dayPay + "元/日";
|
|
|
// hasHourlyPay = true;
|
|
|
// } else {
|
|
|
// if (
|
|
|
// isNotEmptyCheck(item.minMonthlyPay) &&
|
|
|
// isNotEmptyCheck(item.maxMonthlyPay)
|
|
|
// ) {
|
|
|
// if (item.minMonthlyPay == item.maxMonthlyPay) {
|
|
|
// hourlyPayStr = item.minMonthlyPay;
|
|
|
// } else {
|
|
|
// hourlyPayStr = item.minMonthlyPay + "-" + item.maxMonthlyPay;
|
|
|
// }
|
|
|
// } else if (isNotEmptyCheck(item.minMonthlyPay)) {
|
|
|
// hourlyPayStr = item.minMonthlyPay;
|
|
|
// } else if (isNotEmptyCheck(item.maxMonthlyPay)) {
|
|
|
// hourlyPayStr = item.maxMonthlyPay;
|
|
|
// }
|
|
|
// }
|
|
|
// item["hourlyPay"] = hourlyPayStr;
|
|
|
//月薪
|
|
|
// var monthlyPayStr = "";
|
|
|
// if (hasHourlyPay) {
|
|
|
// if (
|
|
|
// isNotEmptyCheck(item.minMonthlyPay) &&
|
|
|
// isNotEmptyCheck(item.maxMonthlyPay)
|
|
|
// ) {
|
|
|
// if (item.minMonthlyPay == item.maxMonthlyPay) {
|
|
|
// monthlyPayStr = item.minMonthlyPay;
|
|
|
// } else {
|
|
|
// monthlyPayStr = item.minMonthlyPay + "-" + item.maxMonthlyPay;
|
|
|
// }
|
|
|
// } else if (isNotEmptyCheck(item.minMonthlyPay)) {
|
|
|
// monthlyPayStr = item.minMonthlyPay;
|
|
|
// } else if (isNotEmptyCheck(item.maxMonthlyPay)) {
|
|
|
// monthlyPayStr = item.maxMonthlyPay;
|
|
|
// }
|
|
|
// }
|
|
|
// item["monthlyPay"] = monthlyPayStr;
|
|
|
//地址深圳丨龙岗区丨
|
|
|
var districtStr = "";
|
|
|
if (isNotEmptyCheck(item.district)) {
|
|
|
var districtArr = item.district.split(",");
|
|
|
if (districtArr.length < 3) {
|
|
|
districtStr = districtArr[districtArr.length - 1];
|
|
|
} else {
|
|
|
districtStr = districtArr[1] + "丨" + districtArr[2];
|
|
|
}
|
|
|
//districtStr = districtArr[1] + '丨' + districtArr[2];
|
|
|
}
|
|
|
item["district"] = districtStr;
|
|
|
//职位特色
|
|
|
item["jobSpecialLabelNames"] = getJobSpecialLabelNamesArray(
|
|
|
item.jobSpecialLabelNames
|
|
|
);
|
|
|
// 特色标签
|
|
|
// console.log(item.jobSpecialLabelNames);
|
|
|
const jobSpecialLabelNames = [];
|
|
|
if (
|
|
|
isNotEmptyCheck(item.jobSpecialLabelNames) &&
|
|
|
Array.isArray(item.jobSpecialLabelNames)
|
|
|
) {
|
|
|
item.jobSpecialLabelNames.forEach((item, index) => {
|
|
|
if (index <= 2) {
|
|
|
jobSpecialLabelNames.push(item);
|
|
|
// console.log(jobSpecialLabelNames);
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
item.jobSpecialLabelNames = jobSpecialLabelNames;
|
|
|
}
|
|
|
// 年龄限制
|
|
|
if (item["gender"] === 1) {
|
|
|
item["gender"] = "丨男";
|
|
|
} else if (item["gender"] === 2) {
|
|
|
item["gender"] = "丨女";
|
|
|
} else if (item["gender"] === 3) {
|
|
|
item["gender"] = "丨男女不限";
|
|
|
} else {
|
|
|
item["gender"] = "丨男女不限";
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
jobList["workType"] = getWorkTypeById(jobList.workTypeMulti);
|
|
|
|
|
|
if (isNotEmptyCheck(jobList.distance)) {
|
|
|
jobList["distanceKm"] = getDistanceName(jobList.distance);
|
|
|
}
|
|
|
//年龄
|
|
|
var ageStr = "";
|
|
|
if (isNotEmptyCheck(jobList.minAge) && isNotEmptyCheck(jobList.maxAge)) {
|
|
|
ageStr = "丨" + jobList.minAge + "-" + jobList.maxAge + "岁";
|
|
|
} else if (isNotEmptyCheck(jobList.minAge)) {
|
|
|
ageStr = "丨" + jobList.minAge + "岁以上";
|
|
|
} else if (isNotEmptyCheck(jobList.maxAge)) {
|
|
|
ageStr = "丨" + jobList.maxAge + "岁以下";
|
|
|
}
|
|
|
jobList["age"] = ageStr;
|
|
|
//时薪
|
|
|
// var hourlyPayStr = "";
|
|
|
// var hasHourlyPay = false;
|
|
|
// if (isNotEmptyCheck(jobList.hourlyPay)) {
|
|
|
// hourlyPayStr = jobList.hourlyPay + "元/小时";
|
|
|
// hasHourlyPay = true;
|
|
|
// } else if (isNotEmptyCheck(jobList.dayPay)) {
|
|
|
// hourlyPayStr = jobList.dayPay + "元/日";
|
|
|
// hasHourlyPay = true;
|
|
|
// } else {
|
|
|
// if (
|
|
|
// isNotEmptyCheck(jobList.minMonthlyPay) &&
|
|
|
// isNotEmptyCheck(jobList.maxMonthlyPay)
|
|
|
// ) {
|
|
|
// if (jobList.minMonthlyPay == jobList.maxMonthlyPay) {
|
|
|
// hourlyPayStr = jobList.minMonthlyPay;
|
|
|
// } else {
|
|
|
// hourlyPayStr = jobList.minMonthlyPay + "-" + jobList.maxMonthlyPay;
|
|
|
// }
|
|
|
// } else if (isNotEmptyCheck(jobList.minMonthlyPay)) {
|
|
|
// hourlyPayStr = jobList.minMonthlyPay;
|
|
|
// } else if (isNotEmptyCheck(jobList.maxMonthlyPay)) {
|
|
|
// hourlyPayStr = jobList.maxMonthlyPay;
|
|
|
// }
|
|
|
// }
|
|
|
// jobList["hourlyPay"] = hourlyPayStr;
|
|
|
//月薪
|
|
|
// var monthlyPayStr = "";
|
|
|
// if (hasHourlyPay) {
|
|
|
// if (
|
|
|
// isNotEmptyCheck(jobList.minMonthlyPay) &&
|
|
|
// isNotEmptyCheck(jobList.maxMonthlyPay)
|
|
|
// ) {
|
|
|
// if (jobList.minMonthlyPay == jobList.maxMonthlyPay) {
|
|
|
// monthlyPayStr = jobList.minMonthlyPay;
|
|
|
// } else {
|
|
|
// monthlyPayStr = jobList.minMonthlyPay + "-" + jobList.maxMonthlyPay;
|
|
|
// }
|
|
|
// } else if (isNotEmptyCheck(jobList.minMonthlyPay)) {
|
|
|
// monthlyPayStr = jobList.minMonthlyPay;
|
|
|
// } else if (isNotEmptyCheck(jobList.maxMonthlyPay)) {
|
|
|
// monthlyPayStr = jobList.maxMonthlyPay;
|
|
|
// }
|
|
|
// }
|
|
|
// jobList["monthlyPay"] = monthlyPayStr;
|
|
|
//地址深圳丨龙岗区丨
|
|
|
var districtStr = "";
|
|
|
if (isNotEmptyCheck(jobList.district)) {
|
|
|
var districtArr = jobList.district.split(",");
|
|
|
if (districtArr.length < 3) {
|
|
|
districtStr = districtArr[districtArr.length - 1];
|
|
|
} else {
|
|
|
districtStr = districtArr[1] + "丨" + districtArr[2];
|
|
|
}
|
|
|
//districtStr = districtArr[1] + '丨' + districtArr[2];
|
|
|
}
|
|
|
jobList["district"] = districtStr;
|
|
|
//职位特色
|
|
|
jobList["jobSpecialLabelNames"] = getJobSpecialLabelNamesArray(
|
|
|
jobList.jobSpecialLabelNames
|
|
|
);
|
|
|
// console.log(jobList.jobSpecialLabelNames);
|
|
|
// 特色标签
|
|
|
// console.log(jobList.jobSpecialLabelNames);
|
|
|
const jobSpecialLabelNames = [];
|
|
|
if (
|
|
|
isNotEmptyCheck(jobList.jobSpecialLabelNames) &&
|
|
|
Array.isArray(jobList.jobSpecialLabelNames)
|
|
|
) {
|
|
|
jobList.jobSpecialLabelNames.forEach((item, index) => {
|
|
|
if (index <= 4) {
|
|
|
jobSpecialLabelNames.push(item);
|
|
|
// console.log(jobSpecialLabelNames);
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
jobList.jobSpecialLabelNames = jobSpecialLabelNames;
|
|
|
}
|
|
|
// 年龄限制
|
|
|
if (jobList["gender"] === 1) {
|
|
|
jobList["gender"] = "丨男";
|
|
|
} else if (jobList["gender"] === 2) {
|
|
|
jobList["gender"] = "丨女";
|
|
|
} else if (jobList["gender"] === 3) {
|
|
|
jobList["gender"] = "丨男女不限";
|
|
|
} else {
|
|
|
jobList["gender"] = "丨男女不限";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return jobList;
|
|
|
}
|