|
@@ -16,10 +16,19 @@
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="求职岗位" name="professionName" :label-col="{span:7}" :rules="[{ required: true,message:'请选择求职岗位!' }]">
|
|
|
- <!-- <label v-if="opCategory==3">{{dataModel.postID}}</label> -->
|
|
|
- <a-cascader :load-data="loadLevelProfessionList" v-model:value="dataModel.professionName"
|
|
|
- :options="firstProfessionList" change-on-select>
|
|
|
- </a-cascader>
|
|
|
+ <a-auto-complete
|
|
|
+ v-model:value="dataModel.professionName"
|
|
|
+ :options="professionList"
|
|
|
+ @search="selectProfessionList"
|
|
|
+ @change="professionChange"
|
|
|
+ :field-names="{
|
|
|
+ value:'professionName',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <template #option="item">
|
|
|
+ <span v-html="formatStr(item.professionName)"></span>({{ item.parentProfessionName }})
|
|
|
+ </template>
|
|
|
+ </a-auto-complete>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="9">
|
|
@@ -27,13 +36,13 @@
|
|
|
<label style="color:red;float: left;position:relative;right:80px;line-height: 35px;" >*</label>
|
|
|
<a-form-item name="minSalary" :rules="[{ required: true, message: '请输入最低月薪!' }]" style="float:left;">
|
|
|
<a-input-number :controls="false" :min="0" name="minSalary" v-model:value="dataModel.minSalary"
|
|
|
- style="min-width: 145px;max-width: 150px;" placeholder="" @change="salaryChange"/>
|
|
|
+ style="min-width: 145px;max-width: 150px;" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
<label style="margin-right:10px;margin-left:10px;float: left;">-</label>
|
|
|
<a-form-item name="maxSalary" :rules="[{ required: true, message: '请输入最高月薪!' }]" style="float: left;" >
|
|
|
<a-input-number :controls="false" :min="dataModel.minSalary" name="maxSalary"
|
|
|
v-model:value="dataModel.maxSalary"
|
|
|
- style="min-width: 145px;max-width: 150px;" placeholder="" @change="salaryChange"/>
|
|
|
+ style="min-width: 145px;max-width: 150px;" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -110,6 +119,8 @@ import {getSysDictionaryList} from '@/api/system/dictionary';
|
|
|
import BUploadFile from "@/components/file/uploadFile.vue";
|
|
|
import {CascaderProps, message, SelectProps} from "ant-design-vue";
|
|
|
import {get} from "@/api/common";
|
|
|
+import {debounce} from "lodash-es";
|
|
|
+import {getProfessionLikeList} from "@/api/jobUserManager/recommendMgt";
|
|
|
|
|
|
interface jobHuntModel {
|
|
|
dataModel: any;
|
|
@@ -140,6 +151,7 @@ export default defineComponent({
|
|
|
const jobHuntTypeList = ref<SelectProps['options']>();
|
|
|
const jobUserTypeList = ref<SelectProps['options']>();
|
|
|
const regionList = ref<SelectProps['options']>();
|
|
|
+ const professionList = ref<Array<any>>([]);
|
|
|
|
|
|
const getWorkAreas = async function(){
|
|
|
const result :any = await get('system/area/getCityList',{});
|
|
@@ -252,8 +264,6 @@ export default defineComponent({
|
|
|
isAllowCommit.value = false;
|
|
|
}
|
|
|
if (isAllowCommit.value){
|
|
|
- formData.dataModel.professionName=null;
|
|
|
- //console.log("当前意向信息",formData.dataModel);
|
|
|
saveJobHuntCopy(formData.dataModel).then(result => {
|
|
|
if (result) {
|
|
|
onClose(1);
|
|
@@ -262,10 +272,37 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- function salaryChange() {
|
|
|
- if (formData.dataModel.maxSalary < formData.dataModel.minSalary) {
|
|
|
- formData.dataModel.maxSalary = formData.dataModel.minSalary
|
|
|
+ // 查询岗位
|
|
|
+ const selectProfessionList = debounce((professionName: string) => {
|
|
|
+ if (professionName) {
|
|
|
+ getProfessionLikeList({
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ professionName,
|
|
|
+ }).then(data => {
|
|
|
+ professionList.value = data.list;
|
|
|
+ })
|
|
|
}
|
|
|
+ }, 200)
|
|
|
+
|
|
|
+ // 岗位名称变更
|
|
|
+ function professionChange(value: any) {
|
|
|
+ formData.dataModel.professionName = value
|
|
|
+ const profession = professionList.value.find(prof => prof.professionName === value);
|
|
|
+ if (profession) {
|
|
|
+ formData.dataModel.professionID = profession.professionID;
|
|
|
+ } else {
|
|
|
+ formData.dataModel.professionID = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 名称搜索关键字高亮
|
|
|
+ const formatStr = (str: any) => {
|
|
|
+ if (!str) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ return str.replace(formData.dataModel.professionName, '<span style="color: coral">' + formData.dataModel.professionName + '</span>');
|
|
|
}
|
|
|
|
|
|
return {
|
|
@@ -285,7 +322,10 @@ export default defineComponent({
|
|
|
jobHuntTypeList,
|
|
|
jobWorkTypeList,
|
|
|
isAllowCommit,
|
|
|
- salaryChange
|
|
|
+ professionList,
|
|
|
+ selectProfessionList,
|
|
|
+ professionChange,
|
|
|
+ formatStr
|
|
|
};
|
|
|
},
|
|
|
created() {
|