predict.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <view class="headselection">
  3. <ChooseLits :list="list" :arr="arr" @chooseLike="chooseLike"></ChooseLits>
  4. <view class="search">
  5. <input type="number" placeholder="输入预估分数" />
  6. <button type="primary">立即获取</button>
  7. </view>
  8. <view class="uni-product-list">
  9. <view class="uni-product"></view>
  10. <view class="uni-product" v-for="(product,index) in data" :key="index">
  11. <view class="image-view">
  12. <image class="uni-product-image" src="/static/school.png"></image>
  13. <view class="uni-product-title">{{product.name}}</view>
  14. </view>
  15. <view class="uni-product-price">
  16. <view class="uni-product-content">
  17. <view class="uni-product-content-line">
  18. <view class="uni-product-content-items">
  19. <view class="uni-product-price-original">{{product.address}}</view>
  20. <view class="uni-product-price-favour">{{product.type}}</view>
  21. <view class="uni-product-tip">{{product.project}}</view>
  22. </view>
  23. <view class="uni-product-content-score">
  24. <text>平均分:{{product.maxSco}}</text>
  25. <text>最低分:{{product.minSco}}</text>
  26. </view>
  27. <view class=""><text>录取概率:</text></view>
  28. </view>
  29. <image src="/static/collect.png"></image>
  30. </view>
  31. <view class="uni-product-content-bottom">
  32. <text @tap="writeModal" :data-name="index">分数匹配专业</text>
  33. <image src="/static/arrow.png"></image>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <neil-modal :show="show" :title="modaltitle" :show-cancel="false" @close="changeshow">
  39. <view class="">
  40. <view class="table-head">
  41. <text>专业</text>
  42. <text>平均分</text>
  43. <text>最低分</text>
  44. <text>省控线</text>
  45. <text>录取人数</text>
  46. <text>录取批次</text>
  47. </view>
  48. <view class="table-body">
  49. <text>XXX</text>
  50. <text>{{modalscore}}</text>
  51. <text>{{modalmin}}</text>
  52. <text>XXX</text>
  53. <text>XXX</text>
  54. <text>{{modallevel}}</text>
  55. </view>
  56. </view>
  57. </neil-modal>
  58. </view>
  59. </template>
  60. <script>
  61. import ChooseLits from '../../components/choose-Cade/choose-Cade.vue';
  62. import neilModal from '@/components/neil-modal/neil-modal.vue';
  63. export default {
  64. data() {
  65. return {
  66. modaltitle: '',
  67. modalscore: '',
  68. modalmin: '',
  69. modallevel: '',
  70. show: false,
  71. // showdetail:false,
  72. list: ['录取概率', '所在地', '高校层次', '批次', '2017'],
  73. arr: [
  74. ['录取概率', '冲刺', '稳妥', '保底'],
  75. ['所在地', '北京', '湖北', '陕西', '四川'],
  76. ['高校层次', '985', '211'],
  77. ['批次', '本科一批', '本科二批'],
  78. ['2017', '2016', '2018']
  79. ],
  80. i2: [0, 0, 0, 0, 0],
  81. dataorigin: getApp().globalData.global_colle,
  82. data: getApp().globalData.global_colle,
  83. }
  84. },
  85. components: {
  86. ChooseLits,
  87. neilModal,
  88. },
  89. methods: {
  90. writeModal(e) {
  91. console.log(this.show);
  92. var thistitle = this.data[e.currentTarget.dataset.name].name;
  93. this.modalscore = this.data[e.currentTarget.dataset.name].maxSco;
  94. this.modalmin = this.data[e.currentTarget.dataset.name].minSco;
  95. this.modallevel = this.data[e.currentTarget.dataset.name].level;
  96. this.show = true;
  97. // this.show = !this.show;
  98. this.modaltitle = thistitle + '-专业列表2017';
  99. },
  100. changeshow(data) {
  101. this.show = data;
  102. },
  103. filterData(item, index) {
  104. if (item !== 0) {
  105. this.filteredData(this.arr[index][item]);
  106. }
  107. },
  108. filteredData(nowvalue) {
  109. var nowdata = [];
  110. for (var indiv in this.data) {
  111. if (this.data[indiv].address == nowvalue || this.data[indiv].type == nowvalue || this.data[indiv].project ==
  112. nowvalue) {
  113. nowdata.push(this.data[indiv]);
  114. }
  115. };
  116. this.data = nowdata;
  117. return nowdata;
  118. },
  119. chooseLike(i1) { //arr的index
  120. if (this.i2[i1[0]] != i1[1]) {
  121. this.i2[i1[0]] = i1[1];
  122. this.data = this.dataorigin;
  123. this.i2.forEach(this.filterData);
  124. };
  125. },
  126. }
  127. }
  128. </script>
  129. <style>
  130. choose-lits {
  131. font-size: 27rpx;
  132. }
  133. .uni-product {
  134. background-color: white;
  135. }
  136. .search {
  137. display: flex;
  138. flex-direction: row;
  139. justify-content: space-between;
  140. /* height: 40rpx; */
  141. margin-top: 40rpx;
  142. /* line-height: 40rpx; */
  143. }
  144. .search input {
  145. width: 50%;
  146. height: 60rpx;
  147. border-radius: 30rpx;
  148. font-size: 30rpx;
  149. padding-left: 30rpx;
  150. margin-left: 5%;
  151. background-color: #F8F8F8;
  152. }
  153. .search button {
  154. /* line-height: 28px; */
  155. /* height: 28px; */
  156. height: 60rpx;
  157. line-height: 60rpx;
  158. border-radius: 28px;
  159. width: 25%;
  160. font-size: 30rpx;
  161. background-color: #EF3A3A;
  162. }
  163. text {
  164. color: #808080;
  165. }
  166. .table-head , .table-body{
  167. margin: auto;
  168. display: flex;
  169. justify-content: space-between;
  170. padding-left: 20rpx;
  171. padding-right: 20rpx;
  172. }
  173. .table-head text, .table-body text{
  174. width: 15%;
  175. }
  176. .uni-product-list {
  177. background-color: #F8F8F8;
  178. font-size: 35rpx;
  179. }
  180. .uni-product {
  181. padding-top: 20rpx;
  182. padding-bottom: 20rpx;
  183. margin-bottom: 20rpx;
  184. padding-left: 20rpx;
  185. padding-right: 20rpx;
  186. display: flex;
  187. flex-direction: row;
  188. justify-content: space-between;
  189. }
  190. .uni-product-price {
  191. font-size: 25rpx;
  192. width: 70%;
  193. }
  194. .uni-product-content {
  195. display: flex;
  196. flex-direction: row;
  197. justify-content: space-between;
  198. height: 150rpx;
  199. margin-bottom: 18rpx;
  200. }
  201. .uni-product-price-favour,
  202. .uni-product-price-original,
  203. .uni-product-tip {
  204. background-color: #F2F4F5;
  205. display: block;
  206. height: 30rpx;
  207. position: relative;
  208. display: flex;
  209. justify-content: center;
  210. }
  211. .uni-product-price-favour:before {
  212. content: '';
  213. display: block;
  214. position: relative;
  215. background-color: #F2F4F5;
  216. border-bottom: 15px solid #F2F4F5;
  217. border-left: 15px solid white;
  218. }
  219. .uni-product-price-favour:after {
  220. content: '';
  221. display: block;
  222. position: relative;
  223. background-color: #F2F4F5;
  224. border-left: 15px solid #F2F4F5;
  225. border-bottom: 15px solid white;
  226. }
  227. .uni-product-price-original:before {
  228. content: '';
  229. display: block;
  230. position: relative;
  231. background-color: #F2F4F5;
  232. border-bottom: 15px solid #F2F4F5;
  233. border-left: 15px solid white;
  234. }
  235. .uni-product-price-original:after {
  236. content: '';
  237. display: block;
  238. position: relative;
  239. background-color: #F2F4F5;
  240. border-left: 15px solid #F2F4F5;
  241. border-bottom: 15px solid white;
  242. }
  243. .uni-product-tip:before {
  244. content: '';
  245. display: block;
  246. position: relative;
  247. background-color: #F2F4F5;
  248. border-bottom: 15px solid #F2F4F5;
  249. border-left: 15px solid white;
  250. }
  251. .uni-product-tip:after {
  252. content: '';
  253. display: block;
  254. position: relative;
  255. background-color: #F2F4F5;
  256. border-left: 15px solid #F2F4F5;
  257. border-bottom: 15px solid white;
  258. }
  259. .uni-product-content-items,
  260. .uni-product-content-score {
  261. display: flex;
  262. flex-direction: row;
  263. justify-content: space-between;
  264. }
  265. .uni-product-content-bottom {
  266. float: right;
  267. }
  268. .uni-product-content-bottom image {
  269. width: 30rpx;
  270. height: 30rpx;
  271. vertical-align: middle;
  272. }
  273. .uni-product-content-line {
  274. display: flex;
  275. flex-direction: column;
  276. justify-content: space-between;
  277. width: 70%;
  278. }
  279. .uni-product-content image {
  280. width: 80rpx;
  281. height: 80rpx;
  282. }
  283. .uni-product-image {
  284. width: 150rpx;
  285. height: 150rpx;
  286. }
  287. </style>