Ver Fonte

人才地图管理

lifanagju_citu há 5 meses atrás
pai
commit
4e62eba04e

+ 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 })
+  }
+}

+ 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>