resident.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. <template>
  2. <view class="index">
  3. <!-- <view class="sous">
  4. <view style="display: flex;">
  5. <input type="text" value="" v-model="params.userName" placeholder="请输入姓名或身份证号进行查询" class="input" />
  6. <button @click="Seach">查询</button>
  7. </view>
  8. </view> -->
  9. <!-- <p style="height: 28upx; background-color: #f2f2f2;"></p> -->
  10. <view class="tab">
  11. <!-- //表格 -->
  12. <view class="exele">
  13. <view class="box">
  14. <table @change="change">
  15. <tr class="tr_one">
  16. <!-- <th style="width: 130upx; text-align: center;">编号</th> -->
  17. <th style="width: 100upx; text-align: center;">姓名</th>
  18. <th style="width: 80upx; text-align: center;">性别</th>
  19. <th style="width: 270upx; text-align: center;">身份证号</th>
  20. <th style="width: 170upx; text-align: center;">联系方式</th>
  21. <!-- <th style="width: 100upx;">联系方式</th> -->
  22. <th style="width: 50upx; text-align: center;">操作</th>
  23. <!-- <th style="width: 60upx;">查看</th> -->
  24. </tr>
  25. <scroll-view scroll-y class="scroll-view" upper-threshold="40" lower-threshold="40" @scrolltolower="bot_btn">
  26. <tr v-for="(item,index) in list" :key="index" :class=" [index%2 ==0 ? 'two_tr two_trtwo':'two_tr']" @click="chakn(item)">
  27. <!-- <td style="width: 130upx; text-align: center;" >{{ item.code == null ? '暂无信息' : item.code}}</td> -->
  28. <td style="width: 100upx; text-align: center;" >{{ item.userName == null ? '暂无信息' : item.userName}}</td>
  29. <td style="width: 80upx; text-align: center;" >{{ item.gender == null ? '暂无信息' : item.gender}}</td>
  30. <!-- <td style="width: 40upx; text-align: center;">{{item.gender == null? '暂无信息' : item.gender }}</td> -->
  31. <td style="width: 270upx; text-align: center;">{{item.idCard == null? '暂无信息' : item.idCard }}</td>
  32. <td style="width: 170upx; text-align: center;" >{{ item.phoneNum == null? '暂无信息' : item.phoneNum}}</td>
  33. <!-- <td style="width: 100upx;" :class="[item.phone == '' ? 'tdse' : '' ]" >{{ item.phone == ''? '未完善' : item.phone}}</td> -->
  34. <!-- <td style="width: 100upx; text-align: center;" :class="[item.addtime == null ? 'tdse' : item.addtime == ''? 'tdse' : '' ]">{{ item.addtime ==null ? '未完善' : item.addtime==''? '未完善' : item.addtime}}</td> -->
  35. <!-- <td style="width: 50upx;" class="coiu" @click.stop="dele(item.id)">删除</td> -->
  36. <td style="width: 50upx; color: #32B16C;" @click.stop="goDetail(item.id)">查看</td>
  37. </tr>
  38. <div class="shax" v-if="list.length>0">
  39. {{wtdt}}
  40. </div>
  41. <div class="zanwu " v-else><span>暂无数据</span></div>
  42. </scroll-view>
  43. </table>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 弹窗 -->
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. upimg:require("@/static/image/up.png"),
  55. activeTab: 0, //tab切换
  56. //列表数据
  57. list: [],
  58. show: false,
  59. actions: [{
  60. name: '102',
  61. }],
  62. totalNum1: 0,
  63. totalNum2: 0,
  64. totalNum3: 0,
  65. titleBarHeight: 0,
  66. statusBarHeight: 0,
  67. tabsta: [{
  68. "text": '全部',
  69. "nume": 0
  70. },
  71. {
  72. "text": '已认领',
  73. "nume": 0
  74. },
  75. {
  76. "text": '未认领',
  77. "nume": 0
  78. },
  79. ],
  80. currentTab: 0, //tab切换
  81. Collected: false, //判断已采集未采集 false 已采集 true未采集
  82. params: { //上拉刷新
  83. pageNum: 1,
  84. pageSize: 30,
  85. queryType:''
  86. },
  87. paramstwo: {
  88. studentName: '', //查询
  89. // complate: '',
  90. // classId:'',
  91. deptId: ''
  92. },
  93. keyword: '',
  94. haveMore: true,
  95. wtdt: '上拉加载更多',
  96. terd: '',
  97. stuList: {}, //学生人数
  98. shoue: false,
  99. listShow: true, //判断是否有数据 true 有
  100. areaList: {}, //班级数据
  101. xuan: ['请选择', '请选择', '请选择'],
  102. columns: [
  103. ],
  104. cites: [],
  105. tehu: '请选择班级',
  106. companyId: '',
  107. arrbq: [],
  108. startDate:'选择开始时间',
  109. endDate:'选择结束时间',
  110. showtime:false,
  111. minDate:0 ,
  112. maxDate: 0,
  113. currentDate: 0,
  114. shwtie:0,
  115. baseurl:'',
  116. };
  117. },
  118. onShow() {
  119. let type = uni.getStorageSync('token')
  120. if (!type) {
  121. uni.redirectTo({
  122. url: '/pages/load/roles'
  123. })
  124. }
  125. },
  126. onLoad(e) {
  127. if(e.type=='add'){
  128. // 增加
  129. this.baseurl='boman-web-core/core/czrk/listByXz'
  130. }else{
  131. // 减少
  132. this.baseurl='boman-web-core/core/czrk/listByJs'
  133. }
  134. this.params.queryType=e.query
  135. this.params.pageNum = 1
  136. this.list = []
  137. // 修改 获取列表的
  138. // 获取统计
  139. this.lists(this.params)
  140. },
  141. created() {
  142. },
  143. //下拉刷新
  144. onPullDownRefresh() {
  145. wx.showNavigationBarLoading()
  146. this.params.pageNum = 1
  147. this.shwtie = 0
  148. this.params = { //上拉刷新
  149. pageSize: 30,
  150. pageNum: 1,
  151. }, //查询
  152. this.keyword = ''
  153. this.list = []
  154. },
  155. methods: {
  156. goDetail(id) {
  157. uni.navigateTo({
  158. url: '/pages/resident/residentdetail?id=' + id
  159. })
  160. },
  161. //查询列表
  162. lists(params) {
  163. var baseurl=this.baseurl
  164. this.$http.get(baseurl, params).then(res => {
  165. //停止下拉加载
  166. uni.hideNavigationBarLoading()
  167. uni.stopPullDownRefresh()
  168. if (res.code == 200) {
  169. if (res.rows.length < params.pageSize) {
  170. this.haveMore = false
  171. this.wtdt='到底了~';
  172. } else {
  173. var num=parseInt(res.rows.length)+parseInt(params.pageSize)*parseInt(params.pageNum-1)
  174. if(num<res.total){
  175. this.haveMore = true
  176. this.wtdt='上拉加载更多'
  177. }else{
  178. this.haveMore = false
  179. this.wtdt='到底了~';
  180. }
  181. }
  182. if(params.pageSize==1){
  183. this.list = res.rows
  184. }else{
  185. this.list = this.list.concat(res.rows)
  186. }
  187. } else {
  188. uni.showToast({
  189. title: res.msg,
  190. duration: 1000,
  191. icon: 'none'
  192. });
  193. }
  194. })
  195. },
  196. //刷新
  197. bot_btn() {
  198. if (this.haveMore) {
  199. this.params.pageNum++
  200. this.lists(this.params)
  201. }
  202. },
  203. //查看
  204. chakn(item) {
  205. // console.log(id.id,id.pid)
  206. // console.log(34)
  207. // uni.setStorageSync('item', item)
  208. // wx.navigateTo({
  209. // url: '/pages/home/recordtwo'
  210. // })
  211. },
  212. // 删除
  213. //搜索
  214. Seach() {
  215. this.list = []
  216. this.params.pageNum = 1
  217. // this.studentnum(this.paramstwo)
  218. this.lists(this.params)
  219. },
  220. onClose(picker, value, index) {
  221. this.show = false
  222. // console.log(value)
  223. // this.showscho = false;
  224. },
  225. onChange(event) {
  226. // console.log(event)
  227. const {
  228. picker,
  229. value,
  230. index
  231. } = event.detail;
  232. if (index == 0) {
  233. // console.log(this.cites[0])
  234. picker.setColumnValues(1, value[0].children);
  235. picker.setColumnValues(2, value[0].children[0].children);
  236. picker.setColumnValues(3, value[0].children[0].children[0].children);
  237. } else if (event.detail.index == 1) {
  238. picker.setColumnValues(2, value[1].children);
  239. } else if (event.detail.index == 2) {
  240. picker.setColumnValues(3, value[2].children);
  241. } else if (event.detail.index == 3) {
  242. picker.setColumnValues(3, value[2].children);
  243. }
  244. },
  245. onCancel() {
  246. this.show = false
  247. },
  248. onConfirm(value) {
  249. // console.log(value.detail)
  250. // console.log(value.detail.value[1])
  251. // classId this.cites
  252. // let ir = value.detail.index.pop()
  253. // console.log(ir)
  254. this.deptId = value.detail.value[value.detail.index.length - 1].id
  255. this.tehu = value.detail.value[value.detail.index.length - 1].label
  256. // console.log(this.deptId)
  257. this.paramstwo.deptId = value.detail.value[value.detail.index.length - 1].id
  258. this.params.deptId = value.detail.value[value.detail.index.length - 1].id
  259. // console.log(this.params.classId )
  260. this.list = []
  261. this.params.pageNum = 1
  262. // this.studentnum(this.paramstwo)
  263. this.lists(this.params)
  264. this.gender_index = 1
  265. this.case_index = 1
  266. this.show = false
  267. },
  268. // 获取手机高度
  269. screen() {
  270. const _this = this
  271. uni.getSystemInfo({
  272. success: function(res) {
  273. let platform = res.platform
  274. let totalTopHeight = 68
  275. if (res.model.indexOf('iPhone X') !== -1) {
  276. totalTopHeight = 88
  277. } else if (res.model.indexOf('iPhone') !== -1) {
  278. totalTopHeight = 64
  279. }
  280. _this.statusBarHeight = res.statusBarHeight
  281. _this.titleBarHeight = totalTopHeight - res.statusBarHeight
  282. },
  283. failure() {
  284. _this.statusBarHeight = 0
  285. _this.titleBarHeight = 0
  286. }
  287. });
  288. },
  289. //弹
  290. changeTab(index){
  291. this.currentTab = index
  292. if(index == 0){
  293. this.params.ryrl = undefined
  294. }else if(index == 1){
  295. // 已接种
  296. this.params.ryrl = "true"
  297. }else if(index == 2){
  298. // 未接种
  299. this.params.ryrl = "false"
  300. }
  301. this.params.pageNum=1;
  302. this.list = []
  303. this.lists(this.params)
  304. },
  305. onSelect(event) {
  306. // console.log(event.detail);
  307. },
  308. formatter(type, value){
  309. if (type === 'year') {
  310. return `${value}年`;
  311. } else if (type === 'month') {
  312. return `${value}月`;
  313. }
  314. return value;
  315. },
  316. // 点击新增
  317. addVacFrom () {
  318. uni.navigateTo({
  319. url: '/add/pages/addvacfrom/addpeople'
  320. })
  321. }
  322. }
  323. }
  324. </script>
  325. <style lang="scss" scoped>
  326. .address{
  327. display: flex;align-items: center;
  328. .adds{
  329. display: flex;align-items: center;justify-content: center;padding:20rpx 12rpx;width: 180rpx;box-sizing: border-box;
  330. .addsa{font-size: 26rpx;color: #333333;
  331. }
  332. .addsimg{width: 14rpx;height: 10rpx;margin-left: 16rpx;transition: all 0.3s;}
  333. }
  334. }
  335. .coie{
  336. width: 100%;
  337. box-sizing: border-box;
  338. padding: 0 33upx;
  339. .coie_nav{
  340. border-top: 1upx solid #E5E5E5;
  341. display: flex;
  342. flex-wrap: wrap;
  343. padding-bottom: 28upx;
  344. p{
  345. width: 33.33%;
  346. text-align: center;
  347. display: flex;
  348. flex-direction: column;
  349. margin-top: 53upx;
  350. span{
  351. font-size: 28upx;
  352. }
  353. i{
  354. font-size: 28upx;
  355. color: #333;
  356. margin-top: 28upx;
  357. }
  358. }
  359. }
  360. }
  361. .ieju{
  362. height: 17upx;
  363. width: 100%;
  364. background-color: #eee;
  365. margin-bottom: 33upx;
  366. }
  367. //暂无数据
  368. .zanwu {
  369. text-align: center;
  370. padding-top: 20upx;
  371. span {
  372. font-size: 24upx;
  373. }
  374. }
  375. .scroll-view {
  376. max-height: calc(100vh - 150upx);
  377. }
  378. .shax {
  379. // height: 83upx;
  380. font-size: 25upx;
  381. color: #666;
  382. text-align: center;
  383. }
  384. .index {
  385. // padding-top: 33upx;
  386. max-height: 100vh;
  387. .sous {
  388. padding: 24upx 33upx;
  389. // display: flex;
  390. .input {
  391. height: 90upx;
  392. border: 1upx solid #E5E5E5;
  393. flex: 1;
  394. margin-right: 28upx;
  395. padding-left: 10upx;
  396. box-sizing: border-box;
  397. }
  398. button {
  399. // width: 125upx;
  400. height: 90upx;
  401. background-color: #1678FF;
  402. text-size: 28upx;
  403. color: #fff;
  404. text-align: center;
  405. line-height: 90upx;
  406. }
  407. }
  408. //tab
  409. .tab {
  410. padding-top:33upx;
  411. .tabs {
  412. display: flex;
  413. padding: 0 20upx;
  414. box-sizing: border-box;
  415. height: 111upx;
  416. justify-content: space-between;
  417. box-shadow: 0px 7px 7px 0px rgba(229, 229, 229, 0.5);
  418. .one_tab {
  419. color: #1678FF !important;
  420. // width: 140upx;
  421. // text-align: center;
  422. // .twotabs {
  423. // font-size: 31upx;
  424. // color: #666666;
  425. // ;
  426. // font-weight: 500;
  427. // }
  428. // .twosrtabs {
  429. // color: #1678FF;
  430. // }
  431. // .twotabstwo {
  432. // font-size: 24upx;
  433. // color: #AAAAAA;
  434. // }
  435. }
  436. .one_tabqie {
  437. border-bottom: 8upx solid #1678FF;
  438. }
  439. }
  440. }
  441. //表格
  442. .exele {
  443. .box {
  444. .tr_one {
  445. display: flex;
  446. padding: 0 20upx;
  447. box-sizing: border-box;
  448. justify-content: space-between;
  449. th {
  450. // flex: 1;
  451. font-size: 24upx;
  452. font-family: PingFang SC;
  453. font-weight: 500;
  454. color: #333333;
  455. line-height: 14upx;
  456. overflow: hidden;
  457. text-overflow: ellipsis;
  458. white-space: nowrap;
  459. line-height: 83upx;
  460. height: 83upx;
  461. }
  462. }
  463. .two_tr {
  464. display: flex;
  465. padding: 0 20upx;
  466. box-sizing: border-box;
  467. justify-content: space-between;
  468. td {
  469. // flex: 1;
  470. font-size: 24upx;
  471. font-family: PingFang SC;
  472. font-weight: 500;
  473. color: #333333;
  474. line-height: 83upx;
  475. height: 83upx;
  476. overflow: hidden;
  477. text-overflow: ellipsis;
  478. white-space: nowrap;
  479. }
  480. .tdse {
  481. color: #E60012 !important;
  482. }
  483. .apply_span_xl{
  484. color: #32B16C !important;
  485. }
  486. .apply_span_xltwo{
  487. color: #ffa200 !important;
  488. }
  489. .apply_span_xlfive{
  490. color: #4c4b4b !important;
  491. }
  492. .apply_span_xlthreo{
  493. color: #f00404 !important;
  494. }
  495. .apply_span_xlforu{
  496. color: #aaaaaa !important;
  497. }
  498. // .apply_span_xla{
  499. // color: #1678FF;
  500. // text-decoration: underline ;
  501. // }
  502. .coiu {
  503. color: #EC1717;
  504. }
  505. }
  506. .two_trtwo {
  507. background-color: #EBEFF2;
  508. }
  509. }
  510. }
  511. }
  512. .banj {
  513. height: 86upx;
  514. width: 100%;
  515. // text-align: center;
  516. line-height: 86upx;
  517. // background-color: #F6F9FC;
  518. color: #AAAAAA;
  519. margin-top: 20upx;
  520. display: flex;
  521. justify-content: space-around;
  522. }
  523. .apply_box{
  524. .apply_item_input{
  525. padding: 0 33upx;
  526. // border-top: 1upx solid #F4F4F4;
  527. display: flex;
  528. height: 68upx;
  529. align-items: center;
  530. .apply_span_x{
  531. font-size: 28upx;
  532. color: #363535;
  533. span{
  534. color: #F22346;
  535. }
  536. }
  537. .input_r{
  538. font-size: 28upx;
  539. height: 100%;
  540. flex: 1;
  541. text-align: right;
  542. }
  543. .input_rtwo{
  544. line-height:68upx;
  545. }
  546. .input_rtwoss{
  547. color: #1678FF;
  548. }
  549. .input_rtwosss{
  550. color: #FF0000;
  551. }
  552. }
  553. .apply_title_jt{
  554. height: 130upx;
  555. border-top: 1upx solid #F4F4F4;
  556. display: flex;
  557. justify-content: space-between;
  558. align-items: center;
  559. padding: 0 32upx;
  560. span{
  561. font-size: 36upx;
  562. color: #333;
  563. font-weight: bold;
  564. }
  565. .apply_title_btn{
  566. width: 160upx;
  567. height: 60upx;
  568. font-size: 24upx;
  569. color: #fff;
  570. display: flex;
  571. justify-content: center;
  572. align-items: center;
  573. background: #FF568C;
  574. border-radius: 8upx;
  575. .img{
  576. width: 30upx;
  577. height: 30upx;
  578. margin-right: 10upx;
  579. }
  580. }
  581. }
  582. .apply_title_jts{
  583. border:none;
  584. }
  585. .apply_title_jt_item{
  586. border-bottom: 9upx solid #F4F4F4;
  587. .apply_item_input_qx{
  588. color: #FF5185;
  589. height: 100%;
  590. display: flex;
  591. justify-content: center;
  592. align-items: center;
  593. height: 112upx;
  594. font-size: 30upx;
  595. }
  596. }
  597. .apply_item_sfz{
  598. padding: 42upx 20upx;
  599. border-bottom: 9upx solid #F4F4F4;
  600. .apply_item_sfz_title{
  601. font-weight: bold;
  602. font-size: 34upx;
  603. margin-bottom: 40upx;
  604. margin-left: 2upx;
  605. }
  606. .apply_item_phones{
  607. display: flex;
  608. justify-content: space-between;
  609. .apply_item_phone{
  610. width: 340upx;
  611. height: 218upx;
  612. .img{
  613. width: 100%;
  614. height: 100%;
  615. border-radius: 20upx;
  616. }
  617. }
  618. }
  619. }
  620. .apply_item_zdxx{
  621. padding: 0 26upx;
  622. font-size: 34upx;
  623. font-weight: bold;
  624. color: #333;
  625. height: 112upx;
  626. line-height: 112upx;
  627. border: 1upx solid #F4F4F4;
  628. }
  629. .qt_div{
  630. height: 112upx;
  631. border-top: 1upx solid #F4F4F4;
  632. padding: 0 32upx;
  633. border-bottom: 9upx solid #F9F9F9;
  634. .input_l{
  635. height: 100%;
  636. font-size: 30upx;
  637. }
  638. }
  639. }
  640. .tabld{
  641. display: flex;
  642. // height: 90upx;
  643. box-shadow: 0px 7px 5px 0px rgba(218, 218, 218, 0.35);
  644. view {
  645. font-size:26upx ;
  646. font-family: PingFang SC;
  647. font-weight: 500;
  648. color: #191919;
  649. text-align: center;
  650. flex: 1;
  651. // line-height: 70upx;
  652. display: flex;
  653. flex-direction: column;
  654. padding: 18rpx 0 20rpx;
  655. }
  656. .one_tabhu{
  657. color: #009FE8;
  658. position: relative;
  659. ::after{width: 28rpx;height: 6rpx;background: #009FE8;position: absolute;left: 50%;margin-left: -14rpx;bottom: 0;content: "";}
  660. }
  661. }
  662. .nbhe{
  663. display: flex;
  664. margin-bottom: 44upx;
  665. p{
  666. font-size: 25upx;
  667. flex: 1;
  668. padding: 0 77upx;
  669. display: flex;
  670. align-items: center;
  671. }
  672. p:nth-child(2){
  673. justify-content: flex-end;
  674. }
  675. img{
  676. width: 31upx;
  677. height: 29upx;
  678. margin-right: 11upx;
  679. }
  680. }
  681. .xinse{
  682. position: fixed;
  683. width: 100%;
  684. bottom: 0;
  685. left: 0;
  686. font-size: 33upx;
  687. font-family: PingFang SC;
  688. font-weight: 500;
  689. color: #FFFFFF;
  690. height: 90upx;
  691. background-color: #00B034;
  692. text-align: center;
  693. line-height: 90upx;
  694. }
  695. </style>