refactor: 彻底清除所有openhis痕迹
- 重命名目录: openhis-server-new → healthlink-his-server - 重命名目录: openhis-ui-vue3 → healthlink-his-ui - 重命名Java类: OpenHisApplication → HealthLinkHisApplication - 重命名Java类: OpenHisMiniApp → HealthLinkHisMiniApp - 重命名组件目录: OpenHis → HealthLinkHis - 重命名样式文件: openhis.scss → healthlink-his.scss - 重命名配置: nginx-openhis.conf → nginx-healthlink-his.conf - 更新所有源码引用 (0个残留) - 更新所有文档/脚本/配置中的引用
This commit is contained in:
288
healthlink-his-ui/src/views/monitor/cache/index.vue
vendored
Executable file
288
healthlink-his-ui/src/views/monitor/cache/index.vue
vendored
Executable file
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col
|
||||
:span="24"
|
||||
class="card-box"
|
||||
>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<Monitor style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">基本信息</span>
|
||||
</template>
|
||||
<div class="vxe-table vxe-table--enable-row-hover vxe-table--medium">
|
||||
<table
|
||||
cellspacing="0"
|
||||
style="width: 100%"
|
||||
>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
Redis版本
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.redis_version }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
运行模式
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
端口
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.tcp_port }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
客户端数
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.connected_clients }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
运行时间(天)
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.uptime_in_days }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
使用内存
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.used_memory_human }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
使用CPU
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
内存配置
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.maxmemory_human }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
AOF是否开启
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.aof_enabled == "0" ? "否" : "是" }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
RDB是否成功
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.rdb_last_bgsave_status }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
Key数量
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.dbSize"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.dbSize }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div class="cell">
|
||||
网络入口/出口
|
||||
</div>
|
||||
</td>
|
||||
<td class="vxe-cell is-leaf">
|
||||
<div
|
||||
v-if="cache.info"
|
||||
class="cell"
|
||||
>
|
||||
{{ cache.info.instantaneous_input_kbps }}kps/{{ cache.info.instantaneous_output_kbps }}kps
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col
|
||||
:span="12"
|
||||
class="card-box"
|
||||
>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<PieChart style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">命令统计</span>
|
||||
</template>
|
||||
<div class="vxe-table vxe-table--enable-row-hover vxe-table--medium">
|
||||
<div
|
||||
ref="commandstats"
|
||||
style="height: 420px"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col
|
||||
:span="12"
|
||||
class="card-box"
|
||||
>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<Odometer style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">内存信息</span>
|
||||
</template>
|
||||
<div class="vxe-table vxe-table--enable-row-hover vxe-table--medium">
|
||||
<div
|
||||
ref="usedmemory"
|
||||
style="height: 420px"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Cache">
|
||||
import {getCache} from '@/api/monitor/cache';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
const cache = ref([]);
|
||||
const commandstats = ref(null);
|
||||
const usedmemory = ref(null);
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
function getList() {
|
||||
proxy.$modal.loading("正在加载缓存监控数据,请稍候!");
|
||||
getCache().then(response => {
|
||||
proxy.$modal.closeLoading();
|
||||
cache.value = response.data;
|
||||
|
||||
const commandstatsIntance = echarts.init(commandstats.value, "macarons");
|
||||
commandstatsIntance.setOption({
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "命令",
|
||||
type: "pie",
|
||||
roseType: "radius",
|
||||
radius: [15, 95],
|
||||
center: ["50%", "38%"],
|
||||
data: response.data.commandStats,
|
||||
animationEasing: "cubicInOut",
|
||||
animationDuration: 1000
|
||||
}
|
||||
]
|
||||
});
|
||||
const usedmemoryInstance = echarts.init(usedmemory.value, "macarons");
|
||||
usedmemoryInstance.setOption({
|
||||
tooltip: {
|
||||
formatter: "{b} <br/>{a} : " + cache.value.info.used_memory_human
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "峰值",
|
||||
type: "gauge",
|
||||
min: 0,
|
||||
max: 1000,
|
||||
detail: {
|
||||
formatter: cache.value.info.used_memory_human
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: parseFloat(cache.value.info.used_memory_human),
|
||||
name: "内存消耗"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
window.addEventListener("resize", () => {
|
||||
commandstatsIntance.resize();
|
||||
usedmemoryInstance.resize();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
280
healthlink-his-ui/src/views/monitor/cache/list.vue
vendored
Executable file
280
healthlink-his-ui/src/views/monitor/cache/list.vue
vendored
Executable file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-card style="height: calc(100vh - 125px)">
|
||||
<template #header>
|
||||
<Collection style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">缓存列表</span>
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
link
|
||||
type="primary"
|
||||
icon="Refresh"
|
||||
@click="refreshCacheNames()"
|
||||
/>
|
||||
</template>
|
||||
<vxe-table
|
||||
:row-config="{ isCurrent: true }" v-loading="loading"
|
||||
:data="cacheNames"
|
||||
:height="tableHeight"
|
||||
style="width: 100%"
|
||||
@cell-click="getCacheKeys"
|
||||
>
|
||||
<vxe-column
|
||||
title="序号"
|
||||
width="60"
|
||||
type="seq"
|
||||
/>
|
||||
|
||||
<vxe-column
|
||||
title="缓存名称"
|
||||
align="center"
|
||||
field="cacheName"
|
||||
:show-overflow="true"
|
||||
:formatter="nameFormatter"
|
||||
/>
|
||||
|
||||
<vxe-column
|
||||
title="备注"
|
||||
align="center"
|
||||
field="remark"
|
||||
:show-overflow="true"
|
||||
/>
|
||||
<vxe-column
|
||||
title="操作"
|
||||
width="60"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
class="action-button"
|
||||
@click="handleClearCacheName(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-card style="height: calc(100vh - 125px)">
|
||||
<template #header>
|
||||
<Key style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">键名列表</span>
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
link
|
||||
type="primary"
|
||||
icon="Refresh"
|
||||
@click="refreshCacheKeys()"
|
||||
/>
|
||||
</template>
|
||||
<vxe-table
|
||||
v-loading="subLoading"
|
||||
:data="cacheKeys"
|
||||
:height="tableHeight"
|
||||
style="width: 100%"
|
||||
@cell-click="handleCacheValue"
|
||||
>
|
||||
<vxe-column
|
||||
title="序号"
|
||||
width="60"
|
||||
type="seq"
|
||||
/>
|
||||
<vxe-column
|
||||
title="缓存键名"
|
||||
align="center"
|
||||
:show-overflow="true"
|
||||
:formatter="keyFormatter"
|
||||
/>
|
||||
<vxe-column
|
||||
title="操作"
|
||||
width="60"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
class="action-button"
|
||||
@click="handleClearCacheKey(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-card
|
||||
:bordered="false"
|
||||
style="height: calc(100vh - 125px)"
|
||||
>
|
||||
<template #header>
|
||||
<Document style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">缓存内容</span>
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
link
|
||||
type="primary"
|
||||
icon="Refresh"
|
||||
@click="handleClearCacheAll()"
|
||||
>
|
||||
清理全部
|
||||
</el-button>
|
||||
</template>
|
||||
<el-form :model="cacheForm">
|
||||
<el-row :gutter="32">
|
||||
<el-col
|
||||
:offset="1"
|
||||
:span="22"
|
||||
>
|
||||
<el-form-item
|
||||
label="缓存名称:"
|
||||
prop="cacheName"
|
||||
>
|
||||
<el-input
|
||||
v-model="cacheForm.cacheName"
|
||||
:read-only="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:offset="1"
|
||||
:span="22"
|
||||
>
|
||||
<el-form-item
|
||||
label="缓存键名:"
|
||||
prop="cacheKey"
|
||||
>
|
||||
<el-input
|
||||
v-model="cacheForm.cacheKey"
|
||||
:read-only="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:offset="1"
|
||||
:span="22"
|
||||
>
|
||||
<el-form-item
|
||||
label="缓存内容:"
|
||||
prop="cacheValue"
|
||||
>
|
||||
<el-input
|
||||
v-model="cacheForm.cacheValue"
|
||||
type="textarea"
|
||||
:rows="8"
|
||||
:read-only="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="CacheList">
|
||||
import {
|
||||
clearCacheAll,
|
||||
clearCacheKey,
|
||||
clearCacheName,
|
||||
getCacheValue,
|
||||
listCacheKey,
|
||||
listCacheName
|
||||
} from "@/api/monitor/cache";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const cacheNames = ref([]);
|
||||
const cacheKeys = ref([]);
|
||||
const cacheForm = ref({});
|
||||
const loading = ref(true);
|
||||
const subLoading = ref(false);
|
||||
const nowCacheName = ref("");
|
||||
const tableHeight = ref(window.innerHeight - 200);
|
||||
|
||||
/** 查询缓存名称列表 */
|
||||
function getCacheNames() {
|
||||
loading.value = true;
|
||||
listCacheName().then(response => {
|
||||
cacheNames.value = response.data;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 刷新缓存名称列表 */
|
||||
function refreshCacheNames() {
|
||||
getCacheNames();
|
||||
proxy.$modal.msgSuccess("刷新缓存列表成功");
|
||||
}
|
||||
|
||||
/** 清理指定名称缓存 */
|
||||
function handleClearCacheName(row) {
|
||||
clearCacheName(row.cacheName).then(response => {
|
||||
proxy.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
|
||||
getCacheKeys();
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询缓存键名列表 */
|
||||
function getCacheKeys(row) {
|
||||
const cacheName = row !== undefined ? row.cacheName : nowCacheName.value;
|
||||
if (cacheName === "") {
|
||||
return;
|
||||
}
|
||||
subLoading.value = true;
|
||||
listCacheKey(cacheName).then(response => {
|
||||
cacheKeys.value = response.data;
|
||||
subLoading.value = false;
|
||||
nowCacheName.value = cacheName;
|
||||
});
|
||||
}
|
||||
|
||||
/** 刷新缓存键名列表 */
|
||||
function refreshCacheKeys() {
|
||||
getCacheKeys();
|
||||
proxy.$modal.msgSuccess("刷新键名列表成功");
|
||||
}
|
||||
|
||||
/** 清理指定键名缓存 */
|
||||
function handleClearCacheKey(cacheKey) {
|
||||
clearCacheKey(cacheKey).then(response => {
|
||||
proxy.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功");
|
||||
getCacheKeys();
|
||||
});
|
||||
}
|
||||
|
||||
/** 列表前缀去除 */
|
||||
function nameFormatter(row) {
|
||||
return row.cacheName.replace(":", "");
|
||||
}
|
||||
|
||||
/** 键名前缀去除 */
|
||||
function keyFormatter(cacheKey) {
|
||||
return cacheKey.replace(nowCacheName.value, "");
|
||||
}
|
||||
|
||||
/** 查询缓存内容详细 */
|
||||
function handleCacheValue(cacheKey) {
|
||||
getCacheValue(nowCacheName.value, cacheKey).then(response => {
|
||||
cacheForm.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 清理全部缓存 */
|
||||
function handleClearCacheAll() {
|
||||
clearCacheAll().then(response => {
|
||||
proxy.$modal.msgSuccess("清理全部缓存成功");
|
||||
});
|
||||
}
|
||||
|
||||
getCacheNames();
|
||||
</script>
|
||||
Reference in New Issue
Block a user