移动端
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

indexComplaint.vue 5.1 KiB

hace 3 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div class="app-container" id="container">
  3. <van-nav-bar
  4. title="投诉回复"
  5. fixed
  6. placeholder
  7. left-arrow
  8. @click-left="onClickIndex"
  9. />
  10. <van-list
  11. v-model="loading"
  12. :finished="finished"
  13. :finished-text="pageId == 0 ? '没有更多了' : ''"
  14. @load="getNewList"
  15. >
  16. <div class="tabsBox" v-for="(item,index) in schemeList" :key="index" :id="item.id">
  17. <van-cell :title="item.name" :label="'待回复 · ' + item.replyTime" center>
  18. <template #icon>
  19. <van-icon name="../../../static/images/lawEnforcement/12.jpg" size="36" color="#539FFD" style="margin-right: 10px;border-radius: 50%;overflow: hidden;" />
  20. </template>
  21. <template #default>
  22. <p style="color: #1D6FE9;"><van-icon name="phone" />{{item.phone}}</p>
  23. </template>
  24. </van-cell>
  25. <van-row>
  26. <van-col :span="5">类型:</van-col>
  27. <van-col :span="19">{{item.communicateType}}</van-col>
  28. </van-row>
  29. <van-row>
  30. <van-col :span="5">标题:</van-col>
  31. <van-col :span="19">{{item.title}}</van-col>
  32. </van-row>
  33. <van-row>
  34. <van-col :span="5">内容:</van-col>
  35. <van-col :span="19">{{item.content}}</van-col>
  36. </van-row>
  37. <van-row v-if="item.reply">
  38. <van-col :span="24" style="border-top: 1px solid rgba(112,112,112,0.3)"></van-col>
  39. </van-row>
  40. <van-row v-if="item.reply">
  41. <van-col :span="5">回复:</van-col>
  42. <van-col :span="19">{{item.reply}}</van-col>
  43. </van-row>
  44. <van-row v-if="item.reply">
  45. <van-col :span="5">回复人:</van-col>
  46. <van-col :span="19">{{item.replyName}}</van-col>
  47. </van-row>
  48. <van-row v-if="item.reply">
  49. <van-col :span="12"><p style="color: #cccccc;font-size: 12px">{{item.replyTime}}</p></van-col>
  50. <van-col :span="12"></van-col>
  51. </van-row>
  52. </div>
  53. <p style="text-align: center;font-size: 14px;color: #666666" v-if="pageId!=0 && finished" @click="getAll">查看全部</p>
  54. </van-list>
  55. </div>
  56. </template>
  57. <script>
  58. import { getTopDeptId , schemeDetail,communicate } from "@/api/lawEnforcement/index";
  59. export default {
  60. name: "index",
  61. data() {
  62. return {
  63. active:0,
  64. //查询参数
  65. queryParams: {
  66. pageNum: 1,
  67. pageSize: 10,
  68. deptId:100,
  69. },
  70. schemeList:[],
  71. //是否显示加载
  72. loading: false,
  73. //是否滚动到底部
  74. finished: false,
  75. communicateOptions:[],
  76. pageId:0
  77. };
  78. },
  79. created() {
  80. //转出方式字典
  81. this.getDicts("communicate_type").then(res => {
  82. this.communicateOptions = res.data;
  83. });
  84. this.pageId = this.$route.query.id?this.$route.query.id:0;
  85. },
  86. methods: {
  87. getNewList(){
  88. this.loading = true;
  89. console.log(this.$route.query.id)
  90. getTopDeptId().then(response => {
  91. this.queryParams.deptId = response.data ;
  92. communicate(this.queryParams).then(response => {
  93. for (var i = 0; i < response.rows.length; i++) {
  94. response.rows[i].replyTime = response.rows[i].replyTime == '' ? '' : response.rows[i].replyTime.substr(0,10);
  95. response.rows[i].communicateType = this.selectDictLabel(this.communicateOptions,response.rows[i].communicateType)
  96. if (this.$route.query.id){
  97. if (this.$route.query.id == response.rows[i].id){
  98. this.schemeList.push(response.rows[i]);
  99. this.finished = true;
  100. this.loading = false;
  101. return;
  102. }
  103. }else{
  104. this.schemeList.push(response.rows[i]);
  105. }
  106. }
  107. if(this.schemeList.length >= response.total){
  108. this.finished = true;
  109. return;
  110. }
  111. this.queryParams.pageNum += 1 ;
  112. this.loading = false;
  113. })
  114. })
  115. },
  116. getAll(){
  117. var url=window.location.href; //获取当前页面的url
  118. if(url.indexOf("?")!=-1){ //判断是否存在参数
  119. url = url.replace(/(\?|#)[^'"]*/, ''); //去除参数
  120. window.history.pushState({},0,url);
  121. }
  122. location.reload();
  123. },
  124. onClickIndex(){
  125. this.$router.push('/lawEnforcement');
  126. }
  127. },
  128. };
  129. </script>
  130. <style scoped lang="scss">
  131. @font-face {
  132. font-family: SourceHanSansCNBold;
  133. src: url("../../../assets/fonts/SourceHanSansCN-Bold.otf");
  134. }
  135. body{
  136. overflow: scroll;
  137. }
  138. .app-container{
  139. padding: 5% 2%;
  140. }
  141. /deep/ .van-tabs__line{
  142. background-color: #1D6FE9;
  143. }
  144. /deep/ .van-tab--active{
  145. color: #1D6FE9;
  146. }
  147. /deep/.van-cell__title{
  148. flex: 0.63;
  149. line-height: 1;
  150. }
  151. /deep/.van-cell__value{
  152. flex: 0.37;
  153. line-height: 1;
  154. }
  155. /deep/.van-cell__label{
  156. line-height: 1;
  157. }
  158. /deep/.van-cell{
  159. padding: 0;
  160. }
  161. /deep/.van-row{
  162. margin-top: 15PX;
  163. .van-col{
  164. font-size: 0.4rem;
  165. }
  166. }
  167. .tabsBox{
  168. padding: 5% 4%;
  169. background-color: #FFF;
  170. border-radius: 8PX;
  171. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  172. margin-bottom: 15PX;
  173. }
  174. .van-tab__pane-wrapper{
  175. padding: 5% 2%;
  176. }
  177. .answerBtn{
  178. padding: 5PX 15PX;
  179. height:auto;
  180. }
  181. </style>