check.vue 6.6 KB

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