predict.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. // this.keys = this.arr.map((item)=>{return item=item[0]});
  127. // this.datakey = this.arr[i1[0]];//每列属性值
  128. // this.datakeyvalue = this.arr[i1[0]][i1[1]];
  129. // this.trueorfalse=this.keys.forEach((item)=>{return item==this.datakey});
  130. },
  131. }
  132. }
  133. </script>
  134. <style>
  135. choose-lits {
  136. font-size: 27rpx;
  137. }
  138. .uni-product {
  139. background-color: white;
  140. }
  141. .search {
  142. display: flex;
  143. flex-direction: row;
  144. justify-content: space-between;
  145. /* height: 40rpx; */
  146. margin-top: 40rpx;
  147. /* line-height: 40rpx; */
  148. }
  149. .search input {
  150. width: 50%;
  151. height: 60rpx;
  152. border-radius: 30rpx;
  153. font-size: 30rpx;
  154. padding-left: 30rpx;
  155. margin-left: 5%;
  156. background-color: #F8F8F8;
  157. }
  158. .search button {
  159. /* line-height: 28px; */
  160. /* height: 28px; */
  161. height: 60rpx;
  162. line-height: 60rpx;
  163. border-radius: 28px;
  164. width: 25%;
  165. font-size: 30rpx;
  166. background-color: #EF3A3A;
  167. }
  168. text {
  169. color: #808080;
  170. }
  171. .table-head , .table-body{
  172. margin: auto;
  173. display: flex;
  174. justify-content: space-between;
  175. padding-left: 20rpx;
  176. padding-right: 20rpx;
  177. }
  178. .table-head text, .table-body text{
  179. width: 15%;
  180. }
  181. .uni-product-list {
  182. background-color: #F8F8F8;
  183. font-size: 35rpx;
  184. }
  185. .uni-product {
  186. padding-top: 20rpx;
  187. padding-bottom: 20rpx;
  188. margin-bottom: 20rpx;
  189. padding-left: 20rpx;
  190. padding-right: 20rpx;
  191. display: flex;
  192. flex-direction: row;
  193. justify-content: space-between;
  194. }
  195. .uni-product-price {
  196. font-size: 25rpx;
  197. width: 70%;
  198. }
  199. .uni-product-content {
  200. display: flex;
  201. flex-direction: row;
  202. justify-content: space-between;
  203. height: 150rpx;
  204. margin-bottom: 18rpx;
  205. }
  206. .uni-product-price-favour,
  207. .uni-product-price-original,
  208. .uni-product-tip {
  209. background-color: #F2F4F5;
  210. display: block;
  211. height: 30rpx;
  212. position: relative;
  213. display: flex;
  214. justify-content: center;
  215. }
  216. .uni-product-price-favour:before {
  217. content: '';
  218. display: block;
  219. position: relative;
  220. background-color: #F2F4F5;
  221. border-bottom: 15px solid #F2F4F5;
  222. border-left: 15px solid white;
  223. }
  224. .uni-product-price-favour:after {
  225. content: '';
  226. display: block;
  227. position: relative;
  228. background-color: #F2F4F5;
  229. border-left: 15px solid #F2F4F5;
  230. border-bottom: 15px solid white;
  231. }
  232. .uni-product-price-original:before {
  233. content: '';
  234. display: block;
  235. position: relative;
  236. background-color: #F2F4F5;
  237. border-bottom: 15px solid #F2F4F5;
  238. border-left: 15px solid white;
  239. }
  240. .uni-product-price-original:after {
  241. content: '';
  242. display: block;
  243. position: relative;
  244. background-color: #F2F4F5;
  245. border-left: 15px solid #F2F4F5;
  246. border-bottom: 15px solid white;
  247. }
  248. .uni-product-tip:before {
  249. content: '';
  250. display: block;
  251. position: relative;
  252. background-color: #F2F4F5;
  253. border-bottom: 15px solid #F2F4F5;
  254. border-left: 15px solid white;
  255. }
  256. .uni-product-tip:after {
  257. content: '';
  258. display: block;
  259. position: relative;
  260. background-color: #F2F4F5;
  261. border-left: 15px solid #F2F4F5;
  262. border-bottom: 15px solid white;
  263. }
  264. .uni-product-content-items,
  265. .uni-product-content-score {
  266. display: flex;
  267. flex-direction: row;
  268. justify-content: space-between;
  269. }
  270. .uni-product-content-bottom {
  271. float: right;
  272. }
  273. .uni-product-content-bottom image {
  274. width: 30rpx;
  275. height: 30rpx;
  276. vertical-align: middle;
  277. }
  278. .uni-product-content-line {
  279. display: flex;
  280. flex-direction: column;
  281. justify-content: space-between;
  282. width: 70%;
  283. }
  284. .uni-product-content image {
  285. width: 80rpx;
  286. height: 80rpx;
  287. }
  288. .uni-product-image {
  289. width: 150rpx;
  290. height: 150rpx;
  291. }
  292. </style>