Browse Source

Merge branch 'recruit-enterprise' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp into recruit-enterprise

Xiao_123 1 day ago
parent
commit
412b8ba121

+ 90 - 1
components/positionItem/components/baseInfo.vue

@@ -8,7 +8,7 @@
         </view>
         </view>
 			</uni-forms-item>
 			</uni-forms-item>
 			<uni-forms-item required label="职位名称" name="name">
 			<uni-forms-item required label="职位名称" name="name">
-        <uni-easyinput v-model="formData.name" placeholder="请填写职位名称"></uni-easyinput>
+        <uni-easyinput v-model="formData.name" placeholder="请填写职位名称" @blur="handleValidName"></uni-easyinput>
 			</uni-forms-item>
 			</uni-forms-item>
       <!-- <template v-if="!props.isFair && jobFairList?.length">
       <!-- <template v-if="!props.isFair && jobFairList?.length">
         <uni-forms-item label="招聘会" name="bizId" >
         <uni-forms-item label="招聘会" name="bizId" >
@@ -44,6 +44,29 @@
         @confirm="handleConfirm"
         @confirm="handleConfirm"
         @close="handleClose"
         @close="handleClose"
       ></uni-popup-dialog>
       ></uni-popup-dialog>
+    </uni-popup>
+    <!-- 确认框 -->
+    <uni-popup ref="validRef" type="dialog">
+      <uni-popup-dialog
+        type="warn"
+        cancelText="继续发布"
+        confirmText="查看已有职位"
+        title="系统提示"
+        content="该职位名称已在您的招聘职位列表中存在,是否继续发布?"
+        @confirm="handleOpen"
+        @close="handleCancel"
+      ></uni-popup-dialog>
+    </uni-popup>
+    <uni-popup ref="tableRef" type="share" safeArea backgroundColor="#fff">
+      <div class="dialog-content">
+        <view class="dialog-close" @tap.stop="closeClick">
+          <view class="dialog-close-plus"></view>
+          <view class="dialog-close-plus dialog-close-rotate"></view>
+        </view>
+        <div class="table">
+          <tablePage :list="tableItems"></tablePage>
+        </div>
+      </div>
     </uni-popup>
     </uni-popup>
 	</view>
 	</view>
 </template>
 </template>
@@ -55,6 +78,9 @@ import { getRecruitPositionDetails } from '@/api/new/position'
 // import { dateToTimestamp } from '@/utils/date.js'
 // import { dateToTimestamp } from '@/utils/date.js'
 import { getJobFairWhiteList } from '@/api/jobFair'
 import { getJobFairWhiteList } from '@/api/jobFair'
 import RichEditor from '@/components/RichEditor'
 import RichEditor from '@/components/RichEditor'
+import { dealDictArrayData } from '@/utils/position'
+import { getJobAdvertised } from '@/api/search'
+import tablePage from './tableItems.vue'
 const props = defineProps({
 const props = defineProps({
   data: {
   data: {
     type: Object,
     type: Object,
@@ -169,6 +195,33 @@ const useJobTemplate = async () => {
   }
   }
 }
 }
 
 
+const closeClick = () => {
+  tableRef.value.close()
+}
+
+const validRef = ref()
+const tableRef = ref()
+const handleCancel = () => {
+  validRef.value.close()
+}
+const handleOpen = () => {
+  tableRef.value.open()
+}
+
+// 效验职位名称是否重复
+const tableItems = ref([])
+const handleValidName = async () => {
+  if (!formData.value.name) return
+  try {
+    const { data } = await getJobAdvertised({ jobName: formData.value.name })
+    tableItems.value = data ? dealDictArrayData([], data) : []
+    if (data && data.length > 0) {
+      // 弹窗提示
+      validRef.value.open()
+    }
+  } catch {}
+}
+
 const form = ref()
 const form = ref()
 const contentRef = ref()
 const contentRef = ref()
 const requirementRef = ref()
 const requirementRef = ref()
@@ -209,4 +262,40 @@ defineExpose({
   margin-top: 10px;
   margin-top: 10px;
  }
  }
 }
 }
+
+.dialog-content {
+  height: 70vh;
+  overflow-y: hidden;
+  padding-top: 45px;
+  .table {
+    height: 100%;
+    overflow-y: auto;
+  }
+  .dialog-close {
+    position: absolute;
+    top: 0;
+    right: 0;
+    height: 24px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding: 0 25px;
+    margin-top: 10px;
+    z-index: 1;
+    .dialog-close-plus {
+      width: 16px;
+      height: 2px;
+      background-color: #737987;
+      border-radius: 2px;
+      transform: rotate(45deg);
+    }
+    
+    .dialog-close-rotate {
+      position: absolute;
+      transform: rotate(-45deg);
+    }
+  }
+}
+
+
 </style>
 </style>

+ 226 - 0
components/positionItem/components/tableItems.vue

@@ -0,0 +1,226 @@
+<template>
+  <view v-if="list?.length" class="ss-p-b-30 ss-p-t-20">
+    <view v-for="(item, index) in list" :key="index" class="mList">
+      <view v-if="item?.hrName" class="d-flex align-center item-top">
+        <view class="avatarBox">
+          <image class="enterAvatar" :src="getUserAvatar(item.hrHeadImg)"></image>
+        </view>
+        <view class="ss-m-l-20 label-text">{{ item?.hrName }}</view>
+      </view>
+      <!-- 职位信息 -->
+      <view class="list-shape" style="border-radius: 12px;">
+        <!-- 职位 -->
+        <view class="titleBox my-5">
+          <view style="display: flex;align-items: center;">
+            <image v-if="item.jobFairIds?.length" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
+            <rich-text v-if="item.name?.indexOf('style') !== -1" class="job-name" :nodes="item.name"></rich-text>
+            <view v-else class="job-name">{{ formatName(item.name) }}</view>
+          </view>
+          <image v-if="item.top && tab === 1" src="/static/svg/topUp.svg" class="TopUpSvg"></image>
+        </view>
+        <!-- 职位类型 -->
+        <view class="font-size-13 ellipsis ss-m-5" style="color: #808080;">
+          <span>{{item.positionName }}</span>
+        </view>
+        <!-- 薪酬、工作地、学历、工作经验 -->
+        <view class="d-flex align-center justify-space-between">
+          <view class="font-size-13 ellipsis" style="flex: 1;">
+            <span class="tag-gap" style="color: #808080;">
+              <span>{{item.area?.str ?? '全国' }}</span>
+              <span class="divider-mx" v-if="item.eduName">|</span>
+              <span>{{item.eduName }}</span>
+              <span class="divider-mx" v-if="item.expName">|</span>
+              <span>{{item.expName }}</span>
+              <span class="divider-mx">|</span>
+              <span>{{!item.payFrom && !item.payTo ? '面议' : `${item.payFrom}-${item.payTo}${item.payName ? '/' + item.payName : ''}` }}</span>
+            </span>
+          </view>
+        </view>
+        <view class="d-flex font-size-13 color-666 ss-m-t-10">
+          <!-- <view class="ss-m-t-10 ss-m-r-15">到期时间:{{ item.expireTime ? timesTampChange(item.expireTime, 'Y-M-D') : '长期有效' }}</view> -->
+          <view class="ss-m-t-10">刷新时间:{{ item.refreshTime ? timesTampChange(item.refreshTime, 'Y-M-D h:m') : '暂无' }}</view>
+        </view>
+        <view class="sub-li-bottom ss-m-t-20">
+          <view  class="sub-li-bottom-item color-primary" style="width: 100%;" @tap.stop="handleDetail(item)">查看详情</view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+<script setup>
+import { timesTampChange } from '@/utils/date'
+import { formatName } from '@/utils/getText'
+import { getUserAvatar } from '@/utils/avatar'
+
+const props = defineProps({
+  list: { type: Array, default: () => [] },
+})
+
+// 职位详情
+const handleDetail = (item) => {
+  if (!item.id) return
+  let url = `/pagesB/positionDetail/index?jobId=${item.id}&isEdit=${item.edit}`
+  uni.navigateTo({ url })
+}
+</script>
+
+<style scoped lang="scss">
+.avatarBox {
+  max-width: 60rpx;
+  max-height: 60rpx;
+}
+.item-top {
+  padding: 20rpx 30rpx;
+  background: linear-gradient(90deg,#f5fcfc,#fcfbfa);
+  border-radius: 12px 12px 0 0;
+  font-size: 28rpx;
+  color: #0E100F;
+  .label-text {
+	  max-width: 100%;
+	  text-overflow: ellipsis;
+	  white-space: nowrap;
+	  overflow: hidden;
+  }
+}
+
+.date-time{
+  color:#d9d0d2;
+  float: right;
+}
+
+.divided-line {
+  width: 100%;
+  height: 1px;
+  background-color: #f0f2f7;
+  margin: 20px 0;
+
+}
+.enterAvatar{
+	width: 60rpx;
+	height: 60rpx;
+	margin: auto;
+  border-radius: 50%;
+}
+
+.job-name {
+  font-size: 16px;
+  font-weight: 700;
+  color: #0E100F;
+  max-width: 80vw;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+
+.salary-text {
+	float: right;
+	color: #00B760;
+  font-weight: 700;
+}
+.list-shape {
+	padding: 10px 30rpx 10px;
+  border-radius: 12px 12px 0 0;
+  .titleBox {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+}
+.tag-gap{
+	margin: 10rpx 10rpx 10rpx 0;
+}
+.tag-gap1{
+  margin-bottom: 20px;
+}
+.divider-mx{
+	margin: 0 10rpx;
+}
+.divider {
+	color:#e4d4d2;
+}
+
+//公司名称
+.cer-end{
+  position: absolute;
+  top: 85%;
+  right: 16%;
+}
+.cer-text{
+  text-decoration: underline;
+  margin: 0 5rpx;
+}
+//一行展示不全...
+.dis{
+	display: flex;
+	align-items: center;
+}
+.mList {
+  margin-bottom: 20rpx;
+  margin-left: 20rpx;
+  margin-right: 20rpx;
+  position: relative;
+  box-shadow: 1px 2px 12px rgba(0, 0, 0, 0.17);
+  border-radius: 20rpx;
+  background-color: #fbfbfb;
+}
+/* 列表触底暂无更多 */
+.mt { margin-top: 15rpx; }
+.mb { margin-bottom: 10rpx; }
+.ml { margin-left: 20rpx; }
+.mr { margin-right: 20rpx; }
+.mr-10{ margin-right: 10rpx; }
+.my-5{ margin: 5px 0; }
+.disable {
+  position: relative;
+  overflow: hidden;
+  &::after {
+    content: '已失效';
+    position: absolute;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 1.2em;
+    font-weight: bold;
+    color: #fc796f;
+    top: 0;
+    border-radius: 12px;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(255, 255, 255, 0.75);
+  }
+}
+.resumeCount {
+  color: #00B760;
+  font-size: 12px;
+  margin: 0 10px;
+}
+
+.sub-li-bottom {
+  display: flex;
+  justify-content: flex-end;
+  margin-top: 10px;
+  font-size: 13px;
+  color: #666;
+	&-item {
+		width: 25%;
+		height: 35px;
+		line-height: 35px;
+		text-align: center;
+		margin-right: 15px;
+		background-color: #f7f8fa;
+		border-radius: 4px;
+		&:last-child {
+			margin-right: 0;
+		}
+	}
+}
+.TopUpSvg {
+  width: 45px;
+  height: 45px;
+  position: absolute;
+  top: -3px;
+  right: -4px;
+}
+</style>