files_detail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <view class="">
  3. <view class="navbar">
  4. <view class="back">
  5. <text class="iconfont icon-fanhui " @click="backLast()"></text>
  6. </view>
  7. <text>文件详情</text>
  8. </view>
  9. <view class="upload-home">
  10. <view class="imgList">
  11. <view class="img-title">文件预览</view>
  12. <view class="img-box">
  13. <view class="htz-image-upload-list">
  14. <view class="htz-image-upload-Item" v-for="(item,index) in fileDetail.resource" :key="index" @click="enlargeImg(item)" v-if="fileDetail.type==1">
  15. <image class="img" :src="item" ></image>
  16. </view>
  17. <view class="htz-text" v-if="fileDetail.type==0" v-html="containt">
  18. {{containt}}
  19. </view>
  20. </view>
  21. <!-- -->
  22. </view>
  23. <view class="frame" v-show="isShow" @click="isShow=false">
  24. <view class="border" >
  25. <image :src="bigImg" mode="aspectFit" :lazy-load="true"></image>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="table">
  30. <view class="title">文件信息</view>
  31. <view class="text-box">
  32. <text class="input-key">文件名称:</text><text class="input-val">{{fileDetail.name}}</text>
  33. </view>
  34. <view class="text-box">
  35. <text class="input-key">上传时间:</text><text class="input-val">{{fileDetail.updated_at}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. var app = getApp()
  43. import navBar from '../../components/navBar/navbar.vue';
  44. export default {
  45. components:{
  46. navBar
  47. },
  48. data() {
  49. return {
  50. fileDetail: {
  51. updated_at: "",
  52. status_text: "",
  53. user: {
  54. name: ''
  55. },
  56. name: ""
  57. },
  58. isShow: false,
  59. bigImg: "",
  60. id: "",
  61. containt:"<div><h1>123</h1></div>"
  62. }
  63. },
  64. onLoad(options) {
  65. uni.showLoading()
  66. let id = options.id
  67. this.id = options.id
  68. app.request('/organization-activity-logs/' + id,'get').then(res => {
  69. this.fileDetail = res.data.data
  70. this.containt=res.data.data.body
  71. uni.hideLoading()
  72. console.log(res.data.data, '------------------列表详情')
  73. })
  74. },
  75. methods: {
  76. backLast:function(){
  77. console.log(this.url)
  78. uni.navigateBack({
  79. })
  80. },
  81. enlargeImg: function(e) {
  82. this.bigImg = e
  83. this.isShow = true
  84. },
  85. }
  86. }
  87. </script>
  88. <style lang="scss">
  89. page {
  90. background-color: #EFF1F6;
  91. }
  92. .navbar {
  93. font-size: 32upx;
  94. height: 100upx;
  95. line-height: 100upx;
  96. color: #888888;
  97. position: relative;
  98. position: fixed;
  99. top: 0;
  100. z-index: 9999999;
  101. width: 100%;
  102. background-color: #FFFFFF;
  103. text-align: center;
  104. border-bottom: solid 2upx #EFF1F6;
  105. .back {
  106. height: 100upx;
  107. width: 100upx;
  108. text-align: center;
  109. position: absolute;
  110. float: left;
  111. left: 0upx;
  112. font-size: 32upx;
  113. }
  114. }
  115. uni-page-body {
  116. height: 100%;
  117. }
  118. .htz-image-upload-list {
  119. display: flex;
  120. flex-wrap: wrap;
  121. justify-content: start;
  122. }
  123. .htz-image-upload-Item {
  124. // width: 200rpx;
  125. height: 200rpx;
  126. margin: 13rpx;
  127. border-radius: 10rpx;
  128. line-height: 200rpx;
  129. flex: 0 0 30%;
  130. position: relative;
  131. }
  132. .htz-text{
  133. height: 100%;
  134. border-radius: 10rpx;
  135. flex: 0 0 30%;
  136. }
  137. .htz-image-upload-Item:first-child {
  138. margin-left: 5upx !important;
  139. }
  140. .htz-image-upload-Item:nth-child(4n) {
  141. margin-left: 5upx !important;
  142. }
  143. .htz-image-upload-Item:nth-child(3n) {
  144. margin-right: 5upx !important;
  145. }
  146. .htz-image-upload-Item image {
  147. width: 100%;
  148. height: 100%;
  149. border-radius: 10rpx;
  150. border: 1px solid #FF0000;
  151. }
  152. .upload-home {
  153. background-color: #EFF1F6;
  154. width: 100%;
  155. height: 100%;
  156. padding-top: 100upx;
  157. .table {
  158. background-color: #FFFFFF;
  159. font-size: 28upx;
  160. margin-top: 30upx;
  161. padding: 30upx;
  162. .title {
  163. color: #666;
  164. font-size: 30upx;
  165. display: block;
  166. padding-bottom: 30upx;
  167. border-bottom: 1px solid #EFF1F6;
  168. }
  169. .text-box {
  170. margin-top: 20upx;
  171. .input-key {
  172. display: inline-block;
  173. height: 80upx;
  174. line-height: 80upx;
  175. width: 160upx;
  176. vertical-align: top;
  177. color: #555;
  178. font-size: 32upx;
  179. }
  180. .input-val {
  181. display: inline-block;
  182. height: 80upx;
  183. line-height: 80upx;
  184. vertical-align: top;
  185. width: calc(100% - 160upx);
  186. text-align: right;
  187. color: #333;
  188. font-size: 32upx;
  189. }
  190. }
  191. }
  192. .imgList {
  193. background-color: #fff;
  194. padding: 30upx;
  195. .remark {
  196. font-size: 26upx;
  197. padding-top: 20upx;
  198. color: #555;
  199. }
  200. .img-title {
  201. color: #666;
  202. font-size: 30upx;
  203. display: block;
  204. position: relative;
  205. .down-tmp {
  206. color: red;
  207. position: absolute;
  208. right: 0;
  209. }
  210. }
  211. .img-box {
  212. margin-top: 20upx;
  213. background-color: #F3F3F3;
  214. border-radius: 10upx;
  215. padding: 15upx;
  216. .list-img {}
  217. }
  218. }
  219. .htz-image-upload-list {
  220. display: flex;
  221. flex-wrap: wrap;
  222. }
  223. .htz-image-upload-Item-add {
  224. font-size: 105rpx;
  225. text-align: center;
  226. border: 1px dashed #d9d9d9;
  227. color: #d9d9d9;
  228. }
  229. .htz-image-upload-Item-del {
  230. background-color: #f5222d;
  231. font-size: 24rpx;
  232. position: absolute;
  233. width: 35rpx;
  234. height: 35rpx;
  235. line-height: 35rpx;
  236. text-align: center;
  237. top: 0;
  238. right: 0;
  239. z-index: 100;
  240. color: #fff;
  241. }
  242. .tips {
  243. margin: 90upx auto 0;
  244. border: 1px dashed red;
  245. padding: 20upx;
  246. width: 85%;
  247. border-radius: 15upx;
  248. font-size: 28upx;
  249. color: #555;
  250. }
  251. }
  252. .submit {
  253. position: fixed;
  254. height: 80upx;
  255. color: #FFFFFF;
  256. text-align: center;
  257. line-height: 80upx;
  258. width: 80%;
  259. bottom: 20upx;
  260. left: 10%;
  261. font-size: 32upx;
  262. border-radius: 10upx;
  263. background-color: #f5222d;
  264. }
  265. .frame {
  266. position: fixed;
  267. top: 0;
  268. left: 0;
  269. height: 100%;
  270. background-color: rgba($color: #000000, $alpha: 0.7);
  271. width: 100%;
  272. .border {
  273. width: 90%;
  274. height: 70%;
  275. margin: 0 auto;
  276. margin-top: 100upx;
  277. image {
  278. width: 100%;
  279. height: 100%;
  280. }
  281. }
  282. }
  283. </style>