teacherDetail.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <template>
  2. <view class="page_body">
  3. <!-- 头部 -->
  4. <nav-bar height="96" :title="state.pageTitle" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
  5. <view :class="['page_content',{'no_show_ft':state.pageFoot=='0'}]">
  6. <view class="row_item">
  7. <view class="row_label">荣誉类型:</view>
  8. <view class="row_value">{{state.reviewDetail?.honorTypeName}}</view>
  9. </view>
  10. <view class="row_item" v-for="item in (state.reviewDetail?.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.reviewDetail?.honorDataCertList || [])" :key="item.id">
  18. <image class="pic" mode="aspectFit" :src="item.picUrl"></image>
  19. </view> -->
  20. <uv-upload :maxCount="state.reviewDetail?.honorDataCertList?.length || 0" :deletable="false" :fileList="state.reviewDetail?.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.reviewDetail?.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 class="page_foot" v-if="state.pageFoot=='1'">
  42. <button v-if="state.reviewDetail?.honorStatus != 2" class="btn btn_reject" type="primary" plain="true" :loading="state.loading" @click="HandleRejectHonor">驳回</button>
  43. <button v-if="state.reviewDetail?.honorStatus != 1" class="btn btn_pass" type="primary" :loading="state.loading" @click="HandlePassHonor">通过</button>
  44. </view>
  45. <customPopupDialog ref="popupDelDialogRef" title="驳回" dialogWidth="702" :isMaskClick="false" :showDialogClose="false" @DialogConfirm="DialogConfirm">
  46. <view class="dialog_content_input">
  47. <view class="dialog_desc">请填写驳回原因方便教师修改</view>
  48. <uni-easyinput type="textarea" v-model="state.rejectReason" :style="state.easyinputStyle" placeholderStyle="font-weight: 400;font-size: 28rpx;color: #999999;" placeholder="请输入驳回原因…"></uni-easyinput>
  49. </view>
  50. </customPopupDialog>
  51. </view>
  52. </template>
  53. <script setup>
  54. import navBar from '@/components/navBar.vue';
  55. import uvUpload from '@/uni_modules/uv-upload/components/uv-upload/uv-upload.vue';
  56. import customPopupDialog from '@/components/customPopupDialog.vue';
  57. import uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue';
  58. import {queryReviewDetail,audioHonorData} from '@/reqApi/teacherHonor.js';
  59. import {
  60. reactive,
  61. ref,
  62. nextTick
  63. } from 'vue';
  64. import { onLoad } from '@dcloudio/uni-app';
  65. const state = reactive({
  66. id:'',//id
  67. pageTitle:'',
  68. pageFoot:'0',
  69. loading:false,
  70. reviewDetail:{},
  71. rejectReason:'',//驳回原因
  72. easyinputStyle:{
  73. color: '#303133',
  74. borderColor: '#E9E9E9'
  75. }
  76. })
  77. const popupDelDialogRef = ref(null);
  78. onLoad((option) => {
  79. state.id = option.id;
  80. state.pageTitle = option.pageTitle;
  81. state.pageFoot = option.pageFoot;//是否显示页脚
  82. uni.setStorageSync('isLoadHonorAuditList', false);
  83. GetReviewDetail();
  84. })
  85. //查询荣誉审核资质信息详情数据接口
  86. const GetReviewDetail = () => {
  87. queryReviewDetail(state.id).then(res=>{
  88. if(res.code == 200){
  89. const resdata = res.data || null;
  90. const honorDataCertList = resdata?.honorDataCertList || [];
  91. resdata.honorDataCertList = honorDataCertList.map(item=>({
  92. ...item,
  93. url:item.picUrl
  94. }))
  95. state.reviewDetail = resdata;
  96. }
  97. })
  98. }
  99. //通过
  100. const HandlePassHonor = () => {
  101. HandleRejectOrPass(1)
  102. }
  103. //驳回
  104. const HandleRejectHonor = () => {
  105. popupDelDialogRef.value.OpenDialog();
  106. }
  107. //驳回 确定按钮
  108. const DialogConfirm = () => {
  109. if(state.rejectReason == '' || state.rejectReason == null){
  110. uni.showToast({
  111. title: '请填写驳回原因!',
  112. icon: 'none'
  113. })
  114. return false
  115. }
  116. HandleRejectOrPass(2)
  117. }
  118. const HandleRejectOrPass = (status) => {
  119. const params = {
  120. honorDataId: state.id,
  121. honorStatus: status
  122. }
  123. if(status == 2){
  124. params.content = state.rejectReason;
  125. }
  126. audioHonorData(params).then(res=>{
  127. if(res.code == 200){
  128. uni.showToast({
  129. title: '审核通过!',
  130. icon: 'none'
  131. })
  132. uni.setStorageSync('isLoadHonorAuditList', true);//刷新荣誉审核列表
  133. GoBack();
  134. }
  135. })
  136. }
  137. const GoBack = () => {
  138. uni.navigateBack({
  139. delta: 1
  140. });
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .page_body{
  145. height: 100%;
  146. min-height: auto;
  147. }
  148. .page_content{
  149. height: calc(100% - 290rpx);
  150. &.no_show_ft{
  151. height: calc(100% - 96rpx);
  152. }
  153. flex-direction: column;
  154. flex-wrap: initial;
  155. overflow: auto;
  156. .row_item{
  157. display: flex;
  158. width: 100%;
  159. padding: 32rpx 0;
  160. border-bottom: 2rpx solid #F3F3F3;
  161. .row_label{
  162. font-weight: 400;
  163. font-size: 28rpx;
  164. color: #666666;
  165. flex-shrink: 0;
  166. margin-right: 10rpx;
  167. }
  168. .row_value{
  169. flex: 1;
  170. font-weight: 400;
  171. font-size: 28rpx;
  172. color: #333333;
  173. text-align: right;
  174. display: flex;
  175. justify-content: flex-end;
  176. word-break: break-all;
  177. flex-wrap: wrap;
  178. &.img_list{
  179. // gap: 32rpx 24rpx;
  180. // .img_item{
  181. // width: 240rpx;
  182. // height: 140rpx;
  183. // background-color: #FFFFFF;
  184. // border-radius: 12rpx;
  185. // border: 2rpx solid #CED1D8;
  186. // display: inline-flex;
  187. // align-items: center;
  188. // justify-content: center;
  189. // .pic{
  190. // width: 240rpx;
  191. // height: 140rpx;
  192. // }
  193. // }
  194. :deep(.uv-upload__wrap){
  195. gap: 24rpx 32rpx;
  196. .uv-upload__wrap__preview{
  197. background-color: #FFFFFF;
  198. border-radius: 20rpx;
  199. border: 2rpx solid #CED1D8;
  200. box-sizing: border-box;
  201. margin: 0;
  202. .uv-upload__deletable{
  203. top:10rpx;
  204. right: 10rpx;
  205. background-color: transparent;
  206. height: 32rpx;
  207. width: 32rpx;
  208. border: 2rpx solid #999999;
  209. border-radius: 50%;
  210. .uvicon-close{
  211. color:#999999 !important;
  212. font-size: 11rpx !important;
  213. }
  214. }
  215. .uv-upload__deletable__icon{
  216. transform: scale(1);
  217. top:50%;
  218. right: 50%;
  219. transform: translate(50%, -50%);
  220. }
  221. .uv-upload__success{
  222. border-width: 20rpx;
  223. }
  224. }
  225. }
  226. }
  227. &.document_list{
  228. gap: 24rpx;
  229. .document_item{
  230. width: 100%;
  231. padding: 20rpx 0 18rpx 15rpx;
  232. display: flex;
  233. background-color: #FFFFFF;
  234. border-radius: 20rpx;
  235. border: 2rpx solid #EBEEF5;
  236. .file{
  237. width: 80rpx;
  238. height: 80rpx;
  239. margin-right: 16rpx;
  240. }
  241. .file_name{
  242. flex: 1;
  243. display: flex;
  244. flex-direction: column;
  245. .name{
  246. font-weight: 500;
  247. font-size: 28rpx;
  248. text-align: left;
  249. color: #333333;
  250. }
  251. .file_size_date{
  252. display: flex;
  253. width: 100%;
  254. text-align: left;
  255. font-weight: 400;
  256. font-size: 24rpx;
  257. color: #999999;
  258. margin-top: 8rpx;
  259. gap: 20rpx;
  260. .file_size{
  261. white-space: nowrap;
  262. }
  263. .file_date{
  264. white-space: nowrap;
  265. }
  266. }
  267. }
  268. .preview_btn{
  269. width: 96rpx;
  270. box-sizing: border-box;
  271. text-align: left;
  272. font-weight: 400;
  273. font-size: 28rpx;
  274. color: #2E64FA;
  275. padding:20rpx 0 0 16rpx;
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }
  282. .page_foot{
  283. position: fixed;
  284. left:0;
  285. right: 0;
  286. bottom: 0;
  287. padding: 40rpx 24rpx 38rpx 24rpx;
  288. box-shadow: inset 0px 2rpx 0px 0px #F3F3F3;
  289. background-color:#FFFFFF;
  290. gap: 30rpx;
  291. display: flex;
  292. .btn{
  293. height: 90rpx;
  294. display: flex;
  295. justify-content: center;
  296. align-items: center;
  297. border-radius: 8rpx;
  298. font-weight: 500;
  299. font-size: 28rpx;
  300. flex: 1;
  301. box-sizing: border-box;
  302. }
  303. .btn_reject{
  304. border: 2rpx solid #F56C6C;
  305. color: #F56C6C;
  306. }
  307. .btn_pass{
  308. background-color: #2E64FA !important;
  309. color: #FFFFFF;
  310. }
  311. }
  312. .dialog_content_input{
  313. width: 100%;
  314. display: flex;
  315. flex-direction: column;
  316. box-sizing: border-box;
  317. .dialog_desc{
  318. font-weight: 400;
  319. font-size: 32rpx;
  320. color: #303133;
  321. }
  322. :deep(.uni-easyinput){
  323. margin-top: 20rpx;
  324. font-size: 28rpx;
  325. .is-input-border{
  326. border-radius: 8rpx;
  327. border-color: #E9E9E9 !important;
  328. }
  329. .uni-easyinput__content-textarea{
  330. height: 400rpx;
  331. min-height: 400rpx;
  332. font-size: 28rpx;
  333. margin:20rpx 24rpx 20rpx 14rpx;
  334. }
  335. .input-padding{
  336. padding-left: 10rpx;
  337. }
  338. }
  339. }
  340. </style>