match.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <extend name="public/base"/>
  2. <block name="css">
  3. <style>
  4. .van-nav-bar--fixed {z-index:100;}
  5. .van-nav-bar .van-icon,.van-nav-bar__text {color:white;}
  6. .van-step--horizontal .van-step__title {font-size:16px;}
  7. .van-step--horizontal .van-step__icon {font-size:16px;}
  8. .van-step__circle {width:10px;height:10px;}
  9. .lw-list .list-item{padding:5px 10px;margin-top:10px;background:white;}
  10. .lw-list .list-content {display:flex;align-items:center;}
  11. .lw-list .list-content .list-left {width:50px;height:50px;}
  12. .lw-list .list-content .list-left img {width:50px;height:50px;}
  13. .lw-list .list-content .list-right {margin-left:20px;}
  14. .lw-list .list-content .list-right .name {color:black;height:30px;line-height:30px;}
  15. .lw-list .list-content .list-right .name .mobile {font-size:14px;color:var(--blue);}
  16. .lw-list .list-content .list-right .desc {color:#666;font-size:14px;height:20px;line-height:20px;}
  17. .lw-list .list-tool {border-top:1px solid #f8f9fb;margin-top:5px;display:flex;justify-content:flex-end;align-items:center;padding-top:5px;}
  18. .lw-list .list-tool .tool-btn {margin-left:5px;font-size:14px;border:1px solid #ccc;padding:5px 10px;border-radius:20px;color:#555;}
  19. .lw-list .list-tool .tool-btn.delete {border-color:var(--pink);color:var(--pink);}
  20. .lw-list .list-tool .tool-btn.match {border-color:var(--blue);color:var(--blue);}
  21. .show-tips {color:#999;padding:5px 10px;font-size:14px;}
  22. .show-tips .match-count {color:var(--pink);font-size:16px;font-weight:bold;}
  23. .show-tips .no-match {color:red;}
  24. .show-tips .match {color:var(--blue);}
  25. .table {width:100%;}
  26. .table td {border-bottom:1px solid #eee;height:40px;line-height:20px;padding-left:10px;}
  27. .table td.match {background:#99CCFF;}
  28. .table td.no-match {background:#FF9999;}
  29. </style>
  30. </block>
  31. <block name="body">
  32. <!--头部-->
  33. <van-nav-bar
  34. class="bg-pink"
  35. fixed="true"
  36. left-text="返回"
  37. @click-left="onBack"
  38. left-arrow
  39. >
  40. <template #title>
  41. <span style="color:white;">跟进记录</span>
  42. </template>
  43. </van-nav-bar>
  44. <div style="width:100%;height:46px;"></div>
  45. <van-tabs v-model="active" :before-change="onTab">
  46. <van-tab title="自有库"></van-tab>
  47. <van-tab title="其他红娘库"></van-tab>
  48. <van-tab title="妇联库"></van-tab>
  49. </van-tabs>
  50. <div class="lw-list">
  51. <div class="list-item" v-for="item in list">
  52. <div class="list-content">
  53. <div class="list-left">
  54. <img :src="dealAvatar(item.avatar,item.sex)" @click="showImage(item.avatar)" alt="">
  55. </div>
  56. <div class="list-right">
  57. <div class="name">{{item.realname}}
  58. <span v-if="active == 0 && item.mobile">({{item.mobile}})</span>
  59. <span class="mobile" v-if="active == 1">({{item.matchmaker.mobile}}【{{item.matchmaker.name}}】)</span>
  60. <span class="mobile" v-if="active == 2">(0595-88052395【妇联】)</span>
  61. </div>
  62. <div class="desc">编号:{{item.id}}</div>
  63. <div class="desc">匹配{{item.match_count}}项 • {{item.age}}岁 • {{dealHigh(item.high)}}</div>
  64. </div>
  65. </div>
  66. <div class="list-tool">
  67. <div class="tool-btn" @click="showInfo(item)">详情</div>
  68. </div>
  69. </div>
  70. </div>
  71. <van-empty description="暂无匹配记录" v-if="list.length == 0"></van-empty>
  72. <van-popup v-model="info_show" position="bottom" :style="{ height: '80%' }">
  73. <p class="show-tips">说明:共有<span class="match-count">{{info.match_count}}</span>项匹配成功,<span class="match">蓝色表示匹配成功</span>,<span class="no-match">红色表示未匹配成功</span>。</p>
  74. <table class="table" border="0" cellspacing="0" cellpadding="0">
  75. <tr>
  76. <td style="width:20%;"></td>
  77. <td style="width:30%;">配对人</td>
  78. <td style="width:50%;">要求</td>
  79. </tr>
  80. <tr>
  81. <td>姓名</td>
  82. <td>{{info.realname}}</td>
  83. <td>{{user.realname}}</td>
  84. </tr>
  85. <tr>
  86. <td>年龄</td>
  87. <td :class="isMatch('age')">{{info.age}}岁</td>
  88. <td :class="isMatch('age')">{{showMatingRange(mating.min_age,mating.max_age,'岁')}}</td>
  89. </tr>
  90. <tr>
  91. <td>身高</td>
  92. <td :class="isMatch('high')">{{info.high}}cm</td>
  93. <td :class="isMatch('high')">{{showMatingRange(mating.min_high,mating.max_high,'cm')}}</td>
  94. </tr>
  95. <tr>
  96. <td>体重</td>
  97. <td :class="isMatch('weight')">{{info.weight}}KG</td>
  98. <td :class="isMatch('weight')">{{showMatingRange(mating.min_weight,mating.max_weight,'KG')}}</td>
  99. </tr>
  100. <tr>
  101. <td>生肖(无意愿的生肖)</td>
  102. <td :class="isMatch('animal')">{{info.animal}}</td>
  103. <td :class="isMatch('animal')">{{mating.animal.join(',')}}</td>
  104. </tr>
  105. <tr>
  106. <td>籍贯</td>
  107. <td :class="isMatch('native')">{{info.native}}</td>
  108. <td :class="isMatch('native')">{{mating.native}}</td>
  109. </tr>
  110. <tr>
  111. <td>学历</td>
  112. <td :class="isMatch('education')">{{info.education}}</td>
  113. <td :class="isMatch('education')">{{mating.education}}</td>
  114. </tr>
  115. <tr>
  116. <td>年收入</td>
  117. <td :class="isMatch('income')">{{info.income}}</td>
  118. <td :class="isMatch('income')">{{mating.income}}</td>
  119. </tr>
  120. <tr>
  121. <td>是否有房</td>
  122. <td :class="isMatch('have_house')">{{tinyint[info.have_house]}}</td>
  123. <td :class="isMatch('have_house')">{{cond_tinyint[mating.have_house]}}</td>
  124. </tr>
  125. <tr>
  126. <td>是否有车</td>
  127. <td :class="isMatch('have_car')">{{tinyint[info.have_car]}}</td>
  128. <td :class="isMatch('have_car')">{{cond_tinyint[mating.have_car]}}</td>
  129. </tr>
  130. <tr>
  131. <td>婚后是否愿意与父母同住</td>
  132. <td :class="isMatch('with_parent_live')">{{tinyint[info.with_parent_live]}}</td>
  133. <td :class="isMatch('with_parent_live')">{{cond_tinyint[mating.with_parent_live]}}</td>
  134. </tr>
  135. <tr>
  136. <td>是否吸烟</td>
  137. <td :class="isMatch('smoke')">{{info.smoke}}</td>
  138. <td :class="isMatch('smoke')">{{mating.smoke}}</td>
  139. </tr>
  140. <tr>
  141. <td>是否喝酒</td>
  142. <td :class="isMatch('drink')">{{info.drink}}</td>
  143. <td :class="isMatch('drink')">{{mating.drink}}</td>
  144. </tr>
  145. <tr>
  146. <td>是否生育</td>
  147. <td :class="isMatch('want_birth')">{{tinyint[info.want_birth]}}</td>
  148. <td :class="isMatch('want_birth')">{{cond_tinyint[mating.want_birth]}}</td>
  149. </tr>
  150. <tr>
  151. <td>婚姻状况</td>
  152. <td>{{info.marry}}</td>
  153. <td></td>
  154. </tr>
  155. <tr>
  156. <td>居住地</td>
  157. <td>{{info.live_place}}</td>
  158. <td></td>
  159. </tr>
  160. <tr>
  161. <td>工作单位</td>
  162. <td>{{info.company}}</td>
  163. <td></td>
  164. </tr>
  165. <tr>
  166. <td>职务</td>
  167. <td>{{info.job}}</td>
  168. <td></td>
  169. </tr>
  170. <tr>
  171. <td>家庭成员</td>
  172. <td>{{info.family.join(',')}}</td>
  173. <td></td>
  174. </tr>
  175. <tr>
  176. <td>民族</td>
  177. <td>{{info.nation}}</td>
  178. <td></td>
  179. </tr>
  180. <tr>
  181. <td>兴趣爱好</td>
  182. <td>{{info.hobby}}</td>
  183. <td></td>
  184. </tr>
  185. </table>
  186. </van-popup>
  187. </block>
  188. <block name="script">
  189. <script>
  190. new Vue({
  191. el: '#app',
  192. data() {
  193. return {
  194. user:{$user},
  195. mating:{$mating},
  196. list: {$list},
  197. active: {$type},
  198. info: {match_arr:[],family:[]},
  199. info_show: false,
  200. tinyint: {$tinyint},
  201. cond_tinyint: {$cond_tinyint},
  202. };
  203. },
  204. methods: {
  205. onBack() {
  206. location.href = "{:url('index/index')}";
  207. },
  208. onTab(index) {
  209. location.href = "{:url('match')}?id={$id}&match_field={$match_field}&type=" + index;
  210. return false;
  211. },
  212. dealAvatar(avatar,sex) {
  213. if (avatar == '') {
  214. return '__TMPL__/public/assets/images/matchmaker/avatar' + sex + '.png'
  215. } else {
  216. return avatar;
  217. }
  218. },
  219. dealHigh(high) {
  220. return high ? high + 'CM' : '保密';
  221. },
  222. showInfo(item) {
  223. this.info = item;
  224. this.info_show = true;
  225. },
  226. showMatingRange(min,max,unit) {
  227. if (min === 0 && max === 0) {
  228. return '不限';
  229. } else if (min === 0) {
  230. return max + unit + '以下';
  231. } else if (max === 0) {
  232. return min + unit + '以上';
  233. } else {
  234. return min + ' - ' + max + unit;
  235. }
  236. },
  237. isMatch(value) {
  238. const match = this.info.match_arr.includes(value)
  239. return match ? 'match' : 'no-match';
  240. },
  241. showImage(avatar) {
  242. if (avatar != '') {
  243. vant.ImagePreview([avatar]);
  244. }
  245. }
  246. },
  247. computed: {
  248. }
  249. });
  250. </script>
  251. </block>