mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
🎉 【字典管理】、【参数管理】同步缓存
This commit is contained in:
parent
bf77dacdb2
commit
7131f1ade4
@ -38,3 +38,9 @@ export function putObj(obj?: Object) {
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/admin/param/sync',
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
@ -29,6 +29,9 @@
|
||||
@click="handleDelete(selectObjs)">
|
||||
{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
<el-button class="ml10" formDialogRef icon="refresh-left" type="primary" @click="handleRefreshCache()">
|
||||
{{ $t('common.refreshCacheBtn') }}
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" style="float: right;margin-right: 20px"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
@ -76,7 +79,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemDic">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObj } from "/@/api/admin/dict";
|
||||
import { delObj, fetchList, refreshCache } from "/@/api/admin/dict";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from "/@/hooks/dict";
|
||||
import { useI18n } from "vue-i18n";
|
||||
@ -134,6 +137,12 @@ const handleSelectionChange = (objs: any) => {
|
||||
});
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
//刷新缓存
|
||||
const handleRefreshCache = () =>{
|
||||
refreshCache().then(() =>{
|
||||
useMessage().success('同步成功')
|
||||
})
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = (ids: string[]) => {
|
||||
|
@ -29,6 +29,9 @@
|
||||
@click="handleDelete(selectObjs)">
|
||||
{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
<el-button class="ml10" formDialogRef icon="refresh-left" type="primary" @click="handleRefreshCache()">
|
||||
{{ $t('common.refreshCacheBtn') }}
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" style="float: right;margin-right: 20px"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
@ -81,7 +84,7 @@
|
||||
|
||||
<script lang="ts" name="systemSysPublicParam" setup>
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { delObj, fetchList } from "/@/api/admin/param";
|
||||
import { delObj, fetchList,refreshCache } from "/@/api/admin/param";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useI18n } from "vue-i18n";
|
||||
@ -141,6 +144,11 @@ const handleSelectionChange = (objs: any) => {
|
||||
});
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
const handleRefreshCache = () =>{
|
||||
refreshCache().then(()=>{
|
||||
useMessage().success('同步成功')
|
||||
})
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = (ids: string[]) => {
|
||||
|
Loading…
Reference in New Issue
Block a user