Forráskód Böngészése

团队数据模糊查询

洪海涛 4 éve
szülő
commit
998065b6ba

+ 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)
             }