check.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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>
  21. <view class="flow-head">
  22. <span class="flow-user">质量安全管理科-{{flow.user||'***'}}</span>
  23. <view class="flow-time">{{parseTime(flow.time)}}</view>
  24. </view>
  25. <div class="desc">{{flow.desc}}</div>
  26. <div class="attach">
  27. <view class="attach-item" v-for="(attach,index) in flow.attachList" :key="'attach-'+index">
  28. <image class="image" :src="attach.url" mode="widthFix"></image>
  29. </view>
  30. </div>
  31. </template>
  32. </div>
  33. <div class="check status" :class="check.status===0?'reject':(check.status===1?'pass':'')" v-if="check.status!==''">
  34. <div class="head">验收过程</div>
  35. <template>
  36. <view class="flow-head">
  37. <span class="flow-user">质量安全管理科-{{check.user||'***'}}</span>
  38. <view class="flow-time">{{parseTime(check.time)}}</view>
  39. </view>
  40. <div class="desc">{{check.desc}}</div>
  41. <div class="attach">
  42. <view class="attach-item" v-for="(attach,index) in check.attachList" :key="'attach-'+index">
  43. <image class="image" :src="attach.url" mode="widthFix"></image>
  44. </view>
  45. </div>
  46. </template>
  47. </div>
  48. <view class="footer" @click="onSubmit" v-if="check.status===''">验收</view>
  49. <view class="footer" @click="onRectify" v-if="check.status===0">二次整改</view>
  50. </view>
  51. </template>
  52. <script>
  53. import {parseTime} from '@/libs/index.js'
  54. export default {
  55. data() {
  56. return {
  57. item:{
  58. title:"水位预{2号-770-32002}:采空区封堵完好,无渗水情况。"
  59. },
  60. flow:{
  61. status:"",
  62. time:"",
  63. desc:"",
  64. attachList:[]
  65. },
  66. check:{
  67. status:"",
  68. time:"",
  69. desc:"",
  70. attachList:[]
  71. }
  72. }
  73. },
  74. onLoad() {
  75. this.init()
  76. },
  77. methods: {
  78. parseTime,
  79. init(){
  80. let title="待验收"
  81. this.flow={
  82. status:-1,
  83. user:"王麻子",
  84. time:new Date(),
  85. desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
  86. attachList:[
  87. {url:"/static/preview/1.png"},
  88. {url:"/static/preview/2.png"},
  89. {url:"/static/preview/3.png"}
  90. ]
  91. }
  92. /*已经验收 未通过*/
  93. this.check={
  94. status:0,
  95. user:"王麻子",
  96. time:new Date(),
  97. desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
  98. attachList:[
  99. {url:"/static/preview/1.png"},
  100. {url:"/static/preview/2.png"},
  101. {url:"/static/preview/3.png"}
  102. ]
  103. }
  104. // 验收完成
  105. if(this.check.status===1){
  106. uni.setNavigationBarTitle({
  107. title: '已完成'
  108. });
  109. }
  110. if(this.check.status===0){
  111. uni.setNavigationBarTitle({
  112. title: '待验收'
  113. });
  114. }
  115. },
  116. getTask(){
  117. this.item=uni.getStorageSync('task-item')
  118. },
  119. onSubmit(){
  120. uni.navigateTo({
  121. url:'/pages/risk/check/form/form'
  122. })
  123. },
  124. onRectify(){
  125. uni.navigateTo({
  126. url:'/pages/risk/rectify/form/form'
  127. })
  128. }
  129. },
  130. destroyed() {
  131. uni.removeStorageSync('task-item')
  132. }
  133. }
  134. </script>
  135. <style lang="scss" scoped>
  136. .task-page{
  137. background-color: #F3F5FB;
  138. padding-bottom: 120rpx;
  139. .title{
  140. font-family: 'Source Han Sans CN';
  141. font-style: normal;
  142. font-weight: 700;
  143. font-size: 36rpx;
  144. line-height: 54rpx;
  145. color: #212121;
  146. padding:0 32rpx;
  147. }
  148. .info{
  149. padding: 0 32rpx;
  150. margin: 40rpx 0;
  151. background: #FFFFFF;
  152. border-radius: 32rpx 32rpx 0px 0px;
  153. .item{
  154. border-bottom: 1rpx solid #EFF1F3;
  155. padding: 40rpx 32rpx;
  156. .name{
  157. font-size: 28rpx;
  158. color: #999999;
  159. line-height: 1;
  160. }
  161. .cont{
  162. font-size: 30rpx;
  163. color: #212121;
  164. line-height: 1.5;
  165. padding-top: 12rpx;
  166. }
  167. &:last-child{
  168. border-bottom:none;
  169. }
  170. }
  171. }
  172. .status{
  173. background-color: #FFFFFF;
  174. border-radius: 32rpx 32rpx 0px 0px;
  175. padding: 48rpx 32rpx;
  176. &.check{
  177. margin-top: 24rpx;
  178. background-repeat: no-repeat;
  179. background-position: right top;
  180. &.pass{
  181. background-image: url('/static/icon/pass.png');
  182. }
  183. &.reject{
  184. background-image: url('/static/icon/reject.png');
  185. }
  186. }
  187. .head{
  188. color: #212121;
  189. font-size: 34rpx;
  190. line-height:1;
  191. font-weight: 700;
  192. }
  193. .icon-empty{
  194. display: block;
  195. width: 160rpx;
  196. margin: 64rpx auto 0;
  197. }
  198. p{
  199. font-size: 24rpx;
  200. line-height: 28rpx;
  201. color: #D5D5D5;
  202. text-align: center;
  203. }
  204. .flow-head{
  205. display: flex;
  206. justify-content: space-between;
  207. align-items: center;
  208. font-family: 'Abhaya Libre';
  209. font-style: normal;
  210. font-weight: 400;
  211. font-size: 24rpx;
  212. line-height: 48rpx;
  213. padding: 30rpx 0 24rpx 0;
  214. color: #999;
  215. }
  216. .desc{
  217. font-family: 'SF Pro Text';
  218. font-style: normal;
  219. font-weight: 500;
  220. font-size: 30rpx;
  221. line-height: 42rpx;
  222. color: #434343;
  223. padding-bottom: 24rpx;
  224. }
  225. .attach{
  226. display: flex;
  227. flex-wrap: wrap;
  228. .attach-item{
  229. width: 224rpx;
  230. overflow: hidden;
  231. margin-right: 7rpx;
  232. margin-bottom: 20rpx;
  233. &:nth-child(3n){
  234. margin-right: 0;
  235. }
  236. .image{
  237. display: block;
  238. width: 224rpx;
  239. border-radius: 8px;
  240. }
  241. }
  242. }
  243. }
  244. .footer{
  245. width: 100%;
  246. height: 136upx;
  247. background: #FFFFFF;
  248. border-radius: 16upx 16upx 0px 0px;
  249. position: fixed;
  250. left: 0;
  251. bottom: 0;
  252. text-align: center;
  253. color: #168DEC;
  254. font-size: 32upx;
  255. padding-top: 20upx;
  256. letter-spacing: 2px;
  257. }
  258. }
  259. </style>