优化参数&字典缓存操作

This commit is contained in:
RuoYi
2021-05-27 21:13:48 +08:00
committed by 疯狂的狮子li
parent bb204fc3b7
commit bdc1773133
14 changed files with 155 additions and 92 deletions

View File

@@ -51,10 +51,10 @@ export function delConfig(configId) {
})
}
// 清理参数缓存
export function clearCache() {
// 刷新参数缓存
export function refreshCache() {
return request({
url: '/system/config/clearCache',
url: '/system/config/refreshCache',
method: 'delete'
})
}

View File

@@ -43,10 +43,10 @@ export function delType(dictId) {
})
}
// 清理参数缓存
export function clearCache() {
// 刷新字典缓存
export function refreshCache() {
return request({
url: '/system/dict/type/clearCache',
url: '/system/dict/type/refreshCache',
method: 'delete'
})
}

View File

@@ -98,9 +98,9 @@
plain
icon="el-icon-refresh"
size="mini"
@click="handleClearCache"
@click="handleRefreshCache"
v-hasPermi="['system:config:remove']"
>清理缓存</el-button>
>刷新缓存</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -180,7 +180,7 @@
</template>
<script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig, clearCache } from "@/api/system/config";
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
export default {
name: "Config",
@@ -343,10 +343,10 @@ export default {
...this.queryParams
}, `config_${new Date().getTime()}.xlsx`)
},
/** 清理缓存按钮操作 */
handleClearCache() {
clearCache().then(response => {
this.msgSuccess("清理成功");
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.msgSuccess("刷新成功");
});
}
}

View File

@@ -104,9 +104,9 @@
plain
icon="el-icon-refresh"
size="mini"
@click="handleClearCache"
@click="handleRefreshCache"
v-hasPermi="['system:dict:remove']"
>清理缓存</el-button>
>刷新缓存</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -188,7 +188,7 @@
</template>
<script>
import { listType, getType, delType, addType, updateType, clearCache } from "@/api/system/dict/type";
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
export default {
name: "Dict",
@@ -347,10 +347,10 @@ export default {
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
},
/** 清理缓存按钮操作 */
handleClearCache() {
clearCache().then(response => {
this.msgSuccess("清理成功");
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.msgSuccess("刷新成功");
});
}
}