cl 6 年之前
父节点
当前提交
9763ec6131

+ 29 - 16
pages/predict/predict.vue

@@ -56,9 +56,6 @@
 			</view>
 		</neil-modal>
 	</view>
-
-
-
 </template>
 
 <script>
@@ -85,28 +82,46 @@
 				i2: [0, 0, 0, 0, 0],
 				dataorigin: getApp().globalData.global_colle,
 				data: getApp().globalData.global_colle,
+				// flag: true,
 			}
 		},
+		// onLoad() {
+		// 	console.log("onLoad");
+		// },
+		onShow() {
+			this.list = ['录取概率', '所在地', '高校层次', '批次', '2017']
+		},
+		onHide() {
+			this.list  = [];
+			console.log("我走了");
+			this.flag = false;
+		},
 		components: {
 			ChooseLits,
 			neilModal,
 		},
 		methods: {
-			writeModal(e) {
-				console.log(this.show);
+			onTabItemTap() {
+				this.i2 = [0, 0, 0, 0, 0]
+				this.$forceUpdate();
+				// this.arr = [['录取概率'], ['所在地'], ['高校层次'], ['批次'], ['2017']],
+				this.data = this.dataorigin;
+				this.i2.forEach(this.filterData)
+
+			},
+			writeModal(e) { //往模态框写内容
 				var thistitle = this.data[e.currentTarget.dataset.name].name;
 				this.modalscore = this.data[e.currentTarget.dataset.name].maxSco;
 				this.modalmin = this.data[e.currentTarget.dataset.name].minSco;
 				this.modallevel = this.data[e.currentTarget.dataset.name].level;
 				this.show = true;
-				// this.show = !this.show;
 				this.modaltitle = thistitle + '-专业列表2017';
 
 			},
 			changeshow(data) {
 				this.show = data;
 			},
-			filterData(item, index) {
+			filterData(item, index) { //当index不是0才能筛选
 				if (item !== 0) {
 					this.filteredData(this.arr[index][item]);
 				}
@@ -122,18 +137,12 @@
 				this.data = nowdata;
 				return nowdata;
 			},
-			chooseLike(i1) { //arr的index
+			chooseLike(i1) { //arr的index 触发filter
 				if (this.i2[i1[0]] != i1[1]) {
 					this.i2[i1[0]] = i1[1];
 					this.data = this.dataorigin;
 					this.i2.forEach(this.filterData);
 				};
-				// 我写的果然是垃圾
-				// this.keys = this.arr.map((item)=>{return item=item[0]});
-				// this.datakey = this.arr[i1[0]];//每列属性值
-				// this.datakeyvalue = this.arr[i1[0]][i1[1]];
-				// this.trueorfalse=this.keys.forEach((item)=>{return item==this.datakey});
-
 			},
 
 		}
@@ -185,16 +194,20 @@
 		color: #808080;
 	}
 
-	.table-head , .table-body{
+	.table-head,
+	.table-body {
 		margin: auto;
 		display: flex;
 		justify-content: space-between;
 		padding-left: 20rpx;
 		padding-right: 20rpx;
 	}
-	.table-head text, .table-body text{
+
+	.table-head text,
+	.table-body text {
 		width: 15%;
 	}
+
 	.uni-product-list {
 		background-color: #F8F8F8;
 		font-size: 35rpx;

文件差异内容过多而无法显示
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/predict/predict.js.map


+ 1 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -38,5 +38,5 @@
     ]
   },
   "usingComponents": {},
-  "sitemapLocation": "sitemap29.json"
+  "sitemapLocation": "sitemap53.json"
 }

+ 25 - 16
unpackage/dist/dev/mp-weixin/pages/predict/predict.js

@@ -169,9 +169,6 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
 
 
 
-
-
-
 {
   data: function data() {
     return {
@@ -191,29 +188,47 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
 
       i2: [0, 0, 0, 0, 0],
       dataorigin: getApp().globalData.global_colle,
-      data: getApp().globalData.global_colle };
-
+      data: getApp().globalData.global_colle
+      // flag: true,
+    };
+  },
+  // onLoad() {
+  // 	console.log("onLoad");
+  // },
+  onShow: function onShow() {
+    this.list = ['录取概率', '所在地', '高校层次', '批次', '2017'];
+  },
+  onHide: function onHide() {
+    this.list = [];
+    console.log("我走了");
+    this.flag = false;
   },
   components: {
     ChooseLits: ChooseLits,
     neilModal: neilModal },
 
   methods: {
-    writeModal: function writeModal(e) {
-      console.log(this.show);
+    onTabItemTap: function onTabItemTap() {
+      this.i2 = [0, 0, 0, 0, 0];
+      this.$forceUpdate();
+      // this.arr = [['录取概率'], ['所在地'], ['高校层次'], ['批次'], ['2017']],
+      this.data = this.dataorigin;
+      this.i2.forEach(this.filterData);
+
+    },
+    writeModal: function writeModal(e) {//往模态框写内容
       var thistitle = this.data[e.currentTarget.dataset.name].name;
       this.modalscore = this.data[e.currentTarget.dataset.name].maxSco;
       this.modalmin = this.data[e.currentTarget.dataset.name].minSco;
       this.modallevel = this.data[e.currentTarget.dataset.name].level;
       this.show = true;
-      // this.show = !this.show;
       this.modaltitle = thistitle + '-专业列表2017';
 
     },
     changeshow: function changeshow(data) {
       this.show = data;
     },
-    filterData: function filterData(item, index) {
+    filterData: function filterData(item, index) {//当index不是0才能筛选
       if (item !== 0) {
         this.filteredData(this.arr[index][item]);
       }
@@ -229,18 +244,12 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
       this.data = nowdata;
       return nowdata;
     },
-    chooseLike: function chooseLike(i1) {//arr的index
+    chooseLike: function chooseLike(i1) {//arr的index 触发filter
       if (this.i2[i1[0]] != i1[1]) {
         this.i2[i1[0]] = i1[1];
         this.data = this.dataorigin;
         this.i2.forEach(this.filterData);
       };
-      // 我写的果然是垃圾
-      // this.keys = this.arr.map((item)=>{return item=item[0]});
-      // this.datakey = this.arr[i1[0]];//每列属性值
-      // this.datakeyvalue = this.arr[i1[0]][i1[1]];
-      // this.trueorfalse=this.keys.forEach((item)=>{return item==this.datakey});
-
     } } };exports.default = _default;
 
 /***/ }),