移动端
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.

individual.vue 6.8 KiB

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 个体商户
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. </div>
  7. <div style="height: 58px;"></div>
  8. <div class="search_box">
  9. <div class="search">
  10. <input type="text" v-model="searchInput" placeholder="请输入商户姓名" />
  11. <img src="../../../../static/images/lawEnforcement/new/index_icon_04.png" @click="getList">
  12. </div>
  13. </div>
  14. <van-list
  15. v-model="loading"
  16. :finished="finished"
  17. finished-text="没有更多了"
  18. @load="getList"
  19. >
  20. <van-swipe-cell v-for="(item,index) in list" :key="index">
  21. <van-cell :to="{name:'lawEnforcementIndividualDetail', query: {id:item.id}}">
  22. <template #title>
  23. <div class="cellTit">
  24. <p>{{item.name}}</p>
  25. <!-- <i></i>-->
  26. <p>信用代码</p>
  27. <p>{{item.uniformCode}}</p>
  28. </div>
  29. </template>
  30. <template #label>
  31. <div class="cellLabel">
  32. <img src="../../../../static/images/lawEnforcement/icon/individual_icon_01.png"/>
  33. <p>{{item.cardNum}}</p>
  34. <p><i></i>{{item.phone}}</p>
  35. </div>
  36. </template>
  37. </van-cell>
  38. <template #right>
  39. <van-row>
  40. <van-col>
  41. <van-button square type="info" :to="{name:'lawEnforcementIndividualRelation', query: {id:item.id}}" class="delete-button" >关联<br/>案件</van-button>
  42. </van-col>
  43. </van-row>
  44. </template>
  45. </van-swipe-cell>
  46. </van-list>
  47. </div>
  48. </template>
  49. <script>
  50. import { listPersonal } from "@/api/lawEnforcement/index";
  51. export default {
  52. name: "caseAllocation",
  53. data() {
  54. return {
  55. loading: false,
  56. finished: false,
  57. searchInput:'',
  58. queryParams: {
  59. // 分页
  60. pageNum: 1,
  61. pageSize: 10,
  62. // 查询排序
  63. orderByColumn: "id",
  64. isAsc: "desc",
  65. name: null,
  66. },
  67. list:[]
  68. };
  69. },
  70. created() {
  71. },
  72. methods: {
  73. getList(){
  74. if (this.searchInput != ''){
  75. if (this.searchInput == this.queryParams.name){
  76. return;
  77. }
  78. this.list = [];
  79. this.loading = false;
  80. this.finished = false;
  81. this.queryParams.name = this.searchInput;
  82. this.queryParams.pageNum = 1 ;
  83. }
  84. listPersonal(this.queryParams).then(response => {
  85. response.rows.map(res=>{
  86. this.list.push(res);
  87. })
  88. console.log(this.list.length)
  89. if(this.list.length >= response.total){
  90. this.finished = true;
  91. return;
  92. }else{
  93. this.loading = false;
  94. this.queryParams.pageNum += 1 ;
  95. }
  96. });
  97. },
  98. goSearch(){
  99. if (this.searchInput == ''){
  100. location.reload()
  101. }
  102. if (this.searchInput == this.queryParams.name){
  103. return;
  104. }
  105. this.list = [];
  106. this.loading = false;
  107. this.finished = false;
  108. this.queryParams.name = this.searchInput;
  109. this.queryParams.pageNum = 1 ;
  110. // this.getList();
  111. },
  112. },
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .home_wrapper{
  117. background: #e9e9e9;
  118. min-height: 100vh;
  119. width: 100vw;
  120. padding: 0 3% 0.2rem;
  121. .search_box{
  122. display: flex;
  123. justify-content: space-between;
  124. align-items: center;
  125. width: 92%;
  126. margin: 0PX auto;
  127. .search{
  128. background: #ffffff;
  129. display: flex;
  130. justify-content: space-between;
  131. align-items: center;
  132. width: 100%;
  133. margin: 10PX auto;
  134. border: 1px solid #1D6FE9;
  135. padding: 1PX 1PX 1PX 12PX ;
  136. border-radius: 50PX;
  137. input{
  138. flex: 1;
  139. background: transparent;
  140. }
  141. }
  142. }
  143. .header_main{
  144. height: 116px;
  145. background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
  146. background-size: 100% 100%;
  147. position: fixed;
  148. top: 0;
  149. left: 0;
  150. width: 100%;
  151. font-size: 36px;
  152. line-height: 116px;
  153. text-align: center;
  154. color: #fff;
  155. z-index: 999;
  156. .return_btn{
  157. width: 24px;
  158. height: 43.2px;
  159. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  160. background-size: 20px 36px;
  161. position: absolute;
  162. left: 38px;
  163. top: 36px;
  164. }
  165. .add_btn{
  166. width: 56.4px;
  167. height: 40.8px;
  168. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  169. background-size: 47px 34px;
  170. position: absolute;
  171. right: 38px;
  172. top: 36px;
  173. }
  174. }
  175. }
  176. .cellTit{
  177. display: flex;
  178. justify-content: space-between;
  179. p{
  180. &:nth-child(1){
  181. font-size: 0.4rem;
  182. display: flex;
  183. align-items: flex-start;
  184. i{
  185. display: inline-block;
  186. width: 10PX;
  187. height: 10PX;
  188. background: url("../../../../static/images/lawEnforcement/icon/individual_icon_03.png") no-repeat center;
  189. background-size: 10PX 10PX;
  190. margin-top: 5px;
  191. margin-left: 5px;
  192. }
  193. }
  194. &:nth-child(2){
  195. color: #B4B0B0;
  196. font-size: 0.3rem;
  197. margin-left: auto;
  198. margin-right: 10PX;
  199. }
  200. &:nth-child(3){
  201. color: #6D6EB8;
  202. font-size: 0.3rem;
  203. }
  204. }
  205. }
  206. .cellLabel{
  207. display: flex;
  208. align-items: center;
  209. font-size: 0.35rem;
  210. img{
  211. display: block;
  212. margin-right: 5PX;
  213. }
  214. p{
  215. display: inline-block;
  216. color: #666666;
  217. &:last-child{
  218. background: rgba(28,184,177,0.2);
  219. padding: 0 8PX;
  220. border-radius: 3PX;
  221. color: #1CB8B1;
  222. margin-left: auto;
  223. display: flex;
  224. align-items: center;
  225. border-radius: 5PX;
  226. border-top-left-radius: 30px;
  227. i{
  228. display: inline-block;
  229. width: 10PX;
  230. height: 10PX;
  231. background: url("../../../../static/images/lawEnforcement/icon/individual_icon_02.png") no-repeat center;
  232. }
  233. }
  234. }
  235. }
  236. /deep/.van-cell__title span{
  237. font-family: Arial;
  238. font-size: 0.4rem;
  239. font-weight: normal;
  240. display: -webkit-box;
  241. -webkit-box-orient: vertical;
  242. -webkit-line-clamp: 1;
  243. word-break: break-all;
  244. overflow: hidden;
  245. }
  246. /deep/.van-cell__value{
  247. flex: 0.3;
  248. color: #1D6FE9;
  249. font-weight: bold;
  250. }
  251. /deep/.van-swipe-cell{
  252. margin-bottom: 0.2rem;
  253. border-radius: 0.2rem;
  254. overflow: hidden;
  255. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  256. }
  257. /deep/van-ellipsis{
  258. font-weight: bold;
  259. }
  260. .van-row{
  261. height: 100%;
  262. }
  263. .van-col{
  264. height: 100%;
  265. }
  266. .delete-button {
  267. height: 100%;
  268. }
  269. </style>