提交 73172069 authored 作者: Administrator's avatar Administrator

1

上级 fa3d44fd
差异被折叠。
......@@ -5,8 +5,8 @@
<link rel="icon" href="/lq-control/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>管理中心</title>
<script type="module" crossorigin src="/lq-control/assets/index-DO6WOE4z.js"></script>
<link rel="stylesheet" crossorigin href="/lq-control/assets/index--zuAVKGa.css">
<script type="module" crossorigin src="/lq-control/assets/index-D48jZVNT.js"></script>
<link rel="stylesheet" crossorigin href="/lq-control/assets/index-CGb-n9UQ.css">
</head>
<body>
<div id="app"></div>
......
<template>
<el-dialog v-model="show" :title="title" width="60%" @close="handleClose">
<el-scrollbar height="600px" style="background-color: black; color: #ffffff; padding: 12px">
<p v-for="(item, index) in logsText" :key="index" style="margin-bottom: 3px">{{ item }}</p>
</el-scrollbar>
</el-dialog>
</template>
<script setup lang="ts">
import { getLogs } from '@/api'
const show = ref(false)
const logsText = ref()
const title = ref()
const init = async (row: any, logsMinutes: number) => {
title.value = row.name + '日志'
const res: any = await getLogs({
containerId: row.containerId,
timeInMinutes: logsMinutes
})
if (res.code === 200) {
logsText.value = res.data
console.log(logsText.value)
}
}
const handleClose = () => {
show.value = false
logsText.value = null
}
defineExpose({
show,
init
})
</script>
<style scoped></style>
<template>
<el-dialog v-model="show" :title="title" width="60%" @close="handleClose">
<el-scrollbar height="600px" style="background-color: black; color: #ffffff; padding: 12px">
<p v-for="(item, index) in logsText" :key="index" style="margin-bottom: 3px">{{ item }}</p>
</el-scrollbar>
<div style="margin-top: 20px; text-align: end">
<el-input-number v-model="num" :min="1" style="margin-right: 20px" />
<el-button type="primary" @click="init(rowData, num)">刷新日志</el-button>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { getLogs } from '@/api'
const show = ref(false)
const logsText = ref()
const title = ref()
const rowData = ref()
const num = ref(1)
const init = async (row: any, logsMinutes: number) => {
rowData.value = row
num.value = logsMinutes
title.value = row.name + '日志'
const res: any = await getLogs({
containerId: row.containerId,
timeInMinutes: logsMinutes
})
if (res.code === 200) {
logsText.value = res.data
ElMessage.success('获取日志成功')
} else {
ElMessage.error('获取日志失败')
}
}
const handleClose = () => {
show.value = false
logsText.value = null
rowData.value = null
num.value = 1
}
defineExpose({
show,
init
})
</script>
<style scoped></style>
......@@ -14,21 +14,21 @@ export const menuList = [
path: '/imageManagement',
name: '容器管理'
},
{
index: 4,
path: '/jarManagement',
name: 'jar包管理'
},
{
index: 5,
path: '/execute',
name: '执行计划'
},
{
index: 6,
path: '/syncConfig',
name: '产品管理'
},
// {
// index: 4,
// path: '/jarManagement',
// name: 'jar包管理'
// },
// {
// index: 5,
// path: '/execute',
// name: '执行计划'
// },
// {
// index: 6,
// path: '/syncConfig',
// name: '产品管理'
// },
{
index: 7,
path: '/systemBackup',
......
......@@ -22,6 +22,7 @@ declare module 'vue' {
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
......
......@@ -52,10 +52,10 @@ export default defineConfig({
// 设置代理
proxy: {
'/admin': {
target: 'http://192.168.1.160:8080/'
target: 'http://192.168.1.132:8080/'
},
'/webApi': {
target: 'http://192.168.1.160:8003/'
target: 'http://192.168.1.132:8003/'
}
}
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论