Browse Source

设备配置页添加刷新redis缓存按钮

develop
ljlong_2630 11 months ago
parent
commit
c7ec3d1c36
  1. 8
      src/api/model/device.js
  2. 12
      src/views/model/device/index.vue
  3. 1
      src/views/model/tbserverinfo/index.vue

8
src/api/model/device.js

@ -92,3 +92,11 @@ export function selectDcBaseDeviceinfoMaxSort(){
method: 'get' method: 'get'
}); });
} }
//清空redis缓存
export function cleanRedisCache() {
return request({
url: '/model/dcBaseDeviceinfo/cleanRedisCache',
method: 'post'
});
}

12
src/views/model/device/index.vue

@ -146,6 +146,9 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" icon="Download" @click="handleExport">导出</el-button> <el-button type="warning" icon="Download" @click="handleExport">导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="Refresh" @click="cleanRedis">刷新redis缓存</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList">
</right-toolbar> </right-toolbar>
</el-row> </el-row>
@ -399,7 +402,7 @@
} }
</style> </style>
<script setup name="Device"> <script setup name="Device">
import { getUuid, listDevice, getDevice, delDevice, addDevice, updateDevice, listWithFilterColumn, selectDcBaseDeviceinfoMaxSort } from "@/api/model/device"; import { getUuid, listDevice, getDevice, delDevice, addDevice, updateDevice, listWithFilterColumn, selectDcBaseDeviceinfoMaxSort,cleanRedisCache } from "@/api/model/device";
import { deptTreeSelect } from "@/api/system/user"; import { deptTreeSelect } from "@/api/system/user";
import lock from "@/assets/icons/svg/lock.svg"; import lock from "@/assets/icons/svg/lock.svg";
import { ref, onMounted, onUnmounted } from "vue"; import { ref, onMounted, onUnmounted } from "vue";
@ -944,6 +947,13 @@ watch(deptName, val => {
proxy.$refs["deptTreeRef"].filter(val); proxy.$refs["deptTreeRef"].filter(val);
}); });
function cleanRedis() {
proxy.$modal.confirm('是否确认清空所有缓存?').then(function () {
return cleanRedisCache();
}).catch(function () {
});
}
getDeptTree(); getDeptTree();
getList(); getList();

1
src/views/model/tbserverinfo/index.vue

@ -311,7 +311,6 @@ function submitForm() {
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete(row) { function handleDelete(row) {
debugger
const _ids = row.id || ids.value; const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除TB服务信息编号为"' + _ids + '"的数据项?').then(function () { proxy.$modal.confirm('是否确认删除TB服务信息编号为"' + _ids + '"的数据项?').then(function () {
return delTbserverinfo(_ids); return delTbserverinfo(_ids);

Loading…
Cancel
Save