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 } }

      

  • 相关阅读:
    CentOS安装使用.netcore极简教程(免费提供学习服务器)
    新生命团队netcore服务器免费开放计划
    线程池ThreadPool及Task调度死锁分析
    NetCore版RPC框架NewLife.ApiServer
    NewLife.Net——管道处理器解决粘包
    NewLife.Net——网络压测单机2266万tps
    NewLife.Net——构建可靠的网络服务
    NewLife.Net——开始网络编程
    搬家
    借助Redis做秒杀和限流的思考
  • 原文地址:https://www.cnblogs.com/yoona-lin/p/13552026.html
Copyright © 2011-2022 走看看