flat: 添加工作地址、添加审核回填等

This commit is contained in:
Apcallover
2024-04-19 15:02:55 +08:00
parent dced4cf379
commit 4b8b50a923
10 changed files with 315 additions and 86 deletions

View File

@@ -15,6 +15,7 @@
export default { export default {
onLaunch: function(options) { onLaunch: function(options) {
this.$store.dispatch('InitArea')
if (options.query.token) { if (options.query.token) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/blank?token=' + options.query.token url: '/pages/login/blank?token=' + options.query.token

View File

@@ -101,6 +101,14 @@ export const addInviteCompanyAuth = (params) => {
}) })
} }
export const getInviteCompanyAuthInfo = (params) => {
return request({
url: '/api/jobslink-api/tenant/company/app/inviteCompany/authInfo',
method: 'get',
data: params
})
}
export const getDictionary = (params) => { export const getDictionary = (params) => {
return request({ return request({
url: '/api/jobslink-api/system/dict-biz/dictionary', url: '/api/jobslink-api/system/dict-biz/dictionary',

View File

@@ -43,7 +43,7 @@
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image src="../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" <image src="../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"
mode=""></image> mode=""></image>
<view style="font-size: 26rpx;color:#333;">{{ companyitem.jobAddress }}</view> <view style="font-size: 26rpx;color:#333;">{{ companyitem.jobCompanyName }}</view>
</view> </view>
<!-- <view v-if="near"> <!-- <view v-if="near">
{{ companyitem.distanceStr }}km {{ companyitem.distanceStr }}km

View File

@@ -77,7 +77,7 @@
break break
case 9: case 9:
this.navTo( this.navTo(
'/pages/recruit/subPage/enterpriceCertification/enterpriceCertification' '/pages/recruit/subPage/enterpriceCertification/enterpriceCertification?reviewStatus=9'
) )
this.$api.sleep(1000).then(() => { this.$api.sleep(1000).then(() => {
this.$api.msg('您的企业信息已被系统驳回,请重新上传') this.$api.msg('您的企业信息已被系统驳回,请重新上传')

View File

@@ -86,7 +86,8 @@
import dic from '@/common/dic.js' import dic from '@/common/dic.js'
import PickerList from './pickerList.vue'; import PickerList from './pickerList.vue';
import { import {
addInviteCompanyAuth addInviteCompanyAuth,
getInviteCompanyAuthInfo
} from '@/api/userrecruit.js' } from '@/api/userrecruit.js'
import { import {
mapState mapState
@@ -195,6 +196,11 @@
rules rules
}; };
}, },
onLoad(options) {
if (options.reviewStatus === '9') {
this.getInfo()
}
},
computed: { computed: {
...mapState({ ...mapState({
authInfo: (state) => state.auth.authInfo, authInfo: (state) => state.auth.authInfo,
@@ -238,6 +244,20 @@
_this.$api.msg('请完善内容') _this.$api.msg('请完善内容')
}) })
}, },
async getInfo() {
let params = {
idNumber: this.authInfo.idNumber
}
let resData = await getInviteCompanyAuthInfo(params)
if (resData.data.code === 200) {
this.formData = {
...resData.data.data,
nature: String(resData.data.data.nature),
cityId: String(resData.data.data.cityId),
tradeId: String(resData.data.data.tradeId),
}
}
},
reset() { reset() {
const _this = this const _this = this
uni.showModal({ uni.showModal({

View File

@@ -0,0 +1,141 @@
<template>
<view style="width: 100%">
<u--input :value="formatValue(value)" disabledColor="#ffffff" :placeholder="placeholder"
border="border"></u--input>
<u-picker ref="uPicker" :show="visibel" :keyName="labelName" :columns="VarColumns" @confirm="skillConfirm"
@cancel="skillClose" @close="skillClose" @change="changeHandler"></u-picker>
</view>
</template>
<script>
import {
isArray
} from 'lodash'
export default {
data() {
return {
valued: '',
VarColumnsIndex: [],
VarColumns: [],
}
},
props: {
border: {
type: String,
default: 'none'
},
valueName: {
type: String,
default: 'value'
},
labelName: {
type: String,
default: 'label'
},
placeholder: {
type: String,
default: '请选择'
},
visibel: {
type: Boolean,
default: false,
},
tree: {
type: Array,
require: true
},
deep: {
type: Number,
require: 1
},
value: {
type: String,
require: ''
},
cancel: {
type: Function
},
returnValue: {
type: String,
default: 'value',
},
joinSymbel: {
type: String,
default: '-',
}
},
created() {
this.VarColumnsIndex = new Array(3).fill(this.deep)
const arr = []
this.changeHandler({
columnIndex: 0,
index: 0
})
},
methods: {
skillClose() {
this.$emit("cancel");
},
skillConfirm({
index,
value,
values
}) {
if (this.returnValue === 'label') {
this.$emit("input", value.map(item => item[this.labelName]).join(this.joinSymbel));
} else {
this.$emit("input", value);
}
this.$emit("cancel");
},
changeHandler(e) {
const {
columnIndex,
value,
values, // values为当前变化列的数组内容
index,
} = e
// 微信小程序无法将picker实例传出来只能通过ref操作
const picker = this.$refs.uPicker
const columnlist = []
const arr = JSON.parse(JSON.stringify(this.VarColumnsIndex)).map((vItem, vIndex) => {
switch (true) {
case vIndex < columnIndex:
return vItem
case vIndex === columnIndex:
return index
default:
return 0
}
})
for (let i = 0; i <= arr.length - 1; i++) {
if (i) {
if (picker) {
picker.setColumnValues(i, columnlist[columnlist.length - 1][arr[i - 1]].children)
}
columnlist.push(columnlist[columnlist.length - 1][arr[i - 1]].children)
} else {
columnlist.push(this.tree)
}
}
this.VarColumnsIndex = arr
this.VarColumns = columnlist
},
formatValue(val) {
if (Array.isArray(val)) {
if (typeof val[0] === 'object') {
return val.map(item => item[this.labelName]).join(this.joinSymbel)
} else {
return val.join(this.joinSymbel)
}
} else {
return val
}
},
},
}
</script>
<style>
</style>

View File

@@ -116,6 +116,13 @@
<u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1"> <u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input> <u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="工作地址" labelWidth="70" prop="jobAddress" borderBottom ref="item1"
@click="showjobAddress = true; hideKeyboard()">
<PickerTree placeholder="请选择行业" :tree="area.data" valueName="value" :visibel="showjobAddress"
v-model="info.jobAddress" @cancel="showjobAddress = false" border="none" returnValue="label"
:deep="3">
</PickerTree>
</u-form-item>
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1"> <u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input> <u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
</u-form-item> </u-form-item>
@@ -160,6 +167,10 @@
findTradeList, findTradeList,
getDictionary getDictionary
} from '@/api/userrecruit.js' } from '@/api/userrecruit.js'
import PickerTree from './enterpriceCertification/pickerTree.vue'
import {
mapGetters
} from 'vuex'
export default { export default {
data() { data() {
return { return {
@@ -180,6 +191,7 @@
value: '', value: '',
showCalendar: false, showCalendar: false,
showStime: false, showStime: false,
showjobAddress: false,
showEtime: false, showEtime: false,
info: { info: {
jobName: '', // 招工名称 jobName: '', // 招工名称
@@ -201,6 +213,7 @@
ageDesc: dic.ageArr[0][0].label, // 年龄要求 ageDesc: dic.ageArr[0][0].label, // 年龄要求
education: dic.eduArr[0][0].value, // 学历要求 education: dic.eduArr[0][0].value, // 学历要求
experienceDesc: dic.expeArr[0][0].label, // 经验要求 experienceDesc: dic.expeArr[0][0].label, // 经验要求
jobAddress: '',
jobCompanyName: '', // 企业名称 jobCompanyName: '', // 企业名称
jobCompanyScale: '', // 企业信用代码 jobCompanyScale: '', // 企业信用代码
jobCompanyIndustry: '', // 所属行业 jobCompanyIndustry: '', // 所属行业
@@ -305,6 +318,12 @@
message: '请选择经验要求', message: '请选择经验要求',
trigger: ['change'] trigger: ['change']
}, },
jobAddress: {
type: 'string',
required: true,
message: '请选择工作地址',
trigger: ['change']
},
jobCompanyName: { jobCompanyName: {
type: 'string', type: 'string',
required: true, required: true,
@@ -356,11 +375,17 @@
}, },
} }
}, },
components: {
PickerTree
},
props: { props: {
company: { company: {
default: null, default: null,
} }
}, },
computed: {
...mapGetters(['area'])
},
created() { created() {
const { const {
id: staId, id: staId,
@@ -373,6 +398,7 @@
} }
this.getWorkTypes() this.getWorkTypes()
this.dictionary() this.dictionary()
console.log(this.area)
}, },
watch: { watch: {
company(val) { company(val) {
@@ -632,6 +658,7 @@
'education', 'education',
'educationLabel', 'educationLabel',
'experienceDesc', 'experienceDesc',
'jobAddress',
'jobCompanyName', 'jobCompanyName',
'jobCompanyScale', 'jobCompanyScale',
'jobCompanyIndustry', 'jobCompanyIndustry',

View File

@@ -120,12 +120,13 @@
<u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1"> <u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input> <u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input>
</u-form-item> </u-form-item>
<!-- <u-form-item label="工作地址" labelWidth="80" prop="jobAddress" borderBottom ref="item1" <u-form-item label="工作地址" labelWidth="70" prop="jobAddress" borderBottom ref="item1"
@click="showjobAddress = true; hideKeyboard()"> @click="showjobAddress = true; hideKeyboard()">
<PickerList placeholder="请选择行业" :columns="dic.tradeArr" labelName="name" valueName="id" <PickerTree placeholder="请选择行业" :tree="area.data" valueName="value" :visibel="showjobAddress"
:visibel="showjobAddress" v-model="info.jobAddress" @cancel="showjobAddress = false"> v-model="info.jobAddress" @cancel="showjobAddress = false" border="none" returnValue="label"
</PickerList> :deep="3">
</u-form-item> --> </PickerTree>
</u-form-item>
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1"> <u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input> <u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
</u-form-item> </u-form-item>
@@ -164,14 +165,13 @@
<script> <script>
import dic from '@/common/dic.js' import dic from '@/common/dic.js'
// import area from '@/untils/area.js'
import { import {
submitInfo, submitInfo,
getWorktypesBaseList, getWorktypesBaseList,
findTradeList, findTradeList,
getDictionary getDictionary
} from '@/api/userrecruit.js' } from '@/api/userrecruit.js'
import PickerList from './enterpriceCertification/pickerList.vue' import PickerTree from './enterpriceCertification/pickerTree.vue'
import { import {
mapGetters mapGetters
} from 'vuex' } from 'vuex'
@@ -217,6 +217,7 @@
ageDesc: dic.ageArr[0][0].label, // 年龄要求 ageDesc: dic.ageArr[0][0].label, // 年龄要求
education: dic.eduArr[0][0].value, // 学历要求 education: dic.eduArr[0][0].value, // 学历要求
experienceDesc: dic.expeArr[0][0].label, // 经验要求 experienceDesc: dic.expeArr[0][0].label, // 经验要求
jobAddress: '',
jobCompanyName: '', // 企业名称 jobCompanyName: '', // 企业名称
jobCompanyScale: '', // 企业信用代码 jobCompanyScale: '', // 企业信用代码
jobCompanyIndustry: '', // 所属行业 jobCompanyIndustry: '', // 所属行业
@@ -321,6 +322,12 @@
message: '请选择经验要求', message: '请选择经验要求',
trigger: ['change'] trigger: ['change']
}, },
jobAddress: {
type: 'string',
required: true,
message: '请选择工作地址',
trigger: ['change']
},
jobCompanyName: { jobCompanyName: {
type: 'string', type: 'string',
required: true, required: true,
@@ -378,7 +385,10 @@
} }
}, },
components: { components: {
PickerList PickerTree
},
computed: {
...mapGetters(['area'])
}, },
created() { created() {
const { const {
@@ -387,7 +397,7 @@
} = dic.wageUnitCategoryState[0].filter(item => item.id == 3)[0] } = dic.wageUnitCategoryState[0].filter(item => item.id == 3)[0]
this.info.wageUnitCategory = staId this.info.wageUnitCategory = staId
this.info.wageUnitCategoryName = staLabel this.info.wageUnitCategoryName = staLabel
// console.log(area) console.log(this.area)
this.getWorkTypes() this.getWorkTypes()
this.dictionary() this.dictionary()
if (this.company) { if (this.company) {
@@ -653,6 +663,7 @@
'education', 'education',
'educationLabel', 'educationLabel',
'experienceDesc', 'experienceDesc',
'jobAddress',
'jobCompanyName', 'jobCompanyName',
'jobCompanyScale', 'jobCompanyScale',
'jobCompanyIndustry', 'jobCompanyIndustry',

View File

@@ -22,6 +22,16 @@ function format(data) {
simpleSpelling: item.simpleSpelling, simpleSpelling: item.simpleSpelling,
parentId: item.parentId parentId: item.parentId
}; };
if (dic.hasOwnProperty(item.parentId)) {
if (!dic[item.parentId].children) {
dic[item.parentId].children = [];
}
dic[item.parentId].children.push(node);
} else {
dic[item.parentId] = {
children: [node]
};
}
if (children.hasOwnProperty(item.parentId)) { if (children.hasOwnProperty(item.parentId)) {
children[item.parentId].push(node); children[item.parentId].push(node);
} else { } else {
@@ -48,7 +58,18 @@ const area = {
state: { state: {
...data ...data
}, },
actions: {}, actions: {
InitArea({
commit
}) {
if (!loaded) {
loaded = true
import('@/untils/area.js').then((resp) => {
commit('SET_AREA', format(resp.default));
})
}
},
},
mutations: { mutations: {
SET_AREA: (state, data) => { SET_AREA: (state, data) => {
state.data = data.data state.data = data.data

View File

@@ -3,7 +3,7 @@ module.exports = {
port: 1887, port: 1887,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://192.168.1.106:8000', target: 'http://localhost:8000',
ws: true, ws: true,
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/'