task.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="task-page">
  3. <div class="title">{{item.title}}</div>
  4. <div class="info">
  5. <div class="item">
  6. <view class="name">执行人</view>
  7. <view class="cont">执行人</view>
  8. </div>
  9. <div class="item">
  10. <view class="name">执行部门</view>
  11. <view class="cont">执行部门</view>
  12. </div>
  13. <div class="item">
  14. <view class="name">发布时间</view>
  15. <view class="cont">{{parseTime(new Date())}}</view>
  16. </div>
  17. </div>
  18. <div class="status">
  19. <div class="head">处置过程</div>
  20. <template v-if="flow.status===-1">
  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. },
  74. getTask(){
  75. this.item=uni.getStorageSync('task-item')
  76. },
  77. add(){
  78. uni.navigateTo({
  79. url:'/pages/task/form/form'
  80. })
  81. }
  82. },
  83. destroyed() {
  84. uni.removeStorageSync('task-item')
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .task-page{
  90. background-color: #F3F5FB;
  91. .title{
  92. font-family: 'Source Han Sans CN';
  93. font-style: normal;
  94. font-weight: 700;
  95. font-size: 36rpx;
  96. line-height: 54rpx;
  97. color: #212121;
  98. padding:0 32rpx;
  99. }
  100. .info{
  101. padding: 0 32rpx;
  102. margin: 40rpx 0;
  103. background: #FFFFFF;
  104. border-radius: 32rpx 32rpx 0px 0px;
  105. .item{
  106. border-bottom: 1rpx solid #EFF1F3;
  107. padding: 40rpx 32rpx;
  108. .name{
  109. font-size: 28rpx;
  110. color: #999999;
  111. line-height: 1;
  112. }
  113. .cont{
  114. font-size: 30rpx;
  115. color: #212121;
  116. line-height: 1.5;
  117. padding-top: 12rpx;
  118. }
  119. &:last-child{
  120. border-bottom:none;
  121. }
  122. }
  123. }
  124. .status{
  125. background: #FFFFFF;
  126. border-radius: 32rpx 32rpx 0px 0px;
  127. padding: 48rpx 32rpx;
  128. .head{
  129. color: #212121;
  130. font-size: 34rpx;
  131. line-height:1;
  132. font-weight: 700;
  133. }
  134. .icon-empty{
  135. display: block;
  136. width: 160rpx;
  137. margin: 64rpx auto 0;
  138. }
  139. p{
  140. font-size: 24rpx;
  141. line-height: 28rpx;
  142. color: #D5D5D5;
  143. text-align: center;
  144. }
  145. .flow-head{
  146. display: flex;
  147. justify-content: space-between;
  148. align-items: center;
  149. font-family: 'Abhaya Libre';
  150. font-style: normal;
  151. font-weight: 400;
  152. font-size: 24rpx;
  153. line-height: 48rpx;
  154. padding: 30rpx 0 24rpx 0;
  155. .flow-status{
  156. color: #27DFA8;
  157. &.error{
  158. color: #F54545;
  159. }
  160. }
  161. .flow-time{
  162. color: #999999;
  163. }
  164. }
  165. .desc{
  166. font-family: 'SF Pro Text';
  167. font-style: normal;
  168. font-weight: 500;
  169. font-size: 30rpx;
  170. line-height: 42rpx;
  171. color: #434343;
  172. padding-bottom: 24rpx;
  173. }
  174. .attach{
  175. display: flex;
  176. flex-wrap: wrap;
  177. .attach-item{
  178. width: 224rpx;
  179. overflow: hidden;
  180. margin-right: 7rpx;
  181. margin-bottom: 20rpx;
  182. &:nth-child(3n){
  183. margin-right: 0;
  184. }
  185. .image{
  186. display: block;
  187. width: 224rpx;
  188. border-radius: 8px;
  189. }
  190. }
  191. }
  192. }
  193. .add{
  194. display: block;
  195. width: 96rpx;
  196. position: fixed;
  197. bottom: 186rpx;
  198. right: 32rpx;
  199. }
  200. }
  201. </style>