vue前端分页多条件搜索

 

vue前端分页多条件搜索

fliterData() {
    if (this.query_syscode || this.query_version || this.query_group || String(this.query_status)) {
        this.blist = this.list.filter(data => {
            let params = true
            if (this.query_syscode) params = params && data['syscode'] === this.query_syscode
            if (this.query_version) params = params && String(data['version_id']) === String(this.query_version)
            if (this.query_group) params = params && data['conf_group'] === this.query_group
            if (this.query_status) params = params && data['status_str'] === this.query_status
            console.log(params)
            return params
        })
        this.total = this.blist.length
        return this.blist
    }
    this.blist = this.list
    this.total = this.blist.length
    return this.list
},

 

posted @ 2021-08-05 18:04  醒日是归时  阅读(372)  评论(0编辑  收藏  举报