Commit 53f3ef04 authored by 吴永生#A02208's avatar 吴永生#A02208

fix: 文件传输bug修改

parent f8d48b43
...@@ -25,7 +25,7 @@ const UseTusUpload = (uploadInfoStore: any) => { ...@@ -25,7 +25,7 @@ const UseTusUpload = (uploadInfoStore: any) => {
let json = { let json = {
name: file.name, name: file.name,
bytesUploaded: 0, bytesUploaded: 0,
bytesTotal: 0, bytesTotal: file?.size,
percentage: 0, percentage: 0,
startTime: new Date().getTime(), startTime: new Date().getTime(),
endTime: new Date().getTime() + 1000, endTime: new Date().getTime() + 1000,
......
...@@ -29,6 +29,7 @@ const FileItem = observer((props: IProps) => { ...@@ -29,6 +29,7 @@ const FileItem = observer((props: IProps) => {
const itemInfo = toJS(fileItemInfo)?.info; const itemInfo = toJS(fileItemInfo)?.info;
const { statusMsg = "" } = itemInfo || {}; const { statusMsg = "" } = itemInfo || {};
const uploadInfoStore = toJS(useGlobalStore("fileListStore")); const uploadInfoStore = toJS(useGlobalStore("fileListStore"));
const currentProjectStore = toJS(useGlobalStore("currentProjectStore"));
const Message = useMessage(); const Message = useMessage();
const navigate = useNavigate(); const navigate = useNavigate();
...@@ -98,17 +99,26 @@ const FileItem = observer((props: IProps) => { ...@@ -98,17 +99,26 @@ const FileItem = observer((props: IProps) => {
</span> </span>
)} )}
</div> </div>
{statusMsg !== "上传成功" ? (
<LinearProgress <LinearProgress
sx={{ width: 300, borderRadius: 2, margin: "6px 0", color: "red" }} sx={{
width: 300,
borderRadius: 2,
margin: "6px 0",
color: "red",
}}
variant="determinate" variant="determinate"
value={itemInfo?.percentage} value={itemInfo?.percentage}
/> />
) : null}
<div style={{ fontSize: 12 }}> <div style={{ fontSize: 12 }}>
{statusMsg === "上传成功" ? ( {statusMsg === "上传成功" ? (
<> <>
<span style={{ color: "#8A9099" }}>已上传至</span> <span style={{ color: "#8A9099" }}>已上传至</span>
<span style={{ color: "#565C66", marginLeft: 12 }}> <span style={{ color: "#565C66", marginLeft: 12 }}>
{fileItemInfo?.path} {`CADD - ${
currentProjectStore?.currentProjectInfo?.name || ""
}`}
</span> </span>
</> </>
) : ( ) : (
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13 * @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-16 17:26:40 * @LastEditTime: 2022-06-16 18:17:04
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -65,7 +65,7 @@ const ProjectMembers = observer(() => { ...@@ -65,7 +65,7 @@ const ProjectMembers = observer(() => {
label: "操作", label: "操作",
width: 160, width: 160,
render: (item: any, row: any) => { render: (item: any, row: any) => {
return item.projectRole === "OWNER" ? null : ( return item?.projectRole === "OWNER" ? null : (
<> <>
<span <span
style={{ color: "#1370FF", cursor: "pointer" }} 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