appeal_detail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <div class="content" v-if="isLoad">
  3. <div class="appealMsg">
  4. <div class="msg_content">
  5. <div class="title">诉求内容:</div>
  6. <div class="msg">
  7. {{ info.content }}
  8. </div>
  9. <div class="attach_list">
  10. <img
  11. :src="globalUrl + attach.url" @click="showLarge( globalUrl + attach.url)" v-for="(attach, idx) in info.attach_list"
  12. :key="idx"/>
  13. </div>
  14. </div>
  15. <div class="info">
  16. <div class="flex">
  17. <div class="info_content">
  18. <span>咨询人:</span>
  19. <span class="name" v-show="info.is_mine">{{ info.contact_name}}</span>
  20. <span class="name" v-show="!info.is_mine">{{ info.contact_name | nameFilter}}</span>
  21. </div>
  22. <div class="info_content">
  23. <span>电话:</span>
  24. <span class="name" v-show="info.is_mine">{{ info.contact_phone}}</span>
  25. <span class="phone" v-show="!info.is_mine">{{ info.contact_phone | phoneFilter }}</span>
  26. </div>
  27. </div>
  28. <div class="info_content">
  29. <span>提交时间:</span
  30. ><span class="time">{{ info.addtime }}</span>
  31. </div>
  32. </div>
  33. </div>
  34. <!-- <div class="one"></div> -->
  35. <div class="appealState" style="margin-top: 30rpx;">
  36. <div class="msg_content" v-if="info.process !== '2'">
  37. <div class="title">处理进度:</div>
  38. <div class="msg_state">
  39. <!-- <span v-if="info.process === '0'"> 待分配 </span>
  40. <span v-if="info.process === '1'"> 待回复 </span> -->
  41. <span> 待回复 </span>
  42. </div>
  43. </div>
  44. <div class="msg_content" v-if="info.process === '2'">
  45. <div class="title">回复内容:</div>
  46. <div class="msg_res">
  47. <span class="red">{{ info.department_name }}:</span
  48. ><span>{{ info.reply }}</span>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </template>
  54. <script>
  55. import md5 from "@/common/md5.js";
  56. export default {
  57. data() {
  58. return {
  59. isLoad: false,
  60. globalUrl:getApp().globalData.shareUrl,
  61. info: {
  62. // name: "樊**",
  63. // phone: "153753****",
  64. // time: "2021-05-14 09:32:20",
  65. // state: {
  66. // msg: "尊敬的市民您好!收到您的留言,我们十分重视!正平大街开展拉土作业的车辆为西安(咸阳)机场三期扩建工程建设项目运输。您的建议我们会与有关部门沟通协商,尽量确保市民不会在夜间被工程噪音影响。",
  67. // name: "市场服务与监督管理局",
  68. // },
  69. // status: null,
  70. // states: "正在处理中……",
  71. },
  72. };
  73. },
  74. onLoad: function (e) {
  75. this.$set(this.info, "status", e.id);
  76. this.isLoad = true;
  77. this.pageDetail(e.id);
  78. },
  79. methods: {
  80. pageDetail(infoId) {
  81. let md5Sign = md5(
  82. "method=" +
  83. "consult" +
  84. "&timestamp=" +
  85. getApp().globalData.globalTimestamp +
  86. "&secret=" +
  87. getApp().globalData.secret
  88. );
  89. let url =
  90. getApp().globalData.shareUrl +
  91. "api/api.php" +
  92. "?method=consult&source=consult&action=info_by_id&timestamp=" +
  93. getApp().globalData.globalTimestamp +
  94. "&sign=" +
  95. md5Sign;
  96. uni.request({
  97. url: url,
  98. method: "POST",
  99. header: {
  100. "content-type": "application/x-www-form-urlencoded",
  101. },
  102. data: {
  103. openId: getApp().globalData.open_id,
  104. id: infoId,
  105. },
  106. success: (res) => {
  107. if (res.data.code === 200) {
  108. let data = res.data.data
  109. let time = this.$options.filters["globalTime"](data.addtime);
  110. let timeSecond = this.$options.filters["globalTimeSecond"](
  111. data.addtime
  112. );
  113. data.addtime = time + " " + timeSecond;
  114. this.info = data;
  115. console.log(data);
  116. }
  117. },
  118. fail: () => {
  119. console.log("连接失败");
  120. },
  121. });
  122. },
  123. showLarge(src) {
  124. uni.previewImage({
  125. urls: [src],
  126. longPressActions: {
  127. itemList: ["发送给朋友", "保存图片"],
  128. success: function (data) {},
  129. fail: function (err) {
  130. console.log(err.errMsg);
  131. },
  132. },
  133. });
  134. },
  135. },
  136. };
  137. </script>
  138. <style lang="scss" scoped>
  139. .flex {
  140. display: flex;
  141. }
  142. .red {
  143. color: red;
  144. }
  145. .title {
  146. font-weight: bolder;
  147. padding-bottom: 3%;
  148. font-size: 32rpx;
  149. }
  150. .name,
  151. .phone,
  152. .time {
  153. font-weight: 200;
  154. }
  155. .info_content {
  156. padding-left: 5%;
  157. padding-top: 1%;
  158. padding-bottom: 1%;
  159. font-size: 28rpx;
  160. }
  161. .content {
  162. padding: 2% 0;
  163. .one {
  164. height: 20rpx;
  165. margin: 3% 4%;
  166. background: linear-gradient(
  167. to right,
  168. transparent 0%,
  169. transparent 50%,
  170. rgb(206, 203, 203) 50%,
  171. rgb(207, 207, 207) 100%
  172. );
  173. background-size: 30rpx 1rpx;
  174. background-repeat: repeat-x;
  175. }
  176. .appealMsg {
  177. .msg_content {
  178. padding: 5%;
  179. margin: 1%;
  180. margin-bottom: 6%;
  181. border: 1px solid rgb(233, 229, 229);
  182. border-radius: 20rpx;
  183. .msg {
  184. text-indent: 2em;
  185. line-height: 50rpx;
  186. letter-spacing: 2rpx;
  187. font-size: 28rpx;
  188. }
  189. .attach_list {
  190. display: flex;
  191. justify-content: space-around;
  192. img {
  193. width: 200rpx;
  194. height: 200rpx;
  195. }
  196. }
  197. }
  198. }
  199. .appealState {
  200. .msg_content {
  201. padding: 5%;
  202. margin: 1%;
  203. margin-bottom: 6%;
  204. border: 1px solid rgb(233, 229, 229);
  205. border-radius: 20rpx;
  206. .msg_state {
  207. text-indent: 2em;
  208. line-height: 50rpx;
  209. letter-spacing: 2rpx;
  210. font-size: 28rpx;
  211. }
  212. .msg_res {
  213. line-height: 50rpx;
  214. letter-spacing: 2rpx;
  215. font-size: 28rpx;
  216. }
  217. }
  218. }
  219. }
  220. </style>