移动端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

163 rader
4.5 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="$router.back(-1)"
  8. @click-right="goAdd"
  9. >
  10. <template #title>
  11. <p style="font-weight: bold;">无偿退出</p>
  12. </template>
  13. <template #right>
  14. <van-icon name="add" size="18" />
  15. </template>
  16. </van-nav-bar>
  17. <van-list
  18. v-model="loading"
  19. :finished="finished"
  20. finished-text="没有更多了"
  21. @load="getList"
  22. >
  23. <van-swipe-cell v-for="(item,index) in applicationList" :key="index">
  24. <van-cell :title="item.zjddm" center :to="{name:'freeExitDetail', query: {id:item.id}}" >
  25. <template #icon>
  26. <van-icon name="../../../static/images/onlineHome/icon_zjd3.png" size="30" color="#539FFD" style="margin-right: 10px;" />
  27. </template>
  28. <template #label>
  29. <p><b style="color: #539FFD;">{{item.tcfs}}</b><i style="margin-right: 0.5rem;"></i><b style="color: #333333;">{{item.sqrxm}}</b><i style="margin-right: 0.5rem;"></i>{{item.tcmj}}㎡</p>
  30. </template>
  31. </van-cell>
  32. <template #right>
  33. <van-row>
  34. <van-col>
  35. <van-button square text="修改" :to="{name:'freeExitModify', query: {id:item.id}}" type="info" class="delete-button" />
  36. </van-col>
  37. <van-col>
  38. <van-button square text="删除" @click="deleteList(item.id,index)" type="danger" class="delete-button" />
  39. </van-col>
  40. </van-row>
  41. </template>
  42. </van-swipe-cell>
  43. </van-list>
  44. </div>
  45. </template>
  46. <script>
  47. import { getList , removeList, } from "@/api/onlineHome/homestead/paidExit";
  48. export default {
  49. name: "freeExitList",
  50. data() {
  51. return {
  52. applicationList:[],
  53. houseApplyStatus:[],
  54. tcqllxStatus:[],
  55. tclxStatus:[],
  56. tcfsStatus:[],
  57. loading: false,
  58. finished: false,
  59. queryParams:{
  60. pageNum:1,
  61. pageSize:10,
  62. orderByColumn:'createTime',
  63. isAsc:'desc',
  64. // 申请类型 1-宅基地退出
  65. sqlx: '1',
  66. // 退出类型 01-有偿退出 02-无偿退出
  67. tclx: '02',
  68. }
  69. };
  70. },
  71. created() {
  72. this.houseGetDicts("tcqllx").then((res) => {
  73. this.tcqllxStatus = res.data;
  74. });
  75. this.houseGetDicts("tclx").then((res) => {
  76. this.tclxStatus = res.data;
  77. });
  78. this.houseGetDicts("tcfs").then((res) => {
  79. this.tcfsStatus = res.data;
  80. });
  81. },
  82. methods: {
  83. goAdd(){
  84. window.location = 'freeExitAdd';
  85. },
  86. getList(){
  87. setTimeout(() => {
  88. getList(this.queryParams).then(response => {
  89. for (var i = 0; i < response.rows.length; i++) {
  90. response.rows[i].tcqllx = this.selectDictLabel(this.tcqllxStatus, response.rows[i].tcqllx)
  91. response.rows[i].tclx = this.selectDictLabel(this.tclxStatus, response.rows[i].tclx)
  92. response.rows[i].tcfs = this.selectDictLabel(this.tcfsStatus, response.rows[i].tcfs)
  93. this.applicationList.push(response.rows[i]);
  94. }
  95. if(this.applicationList.length >= response.total){
  96. this.finished = true;
  97. return;
  98. }else{
  99. this.loading = false;
  100. this.queryParams.pageNum += 1 ;
  101. }
  102. });
  103. }, 1000);
  104. },
  105. deleteList(id,index){
  106. this.$dialog.confirm({
  107. message: '您确认删除此退出申请?',
  108. })
  109. .then(() => {
  110. // on confirm
  111. this.applicationList.splice(index,1)
  112. removeList(id).then(res => {
  113. if(res.code = 200){
  114. this.$toast.success('删除成功');
  115. }
  116. });
  117. })
  118. .catch(() => {
  119. // on cancel
  120. });
  121. },
  122. },
  123. }
  124. </script>
  125. <style scoped lang="scss">
  126. .app-container {
  127. padding: 0.2rem 3%;
  128. }
  129. /deep/.van-cell__title{
  130. flex: 0.7;
  131. }
  132. /deep/.van-cell__title span{
  133. font-family: Arial;
  134. font-size: 0.4rem;
  135. font-weight: normal;
  136. }
  137. /deep/.van-cell__value{
  138. flex: 0.3;
  139. color: #1D6FE9;
  140. font-weight: bold;
  141. }
  142. /deep/.van-swipe-cell{
  143. margin-bottom: 0.2rem;
  144. border-radius: 0.2rem;
  145. overflow: hidden;
  146. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  147. }
  148. /deep/van-ellipsis{
  149. font-weight: bold;
  150. }
  151. .delete-button {
  152. height: 100%;
  153. }
  154. .van-row{
  155. height: 100%;
  156. }
  157. .van-col{
  158. height: 100%;
  159. }
  160. </style>