From 99b65965c6d1ea1e300c73f0a75859743c036bf8 Mon Sep 17 00:00:00 2001 From: WenC <450292408@qq.com> Date: Sun, 21 Apr 2024 16:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5AI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ai/AiHelper.tsx | 187 +++++++++++++++++---------------- src/route/proj/ProjEdit.tsx | 1 + 2 files changed, 99 insertions(+), 89 deletions(-) diff --git a/src/components/ai/AiHelper.tsx b/src/components/ai/AiHelper.tsx index d5ddb30..957eace 100644 --- a/src/components/ai/AiHelper.tsx +++ b/src/components/ai/AiHelper.tsx @@ -1,7 +1,7 @@ import {useContext, useEffect, useRef, useState} from "react"; import {GlobalContext} from "../../context/GlobalContext.ts"; import {put, WebSocketBaseUrl} from "../../util/AjaxUtils.ts"; -import {Button, Divider, Empty, Space, Spin, Table, TableProps} from "antd"; +import {Button, Col, Divider, Empty, Row, Space, Spin, Table, TableProps} from "antd"; import {CheckOutlined, ReloadOutlined} from "@ant-design/icons"; import useMessage from "antd/es/message/useMessage"; @@ -78,7 +78,8 @@ export default function AiHelper(props: PropsType) { } const projModColumnArray: TableProps['columns'] = [ - {title: '模块名称', dataIndex: 'name', key: 'name', width: 150, align: 'center'}, + {title: '序号', dataIndex: 'index', key: 'index', width: 60, align: 'center', render: (value, record, index) => {return index + 1}}, + {title: '模块名称', dataIndex: 'name', key: 'name', width: 200, align: 'center'}, {title: '模块描述', dataIndex: 'desc', key: 'desc', align: 'center'}, ]; @@ -167,92 +168,100 @@ export default function AiHelper(props: PropsType) { return ( <> {messageApiHolder} -
项目简介
- -
- {newProjIntroduction ? 原简介 : <>} - {projIntroduction ?
{projIntroduction}
: } - { - newProjIntroduction ? ( - <> - 新简介 -
{newProjIntroduction}
- - ) : <> - } -
-
- { - newProjIntroduction ? ( - - - - - ) : - } -
-
- -
项目详情
- -
- {newProjDesc ? 原详情 : <>} - {projDesc ?
{projDesc}
: } - { - newProjDesc ? ( - <> - 新详情 -
{newProjDesc}
- - ) : <> - } -
-
- { - newProjDesc ? ( - - - - - ) : - } -
-
- -
项目模块
- -
- {newProjModArray.length > 0 ? 原模块 : <>} - - { - newProjModArray.length > 0 ? ( - <> - 新模块 -
- - ) : <> - } - -
- { - newProjModArray.length > 0 ? ( - - - - - ) : - } -
- + + +
项目简介
+ +
+ {newProjIntroduction ? 原简介 : <>} + {projIntroduction ?
{projIntroduction}
: } + { + newProjIntroduction ? ( + <> + 新简介 +
{newProjIntroduction}
+ + ) : <> + } +
+
+ { + newProjIntroduction ? ( + + + + + ) : + } +
+
+ + + +
项目详情
+ +
+ {newProjDesc ? 原详情 : <>} + {projDesc ?
{projDesc}
: } + { + newProjDesc ? ( + <> + 新详情 +
{newProjDesc}
+ + ) : <> + } +
+
+ { + newProjDesc ? ( + + + + + ) : + } +
+
+ +
+ +
项目模块
+ +
+ {newProjModArray.length > 0 ? 原模块 : <>} +
+ { + newProjModArray.length > 0 ? ( + <> + 新模块 +
+ + ) : <> + } + +
+ { + newProjModArray.length > 0 ? ( + + + + + ) : + } +
+ + + -) + ) } \ No newline at end of file diff --git a/src/route/proj/ProjEdit.tsx b/src/route/proj/ProjEdit.tsx index a3d5ae2..879130c 100644 --- a/src/route/proj/ProjEdit.tsx +++ b/src/route/proj/ProjEdit.tsx @@ -434,6 +434,7 @@ export default function ProjEdit() { { setAiHelperModalOpen(false);