fileCard.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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="BASE_URL + item.signfj" 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="BASE_URL + leader.signfj" 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. <view>
  95. {{item.content}}
  96. </view>
  97. <view class="flex " style="line-height: 20px;">
  98. <u--image :src="BASE_URL + item.signfj" width="80px" height="20px"></u--image>
  99. {{item.updateTime}}
  100. </view>
  101. </view>
  102. </u-col>
  103. </u-row>
  104. <u-row justify="space-between" class="card_row card_row_border">
  105. <u-col span="3" textAlign="center" class="card_col">
  106. <view>备注</view>
  107. </u-col>
  108. <u-col span="9" textAlign="center">
  109. <view>{{inputForm.remark}}</view>
  110. </u-col>
  111. </u-row>
  112. <u--text style="margin: 10px;" size="12" type="error" text="所有涉密敏感信息不得上传"></u--text>
  113. <view class="card_other">
  114. 附件:
  115. <view class="other_info" v-for="item in fileList">
  116. <view class="other_pdf flex ">
  117. <u--text decoration='underline' color='#36a7f3' :text="item.name"
  118. @click="download(item)"></u--text>
  119. </view>
  120. </view>
  121. <u-upload :fileList="imgList" name="3" multiple :maxCount="imgList.length" :previewFullImage="true"
  122. :deletable="false"></u-upload>
  123. </view>
  124. </view>
  125. </view>
  126. <u-overlay :show="ismask">
  127. <view class="warp">
  128. <view class="rect"><u-button plain loading loadingText="加载中"></u-button></view>
  129. </view>
  130. </u-overlay>
  131. </view>
  132. </template>
  133. <script>
  134. import {
  135. isImageFormat
  136. } from "@/common/util.js"
  137. import BASE_URL from '@/config.js'
  138. import fileService from '@/api/file/fileService.js'
  139. import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
  140. import gwFlowService from '@/api/circulation/gwFlowService.js'
  141. export default {
  142. mounted() {
  143. gwCirculationCard2Service.queryById(this.gwId).then(data => {
  144. this.inputForm = data
  145. this.inputForm.receivingTime = this.inputForm.receivingTime.substring(5, 10)
  146. this.fileLists = this.inputForm.attachedDocumentId.split(",")
  147. this.fileLists.forEach(item => {
  148. console.log("item==========",item);
  149. if (isImageFormat(item)) {
  150. let img = {url:BASE_URL+item}
  151. this.imgList.push(img)
  152. } else {
  153. const fileName = item.split(/[/\\=]/).pop();
  154. let a = {
  155. name: fileName,
  156. url: item
  157. }
  158. this.fileList.push(a)
  159. }
  160. })
  161. })
  162. gwFlowService.queryByGwId(this.gwId).then(data => {
  163. data.forEach(item => {
  164. if (item.which == 0 && item.state == 0) {
  165. this.officeInfo.push(item)
  166. } else if (item.which == 1 && item.state == 0) {
  167. this.leaderInfo.push(item)
  168. } else if (item.which == 2 && item.state == 0) {
  169. this.undertakeInfo.push(item)
  170. }
  171. })
  172. this.ismask = false
  173. })
  174. },
  175. data() {
  176. return {
  177. ismask: true,
  178. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  179. // 公文附件
  180. fileLists: [],
  181. fileList: [],
  182. imgList: [],
  183. // 办公室信息
  184. officeInfo: [],
  185. // 领导信息
  186. leaderInfo: [],
  187. // 承办信息
  188. undertakeInfo: [],
  189. inputForm: {
  190. id: '',
  191. yearNum: '',
  192. cardNum: '',
  193. sendingAgency: '',
  194. docFontSize: '',
  195. fileSource: '',
  196. writtenTime: '',
  197. receivingTime: '',
  198. contentSummary: '',
  199. attachedDocumentId: ''
  200. },
  201. gwflow: {
  202. id: '',
  203. gwId: '',
  204. content: '',
  205. signfj: '',
  206. createTruename: '',
  207. nextTruename: '',
  208. nextUser: '',
  209. which: '',
  210. state: '',
  211. next: '',
  212. nextLeadUser: '',
  213. nextDepUser: '',
  214. remark: '',
  215. },
  216. }
  217. },
  218. methods:{
  219. // 下载文件
  220. download(param) {
  221. console.log("param=====",param);
  222. let item = {
  223. uploadPath:'filtransmit/2024/3/',
  224. name:param.name
  225. }
  226. fileService.download(item).then()
  227. },
  228. },
  229. props: {
  230. isoffice: {
  231. type: Boolean,
  232. default: false
  233. },
  234. isleader: {
  235. type: Boolean,
  236. default: false
  237. },
  238. isinfo: {
  239. type: Boolean,
  240. default: false
  241. },
  242. gwId: {
  243. type: String,
  244. }
  245. },
  246. }
  247. </script>
  248. <style>
  249. .warp {
  250. display: flex;
  251. align-items: center;
  252. justify-content: center;
  253. height: 100%;
  254. }
  255. .card_main {
  256. width: 100%;
  257. background-color: #fefefe;
  258. }
  259. .card_banner {
  260. width: 100%;
  261. height: 60px;
  262. background-color: #36a7f3;
  263. }
  264. .card_info {
  265. width: 96%;
  266. /* height: 80vh; */
  267. margin: -40px 2% 0;
  268. background-color: #fefefe;
  269. border-radius: 15px;
  270. text-align: center;
  271. }
  272. .card_info_title {
  273. font-size: 16px;
  274. font-weight: 700;
  275. padding-top: 10px;
  276. color: #36a7f3;
  277. }
  278. .card_table {
  279. padding: 20px 20px;
  280. font-size: 12px;
  281. }
  282. .card_row {
  283. line-height: 30px;
  284. border: 1px solid;
  285. word-wrap: break-word;
  286. }
  287. .card_row_border {
  288. border-top: none;
  289. }
  290. .card_col {
  291. border-right: 1px solid;
  292. }
  293. .card_col_1 {
  294. border-left: 1px solid;
  295. }
  296. .info_abstract {
  297. line-height: 16px;
  298. word-wrap: break-word;
  299. border-left: 1px solid;
  300. }
  301. .info_abstract_v {
  302. margin: 18px;
  303. }
  304. .vertical-text {
  305. writing-mode: vertical-rl;
  306. /* 文字垂直排列,从右向左 */
  307. /* 或者使用vertical-lr; 从左向右 */
  308. }
  309. .card_other {
  310. text-align: left;
  311. }
  312. </style>