mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 00:47:15 +08:00
add button to fill common config field
This commit is contained in:
@@ -309,6 +309,13 @@
|
|||||||
@click="handleClickConfigCommonJobCondition({ entry: 'expect-company-field' })"
|
@click="handleClickConfigCommonJobCondition({ entry: 'expect-company-field' })"
|
||||||
>编辑公共职位筛选条件</el-button
|
>编辑公共职位筛选条件</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
size="small"
|
||||||
|
ml-10px
|
||||||
|
@click="fillCommonConfigField('expectCompanies')"
|
||||||
|
>填入公共职位筛选条件的值</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="!formContent.fieldsForUseCommonConfig.expectCompanies"
|
v-if="!formContent.fieldsForUseCommonConfig.expectCompanies"
|
||||||
@@ -411,6 +418,13 @@
|
|||||||
"
|
"
|
||||||
>编辑公共职位筛选条件</el-button
|
>编辑公共职位筛选条件</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
size="small"
|
||||||
|
ml-10px
|
||||||
|
@click="fillCommonConfigField('blockCompanyNameRegExpStr')"
|
||||||
|
>填入公共职位筛选条件的值</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:key="!formContent.fieldsForUseCommonConfig.blockCompanyNameRegExpStr"
|
:key="!formContent.fieldsForUseCommonConfig.blockCompanyNameRegExpStr"
|
||||||
@@ -527,6 +541,9 @@
|
|||||||
"
|
"
|
||||||
>编辑公共职位筛选条件</el-button
|
>编辑公共职位筛选条件</el-button
|
||||||
>
|
>
|
||||||
|
<el-button v-else size="small" ml-10px @click="fillCommonConfigField('city')"
|
||||||
|
>填入公共职位筛选条件的值</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<city-chooser
|
<city-chooser
|
||||||
v-if="!formContent.fieldsForUseCommonConfig.city"
|
v-if="!formContent.fieldsForUseCommonConfig.city"
|
||||||
@@ -689,6 +706,9 @@
|
|||||||
"
|
"
|
||||||
>编辑公共职位筛选条件</el-button
|
>编辑公共职位筛选条件</el-button
|
||||||
>
|
>
|
||||||
|
<el-button v-else size="small" ml-10px @click="fillCommonConfigField('salary')"
|
||||||
|
>填入公共职位筛选条件的值</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="!formContent.fieldsForUseCommonConfig.salary">
|
<template v-if="!formContent.fieldsForUseCommonConfig.salary">
|
||||||
<el-form-item prop="expectSalaryLow" mb10px>
|
<el-form-item prop="expectSalaryLow" mb10px>
|
||||||
@@ -1259,6 +1279,13 @@
|
|||||||
"
|
"
|
||||||
>编辑公共职位筛选条件</el-button
|
>编辑公共职位筛选条件</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
size="small"
|
||||||
|
ml-10px
|
||||||
|
@click="fillCommonConfigField('jobDetail')"
|
||||||
|
>填入公共职位筛选条件的值</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="!formContent.fieldsForUseCommonConfig.jobDetail"
|
v-if="!formContent.fieldsForUseCommonConfig.jobDetail"
|
||||||
@@ -2364,6 +2391,49 @@ const handleClickConfigCommonJobCondition = async ({ entry }) => {
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fillCommonConfigField = (field) => {
|
||||||
|
debugger
|
||||||
|
gtagRenderer('fill_common_config_field_clicked', { field })
|
||||||
|
let fieldsToReplace = []
|
||||||
|
switch (field) {
|
||||||
|
case 'salary': {
|
||||||
|
fieldsToReplace = ['expectSalaryCalculateWay', 'expectSalaryLow', 'expectSalaryHigh']
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'city': {
|
||||||
|
fieldsToReplace = ['expectCityList']
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'jobDetail': {
|
||||||
|
fieldsToReplace = [
|
||||||
|
'jobDetailRegExpMatchLogic',
|
||||||
|
'expectJobNameRegExpStr',
|
||||||
|
'expectJobTypeRegExpStr',
|
||||||
|
'expectJobDescRegExpStr'
|
||||||
|
]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'expectCompanies': {
|
||||||
|
fieldsToReplace = ['expectCompanies']
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 'blockCompanyNameRegExpStr': {
|
||||||
|
fieldsToReplace = ['blockCompanyNameRegExpStr']
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const field of fieldsToReplace) {
|
||||||
|
let sourceValue = commonJobConditionConfig.value[field]
|
||||||
|
if (
|
||||||
|
commonJobConditionConfig.value[field] &&
|
||||||
|
typeof commonJobConditionConfig.value[field] === 'object'
|
||||||
|
) {
|
||||||
|
sourceValue = JSON.parse(JSON.stringify(commonJobConditionConfig.value[field]))
|
||||||
|
}
|
||||||
|
formContent.value[field] = sourceValue
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user