feat: 完善节点树的静态展示和修复删除文件的bug

develop2
donghao 10 months ago
parent 9f5cd5caf1
commit 3a2db5a76c

@ -0,0 +1,3 @@
<svg>
<path d="M0,0 Q150,150 300,300" stroke="black" fill="transparent" />
</svg>

After

Width:  |  Height:  |  Size: 85 B

@ -52,3 +52,32 @@
.base_tree_wrap .tree_search_form .ant-form-item {
margin: 0;
}
/* 节点树优化 */
.base_tree_wrap .ant-tree-treenode:not(.tree_node_0) {
padding-top: 0;
padding-bottom: 0;
line-height: 32px;
}
.base_tree_wrap .ant-tree-treenode:not(.tree_node_0) .ant-tree-switcher,
.base_tree_wrap .ant-tree-treenode:not(.tree_node_0) .ant-tree-node-content-wrapper {
line-height: 32px;
}
.base_tree_wrap .ant-tree.ant-tree-show-line .ant-tree-indent-unit:before,
.base_tree_wrap .ant-tree .ant-tree-switcher-leaf-line:before {
border-inline-end: 1px solid #154ddd;
}
.base_tree_wrap .ant-tree .ant-tree-switcher-leaf-line:after {
border-bottom: 1px solid #154ddd;
}
.base_tree_wrap .ant-tree .ant-tree-treenode {
padding-left: 17px;
width: 100%;
}
.ant-tree-indent-unit:before {
position: absolute;
top: 0;
bottom: -4px;
content: '';
inset-inline-end: 12px;
border-inline-end: 1px solid red;
}

@ -61,3 +61,47 @@
}
}
}
/* 节点树优化 */
.base_tree_wrap {
.ant-tree-treenode:not(.tree_node_0) {
padding-top: 0;
padding-bottom: 0;
line-height: 32px;
.ant-tree-switcher,
.ant-tree-node-content-wrapper {
line-height: 32px;
}
}
.ant-tree {
&.ant-tree-show-line .ant-tree-indent-unit:before,
.ant-tree-switcher-leaf-line:before {
border-inline-end: 1px solid #154ddd;
}
.ant-tree-switcher-leaf-line:after {
border-bottom: 1px solid #154ddd;
}
.ant-tree-treenode {
width: 100%;
padding-left: 17px;
}
// &.ant-tree-show-line {
// .tree_node_1 {
// .ant-tree-indent-unit:before {
// border-inline-end: 1px solid transparent;
// }
// }
// }
}
}
.ant-tree-indent-unit:before {
position: absolute;
top: 0;
bottom: -4px;
content: '';
inset-inline-end: 12px;
border-inline-end: 1px solid red;
}

@ -168,7 +168,7 @@ const BaseTree: React.FC<BaseTreeProps> = (props) => {
const renderTreeItem = (node) => {
return (
<div className="flex w-full">
<span className="w-[130px]">{node.title}</span>
<span className="pr-[20px]">{node.title}</span>
{!props?.hideInDelete ? (
<span
className="action_list"
@ -217,6 +217,7 @@ const BaseTree: React.FC<BaseTreeProps> = (props) => {
)}
<div style={{ maxHeight: 'calc(100vh - 210px)', overflowY: 'auto', overflowX: 'hidden' }}>
<Tree
showLine
selectedKeys={currSeleted}
defaultExpandAll
onSelect={(selectedKeys, info) => {

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-26 11:11:05
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-05-29 14:19:24
* @LastEditTime: 2024-06-26 14:41:15
* @FilePath: \general-ai-manage\src\components\Tree\src\deviceGroupTree.tsx
* @Description:
* @
@ -52,6 +52,7 @@ const DeviceGroupTree: React.FC<DeviceGroupTreeProps> = (props) => {
e.stopPropagation();
handleAdd(node);
}}
className={node?.key ? '' : 'pl-[5px]'}
style={{ color: token.colorPrimary }}
key={node?.key || 'add'}
>

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-06-04 15:14:27
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-17 14:23:18
* @LastEditTime: 2024-06-26 15:16:52
* @FilePath: \general-ai-platform-web\src\components\UploadFile\src\FormUploadDraggerToken.tsx
* @Description:
* // TODO 需要支持多文件上传
@ -84,7 +84,7 @@ const FormUploadDraggerToken: React.FC<FormUploadDraggerTokenProps> = (props) =>
const onRemoveFile = async (file: UploadFile<R<string>>) => {
console.log(file, 'onRemoveFile_file', fileList);
const currFile = fileList.find((item) => item.uid === file.uid);
const resp = await apiFileDelete({ file_md5: currFile?.fileId });
const resp = await apiFileDelete({ file_md5: currFile?.fileId || file?.uid });
console.log(resp, 'apiFileDelete_resp');
props.afterRemoveFile(resp, file);
setPreviewFile(null);

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-04-08 10:36:06
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-25 14:32:10
* @LastEditTime: 2024-06-26 09:16:11
* @FilePath: \general-ai-manage\src\pages\Model\ModelDetail\index.tsx
* @Description:
* @
@ -321,7 +321,7 @@ const ModelDetail: React.FC = () => {
search={false}
options={{ fullScreen: false, setting: false, density: false, reload: false }}
actionRef={actionRef}
rowKey="id"
rowKey="version_id"
onDataSourceChange={(data) => {
console.log(data, 'onDataSourceChange_data');
// let CategoryFkIdIds: any = data.map((v) => {

Loading…
Cancel
Save