|
|
@@ -401,7 +401,28 @@
|
|
|
* 导出为Excel表格
|
|
|
*/
|
|
|
onExport() {
|
|
|
- console.log('onExport');
|
|
|
+ var _this = this;
|
|
|
+ let formData = new FormData();
|
|
|
+ if (typeof _this.startTime != 'undefined' && _this.startTime != '') {
|
|
|
+ formData.append("begin_time", _this.startTime);
|
|
|
+ }
|
|
|
+ if (typeof _this.endTime != 'undefined' && _this.endTime != '') {
|
|
|
+ formData.append("end_time", _this.endTime);
|
|
|
+ }
|
|
|
+ this.$axios.post('/jxch-smartmp/HotWaters/waterre_toExcel.action', formData)
|
|
|
+ .then(res => {
|
|
|
+ if (typeof res.data.downurl != 'undefined' && res.data.downurl != '' && JSON
|
|
|
+ .stringify(res.data) != '{}') {
|
|
|
+ // console.log(res.data.downurl);
|
|
|
+ window.open('https://jtishfw.ncjti.edu.cn/jxch-smartmp' + res.data.downurl);
|
|
|
+ } else {
|
|
|
+ _this.$message.error(res.data.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // console.log(err);
|
|
|
+ _this.$message.error('【导出表格】请求异常: ' + err);
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 获取查看记录列表
|