Jeecg-boot中的popup彈窗增加模糊搜索


項目需要對popup彈窗中的搜索框進行模糊搜索,找了一下論壇和開發文檔,沒發現方法,於是自己改了一下文件

原理是將查詢的字段前后加上*號

找到JPopupOnlReport.vue這個文件,改寫searchByquery方法

searchByquery(){
        let i
        for(i=0;i<this.queryInfo.length;i++){
            this.queryParam[this.queryInfo[i].field] =  '*' + this.queryParam[this.queryInfo[i].field]+ '*'
        }
        this.loadData(1);
        for(i=0;i<this.queryInfo.length;i++){
          this.queryParam[this.queryInfo[i].field] = this.queryParam[this.queryInfo[i].field].replace(/\*/g,'')
        }
}

改好就行了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM