//返回一个json格式的数据,先查询出一个个list,然后再put组拼=========================================================================================================================
private JSONObject json = new JSONObject();
String datas2[] = bingresult.split("@");
String x2 = datas2[0];
String y2 = datas2[1];
String total2 = datas2[2];
todayresult = this.service.getDataToday();//查询当天的数据
String datas3[] = todayresult.split("@");
String yb = datas3[0];
String yz = datas3[1];
String sums = datas3[2];
json.put("x", x);
json.put("y", y);
json.put("total", total);
json.put("x2", x2);
json.put("y2", y2);
json.put("total2", total2);
json.put("yb", yb);
json.put("yz", yz);
json.put("sums", sums);
json.put("flag", "success");
result = json.toString();
//前端接收端===============================================
getChart(stcd) {
var host = this.$globalData.host;
var formData={
stcd: stcd,
};
var vm = this
this.$axios.post(host + '/jfinal/app/findAdminWaterChart', formData)
.then(function (response) {
// console.log(response.data);
if(response.data.success=="true"){
if(response.data.x.length>0){
vm.chartdata_x = response.data.x;//图表的x的日期
// vm.chartdata_xxsw = response.data.xxsw;//汛限水位y
vm.chartdata_sssw = response.data.sssw;//当前水位y
vm.drawLine();
}
}
})
.catch(function (error) {
console.log('失败了'+error);
})
},
09-20
228