Selaa lähdekoodia

面试-修改面试、重新邀约

Xiao_123 1 kuukausi sitten
vanhempi
commit
f39561164f
5 muutettua tiedostoa jossa 94 lisäystä ja 31 poistoa
  1. 58 5
      api/interview.js
  2. 0 15
      api/new/interview.js
  3. 2 0
      pagesA/interview/index.vue
  4. 16 10
      pagesA/interview/item.vue
  5. 18 1
      pagesB/InviteInterview/index.vue

+ 58 - 5
api/interview.js

@@ -1,5 +1,18 @@
 import request from "@/utils/request"
 
+// 面试信息分页
+export const getInterviewInvitePage = async (params) => {
+	return request({
+		url: '/app-api/menduner/system/recruit/interview-invite/page',
+		params,
+		method: 'GET',
+		custom: {
+			showLoading: false,
+			auth: true
+		}
+	})
+}
+
 // 完成面试
 export const completedInterviewInvite = async (id) => {
 	return request({
@@ -13,12 +26,52 @@ export const completedInterviewInvite = async (id) => {
 	})
 }
 
-// 面试信息分页
-export const getInterviewInvitePage = async (params) => {
+// 保存、重新邀约
+export const saveInterviewInvite = async (data) => {
 	return request({
-		url: '/app-api/menduner/system/recruit/interview-invite/page',
-		params,
-		method: 'GET',
+		url: '/app-api/menduner/system/recruit/interview-invite/save',
+		method: 'POST',
+		data,
+		custom: {
+			showLoading: false,
+			openEncryption: true,
+			auth: true
+		}
+	})
+}
+
+// 取消面试
+export const cancelInterviewInvite = async (data) => {
+	return request({
+		url: '/app-api/menduner/system/recruit/interview-invite/cancellation',
+		method: 'POST',
+		data,
+		custom: {
+			showLoading: false,
+			auth: true
+		}
+	})
+}
+
+// 未能爽约面试
+export const noAttendInterviewInvite = async (data) => {
+	return request({
+		url: '/app-api/menduner/system/recruit/interview-invite/not/attended',
+		method: 'POST',
+		data,
+		custom: {
+			showLoading: false,
+			auth: true
+		}
+	})
+}
+
+// 面试反馈
+export const feedbackInterviewInvite = async (data) => {
+	return request({
+		url: '/app-api/menduner/system/recruit/interview-invite/feedback',
+		method: 'POST',
+		data,
 		custom: {
 			showLoading: false,
 			auth: true

+ 0 - 15
api/new/interview.js

@@ -1,15 +0,0 @@
-import request from "@/utils/request"
-
-// 面试-保存、重新邀约
-export const saveInterviewInvite = (data) => {
-	return request({
-		url: '/app-api/menduner/system/recruit/interview-invite/save',
-		method: "POST",
-		data,
-		custom: {
-			openEncryption: true,
-			auth: true,
-			showLoading: false
-		}
-	})
-}

+ 2 - 0
pagesA/interview/index.vue

@@ -100,6 +100,8 @@ const getList = async () => {
 
 onShow(() => {
   if (!tabList.value.length) return
+  items.value = []
+  query.value.pageNo = 1
   getList()
 })
 

+ 16 - 10
pagesA/interview/item.vue

@@ -61,16 +61,16 @@
 
     <!-- 完成面试 -->
     <uni-popup ref="finishPopup" type="dialog">
-				<uni-popup-dialog 
-          type="warn" 
-          cancelText="取消"
-          confirmText="确定" 
-          title="系统提示" 
-          content="是否确认已完成面试?"
-          @confirm="handleFinishConfirm"
-          @close="handleFinishClose"
-        ></uni-popup-dialog>
-			</uni-popup>
+			<uni-popup-dialog 
+        type="warn" 
+        cancelText="取消"
+        confirmText="确定" 
+        title="系统提示" 
+        content="是否确认已完成面试?"
+        @confirm="handleFinishConfirm"
+        @close="handleFinishClose"
+      ></uni-popup-dialog>
+		</uni-popup>
 	</view>
 </template>
 
@@ -158,6 +158,12 @@ const handleActionClick = (type, val) => {
   if (type === 'completed') {
     finishPopup.value.open()
   }
+	// 修改面试、重新邀约
+	if (type === 'edit') {
+		uni.navigateTo({
+			url: '/pagesB/InviteInterview/index?editData=' + encodeURIComponent(JSON.stringify(val))
+		})
+	}
 }
 
 const obj = {

+ 18 - 1
pagesB/InviteInterview/index.vue

@@ -29,7 +29,7 @@ import { mobile } from '@/utils/validate'
 import { getJobAdvertised } from '@/api/new/position'
 import { formatName } from '@/utils/getText'
 import { getInterviewInviteDefaultTime } from '@/utils/date'
-import { saveInterviewInvite } from '@/api/new/interview'
+import { saveInterviewInvite } from '@/api/interview'
 
 const formRef = ref(null)
 const useUserStore = userStore()
@@ -78,6 +78,23 @@ const handleChangeJob = (e) =>{
 }
 
 onLoad(async (options) => {
+	// 编辑面试、重新邀约
+	if (options?.editData) {
+		const obj = JSON.parse(decodeURIComponent(options.editData))
+		for (let key in formData.value) {
+			formData.value[key] = obj[key]
+		}
+		formData.value.id = obj.id
+		if (obj.jobFairId) formData.value.jobFairId = obj.jobFairId
+		// 有实习时间的则为学生,需传递实习时间
+		if (obj?.practiceStartTime && obj?.practiceEndTime) {
+			formData.value.practiceStartTime = obj.practiceStartTime
+			formData.value.practiceEndTime = obj.practiceEndTime
+		}
+		await getJobList()
+		return
+	}
+
 	const { id, jobId } = options
 	if (!id) {
 		uni.showToast({