teddy 5 лет назад
Родитель
Сommit
f6cba2fe8f
3 измененных файлов: 7 добавлений и 3 удалений
  1. +4
    -0
      app/src/components/Inventory.vue
  2. +1
    -1
      src/main/java/com/moze/rms/dao/AccountDAO.java
  3. +2
    -2
      src/main/resources/application.properties

+ 4
- 0
app/src/components/Inventory.vue Просмотреть файл

@@ -520,7 +520,9 @@
this.searchItem.tablename = this.tablename; this.searchItem.tablename = this.tablename;
// const pattern = new RegExp('[[\\]"\';]'); // const pattern = new RegExp('[[\\]"\';]');
Object.keys(this.searchItem).forEach((key) => { Object.keys(this.searchItem).forEach((key) => {
if (this.searchItem[key] !== null) {
this.searchItem[key] = this.searchItem[key].replaceAll('"', '').replaceAll('\'', '').replaceAll(';', '').replaceAll('\\', ''); this.searchItem[key] = this.searchItem[key].replaceAll('"', '').replaceAll('\'', '').replaceAll(';', '').replaceAll('\\', '');
}
}); });
this.$axios.post(`/search`, this.searchItem).then((resp) => { this.$axios.post(`/search`, this.searchItem).then((resp) => {
delete this.searchItem.tablename; delete this.searchItem.tablename;
@@ -538,6 +540,7 @@
this.haveSearch = true; this.haveSearch = true;
} }
}); });

this.getInventories(); this.getInventories();
}, },
async clearSearchItem() { async clearSearchItem() {
@@ -545,6 +548,7 @@
Object.keys(this.searchItem).forEach(function(key){ Object.keys(this.searchItem).forEach(function(key){
self.searchItem[key] = null; self.searchItem[key] = null;
}); });
console.log(this.searchItem);
this.getInventories(); this.getInventories();
this.haveSearch = false; this.haveSearch = false;
}, },


+ 1
- 1
src/main/java/com/moze/rms/dao/AccountDAO.java Просмотреть файл

@@ -38,7 +38,7 @@ public interface AccountDAO extends SqlObject {
sql += "'" + a.getUsername() +"',"; sql += "'" + a.getUsername() +"',";
sql += "'" + a.getDepartment() +"',"; sql += "'" + a.getDepartment() +"',";
sql += "'" + a.getAccount() +"',"; sql += "'" + a.getAccount() +"',";
sql += "'1',";
sql += "'" + a.getLevel() +"',";
sql += "'" + a.getId() +"')"; sql += "'" + a.getId() +"')";


handle.createUpdate(sql).execute(); handle.createUpdate(sql).execute();


+ 2
- 2
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 server.servlet.context-path=/rms
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB


Загрузка…
Отмена
Сохранить