This commit is contained in:
2023-11-23 16:56:08 +08:00
parent 6940155e4f
commit 978aa3a1d1
25 changed files with 198 additions and 155 deletions

View File

@@ -27,7 +27,7 @@
</template>
<script>
import { getEnergyQuantityRealtimePage, exportEnergyQuantityRealtimeExcel } from "@/api/base/energyQuantityRealtime"
import { getEnergyQuantityRealtimePage } from "@/api/base/energyQuantityRealtime"
import { getEnergyTypeListAll } from "@/api/base/energyType"
// import { publicFormatter } from '@/utils/dict'
import FileSaver from "file-saver"
@@ -140,18 +140,16 @@ export default {
break
default:
this.exportTable()
// this.$modal.confirm('是否确认导出').then(() => {
// return exportEnergyQuantityRealtimeExcel({...this.queryParams});
// }).then(response => {
// console.log(response)
// this.$download.excel(response, '能源抄表.xls');
// }).catch(() => {})
}
},
/** 查询列表 */
getList() {
getEnergyQuantityRealtimePage(this.queryParams).then(response => {
this.list = response.data.list || []
let arr = response.data.list || []
arr && arr.map(item => {
item.amount = item.amount ? (!isNaN(parseFloat(item.amount)) && isFinite(item.amount) ? item.amount.toFixed(2) : '') : ''
})
this.list = arr
this.total = response.data.total;
this.exportList = []
});