锘? var app = new Vue({ el: '#app', data: { tab_index:0, xmlx: "",//欏圭洰綾誨瀷閫夋嫨 xmlx_list: [],//欏圭洰綾誨瀷鍒楄〃 xmlx2: "", xmlx2_list: [], region: "",//鍖哄煙閫夋嫨 region2: "",//鍖哄煙閫夋嫨 region_list: [],//鍖哄煙閫夋嫨鍒楄〃 project_list: [], projectdeal_list: [] }, created: function () { var _this = this; axios.post('/api/webapi.ashx', "action=getParamInfo").then(function (res) { if (res.data.code == 200) { var region_list = res.data.data.region_list; _this.region = region_list[0].Key; _this.region_list = region_list; var xmlx_list = res.data.data.xmlx_list; _this.xmlx_list = xmlx_list; _this.xmlx = xmlx_list[0].Key; var xmlx2_list = res.data.data.xmlx2_list; _this.xmlx2_list = xmlx2_list; _this.xmlx2 = xmlx2_list[0].Key; _this.getProjectList(); _this.getProjectDealList(); } else { vant.Toast(res.data.msg); } }).catch(function (res) { }); //let param = new URLSearchParams(); //param.append('action', 'getParamInfo'); //axios({ // url: "/api/webapi.ashx", // method: "post", // headers: { // 'Content-Type': 'application/x-www-form-urlencoded' // }, // data: param //}).then(function (res) { // if (res.data.code == 200) { // var region_list = res.data.data.region_list; // _this.region = region_list[0].Key; // _this.region_list = region_list; // var xmlx_list = res.data.data.xmlx_list; // _this.xmlx_list = xmlx_list; // _this.xmlx = xmlx_list[0].Key; // var xmlx2_list = res.data.data.xmlx2_list; // _this.xmlx2_list = xmlx2_list; // _this.xmlx2 = xmlx2_list[0].Key; // _this.getProjectList(); // _this.getProjectDealList(); // } else { // vant.Toast(res.data.msg); // } //}).catch(function (res) { //}); }, methods: { tab(index) { this.tab_index = index; }, jump1(row, event, column) { if (row.XMURL) { window.open(row.XMURL); } else { vant.Toast('鏆傛棤閾炬帴'); } }, xmlxChange(item) { var _this = this; _this.xmlx = item.Key; _this.getProjectList(); }, regionChange(item) { var _this = this; _this.region = item.Key; _this.getProjectList(); }, xmlx2Change(item) { var _this = this; _this.xmlx2 = item.Key; _this.getProjectDealList(); }, region2Change(item) { var _this = this; _this.region2 = item.Key; _this.getProjectDealList(); }, //鑾峰彇鍒楄〃 getProjectList() { vant.Toast.loading({ message: '鍔犺澆涓?..', forbidClick: true, duration: 1000 }); var _this = this; //let param = new URLSearchParams(); //param.append('action', 'getProjectList'); //param.append('XMLX', this.xmlx); //param.append('region_code', this.region); //axios({ // url: "/api/webapi.ashx", // method: "post", // headers: { // 'Content-Type': 'application/x-www-form-urlencoded' // }, // data: param //}).then(function (res) { // if (res.data.code == 200) { // _this.project_list = res.data.data; // } else { // vant.Toast(res.data.msg); // } //}).catch(function (res) { //}); axios.post('/api/webapi.ashx', "action=getProjectList&XMLX=" + this.xmlx + "®ion_code=" + this.region).then(function (res) { console.log(res); if (res.data.code == 200) { _this.project_list = res.data.data; } else { vant.Toast(res.data.msg); } }).catch(function (res) { console.log(res); }); }, getProjectDealList() { vant.Toast.loading({ message: '鍔犺澆涓?..', forbidClick: true, duration: 1000 }); var _this = this; //let param = new URLSearchParams(); //param.append('action', 'getProjectDealList'); //param.append('XMLX', this.xmlx2); //param.append('region_code', this.region2); axios.post('/api/webapi.ashx', "action=getProjectDealList&XMLX=" + this.xmlx2 + "®ion_code=" + this.region2).then(function (res) { console.log(res); if (res.data.code == 200) { _this.projectdeal_list = res.data.data; } else { vant.Toast(res.data.msg); } }).catch(function (res) { console.log(res); }); //axios({ // url: "/api/webapi.ashx", // method: "post", // headers: { // 'Content-Type': 'application/x-www-form-urlencoded' // }, // data: param //}).then(function (res) { // if (res.data.code == 200) { // _this.projectdeal_list = res.data.data; // } else { // vant.Toast(res.data.msg); // } //}).catch(function (res) { //}); } } })