diff --git a/app/src/components/Inventory.vue b/app/src/components/Inventory.vue index 3d7b125..982a8b5 100644 --- a/app/src/components/Inventory.vue +++ b/app/src/components/Inventory.vue @@ -518,10 +518,10 @@ }, search() { this.searchItem.tablename = this.tablename; - // const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); - // Object.keys(this.searchItem).forEach((key) => { - // this.searchItem[key] = this.searchItem[key].replace(pattern, ''); - // }); + // const pattern = new RegExp('[[\\]"\';]'); + Object.keys(this.searchItem).forEach((key) => { + this.searchItem[key] = this.searchItem[key].replaceAll('"', '').replaceAll('\'', '').replaceAll(';', '').replaceAll('\\', ''); + }); this.$axios.post(`/search`, this.searchItem).then((resp) => { delete this.searchItem.tablename; this.items = resp.data.data; diff --git a/app/src/components/Search.vue b/app/src/components/Search.vue index 10c49bd..4cb2fc2 100644 --- a/app/src/components/Search.vue +++ b/app/src/components/Search.vue @@ -148,8 +148,8 @@ }, search() { this.progress = true; - // const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); - // this.text = this.text.replace(pattern, ''); + // const pattern = new RegExp('[\\]"\';]'); + this.text = this.text.replaceAll('"', '').replaceAll('\'', '').replaceAll(';', '').replaceAll('\\', ''); this.$axios.get(`/search/search?text=${this.text}`).then((resp) => { Object.keys(resp.data.data).forEach(async (key) => { await this.getHeaders(key); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 74f9c1d..857e529 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ -spring.profiles.active=dev -#spring.profiles.active=pro +#spring.profiles.active=dev +spring.profiles.active=pro server.servlet.context-path=/rms spring.servlet.multipart.max-file-size=100MB