check_accept.vue 5.7 KB

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