提交 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>
......
......@@ -3,6 +3,10 @@
<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>
......@@ -11,8 +15,12 @@ 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,
......@@ -20,13 +28,17 @@ const init = async (row: any, logsMinutes: number) => {
})
if (res.code === 200) {
logsText.value = res.data
console.log(logsText.value)
ElMessage.success('获取日志成功')
} else {
ElMessage.error('获取日志失败')
}
}
const handleClose = () => {
show.value = false
logsText.value = null
rowData.value = null
num.value = 1
}
defineExpose({
......
......@@ -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']
......
......@@ -304,13 +304,21 @@ const handleSelectFile = async () => {
const handleFileChange = (event: any) => {
const files = event.target.files
console.log('🚀 ~ handleFileChange ~ files:', files[0])
if (files.length > 1) {
ElMessage.warning('只能上传一个文件')
uploadFile.value = ''
return
}
if (files.length === 1) {
if (files[0].type !== 'application/zip') {
if (
![
'application/zip',
'application/x-zip-compressed',
'application/x-zip',
'multipart/x-zip'
].includes(files[0].type)
) {
ElMessage.warning('只允许上传 .zip 文件')
uploadFile.value = ''
} else {
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论