fileCard.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <view class="card_main">
  3. <view class="card_banner"></view>
  4. <view class="card_info">
  5. <view class="card_info_title">
  6. 盐都工信文件阅办卡
  7. </view>
  8. <view class="card_table">
  9. <u-row justify="space-between">
  10. <u-col span="6">
  11. <view>年度: {{inputForm.yearNum}}</view>
  12. </u-col>
  13. <u-col span="6">
  14. <view style="text-align: right;">{{inputForm.cardNum}}</view>
  15. </u-col>
  16. </u-row>
  17. <u-row justify="space-between" class="card_row">
  18. <u-col span="3" textAlign="center" class="card_col">
  19. <view>来文机关</view>
  20. </u-col>
  21. <u-col span="3" textAlign="center" class="">
  22. <view>{{inputForm.sendingAgency}}</view>
  23. </u-col>
  24. <u-col span="3" textAlign="center" class="card_col card_col_1">
  25. <view>来文字号</view>
  26. </u-col>
  27. <u-col span="3" textAlign="center">
  28. <view>{{inputForm.docFontSize}}</view>
  29. </u-col>
  30. </u-row>
  31. <u-row justify="space-between" class="card_row card_row_border">
  32. <u-col span="3" textAlign="center" class="card_col">
  33. <view>收文时间</view>
  34. </u-col>
  35. <u-col span="3" textAlign="center" class="">
  36. <view>{{inputForm.receivingTime}}</view>
  37. </u-col>
  38. <u-col span="3" textAlign="center" class="card_col card_col_1">
  39. <view>文件来源</view>
  40. </u-col>
  41. <u-col span="3" textAlign="center">
  42. <view>{{inputForm.fileSource}}</view>
  43. </u-col>
  44. </u-row>
  45. <u-row justify="space-between" class="card_row card_row_border">
  46. <u-col span="3" textAlign="center" align="center">
  47. <view>内容摘要</view>
  48. </u-col>
  49. <u-col span="9" class="info_abstract">
  50. <view class="info_abstract_v">
  51. {{inputForm.contentSummary}}
  52. </view>
  53. </u-col>
  54. </u-row>
  55. <u-row v-if="officeInfo.length>0" style="height: 70px;" justify="space-between"
  56. class="card_row card_row_border">
  57. <u-col span="1" textAlign="center">
  58. <view class="vertical-text">办公室拟办</view>
  59. </u-col>
  60. <u-col span="11" class="info_abstract">
  61. <view v-for="item in officeInfo" class="info_abstract_v">
  62. <view>
  63. {{item.content}}
  64. </view>
  65. <view class="flex " style="line-height: 20px;">
  66. <u--image :src="src" width="80px" height="20px"></u--image>
  67. {{item.updateTime}}
  68. </view>
  69. </view>
  70. </u-col>
  71. </u-row>
  72. <u-row v-if="leaderInfo.length>0" justify="space-between" class="card_row card_row_border">
  73. <u-col span="1" textAlign="center">
  74. <view class="vertical-text">领导批示</view>
  75. </u-col>
  76. <u-col span="11" class="info_abstract">
  77. <view v-for="leader in leaderInfo" class="info_abstract_v">
  78. <view>
  79. {{leader.content}}
  80. </view>
  81. <view class="flex " style="line-height: 20px;">
  82. <u--image :src="src" width="80px" height="20px"></u--image>
  83. {{leader.updateTime}}
  84. </view>
  85. </view>
  86. </u-col>
  87. </u-row>
  88. <u-row v-if="undertakeInfo.length>0" justify="space-between" class="card_row card_row_border">
  89. <u-col span="1" textAlign="center">
  90. <view class="vertical-text">承办情况</view>
  91. </u-col>
  92. <u-col span="11" class="info_abstract">
  93. <view v-for="item in undertakeInfo" class="info_abstract_v">
  94. {{item.content}} {{item.updateTime}}
  95. </view>
  96. </u-col>
  97. </u-row>
  98. <u-row justify="space-between" class="card_row card_row_border">
  99. <u-col span="3" textAlign="center" class="card_col">
  100. <view>备注</view>
  101. </u-col>
  102. <u-col span="9" textAlign="center">
  103. <view>{{inputForm.remark}}</view>
  104. </u-col>
  105. </u-row>
  106. <u--text style="margin: 10px;" size="12" type="error" text="所有涉密敏感信息不得上传"></u--text>
  107. <view class="card_other">
  108. 附件:
  109. <view class="other_info" v-for="item in fileList">
  110. <view class="other_pdf flex ">
  111. <u--text mode="link" :text="item.name" :href="item.url"></u--text>
  112. </view>
  113. </view>
  114. <u-upload :fileList="imgList" name="3" multiple :maxCount="imgList.length" :previewFullImage="true"
  115. :deletable="false"></u-upload>
  116. </view>
  117. </view>
  118. </view>
  119. <u-overlay :show="ismask">
  120. <view class="warp">
  121. <view class="rect"><u-button plain loading loadingText="加载中"></u-button></view>
  122. </view>
  123. </u-overlay>
  124. </view>
  125. </template>
  126. <script>
  127. import {
  128. isImageFormat
  129. } from "@/common/util.js"
  130. import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
  131. import gwFlowService from '@/api/circulation/gwFlowService.js'
  132. export default {
  133. mounted() {
  134. gwCirculationCard2Service.queryById(this.gwId).then(data => {
  135. this.inputForm = data
  136. this.inputForm.receivingTime = this.inputForm.receivingTime.substring(5, 10)
  137. })
  138. gwFlowService.queryByGwId(this.gwId).then(data => {
  139. data.forEach(item =>{
  140. if(item.which == 0 && item.state ==0) {
  141. this.officeInfo.push(item)
  142. }else if(item.which==1 && item.state ==0){
  143. this.leaderInfo.push(item)
  144. }else if(item.which==2 && item.state ==0) {
  145. this.undertakeInfo.push(item)
  146. }
  147. })
  148. this.ismask = false
  149. })
  150. this.fileLists.forEach(item => {
  151. if (isImageFormat(item.url)) {
  152. this.imgList.push(item)
  153. } else {
  154. const fileName = item.url.split(/[/\\]/).pop();
  155. let a = {
  156. name: fileName,
  157. url: item.url
  158. }
  159. this.fileList.push(a)
  160. }
  161. })
  162. },
  163. data() {
  164. return {
  165. ismask:true,
  166. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  167. // 公文附件
  168. fileLists: [],
  169. fileList: [],
  170. imgList: [],
  171. // 办公室信息
  172. officeInfo:[],
  173. // 领导信息
  174. leaderInfo:[],
  175. // 承办信息
  176. undertakeInfo:[],
  177. inputForm: {
  178. id: '',
  179. yearNum: '',
  180. cardNum: '',
  181. sendingAgency: '',
  182. docFontSize: '',
  183. fileSource: '',
  184. writtenTime: '',
  185. receivingTime: '',
  186. contentSummary: '',
  187. attachedDocumentId: ''
  188. },
  189. gwflow: {
  190. id: '',
  191. gwId: '',
  192. content: '',
  193. signfj: '',
  194. createTruename: '',
  195. nextTruename: '',
  196. nextUser: '',
  197. which: '',
  198. state: '',
  199. next: '',
  200. nextLeadUser: '',
  201. nextDepUser: '',
  202. remark: '',
  203. },
  204. }
  205. },
  206. props: {
  207. isoffice: {
  208. type: Boolean,
  209. default: false
  210. },
  211. isleader: {
  212. type: Boolean,
  213. default: false
  214. },
  215. isinfo: {
  216. type: Boolean,
  217. default: false
  218. },
  219. gwId: {
  220. type: String,
  221. }
  222. },
  223. }
  224. </script>
  225. <style>
  226. .warp {
  227. display: flex;
  228. align-items: center;
  229. justify-content: center;
  230. height: 100%;
  231. }
  232. .card_main {
  233. width: 100%;
  234. background-color: #fefefe;
  235. }
  236. .card_banner {
  237. width: 100%;
  238. height: 60px;
  239. background-color: #36a7f3;
  240. }
  241. .card_info {
  242. width: 96%;
  243. /* height: 80vh; */
  244. margin: -40px 2% 0;
  245. background-color: #fefefe;
  246. border-radius: 15px;
  247. text-align: center;
  248. }
  249. .card_info_title {
  250. font-size: 16px;
  251. font-weight: 700;
  252. padding-top: 10px;
  253. color: #36a7f3;
  254. }
  255. .card_table {
  256. padding: 20px 20px;
  257. font-size: 12px;
  258. }
  259. .card_row {
  260. line-height: 30px;
  261. border: 1px solid;
  262. word-wrap: break-word;
  263. }
  264. .card_row_border {
  265. border-top: none;
  266. }
  267. .card_col {
  268. border-right: 1px solid;
  269. }
  270. .card_col_1 {
  271. border-left: 1px solid;
  272. }
  273. .info_abstract {
  274. line-height: 16px;
  275. word-wrap: break-word;
  276. border-left: 1px solid;
  277. }
  278. .info_abstract_v {
  279. margin: 18px;
  280. }
  281. .vertical-text {
  282. writing-mode: vertical-rl;
  283. /* 文字垂直排列,从右向左 */
  284. /* 或者使用vertical-lr; 从左向右 */
  285. }
  286. .card_other {
  287. text-align: left;
  288. }
  289. </style>