check.vue 6.5 KB

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