java工具类总结


//返回一个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);

              })
      },

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值