feat: dd
This commit is contained in:
parent
53f73d045c
commit
67b3943dc4
19
.vscode/settings.json
vendored
Normal file
19
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"sqltools.connections": [
|
||||||
|
{
|
||||||
|
"mysqlOptions": {
|
||||||
|
"authProtocol": "default",
|
||||||
|
"enableSsl": "Disabled"
|
||||||
|
},
|
||||||
|
"previewLimit": 50,
|
||||||
|
"server": "localhost",
|
||||||
|
"port": 3306,
|
||||||
|
"driver": "MySQL",
|
||||||
|
"name": "tavi-universe",
|
||||||
|
"group": "local",
|
||||||
|
"username": "root",
|
||||||
|
"password": "root",
|
||||||
|
"database": "rbac"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
89
.vscode/tasks.json
vendored
89
.vscode/tasks.json
vendored
|
@ -5,17 +5,17 @@
|
||||||
"label": "start-all-tasks",
|
"label": "start-all-tasks",
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"build:pkg",
|
"build:pkg",
|
||||||
"cert-authorize",
|
|
||||||
"cert-authenticate",
|
|
||||||
"cert-gateway",
|
|
||||||
"cert-web",
|
"cert-web",
|
||||||
"aorta-web",
|
"aorta-web",
|
||||||
"aorta-gateway",
|
|
||||||
"dmp-archive",
|
|
||||||
"dmp-web",
|
"dmp-web",
|
||||||
"dmp-gateway",
|
"logger",
|
||||||
|
"cert-authorize",
|
||||||
|
"cert-authenticate",
|
||||||
|
"dmp-archive",
|
||||||
"dicom",
|
"dicom",
|
||||||
"logger"
|
"dmp-gateway",
|
||||||
|
"aorta-gateway",
|
||||||
|
"cert-gateway",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -27,6 +27,14 @@
|
||||||
"for package in @tavi/util @tavi/oss @tavi/i18n; do (pnpm run --filter $package build); done && echo 'build:pkg completed'"
|
"for package in @tavi/util @tavi/oss @tavi/i18n; do (pnpm run --filter $package build); done && echo 'build:pkg completed'"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "logger",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "pnpm",
|
||||||
|
"args": [
|
||||||
|
"dev:logger",
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "aorta-web",
|
"label": "aorta-web",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
@ -39,33 +47,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "aorta-gateway",
|
"label": "cert-web",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm",
|
"command": "pnpm",
|
||||||
"args": [
|
"args": [
|
||||||
"dev:aorta-gateway",
|
"dev:cert-web"
|
||||||
],
|
|
||||||
"dependsOn": [
|
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "dmp-archive",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "pnpm",
|
|
||||||
"args": [
|
|
||||||
"dev:dmp-archive",
|
|
||||||
],
|
|
||||||
"dependsOn": [
|
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "dmp-gateway",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "pnpm",
|
|
||||||
"args": [
|
|
||||||
"dev:dmp-gateway",
|
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"build:pkg"
|
"build:pkg"
|
||||||
|
@ -83,15 +69,13 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "logger",
|
"label": "dmp-archive",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm",
|
"command": "pnpm",
|
||||||
"args": [
|
"args": [
|
||||||
"dev:logger",
|
"dev:dmp-archive",
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOrder": "sequence",
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "dicom",
|
"label": "dicom",
|
||||||
|
@ -100,9 +84,7 @@
|
||||||
"args": [
|
"args": [
|
||||||
"dev:dicom",
|
"dev:dicom",
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOrder": "sequence",
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cert-authorize",
|
"label": "cert-authorize",
|
||||||
|
@ -111,9 +93,7 @@
|
||||||
"args": [
|
"args": [
|
||||||
"dev:authorize",
|
"dev:authorize",
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOrder": "sequence",
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cert-authenticate",
|
"label": "cert-authenticate",
|
||||||
|
@ -122,9 +102,7 @@
|
||||||
"args": [
|
"args": [
|
||||||
"dev:authenticate"
|
"dev:authenticate"
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOrder": "sequence",
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cert-gateway",
|
"label": "cert-gateway",
|
||||||
|
@ -133,20 +111,25 @@
|
||||||
"args": [
|
"args": [
|
||||||
"dev:cert-gateway"
|
"dev:cert-gateway"
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOrder": "sequence",
|
||||||
"build:pkg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cert-web",
|
"label": "dmp-gateway",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm",
|
"command": "pnpm",
|
||||||
"args": [
|
"args": [
|
||||||
"dev:cert-web"
|
"dev:dmp-gateway",
|
||||||
],
|
],
|
||||||
"dependsOn": [
|
"dependsOrder": "sequence",
|
||||||
"build:pkg"
|
},
|
||||||
]
|
{
|
||||||
|
"label": "aorta-gateway",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "pnpm",
|
||||||
|
"args": [
|
||||||
|
"dev:aorta-gateway",
|
||||||
|
],
|
||||||
|
"dependsOrder": "sequence",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
10
apps/dmp/src/modules/Admin/Label/index.less
Normal file
10
apps/dmp/src/modules/Admin/Label/index.less
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
.label-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 4fr;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
aside {
|
||||||
|
padding: 20px 20px 0 20px;
|
||||||
|
border-right: 1px solid rgba(5, 5, 5, 0.06);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,59 @@
|
||||||
|
import { CSSProperties } from "react";
|
||||||
|
import "./index.less";
|
||||||
|
import { Collapse, CollapseProps, theme } from "antd";
|
||||||
|
import { CaretRightOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
interface LabelProps {
|
interface LabelProps {
|
||||||
children?: JSX.Element;
|
children?: JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const content = (
|
||||||
|
<ul>
|
||||||
|
<li>切片太少</li>
|
||||||
|
<li>{"层厚>1.0mm"}</li>
|
||||||
|
</ul>
|
||||||
|
);
|
||||||
|
const getItems: (panelStyle: CSSProperties) => CollapseProps["items"] = (
|
||||||
|
panelStyle
|
||||||
|
) => [
|
||||||
|
{
|
||||||
|
key: "1",
|
||||||
|
label: "影像质量",
|
||||||
|
children: content,
|
||||||
|
style: panelStyle,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "2",
|
||||||
|
label: "其他",
|
||||||
|
children: <p>1</p>,
|
||||||
|
style: panelStyle,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export const Label = (props: LabelProps) => {
|
export const Label = (props: LabelProps) => {
|
||||||
return <div>Label</div>
|
const { token } = theme.useToken();
|
||||||
}
|
|
||||||
|
const panelStyle: React.CSSProperties = {
|
||||||
|
marginBottom: 12,
|
||||||
|
background: token.colorFillAlter,
|
||||||
|
borderRadius: token.borderRadiusLG,
|
||||||
|
border: "none",
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="label-container">
|
||||||
|
<aside>
|
||||||
|
<Collapse
|
||||||
|
bordered={false}
|
||||||
|
defaultActiveKey={[]}
|
||||||
|
expandIcon={({ isActive }) => (
|
||||||
|
<CaretRightOutlined rotate={isActive ? 90 : 0} />
|
||||||
|
)}
|
||||||
|
style={{ background: token.colorBgContainer }}
|
||||||
|
items={getItems(panelStyle)}
|
||||||
|
/>
|
||||||
|
</aside>
|
||||||
|
<main>标签相关数据</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
7
apps/dmp/src/modules/Admin/Logger/index.tsx
Normal file
7
apps/dmp/src/modules/Admin/Logger/index.tsx
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
interface LoggerProps {
|
||||||
|
children?: JSX.Element;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Logger = (props: LoggerProps) => {
|
||||||
|
return <div>Logger</div>;
|
||||||
|
};
|
|
@ -5,6 +5,7 @@ import {
|
||||||
DatabaseOutlined,
|
DatabaseOutlined,
|
||||||
TagsOutlined,
|
TagsOutlined,
|
||||||
UnorderedListOutlined,
|
UnorderedListOutlined,
|
||||||
|
ProfileOutlined
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Outlet } from "react-router";
|
import { Outlet } from "react-router";
|
||||||
import { MenuProps } from "antd";
|
import { MenuProps } from "antd";
|
||||||
|
@ -18,9 +19,10 @@ export type MenuItem = Required<MenuProps>["items"][number];
|
||||||
const adminMenuItems: MenuItem[] = [
|
const adminMenuItems: MenuItem[] = [
|
||||||
getItem("影像", "dicom", <DatabaseOutlined />, [
|
getItem("影像", "dicom", <DatabaseOutlined />, [
|
||||||
getItem("上传", "/upload", <CloudUploadOutlined />),
|
getItem("上传", "/upload", <CloudUploadOutlined />),
|
||||||
getItem("列表", "/list", <UnorderedListOutlined />),
|
getItem("全部", "/list", <UnorderedListOutlined />),
|
||||||
]),
|
]),
|
||||||
getItem("标签", "/label", <TagsOutlined />),
|
getItem("标签", "/label", <TagsOutlined />),
|
||||||
|
getItem("日志", "/logger", <ProfileOutlined />),
|
||||||
];
|
];
|
||||||
|
|
||||||
export const AdminDashboard = (props: AdminDashboardProps) => {
|
export const AdminDashboard = (props: AdminDashboardProps) => {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { ROLE_NAME } from "@/constant";
|
||||||
import { AdminDashboard } from "@/modules/Admin";
|
import { AdminDashboard } from "@/modules/Admin";
|
||||||
import { AnnotatorDashBoard } from "@/modules/Annotator";
|
import { AnnotatorDashBoard } from "@/modules/Annotator";
|
||||||
import { Label } from "@/modules/Admin/Label";
|
import { Label } from "@/modules/Admin/Label";
|
||||||
|
import { Logger } from "@/modules/Admin/Logger";
|
||||||
|
|
||||||
export const roleRoutes: Record<ROLE_NAME, (RouteObject & ExpandRouteProps)[]> =
|
export const roleRoutes: Record<ROLE_NAME, (RouteObject & ExpandRouteProps)[]> =
|
||||||
{
|
{
|
||||||
|
@ -34,18 +35,12 @@ export const roleRoutes: Record<ROLE_NAME, (RouteObject & ExpandRouteProps)[]> =
|
||||||
path: "/label",
|
path: "/label",
|
||||||
element: <Label />,
|
element: <Label />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/logger",
|
||||||
|
element: <Logger />,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// path: "/list",
|
|
||||||
// element: <DicomList />,
|
|
||||||
// title: "管理员",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: "/upload",
|
|
||||||
// element: <DicomUpload />,
|
|
||||||
// title: "管理员",
|
|
||||||
// },
|
|
||||||
],
|
],
|
||||||
/**
|
/**
|
||||||
* 标注
|
* 标注
|
||||||
|
|
22
apps/services/alg/app.py
Normal file
22
apps/services/alg/app.py
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
from flask import Flask, request, jsonify
|
||||||
|
import nats.aio.client
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
nc = nats.aio.client.Client()
|
||||||
|
|
||||||
|
@app.route('/send_to_nats', methods=['POST'])
|
||||||
|
def send_to_nats():
|
||||||
|
loop = asyncio.new_event_loop()
|
||||||
|
asyncio.set_event_loop(loop)
|
||||||
|
loop.run_until_complete(send_message(request.json))
|
||||||
|
print("1")
|
||||||
|
return 111
|
||||||
|
|
||||||
|
async def send_message(message):
|
||||||
|
await nc.connect(servers=["nats://localhost:4222"])
|
||||||
|
await nc.publish(jsonify({"cmd": "alg.test"}), str(message).encode())
|
||||||
|
await nc.close()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run(debug=True)
|
2
apps/services/alg/requirements.txt
Normal file
2
apps/services/alg/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
flask
|
||||||
|
asyncio-nats-client
|
|
@ -94,6 +94,7 @@ export class RbacService {
|
||||||
* 2. 更新最新的permissions
|
* 2. 更新最新的permissions
|
||||||
*/
|
*/
|
||||||
async initPermission(permissions: PermissionItem[]) {
|
async initPermission(permissions: PermissionItem[]) {
|
||||||
|
console.log('初始化permission表');
|
||||||
const records = permissions.map((i) => ({
|
const records = permissions.map((i) => ({
|
||||||
...i,
|
...i,
|
||||||
name: i.name,
|
name: i.name,
|
||||||
|
|
|
@ -29,4 +29,9 @@ export class AppController {
|
||||||
async saveLogger(payload: UserSignLoggerDto) {
|
async saveLogger(payload: UserSignLoggerDto) {
|
||||||
return 'ok';
|
return 'ok';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventPattern({ cmd: 'alg.test' })
|
||||||
|
async algTest(payload) {
|
||||||
|
return 'ok';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
0
architecture.drawio
Normal file
0
architecture.drawio
Normal file
Loading…
Reference in New Issue
Block a user