zoukankan      html  css  js  c++  java
  • Vue + Element 后台管理页面之实现报表数据查询与清空的按钮

    如图:

    代码如下:

    <!-- 查询清空按钮 -->
              <span class="inline-span butt">
                <el-button type="primary" v-on:click="getFinaDetailsData" plain icon="el-icon-search">查询</el-button>
                <el-button icon="el-icon-delete" v-on:click="resetData">清空</el-button>
              </span>
    
    //一些数据变量须在data里先声明,自行添加
    watch: { dateRangeParam: { handler (newValue, oldValue) { this.getFinaDetailsData() }, deep: true } }, methods: { // 点击查询 getFinaDetailsData () { this.currentPage = 1 this.tempFormData = Object.assign({ start: this.dateRangeParam[0], end: this.dateRangeParam[1], storeId: this.storeId, orderId: this.orderId, payType: this.payType, incPayType: this.incPayType, minAmount: this.minAmount, maxAmount: this.maxAmount, current: this.currentPage, size: this.pageSize }) this.$http({ url: this.$http.adornUrl('项目地址'), method: 'get', params: this.$http.adornParams({ start: this.dateRangeParam[0], end: this.dateRangeParam[1], storeId: this.storeId, orderId: this.orderId, payType: this.payType, incPayType: this.incPayType, minAmount: this.minAmount, maxAmount: this.maxAmount, current: this.currentPage, size: this.pageSize }) }).then(({ data }) => { console.log(data) this.tableData = data.records // 将支付类型(int)转中文(str) this.tableData.forEach(element => { element.payType = this.payTypeList[element.payType] }) this.currentPage = data.current this.pageSize = data.size this.pageTotal = data.total }) }, // 点击清空 resetData () { this.orderId = null this.payType = -1 this.incPayType = 0 this.maxAmount = null this.minAmount = null } }

      

  • 相关阅读:
    7、cad图纸打印
    对账
    练习10—去掉图片文字
    6、cad里面如何快速将图纸的线条全部变成黑色
    5、cad如何快速选中图纸上所有文字
    4、如何修改cad的背景色为白色
    练习九—快速修饰面部光影
    iOS alloc&init探索
    export default / export const
    Vue2.0+组件库总结
  • 原文地址:https://www.cnblogs.com/yoona-lin/p/13552026.html
Copyright © 2011-2022 走看看