|
@@ -37,7 +37,11 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="组件名称" align="left" prop="modelName"/>
|
|
<el-table-column label="组件名称" align="left" prop="modelName"/>
|
|
- <el-table-column label="应用编码" align="left" prop="code" width="300"/>
|
|
|
|
|
|
+ <el-table-column label="应用编码" align="left" prop="code" width="300">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button link type="primary" @click="jumpPP(scope.row)">{{ scope.row.code }}</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="系统压力值TPS/QPS" align="center" prop="access" width="150"/>
|
|
<el-table-column label="系统压力值TPS/QPS" align="center" prop="access" width="150"/>
|
|
<el-table-column label="访问错误次数" align="center" prop="num" width="120"/>
|
|
<el-table-column label="访问错误次数" align="center" prop="num" width="120"/>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -50,9 +54,9 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="组件名称" align="left" prop="objName"/>
|
|
<el-table-column label="组件名称" align="left" prop="objName"/>
|
|
<el-table-column label="告警数量" align="center" prop="num" width="120">
|
|
<el-table-column label="告警数量" align="center" prop="num" width="120">
|
|
- <template #default="scope">
|
|
|
|
- <el-button link type="primary" @click="msDetail(scope.row)">{{ scope.row.num }}</el-button>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button link type="primary" @click="msDetail(scope.row)">{{ scope.row.num }}</el-button>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<div ref="asLine" v-show="axx" style="height: 400px;padding-top: 20px;"></div>
|
|
<div ref="asLine" v-show="axx" style="height: 400px;padding-top: 20px;"></div>
|
|
@@ -93,7 +97,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="Record">
|
|
<script setup name="Record">
|
|
-import {calcMs,getBizAccess} from "@/api/alarm/record";
|
|
|
|
|
|
+import {calcMs, getBizAccess} from "@/api/alarm/record";
|
|
import {useRoute, useRouter} from "vue-router";
|
|
import {useRoute, useRouter} from "vue-router";
|
|
import * as echarts from "echarts";
|
|
import * as echarts from "echarts";
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
@@ -133,9 +137,33 @@ const data = reactive({
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+function jumpPP(row) {
|
|
|
|
+ const today = new Date();
|
|
|
|
+ today.setHours(0, 0, 0, 0);
|
|
|
|
+ const now = new Date();
|
|
|
|
+ now.setHours(now.getHours(), now.getMinutes(), 0, 0);
|
|
|
|
+ let num = (now - today) / (1000 * 60);
|
|
|
|
+ num = num.toFixed(0);
|
|
|
|
+ const last = formatDate(now);
|
|
|
|
+ const suffix = '/main/' + row.code + '@SPRING_BOOT/' + num + '分钟/' + last;
|
|
|
|
+ router.push({path: '/link/pp-link/', query: {suffix: suffix}})
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function formatDate(date) {
|
|
|
|
+ const day = date.getDate().toString().padStart(2, '0');
|
|
|
|
+ const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份是从0开始的
|
|
|
|
+ const year = date.getFullYear();
|
|
|
|
+ const hours = date.getHours().toString().padStart(2, '0');
|
|
|
|
+ const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
|
|
+ const seconds = date.getSeconds().toString().padStart(2, '0');
|
|
|
|
+
|
|
|
|
+ return `${year}-${month}-${day}-${hours}-${minutes}-${seconds}`;
|
|
|
|
+}
|
|
|
|
+
|
|
function handleDetails(row) {
|
|
function handleDetails(row) {
|
|
console.log(row, router)
|
|
console.log(row, router)
|
|
}
|
|
}
|
|
|
|
+
|
|
function msDetail(row) {
|
|
function msDetail(row) {
|
|
open.value = true;
|
|
open.value = true;
|
|
title.value = "[" + row.objName + "]详情";
|
|
title.value = "[" + row.objName + "]详情";
|
|
@@ -154,6 +182,7 @@ function msDetail(row) {
|
|
msList.value = response.data.detail;
|
|
msList.value = response.data.detail;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
const {queryParams, form} = toRefs(data);
|
|
const {queryParams, form} = toRefs(data);
|
|
|
|
|
|
function initChart(res) {
|
|
function initChart(res) {
|
|
@@ -577,6 +606,7 @@ function initMs(res) {
|
|
};
|
|
};
|
|
myChart.setOption(option)
|
|
myChart.setOption(option)
|
|
}
|
|
}
|
|
|
|
+
|
|
function dl(modelId, name) {
|
|
function dl(modelId, name) {
|
|
title.value = "[" + name + "] 组件压力排行";
|
|
title.value = "[" + name + "] 组件压力排行";
|
|
sl.value = true;
|
|
sl.value = true;
|