backlogDetail.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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.photoPath+'?x-oss-process=image/resize,h_200,w_375,m_lfit'"></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. <view class="ellipsis-one">
  18. {{infoData.storeName}}
  19. </view>
  20. <view class="time ">
  21. {{infoData.effectiveEndTime}} 到期
  22. </view>
  23. </view>
  24. <!-- 创建人 -->
  25. <view class="text-item">
  26. <view>
  27. <text>创建人</text>
  28. <text class="margin-left ellipsis-one">{{infoData.putUserName}}</text>
  29. </view>
  30. <view class="time">
  31. {{infoData.createTime}} 创建
  32. </view>
  33. </view>
  34. <!-- 指标 -->
  35. <view class="text-item">
  36. <view>
  37. 考评指标
  38. </view>
  39. <view v-if="infoData.clsName" class="margin-left">
  40. {{infoData.clsName}}
  41. </view>
  42. <view v-else class="ygq">
  43. <u-icon name="info-circle"></u-icon>
  44. 未关联问题项
  45. </view>
  46. </view>
  47. <!-- 描述 -->
  48. <view class="text-item">
  49. <view>
  50. 描述
  51. </view>
  52. <view :class="['margin-left',infoData.problemDesc?'':'ygq']">
  53. {{infoData.problemDesc?infoData.problemDesc:'暂无'}}
  54. </view>
  55. </view>
  56. </view>
  57. <view class="step-content">
  58. <u-steps :list="numList" direction ="column" :current="0"></u-steps>
  59. </view>
  60. <view class="footer">
  61. <!-- receiveFlag 接收人/责任人标记 只有处理人可以整改-->
  62. <!-- 目前版本不做 -->
  63. <!-- <u-button @click="handleSubmit('SOLVE')" v-if="infoData.receiveFlag && infoData.receiveFlag == 1 && infoData.statusDictValue=='待整改'" type="primary">整改完成</u-button> -->
  64. <!-- putFlag 创建人标记 只有创建人可以审核-->
  65. <view v-if="infoData.putFlag && infoData.putFlag == 1 && infoData.statusDictValue=='待审核'" class="check-pending">
  66. <u-button @click="handleSubmit('AUDIT_NO')" class="act-btn" type="error">整改不通过</u-button>
  67. <u-button @click="handleSubmit('AUDIT_YES')" class="act-btn" type="success">整改通过</u-button>
  68. </view>
  69. <!-- copyFlag 抄送标识 只有抄送人可以评论-->
  70. <view v-if="infoData.copyFlag && infoData.copyFlag==1" class="comment-input">
  71. <view class="input-cont">
  72. <textarea auto-height :class="[isFocus?'active':'']" v-model="comment" @focus="isFocus = true" placeholder="请输入评论..."/>
  73. <u-button @click="handleSubmit('COMMENTS')" :disabled="!comment" class="input-btn" v-if="isFocus" size="mini" type="warning">发送</u-button>
  74. </view>
  75. <view>整改状态:<text :class="clsStatus(infoData.statusDictValue)">{{infoData.statusDictValue}}</text></view>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import { getBackLogDetail, getBackLogRecord, handleBackLog } from '@/api/backLog.js'
  82. export default {
  83. components: {
  84. },
  85. data() {
  86. return {
  87. backlogId: '', // 待办id
  88. infoData:{}, // 详情数据
  89. numList: [],
  90. comment: '', // 评论
  91. isFocus: false // 评论键盘是否弹起
  92. }
  93. },
  94. onLoad(option) {
  95. this.backlogId = option.id
  96. this.getData(option.id)
  97. this.getRecordData(option.id)
  98. },
  99. methods: {
  100. // 获取详情数据
  101. getData (id) {
  102. getBackLogDetail({id:id}).then(res=>{
  103. console.log(res,'rrrrrrrr')
  104. if(res.status==200){
  105. this.infoData = res.data
  106. } else {
  107. this.toashMsg(res.message)
  108. this.infoData = {}
  109. }
  110. })
  111. },
  112. // 获取进度数据
  113. getRecordData (id) {
  114. getBackLogRecord({id:id}).then(res=>{
  115. if(res.status==200){
  116. let arr = []
  117. res.data.map(item=>{
  118. const p = {}
  119. const k = '\xa0\xa0\xa0\xa0\xa0\xa0'
  120. p.name = item.handleTime + k + item.handleTypeDictValue + k + (item.handleDesc ? item.handleDesc : '')
  121. arr.push(p)
  122. })
  123. this.numList = arr
  124. } else {
  125. this.toashMsg(res.message)
  126. this.numList = []
  127. }
  128. })
  129. },
  130. // 提交处理
  131. //type: SOLVE("SOLVE", "整改问题"),AUDIT_YES("AUDIT_YES", "审核通过"),AUDIT_NO("AUDIT_NO", "审核不通过"),COMMENTS("COMMENTS", "发表评论");
  132. handleSubmit(type) {
  133. console.log(11111111111)
  134. const params = {
  135. backlogId: this.backlogId,
  136. handleDesc: this.comment,
  137. handleType: type
  138. }
  139. handleBackLog(params).then(res=>{
  140. this.toashMsg(res.message)
  141. if(res.status==200){
  142. if (type=='COMMENTS') {
  143. this.comment = ''
  144. this.isFocus = false
  145. this.getRecordData(this.backlogId)
  146. } else {
  147. setTimeout(()=>{
  148. uni.navigateBack()
  149. },300)
  150. }
  151. }
  152. })
  153. },
  154. // 状态颜色处理
  155. clsStatus(status){
  156. if(status == '待审核'){
  157. return 'dsh'
  158. }
  159. if(status == '待整改'){
  160. return 'dzg'
  161. }
  162. if(status == '整改完成'){
  163. return 'ywc'
  164. }
  165. if(status == '已过期'){
  166. return 'ygq'
  167. }
  168. }
  169. }
  170. }
  171. </script>
  172. <style lang="scss" scoped>
  173. .back-content {
  174. background-color: #eee;
  175. height: 100%;
  176. display: flex;
  177. flex-direction: column;
  178. // 轮播图
  179. .top-ad-swiper{
  180. height: 340upx;
  181. }
  182. .noPic{
  183. width: 750upx;
  184. height: 400upx;
  185. font-size: 38upx;
  186. text-align: center;
  187. line-height: 400upx;
  188. color: #666;
  189. }
  190. // 详情内容
  191. .back-text{
  192. background: #ffffff;
  193. padding: 10upx 20upx;
  194. margin-bottom: 20upx;
  195. border-radius: 6upx;
  196. box-shadow: 1px 1px 3px #EEEEEE;
  197. .text-item{
  198. display: flex;
  199. align-items: center;
  200. padding: 10upx 10upx;
  201. font-size: 28upx;
  202. justify-content: space-between;
  203. .margin-left{
  204. margin-left: 30upx;
  205. }
  206. .time{
  207. color: #888;
  208. font-size: 26upx;
  209. margin-left: 10upx;
  210. }
  211. > view{
  212. &:first-child{
  213. flex: 1;
  214. }
  215. }
  216. }
  217. }
  218. // 步骤条
  219. .step-content {
  220. padding: 0 20upx;
  221. background-color: #fff;
  222. flex: 1;
  223. overflow-y: scroll;
  224. }
  225. // 底部按钮
  226. .footer {
  227. background-color: #fff;
  228. // margin-top: 20upx;
  229. .check-pending{
  230. display: flex;
  231. .act-btn {
  232. width: 50%;
  233. }
  234. }
  235. .comment-input{
  236. width: 100%;
  237. padding: 20upx;
  238. .input-cont{
  239. width: 100%;
  240. background-color: #f4f4f4;
  241. border-radius: 10upx;
  242. display: flex;
  243. justify-content: space-between;
  244. align-items: center;
  245. padding: 0 20upx;
  246. textarea{
  247. padding: 20upx;
  248. height: 100%;
  249. flex: 1;
  250. }
  251. .active{
  252. background-color: #fff;
  253. margin: 20upx 20upx 20upx 0;
  254. }
  255. .input-btn{
  256. padding: 20upx;
  257. height: 60upx;
  258. }
  259. }
  260. view{
  261. margin-top: 20upx;
  262. }
  263. }
  264. .dsh{
  265. color: red;
  266. }
  267. .dzg{
  268. color: #007AFF;
  269. }
  270. .ywc {
  271. color: #10c71e;
  272. }
  273. }
  274. .ygq {
  275. color: #999;
  276. }
  277. }
  278. </style>