|
@@ -19,14 +19,14 @@
|
|
<view style="color: #777; font-size: 12px;" class="ss-m-t-8 ss-m-l-10">发布的职位会在对应的招聘会显示</view>
|
|
<view style="color: #777; font-size: 12px;" class="ss-m-t-8 ss-m-l-10">发布的职位会在对应的招聘会显示</view>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
</template>
|
|
</template>
|
|
- <uni-forms-item label="到期时间" name="expireTime" required>
|
|
|
|
|
|
+ <!-- <uni-forms-item label="到期时间" name="expireTime" required>
|
|
<view class="d-flex">
|
|
<view class="d-flex">
|
|
<picker mode="date" :value="formData.expireTime" :disabled="expireTimeDisabled" :start="startDate" @change="expireTimeChange">
|
|
<picker mode="date" :value="formData.expireTime" :disabled="expireTimeDisabled" :start="startDate" @change="expireTimeChange">
|
|
<view class="uni-input ss-m-t-20" :style="{'opacity': expireTimeDisabled ? '0.5' : '1'}">{{ formData.expireTime }}</view>
|
|
<view class="uni-input ss-m-t-20" :style="{'opacity': expireTimeDisabled ? '0.5' : '1'}">{{ formData.expireTime }}</view>
|
|
</picker>
|
|
</picker>
|
|
<uni-data-checkbox selectedColor="#00B760" class="ss-m-l-50 ss-m-t-14" multiple v-model="soFar" :localdata="[{ text: '长期有效', value: 1 }]" @change="handleChangeSofar"></uni-data-checkbox>
|
|
<uni-data-checkbox selectedColor="#00B760" class="ss-m-l-50 ss-m-t-14" multiple v-model="soFar" :localdata="[{ text: '长期有效', value: 1 }]" @change="handleChangeSofar"></uni-data-checkbox>
|
|
</view>
|
|
</view>
|
|
- </uni-forms-item>
|
|
|
|
|
|
+ </uni-forms-item> -->
|
|
<uni-forms-item label="岗位职责" name="content" required>
|
|
<uni-forms-item label="岗位职责" name="content" required>
|
|
<RichEditor ref="contentRef" :richValue="formData.content" @blur="val => editorBlur('content', val)" :max="5000" />
|
|
<RichEditor ref="contentRef" :richValue="formData.content" @blur="val => editorBlur('content', val)" :max="5000" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
@@ -51,9 +51,9 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { ref, unref } from 'vue'
|
|
import { ref, unref } from 'vue'
|
|
import { dictObj } from '@/utils/position.js'
|
|
import { dictObj } from '@/utils/position.js'
|
|
-import { getNextDate } from '@/utils/date'
|
|
|
|
|
|
+// import { getNextDate } from '@/utils/date'
|
|
import { getRecruitPositionDetails } from '@/api/new/position'
|
|
import { getRecruitPositionDetails } from '@/api/new/position'
|
|
-import { dateToTimestamp } from '@/utils/date.js'
|
|
|
|
|
|
+// import { dateToTimestamp } from '@/utils/date.js'
|
|
import { getJobFairWhiteList } from '@/api/jobFair'
|
|
import { getJobFairWhiteList } from '@/api/jobFair'
|
|
import RichEditor from '@/components/RichEditor'
|
|
import RichEditor from '@/components/RichEditor'
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -71,21 +71,21 @@ const formData = ref({
|
|
bizId: props.data?.bizId || '',
|
|
bizId: props.data?.bizId || '',
|
|
positionId: props.data?.positionId || '',
|
|
positionId: props.data?.positionId || '',
|
|
name: props.data?.name || '', // + '测试' + new Date().getTime().toString()
|
|
name: props.data?.name || '', // + '测试' + new Date().getTime().toString()
|
|
- expireTime: props.data?.expireTime || getNextDate(15, 'YYYY-MM-DD', 'day'),
|
|
|
|
|
|
+ // expireTime: props.data?.expireTime || getNextDate(15, 'YYYY-MM-DD', 'day'),
|
|
content: props.data?.content || '',
|
|
content: props.data?.content || '',
|
|
requirement: props.data?.requirement || ''
|
|
requirement: props.data?.requirement || ''
|
|
})
|
|
})
|
|
|
|
|
|
-const startDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) // 不可选时间
|
|
|
|
-const expireTimeDisabled = ref(props.data?.expireTime === null ? true : false)
|
|
|
|
|
|
+// const startDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) // 不可选时间
|
|
|
|
+// const expireTimeDisabled = ref(props.data?.expireTime === null ? true : false)
|
|
// 至今
|
|
// 至今
|
|
-const handleChangeSofar = (e) => {
|
|
|
|
- const value = e.detail.value.length ? e.detail.value[0] : ''
|
|
|
|
- expireTimeDisabled.value = value ? true : false
|
|
|
|
-}
|
|
|
|
-const expireTimeChange = (e) => {
|
|
|
|
- formData.value.expireTime = e?.detail?.value
|
|
|
|
-}
|
|
|
|
|
|
+// const handleChangeSofar = (e) => {
|
|
|
|
+// const value = e.detail.value.length ? e.detail.value[0] : ''
|
|
|
|
+// expireTimeDisabled.value = value ? true : false
|
|
|
|
+// }
|
|
|
|
+// const expireTimeChange = (e) => {
|
|
|
|
+// formData.value.expireTime = e?.detail?.value
|
|
|
|
+// }
|
|
|
|
|
|
const rules = {
|
|
const rules = {
|
|
positionId:{
|
|
positionId:{
|
|
@@ -97,9 +97,9 @@ const rules = {
|
|
name:{
|
|
name:{
|
|
rules: [{required: true, errorMessage: '请填写职位名称' }]
|
|
rules: [{required: true, errorMessage: '请填写职位名称' }]
|
|
},
|
|
},
|
|
- expireTime:{
|
|
|
|
- rules: [{required: true, errorMessage: '请选择职位到期时间' }]
|
|
|
|
- },
|
|
|
|
|
|
+ // expireTime:{
|
|
|
|
+ // rules: [{required: true, errorMessage: '请选择职位到期时间' }]
|
|
|
|
+ // },
|
|
content:{
|
|
content:{
|
|
rules: [{required: true, errorMessage: '请填写岗位职责' }]
|
|
rules: [{required: true, errorMessage: '请填写岗位职责' }]
|
|
},
|
|
},
|
|
@@ -173,20 +173,20 @@ const useJobTemplate = async () => {
|
|
const form = ref()
|
|
const form = ref()
|
|
const contentRef = ref()
|
|
const contentRef = ref()
|
|
const requirementRef = ref()
|
|
const requirementRef = ref()
|
|
-const soFar = ref(props.data?.expireTime === null ? [1] : [])
|
|
|
|
|
|
+// const soFar = ref(props.data?.expireTime === null ? [1] : [])
|
|
const getQuery = async () => {
|
|
const getQuery = async () => {
|
|
const valid = await unref(form).validate()
|
|
const valid = await unref(form).validate()
|
|
if (!valid) return
|
|
if (!valid) return
|
|
|
|
|
|
const obj = {
|
|
const obj = {
|
|
hirePrice: 0,
|
|
hirePrice: 0,
|
|
- soFar: Boolean(soFar.value?.length),
|
|
|
|
|
|
+ // soFar: Boolean(soFar.value?.length),
|
|
hire: false,
|
|
hire: false,
|
|
...formData.value
|
|
...formData.value
|
|
}
|
|
}
|
|
|
|
|
|
obj.source = obj.bizId ? '2' : '0' // 职位来源(0职位管理|1众聘职位|2招聘会)
|
|
obj.source = obj.bizId ? '2' : '0' // 职位来源(0职位管理|1众聘职位|2招聘会)
|
|
- obj.expireTime = obj.soFar ? null : dateToTimestamp(obj.expireTime)
|
|
|
|
|
|
+ // obj.expireTime = obj.soFar ? null : dateToTimestamp(obj.expireTime)
|
|
obj && Object.keys(obj).length && Object.keys(obj).forEach(key => { if (['areaId', 'eduType', 'expType'].includes(key) && obj[key] === -1) obj[key] = null })
|
|
obj && Object.keys(obj).length && Object.keys(obj).forEach(key => { if (['areaId', 'eduType', 'expType'].includes(key) && obj[key] === -1) obj[key] = null })
|
|
|
|
|
|
return obj
|
|
return obj
|