移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

180 righe
4.6 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:'zzjyDetails', query: {id:item.id}}" >
  25. <template #icon>
  26. <div class="icon" style="background:#FFA63E;width: 45px;">
  27. <van-icon name="../../../../static/images/onlineHome/icon_zzjy.png" size="30" color="#539FFD" style="margin-left: 3px;margin-top: 3px;" />
  28. </div>
  29. </template>
  30. <template #label>
  31. <p>{{item.zcfmc}}{{item.zcfdh}}</p>
  32. </template>
  33. </van-cell>
  34. <template #right>
  35. <van-row>
  36. <van-col>
  37. <van-button square text="修改" :to="{name:'zzjyModify', query: {id:item.id}}" type="info" class="delete-button" />
  38. </van-col>
  39. <van-col>
  40. <van-button square text="删除" @click="deleteList(item.id,index)" type="danger" class="delete-button" />
  41. </van-col>
  42. </van-row>
  43. </template>
  44. </van-swipe-cell>
  45. </van-list>
  46. </div>
  47. </template>
  48. <script>
  49. import { getList,delPhxxb } from "@/api/onlineHome/phfs/phfs";
  50. import {getGeoServerConfigKey} from "@/api/system/config";
  51. export default {
  52. name: "paidUtilizeList",
  53. data() {
  54. return {
  55. applicationList:[],
  56. houseApplyStatus:[],
  57. sexStatus:[],
  58. tclxStatus:[],
  59. tcfsStatus:[],
  60. auditStatus:[],
  61. loading: false,
  62. finished: false,
  63. queryParams:{
  64. pageNum:1,
  65. pageSize:10,
  66. phfs:"01",
  67. orderByColumn:'id',
  68. isAsc:'desc'
  69. },
  70. //地图服务地址
  71. mapGeoServerUrl:"",
  72. };
  73. },
  74. created() {
  75. this.houseGetDicts("sex").then((res) => {
  76. this.sexStatus = res.data;
  77. });
  78. },
  79. methods: {
  80. goAdd(){
  81. window.location = 'zzjyAdd';
  82. },
  83. getList(){
  84. setTimeout(() => {
  85. getList(this.queryParams).then(response => {
  86. for (var i = 0; i < response.rows.length; i++) {
  87. response.rows[i].zcfxb = this.selectDictLabel(this.sexStatus, response.rows[i].zcfxb)
  88. this.applicationList.push(response.rows[i]);
  89. console.log(this.applicationList);
  90. }
  91. if(this.applicationList.length >= response.total){
  92. this.finished = true;
  93. return;
  94. }else{
  95. this.loading = false;
  96. this.queryParams.pageNum += 1 ;
  97. }
  98. });
  99. }, 1000);
  100. },
  101. deleteList(id,index){
  102. this.$dialog.confirm({
  103. message: '您确认删除申请草稿?',
  104. })
  105. .then(() => {
  106. // on confirm
  107. this.applicationList.splice(index,1)
  108. delPhxxb(id).then(res => {
  109. if(res.code = 200){
  110. this.$toast.success('删除成功');
  111. }
  112. });
  113. })
  114. .catch(() => {
  115. // on cancel
  116. });
  117. },
  118. goSubmit(id,index){
  119. this.$dialog.confirm({
  120. message: '您确认提交草稿?',
  121. })
  122. .then(() => {
  123. // on confirm
  124. submitApply(id).then(res => {
  125. if(res.code = 200){
  126. this.$toast.success('提交成功!');
  127. setTimeout(function(){
  128. history.go(0)
  129. },2000)
  130. }
  131. });
  132. })
  133. .catch(() => {
  134. // on cancel
  135. });
  136. }
  137. },
  138. }
  139. </script>
  140. <style scoped lang="scss">
  141. .app-container {
  142. padding: 0.2rem 3%;
  143. }
  144. /deep/.van-cell__title{
  145. flex: 0.7;
  146. }
  147. /deep/.van-cell__title span{
  148. font-family: Arial;
  149. font-size: 0.4rem;
  150. font-weight: normal;
  151. }
  152. /deep/.van-cell__value{
  153. flex: 0.3;
  154. color: #1D6FE9;
  155. font-weight: bold;
  156. }
  157. /deep/.van-swipe-cell{
  158. margin-bottom: 0.2rem;
  159. border-radius: 0.2rem;
  160. overflow: hidden;
  161. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  162. }
  163. /deep/van-ellipsis{
  164. font-weight: bold;
  165. }
  166. .delete-button {
  167. height: 100%;
  168. }
  169. .van-row{
  170. height: 100%;
  171. }
  172. .van-col{
  173. height: 100%;
  174. }
  175. </style>