appeal_detail.vue 5.7 KB

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