java 2015_[Java教程][2015

[Java教程][2015

0

2015-10-27 14:00:08

1.以下这种方法是ok的

//-jade部分button.btn.btn-primary.btn-sm(type="button" ng-click="exportcsv()") 导出Excel

//-coffee部分:加上表格的查询条件传到后台,然后进行导出$scope.exportcsv=()-> $scope.page = 1 if !$scope.querytext $scope.querytext="" $scope.input=[$scope.querystyle,$scope.querytext] if $scope.belonged is undefined $scope.belonged = "" if $scope.operation is undefined $scope.operation = "" if $scope.firm is undefined $scope.firm = "" if $scope.statusplan is undefined $scope.statusplan = "" if $scope.station_name is undefined $scope.station_name = "所有站点" if $scope.locat is undefined $scope.locat = "" if $scope.alertcheck is undefined $scope.alertcheck = false location.href="http://www.cnblogs.com//api/outRepair/?"+ "after="+$scope.after+'&'+ "before="+$scope.before+'&'+ "after_last="+$scope.aftertwo+'&'+ "before_last="+$scope.beforetwo+'&'+ "alertcheck="+$scope.alertcheck+'&'+ "belonged="+$scope.belonged+'&'+ "conditions="+$scope.input[0]+'&'+ "contents="+$scope.input[1]+'&'+ "firm="+$scope.firm+'&'+ "operation="+$scope.operation+'&'+ "page="+$scope.page+'&'+ "per_page="+$scope.per_page+'&'+ "plan_status="+$scope.statusplan+'&'+ "station_name="+$scope.station_name+'&'+ "locat="+$scope.locat

2.以下此种方法是不ok的,不知道为什么有问题,后台是python写,是不是导出必须要是链接形式?

//-jade部分button.btn.btn-primary.btn-sm(type="button" ng-click="exportcsv()") 导出Excel

//-coffee部分:加上表格的查询条件传到后台,然后进行导出$scope.exportcsv=()-> jianxiuexceldata.excelport($scope.alertcheck,$scope.input,$scope.after,$scope.before,$scope.aftertwo,$scope.beforetwo,$scope.page,$scope.per_page,$scope.belonged,$scope.operation,$scope.firm,$scope.statusplan,$scope.station_name,$scope.locat).success (data)-> console.log "excel导出成功"

//-main.coffee部分---接口部分app.factory "jianxiuexceldata", ($http) -> url = "api/outRepair/" return { excelport: (alertcheck,input,after,before,after_last,before_last,page,per_page,belonged,operation,firm,plan_status,station_name,locat)-> $http.get "#{url}",{ "params": "alertcheck": alertcheck "conditions": input[0] "contents": input[1] "after": after "before": before "after_last": after_last "before_last": moment(before_last).add(1,'days').format("YYYY-MM-DD") "page" : page "per_page" : per_page "belonged" : belonged "operation" : operation "firm" : firm "plan_status" : plan_status "locat": locat "station_name": station_name }}

本文网址:http://www.shaoqun.com/a/152957.html

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:admin@shaoqun.com。

0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值