feat : 刷新缓存
This commit is contained in:
@@ -49,3 +49,10 @@ export const delDictType =(dictTypeId) => {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//字典刷新缓存
|
||||
export const refreshDict =() => {
|
||||
return request({
|
||||
url: 'admin/dict/type/refresh',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<div class="layout-left">
|
||||
<div class="query-btn">
|
||||
<el-button color="#DED0B2" v-perm="['dict:type:add']" @click="handleAddType" plain >新增</el-button>
|
||||
<!-- <el-button type="warning" v-perm="['dict:type:export']" @click="handleExport" :icon="Download" plain>导出-->
|
||||
<!-- </el-button>-->
|
||||
<el-button type="warning" v-perm="['dict:type:edit']" @click="handleRefreshCache" plain>刷新缓存
|
||||
</el-button>
|
||||
<el-button type="primary" v-perm="['dict:type:edit']"
|
||||
@click.stop="handleEditType" plain>修改
|
||||
</el-button>
|
||||
@@ -217,7 +217,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getDictTypeList, getDictTypeDetails, addDictType, editDictType, delDictType} from "@/api/system/dict-type";
|
||||
import {getDictTypeList, getDictTypeDetails, addDictType, editDictType, delDictType,refreshDict} from "@/api/system/dict-type";
|
||||
import {getDictDataList, addDictData, delDictData, editDictData, getDictDataDetails} from "@/api/system/dict-data";
|
||||
import {Search, Refresh, Delete, Plus, Edit, Download} from "@element-plus/icons-vue";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
@@ -395,6 +395,11 @@ const handleAddType = () => {
|
||||
typeTitle.value = "新增字典类型表";
|
||||
isTypeVisited.value = true;
|
||||
};
|
||||
//刷新缓存
|
||||
const handleRefreshCache=()=>{
|
||||
refreshDict().then(res=>{
|
||||
})
|
||||
}
|
||||
//修改字典类型
|
||||
const handleEditType = () => {
|
||||
if (tree.value.currentNode == null) {
|
||||
|
||||
Reference in New Issue
Block a user