|
@@ -7,11 +7,7 @@
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
<h2 class="mt-n1 headline font-weight-regular">{{ t('common.other') }}</h2>
|
|
<h2 class="mt-n1 headline font-weight-regular">{{ t('common.other') }}</h2>
|
|
- <CtForm ref="formPageRef" class="mt-3" :items="items" style="width: 650px;">
|
|
|
|
- <template #frequency>
|
|
|
|
- <div class="pl-3">111</div>
|
|
|
|
- </template>
|
|
|
|
- </CtForm>
|
|
|
|
|
|
+ <CtForm ref="formPageRef" class="mt-3" :items="items" style="width: 650px;"></CtForm>
|
|
</div>
|
|
</div>
|
|
</v-timeline-item>
|
|
</v-timeline-item>
|
|
</template>
|
|
</template>
|
|
@@ -26,7 +22,11 @@ import CtForm from '@/components/CtForm'
|
|
import Add from '@/views/recruit/enterprise/positionManagement/components/add.vue'
|
|
import Add from '@/views/recruit/enterprise/positionManagement/components/add.vue'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { schoolMajorByName } from '@/api/recruit/personal/resume'
|
|
import { schoolMajorByName } from '@/api/recruit/personal/resume'
|
|
-import { saveJobAdvertisedExtend, joinJobFairPosition } from '@/api/recruit/enterprise/jobFair'
|
|
|
|
|
|
+import {
|
|
|
|
+ saveJobAdvertisedExtend,
|
|
|
|
+ joinJobFairPosition,
|
|
|
|
+ getJobAdvertisedExtend
|
|
|
|
+} from '@/api/recruit/enterprise/jobFair'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
|
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
@@ -92,6 +92,26 @@ const items = ref({
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+console.log(route)
|
|
|
|
+if (route.query.id) {
|
|
|
|
+ // 编辑
|
|
|
|
+ initPosition(route.query.id)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+async function initPosition (jobId) {
|
|
|
|
+ console.log(jobId)
|
|
|
|
+ const res = await getJobAdvertisedExtend(jobId)
|
|
|
|
+ console.log(res)
|
|
|
|
+ items.value.options.forEach(e => {
|
|
|
|
+ if (e.key.includes('frequency')) {
|
|
|
|
+ const keys = e.key.split('-')
|
|
|
|
+ e.value = res[keys[0]][keys[1]]
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ e.value = res[e.key]
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
async function getMajorList (name) {
|
|
async function getMajorList (name) {
|
|
if (!name) {
|
|
if (!name) {
|
|
return
|
|
return
|
|
@@ -115,17 +135,20 @@ const afterAdd = async (jobId) => {
|
|
r[keys[0]][keys[1]] = v.type === 'number' ? +v.value : v.value
|
|
r[keys[0]][keys[1]] = v.type === 'number' ? +v.value : v.value
|
|
return r
|
|
return r
|
|
}
|
|
}
|
|
|
|
+ if (v.key === 'majorId') {
|
|
|
|
+ r.major = v.items.find(e => e.id === v.value).nameCn
|
|
|
|
+ }
|
|
r[v.key] = v.type === 'number' ? +v.value : v.value
|
|
r[v.key] = v.type === 'number' ? +v.value : v.value
|
|
return r
|
|
return r
|
|
}, { jobId })
|
|
}, { jobId })
|
|
await saveJobAdvertisedExtend(query)
|
|
await saveJobAdvertisedExtend(query)
|
|
console.log('招聘会职位扩展信息保存成功')
|
|
console.log('招聘会职位扩展信息保存成功')
|
|
await joinJobFairPosition({
|
|
await joinJobFairPosition({
|
|
- jobFairId: route.params.jobFairId,
|
|
|
|
|
|
+ jobFairId: route.params.id,
|
|
jobId
|
|
jobId
|
|
})
|
|
})
|
|
Snackbar.success(t('common.publishSuccessMsg'))
|
|
Snackbar.success(t('common.publishSuccessMsg'))
|
|
- router.push(`/recruit/enterprise/jobFair/details/${route.params.jobFairId}`)
|
|
|
|
|
|
+ router.push(`/recruit/enterprise/jobFair/details/${route.params.id}`)
|
|
} catch (error) {
|
|
} catch (error) {
|
|
Snackbar.error(t('sys.api.operationFailed'))
|
|
Snackbar.error(t('sys.api.operationFailed'))
|
|
}
|
|
}
|