This commit is contained in:
zxy
2024-03-13 10:15:35 +08:00
8 changed files with 578 additions and 578 deletions

View File

@@ -1,280 +1,280 @@
// 发布岗位和个招工 参考工资 // 发布岗位和个招工 参考工资
const salary = [{ const salary = [{
name: "2000元以下/月", name: "2000元以下/月",
label: "2000元以下/月", label: "2000元以下/月",
}, },
{ {
name: "2000-5000元/月", name: "2000-5000元/月",
label: "2000-5000元/月", label: "2000-5000元/月",
}, },
{ {
name: "5000-8000元/月", name: "5000-8000元/月",
label: "5000-8000元/月", label: "5000-8000元/月",
}, },
{ {
name: "8000-10000元/月", name: "8000-10000元/月",
label: "8000-10000元/月", label: "8000-10000元/月",
}, },
{ {
name: "10000-15000元/月", name: "10000-15000元/月",
label: "10000-15000元/月", label: "10000-15000元/月",
}, },
{ {
name: "15000-20000元/月", name: "15000-20000元/月",
label: "15000-20000元/月", label: "15000-20000元/月",
}, },
{ {
name: "20000-25000元/月", name: "20000-25000元/月",
label: "20000-25000元/月", label: "20000-25000元/月",
}, },
{ {
name: "25000-30000元/月", name: "25000-30000元/月",
label: "25000-30000元/月", label: "25000-30000元/月",
}, },
{ {
name: "30000元以上/月", name: "30000元以上/月",
label: "30000元以上/月", label: "30000元以上/月",
}, },
{ {
name: "面议、暂无要求", name: "面议、暂无要求",
label: "面议、暂无要求", label: "面议、暂无要求",
}, },
] ]
const taskSalary = [ const taskSalary = [
[ [
"10-15元/小时", "10-15元/小时",
"16-20元/小时", "16-20元/小时",
"21-25元/小时", "21-25元/小时",
"26-30元/小时", "26-30元/小时",
"30元/小时以上", "30元/小时以上",
"100-150元/天", "100-150元/天",
"151-200元/天", "151-200元/天",
"201-250元/天", "201-250元/天",
"251-300元/天", "251-300元/天",
"300元/天以上", "300元/天以上",
"30000元以上/月", "30000元以上/月",
"面议、暂无要求" "面议、暂无要求"
] ]
] ]
const tradeArr = [ const tradeArr = [
[{ [{
"id": "1754327500065390596", "id": "1754327500065390596",
"name": "农、林、牧、渔业", "name": "农、林、牧、渔业",
}, },
{ {
"id": "1754327500065390597", "id": "1754327500065390597",
"name": "采矿业", "name": "采矿业",
}, },
{ {
"id": "1754327500065390598", "id": "1754327500065390598",
"name": "采矿业,制造业", "name": "采矿业,制造业",
}, },
{ {
"id": "1754327500065390599", "id": "1754327500065390599",
"name": "制造业", "name": "制造业",
}, },
{ {
"id": "1754327500065390600", "id": "1754327500065390600",
"name": "电力、热力、燃气及水生产和供应业", "name": "电力、热力、燃气及水生产和供应业",
}, },
{ {
"id": "1754327500065390601", "id": "1754327500065390601",
"name": "建筑业", "name": "建筑业",
}, },
{ {
"id": "1754327500065390602", "id": "1754327500065390602",
"name": "批发和零售业", "name": "批发和零售业",
}, },
{ {
"id": "1754327500065390603", "id": "1754327500065390603",
"name": "交通运输、仓储和邮政业", "name": "交通运输、仓储和邮政业",
}, },
{ {
"id": "1754327500065390604", "id": "1754327500065390604",
"name": "住宿和餐饮业", "name": "住宿和餐饮业",
}, },
{ {
"id": "1754327500065390605", "id": "1754327500065390605",
"name": "信息传输、软件和信息技术服务业", "name": "信息传输、软件和信息技术服务业",
}, },
{ {
"id": "1754327500065390606", "id": "1754327500065390606",
"name": "金融业", "name": "金融业",
}, },
{ {
"id": "1754327500065390607", "id": "1754327500065390607",
"name": "房地产业", "name": "房地产业",
}, },
{ {
"id": "1754327500065390608", "id": "1754327500065390608",
"name": "租赁和商务服务业", "name": "租赁和商务服务业",
}, },
{ {
"id": "1754327500065390609", "id": "1754327500065390609",
"name": "科学研究和技术服务业", "name": "科学研究和技术服务业",
}, },
{ {
"id": "1754327500065390610", "id": "1754327500065390610",
"name": "水利、环境和公共设施管理业", "name": "水利、环境和公共设施管理业",
}, },
{ {
"id": "1754327500065390611", "id": "1754327500065390611",
"name": "居民服务、修理和其他服务业", "name": "居民服务、修理和其他服务业",
}, },
{ {
"id": "1754327500065390612", "id": "1754327500065390612",
"name": "教育", "name": "教育",
}, },
{ {
"id": "1754327500065390613", "id": "1754327500065390613",
"name": "卫生和社会工作", "name": "卫生和社会工作",
}, },
{ {
"id": "1754327500065390614", "id": "1754327500065390614",
"name": "文化、体育和娱乐业", "name": "文化、体育和娱乐业",
}, },
{ {
"id": "1754327500065390615", "id": "1754327500065390615",
"name": "公共管理、社会保障和社会组织", "name": "公共管理、社会保障和社会组织",
}, },
{ {
"id": "1754327500065390616", "id": "1754327500065390616",
"name": "国际组织", "name": "国际组织",
}, },
{ {
"id": "1754327500065390617", "id": "1754327500065390617",
"name": "其他", "name": "其他",
}, },
{ {
"id": "1754327500065390890", "id": "1754327500065390890",
"name": "111", "name": "111",
}, },
{ {
"id": "1758061062381690882", "id": "1758061062381690882",
"name": "11", "name": "11",
}, },
{ {
"id": "1758102909546467329", "id": "1758102909546467329",
"name": "服务业", "name": "服务业",
} }
] ]
] ]
const natureArr = [ const natureArr = [
['灵活用工'] ['灵活用工']
] ]
const ageArr = [ const ageArr = [
[{ [{
label: "不限年龄", label: "不限年龄",
value: "不限年龄", value: "不限年龄",
}, },
{ {
label: "30以下", label: "30以下",
value: "30以下", value: "30以下",
}, },
{ {
label: "35以下", label: "35以下",
value: "35以下", value: "35以下",
}, },
{ {
label: "40以下", label: "40以下",
value: "40以下", value: "40以下",
}, },
{ {
label: "45以下", label: "45以下",
value: "45以下", value: "45以下",
}, },
{ {
label: "50以下", label: "50以下",
value: "50以下", value: "50以下",
}, },
{ {
label: "55以下", label: "55以下",
value: "55以下", value: "55以下",
}, },
{ {
label: "60以下", label: "60以下",
value: "60以下", value: "60以下",
}, },
] ]
] ]
const eduArr = [ const eduArr = [
[{ [{
label: "不限", label: "不限",
value: 8, value: 8,
}, },
{ {
label: "初中及以下", label: "初中及以下",
value: 7, value: 7,
}, },
{ {
label: "中专/中技", label: "中专/中技",
value: 6, value: 6,
}, },
{ {
label: "高中", label: "高中",
value: 5, value: 5,
}, },
{ {
label: "大专", label: "大专",
value: 4, value: 4,
}, },
{ {
label: "本科", label: "本科",
value: 3, value: 3,
}, },
{ {
label: "硕士", label: "硕士",
value: 2, value: 2,
}, },
{ {
label: "博士", label: "博士",
value: 1, value: 1,
}, },
{ {
label: "MBA/EMBA", label: "MBA/EMBA",
value: 0, value: 0,
}, },
] ]
] ]
const expeArr = [ const expeArr = [
[{ [{
label: "不限经验", label: "不限经验",
value: "不限经验", value: "不限经验",
}, },
{ {
label: "1年以下", label: "1年以下",
value: "1年以下", value: "1年以下",
}, },
{ {
label: "1~3年", label: "1~3年",
value: "1~3年", value: "1~3年",
}, },
{ {
label: "3~5年", label: "3~5年",
value: "3~5年", value: "3~5年",
}, },
{ {
label: "5~10年", label: "5~10年",
value: "5~10年", value: "5~10年",
}, },
{ {
label: "10年以上", label: "10年以上",
value: "10年以上", value: "10年以上",
}, },
] ]
] ]
export default { export default {
salary, salary,
taskSalary, taskSalary,
tradeArr, tradeArr,
natureArr, natureArr,
ageArr, ageArr,
eduArr, eduArr,
expeArr expeArr
} }

View File

@@ -233,7 +233,7 @@
"path" : "pages/recruit/reform", "path" : "pages/recruit/reform",
"style" : "style" :
{ {
"navigationBarTitleText" : "个招工", "navigationBarTitleText" : "个招工",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
}, },

View File

@@ -273,7 +273,7 @@ export default {
getPushListByUserId(params).then((res) => { getPushListByUserId(params).then((res) => {
if(res.data.code === 200 ){ if(res.data.code === 200 ){
const {records, current, total, size } = res.data.data const {records, current, total, size } = res.data.data
console.log('个招工', records, current, total, size) console.log('个招工', records, current, total, size)
if(!records.length) { if(!records.length) {
return uni.showToast({ return uni.showToast({
icon: "none", icon: "none",

View File

@@ -1,10 +1,10 @@
<template> <template>
<view class="container"> <view class="container">
<view class="select">请选择</view> <view class="select">请选择</view>
<view class="select-text">您是个招工还是企业招工</view> <view class="select-text">您是个招工还是企业招工</view>
<view class="block" @click="next(0)"> <view class="block" @click="next(0)">
<img src="../../static/img/zhao_icon1.png" alt="" /> <img src="../../static/img/zhao_icon1.png" alt="" />
<view class="block-text">招工</view> <view class="block-text">招工</view>
</view> </view>
<view class="block" @click="next(1)"> <view class="block" @click="next(1)">
<img src="../../static/img/zhao_icon2.png" alt="" /> <img src="../../static/img/zhao_icon2.png" alt="" />

View File

@@ -16,7 +16,7 @@
</view> </view>
</view> </view>
<view class="cond_list" v-else> <view class="cond_list" v-else>
<view style="font-weight: 700;">招工</view> <view style="font-weight: 700;">招工</view>
</view> </view>
<view <view
class="cond_item item_com" class="cond_item item_com"
@@ -48,7 +48,7 @@
text: "发布岗位", text: "发布岗位",
id: 1 id: 1
}, { }, {
text: "个招工", text: "个招工",
id: 2 id: 2
} }
]; ];

View File

@@ -1,46 +1,46 @@
<!-- 招工 --> <!-- 招工 -->
<template> <template>
<view> <view>
<view class="u-demo-block__content"> <view class="u-demo-block__content">
<!-- 注意如果需要兼容微信小程序最好通过setRules方法设置rules规则 --> <!-- 注意如果需要兼容微信小程序最好通过setRules方法设置rules规则 -->
<u--form labelPosition="left" :model="info" ref="form1"> <u--form labelPosition="left" :model="info" ref="form1">
<view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">招工信息</view> <view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">招工信息</view>
<u-form-item label="招工名称" prop="jobName" borderBottom labelWidth="80" ref="item1"> <u-form-item label="招工名称" prop="jobName" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.jobName" border="none" placeholder="请输入招工名称"></u--input> <u--input v-model="info.jobName" border="none" placeholder="请输入招工名称"></u--input>
</u-form-item>
<u-form-item label="发布时间" labelWidth="80" prop="stime" borderBottom
@click="showStime = true; hideKeyboard()" ref="item1">
<u--input v-model="info.stime" disabledColor="#ffffff" placeholder="请选择发布时间"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="结束时间" labelWidth="80" prop="etime" borderBottom
@click="showEtime = true; hideKeyboard()" ref="item2">
<u--input v-model="info.etime" disabledColor="#ffffff" placeholder="请选择结束时间"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">招工要求</view> <u-form-item label="发布时间" labelWidth="80" prop="stime" borderBottom
<u-form-item label="招聘人数" prop="peopleNum" borderBottom labelWidth="80" ref="item3"> @click="showStime = true; hideKeyboard()" ref="item1">
<u--input v-model="info.peopleNum" border="none" placeholder="请输入招聘人数"></u--input> <u--input v-model="info.stime" disabledColor="#ffffff" placeholder="请选择发布时间"
</u-form-item> border="none"></u--input>
<u-form-item label="参考工资" prop="wage" labelWidth="80" borderBottom <u-icon slot="right" name="arrow-right"></u-icon>
@click="showWage = true; hideKeyboard()" ref="item4"> </u-form-item>
<u--input v-model="info.wage" disabledColor="#ffffff" placeholder="请选择参考工资" <u-form-item label="结束时间" labelWidth="80" prop="etime" borderBottom
border="none"></u--input> @click="showEtime = true; hideKeyboard()" ref="item2">
<u-icon slot="right" name="arrow-right"></u-icon> <u--input v-model="info.etime" disabledColor="#ffffff" placeholder="请选择结束时间"
</u-form-item> border="none"></u--input>
<u-form-item label="行业类型" prop="tradeNames" labelWidth="80" borderBottom <u-icon slot="right" name="arrow-right"></u-icon>
@click="showTrade = true; hideKeyboard()" ref="item4"> </u-form-item>
<u--input v-model="info.tradeNames" disabledColor="#ffffff" placeholder="请选择行业类型" <view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">招工要求</view>
border="none"></u--input> <u-form-item label="招聘人数" prop="peopleNum" borderBottom labelWidth="80" ref="item3">
<u-icon slot="right" name="arrow-right"></u-icon> <u--input v-model="info.peopleNum" border="none" placeholder="请输入招聘人数"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="工种" prop="skillNames" labelWidth="80" borderBottom <u-form-item label="参考工资" prop="wage" labelWidth="80" borderBottom
@click="showSkills = true; hideKeyboard()" ref="item4"> @click="showWage = true; hideKeyboard()" ref="item4">
<u--input v-model="info.skillNames" disabledColor="#ffffff" placeholder="请选择工种" <u--input v-model="info.wage" disabledColor="#ffffff" placeholder="请选择参考工资"
border="none"></u--input> border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="行业类型" prop="tradeNames" labelWidth="80" borderBottom
@click="showTrade = true; hideKeyboard()" ref="item4">
<u--input v-model="info.tradeNames" disabledColor="#ffffff" placeholder="请选择行业类型"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="工种" prop="skillNames" labelWidth="80" borderBottom
@click="showSkills = true; hideKeyboard()" ref="item4">
<u--input v-model="info.skillNames" disabledColor="#ffffff" placeholder="请选择工种"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="招工描述" prop="jobDescription" borderBottom labelWidth="80" ref="item1"> <u-form-item label="招工描述" prop="jobDescription" borderBottom labelWidth="80" ref="item1">
<!-- <u--textarea v-model="info.jobDescription" placeholder="请输入招工要求"></u--textarea> --> <!-- <u--textarea v-model="info.jobDescription" placeholder="请输入招工要求"></u--textarea> -->
@@ -72,18 +72,18 @@
border="none"></u--input> border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
</u--form> </u--form>
<u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button> <u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button>
<u-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></u-button> <u-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></u-button>
<u-picker :show="showWage" ref="wagePicker" :columns="wageColumns" @confirm="wageConfirm" <u-picker :show="showWage" ref="wagePicker" :columns="wageColumns" @confirm="wageConfirm"
@cancel="wageClose" @close="wageClose"> @cancel="wageClose" @close="wageClose">
</u-picker> </u-picker>
<u-picker :show="showTrade" ref="tradePicker" keyName="name" :columns="tradeColumns" @confirm="tradeConfirm" <u-picker :show="showTrade" ref="tradePicker" keyName="name" :columns="tradeColumns" @confirm="tradeConfirm"
@cancel="tradeClose" @close="tradeClose"> @cancel="tradeClose" @close="tradeClose">
</u-picker> </u-picker>
<u-picker :show="showSkills" ref="skillPicker" keyName="name" :columns="skillColumns" <u-picker :show="showSkills" ref="skillPicker" keyName="name" :columns="skillColumns"
@confirm="skillConfirm" @cancel="skillClose" @close="skillClose"> @confirm="skillConfirm" @cancel="skillClose" @close="skillClose">
</u-picker> </u-picker>
<!-- <u-picker :show="showNature" ref="naturePicker" :columns="natureColumns" <!-- <u-picker :show="showNature" ref="naturePicker" :columns="natureColumns"
@confirm="natureConfirm" @cancel="natureClose" @close="natureClose"> @confirm="natureConfirm" @cancel="natureClose" @close="natureClose">
@@ -96,20 +96,20 @@
</u-picker> </u-picker>
<u-picker :show="showExpe" ref="expePicker" keyName="label" :columns="expeColumns" <u-picker :show="showExpe" ref="expePicker" keyName="label" :columns="expeColumns"
@confirm="expeConfirm" @cancel="expeClose" @close="expeClose"> @confirm="expeConfirm" @cancel="expeClose" @close="expeClose">
</u-picker> </u-picker>
<u-datetime-picker :show="showStime" :value="birthday" mode="date" closeOnClickOverlay <u-datetime-picker :show="showStime" :value="birthday" mode="date" closeOnClickOverlay
@confirm="stimeConfirm" @cancel="stimeClose" @close="stimeClose"></u-datetime-picker> @confirm="stimeConfirm" @cancel="stimeClose" @close="stimeClose"></u-datetime-picker>
<u-datetime-picker :show="showEtime" :value="birthday" mode="date" closeOnClickOverlay <u-datetime-picker :show="showEtime" :value="birthday" mode="date" closeOnClickOverlay
@confirm="etimeConfirm" @cancel="etimeClose" @close="etimeClose"></u-datetime-picker> @confirm="etimeConfirm" @cancel="etimeClose" @close="etimeClose"></u-datetime-picker>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import dic from '@/common/dic.js' import dic from '@/common/dic.js'
import { submitInfo } from '@/api/userrecruit.js' import { submitInfo } from '@/api/userrecruit.js'
export default { export default {
data() { data() {
return { return {
latitude: 31.05, //中心点 latitude: 31.05, //中心点
longitude: 104.20, longitude: 104.20,
@@ -120,141 +120,141 @@
// width:30, // width:30,
// height:30, // height:30,
iconPath: '../../../static/img/location.png' iconPath: '../../../static/img/location.png'
}], }],
value2: '招工内容', value2: '招工内容',
fileList1: [], fileList1: [],
disabled1: false, disabled1: false,
tips: '', tips: '',
value: '', value: '',
showCalendar: false, showCalendar: false,
showStime: false, showStime: false,
showEtime: false, showEtime: false,
info: { info: {
jobName: '', // 招工名称 jobName: '', // 招工名称
stime: '', // 发布时间 stime: '', // 发布时间
etime: '', // 结束时间 etime: '', // 结束时间
peopleNum: '', // 招聘人数 peopleNum: '', // 招聘人数
wage: '', // 参考工资 wage: '', // 参考工资
tradeId: '', // 行业类型id tradeId: '', // 行业类型id
tradeNames: '', // 行业类型名称 tradeNames: '', // 行业类型名称
worktypeIds: '', // 工种一级id worktypeIds: '', // 工种一级id
skillIds: '', // 工种二级id skillIds: '', // 工种二级id
worktypeNames: '', // 工种名称 worktypeNames: '', // 工种名称
skillNames: '', // 工种二级名称 skillNames: '', // 工种二级名称
jobDescription: '', // 任务描述 jobDescription: '', // 任务描述
// userNature: '', // 人员属性 // userNature: '', // 人员属性
ageDesc: '', // 年龄要求 ageDesc: '', // 年龄要求
education: '', // 学历要求 education: '', // 学历要求
educationLabel: '', // 学历要求前端显示 educationLabel: '', // 学历要求前端显示
experienceDesc: '', // 经验要求 experienceDesc: '', // 经验要求
// userInfo: { // userInfo: {
// name: '楼兰', // name: '楼兰',
// sex: '', // sex: '',
// birthday: '' // birthday: ''
// }, // },
// radiovalue1: '苹果', // radiovalue1: '苹果',
// checkboxValue1: [], // checkboxValue1: [],
// intro: '', // intro: '',
// code: '' // code: ''
}, },
showWage: false, // 参考工资选项是否展示 showWage: false, // 参考工资选项是否展示
showTrade: false, // 行业类型是否显示 showTrade: false, // 行业类型是否显示
showSkills: false, // 工种类型是否显示 showSkills: false, // 工种类型是否显示
showNature: false, // 人员属性 showNature: false, // 人员属性
showAge: false, // 年龄要求 showAge: false, // 年龄要求
showEdu: false, // 学历要求 showEdu: false, // 学历要求
showExpe: false, // 经验要求 showExpe: false, // 经验要求
birthday: Number(new Date()), birthday: Number(new Date()),
wageColumns: dic.taskSalary, wageColumns: dic.taskSalary,
tradeColumns: dic.tradeArr, tradeColumns: dic.tradeArr,
skillColumns: [], skillColumns: [],
natureColumns: dic.natureArr, natureColumns: dic.natureArr,
ageColumns: dic.ageArr, ageColumns: dic.ageArr,
eduColumns: dic.eduArr, eduColumns: dic.eduArr,
expeColumns: dic.expeArr, expeColumns: dic.expeArr,
rules: { rules: {
'userInfo.name': [{ 'userInfo.name': [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写姓名', message: '请填写姓名',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, { }, {
// 此为同步验证可以直接返回true或者false如果是异步验证稍微不同见下方说明 // 此为同步验证可以直接返回true或者false如果是异步验证稍微不同见下方说明
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
// 调用uView自带的js验证规则详见https://www.uviewui.com/js/test.html // 调用uView自带的js验证规则详见https://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value); return uni.$u.test.chinese(value);
}, },
message: "姓名必须为中文", message: "姓名必须为中文",
// 触发器可以同时用blur和change二者之间用英文逗号隔开 // 触发器可以同时用blur和change二者之间用英文逗号隔开
trigger: ["change", "blur"], trigger: ["change", "blur"],
}], }],
code: { code: {
type: 'string', type: 'string',
required: true, required: true,
len: 4, len: 4,
message: '请填写4位验证码', message: '请填写4位验证码',
trigger: ['blur'] trigger: ['blur']
}, },
'userInfo.sex': { 'userInfo.sex': {
type: 'string', type: 'string',
max: 1, max: 1,
required: true, required: true,
message: '请选择男或女', message: '请选择男或女',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
radiovalue1: { radiovalue1: {
type: 'string', type: 'string',
min: 1, min: 1,
max: 2, max: 2,
message: '橙子有毒', message: '橙子有毒',
trigger: ['change'] trigger: ['change']
}, },
checkboxValue1: { checkboxValue1: {
type: 'array', type: 'array',
min: 2, min: 2,
required: true, required: true,
message: '不能太宅,至少选两项', message: '不能太宅,至少选两项',
trigger: ['change'] trigger: ['change']
}, },
intro: { intro: {
type: 'string', type: 'string',
min: 3, min: 3,
required: true, required: true,
message: '不低于3个字', message: '不低于3个字',
trigger: ['change'] trigger: ['change']
}, },
hotel: { hotel: {
type: 'string', type: 'string',
min: 2, min: 2,
required: true, required: true,
message: '请选择住店时间', message: '请选择住店时间',
trigger: ['change'] trigger: ['change']
}, },
'userInfo.birthday': { 'userInfo.birthday': {
type: 'string', type: 'string',
required: true, required: true,
message: '请选择生日', message: '请选择生日',
trigger: ['change'] trigger: ['change']
}, },
}, },
} }
}, },
methods: { methods: {
wageConfirm(e) { wageConfirm(e) {
const { const {
value value
} = e } = e
this.info.wage = value[0] this.info.wage = value[0]
this.showWage = false this.showWage = false
}, },
tradeConfirm(e) { tradeConfirm(e) {
const { value } = e const { value } = e
this.info.tradeId = value[0].id this.info.tradeId = value[0].id
this.info.tradeNames = value[0].name this.info.tradeNames = value[0].name
this.showTrade = false this.showTrade = false
}, },
skillConfirm() { skillConfirm() {
this.showSkills = false this.showSkills = false
}, },
// natureConfirm(e) { // natureConfirm(e) {
// const { value } = e // const { value } = e
@@ -288,86 +288,86 @@
}, },
// natureClose() { // natureClose() {
// this.showNature = false // this.showNature = false
// }, // },
skillClose() { skillClose() {
this.showSkills = false this.showSkills = false
}, },
wageClose(e) { wageClose(e) {
this.showWage = false this.showWage = false
}, },
tradeClose(e) { tradeClose(e) {
this.showTrade = false this.showTrade = false
}, },
sexSelect(e) { sexSelect(e) {
this.info.userInfo.sex = e.name this.info.userInfo.sex = e.name
this.$refs.form1.validateField('userInfo.sex') this.$refs.form1.validateField('userInfo.sex')
}, },
change(e) { change(e) {
// console.log(e); // console.log(e);
}, },
formatter(day) { formatter(day) {
const d = new Date() const d = new Date()
let month = d.getMonth() + 1 let month = d.getMonth() + 1
const date = d.getDate() const date = d.getDate()
if (day.month == month && day.day == date + 3) { if (day.month == month && day.day == date + 3) {
day.bottomInfo = '有优惠' day.bottomInfo = '有优惠'
day.dot = true day.dot = true
} }
return day return day
}, },
calendarConfirm(e) { calendarConfirm(e) {
this.showCalendar = false this.showCalendar = false
this.info.hotel = `${e[0]} / ${e[e.length - 1]}` this.info.hotel = `${e[0]} / ${e[e.length - 1]}`
this.$refs.form1.validateField('hotel') this.$refs.form1.validateField('hotel')
}, },
codeChange(text) { codeChange(text) {
this.tips = text; this.tips = text;
}, },
getCode() { getCode() {
if (this.$refs.uCode.canGetCode) { if (this.$refs.uCode.canGetCode) {
// 模拟向后端请求验证码 // 模拟向后端请求验证码
uni.showLoading({ uni.showLoading({
title: '正在获取验证码' title: '正在获取验证码'
}) })
setTimeout(() => { setTimeout(() => {
uni.hideLoading(); uni.hideLoading();
// 这里此提示会被this.start()方法中的提示覆盖 // 这里此提示会被this.start()方法中的提示覆盖
uni.$u.toast('验证码已发送'); uni.$u.toast('验证码已发送');
// 通知验证码组件内部开始倒计时 // 通知验证码组件内部开始倒计时
this.$refs.uCode.start(); this.$refs.uCode.start();
}, 2000); }, 2000);
} else { } else {
uni.$u.toast('倒计时结束后再发送'); uni.$u.toast('倒计时结束后再发送');
} }
}, },
calendarClose() { calendarClose() {
this.showCalendar = false this.showCalendar = false
this.$refs.form1.validateField('hotel') this.$refs.form1.validateField('hotel')
}, },
stimeClose() { stimeClose() {
this.showStime = false this.showStime = false
this.$refs.form1.validateField('userInfo.birthday') this.$refs.form1.validateField('userInfo.birthday')
}, },
stimeConfirm(e) { stimeConfirm(e) {
this.showStime = false this.showStime = false
this.info.stime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') + ' 00:00:00' this.info.stime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') + ' 00:00:00'
this.$refs.form1.validateField('userInfo.birthday') this.$refs.form1.validateField('userInfo.birthday')
}, },
etimeClose() { etimeClose() {
this.showEtime = false this.showEtime = false
this.$refs.form1.validateField('userInfo.birthday') this.$refs.form1.validateField('userInfo.birthday')
}, },
etimeConfirm(e) { etimeConfirm(e) {
this.showEtime = false this.showEtime = false
this.info.etime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') + ' 23:59:59' this.info.etime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') + ' 23:59:59'
this.$refs.form1.validateField('userInfo.birthday') this.$refs.form1.validateField('userInfo.birthday')
}, },
submit() { submit() {
// 如果有错误会在catch中返回报错信息数组校验通过则在then中返回true // 如果有错误会在catch中返回报错信息数组校验通过则在then中返回true
// this.$refs.form1.validate().then(res => { // this.$refs.form1.validate().then(res => {
// uni.$u.toast('校验通过') // uni.$u.toast('校验通过')
// }).catch(errors => { // }).catch(errors => {
// uni.$u.toast('校验失败') // uni.$u.toast('校验失败')
// }) // })
this.info.jobType = 2 this.info.jobType = 2
// console.log(this.info) // console.log(this.info)
@@ -377,15 +377,15 @@
that.reset() that.reset()
uni.$u.toast('发布成功') uni.$u.toast('发布成功')
} }
}) })
}, },
reset() { reset() {
const validateList = [ const validateList = [
'jobName', 'jobName',
'stime', 'stime',
'etime', 'etime',
'peopleNum', 'peopleNum',
'wage', 'wage',
'tradeId', 'tradeId',
'tradeNames', 'tradeNames',
'worktypeIds', 'worktypeIds',
@@ -396,26 +396,26 @@
'ageDesc', 'ageDesc',
'education', 'education',
'educationLabel', 'educationLabel',
'experienceDesc' 'experienceDesc'
] ]
this.$refs.form1.resetFields() this.$refs.form1.resetFields()
this.$refs.form1.clearValidate() this.$refs.form1.clearValidate()
setTimeout(() => { setTimeout(() => {
this.$refs.form1.clearValidate(validateList) this.$refs.form1.clearValidate(validateList)
// 或者使用 this.$refs.form1.clearValidate() // 或者使用 this.$refs.form1.clearValidate()
}, 10) }, 10)
}, },
hideKeyboard() { hideKeyboard() {
uni.hideKeyboard() uni.hideKeyboard()
} }
} }
} }
</script> </script>
<style> <style>
.map { .map {
width: 100%; width: 100%;
height: 350rpx; height: 350rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
</style> </style>

View File

@@ -82,7 +82,7 @@
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue' import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
import Task from './task.vue' // 发布任务 import Task from './task.vue' // 发布任务
import Work from './work.vue' // 发布岗位 import Work from './work.vue' // 发布岗位
import Person from './person.vue' // 个招工 import Person from './person.vue' // 个招工
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
components: {CustomTabbar, CustomNavbar, Task, Work, Person}, components: {CustomTabbar, CustomNavbar, Task, Work, Person},
@@ -91,7 +91,7 @@
value2: '招工内容', value2: '招工内容',
pageType: null, // null 个人 enterprise 企业 pageType: null, // null 个人 enterprise 企业
fileList1: [], fileList1: [],
nonReactiveArray: ["发布任务", "发布岗位", "个招工"], nonReactiveArray: ["发布任务", "发布岗位", "个招工"],
activeTab: 0, activeTab: 0,
} }
}, },

View File

@@ -61,7 +61,7 @@ const user = {
sendTimes:getStore({//用户发送短信次数 sendTimes:getStore({//用户发送短信次数
name:'setUserSendTimes' name:'setUserSendTimes'
}) || 0, }) || 0,
seeEnterprise: 0, // 0 个招工 企业招工 seeEnterprise: 0, // 0 个招工 企业招工
}, },
actions: { actions: {
//用户点击radio按钮 //用户点击radio按钮
@@ -180,7 +180,7 @@ const user = {
}, },
}, },
mutations: { mutations: {
setEnterprise(state, val) { // 0 个招工 企业招工 setEnterprise(state, val) { // 0 个招工 企业招工
state.seeEnterprise = val; state.seeEnterprise = val;
}, },
SET_TOKEN: (state, token) => { SET_TOKEN: (state, token) => {