notPassInfo.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <!-- 申请详情 -->
  2. <template>
  3. <view id="applicationDetails" v-if="pageType">
  4. <view class="user-info-box">
  5. <view class="user-info-box-min">
  6. <view>实验室:</view>
  7. <view>{{subjectData.labSecurityApply.subjectName}}</view>
  8. </view>
  9. <view class="user-info-box-min">
  10. <view>申请时限:</view>
  11. <view>{{subjectData.labSecurityApply.validBeginTime}}至{{subjectData.labSecurityApply.validEndTime}}</view>
  12. </view>
  13. <view class="user-info-box-min">
  14. <view>申请备注:</view>
  15. <view>{{subjectData.labSecurityApply.applyCause}}</view>
  16. </view>
  17. </view>
  18. <view class="user-info-box">
  19. <view class="user-info-box_title"><view style="color: red;">*</view>身份信息:(关联学生信息材料)</view>
  20. <view class="user-info-box-min">
  21. <view>申请人:</view>
  22. <view>{{subjectData.sysUser.nickName}}</view>
  23. </view>
  24. <view class="user-info-box-min">
  25. <view>联系电话:</view>
  26. <view>{{subjectData.sysUser.phonenumber}}</view>
  27. </view>
  28. <view class="user-info-box-min" >
  29. <view>学号:</view>
  30. <view>{{subjectData.sysUser.userName}}</view>
  31. </view>
  32. <view class="user-info-box-min">
  33. <view>物理卡号:</view>
  34. <view>{{subjectData.sysUser.cardNum}}</view>
  35. </view>
  36. <view class="user-info-box-min" >
  37. <view>班级:</view>
  38. <view>{{subjectData.sysUser.grade}}</view>
  39. </view>
  40. <view class="user-info-box-min" >
  41. <view>导师:</view>
  42. <view>{{subjectData.sysUser.tutorUserName}}</view>
  43. </view>
  44. </view>
  45. <view v-for="(item,index) in subjectData.listTemp" :key="index" style="overflow: hidden;">
  46. <view class="img-box" v-if="item.materialType==2&&item.relationType==2">
  47. <view class="img-title">安全考试证书</view>
  48. <img v-if="subjectData.listcert[0]" class="item-img-box" :src="subjectData.listcert[0].cert_url">
  49. <view v-if="!subjectData.listcert[0]" style="margin-left:40px;color:#999;font-size:14px;">暂无证书</view>
  50. </view>
  51. <view class="word-box" v-if="item.materialType==1">
  52. <view class="word-box-title">{{item.materialName}}</view>
  53. <view class="word-box-min" v-for="(minItem,minIndex) in item.upList" :key="minIndex" @click="lookItem(minItem)">
  54. <img src="@/images/Version2.3/icon_pdf.png" v-if="minItem.type == 'pdf'">
  55. <img src="@/images/Version2.3/icon_word.png" v-if="minItem.type == 'doc' || minItem.type == 'docx'">
  56. <img :src="configUrl+minItem.url" v-if="minItem.type == 'png' || minItem.type == 'jpg' || minItem.type == 'jpeg' || minItem.type == 'gif'">
  57. <view>{{minItem.name}}</view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="bottom-button-p" v-if="subjectData.labSecurityApply.auditStatus == 1" @click="bottomButtonClick">重新提交</view>
  62. </view>
  63. </template>
  64. <script>
  65. import { getDetails,groupListRead} from '@/api/apiDemo/index.js'
  66. import { config } from '@/api/request/config.js'
  67. export default {
  68. data() {
  69. return {
  70. pageType:false,
  71. //传参数据
  72. infoData:{},
  73. //获取数据
  74. subjectData:{},
  75. configUrl:config.base_url,
  76. }
  77. },
  78. onLoad(option) {
  79. this.infoData = JSON.parse(decodeURIComponent(option.item));
  80. //修改页面title
  81. uni.setNavigationBarTitle({
  82. title:this.infoData.auditStatus==0?'待审核':(this.infoData.auditStatus==1?'未通过':(this.infoData.auditStatus==2?'已通过':''))
  83. });
  84. },
  85. onShow(){
  86. this.getRead();
  87. },
  88. methods: {
  89. lookItem(minItem){
  90. if(minItem.type == 'png' || minItem.type == 'jpg' || minItem.type == 'jpeg' || minItem.type == 'gif'){
  91. //查看图片
  92. wx.previewImage({
  93. urls: [config.base_url+minItem.url], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  94. current: '', // 当前显示图片的http链接,默认是第一个
  95. success: function(res) {},
  96. fail: function(res) {},
  97. complete: function(res) {},
  98. })
  99. }else if(minItem.type == 'pdf' || minItem.type == 'doc' || minItem.type == 'docx'){
  100. uni.showLoading({
  101. title: '下载中'
  102. });
  103. //下载文档
  104. wx.downloadFile({
  105. url: config.base_url+minItem.url,
  106. header: {
  107. Authorization: uni.getStorageSync('token')
  108. },
  109. success: function (res) {
  110. const fileManager = wx.getFileSystemManager()
  111. const filePath = wx.env.USER_DATA_PATH + '/' + minItem.name + '.docx'
  112. fileManager.saveFile({
  113. tempFilePath: res.tempFilePath,
  114. filePath,
  115. success: () => {
  116. uni.hideLoading();
  117. wx.openDocument({
  118. filePath: filePath,
  119. showMenu: true,
  120. fileType: minItem.type
  121. })
  122. },
  123. fail: function (res){
  124. uni.hideLoading();
  125. uni.showToast({
  126. title: '下载失败',
  127. icon:"none",
  128. mask:true,
  129. duration: 2000
  130. });
  131. }
  132. })
  133. },
  134. fail: function (res){
  135. uni.hideLoading();
  136. uni.showToast({
  137. title: '下载失败',
  138. icon:"none",
  139. mask:true,
  140. duration: 2000
  141. });
  142. }
  143. })
  144. }
  145. },
  146. //重新提交
  147. bottomButtonClick(){
  148. uni.navigateTo({
  149. url:'/pages_student/workbench/safeAccess/newApplication?item='+encodeURIComponent(JSON.stringify(this.subjectData))
  150. });
  151. },
  152. async getRead() {
  153. let self = this;
  154. const {data} = await groupListRead({messageId:this.infoData.messageId})
  155. if(data.code==200){
  156. let id=data.data.applyId
  157. this.getDetails(id)
  158. }
  159. },
  160. //获取安全准入审批记录详细信息(用户端)
  161. async getDetails(id) {
  162. let self = this;
  163. const {data} = await getDetails({id:id})
  164. if(data.code==200){
  165. for(let i=0;i<data.data.listTemp.length;i++){
  166. if(data.data.listTemp[i].materialType == 1) {
  167. let maxList = [];
  168. for (let o = 0; o < data.data.listTemp[i].listMr.length; o++) {
  169. let bigList = data.data.listTemp[i].listMr[o].dataUrl.split(',');
  170. for (let x = 0; x < bigList.length; x++) {
  171. if (bigList[x]) {
  172. let minList = bigList[x].split(';');
  173. let minListTwo = minList[0].split('.')
  174. let obj = {
  175. name: minList[0],
  176. url: minList[1],
  177. type: minListTwo[1]
  178. };
  179. maxList.push(obj);
  180. }
  181. }
  182. }
  183. data.data.listTemp[i].upList = maxList;
  184. }
  185. }
  186. this.$set(this,"subjectData",data.data);
  187. this.pageType = true;
  188. }
  189. }
  190. }
  191. }
  192. </script>
  193. <style lang="stylus" scoped>
  194. #applicationDetails{
  195. height:100%;
  196. width:100%;
  197. overflow-y scroll
  198. .user-info-box{
  199. background #fff;
  200. border-radius:20rpx;
  201. margin:20rpx 20rpx;
  202. padding:20rpx 0;
  203. .user-info-box_title{
  204. font-size: 30rpx;
  205. font-family: PingFang SC;
  206. font-weight: 500;
  207. color: #333333;
  208. line-height: 30rpx;
  209. margin-left: 24rpx
  210. margin-bottom :10px;
  211. >view{
  212. display inline-block;
  213. }
  214. }
  215. .user-info-box-min{
  216. margin:0 26rpx;
  217. display flex;
  218. view{
  219. line-height:66rpx;
  220. font-size:28rpx;
  221. }
  222. view:nth-child(1){
  223. width:140rpx;
  224. color:#999;
  225. }
  226. view:nth-child(2){
  227. flex:1;
  228. text-align right;
  229. color:#333;
  230. }
  231. }
  232. }
  233. .user-card-box{
  234. background #fff;
  235. border-radius:20rpx;
  236. margin:0 20rpx 20rpx;
  237. padding:20rpx 0;
  238. .user-card-title{
  239. padding-left:24rpx;
  240. font-size:30rpx;
  241. font-weight:700;
  242. margin-bottom:20rpx;
  243. }
  244. .user-card-text{
  245. line-height:66rpx;
  246. font-size:28rpx;
  247. color:#999;
  248. padding:0 24rpx;
  249. }
  250. }
  251. .img-box{
  252. background #fff;
  253. border-radius:20rpx;
  254. margin:0 20rpx 20rpx;
  255. padding:20rpx 0;
  256. .img-title{
  257. padding-left:24rpx;
  258. font-size:30rpx;
  259. font-weight:700;
  260. margin-bottom:20rpx;
  261. }
  262. img{
  263. display block;
  264. width:640rpx;
  265. margin:0 auto 10rpx;
  266. }
  267. }
  268. .word-box{
  269. background #fff;
  270. border-radius:20rpx;
  271. margin:0 20rpx 20rpx;
  272. padding:20rpx 0;
  273. .word-box-title{
  274. padding-left:24rpx;
  275. font-size:30rpx;
  276. font-weight:700;
  277. margin-bottom:20rpx;
  278. }
  279. .word-box-min{
  280. display flex;
  281. margin:0 20rpx 20rpx;
  282. img{
  283. height:60rpx;
  284. width:60rpx;
  285. }
  286. view{
  287. margin-left:20rpx;
  288. line-height:60rpx;
  289. }
  290. }
  291. }
  292. .bottom-button-p{
  293. width:650rpx;
  294. height:100rpx;
  295. line-height:100rpx;
  296. text-align center;
  297. border-radius:20rpx;
  298. margin:20rpx 50rpx;
  299. background: #0183fa;
  300. color:#fff;
  301. }
  302. }
  303. </style>