移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

paidUtilizeList.vue 5.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. 有偿使用
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="add_btn" @click="goAdd"></div>
  7. </div>
  8. <van-list
  9. v-model="loading"
  10. :finished="finished"
  11. finished-text="没有更多了"
  12. @load="getList"
  13. >
  14. <van-swipe-cell v-for="(item,index) in applicationList" :key="index">
  15. <van-cell :title="item.shyqrdbxm" center :to="{name:'paidUtilizeDteail', query: {id:item.id}}" >
  16. <template #icon>
  17. <van-icon name="../../../static/images/onlineHome/icon_zjd9.png" size="30" color="#539FFD" style="margin-right: 10px;" />
  18. </template>
  19. <span>{{item.ycsyfy}}元</span>
  20. <template #label>
  21. <p><b style="color: #539FFD;">{{item.sqrzjhm}}</b><i style="margin-right: 0.5rem;"></i></p>
  22. </template>
  23. </van-cell>
  24. <template #right>
  25. <van-row>
  26. <van-col>
  27. <van-button square text="修改" :to="{name:'paidUtilizeModify', query: {id:item.id}}" type="info" class="delete-button" />
  28. </van-col>
  29. <van-col>
  30. <van-button square text="删除" @click="deleteList(item.id,index)" type="danger" class="delete-button" />
  31. </van-col>
  32. </van-row>
  33. </template>
  34. </van-swipe-cell>
  35. </van-list>
  36. </div>
  37. </template>
  38. <script>
  39. import { getList , removeList } from "@/api/onlineHome/homestead/paidUtilize";
  40. import {getGeoServerConfigKey} from "@/api/system/config";
  41. export default {
  42. name: "paidUtilizeList",
  43. data() {
  44. return {
  45. applicationList:[],
  46. houseApplyStatus:[],
  47. tcqllxStatus:[],
  48. tclxStatus:[],
  49. tcfsStatus:[],
  50. auditStatus:[],
  51. loading: false,
  52. finished: false,
  53. queryParams:{
  54. pageNum:1,
  55. pageSize:10,
  56. orderByColumn:'id',
  57. isAsc:'desc'
  58. },
  59. //地图服务地址
  60. mapGeoServerUrl:"",
  61. };
  62. },
  63. created() {
  64. this.houseGetDicts("tcqllx").then((res) => {
  65. this.tcqllxStatus = res.data;
  66. });
  67. this.houseGetDicts("tclx").then((res) => {
  68. this.tclxStatus = res.data;
  69. });
  70. this.houseGetDicts("tcfs").then((res) => {
  71. this.tcfsStatus = res.data;
  72. });
  73. this.houseGetDicts("audit_status").then((res) => {
  74. this.auditStatus = res.data;
  75. });
  76. },
  77. methods: {
  78. goAdd(){
  79. window.location = 'paidUtilizeAdd';
  80. },
  81. getList(){
  82. setTimeout(() => {
  83. getList(this.queryParams).then(response => {
  84. console.log(response)
  85. // for (var i = 0; i < response.rows.length; i++) {
  86. // response.rows[i].tclx = this.selectDictLabel(this.tcqllxStatus, response.rows[i].tclx)
  87. // response.rows[i].tclx = this.selectDictLabel(this.tclxStatus, response.rows[i].tclx)
  88. // response.rows[i].tcfs = this.selectDictLabel(this.tcfsStatus, response.rows[i].tcfs)
  89. // response.rows[i].auditStatus = this.selectDictLabel(this.auditStatus, response.rows[i].auditStatus)
  90. // this.applicationList.push(response.rows[i]);
  91. // }
  92. this.applicationList = response.rows;
  93. if(this.applicationList.length >= response.total){
  94. this.finished = true;
  95. return;
  96. }else{
  97. this.loading = false;
  98. this.queryParams.pageNum += 1 ;
  99. }
  100. });
  101. }, 1000);
  102. },
  103. deleteList(id,index){
  104. this.$dialog.confirm({
  105. message: '您确认删除申请草稿?',
  106. })
  107. .then(() => {
  108. // on confirm
  109. this.applicationList.splice(index,1)
  110. removeList(id).then(res => {
  111. if(res.code = 200){
  112. this.$toast.success('删除成功');
  113. }
  114. });
  115. })
  116. .catch(() => {
  117. // on cancel
  118. });
  119. },
  120. },
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. .app-container {
  125. .header_main{
  126. height: 116px;
  127. background: url('../../../../assets/images/sunVillage_info/list_head.png') no-repeat;
  128. background-size: 100% 100%;
  129. position: fixed;
  130. top: 0;
  131. left: 0;
  132. width: 100%;
  133. font-size: 36px;
  134. line-height: 116px;
  135. text-align: center;
  136. color: #fff;
  137. position: relative;
  138. .return_btn{
  139. width: 24px;
  140. height: 43.2px;
  141. background: url('../../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  142. background-size: 20px 36px;
  143. position: absolute;
  144. left: 38px;
  145. top: 36px;
  146. }
  147. .add_btn{
  148. width: 56.4px;
  149. height: 40.8px;
  150. background: url('../../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  151. background-size: 47px 34px;
  152. position: absolute;
  153. right: 38px;
  154. top: 36px;
  155. }
  156. }
  157. }
  158. /deep/.van-cell__title{
  159. flex: 0.7;
  160. }
  161. /deep/.van-cell__title span{
  162. font-family: Arial;
  163. font-size: 0.4rem;
  164. font-weight: normal;
  165. }
  166. /deep/.van-cell__value{
  167. flex: 0.3;
  168. color: #1D6FE9;
  169. font-weight: bold;
  170. }
  171. /deep/.van-swipe-cell{
  172. margin-bottom: 0.2rem;
  173. border-radius: 0.2rem;
  174. overflow: hidden;
  175. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  176. }
  177. /deep/van-ellipsis{
  178. font-weight: bold;
  179. }
  180. .delete-button {
  181. height: 100%;
  182. }
  183. .van-row{
  184. height: 100%;
  185. }
  186. .van-col{
  187. height: 100%;
  188. }
  189. </style>