fix: bugs

This commit is contained in:
李如威 2025-09-30 10:47:12 +08:00
parent 10ddfaec96
commit d94f215467
6 changed files with 45 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# ====== python step ====== # ====== python step ======
FROM python:3.13 AS python FROM python:3.13-slim AS python
# ====== install step ====== # ====== install step ======
FROM python AS install FROM python AS install
# ENV PIP_SOURCE https://pypi.tuna.tsinghua.edu.cn/simple/ # ENV PIP_SOURCE https://pypi.tuna.tsinghua.edu.cn/simple/
@ -14,5 +14,5 @@ COPY . /app
# CMD ["python", "server.py"] # CMD ["python", "server.py"]
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT ["python3"] ENTRYPOINT ["python3"]
CMD ["server.py"] CMD ["./app/main.py"]

View File

@ -2,6 +2,7 @@ from tortoise import fields
from .system import BaseModel from .system import BaseModel
class User(BaseModel): class User(BaseModel):
username = fields.CharField(max_length=50, null=True) username = fields.CharField(max_length=50, null=True)
password = fields.CharField(max_length=128, null=True) password = fields.CharField(max_length=128, null=True)
level = fields.IntField(default=1, null=True, description="0:超级用户 1:普通用户") level = fields.IntField(default=1, null=True, description="0:超级用户 1:普通用户")

View File

@ -19,7 +19,7 @@ services:
ports: ports:
- "1338:80" # 将 Nginx 的 80 端口映射到主机的 1337 端口 - "1338:80" # 将 Nginx 的 80 端口映射到主机的 1337 端口
depends_on: depends_on:
- dbdai-server # 确保 Sanic 服务先启动 - workflow-server # 确保 Sanic 服务先启动
networks: networks:
workflow: workflow:
driver: bridge driver: bridge

View File

@ -0,0 +1,6 @@
import { request } from "./base";
export const isInit = async () => {
return request("/api/check_init", "GET")
}

View File

@ -0,0 +1,34 @@
import { ProForm, ProFormSelect, ProFormText } from "@ant-design/pro-components";
import { Card, Divider } from "antd";
const rules = [{required: true}]
const InitPage = () => {
return (
<div style={{ width: '100vw', height: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center', background: '#f2f3f5' }}>
<Card title='初始化' style={{ width: 400}}>
<ProForm layout='horizontal'>
<Divider orientation="left">超级帐号</Divider>
<ProFormText
name="account"
label="帐号"
disabled
/>
<ProFormText.Password
name="admin_password"
label="密码"
rules={rules}
/>
<Divider orientation="left">数据库配置</Divider>
<ProFormSelect
name="db_type"
options={[{ label: 'SQLite', value: 'sqlite' }, { label: 'MySql', value: 'mysql' }]}
label="数据库"
rules={rules}
/>
</ProForm>
</Card>
</div>
)
}
export default InitPage;

View File

@ -9,10 +9,7 @@ const LogDetail = ({ record }) => {
label: e?.title, label: e?.title,
children: <p style={e?.result?.err ? { color: 'red' } : {}}> {e?.result?.err || e?.result?.out }</p> children: <p style={e?.result?.err ? { color: 'red' } : {}}> {e?.result?.err || e?.result?.out }</p>
})) }))
console.log(items)
return <> return <>
<a onClick={() => setOpen(true)}>查看</a> <a onClick={() => setOpen(true)}>查看</a>
<Modal width={800} open={open} onCancel={() => setOpen(false)} title="日志详情"> <Modal width={800} open={open} onCancel={() => setOpen(false)} title="日志详情">