fxyk-timeline-newest.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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"><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 d-flex" style="width:520rpx;height:38rpx;border:1rpx solid #E0DFDF;">
  39. <view class="u-m-l-10">备注:</view>
  40. <u-input v-model="value"
  41. type="text"
  42. :border="false"
  43. placeholder=""
  44. :isExistIcon="false"
  45. height="38"
  46. borderRadius="0"
  47. style="margin-top:-5rpx"
  48. :clearable="false"
  49. :custom-style="{'font-size': '25rpx','font-weight': 400,'line-height': '33rpx'}" />
  50. </view>
  51. <fxyk-button width="147"
  52. height="38"
  53. content="提交"
  54. style="font-size: 25rpx;font-family: SimSun;font-weight: 400;line-height: 33rpx;margin-top: 8rpx;"/>
  55. </view>
  56. <u-line v-if="projectIndex !== 9" style="margin-left: -15rpx;" length="560rpx" color="black" margin="10.5rpx" border-style="dashed"/>
  57. </template>
  58. </u-time-line-item>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. props: {
  64. // 是否逾期 决定左侧文字背景颜色 图标颜色 进程颜色 实际天数颜色 逾期原因的展示
  65. // 1 如期完成 2 预期完成 3项目终止
  66. projectStatus: {
  67. type: [ Number, String ],
  68. default: 1
  69. },
  70. // 项目进度
  71. projectIndex: {
  72. type: [ Number, String ],
  73. default: 1
  74. },
  75. // 项目数据
  76. // projectData: {
  77. // type: Object,
  78. // default: () => {
  79. // return {}
  80. // }
  81. // }
  82. },
  83. data() {
  84. return {
  85. value: ''
  86. }
  87. },
  88. computed: {
  89. projectInfo() {
  90. if ( parseInt(this.projectStatus) === 0 ) {
  91. return ['进行中', {'background-color': '#E7AE5E'}, '#E7AE5E','clock-fill']
  92. } else if ( parseInt(this.projectStatus) === 1 ) {
  93. return ['逾期完成', {'background-color': '#4CB1FF'}, '#4CB1FF','checkmark-circle-fill']
  94. } else if ( parseInt(this.projectStatus) === 2 ) {
  95. return ['逾期完成', {'background-color': '#F17E38'}, '#F17E38','checkmark-circle-fill']
  96. } else {
  97. return ['项目终止', {'background-color': '#FF0014'}, '#FF0014','close-circle-fill']
  98. }
  99. },
  100. projectPlan() {
  101. switch(parseInt(this.projectIndex)) {
  102. case 1:
  103. return '立项审批'
  104. case 2:
  105. return '设计委托'
  106. case 3:
  107. return '初设评审'
  108. case 4:
  109. return '占地进度'
  110. case 5:
  111. return '现场施工'
  112. case 6:
  113. return '竣工验收'
  114. case 7:
  115. return '物资管理'
  116. case 8:
  117. return '工程结算'
  118. case 9:
  119. return '资料归档'
  120. }
  121. }
  122. },
  123. methods: {
  124. // 跳到节点批示页
  125. jump_project_info_point_order() {
  126. uni.navigateTo({
  127. url: '/pages/index/projectInfoPointOrder'
  128. })
  129. }
  130. }
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .tag {
  135. width: 110rpx;
  136. height: 36rpx;
  137. border-radius: 8rpx;
  138. text-align: center;
  139. line-height: 36rpx;
  140. font-size: 21rpx;
  141. font-family: SimSun;
  142. color: #FFFFFF;
  143. margin-top:5rpx;
  144. }
  145. .icon-bgcolor {
  146. background-color: #F7FBFF;
  147. }
  148. .card-style{
  149. width: 560rpx;
  150. // height: 130rpx;
  151. background: #FFFFFF;
  152. box-shadow: 0rpx 2rpx 13rpx rgba(0, 0, 0, 0.16);
  153. border-radius: 17rpx;
  154. margin-left: -15rpx;
  155. padding: 12rpx 20rpx 10rpx;
  156. .word-one {
  157. width: 117rpx;
  158. height: 29rpx;
  159. font-size: 29rpx;
  160. font-family: SimSun;
  161. font-weight: 400;
  162. line-height: 40rpx;
  163. color: #000000;
  164. }
  165. .word-two {
  166. width: 213rpx;
  167. height: 25rpx;
  168. font-size: 25rpx;
  169. font-family: SimSun;
  170. font-weight: 400;
  171. line-height: 33rpx;
  172. color: #000000;
  173. }
  174. .word-three {
  175. // width: 75rpx;
  176. // height: 25rpx;
  177. font-size: 25rpx;
  178. font-family: SimSun;
  179. font-weight: 400;
  180. line-height: 33rpx;
  181. color: #000000;
  182. margin-top: 20rpx;
  183. }
  184. .word-four {
  185. width: 163rpx;
  186. height: 25rpx;
  187. font-size: 25rpx;
  188. font-family: SimSun;
  189. font-weight: 400;
  190. line-height: 33rpx;
  191. color: #000000;
  192. }
  193. .word-five {
  194. width: 125rpx;
  195. height: 25rpx;
  196. font-size: 25rpx;
  197. font-family: SimSun;
  198. font-weight: 400;
  199. line-height: 33rpx;
  200. color: #000000;
  201. }
  202. .word-six {
  203. width: 106rpx;
  204. height: 33rpx;
  205. background: #4CB2FF;
  206. border-radius: 8rpx;
  207. font-size: 21rpx;
  208. font-family: SimSun;
  209. font-weight: 400;
  210. line-height: 33rpx;
  211. color: #FFFFFF;
  212. text-align: center;
  213. margin-left: 17rpx;
  214. }
  215. .word-seven {
  216. // width: 75rpx;
  217. height: 25rpx;
  218. font-size: 25rpx;
  219. font-family: SimSun;
  220. font-weight: 400;
  221. line-height: 33rpx;
  222. color: #000000;
  223. }
  224. }
  225. </style>