Commit 9c38ceef authored by 吴永生#A02208's avatar 吴永生#A02208

fix: 修改上版本的bug

parent 6ee91539
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-13 17:00:19 * @Date: 2022-06-13 17:00:19
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-14 21:47:28 * @LastEditTime: 2022-06-15 15:24:44
* @FilePath: /bkunyun/src/store/modules/upload.ts * @FilePath: /bkunyun/src/store/modules/upload.ts
* @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
*/ */
...@@ -12,6 +12,7 @@ import { makeAutoObservable, observable, action } from "mobx"; ...@@ -12,6 +12,7 @@ import { makeAutoObservable, observable, action } from "mobx";
interface IUploadInfo { interface IUploadInfo {
id: string, id: string,
open: boolean, open: boolean,
file: File,
list: any, list: any,
isPermanence: boolean, isPermanence: boolean,
} }
...@@ -34,27 +35,24 @@ class FileList { ...@@ -34,27 +35,24 @@ class FileList {
newFileList: IUploadInfo[] = []; newFileList: IUploadInfo[] = [];
/** 设置最新需要上传的文件列表 */ /** 设置最新需要上传的文件列表 */
setNewFileList (val: IUploadInfo[]) { setNewFileList = (val: IUploadInfo[]) => {
this.fileList = this.fileList.concat(val) this.fileList = this.fileList.concat(val)
this.newFileList = val this.newFileList = val
} }
/** 设置文件上传信息 */ /** 设置文件上传信息 */
setUploadInfo(id: string, val: IUploadInfo) { setUploadInfo = (id: string, val: IUploadInfo) => {
console.log(val,id,'22222') console.log(id, val,'2222')
const newFileList = this.fileList?.map((item)=>{ const newFileList = this.fileList?.map((item)=>{
if(item.id === id){ if(item.id === id){
console.log('3333',item)
return val return val
} return item } return item
}) })
this.fileList = newFileList this.fileList = newFileList
} }
setUploadInfoOpen(id: string, val: boolean) { setUploadInfoOpen = (id: string, val: boolean) => {
const newFileList = this.fileList?.map((item)=>{ const newFileList = this.fileList?.map((item)=>{
if(item.id === id){ if(item.id === id){
return {...item,open: val}; return {...item,open: val};
...@@ -64,7 +62,7 @@ class FileList { ...@@ -64,7 +62,7 @@ class FileList {
this.fileList = newFileList this.fileList = newFileList
} }
setUploadInfoList(id: string, val: any) { setUploadInfoList = (id: string, val: any) => {
const newFileList = this.fileList?.map((item)=>{ const newFileList = this.fileList?.map((item)=>{
if(item.id === id){ if(item.id === id){
return {...item, list: val} return {...item, list: val}
...@@ -73,7 +71,7 @@ class FileList { ...@@ -73,7 +71,7 @@ class FileList {
this.fileList = newFileList this.fileList = newFileList
} }
setUploadInfoIsPermanence(id: string, val: boolean) { setUploadInfoIsPermanence = (id: string, val: boolean) => {
const newFileList = this.fileList?.map((item)=>{ const newFileList = this.fileList?.map((item)=>{
if(item.id === id){ if(item.id === id){
return {...item, isPermanence: val} return {...item, isPermanence: val}
......
...@@ -8,7 +8,6 @@ import { ...@@ -8,7 +8,6 @@ import {
import { getDataFileToken } from "@/api/project_api"; import { getDataFileToken } from "@/api/project_api";
import useMyRequest from "@/hooks/useMyRequest"; import useMyRequest from "@/hooks/useMyRequest";
import { getTokenInfo } from "@/utils/util"; import { getTokenInfo } from "@/utils/util";
import ConsoleLayout from "@/views/ConsoleLayout";
const UseTusUpload = (props) => { const UseTusUpload = (props) => {
const { fileListStore: uploadInfoStore, currentProjectStore } = props; const { fileListStore: uploadInfoStore, currentProjectStore } = props;
...@@ -31,16 +30,15 @@ const UseTusUpload = (props) => { ...@@ -31,16 +30,15 @@ const UseTusUpload = (props) => {
}); });
}, []); }, []);
const { fileList } = uploadInfoStore;
const uploadFile = (item, file, url, filepath, callBack) => { const uploadFile = (item, file, url, filepath, callBack) => {
for (let i in localStorage) {
if (i.indexOf("tus::tus-br") > -1) {
localStorage.removeItem(i);
}
}
uploadInfoStore?.setUploadInfoIsPermanence(item.id, false); uploadInfoStore?.setUploadInfoIsPermanence(item.id, false);
console.log(fileList);
if (!verifyLettersNumbersCertainChars4(file.name)) { if (!verifyLettersNumbersCertainChars4(file.name)) {
let json1 = uploadInfoStore?.uploadInfo?.list.concat({ console.log(222);
let json1 = item?.list.concat({
name: file.name, name: file.name,
bytesUploaded: 0, bytesUploaded: 0,
bytesTotal: 0, bytesTotal: 0,
...@@ -56,6 +54,7 @@ const UseTusUpload = (props) => { ...@@ -56,6 +54,7 @@ const UseTusUpload = (props) => {
"上传失败,文件或文件夹的命名长度不超过127字节,不支持特殊符号、空格。", "上传失败,文件或文件夹的命名长度不超过127字节,不支持特殊符号、空格。",
}); });
uploadInfoStore?.setUploadInfo(item.id, { uploadInfoStore?.setUploadInfo(item.id, {
...item,
open: true, open: true,
list: json1, list: json1,
isPermanence: false, isPermanence: false,
...@@ -84,90 +83,50 @@ const UseTusUpload = (props) => { ...@@ -84,90 +83,50 @@ const UseTusUpload = (props) => {
}, },
onProgress: function (bytesUploaded, bytesTotal, a) { onProgress: function (bytesUploaded, bytesTotal, a) {
var percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2); var percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2);
let fliterJson = item.list?.filter((item) => item.id === timeId); const json = item.list.concat({
let json = []; name: upload.file.name,
if (fliterJson.length === 0) { bytesUploaded: bytesUploaded,
json = item.list.concat({ bytesTotal: bytesTotal,
name: upload.file.name, percentage: percentage,
bytesUploaded: bytesUploaded, startTime: new Date().getTime(),
bytesTotal: bytesTotal, endTime: new Date().getTime() + 1000,
percentage: percentage, bytesUploaded2: bytesUploaded,
startTime: new Date().getTime(), id: timeId,
endTime: new Date().getTime() + 1000, statusMsg: "正在上传",
bytesUploaded2: bytesUploaded, upload,
id: timeId, dir: "/home/cloudam/",
statusMsg: "正在上传", });
upload, console.log(item, "0111111");
dir: "/home/cloudam/", uploadInfoStore?.setUploadInfo(item.id, {
}); ...item,
uploadInfoStore?.setUploadInfo(item.id, { open: true,
open: true, list: json || [],
list: json, isPermanence: item.isPermanence,
isPermanence: uploadInfoStore?.uploadInfo?.isPermanence, });
});
} else {
let a = item.list;
let time = new Date().getTime();
a.map((element) => {
if (element.id === timeId) {
element["bytesUploaded"] = bytesUploaded;
element["bytesTotal"] = bytesTotal;
element["percentage"] = percentage;
element["bytesUploaded2"] =
parseInt((parseInt(time) - parseInt(element.endTime)) / 1000) >=
2
? bytesUploaded
: element["bytesUploaded2"];
element["endTime"] =
parseInt((parseInt(time) - parseInt(element.endTime)) / 1000) >=
2
? time
: element["endTime"];
}
});
uploadInfoStore?.setUploadInfo(item.id, {
open: true,
list: a.concat([]),
isPermanence: item.isPermanence,
});
}
}, },
onSuccess: function () { onSuccess: function () {
let fliterJson = item.list.filter((item) => item.id === timeId); let json = [];
console.log(upload.file, "9999999");
if (fliterJson.length === 0 && upload.file["size"] === 0) { json = item.list.concat({
console.log("000011111"); name: upload.file.name,
let json = []; bytesUploaded: 0,
json = item.list.concat({ bytesTotal: 0,
name: upload.file.name, id: timeId,
bytesUploaded: 0, percentage: 100,
bytesTotal: 0, startTime: new Date().getTime(),
id: timeId, endTime: new Date().getTime() + 1000,
percentage: 100, bytesUploaded2: 0,
startTime: new Date().getTime(), statusMsg: "上传成功",
endTime: new Date().getTime() + 1000, upload,
bytesUploaded2: 0, });
statusMsg: "上传成功", console.log(json, item.list, "0222222");
upload, uploadInfoStore?.setUploadInfo(item.id, {
}); ...item,
uploadInfoStore?.setUploadInfo(item.id, { open: true,
open: true, list: json,
list: json, isPermanence: item.isPermanence,
isPermanence: item.isPermanence, });
});
} else {
console.log(item.list, "000022222");
item.list.map((item) => {
if (item.id === timeId) {
item["statusMsg"] = "上传成功";
}
});
uploadInfoStore?.setUploadInfo(item.id, {
open: true,
list: item.list,
isPermanence: item.isPermanence,
});
}
callBack && callBack(upload, filepath); callBack && callBack(upload, filepath);
}, },
}); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-07 18:37:53 * @Date: 2022-06-07 18:37:53
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-14 17:21:52 * @LastEditTime: 2022-06-15 17:49:27
* @FilePath: /bkunyun/src/utils/util.ts * @FilePath: /bkunyun/src/utils/util.ts
* @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
*/ */
...@@ -29,6 +29,22 @@ export const uuid = () => { ...@@ -29,6 +29,22 @@ export const uuid = () => {
return pwd; return pwd;
}; };
/** 格式化时间 xx小时xx分钟xx秒
* params: item: 毫秒的时间戳
*/
export const formatTime = (time: number) => {
const newTime = Math.floor( time / 1000) ;
const hours = Math.floor(newTime / 3600);
const minutes = Math.floor((newTime % 3600) / 60);
const seconds = newTime % 60;
const hoursString = hours ? `${hours}小时` : '';
const minutesString = minutes ? `${minutes}分钟` : '';
const secondsString = seconds ? `${seconds}秒` : '';
return `${hoursString}${minutesString}${secondsString}`;
};
// 获取用户信息 // 获取用户信息
export const getUserInfo = () => { export const getUserInfo = () => {
let val: any; let val: any;
......
import { observer } from "mobx-react-lite"; import { toJS } from "mobx";
// import { any } from "@/store/modules/fileList";
// toJS(currentProjectStore.currentProjectInfo.id); import { LinearProgress } from "@mui/material";
import styles from "./index.module.css";
import { useMemo } from "react";
import { formatTime, storageUnitFromB } from "@/utils/util";
/* /*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-11 15:46:42 * @Date: 2022-06-11 15:46:42
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-14 21:35:09 * @LastEditTime: 2022-06-15 18:03:31
* @FilePath: /bkunyun/src/views/ConsoleLayout/components/FileItem/index.tsx * @FilePath: /bkunyun/src/views/ConsoleLayout/components/FileItem/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
*/ */
...@@ -16,8 +20,63 @@ interface IProps { ...@@ -16,8 +20,63 @@ interface IProps {
} }
const FileItem = (props: IProps) => { const FileItem = (props: IProps) => {
const { fileItemInfo } = props; const { fileItemInfo } = props;
console.log(fileItemInfo, 2222); const itemInfo = toJS(fileItemInfo);
return <div>dd</div>; const lastInfo = itemInfo?.list[itemInfo.list?.length - 1];
const firstInfo = itemInfo?.list[0];
const lastMsg = lastInfo?.statusMsg;
const TimeText = useMemo(() => {
const val = lastInfo.endTime - firstInfo.startTime;
return formatTime(val);
}, [firstInfo.startTime, lastInfo.endTime]);
const text = useMemo(() => {
let result = "";
if (lastMsg === "上传失败") {
result = "重新上传";
}
if (lastMsg === "正在上传") {
result = "暂停";
}
if (lastMsg === "上传成功") {
result = "查看文件";
}
return result;
}, [itemInfo?.list, lastMsg]);
return (
<div className={styles.itemBox}>
<div className={styles.leftBox}>
<img />
<div>
<div>
<b style={{ fontSize: 14 }}>{firstInfo?.name || ""}</b>
{lastMsg === "上传失败" ? (
<span
className={styles.span}
style={{ marginLeft: 16, color: "#FF4E4E" }}
>{`(${lastMsg})`}</span>
) : (
<span className={styles.span} style={{ marginLeft: 16 }}>
{TimeText}
</span>
)}
</div>
<LinearProgress
sx={{ width: 300, borderRadius: 2, margin: "2px 0", color: "red" }}
variant="determinate"
value={50}
/>
<div>
<span className={styles.span}>{`700MB/${storageUnitFromB(
500000
)}`}</span>
</div>
</div>
</div>
<div className={styles.rightBox}>{text}</div>
</div>
);
}; };
export default FileItem; export default FileItem;
...@@ -7,6 +7,7 @@ import Add from "@mui/icons-material/Add"; ...@@ -7,6 +7,7 @@ import Add from "@mui/icons-material/Add";
import Avatar from "@mui/material/Avatar"; import Avatar from "@mui/material/Avatar";
import { Box, Menu, MenuItem } from "@mui/material"; import { Box, Menu, MenuItem } from "@mui/material";
import uploadIcon from "@/assets/img/uploadIcon.svg";
import globalText from "@/utils/globalText_CN"; import globalText from "@/utils/globalText_CN";
import useIndex from "./useIndex"; import useIndex from "./useIndex";
import { useStores } from "@/store/index"; import { useStores } from "@/store/index";
...@@ -18,7 +19,7 @@ import TranSferList from "./components/TransferList"; ...@@ -18,7 +19,7 @@ import TranSferList from "./components/TransferList";
import style from "./index.module.css"; import style from "./index.module.css";
import useGlobalStore from "@/hooks/useGlobalStore"; import useGlobalStore from "@/hooks/useGlobalStore";
import { toJS } from "mobx"; import { toJS } from "mobx";
import { urlToken } from "@/api/fileserver/raysyncApi"; import { APIOPTION, urlToken } from "@/api/fileserver/raysyncApi";
import UseTusUpload from "@/utils/Upload/tusUpload"; import UseTusUpload from "@/utils/Upload/tusUpload";
import useMyRequest from "@/hooks/useMyRequest"; import useMyRequest from "@/hooks/useMyRequest";
import { getDataFileToken } from "@/api/project_api"; import { getDataFileToken } from "@/api/project_api";
...@@ -54,7 +55,8 @@ const ConsoleLayout = observer(() => { ...@@ -54,7 +55,8 @@ const ConsoleLayout = observer(() => {
const { run: getDataFileTokenRun } = useMyRequest(getDataFileToken, { const { run: getDataFileTokenRun } = useMyRequest(getDataFileToken, {
onSuccess: (res: any) => { onSuccess: (res: any) => {
let url = let url =
"https://fileserver.cloudam.cn/parallelupload/" + APIOPTION() +
"/parallelupload/" +
urlToken( urlToken(
res?.data || "", res?.data || "",
currentProjectStore?.currentProjectInfo?.id as string currentProjectStore?.currentProjectInfo?.id as string
...@@ -62,7 +64,7 @@ const ConsoleLayout = observer(() => { ...@@ -62,7 +64,7 @@ const ConsoleLayout = observer(() => {
fileList?.newFileList?.forEach((item: any) => { fileList?.newFileList?.forEach((item: any) => {
uploadFile( uploadFile(
item, item,
item?.list, item?.file,
url, url,
"/", "/",
(upload: any, filepath: string) => console.log(upload, filepath, 1111) (upload: any, filepath: string) => console.log(upload, filepath, 1111)
...@@ -73,6 +75,7 @@ const ConsoleLayout = observer(() => { ...@@ -73,6 +75,7 @@ const ConsoleLayout = observer(() => {
useDeepEffect(() => { useDeepEffect(() => {
if (fileList?.newFileList?.length) { if (fileList?.newFileList?.length) {
console.log(111, 222);
getDataFileTokenRun({ getDataFileTokenRun({
id: currentProjectStore?.currentProjectInfo.id || "", id: currentProjectStore?.currentProjectInfo.id || "",
}); });
...@@ -148,7 +151,11 @@ const ConsoleLayout = observer(() => { ...@@ -148,7 +151,11 @@ const ConsoleLayout = observer(() => {
}} }}
> >
<Box className={style.topRightItem}> <Box className={style.topRightItem}>
<Add /> <img
src={uploadIcon}
alt=""
style={{ verticalAlign: "middle" }}
/>
</Box> </Box>
</MyPopover> </MyPopover>
<Box className={style.topRightItem}> <Box className={style.topRightItem}>
......
...@@ -103,11 +103,11 @@ const UpLoaderFile = observer((props: any) => { ...@@ -103,11 +103,11 @@ const UpLoaderFile = observer((props: any) => {
return { return {
id: uuid(), id: uuid(),
open: false, open: false,
list: item, list: [],
file: item,
isPermanence: true, isPermanence: true,
}; };
}) || []; }) || [];
console.log(newFileList);
toJS(fileListStore?.setNewFileList)(newFileList); toJS(fileListStore?.setNewFileList)(newFileList);
}; };
......
...@@ -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-11 15:24:15 * @LastEditTime: 2022-06-15 19:04:11
* @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
*/ */
...@@ -35,16 +35,9 @@ const AddMember = observer((props: IProps) => { ...@@ -35,16 +35,9 @@ const AddMember = observer((props: IProps) => {
const [projectMember, setProjectMember] = useState(""); const [projectMember, setProjectMember] = useState("");
const [filterTableData, setFilterTableData] = useState([]); const [filterTableData, setFilterTableData] = useState([]);
const [checkData, setCheckData] = useState<string[]>([]); const [checkData, setCheckData] = useState<string[]>([]);
const [selectOptions, setSelectOptions] = useState<IOption[]>([]);
const Message = useMessage(); const Message = useMessage();
const selectOptions = useMemo(() => {
return [
{ value: "VIEWER", label: "查看者" },
{ value: "DEVELOPER", label: "研发者" },
{ value: "MANAGER", label: "管理者" },
];
}, []);
const changePermission = useCallback( const changePermission = useCallback(
(val: IOption, index: number) => { (val: IOption, index: number) => {
const tableDataIndex = tableData[index] as any; const tableDataIndex = tableData[index] as any;
...@@ -56,34 +49,54 @@ const AddMember = observer((props: IProps) => { ...@@ -56,34 +49,54 @@ const AddMember = observer((props: IProps) => {
[tableData] [tableData]
); );
const columns = [ const columns = useMemo(() => {
{ id: "checkbox", width: 50 }, return [
{ id: "username", label: "项目成员", width: 160 }, { id: "checkbox", width: 50 },
{ { id: "username", label: "项目成员", width: 160 },
id: "projectRole", {
label: "项目权限", id: "projectRole",
width: 160, label: "项目权限",
render: (item: string, row: any, index: number) => { width: 160,
const defaultValue = selectOptions.filter( render: (item: string, row: any, index: number) => {
(every) => every.value === item const defaultValue = selectOptions.filter(
); (every) => every.value === item
return ( );
<MySelect console.log(selectOptions, defaultValue, "111");
input={<OutlinedInput />} return (
value={ <MySelect
defaultValue?.length input={<OutlinedInput />}
? defaultValue[0] value={
: { value: "VIEWER", label: "查看者" } defaultValue?.length
} ? defaultValue[0]
onChange={(val) => changePermission(val, index)} : { value: "VIEWER", label: "查看者" }
options={selectOptions} }
size="small" onChange={(val) => changePermission(val, index)}
/> options={selectOptions}
); size="small"
/>
);
},
}, },
}, ];
]; }, [changePermission, selectOptions]);
useEffect(() => {
if (addMemberDialog) {
http.get<IResponse<any>>("/cpp/project/listroles").then((res) => {
const arr = [];
const { data } = res;
for (const key in data) {
arr.push({
label: String(data[key]),
value: key,
});
}
setSelectOptions(arr);
});
}
}, [addMemberDialog, http]);
/** 过滤表格数据 */
useEffect(() => { useEffect(() => {
if (!!projectMember) { if (!!projectMember) {
const newVal = const newVal =
...@@ -96,6 +109,7 @@ const AddMember = observer((props: IProps) => { ...@@ -96,6 +109,7 @@ const AddMember = observer((props: IProps) => {
} }
}, [projectMember, tableData]); }, [projectMember, tableData]);
/** 获取表格数据 */
useEffect(() => { useEffect(() => {
if (!addMemberDialog) return; if (!addMemberDialog) return;
const projectInfo = toJS(currentProjectStore?.currentProjectInfo); const projectInfo = toJS(currentProjectStore?.currentProjectInfo);
...@@ -104,9 +118,7 @@ const AddMember = observer((props: IProps) => { ...@@ -104,9 +118,7 @@ const AddMember = observer((props: IProps) => {
params: { id: projectInfo?.id || "" }, params: { id: projectInfo?.id || "" },
}) })
.then((res) => { .then((res) => {
if (res.data.length) { setTableData(res?.data);
setTableData(res?.data);
}
}); });
}, [currentProjectStore?.currentProjectInfo, http, addMemberDialog]); }, [currentProjectStore?.currentProjectInfo, http, addMemberDialog]);
......
...@@ -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-07 15:55:26 * @LastEditTime: 2022-06-15 13:50:54
* @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
*/ */
...@@ -34,10 +34,6 @@ const RemoveItem = observer((props: IProps) => { ...@@ -34,10 +34,6 @@ const RemoveItem = observer((props: IProps) => {
}; };
const onConfirm = () => { const onConfirm = () => {
const projectInfo = toJS(currentProjectStore?.currentProjectInfo); const projectInfo = toJS(currentProjectStore?.currentProjectInfo);
console.log(111111, {
id: projectInfo?.id || "",
username: removeDialog.username,
});
http http
.del<IResponse<any>>( .del<IResponse<any>>(
`/cpp/project/removemember?id=${projectInfo?.id || ""}&username=${ `/cpp/project/removemember?id=${projectInfo?.id || ""}&username=${
......
...@@ -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-10 18:08:00 * @LastEditTime: 2022-06-15 18:53:01
* @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
*/ */
...@@ -154,7 +154,7 @@ const ProjectMembers = () => { ...@@ -154,7 +154,7 @@ const ProjectMembers = () => {
sx={{ width: 340, height: 32 }} sx={{ width: 340, height: 32 }}
endAdornment={<SearchIcon style={{ color: "#8A9099" }} />} endAdornment={<SearchIcon style={{ color: "#8A9099" }} />}
/> />
{isProjectOwner(projectOwner) ? ( {currentProjectStore?.currentProjectInfo?.projectRole === "OWNER" ? (
<Button <Button
style={{ backgroundColor: "#1370FF " }} style={{ backgroundColor: "#1370FF " }}
variant="contained" variant="contained"
......
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