浏览代码

预览实习报告和企业推荐信

lifanagju_citu 2 月之前
父节点
当前提交
faec0c8d50
共有 3 个文件被更改,包括 48 次插入71 次删除
  1. 21 65
      pagesA/student/certificateDetail.vue
  2. 27 5
      pagesA/student/internshipRecord.vue
  3. 0 1
      pagesA/student/internshipReport.vue

+ 21 - 65
pagesA/student/certificateDetail.vue

@@ -1,32 +1,32 @@
 <template>
 <template>
-	<view style="width: 100vw;height: 100vh;overflow: auto;">
+	<view v-if="itemData" style="width: 100vw;height: 100vh;overflow: auto;">
 		<view class="cer-img">
 		<view class="cer-img">
       <image src="https://minio.citupro.com/dev/static/bgc.jpg" mode="scaleToFill" style="width: 100%;height: 100%;"></image>
       <image src="https://minio.citupro.com/dev/static/bgc.jpg" mode="scaleToFill" style="width: 100%;height: 100%;"></image>
       <view class="cer-introduce">
       <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>岗位实习。
+        <span class="cer-text">{{ itemData?.student?.schoolName }}</span>
+        <span class="cer-text">{{ itemData?.student?.majorName }}</span>
+        专业<span class="cer-text">{{ itemData?.person?.name }}</span>
+        同学于<span class="cer-text">{{ itemData?.startTime ? timesTampChange(itemData?.startTime, 'Y-M-D') : '' }}</span>
+        至<span class="cer-text">{{ itemData?.endTime ? timesTampChange(itemData?.endTime, 'Y-M-D') : '' }}</span>
+        在<span class="cer-text">{{ itemData?.enterprise?.enterpriseName }}</span>
+        <span class="cer-text">{{ formatName(itemData?.enterprise?.anotherName || itemData?.enterprise?.name) }}</span>岗位实习。
       </view>
       </view>
-      <view class="cer-comment">{{ info.studentInternshipCertificate.comment }}</view>
+      <view class="cer-comment">{{ itemData?.evaluate }}</view>
       <view class="cer-prove">特此证明。</view>
       <view class="cer-prove">特此证明。</view>
       <view class="cer-end">
       <view class="cer-end">
-        <view>{{ info.enterprise.enterpriseName }}</view>
-        <view>{{ info.studentInternshipCertificate.createDate }}</view>
+        <!-- <view>{{ itemData?.enterprise?.enterpriseName }}</view> -->
+        <view>{{ itemData?.createTime ? timesTampChange(itemData?.createTime, 'Y-M-D') : '' }}</view>
       </view>
       </view>
     </view>
     </view>
 
 
 		<view class="bottom-sticky">
 		<view class="bottom-sticky">
       <view style="display: flex;justify-content: space-evenly;align-itens: center;width: 100%;margin: 20rpx 0;">
       <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;">
+        <!-- <view @click="shareClick(itemData)" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
           <uni-icons type="redo-filled" size="24" color="#00B760"/>
           <uni-icons type="redo-filled" size="24" color="#00B760"/>
           <span style="color:#00B760;font-weight:bold;">分享</span>
           <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>
+        </view> -->
+        <button v-if="itemData?.certificate" type="primary" size="default" class="buttons" @click="viewReport(itemData)">查看附件</button>
         <button v-else type="primary" size="default" class="buttons" style="background-color:grey;">查看附件</button>
         <button v-else type="primary" size="default" class="buttons" style="background-color:grey;">查看附件</button>
       </view>
       </view>
     </view>
     </view>
@@ -45,63 +45,19 @@
 
 
 <script setup>
 <script setup>
 import { ref } from 'vue'
 import { ref } from 'vue'
-import { getEnterpriseCertificateList } from '@/api/student'
 import { preview } from '@/utils/preview'
 import { preview } from '@/utils/preview'
-import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
+import { onLoad } from '@dcloudio/uni-app'
+import { timesTampChange } from '@/utils/date'
+import { formatName } from '@/utils/getText'
 
 
-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
-})
 
 
+const itemData = ref(null)
 onLoad((options) => {
 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}`
-	// 		}
-	// 	}
-	// })
+  if (options.itemData) itemData.value = JSON.parse(options.itemData)
 })
 })
 
 
-// 获取实习证书列表
-const getList = async () => {
-  try {
-    const { data } = await getEnterpriseCertificateList({ size: 9999, current: 1 })
-    console.log(data, '实习证书')
-    // list.value = data.records.reverse()
-  } catch {}
-}
-
 const viewReport = (item) => {
 const viewReport = (item) => {
-	if (!item.studentInternshipCertificate.fileUrl) {
+	if (!item.certificate) {
 		uni.showToast({
 		uni.showToast({
       title: '加载失败,请稍后重试',
       title: '加载失败,请稍后重试',
       icon: 'none',
       icon: 'none',
@@ -109,7 +65,7 @@ const viewReport = (item) => {
     })
     })
 		return
 		return
 	}
 	}
-	preview(item.studentInternshipCertificate.fileUrl)
+	preview(item.certificate)
 }
 }
 </script>
 </script>
 
 

+ 27 - 5
pagesA/student/internshipRecord.vue

@@ -35,10 +35,10 @@
           </view>
           </view>
           <view>实习时间:{{ timesTampChange(val?.startTime, 'Y-M-D') }} 至 {{ timesTampChange(val?.endTime, 'Y-M-D') }}</view>
           <view>实习时间:{{ timesTampChange(val?.startTime, 'Y-M-D') }} 至 {{ timesTampChange(val?.endTime, 'Y-M-D') }}</view>
           <view class="line ss-m-y-20"></view>
           <view class="line ss-m-y-20"></view>
-          <view>
-            <button @tap="null" class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#fb8c00;borderColor:#fb8c00">实习报告</button>
-            <button class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#00b760;borderColor:#00b760">实习证书</button>
-            <button class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#00897b;borderColor:#00897b">企业推荐信</button>
+          <view  class="text-right">
+            <button @tap="handleToReport(val)" class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#fb8c00;borderColor:#fb8c00">实习报告</button>
+            <button @tap="handleToCertificate(val)" class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#00b760;borderColor:#00b760">实习证书</button>
+            <button @tap="preview(val?.recommendationLetter)" class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#00897b;borderColor:#00897b">企业推荐信</button>
           </view>
           </view>
         </uni-card>
         </uni-card>
         <uni-load-more :status="more" />
         <uni-load-more :status="more" />
@@ -57,6 +57,7 @@ import { getStudentPage } from '@/api/student'
 import { formatName } from '@/utils/getText'
 import { formatName } from '@/utils/getText'
 import { timesTampChange } from '@/utils/date'
 import { timesTampChange } from '@/utils/date'
 import { dealDictObjData } from '@/utils/position'
 import { dealDictObjData } from '@/utils/position'
+import { preview } from '@/utils/preview'
 
 
 const more = ref('more')
 const more = ref('more')
 const current = ref(0)
 const current = ref(0)
@@ -112,11 +113,32 @@ const getTabList = async () => {
   }
   }
   tabList.value = data?.data?.length && data.data || []
   tabList.value = data?.data?.length && data.data || []
   controlList.value = tabList.value.map(e => e.label) || []
   controlList.value = tabList.value.map(e => e.label) || []
-  console.log('123456:',  data.data )
   if (tabList.value?.length) getData()
   if (tabList.value?.length) getData()
 }
 }
 getTabList()
 getTabList()
 
 
+// 实习报告
+const handleToReport = (val) => {
+  uni.navigateTo({ url: `/pagesA/student/internshipReport?enterpriseId=${val?.enterprise?.id}` })
+}
+
+// 查看证书详情
+const handleToCertificate = (val) => {
+  const itemData = JSON.stringify({
+    student: { schoolName: val?.student?.schoolName, majorName: val?.student?.majorName },
+    person: { name: val?.person?.name },
+    enterpriseName: val?.enterprise?.enterpriseName,
+    anotherName: val?.enterprise?.anotherName || val?.enterprise?.name,
+    startTime: val?.startTime,
+    endTime: val?.endTime,
+    evaluate: val?.evaluate,
+    certificate: val?.certificate,
+    createTime: val?.createTime
+  })
+  uni.navigateTo({ url: `/pagesA/student/certificateDetail?itemData=${itemData}` })
+}
+
+
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">

+ 0 - 1
pagesA/student/internshipReport.vue

@@ -75,7 +75,6 @@ onShow(() => {
 onLoad((options) => {
 onLoad((options) => {
   if (options.enterpriseId) {
   if (options.enterpriseId) {
     enterpriseId.value = options.enterpriseId
     enterpriseId.value = options.enterpriseId
-    getList()
   }
   }
 })
 })