detail.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <view class="wrap">
  3. <!-- <uni-list>
  4. <uni-list-item title="隐患编码" :rightText="baseInfo.dangerCode" ></uni-list-item>
  5. <uni-list-item title="隐患状态" :rightText="dangerStatus(baseInfo.status)" ></uni-list-item>
  6. <uni-list-item title="隐患类别" :rightText="baseInfo.dangerCatTitle" ></uni-list-item>
  7. <uni-list-item title="隐患等级" :rightText="baseInfo.dangerLevel===1?'一般':'重大'" ></uni-list-item>
  8. <uni-list-item title="所在位置" :rightText="baseInfo.dangerLocation" v-if="baseInfo.dangerLocation"></uni-list-item>
  9. <uni-list-item title="描述" :rightText="baseInfo.dangerDesc" ></uni-list-item>
  10. <uni-list-item title="所在部门" :rightText="baseInfo.curGroupName" v-if="baseInfo.curGroupName"></uni-list-item>
  11. <uni-list-item title="整改人员" :rightText="baseInfo.curAccountName" v-if="baseInfo.curAccountName"></uni-list-item>
  12. <uni-list-item title="所在部门" :rightText="baseInfo.submitGroupName" v-if="baseInfo.submitGroupName"></uni-list-item>
  13. <uni-list-item title="整改人员" :rightText="baseInfo.submitAccountName" v-if="baseInfo.submitAccountName"></uni-list-item>
  14. <uni-list-item title="所在部门" :rightText="baseInfo.rectifyGroupName" v-if="baseInfo.rectifyGroupName"></uni-list-item>
  15. <uni-list-item title="整改人员" :rightText="baseInfo.rectifyAccountName" v-if="baseInfo.rectifyAccountName"></uni-list-item>
  16. <uni-list-item title="整改措施" :rightText="baseInfo.rectifyMeasure" v-if="baseInfo.rectifyMeasure"></uni-list-item>
  17. <uni-list-item title="整改说明" :rightText="baseInfo.rectifyRemark" v-if="baseInfo.rectifyRemark"></uni-list-item>
  18. </uni-list> -->
  19. <view class="head">
  20. <view class="title">{{baseInfo.dangerTitle}}</view>
  21. <view class="desc">
  22. <text class="level">{{baseInfo.dangerLevel===1?'一般':'重大'}}</text>
  23. <text class="code">{{baseInfo.dangerCode}}</text>
  24. </view>
  25. </view>
  26. <view class="flowlist">
  27. <view class="flow-item-wrap" v-for="(flow,index) in flows" :key="index">
  28. <view class="submit-item" v-if="index===0">
  29. <view class="item-row">
  30. <view class="item-row-lable">提交人</view>
  31. <view class="item-row-cont">{{flow.accountName}}</view>
  32. </view>
  33. <view class="item-row">
  34. <view class="item-row-lable">所属部门</view>
  35. <view class="item-row-cont">{{flow.groupName}}</view>
  36. </view>
  37. <view class="item-row">
  38. <view class="item-row-lable">整改期限</view>
  39. <view class="item-row-cont">{{baseInfo.dangerDeadLine}}</view>
  40. </view>
  41. </view>
  42. <view class="flow-item" v-else>
  43. <view class="flow-head">{{flow.activityInsTitle}}</view>
  44. <view class="flow-desc">
  45. <view class="user">
  46. <text>{{flow.positionName}}</text>
  47. <text>{{flow.accountName}}</text>
  48. </view>
  49. <view class="time">
  50. <text>{{flow.actionTime}}</text>
  51. </view>
  52. </view>
  53. <view class="remark">
  54. <view class="flow-title">处理说明</view>
  55. <view class="remark-cont">{{flow.actionRemark}}</view>
  56. </view>
  57. <view class="attachList" v-if="flow.attachList&&flow.attachList.length>0">
  58. <view class="flow-title">附件</view>
  59. <view class="attachList-cont">
  60. <view class="attachbox" v-for="(attach,attachIdex) in flow.attachList" :key="attachIdex" @click="showImg(attachIdex,flow.attachList)">
  61. <image class="attach" :src="attach.fileUrl"></image>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="submit_bt" @click="handle" v-if="visable">处理</view>
  69. </view>
  70. </template>
  71. <script>
  72. import {getWorkflowRecordById} from '@/api/system/wfApi.js'
  73. export default{
  74. data(){
  75. return{
  76. baseInfo:{},
  77. user:{},
  78. flows:[],
  79. visable:false
  80. }
  81. },
  82. onLoad() {
  83. let info=uni.getStorageSync('detail-info')
  84. let wxId=uni.getStorageSync('wxId')
  85. this.baseInfo=info
  86. this.getWorkflowRecord()
  87. this.user=accountInfo
  88. this.visable=(wxId===info.curAccountId)&&(info.status===1||info.status===2||info.status===3);
  89. },
  90. methods:{
  91. getWorkflowRecord(){
  92. getWorkflowRecordById(this.baseInfo.dangerId).then((res)=>{
  93. this.flows=res.data
  94. })
  95. },
  96. showImg(current,attachList){
  97. let urls=attachList.map(item=>{
  98. return item.fileUrl
  99. })
  100. uni.previewImage({
  101. urls,
  102. current
  103. })
  104. },
  105. dangerStatus(i) {
  106. if (i >= 0) {
  107. const strs = ['待提交','待评审','待整改','待验收','已完成']
  108. return strs[i]
  109. } else {
  110. return '已撤销'
  111. }
  112. },
  113. handle(){
  114. uni.navigateTo({
  115. url:'/pages/app_views/danger/handle/handle'
  116. })
  117. },
  118. isEmpty(val){
  119. if(val!=="undefined"&&val!==undefined&&val!==""&&val!==null){
  120. return false
  121. }
  122. return true
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .wrap{
  129. padding:20rpx;
  130. background-color: #F5F6F8;
  131. min-height: 100vh;
  132. box-sizing: border-box;
  133. padding-bottom: 180rpx;
  134. .head{
  135. padding: 20rpx 32rpx 40rpx 32rpx;
  136. .title{
  137. font-family: Abhaya Libre;
  138. font-size: 36rpx;
  139. font-weight: 700;
  140. line-height: 54rpx;
  141. text-align: justified;
  142. color: #212121;
  143. overflow: hidden;
  144. text-overflow: ellipsis;
  145. display: -webkit-box;
  146. -webkit-line-clamp: 2;
  147. -webkit-box-orient: vertical;
  148. }
  149. .desc{
  150. padding-top: 8rpx;
  151. .level,.code{
  152. font-family: PingFang SC;
  153. font-size: 14px;
  154. font-weight: 400;
  155. line-height: 22px;
  156. text-align: justified;
  157. color: #666;
  158. }
  159. .code{
  160. padding-left: 40rpx;
  161. }
  162. }
  163. }
  164. .flowlist{
  165. .flow-item-wrap{
  166. .submit-item{
  167. padding: 20rpx 32rpx;
  168. border-radius: 32rpx 32rpx 0px 0px;
  169. background-color: #fff;
  170. .item-row{
  171. padding: 20rpx 0;
  172. border-bottom: 1rpx solid #EFF1F3;
  173. &:last-child{
  174. border: 0;
  175. }
  176. .item-row-lable{
  177. font-family: Abhaya Libre;
  178. font-size: 28rpx;
  179. font-weight: 400;
  180. line-height: 1;
  181. color: #999;
  182. }
  183. .item-row-cont{
  184. font-family: Abhaya Libre;
  185. font-size: 30rpx;
  186. font-weight: 400;
  187. line-height: 1;
  188. color: #212121;
  189. padding-top: 24rpx;
  190. }
  191. }
  192. }
  193. .flow-item{
  194. margin-top: 20rpx;
  195. padding: 0 32rpx 20rpx 32rpx;
  196. background-color: #fff;
  197. .flow-head{
  198. font-family: Abhaya Libre;
  199. font-size: 34rpx;
  200. font-weight: 700;
  201. line-height: 1;
  202. color: #212121;
  203. padding: 32rpx 0;
  204. }
  205. .flow-title{
  206. font-family: SF Pro Text;
  207. font-size: 30rpx;
  208. font-weight: 700;
  209. line-height: 1;
  210. padding: 24rpx 0;
  211. color: #666666;
  212. }
  213. .flow-desc{
  214. padding: 24rpx 0;
  215. display: flex;
  216. justify-content: space-between;
  217. align-items: center;
  218. .user,.time{
  219. font-family: SF Pro Text;
  220. font-size: 24rpx;
  221. font-weight: 400;
  222. line-height: 24rpx;
  223. color: #999999;
  224. }
  225. }
  226. .remark{
  227. .remark-cont{
  228. padding-bottom: 30rpx;
  229. border-bottom: 1rpx solid #F0F4F6;
  230. font-family: SF Pro Text;
  231. font-size: 30rpx;
  232. font-weight: 500;
  233. line-height: 42rpx;
  234. color: #434343;
  235. }
  236. }
  237. .attachList{
  238. .attachList-cont{
  239. display: flex;
  240. flex-wrap: wrap;
  241. .attachbox{
  242. display: block;
  243. width: 224rpx;
  244. height: 224rpx;
  245. border-radius: 8px;
  246. overflow: hidden;
  247. &:nth-child(2n){
  248. margin: 0 8rpx;
  249. }
  250. &:nth-child(n+4){
  251. margin-top: 24rpx;
  252. }
  253. .attach{
  254. display: block;
  255. width: 224rpx;
  256. height: 224rpx;
  257. border-radius: 8px;
  258. }
  259. }
  260. }
  261. }
  262. }
  263. }
  264. }
  265. .submit_bt{
  266. width: 750rpx;
  267. height:88rpx;
  268. line-height:88rpx;
  269. color: #4D73FF;
  270. text-align: center;
  271. font-size: 32rpx;
  272. padding-bottom: 68rpx;
  273. background-color: #fff;
  274. position: fixed;
  275. left: 0;
  276. bottom: 0;
  277. z-index: 99;
  278. box-shadow: 0px 0px 12px 0px #0000000A;
  279. border-radius: 8px 8px 0px 0px
  280. }
  281. }
  282. </style>