|
|
@@ -55,8 +55,9 @@
|
|
|
</el-table>
|
|
|
<div style="margin-top: 20px" class="table-footer">
|
|
|
<div class="pages">
|
|
|
- <el-pagination :hide-on-single-page="true" layout="prev, pager, next" :current-page.sync="table.currentPage"
|
|
|
- :page-size="table.pageRows" :total="rows_total" @current-change="handleCurrentChange">
|
|
|
+ <el-pagination :hide-on-single-page="true" layout="prev, pager, next"
|
|
|
+ :current-page.sync="table.currentPage" :page-size="table.pageRows" :total="rows_total"
|
|
|
+ @current-change="handleCurrentChange">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
<div class="export-table">
|
|
|
@@ -211,7 +212,7 @@
|
|
|
|
|
|
// this.$message.error('起止日期不能为同一天!');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 选择日期后,马上搜索
|
|
|
this.handleCurrentChange(1)
|
|
|
// 获取选择的日期
|
|
|
@@ -223,34 +224,30 @@
|
|
|
* 导出表格
|
|
|
*/
|
|
|
handleDownloadTable() {
|
|
|
- var _this = this
|
|
|
- var params = {
|
|
|
- data: {}
|
|
|
- }
|
|
|
+ var _this = this;
|
|
|
+ let formData = new FormData();
|
|
|
if (_this.drom_options.label) {
|
|
|
- params.data.build = _this.drom_options.label
|
|
|
+ formData.append("build", _this.drom_options.label);
|
|
|
}
|
|
|
if (_this.room_options.room_label) {
|
|
|
- params.data.dom = _this.room_options.room_label
|
|
|
+ formData.append("dom", _this.room_options.room_label);
|
|
|
}
|
|
|
if (_this.select_riqi.select_day) {
|
|
|
- params.data.begin_time = _this.select_riqi.select_day
|
|
|
- }
|
|
|
- if (JSON.stringify(params.data) == '{}') {
|
|
|
- params = ''
|
|
|
+ formData.append("begin_time", _this.select_riqi.select_day);
|
|
|
}
|
|
|
- this.$axios.post('/shuidian/HotWaters/watertoComExcel.action', params)
|
|
|
+ this.$axios.post('/shuidian/HotWaters/watertoComExcel.action', formData)
|
|
|
.then(res => {
|
|
|
- // console.log(res.data.downurl);
|
|
|
- if (typeof(res.data.downurl) != 'undefined' && res.data.downurl != '' && JSON.stringify(res
|
|
|
+ if (typeof(res.data.downurl) != 'undefined' && res.data.downurl != '' && JSON
|
|
|
+ .stringify(res
|
|
|
.data) != '{}') {
|
|
|
- window.open('https://jtishfw.ncjti.edu.cn/jxch-smartmp' + res.data.downurl)
|
|
|
+ // console.log(res.data.downurl);
|
|
|
+ window.open('https://chtech.ncjti.edu.cn/shuidian' + res.data.downurl);
|
|
|
} else {
|
|
|
_this.$message.error('【未获得】表格!');
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // console.log(err);
|
|
|
+ console.log(err);
|
|
|
_this.$message.error('【导出表格】请求异常: ' + err);
|
|
|
})
|
|
|
},
|
|
|
@@ -320,7 +317,8 @@
|
|
|
this.$axios.get('/shuidian/HotWaters/watergetdoms.action', params)
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
- if (typeof(res.data.doms) != 'undefined' && res.data.doms != '' && JSON.stringify(res.data) !=
|
|
|
+ if (typeof(res.data.doms) != 'undefined' && res.data.doms != '' && JSON.stringify(
|
|
|
+ res.data) !=
|
|
|
'{}') {
|
|
|
this.room_options.rooms = [{
|
|
|
value: 0,
|
|
|
@@ -423,7 +421,8 @@
|
|
|
// console.log(res.data);
|
|
|
this.tableData = []
|
|
|
_this.rows_total = 0
|
|
|
- if (typeof(res.data.rows) != 'undefined' && res.data.rows != '' && JSON.stringify(res.data) !=
|
|
|
+ if (typeof(res.data.rows) != 'undefined' && res.data.rows != '' && JSON.stringify(
|
|
|
+ res.data) !=
|
|
|
'{}') {
|
|
|
_this.tableData = res.data.rows
|
|
|
_this.rows_total = res.data.total
|
|
|
@@ -452,7 +451,8 @@
|
|
|
this.$axios.get('/shuidian/HotWaters/watergetBuilds.action')
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
- if (typeof(res.data.builds) != 'undefined' && res.data.builds != '' && JSON.stringify(res
|
|
|
+ if (typeof(res.data.builds) != 'undefined' && res.data.builds != '' && JSON
|
|
|
+ .stringify(res
|
|
|
.data) != '{}') {
|
|
|
this.drom_options.builds = [{
|
|
|
value: 0,
|
|
|
@@ -492,7 +492,8 @@
|
|
|
})
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
- if (typeof(res.data) != 'undefined' && res.data != '' && JSON.stringify(res.data) != '{}') {
|
|
|
+ if (typeof(res.data) != 'undefined' && res.data != '' && JSON.stringify(res
|
|
|
+ .data) != '{}') {
|
|
|
// _this.$message.success('数据加载成功!');
|
|
|
this.xiaofei.year_balance = parseFloat(res.data.money_year).toFixed(2)
|
|
|
} else {
|
|
|
@@ -512,7 +513,8 @@
|
|
|
})
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
- if (typeof(res.data) != 'undefined' && res.data != '' && JSON.stringify(res.data) != '{}') {
|
|
|
+ if (typeof(res.data) != 'undefined' && res.data != '' && JSON.stringify(res
|
|
|
+ .data) != '{}') {
|
|
|
// _this.$message.success('数据加载成功!');
|
|
|
this.xiaofei.month_balance = parseFloat(res.data.money_month).toFixed(2)
|
|
|
} else {
|
|
|
@@ -532,7 +534,8 @@
|
|
|
})
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
- if (typeof(res.data) != 'undefined' && res.data != '' && JSON.stringify(res.data) != '{}') {
|
|
|
+ if (typeof(res.data) != 'undefined' && res.data != '' && JSON.stringify(res
|
|
|
+ .data) != '{}') {
|
|
|
// _this.$message.success('数据加载成功!');
|
|
|
this.xiaofei.day_balance = parseFloat(res.data.money_day).toFixed(2)
|
|
|
|