优化字典数据使用store存取

This commit is contained in:
RuoYi
2022-07-20 19:38:16 +08:00
parent 1f0e742710
commit 5ec5e1a65d
6 changed files with 86 additions and 1 deletions

View File

@ -364,12 +364,14 @@ export default {
if (valid) {
if (this.form.dictCode != undefined) {
updateData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -386,6 +388,7 @@ export default {
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
}).catch(() => {});
},
/** 导出按钮操作 */

View File

@ -339,6 +339,7 @@ export default {
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
});
}
}