detail.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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="onSubmit" 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 accountInfo=uni.getStorageSync('accountInfo')
  85. this.baseInfo=info
  86. this.getWorkflowRecord()
  87. this.user=accountInfo
  88. this.visable=(accountInfo.userId===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. .head{
  134. padding: 20rpx 32rpx 40rpx 32rpx;
  135. .title{
  136. font-family: Abhaya Libre;
  137. font-size: 36rpx;
  138. font-weight: 700;
  139. line-height: 54rpx;
  140. text-align: justified;
  141. color: #212121;
  142. overflow: hidden;
  143. text-overflow: ellipsis;
  144. display: -webkit-box;
  145. -webkit-line-clamp: 2;
  146. -webkit-box-orient: vertical;
  147. }
  148. .desc{
  149. padding-top: 8rpx;
  150. .level,.code{
  151. font-family: PingFang SC;
  152. font-size: 14px;
  153. font-weight: 400;
  154. line-height: 22px;
  155. text-align: justified;
  156. color: #666;
  157. }
  158. .code{
  159. padding-left: 40rpx;
  160. }
  161. }
  162. }
  163. .flowlist{
  164. .flow-item-wrap{
  165. .submit-item{
  166. padding: 20rpx 32rpx;
  167. border-radius: 32rpx 32rpx 0px 0px;
  168. background-color: #fff;
  169. .item-row{
  170. padding: 20rpx 0;
  171. border-bottom: 1rpx solid #EFF1F3;
  172. &:last-child{
  173. border: 0;
  174. }
  175. .item-row-lable{
  176. font-family: Abhaya Libre;
  177. font-size: 28rpx;
  178. font-weight: 400;
  179. line-height: 1;
  180. color: #999;
  181. }
  182. .item-row-cont{
  183. font-family: Abhaya Libre;
  184. font-size: 30rpx;
  185. font-weight: 400;
  186. line-height: 1;
  187. color: #212121;
  188. padding-top: 24rpx;
  189. }
  190. }
  191. }
  192. .flow-item{
  193. margin-top: 20rpx;
  194. padding: 0 32rpx 20rpx 32rpx;
  195. background-color: #fff;
  196. .flow-head{
  197. font-family: Abhaya Libre;
  198. font-size: 34rpx;
  199. font-weight: 700;
  200. line-height: 1;
  201. color: #212121;
  202. padding: 32rpx 0;
  203. }
  204. .flow-title{
  205. font-family: SF Pro Text;
  206. font-size: 30rpx;
  207. font-weight: 700;
  208. line-height: 1;
  209. padding: 24rpx 0;
  210. color: #666666;
  211. }
  212. .flow-desc{
  213. padding: 24rpx 0;
  214. display: flex;
  215. justify-content: space-between;
  216. align-items: center;
  217. .user,.time{
  218. font-family: SF Pro Text;
  219. font-size: 24rpx;
  220. font-weight: 400;
  221. line-height: 24rpx;
  222. color: #999999;
  223. }
  224. }
  225. .remark{
  226. .remark-cont{
  227. padding-bottom: 30rpx;
  228. border-bottom: 1rpx solid #F0F4F6;
  229. font-family: SF Pro Text;
  230. font-size: 30rpx;
  231. font-weight: 500;
  232. line-height: 42rpx;
  233. color: #434343;
  234. }
  235. }
  236. .attachList{
  237. .attachList-cont{
  238. display: flex;
  239. flex-wrap: wrap;
  240. .attachbox{
  241. display: block;
  242. width: 224rpx;
  243. height: 224rpx;
  244. border-radius: 8px;
  245. overflow: hidden;
  246. &:nth-child(2n){
  247. margin: 0 8rpx;
  248. }
  249. &:nth-child(n+4){
  250. margin-top: 24rpx;
  251. }
  252. .attach{
  253. display: block;
  254. width: 224rpx;
  255. height: 224rpx;
  256. border-radius: 8px;
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. }
  264. .submit_bt{
  265. width: 750rpx;
  266. height:88rpx;
  267. line-height:88rpx;
  268. color: #4D73FF;
  269. text-align: center;
  270. font-size: 32rpx;
  271. padding-bottom: 68rpx;
  272. background-color: #fff;
  273. position: fixed;
  274. left: 0;
  275. bottom: 0;
  276. z-index: 99;
  277. box-shadow: 0px 0px 12px 0px #0000000A;
  278. border-radius: 8px 8px 0px 0px
  279. }
  280. }
  281. </style>