teacher_authentication_detail.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <view>
  3. <view class="container">
  4. <!-- 顶部信息 -->
  5. <view class="userInfo">
  6. <view>
  7. <text>用户ID</text>
  8. <text class="userDetail">{{item.uid}}</text>
  9. </view>
  10. <view class="userName">
  11. <text>贵姓</text>
  12. <text class="userDetail">{{item.firstName}}</text>
  13. </view>
  14. </view>
  15. <view class="userInfo">
  16. <view>
  17. <text>手机号</text>
  18. <text class="userDetail">{{item.phone}}</text>
  19. </view>
  20. <view class="userName">
  21. <text>英文名</text>
  22. <text class="userDetail">{{item.englishName || ''}}</text>
  23. </view>
  24. </view>
  25. <view class="userInfo">
  26. <text>微信号</text>
  27. <text class="userDetail">{{item.weixinId}}</text>
  28. </view>
  29. <view class="userInfo">
  30. <text>身份证号</text>
  31. <text class="userDetail">{{item.idCard}}</text>
  32. </view>
  33. <!-- 照片信息 -->
  34. <view class="userImg">
  35. <view class="userImgDetail">
  36. <uni-file-picker class="userImage" :imageStyles="listStyle" fileMediatype="image" v-model="idCardFrontByte" :fileExtname="fileExtname" limit="1" delIcon="false" readonly="true"/>
  37. <!-- <image class="userImage" :src="item.diplomaPhoto"></image> -->
  38. </view>
  39. <view class="userImgDetail">
  40. <uni-file-picker class="userImage" fileMediatype="image" :imageStyles="listStyle" v-model="idCardBackByte" :fileExtname="fileExtname" limit="1" delIcon="false" readonly="true"/>
  41. <!-- <image class="userImage" :src="item.idCardBack"></image> -->
  42. </view>
  43. <view class="userImgDetail">
  44. <uni-file-picker class="userImage" fileMediatype="image" :imageStyles="listStyle" v-model="teacherPhotoByte" :fileExtname="fileExtname" limit="1" delIcon="false" readonly="true"/>
  45. <!-- <image class="userImage" :src="item.idCardFront"></image> -->
  46. </view>
  47. <view class="userImgDetail">
  48. <uni-file-picker class="userImage" fileMediatype="image" :imageStyles="listStyle" v-model="diplomaPhotoByte" :fileExtname="fileExtname" limit="1" delIcon="false" readonly="true"/>
  49. <!-- <image class="userImage" :src="item.teacherPhoto"></image> -->
  50. </view>
  51. </view>
  52. <!-- 高校信息 -->
  53. <view class="school">
  54. <text>高校全名</text>
  55. <text class="schoolName">{{item.school}}</text>
  56. </view>
  57. <!-- 教员性别和专业 -->
  58. <view class="teacherSexMajor">
  59. <view>
  60. <text>教员性别</text>
  61. <text class="userDetail">{{item.sex}}</text>
  62. </view>
  63. <view class="teacherMajor">
  64. <text>当前学历</text>
  65. <text class="userDetail">{{item.education}}</text>
  66. </view>
  67. </view>
  68. <!-- 籍贯 -->
  69. <view class="userInfo">
  70. <text>籍贯</text>
  71. <text class="userDetail">{{item.nativePlace}}</text>
  72. </view>
  73. <view class="userInfo">
  74. <text>专业</text>
  75. <text class="userDetail">{{item.major}}</text>
  76. </view>
  77. <view class="userInfo">
  78. <text>毕业时间</text>
  79. <text class="userDetail">{{item.graduateMonth}}</text>
  80. </view>
  81. <!-- 审核状态 -->
  82. <view class="audit">
  83. <text>审核状态</text>
  84. <text class="auditDetail">{{item.verifyStatus}}</text>
  85. </view>
  86. <!-- 审核不通过原因 -->
  87. <view class="auditResult">
  88. <text>审核结果</text>
  89. <text class="auditDetail">{{item.verifyRefuseReason}}</text>
  90. </view>
  91. <!-- 申请日期 -->
  92. <view class="applyDate">
  93. <text>申请日期</text>
  94. <text class="userDetail">{{item.datetime}}</text>
  95. </view>
  96. </view>
  97. <!-- 修改认证按钮 -->
  98. <view class="submitBtnWrapper">
  99. <button class="submitBtn" type="primary" @click="modifyAuthorize" >修改认证</button>
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. import { mapState } from 'vuex';
  105. export default {
  106. computed: {
  107. ...mapState('m_user', ['authorizePhoto'])
  108. },
  109. data() {
  110. return {
  111. listStyle: {
  112. "height": 111, // 边框高度
  113. "width": 174, // 边框宽度
  114. "border":{ // 如果为 Boolean 值,可以控制边框显示与否
  115. "color":"#ccc", // 边框颜色
  116. "width":"1px", // 边框宽度
  117. "style":"solid", // 边框样式
  118. }
  119. },
  120. item: {},
  121. fileExtname: 'png,jpg',
  122. idCardFrontByte: [{
  123. url: '',
  124. extname: '',
  125. name: ''
  126. }],
  127. idCardBackByte: [{
  128. url: '',
  129. extname: '',
  130. name: ''
  131. }],
  132. teacherPhotoByte: [{
  133. url: '',
  134. extname: '',
  135. name: ''
  136. }],
  137. diplomaPhotoByte: [{
  138. url: '',
  139. extname: '',
  140. name: ''
  141. }],
  142. };
  143. },
  144. onLoad(option) {
  145. this.item = JSON.parse(decodeURIComponent(option.item))
  146. let arr = this.item.name.split('')
  147. if (arr.length <= 3) {
  148. this.item.firstName = this.item.name.substring(0,1)
  149. } else {
  150. this.item.firstName = this.item.name.substring(0,2)
  151. }
  152. this.getPhotoes()
  153. },
  154. methods: {
  155. getPhotoes() {
  156. this.diplomaPhotoByte[0].url = this.item.diplomaPhoto
  157. this.diplomaPhotoByte[0].name = 'diplomaPhoto'
  158. this.idCardBackByte[0].url = this.item.idCardBack
  159. this.idCardBackByte[0].name = 'idCardBack'
  160. if(this.item.verifyStatus == "审核中"){
  161. this.teacherPhotoByte[0].url = this.item.teacherPhotoTemp
  162. }else{
  163. this.teacherPhotoByte[0].url = this.item.teacherPhoto
  164. }
  165. this.teacherPhotoByte[0].name = 'teacherPhoto'
  166. this.idCardFrontByte[0].url = this.item.idCardFront
  167. this.idCardFrontByte[0].name = 'idCardFront'
  168. },
  169. modifyAuthorize() {
  170. uni.navigateTo({
  171. url: '/subpkg/teacher/authentication/teacher_authentication_add?item=' + encodeURIComponent(JSON.stringify(this.item))
  172. })
  173. }
  174. }
  175. }
  176. </script>
  177. <!-- 设置页面背景 -->
  178. <style lang="scss">
  179. page{
  180. // height: 100%;
  181. // background-color: #FFF;
  182. }
  183. </style>
  184. <style lang="scss" scoped>
  185. .container {
  186. width: 90%;
  187. padding: 20rpx;
  188. margin-left: 20rpx;
  189. border-radius: 20rpx;
  190. background-color: #FFF;
  191. font-size: 30rpx;
  192. }
  193. /* 顶部用户信息、性别和专业 */
  194. .userInfo,
  195. .teacherSexMajor{
  196. display: flex;
  197. margin-top: 16rpx;
  198. }
  199. /* 姓、英文名、专业 */
  200. .userName,
  201. .teacherMajor{
  202. position: absolute;
  203. left: 60%;
  204. }
  205. .school{
  206. margin-top: 30rpx;
  207. }
  208. /* 用户详情、高校名称、审核状态即原因 */
  209. .userDetail,
  210. .schoolName,
  211. .auditDetail{
  212. margin-left: 20rpx;
  213. font-weight: bold;
  214. }
  215. /* 照片信息 */
  216. .userImg{
  217. margin-top: 30rpx;
  218. display: flex;
  219. flex-wrap: wrap;
  220. }
  221. /* 设置边框 */
  222. .userImgDetail{
  223. width: 45%;
  224. padding: 10rpx;
  225. height: 200rpx;
  226. display: flex;
  227. // border-left: 1rpx solid gray;
  228. // border-top: 1rpx solid gray;
  229. }
  230. /* 偶数照片添加右边框 */
  231. .userImg :nth-child(even){
  232. // border-right: 1rpx solid gray;
  233. }
  234. /* 第三张照片添加下边框 */
  235. .userImg :nth-child(3){
  236. // border-bottom: 1rpx solid gray;
  237. }
  238. /* 第四张照片添加下边框 */
  239. .userImg :nth-child(4){
  240. // border-bottom: 1rpx solid gray;
  241. }
  242. /* 设置照片 */
  243. .userImage{
  244. width: 100%;
  245. height: 100%;
  246. }
  247. /* 审核状态 */
  248. .audit{
  249. margin-top: 40rpx;
  250. }
  251. /* 审核不通过原因、申请日期 */
  252. .auditResult,
  253. .applyDate{
  254. margin-top: 20rpx;
  255. }
  256. // 提交按钮样式
  257. .submitBtnWrapper{
  258. margin-top: 60rpx;
  259. height: 140rpx;
  260. align-items: center;
  261. }
  262. .submitBtn{
  263. width: 300rpx;
  264. border-radius: 50rpx;
  265. // margin-bottom: 40rpx;
  266. background-color: #35b882;
  267. font-size: 30rpx;
  268. }
  269. </style>