honorDetail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="page_body">
  3. <!-- 头部 -->
  4. <nav-bar height="96" :title="state.honorName" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
  5. <view class="page_content">
  6. <view class="row_item">
  7. <view class="row_label">荣誉类型:</view>
  8. <view class="row_value">{{state.detail?.honorTypeName}}</view>
  9. </view>
  10. <view class="row_item" v-for="item in (state.detail?.honorDataList || [])" :key="item.id">
  11. <view class="row_label">{{item?.honorDictLibName ?? ''}}:</view>
  12. <view class="row_value">{{item?.honorDictLibValue ?? ''}}</view>
  13. </view>
  14. <view class="row_item">
  15. <view class="row_label">荣誉证书:</view>
  16. <view class="row_value img_list">
  17. <!-- <view class="img_item" v-for="item in (state.detail?.honorDataCertList || [])" :key="item.id">
  18. <image class="pic" mode="aspectFit" :src="item.picUrl"></image>
  19. </view> -->
  20. <uv-upload :maxCount="state.detail?.honorDataCertList?.length || 0" :deletable="false" :fileList="state.detail?.honorDataCertList" width="240rpx" height="140rpx" multiple :previewFullImage="true">
  21. </uv-upload>
  22. </view>
  23. </view>
  24. <view class="row_item">
  25. <view class="row_label">佐证材料:</view>
  26. <view class="row_value document_list">
  27. <view class="document_item" v-for="item in (state.detail?.supportDocumentList || [])" :key="item.id">
  28. <image class="file" src="@/static/image/icon/file.png"></image>
  29. <view class="file_name">
  30. <view class="name">{{item.documentName}}</view>
  31. <view class="file_size_date">
  32. <view class="file_size">{{item.fileSize}}</view>
  33. <view class="file_date">{{item.createdAt}}</view>
  34. </view>
  35. </view>
  36. <view class="preview_btn">预览</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script setup>
  44. import navBar from '@/components/navBar.vue';
  45. import uvUpload from '@/uni_modules/uv-upload/components/uv-upload/uv-upload.vue';
  46. import {queryHonorTeacherDetail} from '@/reqApi/teacherHonor.js';
  47. import {
  48. reactive,
  49. ref,
  50. nextTick
  51. } from 'vue';
  52. import { onLoad } from '@dcloudio/uni-app';
  53. const state = reactive({
  54. id:'',//id
  55. honorName:'',
  56. loading:false,
  57. detail:{}
  58. })
  59. const popupDelDialogRef = ref(null);
  60. onLoad((option) => {
  61. state.id = option.id;
  62. state.honorName = decodeURIComponent(option.honorName);
  63. GetHonorTeacherDetail();
  64. })
  65. //查询荣誉审核资质信息详情数据接口
  66. const GetHonorTeacherDetail = () => {
  67. queryHonorTeacherDetail(state.id).then(res=>{
  68. if(res.code == 200){
  69. const resdata = res.data || null;
  70. const honorDataCertList = resdata?.honorDataCertList || [];
  71. resdata.honorDataCertList = honorDataCertList.map(item=>({
  72. ...item,
  73. url:item.picUrl
  74. }))
  75. state.detail = resdata;
  76. }
  77. })
  78. }
  79. const GoBack = () => {
  80. uni.navigateBack({
  81. delta: 1
  82. });
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .page_body{
  87. height: 100%;
  88. min-height: auto;
  89. }
  90. .page_content{
  91. height: calc(100% - 96rpx);
  92. flex-direction: column;
  93. flex-wrap: initial;
  94. overflow: auto;
  95. .row_item{
  96. display: flex;
  97. width: 100%;
  98. padding: 32rpx 0;
  99. border-bottom: 2rpx solid #F3F3F3;
  100. .row_label{
  101. font-weight: 400;
  102. font-size: 28rpx;
  103. color: #666666;
  104. flex-shrink: 0;
  105. margin-right: 10rpx;
  106. }
  107. .row_value{
  108. flex: 1;
  109. font-weight: 400;
  110. font-size: 28rpx;
  111. color: #333333;
  112. text-align: right;
  113. display: flex;
  114. justify-content: flex-end;
  115. word-break: break-all;
  116. flex-wrap: wrap;
  117. &.img_list{
  118. gap: 32rpx 24rpx;
  119. .img_item{
  120. width: 240rpx;
  121. height: 140rpx;
  122. background-color: #FFFFFF;
  123. border-radius: 12rpx;
  124. border: 2rpx solid #CED1D8;
  125. display: inline-flex;
  126. align-items: center;
  127. justify-content: center;
  128. .pic{
  129. width: 240rpx;
  130. height: 140rpx;
  131. }
  132. }
  133. }
  134. &.document_list{
  135. gap: 24rpx;
  136. .document_item{
  137. width: 100%;
  138. padding: 20rpx 0 18rpx 15rpx;
  139. display: flex;
  140. background-color: #FFFFFF;
  141. border-radius: 20rpx;
  142. border: 2rpx solid #EBEEF5;
  143. .file{
  144. width: 80rpx;
  145. height: 80rpx;
  146. margin-right: 16rpx;
  147. }
  148. .file_name{
  149. flex: 1;
  150. display: flex;
  151. flex-direction: column;
  152. .name{
  153. font-weight: 500;
  154. font-size: 28rpx;
  155. text-align: left;
  156. color: #333333;
  157. }
  158. .file_size_date{
  159. display: flex;
  160. width: 100%;
  161. text-align: left;
  162. font-weight: 400;
  163. font-size: 24rpx;
  164. color: #999999;
  165. margin-top: 8rpx;
  166. gap: 20rpx;
  167. .file_size{
  168. white-space: nowrap;
  169. }
  170. .file_date{
  171. white-space: nowrap;
  172. }
  173. }
  174. }
  175. .preview_btn{
  176. width: 96rpx;
  177. box-sizing: border-box;
  178. text-align: left;
  179. font-weight: 400;
  180. font-size: 28rpx;
  181. color: #2E64FA;
  182. padding:20rpx 0 0 16rpx;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. </style>