Browse Source

Merge branch 'master' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp

lifanagju_citu 2 months ago
parent
commit
b22524cb1d

+ 43 - 0
api/student.js

@@ -0,0 +1,43 @@
+import request from "@/utils/request"
+
+// 获取企业推荐信列表
+export const getEnterpriseRecommendationList = async (data) => {
+	return request({
+		url: '/app-api/flames/student/recommendation/list',
+		method: 'POST',
+		data,
+		custom: {
+			openEncryption: true,
+			showLoading: false,
+			auth: true
+		}
+	})
+}
+
+// 获取实习证书列表
+export const getEnterpriseCertificateList = async (data) => {
+	return request({
+		url: '/app-api/flames/student/internship/certificate/list',
+		method: 'POST',
+		data,
+		custom: {
+			openEncryption: true,
+			showLoading: false,
+			auth: true
+		}
+	})
+}
+
+// 获取学校详情
+export const getSchoolDetails = async (data) => {
+	return request({
+		url: '/app-api/flames/school/detail',
+		method: 'POST',
+		data,
+		custom: {
+			openEncryption: true,
+			showLoading: false,
+			auth: true
+		}
+	})
+}

+ 6 - 0
pages.json

@@ -146,6 +146,12 @@
 						"navigationBarTitleText": "实习证书"
 					}
 				},
+				{
+					"path": "student/certificateDetail",
+					"style": {
+						"navigationBarTitleText": "实习证书详情"
+					}
+				},
 				{
 					"path": "student/enterpriseRecommendationLetter",
 					"style": {

+ 1 - 1
pages/index/my.vue

@@ -105,7 +105,7 @@ const itemList = [
 const defaultList = [
 	{	title: '在线简历',	path: '/pagesA/resumeOnline/index'	},					
 	{	title: '附件简历',	path: '/pagesA/resume/index'	},					
-	{ title: '学生专区', path: '/pagesA/student/index', key: 'student', hide: false },
+	// { title: '学生专区', path: '/pagesA/student/index', key: 'student', hide: false },
 	{ title: '面试管理', path: '/pagesA/interview/index' },
 	{	title: '会员套餐', path: '/pagesA/vipPackage/index'	},		
 	// {	title: '我的分享码',	path: 'shareQrCode'	},					

+ 191 - 0
pagesA/student/certificateDetail.vue

@@ -0,0 +1,191 @@
+<template>
+	<view style="width: 100vw;height: 100vh;overflow: auto;">
+		<view class="cer-img">
+      <image src="https://minio.citupro.com/dev/static/bgc.jpg" mode="scaleToFill" style="width: 100%;height: 100%;"></image>
+      <view class="cer-introduce">
+        兹有
+        <span class="cer-text">{{ schoolName }}</span>
+        <span class="cer-text">{{ info.student.majorName }}</span>
+        专业<span class="cer-text">{{ info.student.studentName }}</span>
+        同学于<span class="cer-text">{{ info.praciceSubmitRecord.jobJoinDate }}</span>
+        至<span class="cer-text">{{ info.praciceSubmitRecord.internshipEndDate }}</span>
+        在<span class="cer-text">{{ info.enterprise.enterpriseName }}</span>
+        <span class="cer-text">{{ info.enterpriseRecruit.enterpriseRecruitJobName }}</span>岗位实习。
+      </view>
+      <view class="cer-comment">{{ info.studentInternshipCertificate.comment }}</view>
+      <view class="cer-prove">特此证明。</view>
+      <view class="cer-end">
+        <view>{{ info.enterprise.enterpriseName }}</view>
+        <view>{{ info.studentInternshipCertificate.createDate }}</view>
+      </view>
+    </view>
+
+		<view class="bottom-sticky">
+      <view style="display: flex;justify-content: space-evenly;align-itens: center;width: 100%;margin: 20rpx 0;">
+        <view @click="shareClick(info)" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
+          <uni-icons type="redo-filled" size="24" color="#00B760"/>
+          <span style="color:#00B760;font-weight:bold;">分享</span>
+        </view>
+        <button v-if="!!info.studentInternshipCertificate.fileUrl" type="primary" size="default" class="buttons" @click="viewReport(info)">查看附件</button>
+        <button v-else type="primary" size="default" class="buttons" style="background-color:grey;">查看附件</button>
+      </view>
+    </view>
+
+		<!-- <uni-popup ref="shareup" type="dialog">
+			<view class="f-straight" style="height: 200px;width:80vw;background-color: #fff;border-radius: 10px;">
+				<text style="text-align:center;color:grey;">是否分享实习证书?</text>
+				<view class="f-horizon pop-btn-wrapper">
+					<button  size="default" class="pop-confirm" pain open-type="share"  @click="popupClose">确认</button>
+          <button  size="default" class="pop-cancel" pain @click="popupClose">取消</button>
+				</view>
+			</view>
+		</uni-popup> -->
+	</view>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+import { getEnterpriseCertificateList } from '@/api/student'
+import { preview } from '@/utils/preview'
+import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
+
+const schoolName = ref('北京交通大学')
+const info = ref({
+	student: {
+		majorName: '文言文',
+		studentName: '张三',
+	},
+	praciceSubmitRecord: {
+		jobJoinDate: '2022-12-12',
+		internshipEndDate: '2022-12-12',
+	},
+	enterprise: {
+		enterpriseName: '北京交通大学',
+	},
+	enterpriseRecruit: {
+		enterpriseRecruitJobName: '前端工程师',
+	},
+	studentInternshipCertificate: {
+		comment: '优秀',
+		createDate: '2022-12-12',
+		fileUrl: 'https://minio.menduner.com/dev/person/725759784858554368/attachment/7cde29dc69c1403649be55d4c2bfd3d8304c088dc79ab25afe9c4bf55d3b382f.docx'
+	}
+})
+const query = ref({
+	size:999,
+	current:1,
+	studentId:null,
+  studentInternshipCertificateId:null
+})
+
+onLoad((options) => {
+	console.log(options, 'options')
+
+	// onShareAppMessage(() => {
+	// 	if(res.from == 'button'){
+	// 		return {
+	// 			title: '实习证书',
+	// 			path:`/pagesC/my/certificationShare?studentId=${that.curItem.student.studentId}&&certificateId=${that.curItem.studentInternshipCertificate.studentInternshipCertificateId}`
+	// 		}
+	// 	}
+	// })
+})
+
+// 获取实习证书列表
+const getList = async () => {
+  try {
+    const { data } = await getEnterpriseCertificateList({ size: 9999, current: 1 })
+    console.log(data, '实习证书')
+    // list.value = data.records.reverse()
+  } catch {}
+}
+
+const viewReport = (item) => {
+	if (!item.studentInternshipCertificate.fileUrl) {
+		uni.showToast({
+      title: '加载失败,请稍后重试',
+      icon: 'none',
+      duration: 2000
+    })
+		return
+	}
+	preview(item.studentInternshipCertificate.fileUrl)
+}
+</script>
+
+<style lang="less" scoped>
+.cer-img{
+  width: 100vw;
+  height: 89.5vh;
+  position: relative;
+  font-weight: 600;
+}
+//实习信息
+.cer-introduce{
+  width: 70vw;
+  position: absolute;
+  top: 49%;
+  left: 50%;
+  transform: translate(-50%,-50%);
+  text-indent: 2em;
+}
+//点评内容
+.cer-comment{
+  width: 70vw;
+  position: absolute;
+  top: 66%;
+  left: 50%;
+  transform: translate(-50%,-50%);
+	text-indent: 2em;
+}
+//特此证明
+.cer-prove{
+  width: 70vw;
+  position: absolute;
+  top: 80%;
+  left: 50%;
+  transform: translate(-50%,-50%);
+  text-indent: 2em;
+}
+//公司名称
+.cer-end{
+  position: absolute;
+  top: 85%;
+  right: 16%;
+}
+.cer-text{
+  text-decoration: underline;
+  margin: 0 5rpx;
+}
+button::after{
+	border:none;
+}
+.pop-btn-wrapper{
+	position: relative;
+	margin-top: 15vh;
+	.pop-confirm{
+		background-color: #fff;
+		color: #4b9afd;
+		font-size: 21px;
+		width: 45vw;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+	}
+	.pop-cancel{
+		background-color: #fff;
+		font-size: 21px;
+		width: 45vw;
+		position: absolute;
+		bottom: 0;
+		right: 0;
+	}
+}
+.buttons{
+  width: 70vw;
+  height: 44px;
+  border-radius: 25px;
+  background-color: #00B760;
+  margin: 0;
+}
+</style>

+ 65 - 1
pagesA/student/enterpriseRecommendationLetter.vue

@@ -1,8 +1,72 @@
 <template>
-  <view class="text-center ss-m-t-80" style="color: #777;">未开放 . . .</view>
+  <view style="height: 98vh; background-color: #f2f4f7; padding-top: 10px;">
+    <view v-if="list.length > 0">
+      <uni-card v-for="(item, index) in list" class="list-item" @tap.stop="viewReport(item)" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
+        <view class="font-weight-bold">From: {{ formatName(item.enterprise.enterpriseName) }}</view>
+				<view>创建时间:{{ timesTampChange(item.entity.createDate) }}</view>
+        <view style="text-align: end;">
+          <text class="color-primary" @tap.stop="viewReport(item)">点击查看</text>
+        </view>
+      </uni-card>
+		</view>
+		<view v-else class="nodata-img-parent">
+			<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
+		</view>
+  </view>
 </template>
 
 <script setup>
+import { ref } from 'vue'
+import { getEnterpriseRecommendationList } from '@/api/student'
+import { onShow } from '@dcloudio/uni-app'
+import { formatName } from '@/utils/getText'
+import { timesTampChange } from '@/utils/date'
+import { preview } from '@/utils/preview'
+
+const list = ref([
+  {
+    enterprise: {
+      enterpriseName: '门墩儿科技有限公司',
+    },
+    entity: {
+      createDate: 1740570206120,
+      fileUrl: 'https://minio.menduner.com/dev/person/725759784858554368/attachment/7cde29dc69c1403649be55d4c2bfd3d8304c088dc79ab25afe9c4bf55d3b382f.docx'
+    }
+  }
+])
+
+// 推荐信预览
+const viewReport = (item) => {
+  if (!item.entity.fileUrl) {
+    uni.showToast({
+      title: '加载失败,请稍后重试',
+      icon: 'none',
+      duration: 2000
+    })
+    return
+  }
+  preview(item.entity.fileUrl)
+}
+
+// 获取推荐信列表
+const getList = async () => {
+  try {
+    const { data } = await getEnterpriseRecommendationList({ size: 9999, current: 1 })
+    console.log(data, '推荐信列表')
+    // list.value = data.records.reverse()
+  } catch {}
+}
+
+onShow(async () => {
+  // await getList()
+})
 </script>
+
 <style lang="scss" scoped>
+.list-item {
+  background-color: #fff;
+  border-radius: 3px;
+  padding: 20px;
+  box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);
+}
 </style>

+ 3 - 4
pagesA/student/index.vue

@@ -1,4 +1,3 @@
-<!-- 校验是否完善人才必填信息 -->
 <template>
   <view class="card">
     <uni-list>
@@ -22,9 +21,9 @@ const defaultList = [
 	{	title: '学生信息',	path: '/pagesA/student/information'	},
 	{	title: '实习企业',	path: '/pagesA/student/internshipCompany', rightTex: '未开放' },
 	{	title: '实习报告',	path: '/pagesA/student/internshipReport', rightTex: '未开放' },
-	{	title: '实习证书',	path: '/pagesA/student/internshipCertificate', rightTex: '未开放'	},
-	{	title: '企业推荐信',	path: '/pagesA/student/enterpriseRecommendationLetter', rightTex: '未开放' },
-	{	title: '实习管家',	path: '/pagesA/student/internshipButler', rightTex: '未开放' },
+	{	title: '实习证书',	path: '/pagesA/student/internshipCertificate'	},
+	{	title: '企业推荐信',	path: '/pagesA/student/enterpriseRecommendationLetter' },
+	{	title: '实习管家',	path: '/pagesA/student/internshipButler' },
 ]
 const list = ref(defaultList.filter(e => !e.hide))
 

+ 3 - 3
pagesA/student/information.vue

@@ -2,14 +2,14 @@
 <template>
   <scroll-view class="scrollBox" scroll-y="true">
     <view class="content">
-      <view class="text-center ss-m-b-50 font-size-20 color-primary">学生信息认证</view>
+      <!-- <view class="text-center ss-m-b-50 font-size-20 color-primary">学生信息认证</view> -->
       <uni-forms
         ref="baseInfoRef"
         v-model="formData"
         :rules="formRules"
         validateTrigger="bind"
-        label-width="90px"
-        labelAlign="center"
+        label-width="131px"
+        labelAlign="right"
       >
         <uni-forms-item name="schoolId" label="就读学校" required>
           <uni-data-picker v-model="formData.schoolId" :localdata="schools" :clear-icon="false" popup-title="请选择就读学校" @change="getDepartmentList" :map="{ text: 'schoolName', value: 'schoolId' }"></uni-data-picker>

+ 26 - 3
pagesA/student/internshipButler.vue

@@ -1,8 +1,31 @@
 <template>
-  <view class="text-center ss-m-t-80" style="color: #777;">未开放 . . .</view>
+    <view class="parents">
+        <image src="https://minio.citupro.com/dev/static/wx.jpg" mode="aspectFit" show-menu-by-longpress="true" class="img-code"></image>
+		<view class="tipsText">长按添加管家微信</view>
+    </view>
 </template>
 
 <script setup>
+	// 实习管家
 </script>
-<style lang="scss" scoped>
-</style>
+
+<style lang="less" scoped>
+.parents{
+    position: relative;
+    background-color: #f8f8f8;
+}
+.img-code{
+    width: 100%;
+    height: 100vh;
+}
+.tipsText{
+    position: absolute;
+    top: 89%;
+    right: 50%;
+    transform: translate(50%, 0);
+    text-align: center;
+    color: #c2c5c7;
+    font-size: 12px;
+    font-weight: 700;
+}
+</style>

+ 65 - 1
pagesA/student/internshipCertificate.vue

@@ -1,8 +1,72 @@
 <template>
-  <view class="text-center ss-m-t-80" style="color: #777;">未开放 . . .</view>
+  <view style="height: 98vh; background-color: #f2f4f7; padding-top: 10px;">
+    <view v-if="list.length > 0">
+      <uni-card v-for="(item, index) in list" class="list-item" @tap.stop="handleToDetail(item)" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
+        <view class="font-weight-bold">实习企业: {{ formatName(item.enterprise.enterpriseName) }}</view>
+				<view>创建时间:{{ timesTampChange(item.studentInternshipCertificate.createDate) }}</view>
+        <view>实习点评:{{ item.studentInternshipCertificate.comment }}</view>
+        <view style="text-align: end;">
+          <text class="color-primary" @tap.stop="handleToDetail(item)">点击查看</text>
+        </view>
+      </uni-card>
+		</view>
+		<view v-else class="nodata-img-parent">
+			<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
+		</view>
+  </view>
 </template>
 
 <script setup>
+import { ref } from 'vue'
+import { getEnterpriseCertificateList } from '@/api/student'
+import { onShow } from '@dcloudio/uni-app'
+import { formatName } from '@/utils/getText'
+import { timesTampChange } from '@/utils/date'
+import { preview } from '@/utils/preview'
+
+const list = ref([
+  {
+    enterprise: {
+      enterpriseName: '门墩儿科技有限公司',
+    },
+    entity: {
+      createDate: 1740570206120,
+      fileUrl: 'https://minio.menduner.com/dev/person/725759784858554368/attachment/7cde29dc69c1403649be55d4c2bfd3d8304c088dc79ab25afe9c4bf55d3b382f.docx'
+    },
+    studentInternshipCertificate: {
+      comment: '这是一条测试数据',
+      createDate: 1740570206120
+    }
+  }
+])
+
+// 查看证书详情
+const handleToDetail = (item) => {
+  console.log(111)
+  uni.navigateTo({
+    url: '/pagesA/student/certificateDetail?id=' + '1111'
+  })
+}
+
+// 获取实习证书列表
+const getList = async () => {
+  try {
+    const { data } = await getEnterpriseCertificateList({ size: 9999, current: 1 })
+    console.log(data, '实习证书')
+    // list.value = data.records.reverse()
+  } catch {}
+}
+
+onShow(async () => {
+  // await getList()
+})
 </script>
+
 <style lang="scss" scoped>
+.list-item {
+  background-color: #fff;
+  border-radius: 3px;
+  padding: 20px;
+  box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);
+}
 </style>

+ 21 - 37
pagesB/jobFair/enterprisesClassification.vue

@@ -46,15 +46,14 @@
                   <span class="divider tag-gap1" v-if="val?.industryName && val?.scaleName"> | </span>
                   <span class="color-999">{{ val?.scaleName || '' }}</span>
                 </view>
-                <view class="ss-m-t-10" style="overflow: hidden;height: 46px;">
+                <view class="ss-m-t-10" style="overflow: hidden; height: 57px;">
                   <uni-tag 
-                    v-for="(tag,i) in val?.welfareList || []"
+                    v-for="(job,i) in val?.lastJobTop5 || []"
                     :key="i"
-                    class="ss-m-r-5"
-                    :text="tag"
+                    :text="formatName(job.name)"
                     inverted="false"
-                    size="mini"
-                    custom-style="background-color: #ececec; color: #666; border-color: #ececec; display: inline-block;"
+                    size="default"
+                    custom-style="background-color: #00B760; color: #fff; border-color: #00B760; display: inline-block; border-radius: 15px; margin: 0 5px 5px 0;"
                   />
                 </view>
               </view>
@@ -112,11 +111,23 @@ onLoad(async (options) => {
   
   // 转发朋友
   onShareAppMessage(() => {
-    return getShareParams()
+    if(!jobFairTitle.value){
+      setTimeout(() => {}, 1000)
+    }
+    return {
+      title: jobFairTitle.value,
+      path: `/pagesB/jobFair/enterprisesClassification?jobFairId=${options?.jobFairId}`
+    }
   })
   // 转发朋圈
   onShareTimeline(() => {
-    return getShareParams()
+    if(!jobFairTitle.value){
+      setTimeout(() => {}, 1000)
+    }
+    return {
+      title: jobFairTitle.value || '门墩儿 专注顶尖招聘',
+      path: `/pagesB/jobFair/enterprisesClassification?jobFairId=${options?.jobFairId}`
+    }
   })
 })
 
@@ -169,8 +180,8 @@ const getEnterpriseList = async () => {
   try {
     const params = { ...query }
     // tab对应的职位类型id列表
-    const idList = tabIndex.value !== -1 ? tabList.value[tabIndex.value]?.value : []
-    idList?.length && idList.forEach((value, index) => { params[`enterpriseId[${index}]`] = value })
+    const idList = tabIndex.value !== -1 ? tabList.value[tabIndex.value]?.content : []
+    idList?.length && idList.forEach((value, index) => { params[`enterpriseId[${index}]`] = value.value })
     //
     const res = await getJobFairEnterprisePage(params)
     const list = res?.data?.list || []
@@ -220,33 +231,6 @@ const handleShare = () => {
     url: `/pagesB/jobFair/jobFairShare?jobFairId=${query.jobFairId}`
 	})
 }
-
-// 转发
-const getShareParams = async () => {
-  const shareParams = {
-    title: '门墩儿-招聘会',
-    path: `/pagesB/jobFair/enterprisesClassification?jobFairId=${query.jobFairId}`,
-  }
-  try {
-    if (!jobFairTitle.value) await getJobFairDetail() // 尝试异步获取
-    if (jobFairTitle.value) shareParams.title = jobFairTitle.value
-    return shareParams
-  } catch (error) {
-    console.error('获取分享参数失败:', error)
-    // 返回默认值
-    return shareParams
-  }
-}
-
-// 转发朋友
-onShareAppMessage(() => {
-  return getShareParams()
-})
-// 转发朋圈
-onShareTimeline(() => {
-  return getShareParams()
-})
-
 </script>
 
 <style scoped lang="scss">

+ 16 - 34
pagesB/jobFair/positionClassification.vue

@@ -135,11 +135,23 @@ onLoad(async (options) => {
   
   // 转发朋友
   onShareAppMessage(() => {
-    return getShareParams()
+    if (!options?.enterpriseId && !jobFairTitle.value) setTimeout(() => {}, 1000)
+    let path = `/pagesB/jobFair/positionClassification?jobFairId=${options.jobFairId}`
+    if (options?.enterpriseId) path += `&enterpriseId=${options.enterpriseId}&entName=${options.entName}`
+    return {
+      title: options?.enterpriseId ? options?.entName || '门墩儿 专注顶尖招聘' : jobFairTitle.value,
+      path
+    }
   })
   // 转发朋圈
   onShareTimeline(() => {
-    return getShareParams()
+    if (!query.enterpriseId && !jobFairTitle.value) setTimeout(() => {}, 1000)
+    let path = `/pagesB/jobFair/positionClassification?jobFairId=${options.jobFairId}`
+    if (options?.enterpriseId) path += `&enterpriseId=${options.enterpriseId}&entName=${options.entName}`
+    return {
+      title: query.enterpriseId ? entName.value || '门墩儿 专注顶尖招聘' : jobFairTitle.value,
+      path
+    }
   })
 })
 
@@ -205,8 +217,8 @@ const getEntPositionList = async () => {
   try {
     const params = { ...query }
     // tab对应的职位类型id列表
-    const idList = tabIndex.value !== -1 ? tabList.value[tabIndex.value]?.value : []
-    idList?.length && idList.forEach((value, index) => { params[`positionId[${index}]`] = value })
+    const idList = tabIndex.value !== -1 ? tabList.value[tabIndex.value]?.content : []
+    idList?.length && idList.forEach((value, index) => { params[`positionId[${index}]`] = value.value })
     //
     const res = await getJobFairEntJobPage(params)
     const list = res?.data?.list || []
@@ -241,12 +253,6 @@ const loadingMore = () => {
   getEntPositionList()
 }
 
-// const goBack = () => {
-// 	uni.navigateTo({
-// 		url: '/pagesB/jobFair/index'
-// 	})
-// }
-
 const entClick = (info) => {
   // 点击企业信息跳转企业职位列表(招聘会内)。如果已经在了则不跳转
   if (info?.enterpriseId && !query.enterpriseId) {
@@ -262,30 +268,6 @@ const handleShare = () => {
   if (query.enterpriseId) url = url + `&enterpriseId=${query.enterpriseId}`
 	uni.navigateTo({ url })
 }
-
-// 转发
-const getShareParams = async () => {
-  const shareParams = {
-    title: '门墩儿-招聘会',
-    path: `/pagesB/jobFair/positionClassification?jobFairId=${query.jobFairId}`,
-  }
-  try {
-    if (query.enterpriseId) {
-      shareParams.title = entName.value || shareParams.title
-      shareParams.path = shareParams.path + `&enterpriseId=${query.enterpriseId}&entName=${entName.value}`
-    } else {
-      if (!jobFairTitle.value) await getJobFairDetail() // 尝试异步获取
-      if (jobFairTitle.value) shareParams.title = jobFairTitle.value
-    }
-    
-    return shareParams
-
-  } catch (error) {
-    // 返回默认值
-    return shareParams
-  }
-}
-
 </script>
 
 <style scoped lang="scss">

+ 1 - 1
utils/config.js

@@ -13,7 +13,7 @@ const config = {
   }
 }
 
-export const envObj = config['httpsTest']
+export const envObj = config['produce']
 
 export const baseUrl = envObj.baseUrl