Commit 14c3fbb4 authored by 吴永生#A02208's avatar 吴永生#A02208

fix: 文件上传列表添加图片

parent 1d039edc
import React from "react";
import React, { useCallback} from "react";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
import TableCell from "@mui/material/TableCell";
......@@ -100,6 +99,18 @@ export default function EnhancedTable(props) {
const emptyRows = rowsPerPage - Math.min(rowsPerPage, rows.length - page * rowsPerPage);
const renderTableCellValue = useCallback(((item, row, index)=>{
if(
item.render
) {
return <>{item.render(row[item.id], row, index)}</>
} else if(row[item.id]) {
return row[item.id] || '-'
} else {
return '-'
}
}),[])
return (
<div className={classes.root}>
<Paper sx={{
......@@ -189,8 +200,7 @@ export default function EnhancedTable(props) {
body: props.bodyTableCell || classes.bodyTableCell
}}
> {
item.render ? <>{item.render(row[item.id], row, index)}</> :
row[item.id]
renderTableCellValue(item, row, index)
}
</TableCell>
)
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-11 09:33:46
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-16 11:50:31
* @LastEditTime: 2022-06-16 14:21:00
* @FilePath: /bkunyun/src/components/mui/MyPopover.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
......@@ -8,6 +8,7 @@ import { formatTime, storageUnitFromB } from "@/utils/util";
import useGlobalStore from "@/hooks/useGlobalStore";
import { IUploadInfo } from "@/store/modules/fileList";
import { useMessage } from "@/components/MySnackbar";
import bkunyunFile from "@/assets/img/bkunyunFile.svg";
import styles from "./index.module.css";
......@@ -80,7 +81,7 @@ const FileItem = observer((props: IProps) => {
return (
<div className={styles.itemBox}>
<div className={styles.leftBox}>
<img />
<img src={bkunyunFile} alt="" style={{ marginRight: 16 }} />
<div>
<div>
<b className={styles.fileNameBox} title={itemInfo?.name || ""}>
......
......@@ -88,6 +88,7 @@ const ProjectData = observer(() => {
useEffect(() => {
const locationInfo: any = location?.state;
setPath(locationInfo?.pathName || "");
handleRefresh();
}, [location]);
// 列表展示的数据
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-16 11:30:25
* @LastEditTime: 2022-06-16 17:26:40
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -65,7 +65,7 @@ const ProjectMembers = observer(() => {
label: "操作",
width: 160,
render: (item: any, row: any) => {
return projectOwner === row?.username ? null : (
return item.projectRole === "OWNER" ? null : (
<>
<span
style={{ color: "#1370FF", cursor: "pointer" }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment