fxyk-timeline-newest.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="d-flex">
  3. <view class="flex-s tag" :style="projectInfo[1]" >{{ projectInfo[0] }}</view>
  4. <u-time-line-item nodeTop="2" class="u-margin-left-62 u-margin-bottom-0">
  5. <!-- 此处自定义了左边内容,用一个图标替代 -->
  6. <template v-slot:node>
  7. <!-- 此处为uView的icon组件 -->
  8. <u-icon class="icon-bgcolor" :name="projectInfo[3]" :size="42" :color="projectInfo[2]"></u-icon>
  9. </template>
  10. <template v-slot:content>
  11. <view class="card-style">
  12. <view class="d-flex j-sb">
  13. <view class="word-one">立项审批</view>
  14. <view class="word-two">
  15. <text>2019.6.7</text>
  16. -
  17. <text>2019.6.9</text>
  18. </view>
  19. <view class="word-four">额定天数: 4天</view>
  20. </view>
  21. <view class="d-flex j-sb">
  22. <view class="word-three">部门:营销部</view>
  23. <view class="word-four">实际天数: 4天</view>
  24. </view>
  25. <view class="d-flex a-center j-sb">
  26. <view class="word-seven">位置: 1.11111 2.1111</view>
  27. <view style="margin-right:30rpx">
  28. <view class="word-six" @click="jump_project_info_point_order"><text>批示</text></view>
  29. <view class="word-six" style="margin-top:10rpx" @click="jump_project_accessory"><text>查看附件</text></view>
  30. </view>
  31. </view>
  32. <text class="word-five">现场图片:</text>
  33. <view class="d-flex u-m-b-5">
  34. <u-image class="u-m-r-15" width="121rpx" height="92rpx" src="/static/images/example.png" :fade="false"></u-image>
  35. <!-- <u-image class="u-m-r-15" width="92rpx" height="92rpx" src="/static/images/upload_img.png" :fade="false"></u-image> -->
  36. <!-- <u-image class="u-m-r-15" width="92rpx" height="92rpx" src="/static/images/upload_fj.png" :fade="false"></u-image> -->
  37. </view>
  38. <view class="word-three">备注:1231231231</view>
  39. </view>
  40. <u-line v-if="projectIndex !== 9" style="margin-left: -15rpx;" length="560rpx" color="black" margin="10.5rpx" border-style="dashed"/>
  41. </template>
  42. </u-time-line-item>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. props: {
  48. // 是否逾期 决定左侧文字背景颜色 图标颜色 进程颜色 实际天数颜色 逾期原因的展示
  49. // 1 如期完成 2 预期完成 3项目终止
  50. projectStatus: {
  51. type: [ Number, String ],
  52. default: 1
  53. },
  54. // 项目进度
  55. projectIndex: {
  56. type: [ Number, String ],
  57. default: 1
  58. },
  59. // 项目数据
  60. // projectData: {
  61. // type: Object,
  62. // default: () => {
  63. // return {}
  64. // }
  65. // }
  66. },
  67. data() {
  68. return {
  69. value: ''
  70. }
  71. },
  72. computed: {
  73. projectInfo() {
  74. if ( parseInt(this.projectStatus) === 0 ) {
  75. return ['进行中', {'background-color': '#E7AE5E'}, '#E7AE5E','clock-fill']
  76. } else if ( parseInt(this.projectStatus) === 1 ) {
  77. return ['逾期完成', {'background-color': '#4CB1FF'}, '#4CB1FF','checkmark-circle-fill']
  78. } else if ( parseInt(this.projectStatus) === 2 ) {
  79. return ['逾期完成', {'background-color': '#F17E38'}, '#F17E38','checkmark-circle-fill']
  80. } else {
  81. return ['项目终止', {'background-color': '#FF0014'}, '#FF0014','close-circle-fill']
  82. }
  83. },
  84. projectPlan() {
  85. switch(parseInt(this.projectIndex)) {
  86. case 1:
  87. return '立项审批'
  88. case 2:
  89. return '设计委托'
  90. case 3:
  91. return '初设评审'
  92. case 4:
  93. return '占地进度'
  94. case 5:
  95. return '现场施工'
  96. case 6:
  97. return '竣工验收'
  98. case 7:
  99. return '物资管理'
  100. case 8:
  101. return '工程结算'
  102. case 9:
  103. return '资料归档'
  104. }
  105. }
  106. },
  107. methods: {
  108. // 跳到节点批示页
  109. jump_project_info_point_order() {
  110. uni.navigateTo({
  111. url: '/pages/index/projectInfoPointOrder'
  112. })
  113. },
  114. // 跳到附件页
  115. jump_project_accessory() {
  116. uni.navigateTo({
  117. url: '/pages/index/accessory'
  118. })
  119. }
  120. }
  121. }
  122. </script>
  123. <style lang="scss" scoped>
  124. .tag {
  125. width: 110rpx;
  126. height: 36rpx;
  127. border-radius: 8rpx;
  128. text-align: center;
  129. line-height: 36rpx;
  130. font-size: 21rpx;
  131. font-family: SimSun;
  132. color: #FFFFFF;
  133. margin-top:5rpx;
  134. }
  135. .icon-bgcolor {
  136. background-color: #F7FBFF;
  137. }
  138. .card-style{
  139. width: 560rpx;
  140. // height: 130rpx;
  141. background: #FFFFFF;
  142. box-shadow: 0rpx 2rpx 13rpx rgba(0, 0, 0, 0.16);
  143. border-radius: 17rpx;
  144. margin-left: -15rpx;
  145. padding: 12rpx 20rpx 10rpx;
  146. .word-one {
  147. width: 117rpx;
  148. height: 29rpx;
  149. font-size: 29rpx;
  150. font-family: SimSun;
  151. font-weight: 400;
  152. line-height: 40rpx;
  153. color: #000000;
  154. }
  155. .word-two {
  156. width: 213rpx;
  157. height: 25rpx;
  158. font-size: 25rpx;
  159. font-family: SimSun;
  160. font-weight: 400;
  161. line-height: 33rpx;
  162. color: #000000;
  163. }
  164. .word-three {
  165. // width: 75rpx;
  166. // height: 25rpx;
  167. font-size: 25rpx;
  168. font-family: SimSun;
  169. font-weight: 400;
  170. line-height: 33rpx;
  171. color: #000000;
  172. margin-top: 20rpx;
  173. }
  174. .word-four {
  175. width: 163rpx;
  176. height: 25rpx;
  177. font-size: 25rpx;
  178. font-family: SimSun;
  179. font-weight: 400;
  180. line-height: 33rpx;
  181. color: #000000;
  182. }
  183. .word-five {
  184. width: 125rpx;
  185. height: 25rpx;
  186. font-size: 25rpx;
  187. font-family: SimSun;
  188. font-weight: 400;
  189. line-height: 33rpx;
  190. color: #000000;
  191. }
  192. .word-six {
  193. width: 106rpx;
  194. height: 33rpx;
  195. background: #4CB2FF;
  196. border-radius: 8rpx;
  197. font-size: 21rpx;
  198. font-family: SimSun;
  199. font-weight: 400;
  200. line-height: 33rpx;
  201. color: #FFFFFF;
  202. text-align: center;
  203. margin-left: 17rpx;
  204. }
  205. .word-seven {
  206. // width: 75rpx;
  207. height: 25rpx;
  208. font-size: 25rpx;
  209. font-family: SimSun;
  210. font-weight: 400;
  211. line-height: 33rpx;
  212. color: #000000;
  213. }
  214. }
  215. </style>