detail.vue 8.3 KB

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