|
@@ -9,24 +9,97 @@
|
|
|
label-width="68px"
|
|
|
>
|
|
|
<el-form-item label="姓名" prop="name">
|
|
|
- <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter="handleQuery" class="!w-130px" />
|
|
|
+ <el-input v-model="queryParams.name" placeholder="请输入" clearable @keyup.enter="handleQuery" class="!w-160px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="联系电话" prop="phone">
|
|
|
- <el-input v-model="queryParams.phone" placeholder="请输入联系电话" clearable @keyup.enter="handleQuery" class="!w-130px" />
|
|
|
+ <el-input v-model="queryParams.phone" placeholder="请输入" clearable @keyup.enter="handleQuery" class="!w-160px" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="酒店品牌" prop="brand">
|
|
|
+ <el-input v-model="queryParams.brand" placeholder="请输入" clearable @keyup.enter="handleQuery" class="!w-160px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="最高学历" prop="eduType">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.eduType"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ class="!w-160px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in getIntDictOptions(DICT_TYPE.MENDUNER_EDUCATION_TYPE)"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工作经验" prop="expType">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.expType"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ class="!w-160px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in getIntDictOptions(DICT_TYPE.MENDUNER_EXP_TYPE)"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="所在城市" prop="areaIds">
|
|
|
+ <el-cascader
|
|
|
+ v-model="queryParams.areaIds"
|
|
|
+ :options="areaTreeData"
|
|
|
+ :props="{ label: 'name', value: 'id', multiple: true, emitPath: false, checkStrictly: true }"
|
|
|
+ collapse-tags
|
|
|
+ collapse-tags-tooltip
|
|
|
+ class="!w-160px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="意向城市" prop="workAreaIds">
|
|
|
+ <el-cascader
|
|
|
+ v-model="queryParams.workAreaIds"
|
|
|
+ :options="areaTreeData"
|
|
|
+ :props="{ label: 'name', value: 'id', multiple: true, emitPath: false, checkStrictly: true }"
|
|
|
+ collapse-tags
|
|
|
+ collapse-tags-tooltip
|
|
|
+ class="!w-160px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="意向职位" prop="positionIds">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.positionIds"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ collapse-tags-tooltip
|
|
|
+ class="!w-160px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in positionTreeData"
|
|
|
+ :key="dict?.id"
|
|
|
+ :label="dict?.nameCn"
|
|
|
+ :value="dict?.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item>
|
|
|
- <el-button @click="handleQuery" type="primary"><Icon icon="ep:search" /> 搜索</el-button>
|
|
|
- <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
+ <el-button @click="handleQuery" :loading="loading" type="primary"><Icon icon="ep:search" /> 搜索</el-button>
|
|
|
+ <el-button @click="resetQuery" :loading="loading"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</ContentWrap>
|
|
|
|
|
|
- <div v-if="paramsVerify && !list?.length" class="tip">
|
|
|
- <div>{{ tipContent }}</div>
|
|
|
- </div>
|
|
|
<!-- 列表 -->
|
|
|
- <ContentWrap>
|
|
|
- <div class="listBox" v-loading="loading">
|
|
|
+ <ContentWrap v-loading="loading">
|
|
|
+ <div class="listBox">
|
|
|
+ <div v-if="!loading && !list?.length" class="tip" style="line-height: 200px;">
|
|
|
+ <div v-if="paramsBool">未查到任何数据,请更换查询条件后再试!</div>
|
|
|
+ <div v-else>请输入查询条件!</div>
|
|
|
+ </div>
|
|
|
<personCard
|
|
|
v-for="item of list"
|
|
|
:key="item.id"
|
|
@@ -37,32 +110,7 @@
|
|
|
</div>
|
|
|
</ContentWrap>
|
|
|
|
|
|
- <ContentWrap>
|
|
|
- <!-- <el-table v-loading="loading" :data="list" :stripe="true">
|
|
|
- <el-table-column label="姓名" align="center" prop="person.name" fixed="left" />
|
|
|
- <el-table-column label="联系电话" align="center" prop="user.phone" width="120px" />
|
|
|
- <el-table-column label="求职状态" align="center" prop="person.jobStatus" width="130px">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag v-if="scope.row.person?.jobStatus" :type="DICT_TYPE.MENDUNER_JOB_SEEK_STATUS" :value="scope.row.person?.jobStatus" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="学历" align="center" prop="person.eduType">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag v-if="scope.row.person?.eduType" :type="DICT_TYPE.MENDUNER_EDUCATION_TYPE" :value="scope.row.person?.eduType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="工作经验" align="center" prop="person.expType">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag v-if="scope.row.person?.expType" :type="DICT_TYPE.MENDUNER_EXP_TYPE" :value="scope.row.person?.expType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" fixed="right" min-width="60">
|
|
|
- <template #default="scope">
|
|
|
- <el-button link type="primary" @click="handleDetail(scope.row)">{{ detailButTxt || '详情'}}</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
- <!-- 分页 -->
|
|
|
+ <ContentWrap v-if="total">
|
|
|
<Pagination
|
|
|
:total="total"
|
|
|
layout="total, prev, pager, next"
|
|
@@ -79,11 +127,11 @@ import { TalentMap } from '@/api/menduner/system/talentMap'
|
|
|
import { PersonInfoApi } from '@/api/menduner/system/person'
|
|
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
import personCard from './personCard.vue'
|
|
|
+import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
|
|
|
const emit = defineEmits(['detail'])
|
|
|
const props = defineProps({
|
|
|
- detailButTxt: String,
|
|
|
- paramsVerify: Boolean,
|
|
|
+ paramsVerify: Boolean, // 查询条件必传
|
|
|
searchName: String
|
|
|
})
|
|
|
const message = useMessage() // 消息弹窗
|
|
@@ -96,36 +144,68 @@ const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
|
pageSize: 5,
|
|
|
name: '',
|
|
|
- phone: undefined
|
|
|
+ phone: undefined,
|
|
|
+ brand: '',
|
|
|
+ eduType: undefined,
|
|
|
+ expType: undefined,
|
|
|
+ areaIds: [],
|
|
|
+ workAreaIds: [],
|
|
|
+ positionIds: [],
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
|
+// 地区列表
|
|
|
+const areaTreeData = ref([])
|
|
|
+const getDictData = async () => {
|
|
|
+ const { data } = await getDict('areaTreeData', {}, 'areaTreeData')
|
|
|
+ const obj = data.find(e => e.name === '中国')
|
|
|
+ const list = obj?.children ? obj.children.map(e =>{
|
|
|
+ // 市辖区直接显示区
|
|
|
+ const municipality = e.children && e.children.length && e.children[0].name === '市辖区'
|
|
|
+ if (municipality && e.children[0].children?.length) e.children = e.children[0].children
|
|
|
+ return e
|
|
|
+ }) : []
|
|
|
+ areaTreeData.value = list.length ? list : []
|
|
|
+}
|
|
|
+getDictData()
|
|
|
+const positionTreeData = ref([])
|
|
|
+const getPositionTreeData = async () => {
|
|
|
+ const { data } = await getDict('positionTreeData', {}, 'positionTreeData')
|
|
|
+ positionTreeData.value = data || []
|
|
|
+}
|
|
|
+getPositionTreeData()
|
|
|
+
|
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
|
+ // if (loading.value) return message.warning('请勿频繁操作 !')
|
|
|
loading.value = true
|
|
|
try {
|
|
|
const data = await PersonInfoApi.getPersonInfoPage(queryParams)
|
|
|
list.value = data?.list.map(e => {
|
|
|
return {
|
|
|
...e.person,
|
|
|
- // Boolean(exp.year) || Boolean(exp.enterpriseName) || Boolean(exp.positionName)
|
|
|
- // workExpList: e.work ? [e.work] : []
|
|
|
+ workExpList: e.work ? [e.work] : []
|
|
|
}
|
|
|
}) || []
|
|
|
total.value = data?.total || 0
|
|
|
+ } catch (error) {
|
|
|
+ console.log('打印->error', error)
|
|
|
+ list.value = []
|
|
|
+ total.value = 0
|
|
|
} finally {
|
|
|
loading.value = false
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const tipContent = '输入人才姓名、电话查询后可使用门墩儿人才库数据填充表单!'
|
|
|
+const paramsBool = ref(false) // 是否存在筛选条件
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
+ const obj = { pageNo: null, pageSize: null, ...queryParams }
|
|
|
+ paramsBool.value = Object.values(obj).some(value => value !== undefined && value !== null && value !== '' && value.length)
|
|
|
+
|
|
|
+ if (props.paramsVerify && !paramsBool.value) return message.warning('请输入查询条件后再查询 !')
|
|
|
+
|
|
|
queryParams.pageNo = 1
|
|
|
- if (props.paramsVerify && !queryParams.name && !queryParams.phone) {
|
|
|
- message.warning('请输入后查询 !')
|
|
|
- return
|
|
|
- }
|
|
|
getList()
|
|
|
}
|
|
|
|