index.js 1.51 KB
Newer Older
zenghuan committed
1 2 3 4 5 6
import Api from "~/service/Api";
import moment from "moment";

export default {
    methods: {
        async handleSearch() {
ZcyJames committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
            this.load = true;
            let rtnmsg = await Api.post("/frontend/cpsmsg/query", {
                ...this.model.cpsmsgp,
                pageNum: this.pagination.pageNum,
                pageSize: this.pagination.pageSize,
            });
            if (rtnmsg.respCode == SUCCESS) {
                this.load = false;
                this.stmData.data = [];
                const {list} = rtnmsg.data;
                this.stmData.data = list;
                this.pagination = {
                    pageNum: rtnmsg.data.pageNum || 1,
                    pageSize: rtnmsg.data.pageSize || 10,
                    total: parseInt(rtnmsg.data.total),
                };
            } else {
                this.$notify.error({
                    title: this.$t("financing.错误"),
                    message: this.$t("financing.服务请求失败!"),
                });
            }
            this.load = false;
zenghuan committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
        },
        async handleReset() {
        },
        // pageSize改变
        handleSizeChange(val) {
            this.pagination.pageNum = 1;
            this.pagination.pageSize = val;
            this.handleSearch();
        },
        // 页码改变
        handleCurrentChange(val) {
            this.pagination.pageNum = val;
            this.handleSearch();
        },
        handleSelectionChange(val){
            this.multipleSelection = val;
        }
    },
};