Explorar o código

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner-admin into dev

Xiao_123 hai 5 meses
pai
achega
a4d46d5895

+ 5 - 0
src/api/menduner/system/enterprise/userBind/index.ts

@@ -68,6 +68,11 @@ export const EnterpriseUserBindApi = {
     return await request.put({ url: `/menduner/system/enterprise-user-bind/update-email`, data })
   },
 
+  // 更新企业登录用户
+  updateEnterpriseInfo: async (data) => {
+    return await request.put({ url: `/menduner/system/enterprise-user-bind/update`, data })
+  },
+
   // 修改门墩儿-登录密码
   updateEnterprisePassword: async (data) => {
     return await request.put({ url: `/menduner/system/enterprise-user-bind/update-password`, data })

+ 49 - 0
src/api/menduner/system/talentMap/index.ts

@@ -0,0 +1,49 @@
+import request from '@/config/axios'
+
+// 猎寻服务 VO
+export interface HuntVO {
+  id: number // id
+  name: string // 姓名
+  enterpriseName: string // 企业名称
+  phone: string // 联系方式
+  status: string // 状态(0待处理|1已联系)
+  remark: string // 备注
+}
+
+// 猎寻服务 API
+export const HuntApi = {
+  // 查询猎寻服务分页
+  getHuntPage: async (params: any) => {
+    return await request.get({ url: `/menduner/system/hunt/page`, params })
+  },
+
+  // 查询猎寻服务详情
+  getHunt: async (id: number) => {
+    return await request.get({ url: `/menduner/system/hunt/get?id=` + id })
+  },
+
+  // 新增猎寻服务
+  createHunt: async (data: HuntVO) => {
+    return await request.post({ url: `/menduner/system/hunt/create`, data })
+  },
+
+  // 修改猎寻服务
+  updateHunt: async (data: HuntVO) => {
+    return await request.put({ url: `/menduner/system/hunt/update`, data })
+  },
+
+  // 处理猎寻服务
+  dealHunt: async (data: HuntVO) => {
+    return await request.put({ url: '/menduner/system/hunt/processed', data })
+  },
+
+  // 删除猎寻服务
+  deleteHunt: async (id: number) => {
+    return await request.delete({ url: `/menduner/system/hunt/delete?id=` + id })
+  },
+
+  // 导出猎寻服务 Excel
+  exportHunt: async (params) => {
+    return await request.download({ url: `/menduner/system/hunt/export-excel`, params })
+  }
+}

+ 24 - 5
src/views/menduner/system/enterprise/message/index.vue

@@ -74,14 +74,22 @@
   <!-- 列表 -->
   <ContentWrap>
     <el-table v-loading="loading" :data="list" :stripe="true">
+      <el-table-column label="企业LOGO" align="center" prop="logoUrl">
+        <template #default="scope">
+          <div class="h-70px w-80px">
+            <el-image v-if="scope.row.logoUrl" style="width: 50px; height: 50px" :src="scope.row.logoUrl" lazy preview-teleported :preview-src-list="[scope.row.logoUrl]" />
+            <span v-else style="line-height: 70px; color: #999;">未上传</span>
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column label="企业全称" align="center" prop="name" />
       <el-table-column label="企业别称" align="center" prop="anotherName" />
       <el-table-column label="联系人" align="center" prop="contact" />
       <el-table-column label="联系电话" align="center" prop="phone" />
-      <el-table-column label="地址" align="center" prop="" />
-      <el-table-column label="审核状态" align="center" prop="" />
-      <el-table-column label="会员类型" align="center" prop="" />
-      <el-table-column label="会员到期时间" align="center" prop="" />
+      <el-table-column label="地址" align="center" prop="address" />
+      <!-- <el-table-column label="审核状态" align="center" prop="" /> -->
+      <el-table-column label="会员类型" align="center" prop="vipType" />
+      <el-table-column label="会员到期时间" align="center" prop="vipExpireFormatDate" />
       <el-table-column label="职位发布类型" align="center" prop="pubJobTypePerm">
         <template #default="scope">
           <span v-for="k in scope.row.pubJobTypePerm" :key="k">
@@ -123,6 +131,8 @@ import EnterpriseForm from './EnterpriseForm.vue'
 import PositionTypeForm from './positionTypeForm.vue'
 import { IndustryApi, IndustryVO } from '@/api/menduner/system/industry'
 import { handleTree } from '@/utils/tree'
+import { dealDictObjData } from '@/utils/transform/position'
+import { formatToDate } from '@/utils/dateUtil'
 
 /** 门墩儿-企业信息 列表 */
 defineOptions({ name: 'Enterprise' })
@@ -161,7 +171,16 @@ const getList = async () => {
   loading.value = true
   try {
     const data = await EnterpriseApi.getEnterprisePage(queryParams)
-    list.value = data.list
+    list.value = data.list.map((row: any) => {
+      if (row.addressList?.length) {
+        const { areaName } = dealDictObjData({}, {areaId: row.addressList[0].areaId})
+        row.address = areaName + row.addressList[0].address || ''
+      }
+      const vipFlag = row.vipFlag ? row.vipFlag.toString() : null
+      if (vipFlag === '20' || vipFlag === '22' || vipFlag === '23') row.vipType = '旧平台会员'
+      if (row.vipExpireDate) row.vipExpireFormatDate = formatToDate(row.vipExpireDate)
+      return row
+    })
     total.value = data.total
   } finally {
     loading.value = false

+ 13 - 2
src/views/menduner/system/enterprise/register/details.vue

@@ -37,7 +37,7 @@
 
     <template #footer>
       <el-button @click="dialogVisible = false">取 消</el-button>
-      <el-button v-if="dialogType ==='pass'" type="primary" @click="handleSubmit">提 交</el-button>
+      <el-button v-if="dialogType ==='pass'" type="primary" @click="handleSubmitConfirm">提 交</el-button>
     </template>
   </Dialog>
 </template>
@@ -54,11 +54,12 @@ const dialogVisible = ref(false) // 弹窗的是否展示
 const dialogType = ref('') // 弹窗的类型
 
 // 职位发布权限
-const checkList = ref([0, 3])
+const checkList = ref()
 
 /** 打开弹窗 */
 const open = async (id: Number, type: string) => {
   dialogType.value = type
+  checkList.value = [0, 3] // 默认选中
   dialogVisible.value = true
   getData(id)
 }
@@ -70,6 +71,16 @@ const getData = async (id) => {
   info.value = data
 }
 
+const handleSubmitConfirm = async () => {
+  if (!checkList.value?.length) {
+    // 权限设置提示
+    await message.delConfirm('未给企业设置发布职位权限,企业将无法发布职位。是否确定继续提交?')
+    handleSubmit()
+  } else {
+    handleSubmit()
+  }
+}
+
 const handleSubmit = async () => {
   try {
     await EnterpriseRegisterApi.passEnterpriseRegister({ id: info.value?.id, reason: '', pubJobTypePerm: checkList.value })

+ 144 - 0
src/views/menduner/system/enterprise/userbind/Edit.vue

@@ -0,0 +1,144 @@
+<template>
+  <Dialog title="编辑企业用户信息" v-model="dialogVisible">
+    <el-form
+      ref="formRef"
+      :model="formData"
+      :rules="formRules"
+      label-width="120px"
+      v-loading="formLoading"
+      @submit.prevent
+    >
+      <el-form-item label="头像" prop="avatar">
+        <UploadImg v-model="formData.avatar" />
+      </el-form-item>
+      <el-form-item label="姓名" prop="name">
+        <el-input v-model="formData.name" placeholder="请输入用户姓名" />
+      </el-form-item>
+      <!-- <el-form-item label="性别" prop="sex">
+        <el-radio-group v-model="formData.sex">
+          <el-radio
+            v-for="dict in getStrDictOptions(DICT_TYPE.MENDUNER_SEX)"
+            :key="dict.value"
+            :label="dict.value"
+          >
+            {{ dict.label }}
+          </el-radio>
+        </el-radio-group>
+      </el-form-item> -->
+      <el-form-item label="用户手机号码" prop="phone">
+        <el-input v-model="formData.phone" placeholder="请输入用户手机号码" />
+      </el-form-item>
+      <el-form-item label="企业邮箱" prop="email">
+        <el-input v-model="formData.email" placeholder="请输入企业邮箱" />
+      </el-form-item>
+      <el-form-item label="所属岗位名称" prop="postName">
+        <el-input v-model="formData.postName" placeholder="请输入所属岗位名称" />
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
+      <el-button @click="dialogVisible = false">取 消</el-button>
+    </template>
+  </Dialog>
+</template>
+
+<script setup lang="ts">
+// import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
+import { EnterpriseUserBindApi } from '@/api/menduner/system/enterprise/userBind'
+
+defineOptions({ name: 'EnterpriseUserBindForm' })
+
+const { t } = useI18n() // 国际化
+const message = useMessage() // 消息弹窗
+
+const dialogVisible = ref(false) // 弹窗的是否展示
+const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
+const formData = ref({
+  userType: undefined, // 详情接口数据是什么就原样传递什么
+  id: undefined,
+  enterpriseId: undefined,
+  userId: undefined,
+  postName: undefined,
+  phone: undefined,
+  name: undefined,
+  avatar: '',
+  email: undefined
+})
+
+/** 重置表单 */
+const resetForm = () => {
+  formData.value = {
+    userType: undefined, // 详情接口数据是什么就原样传递什么
+    id: undefined,
+    enterpriseId: undefined,
+    userId: undefined,
+    postName: undefined,
+    phone: undefined,
+    name: undefined,
+    avatar: '',
+    email: undefined
+  }
+  formRef.value?.resetFields()
+}
+
+const validateEmail = (rule: any, value: any, callback: any) => {
+  if (!value) {
+    callback(new Error('请输入企业邮箱'))
+  } else {
+    if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
+      callback(new Error('请输入正确的企业邮箱地址'))
+    }
+    callback()
+  }
+}
+
+const formRules = reactive({
+  avatar: [{ required: true, message: '头像不能为空', trigger: 'blur' }],
+  // postName: [{ required: true, message: '岗位名称不能为空', trigger: 'blur' }],
+  name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
+  // sex: [{ required: true, message: '性别不能为空', trigger: 'blur' }],
+  phone: [
+    { required: true, message: '用户手机号码不能为空', trigger: 'blur' },
+    { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }
+  ],
+  email: [{ required: true, validator: validateEmail, trigger: 'blur' }]
+})
+const formRef = ref() // 表单 Ref
+
+/** 打开弹窗 */
+const open = async (id: number) => {
+  dialogVisible.value = true
+  resetForm()
+  // 修改时,设置数据
+  if (id) {
+    formLoading.value = true
+    try {
+      const data = await EnterpriseUserBindApi.getEnterpriseUserBind(id)
+      Object.keys(formData.value).forEach(key => {
+        formData.value[key] = data[key]
+      })
+    } finally {
+      formLoading.value = false
+    }
+  }
+}
+defineExpose({ open }) // 提供 open 方法,用于打开弹窗
+
+/** 提交表单 */
+const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
+const submitForm = async () => {
+  // 校验表单
+  await formRef.value.validate()
+  // 提交请求
+  formLoading.value = true
+  try {
+    await EnterpriseUserBindApi.updateEnterpriseInfo(formData.value)
+    message.success(t('common.updateSuccess'))
+    dialogVisible.value = false
+    emit('success')
+  } finally {
+    formLoading.value = false
+  }
+}
+
+</script>

+ 17 - 6
src/views/menduner/system/enterprise/userbind/index.vue

@@ -110,7 +110,8 @@
       <el-table-column label="操作" align="center">
         <template #default="scope">
           <el-button link type="primary" @click="openDetail(scope.row.id, scope.row.enterpriseId, scope.row.userId)">详情</el-button>
-          <el-button link type="primary" @click="openEditEmail(scope.row.id)">修改登录邮箱</el-button>
+          <!-- <el-button link type="primary" @click="openEditEmail(scope.row.id)">修改登录邮箱</el-button> -->
+          <el-button link type="primary" @click="openEdit(scope.row.id)">编辑</el-button>
           <el-button link type="primary" @click="openEditPassword(scope.row.id)">修改登录密码</el-button>
           <el-button v-if="scope.row.status === '0'" link type="danger" @click="handleActions(scope.row.id, 'disabled')">禁用</el-button>
           <el-button v-if="scope.row.status === '1'" link type="success" @click="handleActions(scope.row.id, 'enable')">启用</el-button>
@@ -127,7 +128,10 @@
   </ContentWrap>
 
   <!-- 修改用户登录邮箱 -->
-  <EditEmail ref="editEmailRef" @success="getList" />
+  <!-- <EditEmail ref="editEmailRef" @success="getList" /> -->
+
+  <!-- 编辑 -->
+  <Edit ref="editRef" @success="getList" />
 
   <!-- 修改用户登录密码 -->
   <EditPassword ref="editPasswordRef" @success="getList" />
@@ -138,7 +142,8 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
 import { dateFormatter } from '@/utils/formatTime'
 import download from '@/utils/download'
 import { EnterpriseUserBindApi, EnterpriseUserBindVO } from '@/api/menduner/system/enterprise/userBind'
-import EditEmail from './EditEmail.vue'
+// import EditEmail from './EditEmail.vue'
+import Edit from './Edit.vue'
 import EditPassword from './EditPassword.vue'
 
 /** 门墩儿-企业登录用户 列表 */
@@ -205,9 +210,15 @@ const resetQuery = () => {
 }
 
 /* 修改用户邮箱 */
-const editEmailRef = ref()
-const openEditEmail = (id: number) => {
-  editEmailRef.value.open(id)
+// const editEmailRef = ref()
+// const openEditEmail = (id: number) => {
+//   editEmailRef.value.open(id)
+// }
+
+/* 编辑 */
+const editRef = ref()
+const openEdit = (id: number) => {
+  editRef.value.open(id)
 }
 
 /* 修改用户登录密码 */

+ 4 - 4
src/views/menduner/system/talentMap/details/components/info.vue

@@ -38,12 +38,12 @@
       <el-descriptions-item label="账号状态">
         <dict-tag :type="DICT_TYPE.MENDUNER_STATUS" :value="user.status" />
       </el-descriptions-item>
-      <el-descriptions-item label="会员套餐">
+      <!-- <el-descriptions-item label="会员套餐">
         {{ user.vipFlag ? packageList.find(e => e.id === Number(user.vipFlag))?.name : '' }}
-      </el-descriptions-item>
-      <el-descriptions-item label="会员到期时间">
+      </el-descriptions-item> -->
+      <!-- <el-descriptions-item label="会员到期时间">
         {{ formatDate(user.vipExpireDate, 'YYYY-MM-DD HH:mm:ss') }}
-      </el-descriptions-item>
+      </el-descriptions-item> -->
     </el-descriptions>
   </div>
 </template>

+ 11 - 211
src/views/menduner/system/talentMap/details/components/tags.vue

@@ -8,7 +8,7 @@
         closable
         size="large"
         class="m-r-10px m-b-10px"
-      >{{ item.nameCn }}</el-tag>
+      >{{ item.name }}</el-tag>
     </div>
   </div>
 </template>
@@ -17,224 +17,24 @@
 defineOptions({name: 'Tags'})
 const tagList = ref([
   {
-    id: "1838837550391787522", 
-    nameCn: "效率", 
-    nameEn: "efficiency", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838837550391787522", 
-    children: [ ]
+    name: "技术专家", 
+    id: "1"
   }, 
   {
-    id: "1838837666309767170", 
-    nameCn: "质量", 
-    nameEn: "quality", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838837666309767170", 
-    children: [ ]
+    name: "管理精英", 
+    id: "2"
   }, 
   {
-    id: "1838853020339752962", 
-    nameCn: "逻辑思维能力", 
-    nameEn: "logical thinking", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853020339752962", 
-    children: [ ]
+    name: "创新先锋", 
+    id: "3"
   }, 
   {
-    id: "1838853209356136450", 
-    nameCn: "编码习惯", 
-    nameEn: "Coding habits", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853209356136450", 
-    children: [ ]
+    name: "市场高手", 
+    id: "4"
   }, 
   {
-    id: "1838853291161841666", 
-    nameCn: "高并发", 
-    nameEn: "High concurrency", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853291161841666", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853394492641282", 
-    nameCn: "分布式事务", 
-    nameEn: "distributed transaction", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853394492641282", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853661942435842", 
-    nameCn: "分析问题", 
-    nameEn: "analyze the problem", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853661942435842", 
-    children: [ ]
-  }, 
-  {
-    id: "1838837550391787522", 
-    nameCn: "效率", 
-    nameEn: "efficiency", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838837550391787522", 
-    children: [ ]
-  }, 
-  {
-    id: "1838837666309767170", 
-    nameCn: "质量", 
-    nameEn: "quality", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838837666309767170", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853020339752962", 
-    nameCn: "逻辑思维能力", 
-    nameEn: "logical thinking", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853020339752962", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853209356136450", 
-    nameCn: "编码习惯", 
-    nameEn: "Coding habits", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853209356136450", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853291161841666", 
-    nameCn: "高并发", 
-    nameEn: "High concurrency", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853291161841666", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853394492641282", 
-    nameCn: "分布式事务", 
-    nameEn: "distributed transaction", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853394492641282", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853661942435842", 
-    nameCn: "分析问题", 
-    nameEn: "analyze the problem", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853661942435842", 
-    children: [ ]
-  }, 
-  {
-    id: "1838837550391787522", 
-    nameCn: "效率", 
-    nameEn: "efficiency", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838837550391787522", 
-    children: [ ]
-  }, 
-  {
-    id: "1838837666309767170", 
-    nameCn: "质量", 
-    nameEn: "quality", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838837666309767170", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853020339752962", 
-    nameCn: "逻辑思维能力", 
-    nameEn: "logical thinking", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853020339752962", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853209356136450", 
-    nameCn: "编码习惯", 
-    nameEn: "Coding habits", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853209356136450", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853291161841666", 
-    nameCn: "高并发", 
-    nameEn: "High concurrency", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853291161841666", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853394492641282", 
-    nameCn: "分布式事务", 
-    nameEn: "distributed transaction", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853394492641282", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853661942435842", 
-    nameCn: "分析问题", 
-    nameEn: "analyze the problem", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853661942435842", 
-    children: [ ]
-  }, 
-  {
-    id: "1838853734973657089", 
-    nameCn: "沟通能力", 
-    nameEn: "communication skills", 
-    type: "0", 
-    parentId: "1838826266250338305", 
-    level: 1, 
-    path: "1838826266250338305,1838853734973657089", 
-    children: [ ]
+    name: "团队领袖", 
+    id: "5"
   }
 ])
 </script>

+ 209 - 293
src/views/menduner/system/talentMap/details/components/tagsRecommend.vue

@@ -19,9 +19,9 @@
     </div>
     <div>
       <div v-for="val in tagList" :key="val.id" class="m-t-15px">
-        <span style="font-size: 14px;">{{ val?.nameCn || '--' }}</span>
+        <!-- <span style="font-size: 14px;">{{ val?.nameCn || '--' }}</span> -->
         <div v-if="val?.children?.length">
-          <el-tag size="large" class="m-r-10px m-t-10px" v-for="item of val.children" :key="item.id">{{ item.nameCn }}</el-tag>
+          <el-tag size="large" class="m-r-10px m-t-10px" v-for="item of val.children" :key="item.id">{{ item.name }}</el-tag>
         </div>
       </div>
     </div>
@@ -32,319 +32,235 @@
 defineOptions({name: 'TagsRecommend'})
 
 const tagType = ref(null)
-const tagTypeList = ref([{name: '团队', id: '团队'},{name: '进取精神', id: '进取精神'}, {name: '工作质量', id: '工作质量'}, {name: '承受能力', id: '承受能力'}])
+// const tagTypeList = ref([{name: '专家', id: '专家'},{name: '管理', id: '管理'}, {name: '创新', id: '创新'}, {name: '市场', id: '市场'}])
 const tagList = ref([
   {
-    id: "1838825944446558210", 
-    nameCn: "团队", 
-    nameEn: "team", 
-    type: "0", 
-    parentId: 0, 
-    level: 0, 
-    path: "1838825944446558210", 
+    name: "前台与客服类人才", 
+    id: "1", 
     children: [
       {
-        id: "1838826793411436545", 
-        nameCn: "合作精神", 
-        nameEn: "Spirit of cooperation", 
-        type: "0", 
-        parentId: "1838825944446558210", 
-        level: 1, 
-        path: "1838825944446558210,1838826793411436545", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853885473746946", 
-        nameCn: "协调能力", 
-        nameEn: "Coordination ability", 
-        type: "0", 
-        parentId: "1838825944446558210", 
-        level: 1, 
-        path: "1838825944446558210,1838853885473746946", 
-        children: [ ]
+        name: "前台接待员", 
+        id: "1.1"
+      }, 
+      {
+        name: "礼宾员", 
+        id: "1.2"
+      }, 
+      {
+        name: "客户服务员", 
+        id: "1.3"
+      }, 
+      {
+        name: "预订员", 
+        id: "1.4"
+      }, 
+      {
+        name: "电话接线员", 
+        id: "1.5"
+      }, 
+      {
+        name: "前台经理", 
+        id: "1.6"
+      }, 
+      {
+        name: "行政酒廊服务员", 
+        id: "1.7"
+      }, 
+      {
+        name: "商务中心文员", 
+        id: "1.8"
+      }, 
+      {
+        name: "宾客关系主任", 
+        id: "1.9"
+      }, 
+      {
+        name: "大堂副理", 
+        id: "1.10"
+      }
+    ]
+  }, 
+  {
+    name: "客房与餐饮类人才", 
+    id: "2", 
+    children: [
+      {
+        name: "客房服务员", 
+        id: "2.1"
+      }, 
+      {
+        name: "楼层服务员", 
+        id: "2.2"
+      }, 
+      {
+        name: "公共区域清洁工", 
+        id: "2.3"
+      }, 
+      {
+        name: "餐厅服务员", 
+        id: "2.4"
+      }, 
+      {
+        name: "调酒师", 
+        id: "2.5"
+      }, 
+      {
+        name: "餐饮部经理", 
+        id: "2.6"
+      }, 
+      {
+        name: "宴会服务员", 
+        id: "2.7"
+      }, 
+      {
+        name: "厨房助手", 
+        id: "2.8"
+      }, 
+      {
+        name: "西餐厨师", 
+        id: "2.9"
+      }, 
+      {
+        name: "中餐厨师", 
+        id: "2.10"
       }
     ]
   }, 
   {
-    id: "1838826023743946754", 
-    nameCn: "进取精神", 
-    nameEn: "spirit of enterprising", 
-    type: "0", 
-    parentId: 0, 
-    level: 0, 
-    path: "1838826023743946754", 
+    name: "销售与市场类人才", 
+    id: "3", 
     children: [
       {
-        id: "1838837082798317569", 
-        nameCn: "细心", 
-        nameEn: "careful", 
-        type: "0", 
-        parentId: "1838826023743946754", 
-        level: 1, 
-        path: "1838826023743946754,1838837082798317569", 
-        children: [ ]
-      }, 
-      {
-        id: "1838837135919054849", 
-        nameCn: "乐观", 
-        nameEn: "optimistic", 
-        type: "0", 
-        parentId: "1838826023743946754", 
-        level: 1, 
-        path: "1838826023743946754,1838837135919054849", 
-        children: [ ]
+        name: "销售经理", 
+        id: "3.1"
+      }, 
+      {
+        name: "销售代表", 
+        id: "3.2"
+      }, 
+      {
+        name: "市场推广员", 
+        id: "3.3"
+      }, 
+      {
+        name: "市场营销专员", 
+        id: "3.4"
+      }, 
+      {
+        name: "预订部员工", 
+        id: "3.5"
+      }, 
+      {
+        name: "收益管理分析师", 
+        id: "3.6"
+      }, 
+      {
+        name: "客户关系经理", 
+        id: "3.7"
+      }, 
+      {
+        name: "渠道销售经理", 
+        id: "3.8"
+      }, 
+      {
+        name: "电子商务销售经理", 
+        id: "3.9"
+      }, 
+      {
+        name: "市场情报分析师", 
+        id: "3.10"
       }
     ]
   }, 
   {
-    id: "1838826266250338305", 
-    nameCn: "工作质量", 
-    nameEn: "Work quality", 
-    type: "0", 
-    parentId: 0, 
-    level: 0, 
-    path: "1838826266250338305", 
+    name: "财务与人力资源类人才", 
+    id: "4", 
     children: [
       {
-        id: "1838837550391787522", 
-        nameCn: "效率", 
-        nameEn: "efficiency", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838837550391787522", 
-        children: [ ]
-      }, 
-      {
-        id: "1838837666309767170", 
-        nameCn: "质量", 
-        nameEn: "quality", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838837666309767170", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853020339752962", 
-        nameCn: "逻辑思维能力", 
-        nameEn: "logical thinking", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853020339752962", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853209356136450", 
-        nameCn: "编码习惯", 
-        nameEn: "Coding habits", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853209356136450", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853291161841666", 
-        nameCn: "高并发", 
-        nameEn: "High concurrency", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853291161841666", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853394492641282", 
-        nameCn: "分布式事务", 
-        nameEn: "distributed transaction", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853394492641282", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853661942435842", 
-        nameCn: "分析问题", 
-        nameEn: "analyze the problem", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853661942435842", 
-        children: [ ]
-      }, 
-      {
-        id: "1838837550391787522", 
-        nameCn: "效率", 
-        nameEn: "efficiency", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838837550391787522", 
-        children: [ ]
-      }, 
-      {
-        id: "1838837666309767170", 
-        nameCn: "质量", 
-        nameEn: "quality", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838837666309767170", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853020339752962", 
-        nameCn: "逻辑思维能力", 
-        nameEn: "logical thinking", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853020339752962", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853209356136450", 
-        nameCn: "编码习惯", 
-        nameEn: "Coding habits", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853209356136450", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853291161841666", 
-        nameCn: "高并发", 
-        nameEn: "High concurrency", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853291161841666", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853394492641282", 
-        nameCn: "分布式事务", 
-        nameEn: "distributed transaction", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853394492641282", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853661942435842", 
-        nameCn: "分析问题", 
-        nameEn: "analyze the problem", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853661942435842", 
-        children: [ ]
-      }, 
-      {
-        id: "1838837550391787522", 
-        nameCn: "效率", 
-        nameEn: "efficiency", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838837550391787522", 
-        children: [ ]
-      }, 
-      {
-        id: "1838837666309767170", 
-        nameCn: "质量", 
-        nameEn: "quality", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838837666309767170", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853020339752962", 
-        nameCn: "逻辑思维能力", 
-        nameEn: "logical thinking", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853020339752962", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853209356136450", 
-        nameCn: "编码习惯", 
-        nameEn: "Coding habits", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853209356136450", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853291161841666", 
-        nameCn: "高并发", 
-        nameEn: "High concurrency", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853291161841666", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853394492641282", 
-        nameCn: "分布式事务", 
-        nameEn: "distributed transaction", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853394492641282", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853661942435842", 
-        nameCn: "分析问题", 
-        nameEn: "analyze the problem", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853661942435842", 
-        children: [ ]
-      }, 
-      {
-        id: "1838853734973657089", 
-        nameCn: "沟通能力", 
-        nameEn: "communication skills", 
-        type: "0", 
-        parentId: "1838826266250338305", 
-        level: 1, 
-        path: "1838826266250338305,1838853734973657089", 
-        children: [ ]
+        name: "财务经理", 
+        id: "4.1"
+      }, 
+      {
+        name: "会计", 
+        id: "4.2"
+      }, 
+      {
+        name: "出纳", 
+        id: "4.3"
+      }, 
+      {
+        name: "薪资管理人员", 
+        id: "4.4"
+      }, 
+      {
+        name: "人力资源经理", 
+        id: "4.5"
+      }, 
+      {
+        name: "招聘专员", 
+        id: "4.6"
+      }, 
+      {
+        name: "培训与发展专员", 
+        id: "4.7"
+      }, 
+      {
+        name: "绩效管理员", 
+        id: "4.8"
+      }, 
+      {
+        name: "员工关系专员", 
+        id: "4.9"
+      }, 
+      {
+        name: "薪酬福利专员", 
+        id: "4.10"
       }
     ]
   }, 
   {
-    id: "1838826464175349762", 
-    nameCn: "承受能力", 
-    nameEn: "Affordability", 
-    type: "0", 
-    parentId: 0, 
-    level: 0, 
-    path: "1838826464175349762", 
+    name: "工程与后勤类人才", 
+    id: "5", 
     children: [
       {
-        id: "1838837393176690689", 
-        nameCn: "抗压", 
-        nameEn: "Compression resistance", 
-        type: "0", 
-        parentId: "1838826464175349762", 
-        level: 1, 
-        path: "1838826464175349762,1838837393176690689", 
-        children: [ ]
+        name: "维修工程师", 
+        id: "5.1"
+      }, 
+      {
+        name: "电工", 
+        id: "5.2"
+      }, 
+      {
+        name: "水管工", 
+        id: "5.3"
+      }, 
+      {
+        name: "空调工", 
+        id: "5.4"
+      }, 
+      {
+        name: "管家部员工", 
+        id: "5.5"
+      }, 
+      {
+        name: "布草员", 
+        id: "5.6"
+      }, 
+      {
+        name: "仓库管理员", 
+        id: "5.7"
+      }, 
+      {
+        name: "采购员", 
+        id: "5.8"
+      }, 
+      {
+        name: "安全主管", 
+        id: "5.9"
+      }, 
+      {
+        name: "保安员", 
+        id: "5.10"
       }
     ]
   }

+ 10 - 2
src/views/menduner/system/talentMap/index.vue

@@ -27,6 +27,14 @@
         >
           <Icon icon="ep:plus" class="mr-5px" /> 新增
         </el-button>
+        <el-button
+          type="warning"
+          plain
+          @click="handleExport"
+          :loading="exportLoading"
+        >
+          简历解析
+        </el-button>
         <el-button
           type="success"
           plain
@@ -74,14 +82,14 @@
   </ContentWrap>
 
   <!-- 表单弹窗:添加/修改 -->
-  <!-- <formPage ref="formRef" @success="getList" /> -->
+  <TalentForm ref="formRef" @success="getList" />
 </template>
 
 <script setup>
 // import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
 import download from '@/utils/download'
 // import { HuntApi, HuntVO } from '@/api/menduner/system/hunt'
-// import formPage from './form.vue'
+import TalentForm from './talentForm.vue'
 
 /** 猎寻服务 列表 */
 defineOptions({ name: 'TalentMap' })

+ 126 - 0
src/views/menduner/system/talentMap/talentForm.vue

@@ -0,0 +1,126 @@
+<template>
+  <Dialog :title="dialogTitle" v-model="dialogVisible">
+    <el-form
+      ref="formRef"
+      :model="formData"
+      :rules="formRules"
+      label-width="100px"
+      v-loading="formLoading"
+    >
+      <el-form-item label="姓名" prop="name">
+        <el-input :disabled="formType === 'handle'" v-model="formData.name" placeholder="请输入姓名" />
+      </el-form-item>
+      <el-form-item label="企业名称" prop="enterpriseName">
+        <el-input :disabled="formType === 'handle'" v-model="formData.enterpriseName" placeholder="请输入企业名称" />
+      </el-form-item>
+      <el-form-item label="联系方式" prop="phone">
+        <el-input :disabled="formType === 'handle'" v-model="formData.phone" placeholder="请输入联系方式" />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select :disabled="formType === 'handle'" v-model="formData.status" placeholder="请选择状态">
+          <el-option
+            v-for="(dict, index) in getStrDictOptions(DICT_TYPE.MENDUNER_HUNT_STATUS)"
+            :key="'status'+index"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input v-model="formData.remark" type="textarea" rows="6" placeholder="请输入备注" />
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
+      <el-button @click="dialogVisible = false">取 消</el-button>
+    </template>
+  </Dialog>
+</template>
+<script setup lang="ts">
+import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
+import { HuntApi, HuntVO } from '@/api/menduner/system/talentMap'
+
+/** 猎寻服务 表单 */
+defineOptions({ name: 'TalentForm' })
+
+const { t } = useI18n() // 国际化
+const message = useMessage() // 消息弹窗
+
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
+const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
+const formType = ref('') // 表单的类型:create - 新增;update - 修改
+const formData = ref({
+  id: undefined,
+  name: undefined,
+  enterpriseName: undefined,
+  phone: undefined,
+  status: undefined,
+  remark: undefined
+})
+const formRules = reactive({
+  name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
+  enterpriseName: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
+  phone: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }],
+  status: [{ required: true, message: '状态(0待处理|1已联系)不能为空', trigger: 'change' }]
+})
+const formRef = ref() // 表单 Ref
+
+/** 打开弹窗 */
+const open = async (type: string, id?: number) => {
+  dialogVisible.value = true
+  dialogTitle.value = t('action.' + type)
+  formType.value = type
+  resetForm()
+  // 修改时,设置数据
+  if (id) {
+    formLoading.value = true
+    try {
+      formData.value = await HuntApi.getHunt(id)
+    } finally {
+      formLoading.value = false
+    }
+  }
+}
+defineExpose({ open }) // 提供 open 方法,用于打开弹窗
+
+/** 提交表单 */
+const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
+const submitForm = async () => {
+  // 校验表单
+  await formRef.value.validate()
+  // 提交请求
+  formLoading.value = true
+  try {
+    const data = formData.value as unknown as HuntVO
+    if (formType.value === 'create') {
+      await HuntApi.createHunt(data)
+      message.success(t('common.createSuccess'))
+    } else if (formType.value === 'handle') {
+      await HuntApi.dealHunt({ id: formData.value.id, remark: formData.value.remark })
+      message.success(t('sys.api.operationSuccess'))
+    } else {
+      await HuntApi.updateHunt(data)
+      message.success(t('common.updateSuccess'))
+    }
+    dialogVisible.value = false
+    // 发送操作成功的事件
+    emit('success')
+  } finally {
+    formLoading.value = false
+  }
+}
+
+/** 重置表单 */
+const resetForm = () => {
+  formData.value = {
+    id: undefined,
+    name: undefined,
+    enterpriseName: undefined,
+    phone: undefined,
+    status: undefined,
+    remark: undefined
+  }
+  formRef.value?.resetFields()
+}
+</script>