This commit is contained in:
dengxin
2024-03-29 11:59:19 +08:00
parent 56998e84c2
commit c58d21a0d6
2 changed files with 454 additions and 416 deletions

View File

@@ -84,3 +84,10 @@ export const getUserCompanyInfo = (params) => {
params params
}) })
} }
export const findTradeList = () => {
return request({
url: '/api/jobslink-api/tenant/trade/base/find',
method: 'get',
// params
})
}

View File

@@ -48,7 +48,9 @@
<u-icon slot="right" name="arrow-right"></u-icon> --> <u-icon slot="right" name="arrow-right"></u-icon> -->
</u-form-item> </u-form-item>
<view> <view>
<u--textarea v-model="info.jobDescription" placeholder="参考示例:任务名称:保姆 工作内容: 一日三餐,卫生打扫 工资: 200元/天 年龄要求: 25-40岁 工作经验要求: 有过住家保姆经验, 会做饭,受过高等教育的优先" count height="100" maxlength="200"></u--textarea> <u--textarea v-model="info.jobDescription"
placeholder="参考示例:任务名称:保姆 工作内容: 一日三餐,卫生打扫 工资: 200元/天 年龄要求: 25-40岁 工作经验要求: 有过住家保姆经验, 会做饭,受过高等教育的优先"
count height="100" maxlength="200"></u--textarea>
</view> </view>
<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="userNature" labelWidth="80" borderBottom <!-- <u-form-item label="人员属性" prop="userNature" labelWidth="80" borderBottom
@@ -93,7 +95,8 @@
<u-icon slot="right" name="arrow-right"></u-icon> --> <u-icon slot="right" name="arrow-right"></u-icon> -->
</u-form-item> </u-form-item>
<view> <view>
<u--textarea v-model="info.jobCompanyDescription" placeholder="请输入企业介绍" count height="100" maxlength="200"></u--textarea> <u--textarea v-model="info.jobCompanyDescription" placeholder="请输入企业介绍" count height="100"
maxlength="200"></u--textarea>
</view> </view>
<u-form-item label="联系人" prop="callName" borderBottom labelWidth="80" ref="item1"> <u-form-item label="联系人" prop="callName" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.callName" border="none" placeholder="请输入联系人"></u--input> <u--input v-model="info.callName" border="none" placeholder="请输入联系人"></u--input>
@@ -123,14 +126,14 @@
<!-- <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">
</u-picker> --> </u-picker> -->
<u-picker :show="showAge" ref="agePicker" keyName="label" :columns="ageColumns" <u-picker :show="showAge" ref="agePicker" keyName="label" :columns="ageColumns" @confirm="ageConfirm"
@confirm="ageConfirm" @cancel="ageClose" @close="ageClose"> @cancel="ageClose" @close="ageClose">
</u-picker> </u-picker>
<u-picker :show="showEdu" ref="eduPicker" keyName="label" :columns="eduColumns" <u-picker :show="showEdu" ref="eduPicker" keyName="label" :columns="eduColumns" @confirm="eduConfirm"
@confirm="eduConfirm" @cancel="eduClose" @close="eduClose"> @cancel="eduClose" @close="eduClose">
</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"
@confirm="expeConfirm" @cancel="expeClose" @close="expeClose"> @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>
@@ -141,9 +144,9 @@
</template> </template>
<script> <script>
import dic from '@/common/dic.js' import dic from '@/common/dic.js'
import { submitInfo, getWorktypesBaseList } from '@/api/userrecruit.js' import { submitInfo, getWorktypesBaseList, findTradeList } from '@/api/userrecruit.js'
export default { export default {
data() { data() {
return { return {
latitude: 31.05, //中心点 latitude: 31.05, //中心点
@@ -289,26 +292,54 @@
} }
}, },
created() { created() {
if(this.company) { if (this.company) {
this.backfill(this.company) this.backfill(this.company)
} }
this.getWorkTypes() this.getWorkTypes()
}, },
watch: { watch: {
company(val) { company(val) {
if(!val) return; if (!val) return;
this.backfill(val) this.backfill(val)
} }
}, },
methods: { methods: {
backfill(info) { async backfill(info) {
const { manager, companyTid, comname, companyDesc, telphone } = info const companyEnum = [
{ value: 1, label: "机关/事业单位" },
{ value: 2, label: "国有企业" },
{ value: 3, label: "私营企业" },
{ value: 4, label: "外商及港澳台投资企业" },
{ value: 5, label: "股份制企业" },
{ value: 6, label: "学校/下级学院" },
{ value: 7, label: "医院" },
{ value: 8, label: "律师事务所" },
{ value: 9, label: "银行" },
{ value: 10, label: "非盈利社会组织" },
{ value: 11, label: "其它" },
]
console.log(info, '99999999999999999999');
const { manager, companyTid, comname, companyDesc, telphone, tradeId, nature } = info
this.info.jobCompanyScale = companyTid this.info.jobCompanyScale = companyTid
this.info.jobCompanyName = comname this.info.jobCompanyName = comname
this.info.callName = manager this.info.callName = manager
this.info.callTel = telphone this.info.callTel = telphone
this.info.jobCompanyDescription = companyDesc this.info.jobCompanyDescription = companyDesc
if (tradeId / 1 !== -1) {
const res = await findTradeList()
const tenantArray = res.data.data?.filter(item => item.id === tradeId)
console.log(res, tenantArray, '----------------');
this.info.jobCompanyIndustry = tenantArray[0].name
}
if (nature / 1 !== -1) {
const tenantArray = companyEnum?.filter(item => item.value === nature)
console.log(tenantArray, "00000000000000000000000");
this.info.jobCompanyNature = tenantArray[0].label
}
}, },
wageConfirm(e) { wageConfirm(e) {
const { const {
@@ -442,8 +473,8 @@
// }).catch(errors => { // }).catch(errors => {
// uni.$u.toast('校验失败') // uni.$u.toast('校验失败')
// }) // })
const names = this.getSkilDataNameWhereId( this.skillColumnsIndex, true) const names = this.getSkilDataNameWhereId(this.skillColumnsIndex, true)
const ids = this.getSkilDataNameWhereId( this.skillColumnsIndex, false) const ids = this.getSkilDataNameWhereId(this.skillColumnsIndex, false)
this.info.jobType = 0 this.info.jobType = 0
let params = { let params = {
...this.info, ...this.info,
@@ -454,7 +485,7 @@
} }
let that = this let that = this
submitInfo(params).then(res => { submitInfo(params).then(res => {
if(res.data.code == 200) { if (res.data.code == 200) {
that.reset() that.reset()
uni.$u.toast('发布成功') uni.$u.toast('发布成功')
} }
@@ -505,7 +536,7 @@
}, },
skillsChange(e) { skillsChange(e) {
const { columnIndex, index, picker = this.$refs.uPicker } = e const { columnIndex, index, picker = this.$refs.uPicker } = e
let [ index1, index2 ] = this.skillColumnsIndex let [index1, index2] = this.skillColumnsIndex
switch (columnIndex) { switch (columnIndex) {
case 0: case 0:
index1 = index; index1 = index;
@@ -520,19 +551,19 @@
this.skillColumnsIndex = Indexs this.skillColumnsIndex = Indexs
}, },
getSkilDataNameWhereId(Indexs, type = true) { getSkilDataNameWhereId(Indexs, type = true) {
if(!this.skillData) {return} if (!this.skillData) { return }
const [ index1, index2 ] = Indexs const [index1, index2] = Indexs
const work1 = this.skillData[index1] const work1 = this.skillData[index1]
const work2 = work1.child[index2] const work2 = work1.child[index2]
if(type) { if (type) {
return [work1.name, work2.name] return [work1.name, work2.name]
} else { } else {
return [work1.id, work2.id] return [work1.id, work2.id]
} }
}, },
async getWorkTypes() { async getWorkTypes() {
let resData = await getWorktypesBaseList({type: 1}) let resData = await getWorktypesBaseList({ type: 1 })
if(resData.data.code === 200) { if (resData.data.code === 200) {
const { data } = resData.data const { data } = resData.data
const arr = [] const arr = []
// 1、 空间换时间策略/user/userrecruit/saveApp // 1、 空间换时间策略/user/userrecruit/saveApp
@@ -545,7 +576,7 @@
} }
} }
} }
} }
</script> </script>
<style> <style>
@@ -553,5 +584,5 @@
width: 100%; width: 100%;
height: 350rpx; height: 350rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
</style> </style>