task.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <view class="task-page">
  3. <div class="title">{{item.taskTitle}}</div>
  4. <div class="info">
  5. <div class="item">
  6. <view class="name">执行人</view>
  7. <view class="cont">{{item.handleAccountName}}</view>
  8. </div>
  9. <div class="item">
  10. <view class="name">执行部门</view>
  11. <view class="cont">{{item.handleGroupName}}</view>
  12. </div>
  13. <div class="item">
  14. <view class="name">发布时间</view>
  15. <view class="cont">{{item.expectedStartDate}}</view>
  16. </div>
  17. </div>
  18. <div class="status">
  19. <div class="head">处置过程</div>
  20. <template v-if="item.status===0">
  21. <image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
  22. <p>暂无处置信息</p>
  23. <image class="add" @click="add" src="/static/icon/add.png" mode="widthFix"></image>
  24. </template>
  25. <template v-else>
  26. <view class="flow-head">
  27. <div class="flow-status" :class="flow.status===1?'success':'error'">{{flow.status===0?'异常':(flow.status===1?'正常':'')}}</div>
  28. <view class="flow-time">{{parseTime(flow.time)}}</view>
  29. </view>
  30. <div class="desc">{{flow.desc}}</div>
  31. <div class="attach">
  32. <view class="attach-item" v-for="(attach,index) in flow.attachList" :key="'attach-'+index">
  33. <image class="image" :src="attach.url" mode="widthFix"></image>
  34. </view>
  35. </div>
  36. </template>
  37. </div>
  38. </view>
  39. </template>
  40. <script>
  41. import {parseTime} from '@/libs/index.js'
  42. export default {
  43. data() {
  44. return {
  45. item:{
  46. title:"水位预{2号-770-32002}:采空区封堵完好,无渗水情况。"
  47. },
  48. flow:{
  49. status:"",
  50. time:"",
  51. desc:"",
  52. attachList:[]
  53. }
  54. }
  55. },
  56. onLoad() {
  57. this.init()
  58. },
  59. methods: {
  60. parseTime,
  61. init(){
  62. this.flow={
  63. status:0,
  64. time:new Date(),
  65. desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
  66. attachList:[
  67. {url:"/static/preview/1.png"},
  68. {url:"/static/preview/2.png"},
  69. {url:"/static/preview/3.png"},
  70. {url:"/static/preview/2.png"}
  71. ]
  72. }
  73. this.getTask()
  74. },
  75. getTask(){
  76. this.item=uni.getStorageSync('task-item')
  77. },
  78. add(){
  79. uni.navigateTo({
  80. url:'/pages/task/taskList/taskList'
  81. })
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .task-page{
  88. background-color: #F3F5FB;
  89. .title{
  90. font-family: 'Source Han Sans CN';
  91. font-style: normal;
  92. font-weight: 700;
  93. font-size: 36rpx;
  94. line-height: 54rpx;
  95. color: #212121;
  96. padding:0 32rpx;
  97. }
  98. .info{
  99. padding: 0 32rpx;
  100. margin: 40rpx 0;
  101. background: #FFFFFF;
  102. border-radius: 32rpx 32rpx 0px 0px;
  103. .item{
  104. border-bottom: 1rpx solid #EFF1F3;
  105. padding: 40rpx 32rpx;
  106. .name{
  107. font-size: 28rpx;
  108. color: #999999;
  109. line-height: 1;
  110. }
  111. .cont{
  112. font-size: 30rpx;
  113. color: #212121;
  114. line-height: 1.5;
  115. padding-top: 12rpx;
  116. }
  117. &:last-child{
  118. border-bottom:none;
  119. }
  120. }
  121. }
  122. .status{
  123. background: #FFFFFF;
  124. border-radius: 32rpx 32rpx 0px 0px;
  125. padding: 48rpx 32rpx;
  126. .head{
  127. color: #212121;
  128. font-size: 34rpx;
  129. line-height:1;
  130. font-weight: 700;
  131. }
  132. .icon-empty{
  133. display: block;
  134. width: 160rpx;
  135. margin: 64rpx auto 0;
  136. }
  137. p{
  138. font-size: 24rpx;
  139. line-height: 28rpx;
  140. color: #D5D5D5;
  141. text-align: center;
  142. }
  143. .flow-head{
  144. display: flex;
  145. justify-content: space-between;
  146. align-items: center;
  147. font-family: 'Abhaya Libre';
  148. font-style: normal;
  149. font-weight: 400;
  150. font-size: 24rpx;
  151. line-height: 48rpx;
  152. padding: 30rpx 0 24rpx 0;
  153. .flow-status{
  154. color: #27DFA8;
  155. &.error{
  156. color: #F54545;
  157. }
  158. }
  159. .flow-time{
  160. color: #999999;
  161. }
  162. }
  163. .desc{
  164. font-family: 'SF Pro Text';
  165. font-style: normal;
  166. font-weight: 500;
  167. font-size: 30rpx;
  168. line-height: 42rpx;
  169. color: #434343;
  170. padding-bottom: 24rpx;
  171. }
  172. .attach{
  173. display: flex;
  174. flex-wrap: wrap;
  175. .attach-item{
  176. width: 224rpx;
  177. overflow: hidden;
  178. margin-right: 7rpx;
  179. margin-bottom: 20rpx;
  180. &:nth-child(3n){
  181. margin-right: 0;
  182. }
  183. .image{
  184. display: block;
  185. width: 224rpx;
  186. border-radius: 8px;
  187. }
  188. }
  189. }
  190. }
  191. .add{
  192. display: block;
  193. width: 96rpx;
  194. position: fixed;
  195. bottom: 186rpx;
  196. right: 32rpx;
  197. }
  198. }
  199. </style>