notPassInfo.vue 11 KB

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