retrieval.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="main main-bg">
  3. <view class="header">
  4. <u-form :model="form" ref="uForm" :rules="rules">
  5. <u-form-item
  6. label="姓名"
  7. label-width="180"
  8. :label-position="labelPosition"
  9. >
  10. <u-input
  11. v-model="form.veteransName"
  12. placeholder-style="color: #2E4F1C;"
  13. placeholder="请输入姓名" />
  14. </u-form-item>
  15. <u-form-item
  16. label="电话"
  17. label-width="180"
  18. :label-position="labelPosition"
  19. >
  20. <view class="form-item">
  21. <u-input
  22. v-model="form.veteransTel"
  23. placeholder-style="color: #2E4F1C;"
  24. placeholder="请输入电话" />
  25. </view>
  26. </u-form-item>
  27. <u-form-item
  28. label="身份证号"
  29. label-width="180"
  30. :label-position="labelPosition"
  31. >
  32. <view class="form-item">
  33. <u-input
  34. v-model="form.veteransIdcard"
  35. placeholder-style="color: #2E4F1C;"
  36. placeholder="请输入身份证号" />
  37. </view>
  38. </u-form-item>
  39. <u-form-item
  40. label="家庭住址"
  41. label-width="180"
  42. :label-position="labelPosition"
  43. >
  44. <view class="form-item">
  45. <u-input
  46. v-model="form.address"
  47. placeholder-style="color: #2E4F1C;"
  48. placeholder="请输入家庭住址" />
  49. </view>
  50. </u-form-item>
  51. </u-form>
  52. <view @click="submit" class="form-submit">确认</view>
  53. </view>
  54. <!-- <view class="footer" v-if="list.length> 0">
  55. <view class="item" v-for="(item,index) in list" @click="handleMap(item.veteransId)">
  56. <view class="item-header">
  57. <view class="font-color2">{{ item.veteransName }}</view>
  58. <view class="font-color2">{{ item.veteransIdcard ? change(item.veteransIdcard) : '-' }}</view>
  59. </view>
  60. <view class="font-color2">地址: {{ item.address ? item.address : '-' }} </view>
  61. </view>
  62. </view>
  63. <view class="footer" v-else>
  64. <u-empty text="暂无数据" mode="list"></u-empty>
  65. </view> -->
  66. <u-toast ref="uToast" />
  67. </view>
  68. </template>
  69. <script>
  70. import server from "@/api/index";
  71. export default {
  72. data() {
  73. return {
  74. labelPosition: 'left',
  75. list: [],
  76. form: {
  77. veteransName: '',
  78. veteransTel: '',
  79. veteransIdcard: '',
  80. address: '',
  81. },
  82. }
  83. },
  84. onLoad() {
  85. },
  86. methods:{
  87. submit() {
  88. let _this = this;
  89. console.log(this.form)
  90. if(this.form.veteransName || this.form.veteransTel || this.form.veteransIdcard || this.form.address){
  91. uni.navigateTo({
  92. url: '/pages/manage/account/map?name=' + this.form.veteransName + '&tel=' + this.form.veteransTel + '&idCard=' + this.form.veteransIdcard + '&address=' + this.form.address
  93. })
  94. }else{
  95. _this.$refs.uToast.show({
  96. title: '请输入查询条件!',
  97. type: 'default',
  98. });
  99. }
  100. // server.getInfoList(this.form).then(res =>{
  101. // this.list = res
  102. // })
  103. },
  104. // handleMap(id){
  105. // uni.navigateTo({
  106. // url: '/pages/manage/account/map?id=' + id
  107. // })
  108. // },
  109. change(name){
  110. let mystr = name.substring(0,6)+'****'+name.substring(10);
  111. return mystr
  112. },
  113. },
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. /deep/ .u-list-item{
  118. margin: 0rpx 0rpx 0rpx 16rpx!important;
  119. }
  120. /deep/ .u-icon__icon{
  121. position: relative;
  122. // color: #2E4F1C!important;
  123. // color: #FFFFFF!important;
  124. }
  125. /deep/ .u-form-item__message{
  126. padding-right: 0rpx!important;
  127. text-align: right;
  128. }
  129. /deep/ .u-input__input{
  130. color: #2E4F1C!important;
  131. font-size: 28rpx;
  132. font-family: PingFangSC-Regular, PingFang SC;
  133. font-weight: 400;
  134. text-align: right;
  135. }
  136. /deep/ .u-border, .u-border-bottom, .u-border-left, .u-border-right, .u-border-top, .u-border-top-bottom{
  137. }
  138. /deep/ .u-form-item{
  139. display: -webkit-box;
  140. display: -webkit-flex;
  141. display: flex;
  142. -webkit-box-orient: horizontal;
  143. -webkit-box-direction: normal;
  144. -webkit-flex-direction: row;
  145. flex-direction: row;
  146. box-sizing: border-box;
  147. line-height: 80rpx;
  148. -webkit-flex-direction: column;
  149. flex-direction: column;
  150. background: rgba(46, 79, 28, 0.13);
  151. border-radius: 24rpx;
  152. margin-bottom: 20rpx;
  153. padding-left: 30rpx!important;
  154. padding-right: 30rpx!important;
  155. }
  156. .main{
  157. width: 100%;
  158. height: 100vh;
  159. min-height: 100vh;
  160. padding: 30rpx 30rpx 30rpx;
  161. .header{
  162. width: 100%;
  163. height: 640rpx;
  164. }
  165. // .footer{
  166. // width: 100%;
  167. // height: calc(100% - 640rpx);
  168. // overflow: auto;
  169. // .item{
  170. // width: 100%;
  171. // height: auto;
  172. // margin-bottom: 30rpx;
  173. // padding: 20rpx;
  174. // background: rgba(255,255,255, 1);
  175. // border-radius: 16rpx;
  176. // .item-header{
  177. // display: flex;
  178. // justify-content: space-between;
  179. // padding-bottom: 15rpx;
  180. // }
  181. // }
  182. // }
  183. .form-submit{
  184. margin: 30rpx auto;
  185. width: 570rpx;
  186. height: 96rpx;
  187. line-height: 96rpx;
  188. background: #2E4F1C;
  189. border-radius: 49rpx;
  190. font-size: 36rpx;
  191. text-align: center;
  192. font-family: PingFangSC-Medium, PingFang SC;
  193. font-weight: 500;
  194. color: #fff;
  195. }
  196. }
  197. </style>