优化参数&字典缓存操作
This commit is contained in:
@ -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'
|
||||
})
|
||||
}
|
||||
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
@ -99,9 +99,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>
|
||||
@ -181,7 +181,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, clearCache } from "@/api/system/config";
|
||||
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, refreshCache } from "@/api/system/config";
|
||||
|
||||
export default {
|
||||
name: "Config",
|
||||
@ -355,10 +355,10 @@ export default {
|
||||
this.exportLoading = false;
|
||||
})
|
||||
},
|
||||
/** 清理缓存按钮操作 */
|
||||
handleClearCache() {
|
||||
clearCache().then(response => {
|
||||
this.msgSuccess("清理成功");
|
||||
/** 刷新缓存按钮操作 */
|
||||
handleRefreshCache() {
|
||||
refreshCache().then(() => {
|
||||
this.msgSuccess("刷新成功");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -105,9 +105,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>
|
||||
@ -189,7 +189,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, exportType, clearCache } from "@/api/system/dict/type";
|
||||
import { listType, getType, delType, addType, updateType, exportType, refreshCache } from "@/api/system/dict/type";
|
||||
|
||||
export default {
|
||||
name: "Dict",
|
||||
@ -359,10 +359,10 @@ export default {
|
||||
this.exportLoading = false;
|
||||
})
|
||||
},
|
||||
/** 清理缓存按钮操作 */
|
||||
handleClearCache() {
|
||||
clearCache().then(response => {
|
||||
this.msgSuccess("清理成功");
|
||||
/** 刷新缓存按钮操作 */
|
||||
handleRefreshCache() {
|
||||
refreshCache().then(() => {
|
||||
this.msgSuccess("刷新成功");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user