qualification_detail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <template>
  2. <view>
  3. <view class="container" v-if="isShow">
  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.name}}</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" fileMediatype="image" :imageStyles="listStyle" 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. <view class="requires2">
  98. <uni-row >
  99. <text>待审条数:{{current}}</text>
  100. </uni-row>
  101. </view>
  102. <!-- 取消和提交按钮 -->
  103. <view class="suggestBtn" v-if="isShow">
  104. <button class="cancelBtn" @click="toRefuse">拒绝</button>
  105. <modal v-if="areaShow" title="拒绝原因必填" confirm-text="提交" cancel-text="取消" @cancel="cancelAdd" @confirm="confirmAdd">
  106. <input type="text" v-model="areaTxt" placeholder="至少5个字" maxlength="50" />
  107. </modal>
  108. <button class="confirmBtn" :disabled="disableButton" @click="toConfirm">同意</button>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. import { mapState } from 'vuex';
  114. export default {
  115. computed: {
  116. ...mapState('m_user', ['token', 'userinfo'])
  117. },
  118. data() {
  119. return {
  120. areaShow: false,
  121. areaTxt:'',
  122. isShow: false,
  123. listStyle: {
  124. "height": 111, // 边框高度
  125. "width": 174, // 边框宽度
  126. "border":{ // 如果为 Boolean 值,可以控制边框显示与否
  127. "color":"#ccc", // 边框颜色
  128. "width":"1px", // 边框宽度
  129. "style":"solid", // 边框样式
  130. }
  131. },
  132. index: 0,
  133. current:0,
  134. item: {},
  135. datas:{},
  136. fileExtname: 'png,jpg',
  137. idCardFrontByte: [{
  138. url: '',
  139. extname: '',
  140. name: ''
  141. }],
  142. idCardBackByte: [{
  143. url: '',
  144. extname: '',
  145. name: ''
  146. }],
  147. teacherPhotoByte: [{
  148. url: '',
  149. extname: '',
  150. name: ''
  151. }],
  152. diplomaPhotoByte: [{
  153. url: '',
  154. extname: '',
  155. name: ''
  156. }],
  157. };
  158. },
  159. onLoad(option) {
  160. this.getAllCheckingTeacherInfo()
  161. },
  162. methods: {
  163. checkIsHaveNext(){
  164. this.current = this.current - 1
  165. this.index = this.index + 1
  166. if(this.current == 0){
  167. this.isShow = false
  168. }else{
  169. this.item = this.datas.list[this.index]
  170. this.getPhotoes()
  171. }
  172. },
  173. toConfirm(){
  174. // 开始向后端提交数据
  175. this.submitToBack(this.item.uid,"已通过",this.userinfo.uid + "已通过")
  176. this.checkIsHaveNext()
  177. },
  178. toRefuse(){
  179. this.areaShow = true
  180. },
  181. cancelAdd(){
  182. this.areaShow = false
  183. },
  184. confirmAdd(){
  185. this.areaShow = false
  186. var strRefuse = this.areaTxt.replace(/\ +/g,"")
  187. strRefuse = strRefuse.replace(/[\r\n]/g,"")
  188. if(strRefuse.length < 5){
  189. uni.$showMsg("有效字数少于5个,请增加!")
  190. }else{
  191. strRefuse = this.userinfo.uid + strRefuse
  192. // 开始向后端提交数据
  193. this.submitToBack(this.item.uid,"未通过",strRefuse)
  194. this.checkIsHaveNext()
  195. }
  196. },
  197. async submitToBack(uid,checkstatus,checktext) {
  198. // 准备参数对象
  199. const query = {
  200. uid: uid,
  201. checkstatus: checkstatus,
  202. checktext: checktext
  203. }
  204. const {
  205. data: result
  206. } = await uni.$http.get('/education/teacher-certifications/updateTeacherQualificationInfo',query)
  207. //console.log(result)
  208. uni.$showMsg(result.message , 2000)
  209. },
  210. async getAllCheckingTeacherInfo() {
  211. const { data: result } = await uni.$http.get('/education/teacher-certifications/getAllCheckingTeacherInfo')
  212. // console.log(result)
  213. this.current = result.data.list.length
  214. if(this.current > 0){
  215. this.datas = result.data
  216. this.item = this.datas.list[this.index ]
  217. this.getPhotoes()
  218. this.isShow = true
  219. }
  220. //console.log(this.item)
  221. },
  222. async getPhotoes() {
  223. this.diplomaPhotoByte[0].url = this.item.diplomaPhoto
  224. this.diplomaPhotoByte[0].name = 'diplomaPhoto'
  225. this.idCardBackByte[0].url = this.item.idCardBack
  226. this.idCardBackByte[0].name = 'idCardBack'
  227. this.teacherPhotoByte[0].url = this.item.teacherPhotoTemp
  228. this.teacherPhotoByte[0].name = 'teacherPhoto'
  229. this.idCardFrontByte[0].url = this.item.idCardFront
  230. this.idCardFrontByte[0].name = 'idCardFront'
  231. }
  232. }
  233. }
  234. </script>
  235. <!-- 设置页面背景 -->
  236. <style lang="scss">
  237. page{
  238. // height: 100%;
  239. // background-color: #FFF;
  240. }
  241. </style>
  242. <style lang="scss" scoped>
  243. .container {
  244. width: 90%;
  245. padding: 20rpx;
  246. margin-left: 20rpx;
  247. border-radius: 20rpx;
  248. background-color: #FFF;
  249. font-size: 30rpx;
  250. }
  251. /* 顶部用户信息、性别和专业 */
  252. .userInfo,
  253. .teacherSexMajor{
  254. display: flex;
  255. margin-top: 16rpx;
  256. }
  257. /* 姓、英文名、专业 */
  258. .userName,
  259. .teacherMajor{
  260. position: absolute;
  261. left: 60%;
  262. }
  263. .school{
  264. margin-top: 30rpx;
  265. }
  266. /* 用户详情、高校名称、审核状态即原因 */
  267. .userDetail,
  268. .schoolName,
  269. .auditDetail{
  270. margin-left: 20rpx;
  271. font-weight: bold;
  272. }
  273. /* 照片信息 */
  274. .userImg{
  275. margin-top: 30rpx;
  276. display: flex;
  277. flex-wrap: wrap;
  278. }
  279. /* 设置边框 */
  280. .userImgDetail{
  281. width: 45%;
  282. padding: 10rpx;
  283. height: 200rpx;
  284. display: flex;
  285. // border-left: 1rpx solid gray;
  286. // border-top: 1rpx solid gray;
  287. }
  288. /* 偶数照片添加右边框 */
  289. .userImg :nth-child(even){
  290. // border-right: 1rpx solid gray;
  291. }
  292. /* 第三张照片添加下边框 */
  293. .userImg :nth-child(3){
  294. // border-bottom: 1rpx solid gray;
  295. }
  296. /* 第四张照片添加下边框 */
  297. .userImg :nth-child(4){
  298. // border-bottom: 1rpx solid gray;
  299. }
  300. /* 设置照片 */
  301. .userImage{
  302. width: 100%;
  303. height: 100%;
  304. }
  305. /* 审核状态 */
  306. .audit{
  307. margin-top: 40rpx;
  308. }
  309. /* 审核不通过原因、申请日期 */
  310. .auditResult,
  311. .applyDate{
  312. margin-top: 20rpx;
  313. }
  314. .requires2 {
  315. background-color: #FFF;
  316. margin: 20rpx 20rpx;
  317. border-radius: 50rpx;
  318. font-size: 30rpx;
  319. padding: 20rpx 20rpx;
  320. //font-weight: bold;
  321. color: gray;
  322. display: flex;
  323. align-items: center;
  324. justify-content: center;
  325. }
  326. /* 下方按钮 */
  327. .suggestBtn{
  328. display: flex;
  329. padding: 60rpx;
  330. justify-content: space-around;
  331. }
  332. .confirmBtn,
  333. .cancelBtn{
  334. font-size: 30rpx;
  335. height: 85rpx;
  336. width: 200rpx;
  337. line-height: 85rpx;
  338. border-radius: 50rpx;
  339. text-align: center;
  340. color: white;
  341. margin-top: 5rpx;
  342. }
  343. .confirmBtn{
  344. background-color: #35b882;
  345. }
  346. .cancelBtn{
  347. background-color: #3ed598;
  348. }
  349. </style>