list.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <view class="app-main app-content">
  3. <view style="width:100%;font-size:40upx;font-weight:bold;text-align: center;padding-top:30upx;padding-bottom:40upx;background-color: white;">失信人员查询系统</view>
  4. <view style="background-color: white;">
  5. <view style="width:100%;">
  6. <button class="admin-button-com big" :class="[searchType == 0 ? 'blue' : '']" style="margin-left:2%;" @click="changeSearch(0)">手机号</button>
  7. <button class="admin-button-com big" :class="[searchType == 1 ? 'blue' : '']" style="margin-left:10upx;" @click="changeSearch(1)">微信号</button>
  8. <button class="admin-button-com big" :class="[searchType == 2 ? 'blue' : '']" style="margin-left:10upx;" @click="changeSearch(2)">身份证</button>
  9. <button class="admin-button-com big red" style="margin-right:2%;float: right;border: 1upx solid #3385FF;color:white;background-color:#3385FF;" @click="add()">新 增</button>
  10. </view>
  11. <view style="width:100%;text-align: center;padding-bottom:30upx;margin-top:10upx;">
  12. <input v-model="search" name="search" ref="searchRef" type="text" placeholder="这里搜索" @input="goSearch()" @focus="clearSearch()"
  13. style="border:1upx solid #CCCCCC;width:96%;border-radius: 10upx;height:90upx;margin:0 auto;text-align: left;padding-left:15upx;font-size:32upx;" />
  14. <view style="width:100%;font-size:30upx;color:black;margin:30upx 0 5upx 2%;text-align: left;font-size:32upx;">
  15. <text>失信人员 {{totalUserNum}}人</text>
  16. <text style="float:right;color:#3385FF;text-decoration: underline;margin-right:40upx;" @click.stop="goMy()">我提交的记录</text>
  17. </view>
  18. </view>
  19. </view>
  20. <div class="list-wrap">
  21. <block v-if="!$util.isEmpty(list.data)">
  22. <div class="list" v-for="(item, index) in list.data" :key="index">
  23. <llUser :item="item"></llUser>
  24. </div>
  25. </block>
  26. <block v-else>
  27. <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  28. </block>
  29. </div>
  30. </view>
  31. </template>
  32. <script>
  33. import NotLogin from "@/components/not-login";
  34. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  35. import ModalModule from "@/components/plugin/modal";
  36. import { list } from "@/mixins";
  37. import { mapGetters } from "vuex";
  38. import { getUserList} from "@/api/ll";
  39. import AppSearchModule from "@/components/module/app-search";
  40. import DropShopSelect from "@/components/module/shopSelect";
  41. import llUser from "./components/user";
  42. import DateSelect from "@/components/module/dateSelect";
  43. export default {
  44. name: "list",
  45. components: {
  46. AppWrapperEmpty,
  47. ModalModule,
  48. AppSearchModule,
  49. DropShopSelect,
  50. llUser,
  51. DateSelect,
  52. NotLogin
  53. },
  54. mixins: [list],
  55. computed: {
  56. ...mapGetters({ loginInfo: "getLoginInfo"})
  57. },
  58. data() {
  59. return {
  60. search:'',
  61. searchType:0,
  62. totalUserNum:0,
  63. T:null,
  64. loginStyle :0
  65. };
  66. },
  67. onPullDownRefresh() {
  68. this.resetList();
  69. this.getList()
  70. uni.stopPullDownRefresh()
  71. },
  72. onReachBottom() {
  73. if (!this.list.finished) {
  74. this.getList().then((res) => {
  75. uni.stopPullDownRefresh();
  76. });
  77. } else {
  78. uni.stopPullDownRefresh();
  79. }
  80. },
  81. onLoad() {
  82. this.getList()
  83. },
  84. onShow () {
  85. if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
  86. this.loginStyle = 1
  87. }
  88. },
  89. watch: {
  90. loginInfo(newVal) {
  91. if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
  92. this.loginStyle = 1
  93. }
  94. }
  95. },
  96. methods: {
  97. goSearch(){
  98. let that = this
  99. if(this.T != null){
  100. clearTimeout(this.T)
  101. }
  102. this.T = setTimeout(function(){
  103. that.resetList()
  104. that.getList()
  105. },800)
  106. },
  107. changeSearch(type){
  108. this.searchType = type
  109. this.search = ''
  110. this.resetList()
  111. },
  112. clearSearch(){
  113. this.search = ''
  114. this.resetList()
  115. },
  116. goMy(){
  117. if(this.loginStyle == 0){
  118. this.$util.confirmModal({content:'请先登录'},() => {
  119. this.$util.pageTo({url: "/admin/home/login?fromType=2",type:2})
  120. })
  121. }else{
  122. this.$util.pageTo({url:"/admin/ll/myEventList"})
  123. }
  124. },
  125. add(){
  126. if(this.loginStyle == 0){
  127. this.$util.confirmModal({content:'请先登录'},() => {
  128. this.$util.pageTo({url: "/admin/home/login?fromType=2",type:2})
  129. })
  130. }else{
  131. this.$util.pageTo({url:"/admin/ll/add"})
  132. }
  133. },
  134. init(){
  135. },
  136. getList() {
  137. return getUserList({search:this.search,searchType:this.searchType}).then(res => {
  138. this.totalUserNum = res.data.totalUserNum ? res.data.totalUserNum : 0
  139. this.completes(res)
  140. if (this.$util.isEmpty(res.data)){
  141. return false
  142. }
  143. })
  144. }
  145. }
  146. };
  147. </script>
  148. <style lang="scss" scoped>
  149. page{
  150. width: 750upx;
  151. overflow: hidden;
  152. }
  153. .app-content {
  154. padding-bottom: 1upx;
  155. overflow: hidden;
  156. .select-dn_bx {
  157. padding-left: 18upx;
  158. }
  159. .app-tabs {
  160. position: fixed;
  161. /* 手机mobile屏幕小于1000px */
  162. @media screen and (max-width: 1100px) {
  163. width: 100%;
  164. }
  165. /* 收银台cashier屏幕大于1000px */
  166. @media screen and (min-width:1100px) {
  167. width: 40%;
  168. }
  169. z-index: 9;
  170. }
  171. .input-wrap_box {
  172. background-color: #fff;
  173. position: fixed;
  174. top: 0;
  175. z-index: 10;
  176. /* 手机mobile屏幕小于1000px */
  177. @media screen and (max-width: 1100px) {
  178. width: 100%;
  179. }
  180. /* 收银台cashier屏幕大于1000px */
  181. @media screen and (min-width:1100px) {
  182. width: 40%;
  183. }
  184. height: 100upx;
  185. display: flex;
  186. align-items: center;
  187. padding: 0 30upx;
  188. & > view:nth-child(2) {
  189. flex: 1;
  190. }
  191. }
  192. .list-wrap {
  193. padding-top:25upx;
  194. .list {
  195. background-color: #fff;
  196. margin-bottom: 20upx;
  197. }
  198. }
  199. .app-footer {
  200. justify-content: flex-end;
  201. }
  202. }
  203. .upload-confirm-wrap {
  204. max-height: 600upx;
  205. overflow-y: auto;
  206. .modal-tit {
  207. @include disFlex(center, center);
  208. font-size: 40upx;
  209. margin-top: 30upx;
  210. margin-bottom: 50upx;
  211. .iconfont {
  212. color: #09bb07;
  213. margin-right: 20upx;
  214. font-size: 50upx;
  215. }
  216. }
  217. .sel-wrap {
  218. color: $fontColor2;
  219. font-size: 32upx;
  220. .sel-tit {
  221. text-align: left;
  222. }
  223. .sel-btn {
  224. @include disFlex(center, flex-start);
  225. flex-wrap: wrap;
  226. padding: 10upx 0 40upx;
  227. }
  228. }
  229. }
  230. </style>