Commit e6b15a14 by zhaopanyu

zpy

parent 397aaebb
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
<div id="loader"></div> <div id="loader"></div>
<div class="loader-section section-left"></div> <div class="loader-section section-left"></div>
<div class="loader-section section-right"></div> <div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div> <div class="load_title">欢迎访问胜利智联油气数智化品牌</div>
</div> </div>
</div> </div>
</body> </body>
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1729847311140" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1781" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M513.706667 0a512 512 0 1 0 512 512 512 512 0 0 0-512-512z m0 938.666667a426.666667 426.666667 0 1 1 426.666666-426.666667 426.666667 426.666667 0 0 1-426.666666 426.666667z" fill="#333333" p-id="1782"></path><path d="M573.866667 332.373333a42.666667 42.666667 0 0 0-60.16 0l-149.333334 149.333334a42.666667 42.666667 0 0 0 0 60.586666l149.333334 149.333334a42.666667 42.666667 0 0 0 60.16-60.586667L454.826667 512l119.04-119.04a42.666667 42.666667 0 0 0 0-60.586667z" fill="#333333" p-id="1783"></path></svg>
\ No newline at end of file
...@@ -8,7 +8,7 @@ import { isRelogin } from "@/utils/request"; ...@@ -8,7 +8,7 @@ import { isRelogin } from "@/utils/request";
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });
const whiteList = ["/login", "/register", "/web"]; const whiteList = ["/login", "/register", "/web", "/sj"];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start(); NProgress.start();
......
...@@ -6,12 +6,14 @@ Vue.use(Router); ...@@ -6,12 +6,14 @@ Vue.use(Router);
/* Layout */ /* Layout */
import Layout from "@/layout"; import Layout from "@/layout";
let indexViewPath = () => import(); let indexViewPath = () => import("@/views/zyyq/index");
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
indexViewPath = () => import("@/views/zyyq/index");//手机端的组件 console.log("shouji");
indexViewPath = () => import("@/views/zyyqsj/index"); //手机端的组件
} else { } else {
indexViewPath = () => import("@/views/zyyq/index1");//pc端的组件 console.log("pc");
indexViewPath = () => import("@/views/zyyq/index"); //pc端的组件
} }
/** /**
...@@ -55,7 +57,13 @@ export const constantRoutes = [ ...@@ -55,7 +57,13 @@ export const constantRoutes = [
component: indexViewPath, component: indexViewPath,
hidden: true, hidden: true,
}, },
{
path: "/sj",
component: () => import("@/views/zyyqsj/tzy/index"), // 确保路径正确
hidden: true,
},
,
{ {
path: "/login", path: "/login",
component: () => import("@/views/login"), component: () => import("@/views/login"),
......
...@@ -8,34 +8,84 @@ ...@@ -8,34 +8,84 @@
<table cellspacing="0" style="width: 100%"> <table cellspacing="0" style="width: 100%">
<tbody> <tbody>
<tr> <tr>
<td class="el-table__cell is-leaf"><div class="cell">Redis版本</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div></td> <div class="cell">Redis版本</div>
<td class="el-table__cell is-leaf"><div class="cell">运行模式</div></td> </td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell">端口</div></td> <div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div></td> </td>
<td class="el-table__cell is-leaf"><div class="cell">客户端数</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.connected_clients }}</div></td> <div class="cell">运行模式</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell">端口</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell">客户端数</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.connected_clients }}</div>
</td>
</tr> </tr>
<tr> <tr>
<td class="el-table__cell is-leaf"><div class="cell">运行时间(天)</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.uptime_in_days }}</div></td> <div class="cell">运行时间(天)</div>
<td class="el-table__cell is-leaf"><div class="cell">使用内存</div></td> </td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.used_memory_human }}</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell">使用CPU</div></td> <div class="cell" v-if="cache.info">{{ cache.info.uptime_in_days }}</div>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}</div></td> </td>
<td class="el-table__cell is-leaf"><div class="cell">内存配置</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.maxmemory_human }}</div></td> <div class="cell">使用内存</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.used_memory_human }}</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell">使用CPU</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}
</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell">内存配置</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.maxmemory_human }}</div>
</td>
</tr> </tr>
<tr> <tr>
<td class="el-table__cell is-leaf"><div class="cell">AOF是否开启</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.aof_enabled == "0" ? "否" : "是" }}</div></td> <div class="cell">AOF是否开启</div>
<td class="el-table__cell is-leaf"><div class="cell">RDB是否成功</div></td> </td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.rdb_last_bgsave_status }}</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell">Key数量</div></td> <div class="cell" v-if="cache.info">{{ cache.info.aof_enabled == "0" ? "否" : "是" }}</div>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.dbSize">{{ cache.dbSize }} </div></td> </td>
<td class="el-table__cell is-leaf"><div class="cell">网络入口/出口</div></td> <td class="el-table__cell is-leaf">
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.instantaneous_input_kbps }}kps/{{cache.info.instantaneous_output_kbps}}kps</div></td> <div class="cell">RDB是否成功</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.rdb_last_bgsave_status }}</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell">Key数量</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.dbSize">{{ cache.dbSize }} </div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell">网络入口/出口</div>
</td>
<td class="el-table__cell is-leaf">
<div class="cell" v-if="cache.info">{{ cache.info.instantaneous_input_kbps
}}kps/{{ cache.info.instantaneous_output_kbps }}kps</div>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -141,7 +191,7 @@ export default { ...@@ -141,7 +191,7 @@ export default {
}, },
// 打开加载层 // 打开加载层
openLoading() { openLoading() {
this.$modal.loading("正在加载缓存监控数据,请稍候!"); this.$modal.loading("欢迎访问胜利智联油气数智化品牌!");
} }
} }
}; };
......
<template> <template>
<div class="container"> <div class="container">
<el-row style="margin: 150px auto 100px ;"> <el-row style="margin: 150px auto 100px ;">
<img src="../../assets/images/background.png" alt="" style=" <img src="../../assets/images/background.png" alt="" style="
height: 111px; height: 111px;
...@@ -13,7 +12,6 @@ ...@@ -13,7 +12,6 @@
object-fit: cover; */ object-fit: cover; */
" /> " />
</el-row> </el-row>
<el-row class="content" style="background-color: #f5f8fe;"> <el-row class="content" style="background-color: #f5f8fe;">
<el-col :span="6" <el-col :span="6"
style="padding: 20px; border-radius: 10px; min-height: 712px;overflow-x: auto; background-color: #f5f8fe;"> style="padding: 20px; border-radius: 10px; min-height: 712px;overflow-x: auto; background-color: #f5f8fe;">
...@@ -149,11 +147,10 @@ ...@@ -149,11 +147,10 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="remark"> <div class="remark">
<h2>{{ this.remark }}</h2> <div>{{ this.remark }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
<!-- 外层折叠项 2 选中的内容 --> <!-- 外层折叠项 2 选中的内容 -->
<el-col v-else-if="activeNameOuter === '服务类'" :span="18" <el-col v-else-if="activeNameOuter === '服务类'" :span="18"
style="border-radius: 10px; min-height: 700px; background-color: #f5f8fe;"> style="border-radius: 10px; min-height: 700px; background-color: #f5f8fe;">
...@@ -185,7 +182,7 @@ ...@@ -185,7 +182,7 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="remark"> <div class="remark">
<h2>{{ this.remark }}</h2> <div>{{ this.remark }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -199,6 +196,7 @@ import { getListcx, getListdt, } from "@/api/sy.js"; ...@@ -199,6 +196,7 @@ import { getListcx, getListdt, } from "@/api/sy.js";
export default { export default {
name: "gasDigitization", name: "gasDigitization",
// components: { footerNav }, // components: { footerNav },
data() { data() {
return { return {
remark: '', // 新增的remark属性 remark: '', // 新增的remark属性
...@@ -225,10 +223,39 @@ export default { ...@@ -225,10 +223,39 @@ export default {
}; };
}, },
computed: {},
watch: {
activeNameOuter(newValue) {
console.log(newValue, 'newValue');
if (newValue === '服务类') {
const selectedItem = this.collapseDataOuter.find(item => item.mc === '智能化服务类');
if (selectedItem && selectedItem.fwlChildren.length > 0) {
const firstService = selectedItem.fwlChildren[0];
this.activeNameInner = `智能化服务类-${firstService.mc}`;
this.activeServiceId = firstService.id; // 设置 activeServiceId 为第一项的 ID
console.log(this.activeServiceId, 'Selected Service ID');
this.getListdt(this.activeServiceId);
}
} else if (newValue === '产品') {
const selectedItem = this.collapseDataOuter.find(item => item.mc === '软硬件产品');
if (selectedItem && selectedItem.cpChildren && selectedItem.cpChildren.length > 0) {
const firstProduct = selectedItem.cpChildren[0]; // 从 cpChildren 中获取第一个产品
if (firstProduct.children2 && firstProduct.children2.length > 0) {
const firstProductChild = firstProduct.children2[0]; // 从 children2 中获取第一个子产品
this.activeNameInner = `软硬件产品-${firstProductChild.mc}`;
this.activeServiceId = firstProductChild.id; // 设置 activeServiceId 为第一项的 ID
console.log(this.activeServiceId, 'Selected Product ID');
this.getListdt(this.activeServiceId);
}
}
}
}
},
mounted() { mounted() {
this.getList(); this.getList();
// this.setDefaultActiveMenu();
}, },
methods: { methods: {
...@@ -375,13 +402,17 @@ export default { ...@@ -375,13 +402,17 @@ export default {
::v-deep.remark { ::v-deep.remark {
position: absolute; position: absolute;
top: 5px; top: 20px;
/* 向上移动 */ /* 向上移动 */
right: 30px; right: 30px;
/* 向左移动 */ /* 向左移动 */
white-space: nowrap; white-space: nowrap;
font-size: 18px; font-size: 18px;
font-weight: bold; // font-weight: bold;
font-family: PingFang SC;
// font-weight: 800;
// color: #222222;
line-height: 40px
} }
::v-deep.menu-item-active { ::v-deep.menu-item-active {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment