移动端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

169 рядки
4.9 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.shyqrdbxm" center :to="{name:'paidUtilizeDteail', query: {id:item.id}}" >
  25. <template #icon>
  26. <van-icon name="../../../static/images/onlineHome/icon_zjd9.png" size="30" color="#539FFD" style="margin-right: 10px;" />
  27. </template>
  28. <template #label>
  29. <p><b style="color: #539FFD;">{{item.sqrzjhm}}</b><i style="margin-right: 0.5rem;"></i><i >{{item.ycsykssj}} ~ </i><i style="margin-right: 0.5rem;"></i>{{item.ycsydqsj}}</p>
  30. </template>
  31. </van-cell>
  32. <template #right>
  33. <van-row>
  34. <van-col>
  35. <van-button square text="修改" :to="{name:'paidUtilizeModify', 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/paidUtilize";
  48. import {getGeoServerConfigKey} from "@/api/system/config";
  49. export default {
  50. name: "paidUtilizeList",
  51. data() {
  52. return {
  53. applicationList:[],
  54. houseApplyStatus:[],
  55. tcqllxStatus:[],
  56. tclxStatus:[],
  57. tcfsStatus:[],
  58. auditStatus:[],
  59. loading: false,
  60. finished: false,
  61. queryParams:{
  62. pageNum:1,
  63. pageSize:10,
  64. orderByColumn:'id',
  65. isAsc:'desc'
  66. },
  67. //地图服务地址
  68. mapGeoServerUrl:"",
  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. this.houseGetDicts("audit_status").then((res) => {
  82. this.auditStatus = res.data;
  83. });
  84. },
  85. methods: {
  86. goAdd(){
  87. window.location = 'paidUtilizeAdd';
  88. },
  89. getList(){
  90. setTimeout(() => {
  91. getList(this.queryParams).then(response => {
  92. console.log(response)
  93. // for (var i = 0; i < response.rows.length; i++) {
  94. // response.rows[i].tclx = this.selectDictLabel(this.tcqllxStatus, response.rows[i].tclx)
  95. // response.rows[i].tclx = this.selectDictLabel(this.tclxStatus, response.rows[i].tclx)
  96. // response.rows[i].tcfs = this.selectDictLabel(this.tcfsStatus, response.rows[i].tcfs)
  97. // response.rows[i].auditStatus = this.selectDictLabel(this.auditStatus, response.rows[i].auditStatus)
  98. // this.applicationList.push(response.rows[i]);
  99. // }
  100. this.applicationList = response.rows;
  101. if(this.applicationList.length >= response.total){
  102. this.finished = true;
  103. return;
  104. }else{
  105. this.loading = false;
  106. this.queryParams.pageNum += 1 ;
  107. }
  108. });
  109. }, 1000);
  110. },
  111. deleteList(id,index){
  112. this.$dialog.confirm({
  113. message: '您确认删除申请草稿?',
  114. })
  115. .then(() => {
  116. // on confirm
  117. this.applicationList.splice(index,1)
  118. removeList(id).then(res => {
  119. if(res.code = 200){
  120. this.$toast.success('删除成功');
  121. }
  122. });
  123. })
  124. .catch(() => {
  125. // on cancel
  126. });
  127. },
  128. },
  129. }
  130. </script>
  131. <style scoped lang="scss">
  132. .app-container {
  133. padding: 0.2rem 3%;
  134. }
  135. /deep/.van-cell__title{
  136. flex: 0.7;
  137. }
  138. /deep/.van-cell__title span{
  139. font-family: Arial;
  140. font-size: 0.4rem;
  141. font-weight: normal;
  142. }
  143. /deep/.van-cell__value{
  144. flex: 0.3;
  145. color: #1D6FE9;
  146. font-weight: bold;
  147. }
  148. /deep/.van-swipe-cell{
  149. margin-bottom: 0.2rem;
  150. border-radius: 0.2rem;
  151. overflow: hidden;
  152. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  153. }
  154. /deep/van-ellipsis{
  155. font-weight: bold;
  156. }
  157. .delete-button {
  158. height: 100%;
  159. }
  160. .van-row{
  161. height: 100%;
  162. }
  163. .van-col{
  164. height: 100%;
  165. }
  166. </style>