myAppraiseDetail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view class="content">
  3. <!-- 列表 -->
  4. <view class="itemContent">
  5. <view class="item">
  6. <view class="leftView">
  7. <image :src='detail.PhotoPath' v-if="detail.PhotoPath" class="storeImg"></image>
  8. <image src="../../static/img/pic_def_ava.png" mode="" class="storeImg" v-else></image>
  9. </view>
  10. <view class="rightView">
  11. <!-- 第一行 -->
  12. <view class="firstView">
  13. <view class="shopName">{{detail.Evaluator}}</view>
  14. </view>
  15. <!-- 第2行 -->
  16. <view class="secondView">
  17. <!-- 星星 -->
  18. <uni-rate :value="detail.Overallevaluation" :max="5" color="#EEEEEE" active-color="#FF4F00"
  19. :size="16" :margin="4" :readonly="true" />
  20. <view class="secondRightView">
  21. <view class="time">{{detail.CreateTime.slice(0,detail.CreateTime.length-8)}}</view>
  22. <image src="../../static/img/icon_del.png" class="deleteBtn"
  23. @click="deleteItem(detail, index)"></image>
  24. </view>
  25. </view>
  26. <view class="thirdView">
  27. <view class="count">服务态度:{{detail.Serviceevaluation}}</view>
  28. <view class="count">施工质量:{{detail.Constructionevaluation}}</view>
  29. <view class="count">店面环境:{{detail.Storeevaluation}}</view>
  30. </view>
  31. <view class="contentMes">{{detail.EContent}}</view>
  32. <!-- 照片 -->
  33. <view class="imgBg">
  34. <view v-for="(itemImg,indexImg) in detail.imgs" :key="indexImg">
  35. <image :src="itemImg.imageUrl" class="img"
  36. @click="previewImage(itemImg.imageUrl,detail.imgs)"></image>
  37. </view>
  38. </view>
  39. <!-- 商家回复 -->
  40. <view class="writeBack" v-if="detail.ReplyContent">商家回复:{{detail.ReplyContent}}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import nodata from '../../components/nodata/nodata.vue'
  48. export default {
  49. components: {
  50. nodata,
  51. },
  52. data() {
  53. return {
  54. itemData: [],
  55. page: 1,
  56. noMoreShow: false,
  57. imgArr: [],
  58. sheetId:'',
  59. detail:"",
  60. }
  61. },
  62. onLoad(opt) {
  63. this.sheetId=opt.id
  64. this.getItemData()
  65. },
  66. methods: {
  67. previewImage(img, arrDic) {
  68. var arr = [];
  69. arrDic.forEach(item => {
  70. arr.push(item.imageUrl)
  71. })
  72. // 预览图片
  73. uni.previewImage({
  74. urls: arr,
  75. current: img,
  76. longPressActions: {
  77. itemList: ['发送给朋友', '保存图片', '收藏'],
  78. success: function(data) {
  79. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  80. },
  81. fail: function(err) {
  82. console.log(err.errMsg);
  83. }
  84. }
  85. });
  86. },
  87. deleteItem(item, index) {
  88. var that=this;
  89. uni.showModal({
  90. title: '提示',
  91. content: '确定删除该条评价吗?',
  92. success: function (res) {
  93. if (res.confirm) {
  94. that.itemData.splice(index, 1);
  95. uni.showLoading({
  96. title: '删除中'
  97. })
  98. let url = 'worldKeepCar/keepCarMy/deleteMyTMEvaluate',
  99. params = {
  100. id: item.ID,
  101. }
  102. that.$http(url, params, 'POST').then(res => {
  103. uni.hideLoading();
  104. that.page = 1
  105. uni.navigateBack({
  106. delta:1
  107. })
  108. })
  109. }
  110. }
  111. });
  112. },
  113. getItemData() {
  114. uni.showLoading({
  115. title: '加载中'
  116. })
  117. let url = 'worldKeepCar/keepCarMy/queryTMEvaluateDetail',
  118. params = {
  119. sheetId:this.sheetId
  120. }
  121. this.$http(url, params, 'GET').then(res => {
  122. uni.hideLoading();
  123. this.detail = res.data
  124. // 处理 undefined和null转为空白字符串
  125. /* list.forEach((item, index) => {
  126. for (const key in item) {
  127. item[key] = this.$praseStrEmpty(item[key])
  128. }
  129. }) */
  130. })
  131. },
  132. },
  133. // 下拉刷新 上拉加载更多
  134. onPullDownRefresh() {
  135. this.page = 1
  136. this.getItemData()
  137. setTimeout(function() {
  138. uni.stopPullDownRefresh();
  139. }, 1000);
  140. },
  141. onReachBottom() {
  142. this.page++;
  143. this.getItemData()
  144. },
  145. }
  146. </script>
  147. <style scoped>
  148. .content {
  149. background: #FFFFFF;
  150. min-height: 100vh;
  151. }
  152. .item {
  153. display: flex;
  154. justify-content: flex-start;
  155. padding: 0 24rpx;
  156. background-color: #FFFFFF;
  157. }
  158. .leftView {
  159. width: 117rpx;
  160. padding-right: 20rpx;
  161. }
  162. .storeImg {
  163. width: 72rpx;
  164. height: 72rpx;
  165. border-radius: 8rpx;
  166. margin-top: 30rpx;
  167. }
  168. .rightView {
  169. border-bottom: 1rpx #EEEEEE solid;
  170. width: 100vw;
  171. }
  172. .firstView,
  173. .secondView {
  174. display: flex;
  175. justify-content: space-between;
  176. align-items: center;
  177. }
  178. .firstView {
  179. padding-top: 30rpx;
  180. }
  181. .secondView {
  182. padding-top: 12rpx;
  183. padding-bottom: 20rpx;
  184. }
  185. .shopName {
  186. /* padding-top: 30rpx;
  187. padding-bottom: 10rpx; */
  188. font-size: 26rpx;
  189. font-weight: bold;
  190. color: #333333;
  191. }
  192. .secondRightView{
  193. display: flex;
  194. }
  195. .time {
  196. font-size: 26rpx;
  197. color: #999999;
  198. margin-right: 20rpx;
  199. }
  200. .deleteBtn {
  201. width: 36rpx;
  202. height: 36rpx;
  203. }
  204. .thirdView{
  205. display: flex;
  206. justify-content: flex-start;
  207. padding-top: 10rpx;
  208. padding-bottom: 20rpx;
  209. }
  210. .count{
  211. font-size: 24rpx;
  212. color: #999999;
  213. margin-right: 20rpx;
  214. }
  215. .contentMes {
  216. font-size: 26rpx;
  217. color: #666666;
  218. line-height: 37rpx;
  219. /* padding-top: 20rpx; */
  220. }
  221. .imgBg {
  222. display: flex;
  223. justify-content: flex-start;
  224. padding: 30rpx 0rpx;
  225. flex-wrap: wrap;
  226. }
  227. .img {
  228. width: 140rpx;
  229. height: 140rpx;
  230. margin-right: 5rpx;
  231. border-radius: 8rpx;
  232. }
  233. .writeBack {
  234. font-size: 26rpx;
  235. color: #666666;
  236. line-height: 37rpx;
  237. padding: 20rpx;
  238. background-color: #F4F5F7;
  239. padding-bottom: 20rpx;
  240. }
  241. .noMore {
  242. text-align: center;
  243. line-height: 50rpx;
  244. color: #999999;
  245. font-size: 28rpx;
  246. }
  247. </style>