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