移动端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

216 lines
6.0 KiB

  1. <template>
  2. <div>
  3. <van-nav-bar
  4. left-arrow
  5. title="证书查看"
  6. fixed
  7. placeholder
  8. @click-left="$router.back()"
  9. >
  10. <template #right>
  11. <van-icon v-if="false" name="@/../static/images/icon/icon_flow.png" size="20" @click="openFilter"/>
  12. </template>
  13. </van-nav-bar>
  14. <van-pull-refresh v-model="refreshing" @refresh="getList()">
  15. <van-list
  16. v-model="loading"
  17. :finished="finished"
  18. :immediate-check="false"
  19. finished-text="没有更多了"
  20. @load="getList('+1')"
  21. >
  22. <van-swipe-cell v-for="(item,index) in list" :key="index" class="delegate">
  23. <van-cell :label="item.idcard" center>
  24. <template #icon>
  25. <van-icon name="@/../static/images/onlineHome/icon_zjd7.png" size="30" color="#7790FE" style="margin-right: 10px;" />
  26. </template>
  27. <template #title>
  28. <p style="font-weight: bold;">{{item.projectName}}</p>
  29. </template>
  30. <template #right-icon>
  31. <van-button plain type="info" style="border: 0; font-weight: bold;" @click="openLicense(item)">查看证书</van-button>
  32. </template>
  33. </van-cell>
  34. <template #right>
  35. <van-row style="height: 100%;">
  36. <van-col style="height: 100%;">
  37. <van-button square text="查看申请" type="primary" style="height: 100%;" @click="viewItem(item)"/>
  38. </van-col>
  39. <van-col style="height: 100%;">
  40. <van-button square text="许可证修改" type="info" style="height: 100%;" @click="editLicensePermit(item)"/>
  41. </van-col>
  42. <van-col style="height: 100%;">
  43. <van-button square text="批准书修改" type="info" style="height: 100%;" @click="editLicenseRatification(item)"/>
  44. </van-col>
  45. </van-row>
  46. </template>
  47. </van-swipe-cell>
  48. </van-list>
  49. </van-pull-refresh>
  50. <onlineHomeIndex :current="1"></onlineHomeIndex>
  51. <van-popup
  52. v-model="filterVisible"
  53. closeable
  54. position="top"
  55. :close-on-click-overlay="true"
  56. :lazy-render="false"
  57. >
  58. <van-form>
  59. <van-cell title="筛选查询"></van-cell>
  60. <van-field v-model="queryParams.memberName" label="申请户主" placeholder="申请户主" input-align="right"/>
  61. <van-field v-model="queryParams.phone" label="联系电话" placeholder="联系电话" input-align="right"/>
  62. <div style="margin: 0.2rem; text-align: right;">
  63. <van-button type="info" native-type="submit" size="small" @click="resetQuery"> 重置 </van-button>
  64. <van-button type="primary" native-type="submit" size="small" @click="getList(0)"> 查询 </van-button>
  65. </div>
  66. </van-form>
  67. </van-popup>
  68. </div>
  69. </template>
  70. <script>
  71. import FieldSelect from "@/components/form/FieldSelect";
  72. import onlineHomeIndex from "@/views/onlineHomeIndex";
  73. import { getList } from "@/api/onlineHome/homestead/application";
  74. export default {
  75. components: {FieldSelect, onlineHomeIndex},
  76. name: "HouseLicense",
  77. data() {
  78. return {
  79. list: [],
  80. total: 0,
  81. // ?pageNum=1&pageSize=10&orderByColumn=createTime&isAsc=desc&printLicense=Y
  82. queryParams: {
  83. pageNum: 1,
  84. pageSize: 10,
  85. printLicense: 'Y',
  86. orderByColumn: 'createTime',
  87. isAsc: 'desc',
  88. phone: '',
  89. memberName: '',
  90. },
  91. refreshing: false,
  92. loading: false,
  93. finished: false,
  94. options: {
  95. },
  96. filterVisible: false,
  97. }
  98. },
  99. created() {
  100. this.initOptions();
  101. this.getList();
  102. },
  103. methods: {
  104. getList(target) {
  105. let type = typeof (target);
  106. console.log(type, target);
  107. if (target === 0) {
  108. this.refreshing = true;
  109. this.finished = true;
  110. this.total = 0;
  111. this.queryParams.pageNum = 1;
  112. this.list = [];
  113. this.filterVisible = false;
  114. }
  115. else if (type === 'number')
  116. this.queryParams.pageNum = target;
  117. else if (type === 'string') {
  118. this.queryParams.pageNum = eval(this.queryParams.pageNum + target)
  119. }
  120. else
  121. {
  122. this.refreshing = true;
  123. this.finished = true;
  124. this.resetQuery();
  125. this.total = 0;
  126. this.queryParams.pageNum = 1;
  127. this.list = []
  128. }
  129. getList(this.queryParams).then((response) => {
  130. console.log(response)
  131. if (response.rows.length === 0) {
  132. this.finished = true;
  133. return;
  134. }
  135. response.rows.forEach((e) => {
  136. this.list.push(e);
  137. });
  138. this.total += response.rows.length;
  139. this.finished = this.total >= response.total;
  140. }).catch(() => {
  141. this.finished = true;
  142. }).finally(() => {
  143. this.loading = false;
  144. this.refreshing = false;
  145. });
  146. },
  147. viewItem(item) {
  148. this.$router.push({
  149. name: 'proposerLite',
  150. query: {
  151. id: item.id,
  152. type: 'view',
  153. },
  154. });
  155. },
  156. initOptions() {
  157. for(let k in this.options)
  158. {
  159. this.houseGetDicts(k).then((res) => {
  160. this.options[k] = res.data;
  161. });
  162. }
  163. },
  164. formatDict(dict, value) {
  165. return this.selectDictLabel(dict, value);
  166. },
  167. openFilter() {
  168. this.filterVisible = true;
  169. },
  170. resetQuery() {
  171. this.queryParams.phone = '';
  172. this.queryParams.memberName = '';
  173. },
  174. openLicense(item) {
  175. this.$router.push({
  176. name: 'certificateSee',
  177. query: {
  178. id: item.id,
  179. },
  180. });
  181. },
  182. editLicensePermit(item) {
  183. this.$router.push({
  184. name: 'licensePermitEdit',
  185. query: {
  186. id: item.id,
  187. },
  188. });
  189. },
  190. editLicenseRatification(item) {
  191. this.$router.push({
  192. name: 'licenseRatificationEdit',
  193. query: {
  194. id: item.id,
  195. },
  196. });
  197. },
  198. },
  199. }
  200. </script>
  201. <style scoped>
  202. .delegate {
  203. width: 96%;
  204. margin: 3% 2% 3% 2%;
  205. border-radius: 0.18rem;
  206. overflow: hidden;
  207. box-shadow: 0.1rem 0.1rem 0.15rem 0.02rem rgba(0,0,0,0.16);
  208. }
  209. </style>