backlogDetail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="back-content">
  3. <!-- 轮播图 -->
  4. <swiper v-if="infoData.backlogPhotoList && infoData.backlogPhotoList.length" class="top-ad-swiper" :indicator-dots="false" :autoplay="true" :interval="5000" :duration="600" :circular="true">
  5. <swiper-item v-for="(item,index) in infoData.backlogPhotoList" :key="index">
  6. <div class="swiper-item uni-bg-red">
  7. <u-image mode="scaleToFill" width="750upx" height="400upx" :src="item.photo"></u-image>
  8. </div>
  9. </swiper-item>
  10. </swiper>
  11. <view v-else class="noPic">
  12. 暂无图片
  13. </view>
  14. <view class="back-text">
  15. <!-- 门店 -->
  16. <view class="text-item">
  17. {{infoData.storeName}}
  18. </view>
  19. <!-- 处理人 -->
  20. <view class="text-item">
  21. <view>
  22. <text>处理人</text>
  23. <text class="margin-left ellipsis-one">{{infoData.receiveUserName}}</text>
  24. </view>
  25. <view class="time ">
  26. {{infoData.effectiveEndTime}} 到期
  27. </view>
  28. </view>
  29. <!-- 创建人 -->
  30. <view class="text-item">
  31. <view>
  32. <text>创建人</text>
  33. <text class="margin-left ellipsis-one">{{infoData.putUserName}}</text>
  34. </view>
  35. <view class="time">
  36. {{infoData.createTime}} 创建
  37. </view>
  38. </view>
  39. <!-- 指标 -->
  40. <view class="text-item">
  41. <view>
  42. 考评指标
  43. </view>
  44. <view class="margin-left">
  45. {{infoData.clsName}}
  46. </view>
  47. </view>
  48. <!-- 描述 -->
  49. <view class="text-item">
  50. <view>
  51. 描述
  52. </view>
  53. <view class="margin-left">
  54. {{infoData.problemDesc}}
  55. </view>
  56. </view>
  57. </view>
  58. <view class="step-content">
  59. <u-steps :list="numList" direction ="column" :current="0"></u-steps>
  60. </view>
  61. <view class="footer">
  62. <!-- receiveFlag 接收人/责任人标记 只有处理人可以整改-->
  63. <u-button v-if="infoData.receiveFlag && infoData.receiveFlag == 1 && infoData.status=='PENDING'" type="primary">整改完成</u-button>
  64. <!-- putFlag 创建人标记 只有创建人可以审核-->
  65. <view v-if="infoData.putFlag && infoData.putFlag == 1 && infoData.status=='CHECK_PENDING'" class="check-pending">
  66. <u-button class="act-btn" type="error">整改不通过</u-button>
  67. <u-button class="act-btn" type="success">整改通过</u-button>
  68. </view>
  69. <!-- copyFlag 抄送标识 只有抄送人可以评论-->
  70. <view v-if="infoData.copyFlag && infoData.copyFlag==1" class="comment-input">
  71. <input type="text" v-model="comment" @confirm="sendComment" placeholder="请输入评论..."/>
  72. <view>整改状态:<text :class="clsStatus()">{{infoData.status}}</text></view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import { getBackLogDetail, getBackLogRecord } from '@/api/backLog.js'
  79. export default {
  80. components: {
  81. },
  82. data() {
  83. return {
  84. infoData:{}, // 详情数据
  85. numList: [],
  86. comment: '' // 评论
  87. }
  88. },
  89. onLoad(option) {
  90. console.log(option.id)
  91. this.getData(option.id)
  92. this.getRecordData(option.id)
  93. },
  94. methods: {
  95. // 获取详情数据
  96. getData (id) {
  97. getBackLogDetail({id:id}).then(res=>{
  98. if(res.status==200){
  99. this.infoData = res.data
  100. } else {
  101. this.toashMsg(res.message)
  102. this.infoData = {}
  103. }
  104. })
  105. },
  106. // 获取进度数据
  107. getRecordData (id) {
  108. getBackLogRecord({id:id}).then(res=>{
  109. if(res.status==200){
  110. let arr = []
  111. res.data.map(item=>{
  112. const p = {}
  113. p.name = item.handleTime + "'\xa0\xa0\xa0\xa0\xa0\xa0\'" + item.handleType + "'\xa0\xa0\xa0\xa0\xa0\xa0\'" + (item.handleDesc ? item.handleDesc : '')
  114. arr.push(p)
  115. })
  116. this.numList = arr
  117. } else {
  118. this.toashMsg(res.message)
  119. this.numList = []
  120. }
  121. })
  122. },
  123. sendComment (v) {
  124. },
  125. // 状态颜色处理
  126. clsStatus(status){
  127. if(status == '待审核'){
  128. return 'dsh'
  129. }
  130. if(status == '待整改'){
  131. return 'dzg'
  132. }
  133. if(status == '整改完成'){
  134. return 'ywc'
  135. }
  136. if(status == '已过期'){
  137. return 'ygq'
  138. }
  139. }
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .back-content {
  145. background-color: #eee;
  146. height: 100%;
  147. display: flex;
  148. flex-direction: column;
  149. // 轮播图
  150. .top-ad-swiper{
  151. height: 340upx;
  152. }
  153. .noPic{
  154. width: 750upx;
  155. height: 400upx;
  156. font-size: 38upx;
  157. text-align: center;
  158. line-height: 400upx;
  159. color: #666;
  160. }
  161. // 详情内容
  162. .back-text{
  163. background: #ffffff;
  164. padding: 10upx 20upx;
  165. margin-bottom: 20upx;
  166. border-radius: 6upx;
  167. box-shadow: 1px 1px 3px #EEEEEE;
  168. .text-item{
  169. display: flex;
  170. align-items: center;
  171. padding: 10upx 10upx;
  172. font-size: 28upx;
  173. justify-content: space-between;
  174. .margin-left{
  175. margin-left: 30upx;
  176. }
  177. .time{
  178. color: #888;
  179. font-size: 26upx;
  180. margin-left: 10upx;
  181. }
  182. > view{
  183. &:first-child{
  184. flex: 1;
  185. }
  186. }
  187. }
  188. }
  189. // 步骤条
  190. .step-content {
  191. padding: 0 20upx;
  192. background-color: #fff;
  193. flex: 1;
  194. overflow-y: scroll;
  195. }
  196. // 底部按钮
  197. .footer {
  198. background-color: #fff;
  199. // margin-top: 20upx;
  200. .check-pending{
  201. display: flex;
  202. .act-btn {
  203. width: 50%;
  204. }
  205. }
  206. .comment-input{
  207. width: 100%;
  208. padding: 20upx;
  209. input{
  210. background-color: #f4f4f4;
  211. padding: 20upx;
  212. border-radius: 10upx;
  213. }
  214. view{
  215. margin-top: 20upx;
  216. }
  217. }
  218. .dsh{
  219. color: red;
  220. }
  221. .dzg{
  222. color: #007AFF;
  223. }
  224. .ygq {
  225. color: #999;
  226. }
  227. .ywc {
  228. color: #10c71e;
  229. }
  230. }
  231. }
  232. </style>