detail.vue 8.2 KB

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