certificateDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <view v-if="isPc">
  3. <Headers></Headers>
  4. <view class="project">
  5. <view style="width: 1200px;margin: auto;">证书查询系统</view>
  6. </view>
  7. <view class="project-content ddflex">
  8. <!-- 成绩区域 -->
  9. <view class="test-box">
  10. <view class="test-title">证书查询结果</view>
  11. <!-- 表格 -->
  12. <view class="ddflex border table" style="">
  13. <!-- 右边 -->
  14. <view class="fflex">
  15. <view class="height56 ddflex padding-left" style="color: #fff;background-color: #2e68d8;">● 基本信息</view>
  16. <view class="dflex" style="align-items: stretch;">
  17. <view>
  18. <view>
  19. <view class="ddflex">
  20. <view class="height56 ddflex-jc width140 bg-color border-bottom border-top-none">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</view>
  21. <view class="height56 ddflex padding-left width200 border border-right-none border-top-none">{{info.userName?info.userName:'*'}}</view>
  22. <view class="height56 ddflex-jc width140 bg-color border-bottom border-left">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</view>
  23. <view class="height56 ddflex padding-left width200 border border-right-none border-top-none">{{info.sex==1?'男':info.sex==2?'女':'*'}}</view>
  24. </view>
  25. <view class="ddflex">
  26. <view class="height56 ddflex-jc width140 bg-color">身份证号</view>
  27. <view class="height56 ddflex fflex padding-left border border-bottom-none border-right-none border-top-none">{{info.idNumber?info.idNumber:'*'}}</view>
  28. </view>
  29. <view class="ddflex">
  30. <view class="height56 ddflex-jc width140 bg-color border border-right-none border-left-none">培训时间</view>
  31. <view class="height56 ddflex fflex padding-left border border-right-none">{{info.trainingDate?dateYM(info.trainingDate):'*'}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="border fflex ddflex border-right-none border-top-none" style="box-sizing: border-box;padding: 20px;">
  36. <image style="max-width: 100%;max-height: 125px;" :src="info.avatar" mode="widthFix"></image>
  37. </view>
  38. </view>
  39. <view class="height56 ddflex padding-left" style="color: #fff;background-color: #2e68d8;">● 证书信息</view>
  40. <view class="ddflex">
  41. <view class="height56 ddflex-jc width140 bg-color border-top-none">职业名称</view>
  42. <view class="height56 ddflex padding-left width200 border border-right-none border-top-none border-bottom-none">{{info.cateName?info.cateName:'*'}}</view>
  43. <view class="height56 ddflex-jc width140 bg-color border-left">培训等级</view>
  44. <view class="height56 ddflex padding-left width200 border border-right-none border-top-none border-bottom-none">{{info.trainingLevel?info.trainingLevel:'*'}}</view>
  45. </view>
  46. <view class="ddflex">
  47. <view class="height56 ddflex-jc width140 bg-color border-bottom border-top">发证单位</view>
  48. <view class="height56 ddflex fflex padding-left border border-right-none">湖南现代职业培训学校</view>
  49. </view>
  50. <view class="ddflex">
  51. <view class="height56 ddflex-jc width140 bg-color border-bottom border-top-none border-bottom-none">发证日期</view>
  52. <view class="height56 ddflex fflex padding-left border border-right-none border-top-none border-bottom-none">{{info.issueDate?info.issueDate:'*'}}</view>
  53. </view>
  54. </view>
  55. </view>
  56. <!-- 声明 -->
  57. <view style="margin-top: 34px;">
  58. <view style="font-size: 16px;font-weight: bold;">声明:</view>
  59. <view style="font-size: 14px;line-height: 30px">
  60. 1、未经证书信息权属人同意,不得将本材料用于违背权属人意愿之用途。证书信息内容标注“*”号,表示该项内容不详。证书信息如有修改,请以网站在线查询内容为准。<br>
  61. 2、本材料是打印的证书查询结果凭证,仅供查询人使用,不具有再验证功能。
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 答题卡区域 -->
  66. <view class="test-info ddflex">
  67. <view class="note-box" style="margin-top: 0;">
  68. <view class="note-title ddflex">
  69. <image class="note-title-icon" src="/static/images/cjwt.png"</image>
  70. <view>所有证书</view>
  71. </view>
  72. <view>
  73. <view class="note-item ddflex" v-for="item,index in infoList" :key="index" @click="changeItem(item)">
  74. <view class="note-item-content">{{index+1}}. {{item.cateName}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <Foot></Foot>
  81. </view>
  82. <!-- 移动端 -->
  83. <view v-else style="font-size: 28rpx;background-color: #fff;">
  84. <view class="m-project">
  85. <view style="margin: auto;">证书查询系统</view>
  86. </view>
  87. <view class="ddflex" style="justify-content: space-between;padding: 30rpx;color: #1AA1E6;font-weight: bold;">
  88. <view >证书查询结果</view>
  89. <button type="primary" @click="toggle('right')" style="border-radius: 10rpx;font-size: 24rpx;padding: 10rpx 30rpx">
  90. <text>查看全部证书</text>
  91. </button>
  92. </view>
  93. <view style="border-left: 20rpx solid #fff;border-right: 20rpx solid #fff;">
  94. <view class="m-height56 ddflex m-padding-left" style="color: #fff;background-color: #2e68d8;">● 基本信息</view>
  95. <view class="dflex" style="align-items: stretch;">
  96. <view>
  97. <view class="ddflex">
  98. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none border-bottom-none">姓名</view>
  99. <view class="m-height56 ddflex m-width200 m-padding-left border border-right-none border-bottom-none">{{info.userName?info.userName:'*'}}</view>
  100. </view>
  101. <view class="ddflex">
  102. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none border-bottom-none">性别</view>
  103. <view class="m-height56 ddflex m-width200 m-padding-left border border-right-none border-bottom-none">{{info.sex==1?'男':info.sex==2?'女':'*'}}</view>
  104. </view>
  105. <view class="ddflex">
  106. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none border-bottom-none">培训时间</view>
  107. <view class="m-height56 ddflex m-width200 m-padding-left border border-right-none border-bottom-none">{{info.trainingDate?dateYM(info.trainingDate):'*'}}</view>
  108. </view>
  109. </view>
  110. <view class="border fflex border-bottom-none ddflex" style="box-sizing: border-box;padding: 20rpx;">
  111. <image style="max-width: 100%;max-height: 250rpx;" :src="info.avatar" mode="widthFix"></image>
  112. </view>
  113. </view>
  114. <view class="ddflex">
  115. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none">身份证号</view>
  116. <view class="m-height56 ddflex fflex m-padding-left border">{{info.idNumber?info.idNumber:'*'}}</view>
  117. </view>
  118. <view class="m-height56 ddflex m-padding-left" style="color: #fff;background-color: #2e68d8;">● 证件信息</view>
  119. <view class="ddflex">
  120. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none border-bottom-none">职业名称</view>
  121. <view class="m-height56 ddflex fflex m-padding-left border border-bottom-none">{{info.cateName?info.cateName:'*'}}</view>
  122. </view>
  123. <view class="ddflex">
  124. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none border-bottom-none">培训等级</view>
  125. <view class="m-height56 ddflex fflex m-padding-left border border-bottom-none">{{info.trainingLevel?info.trainingLevel:'*'}}</view>
  126. </view>
  127. <view class="ddflex">
  128. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none border-bottom-none">发证单位</view>
  129. <view class="m-height56 ddflex fflex m-padding-left border border-bottom-none">湖南现代职业培训学校</view>
  130. </view>
  131. <view class="ddflex">
  132. <view class="ddflex-jc m-height56 m-width150 bg-color border border-right-none">发证日期</view>
  133. <view class="m-height56 ddflex fflex m-padding-left border">{{info.issueDate?info.issueDate:'*'}}</view>
  134. </view>
  135. </view>
  136. <!-- 声明 -->
  137. <view style="margin: 10rpx 0;padding: 20rpx;">
  138. <view style="font-size: 16rpx;font-weight: bold;">声明:</view>
  139. <view style="font-size: 14rpx;line-height: 1.5">
  140. 1、未经证书信息权属人同意,不得将本材料用于违背权属人意愿之用途。证书信息内容标注“*”号,表示该项内容不详。证书信息如有修改,请以网站在线查询内容为准。<br>
  141. 2、本材料是打印的证书查询结果凭证,仅供查询人使用,不具有再验证功能。
  142. </view>
  143. </view>
  144. <view>
  145. <uni-popup ref="popup" background-color="#fff">
  146. <view class="popup-content popup-height">
  147. <view class="m-title" style="margin-bottom: 10rpx;font-size: 30rpx;font-weight: bold">所有证书</view>
  148. <view>
  149. <view class="m-note-item ddflex" v-for="item,index in infoList" :key="index" @click="changeItem(item)">
  150. <view class="m-note-item-content">{{index+1}}. {{item.cateName}}</view>
  151. </view>
  152. </view>
  153. </view>
  154. </uni-popup>
  155. </view>
  156. </view>
  157. </template>
  158. <script>
  159. const app = getApp();
  160. const req = require('../../utils/request.js');
  161. const utils = require('../../utils/util.js');
  162. const api = require('../../utils/api.js')
  163. export default {
  164. data() {
  165. return {
  166. options:{},
  167. infoList:[],
  168. info:{},
  169. isPc:true,
  170. systemInfo:{}
  171. }
  172. },
  173. onReady() {},
  174. onLoad() {
  175. this.systemInfo = uni.getSystemInfoSync()
  176. this.isPc = this.IsPC()
  177. if(!req.getStorage('options')){
  178. uni.reLaunch({
  179. url:'/pages/certificateQuery/certificateQuery'
  180. })
  181. return false
  182. }
  183. this.options = req.getStorage('options')
  184. this.getDetail()
  185. },
  186. onUnload() {
  187. req.removeStorage('options')
  188. },
  189. methods: {
  190. IsPC() {
  191. var userAgentInfo = navigator.userAgent;
  192. var Agents = ["Android", "iPhone",
  193. "SymbianOS", "Windows Phone",
  194. "iPad", "iPod"];
  195. var flag = true;
  196. for (var v = 0; v < Agents.length; v++) {
  197. if (userAgentInfo.indexOf(Agents[v]) > 0) {
  198. flag = false;
  199. break;
  200. }
  201. }
  202. return flag;
  203. },
  204. jumpUrl(url){
  205. uni.navigateTo({
  206. url:url
  207. })
  208. },
  209. getDetail(){
  210. req.getRequest('/api/v3/exam/user/manager/certificate',this.options,res=>{
  211. this.infoList = res
  212. this.info = res[0]
  213. })
  214. },
  215. changeItem(item){
  216. uni.showLoading({
  217. title:'加载中...'
  218. })
  219. if(!this.isPc){
  220. this.$refs.popup.close()
  221. }
  222. setTimeout(()=>{
  223. this.info = item
  224. uni.hideLoading()
  225. },500)
  226. },
  227. // 时间格式化
  228. dateYM(date){
  229. return req.dateFormat(date).v6
  230. },
  231. // 移动端
  232. toggle(type) {
  233. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  234. this.$refs.popup.open(type)
  235. },
  236. }
  237. }
  238. </script>
  239. <style>
  240. @import url('./certificateDetail.css');
  241. </style>