소스 검색

团队数据模糊查询

洪海涛 4 년 전
부모
커밋
998065b6ba
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/views/monthlyReport/childrenPage/editReport/components/Cascader.vue

+ 2 - 1
src/views/monthlyReport/childrenPage/editReport/components/Cascader.vue

@@ -68,7 +68,8 @@ export default {
               this.$set(this.options, this.options.length, elm)
             }
           }
-          if (key === 'label' && `${elm[key]}`.indexOf(`${id}`) > -1) {
+          const reg = new RegExp(id, 'i')
+          if (key === 'label' && reg.test(`${elm[key]}`)) {
             if (this.isHave(`${id}`) < 0 && elm.valid) {
               this.$set(this.options, this.options.length, elm)
             }