match.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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)" 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-88150395【妇联】)</span>
  61. </div>
  62. <div class="desc">匹配{{item.match_count}}项 • {{item.age}}岁 • {{dealHigh(item.high)}}</div>
  63. </div>
  64. </div>
  65. <div class="list-tool">
  66. <div class="tool-btn" @click="showInfo(item)">详情</div>
  67. </div>
  68. </div>
  69. </div>
  70. <van-empty description="暂无匹配记录" v-if="list.length == 0"></van-empty>
  71. <van-popup v-model="info_show" position="bottom" :style="{ height: '80%' }">
  72. <p class="show-tips">说明:共有<span class="match-count">{{info.match_count}}</span>项匹配成功,<span class="match">蓝色表示匹配成功</span>,<span class="no-match">红色表示未匹配成功</span>。</p>
  73. <table class="table" border="0" cellspacing="0" cellpadding="0">
  74. <tr>
  75. <td style="width:20%;"></td>
  76. <td style="width:30%;">配对人</td>
  77. <td style="width:50%;">要求</td>
  78. </tr>
  79. <tr>
  80. <td>姓名</td>
  81. <td>{{info.realname}}</td>
  82. <td>{{user.realname}}</td>
  83. </tr>
  84. <tr>
  85. <td>年龄</td>
  86. <td :class="isMatch('age')">{{info.age}}岁</td>
  87. <td :class="isMatch('age')">{{showMatingRange(mating.min_age,mating.max_age,'岁')}}</td>
  88. </tr>
  89. <tr>
  90. <td>身高</td>
  91. <td :class="isMatch('high')">{{info.high}}cm</td>
  92. <td :class="isMatch('high')">{{showMatingRange(mating.min_high,mating.max_high,'cm')}}</td>
  93. </tr>
  94. <tr>
  95. <td>体重</td>
  96. <td :class="isMatch('weight')">{{info.weight}}KG</td>
  97. <td :class="isMatch('weight')">{{showMatingRange(mating.min_weight,mating.max_weight,'KG')}}</td>
  98. </tr>
  99. <tr>
  100. <td>籍贯</td>
  101. <td :class="isMatch('native')">{{info.native}}</td>
  102. <td :class="isMatch('native')">{{mating.native}}</td>
  103. </tr>
  104. <tr>
  105. <td>学历</td>
  106. <td :class="isMatch('education')">{{info.education}}</td>
  107. <td :class="isMatch('education')">{{mating.education}}</td>
  108. </tr>
  109. <tr>
  110. <td>年收入</td>
  111. <td :class="isMatch('income')">{{info.income}}</td>
  112. <td :class="isMatch('income')">{{mating.income}}</td>
  113. </tr>
  114. <tr>
  115. <td>是否有房</td>
  116. <td :class="isMatch('have_house')">{{tinyint[info.have_house]}}</td>
  117. <td :class="isMatch('have_house')">{{cond_tinyint[mating.have_house]}}</td>
  118. </tr>
  119. <tr>
  120. <td>是否有车</td>
  121. <td :class="isMatch('have_car')">{{tinyint[info.have_car]}}</td>
  122. <td :class="isMatch('have_car')">{{cond_tinyint[mating.have_car]}}</td>
  123. </tr>
  124. <tr>
  125. <td>婚后是否愿意与父母同住</td>
  126. <td :class="isMatch('with_parent_live')">{{tinyint[info.with_parent_live]}}</td>
  127. <td :class="isMatch('with_parent_live')">{{cond_tinyint[mating.with_parent_live]}}</td>
  128. </tr>
  129. <tr>
  130. <td>是否吸烟</td>
  131. <td :class="isMatch('smoke')">{{info.smoke}}</td>
  132. <td :class="isMatch('smoke')">{{mating.smoke}}</td>
  133. </tr>
  134. <tr>
  135. <td>是否喝酒</td>
  136. <td :class="isMatch('drink')">{{info.drink}}</td>
  137. <td :class="isMatch('drink')">{{mating.drink}}</td>
  138. </tr>
  139. <tr>
  140. <td>婚姻状况</td>
  141. <td>{{info.marry}}</td>
  142. <td></td>
  143. </tr>
  144. <tr>
  145. <td>工作单位</td>
  146. <td>{{info.company}}</td>
  147. <td></td>
  148. </tr>
  149. <tr>
  150. <td>职务</td>
  151. <td>{{info.job}}</td>
  152. <td></td>
  153. </tr>
  154. <tr>
  155. <td>家庭成员</td>
  156. <td>{{info.family.join(',')}}</td>
  157. <td></td>
  158. </tr>
  159. <tr>
  160. <td>民族</td>
  161. <td>{{info.nation}}</td>
  162. <td></td>
  163. </tr>
  164. <tr>
  165. <td>兴趣爱好</td>
  166. <td>{{info.hobby}}</td>
  167. <td></td>
  168. </tr>
  169. </table>
  170. </van-popup>
  171. </block>
  172. <block name="script">
  173. <script>
  174. new Vue({
  175. el: '#app',
  176. data() {
  177. return {
  178. user:{$user},
  179. mating:{$mating},
  180. list: {$list},
  181. active: {$type},
  182. info: {match_arr:[],family:[]},
  183. info_show: false,
  184. tinyint: {$tinyint},
  185. cond_tinyint: {$cond_tinyint},
  186. };
  187. },
  188. methods: {
  189. onBack() {
  190. location.href = "{:url('index/index')}";
  191. },
  192. onTab(index) {
  193. location.href = "{:url('match')}?id={$id}&type=" + index;
  194. return false;
  195. },
  196. dealAvatar(avatar,sex) {
  197. if (avatar == '') {
  198. return '__TMPL__/public/assets/images/matchmaker/avatar' + sex + '.png'
  199. } else {
  200. return avatar;
  201. }
  202. },
  203. dealHigh(high) {
  204. return high ? high + 'CM' : '保密';
  205. },
  206. showInfo(item) {
  207. this.info = item;
  208. this.info_show = true;
  209. },
  210. showMatingRange(min,max,unit) {
  211. if (min === 0 && max === 0) {
  212. return '不限';
  213. } else if (min === 0) {
  214. return max + unit + '以下';
  215. } else if (max === 0) {
  216. return min + unit + '以上';
  217. } else {
  218. return min + ' - ' + max + unit;
  219. }
  220. },
  221. isMatch(value) {
  222. const match = this.info.match_arr.includes(value)
  223. return match ? 'match' : 'no-match';
  224. }
  225. },
  226. computed: {
  227. }
  228. });
  229. </script>
  230. </block>