Преглед изворни кода

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

Xiao_123 пре 1 месец
родитељ
комит
2140e189be

+ 28 - 6
components/PositionList/index.vue

@@ -12,6 +12,7 @@
               <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 ss-m-r-10" @tap.stop="topUpSvgClick(item)"></image>
           </view>
           <!-- 职位类型 -->
           <view class="font-size-13 ellipsis ss-m-5" style="color: #808080;">
@@ -31,13 +32,13 @@
               </span>
             </view>
           </view>
-          <view class="font-size-13 color-666 ss-m-t-10">
-            <view class="ss-m-t-10">刷新时间:{{ item.refreshTime ? timesTampChange(item.refreshTime, 'Y-M-D h:m') : '暂无' }}</view>
+          <view class="d-flex font-size-13 color-666 ss-m-t-10">
             <view class="ss-m-t-10">到期时间:{{ item.expireTime ? timesTampChange(item.expireTime, 'Y-M-D') : '长期有效' }}</view>
+            <view class="ss-m-t-10 ss-m-l-15">刷新时间:{{ item.refreshTime ? timesTampChange(item.refreshTime, 'Y-M-D h:m') : '暂无' }}</view>
           </view>
           <view class="sub-li-bottom ss-m-t-20">
-            <view v-if=" tab !== 0" class="sub-li-bottom-item color-primary" @tap.stop="handleToResume(item)">{{ item.count || 0 }} 已投递简历</view>
-            <view v-if=" tab === 0 && (item?.status-0) === 99" class="sub-li-bottom-item color-primary" @tap.stop="toPay(item)">发布</view>
+            <view v-if="tab === 0" class="sub-li-bottom-item color-primary" style="width: 100%;" @tap.stop="toPay(item)">发布</view>
+            <view v-if="tab !== 0" class="sub-li-bottom-item color-primary" style="width: 45%;" @tap.stop="handleToResume(item)">{{ item.count || 0 }} 已投递简历</view>
             <view v-if="tab === 1" class="sub-li-bottom-item color-warning" @tap.stop="handleAction(item.top ? 4 : 3, '', item)">{{ item.top ? '取消置顶' : '置顶' }}</view>
             <view v-if="tab === 1" class="sub-li-bottom-item color-666" @tap.stop="handleAction(0, '', item, item)">关闭</view>
             <view v-if="tab === 2" class="sub-li-bottom-item color-warning" @tap.stop="handleAction(1, '', item, item)">激活</view>
@@ -108,6 +109,7 @@ const toPay = async (val) => {
 // setTimeout(() => { toPay(props.list[0]) }, 2000)
 
 const confirm = ref()
+const confirmType = ref('closeJob') // 确认框类型
 const dialogContent = ref('')
 let handleActionInfo = {}
 const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
@@ -124,6 +126,7 @@ const handleAction = async (index, type, { id }, item) => {
     if (index === 0) {
       const text = userInfo.value?.entitlement?.publishJobCount && userInfo.value?.entitlement?.publishJobCount > 0 ? '将消耗一个发布点数' : '将重新收取费用'
       const positionName = item?.name ? '【' + formatName(item?.name) + '】' : '所选'
+      confirmType.value = 'closeJob' // 确认框类型
       dialogContent.value = `是否确认关闭${positionName}职位?关闭后再激活,${text}!`
       confirm.value.open()
       return
@@ -151,7 +154,23 @@ const handleClose = () => {
   confirm.value.close()
 }
 
-const handleConfirm = async () => {
+// 取消置顶
+const topUpSvgClickVal = ref({})
+const topUpSvgClick = (item) => {
+  topUpSvgClickVal.value = item
+  confirmType.value = 'topUpJob' // 确认框类型
+  const positionName = item?.name ? '【' + formatName(item?.name) + '】职位' : '职位'
+  dialogContent.value = `是否取消置顶${positionName}?`
+  confirm.value.open()
+}
+
+const handleConfirm = () => {
+  if (confirmType.value === 'closeJob') closeJob()
+  if (confirmType.value === 'topUpJob') handleAction(4, '', topUpSvgClickVal.value)
+}
+
+// 关闭职位
+const closeJob = async () => {
   try {
     uni.showLoading({ title: '关闭中...', mask: true })
     await apiList[handleActionInfo?.index](handleActionInfo?.ids)
@@ -323,7 +342,7 @@ const paySuccess = () => {
   font-size: 13px;
   color: #666;
 	&-item {
-		width: 50%;
+		width: 25%;
 		height: 35px;
 		line-height: 35px;
 		text-align: center;
@@ -335,4 +354,7 @@ const paySuccess = () => {
 		}
 	}
 }
+.TopUpSvg {
+  width: 25px; height: 25px; color: #FB8C00;
+}
 </style>

+ 5 - 1
components/RichEditor/index.vue

@@ -36,6 +36,7 @@
 						class="ql-container"
 						placeholder="开始输入..."
 						show-img-size show-img-toolbar show-img-resize
+						:auto-focus="autoFocus"
 						@statuschange="onStatusChange"
 						@ready="onEditorReady"
 						@input="onInputChange"
@@ -64,6 +65,10 @@
 				default: 0,
 				validator: value => value >= 0
 			},
+			autoFocus: {
+				type: Boolean,
+				default: false
+			},
 			richValue: {
 				type: String,
 				default: ''
@@ -152,7 +157,6 @@
 				// #ifdef APP-PLUS || MP-WEIXIN || H5
 				this.createSelectorQuery().select('#editor').context((res) => {
 					this.editorCtx = res.context
-					
 					this.setEditorContent(this.richValue)
 				}).exec()
 				// #endif	

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

@@ -14,7 +14,7 @@
         <!-- 设置为招聘会职位 -->
         <uni-forms-item label="招聘会" name="bizId" >
           <uni-data-picker class="picker" popup-title="请选择招聘会" v-model="formData.bizId" :localdata="jobFairLIst" :clear-icon="false" :map="{ text: 'title', value: 'id'}"></uni-data-picker>
-          <view style="color: #777; font-size: 12px;" class="ss-m-t-8 ss-m-l-10">职位会在对应的招聘会显示</view>
+          <view style="color: #777; font-size: 12px;" class="ss-m-t-8 ss-m-l-10">发布的职位会在对应的招聘会显示</view>
         </uni-forms-item>
       </template>
       <uni-forms-item label="到期时间" name="expireTime" required>

+ 1 - 0
static/svg/topUp.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742979347889" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1803" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M128 128l768 0 0 89.6-768 0 0-89.6ZM732.288 496 555.7888 309.8624c-10.9504-11.2064-26.4128-18.4896-43.7888-18.4896s-32.832 7.2832-43.6032 18.6048L291.5264 495.8656c-9.2288 10.0224-15.1104 22.9696-15.1104 37.3248 0 30.816 26.3808 55.8016 58.8992 55.8016 0.4544 0 0.896-0.0576 1.344-0.0704l0 0.352L416 589.2736 416 896l192 0L608 589.2736l77.1904 0 0-0.448c1.1648 0.064 2.3104 0.1792 3.5008 0.1792 32.5248 0 58.8992-24.992 58.8992-55.8144C747.5904 518.8352 741.7024 505.8944 732.288 496z" fill="#FB8C00" p-id="1804"></path></svg>