workProgress.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="progress-container">
  3. <view class="" v-if="documentList.length">
  4. <view class="progress-title">工作材料</view>
  5. <view class="uni-padding-wrap">
  6. <view class="page-section swiper">
  7. <view class="page-section-spacing">
  8. <swiper class="swiper" display-multiple-items='2'>
  9. <swiper-item v-for="(item, i) in documentList">
  10. <view class="swiper-item swiper-file" @click="previewFile(item.filePath)">
  11. <image :src="imgUrl(item.fileName)" mode=""></image>
  12. <view class="swiper-text">{{item.fileName}}</view>
  13. </view>
  14. </swiper-item>
  15. </swiper>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="" style="margin-top: 20px">
  21. <view class="progress-title">工作进展</view>
  22. <view class="guest-list-item" v-for="(item, i) in progressList" :key="i">
  23. <view class="center-section">
  24. <text class="guest-name ellipsis">{{item.progressName}}</text>
  25. <text class="guest-position ellipsis">负责部门:{{item.progressPrincipal}}</text>
  26. <text class="guest-unit ellipsis">创建时间:{{moment(item.createDate).format('YYYY-MM-DD')}}</text>
  27. </view>
  28. <view class="right-section">
  29. <image v-if="item.isComplete" src="@/static/img/conference/completed.png"></image>
  30. <image v-else src="@/static/img/conference/unfinished.png"></image>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. props: ['meetingId'],
  39. data() {
  40. return {
  41. documentList: [],
  42. progressList: []
  43. }
  44. },
  45. watch: {
  46. meetingId() {
  47. this.getProgressData();
  48. }
  49. },
  50. mounted() {
  51. if (this.meetingId) {
  52. this.getProgressData();
  53. }
  54. },
  55. methods: {
  56. previewFile(path) {
  57. uni.downloadFile({
  58. url: 'https://m.geidcp.com/api/file/pub/' + path,
  59. success: function(res) {
  60. var filePath = res.tempFilePath;
  61. uni.openDocument({
  62. filePath: filePath,
  63. success: function(res) {
  64. console.log('打开文档成功');
  65. }
  66. });
  67. }
  68. });
  69. },
  70. imgUrl(fileName) {
  71. let suffixTxt = '';
  72. var startIndex = fileName.lastIndexOf(".");
  73. if (startIndex != -1) {
  74. suffixTxt = fileName.substring(startIndex + 1, fileName.length).toLowerCase();
  75. }
  76. if (suffixTxt == 'doc' || suffixTxt == 'docx') {
  77. return '../../static/img/conference/doc.png';
  78. } else if (suffixTxt == 'pdf') {
  79. return '../../static/img/conference/pdf.png';
  80. } else if (suffixTxt == 'ppt' || suffixTxt == 'pptx') {
  81. return '../../static/img/conference/ppt.png';
  82. } else if (suffixTxt == 'xls' || suffixTxt == 'xlsx') {
  83. return '../../static/img/conference/XLSX.png';
  84. }
  85. },
  86. async getProgressData() {
  87. const res = await this.$myRequest({
  88. url: '/meeting/meetingPlan/findAppMeetingWork',
  89. data: {
  90. meetingId: this.meetingId
  91. }
  92. });
  93. this.documentList = res.data.workProgressesFile;
  94. this.progressList = res.data.meetingWorkProgresss;
  95. // console.log('进展',res)
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped>
  101. .progress-container {
  102. padding: 0 30rpx;
  103. }
  104. .progress-title {
  105. font-size: 18px;
  106. margin-bottom: 16px;
  107. font-weight: bold;
  108. }
  109. .swiper-file {
  110. border: 1px solid #d7d7d7;
  111. border-radius: 20px;
  112. text-align: center;
  113. padding: 10px 0;
  114. margin: 0 10px;
  115. height: 150px;
  116. }
  117. .swiper-file view {
  118. color: #8b8b8b;
  119. margin-top: 10px;
  120. padding: 0 4px;
  121. font-weight: bold;
  122. }
  123. .swiper-file image {
  124. width: 50px;
  125. height: 50px;
  126. margin: 0 auto
  127. }
  128. .swiper-text {
  129. height: 62px;
  130. overflow: hidden;
  131. display: -webkit-box;
  132. -webkit-line-clamp: 3;
  133. -webkit-box-orient: vertical;
  134. }
  135. .guest-list-item {
  136. display: flex;
  137. position: relative;
  138. align-items: center;
  139. border-top: 1px solid #d7d7d7;
  140. }
  141. .guest-name {
  142. font-size: 16px;
  143. height: 24px;
  144. line-height: 36px;
  145. color: #333;
  146. }
  147. .guest-vip {
  148. display: inline-block;
  149. line-height: 14px;
  150. font-size: 10px;
  151. padding: 0 4px;
  152. margin: 0 10px;
  153. margin-top: -4px;
  154. background: #d81e06;
  155. transform: skewX(-10deg);
  156. color: #fff;
  157. border-radius: 2px;
  158. vertical-align: middle;
  159. }
  160. .guest-speaker {
  161. color: #d81e06;
  162. font-size: 16px;
  163. }
  164. .guest-position,
  165. .guest-unit {
  166. display: block;
  167. font-size: 12px;
  168. color: #aaa;
  169. }
  170. .center-section {
  171. flex: 1;
  172. padding-left: 10px;
  173. }
  174. .right-section {
  175. width: 240upx;
  176. text-align: center;
  177. }
  178. .right-section image {
  179. width: 50px;
  180. height: 50px;
  181. }
  182. .ellipsis {
  183. width: 100%;
  184. overflow: hidden;
  185. text-overflow: ellipsis;
  186. white-space: nowrap;
  187. }
  188. </style>