Commit 4a4e2d07 authored by chenshouchao's avatar chenshouchao

Merge branch 'feat-20220801' into 'staging'

cn-Feat 20220801

See merge request !89
parents ccb10292 c01e4fb8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-13 09:56:57 * @Date: 2022-06-13 09:56:57
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-15 17:10:49 * @LastEditTime: 2022-09-01 15:30:28
* @FilePath: /bkunyun/src/api/api_manager.ts * @FilePath: /bkunyun/src/api/api_manager.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
*/ */
...@@ -45,6 +45,9 @@ const RESTAPI = { ...@@ -45,6 +45,9 @@ const RESTAPI = {
API_TASK_OVERVIEW_LIST:`${BACKEND_API_URI_PREFIX}/cpp/workflowJobInformation`, // 查询任务概览 API_TASK_OVERVIEW_LIST:`${BACKEND_API_URI_PREFIX}/cpp/workflowJobInformation`, // 查询任务概览
API_OPERATOR_LISTSTREAMACTORS:`${BACKEND_API_URI_PREFIX}/cpp/workflow/liststreamactors`, // 获取流算子列表,可用于模糊查询,返回所有版本流算子 API_OPERATOR_LISTSTREAMACTORS:`${BACKEND_API_URI_PREFIX}/cpp/workflow/liststreamactors`, // 获取流算子列表,可用于模糊查询,返回所有版本流算子
API_SAVE_BATCHACTOR:`${BACKEND_API_URI_PREFIX}/cpp/workflow/savebatchactor`, // 保存批算子 API_SAVE_BATCHACTOR:`${BACKEND_API_URI_PREFIX}/cpp/workflow/savebatchactor`, // 保存批算子
API_PROJECT_USERS_LIST:`${BACKEND_API_URI_PREFIX}/cpp/project/listusers`, // 获取项目成员
API_ADD_PROJECT_USER:`${BACKEND_API_URI_PREFIX}/cpp/project/updatemember`, // 添加项目成员
API_GET_PROJECT_POWER:`${BACKEND_API_URI_PREFIX}/cpp/project/listroles`, // 获取项目权限
}; };
export default RESTAPI; export default RESTAPI;
/* /*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:17:48 * @Date: 2022-05-31 10:17:48
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-18 15:44:35 * @LastEditTime: 2022-08-30 16:22:15
* @FilePath: /bkunyun/src/api/api_prefix.ts * @FilePath: /bkunyun/src/api/api_prefix.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
*/ */
...@@ -36,7 +36,7 @@ switch (process.env.REACT_APP_ENV) { ...@@ -36,7 +36,7 @@ switch (process.env.REACT_APP_ENV) {
BACKEND_API_URI_PREFIX = "https://www.cloudam.cn"; BACKEND_API_URI_PREFIX = "https://www.cloudam.cn";
} }
else { else {
BACKEND_API_URI_PREFIX = "http://47.57.4.97"; BACKEND_API_URI_PREFIX = "http://47.75.104.171";
} }
break; break;
} }
......
...@@ -318,6 +318,34 @@ const saveBatchActor = (params: saveBatchParams) => { ...@@ -318,6 +318,34 @@ const saveBatchActor = (params: saveBatchParams) => {
}); });
}; };
// 获取项目成员
const fetchProjectUsersList = (params: {id: string}) => {
return request({
url: Api.API_PROJECT_USERS_LIST,
method: "get",
params,
});
};
// 修改项目成员信息
const addProjectUser = (id: string, params: any) => {
return request({
url: `${Api.API_ADD_PROJECT_USER}?id=${id}`,
method: "put",
data: params,
});
};
// 获取项目权限
const fetchProjectPower = (params: {id: string}) => {
return request({
url: Api.API_GET_PROJECT_POWER,
method: "get",
params,
});
};
export { export {
current, current,
menu, menu,
...@@ -342,5 +370,8 @@ export { ...@@ -342,5 +370,8 @@ export {
getTaskOverview, getTaskOverview,
getOperatorList, getOperatorList,
saveBatchActor, saveBatchActor,
fetchFlowOutputNumber fetchFlowOutputNumber,
fetchProjectUsersList,
addProjectUser,
fetchProjectPower
}; };
<?xml version="1.0" encoding="UTF-8"?>
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="点击算子" transform="translate(-24.000000, -133.000000)">
<g id="编组-12" transform="translate(24.000000, 133.000000)">
<g id="编组-16" transform="translate(11.000000, 11.000000) scale(-1, 1) rotate(-90.000000) translate(-11.000000, -11.000000) ">
<rect id="矩形" x="0" y="0" width="22" height="22"></rect>
<g id="编组-14" transform="translate(5.500000, 8.250000)" stroke="#8A9099" stroke-linejoin="round" stroke-width="2">
<polyline id="路径-7备份" transform="translate(5.500000, 2.750000) scale(1, -1) translate(-5.500000, -2.750000) " points="0 5.5 5.5 2.98949133e-16 11 5.5"></polyline>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>刷新备份</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="刷新备份">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<path d="M14.1034483,5.0750097 L12.3103448,6.87501758 C11.862069,4.9250128 10.0689767,3.42499873 7.97701897,3.42499873 C5.51150172,3.42499873 3.49426034,5.45000759 3.49426034,7.92501842 C3.49426034,10.3999842 5.51150172,12.4249931 7.97701897,12.4249931 C10.3678534,12.4249931 12.3850948,10.5500599 12.4597328,8.15001941 L13.8045603,6.8000135 C13.8793103,7.17501139 13.9540603,7.55002053 13.9540603,8.0000225 C13.9540603,11.2999882 11.2644052,14 7.97701897,14 C4.68965517,14 2,11.2999882 2,8.0000225 C2,4.70001181 4.68965517,2 7.97701897,2 C9.91954397,2 11.712681,2.97499677 12.7586207,4.40000675 L12.9080086,4.17500577 L15,4.17500577 L14.1034483,5.0750097 Z" id="路径" fill="#8A9099"></path>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 4</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="切换产品" transform="translate(-337.000000, -190.000000)">
<g id="编组-37" transform="translate(223.000000, 172.000000)">
<g id="编组-34" transform="translate(0.000000, 8.000000)">
<g id="编组-4" transform="translate(114.000000, 10.000000)">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<polyline id="路径-26" stroke="#1370FF" stroke-width="1.5" stroke-linejoin="round" points="4 8.33740166 7.27434245 11 12 5"></polyline>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>check-circle-outline备份</title>
<g id="云平台视觉规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="check-circle-outline备份" fill="#0DD09B" fill-rule="nonzero">
<path d="M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 M8,14.4 C4.472,14.4 1.6,11.528 1.6,8 C1.6,4.472 4.472,1.6 8,1.6 C11.528,1.6 14.4,4.472 14.4,8 C14.4,11.528 11.528,14.4 8,14.4 M11.672,4.464 L6.4,9.736 L4.328,7.672 L3.2,8.8 L6.4,12 L12.8,5.6 L11.672,4.464 Z" id="形状"></path>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 12备份</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-12备份">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<polygon id="路径-53备份-2" fill="#8A9099" points="4.5 6 11.5 6 8 11"></polygon>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/任务列表</title> <title>1.Base基础/Icon图标/任务列表备份</title>
<defs>
<filter color-interpolation-filters="auto" id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.760000 0 0 0 0 0.776000 0 0 0 0 0.800000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="工作台(管理员)空" transform="translate(-370.000000, -245.000000)"> <g id="1.Base基础/Icon图标/任务列表备份">
<g id="编组-5" transform="translate(370.000000, 242.000000)"> <rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="1.Base基础/Icon图标/任务列表" transform="translate(0.000000, 3.000000)"> <g id="编组-4" transform="translate(0.500000, 0.000000)" stroke="#C2C6CC" stroke-width="1.5">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect> <path d="M7.38809691,0.889939751 L14.1102244,4.08516037 L14.2499569,11.9840447 L7.60081331,15.1318104 L0.897545722,12.2122049 L0.75,4.30940599 L7.38809691,0.889939751 Z" id="路径-15"></path>
<g filter="url(#filter-1)" id="编组-4"> <polyline id="路径-20" points="1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"></polyline>
<g transform="translate(0.500000, 0.000000)"> <line x1="7.47016174" y1="7.39513959" x2="7.47016174" y2="14.8580198" id="路径-21"></line>
<path d="M7.38809691,0.889939751 C7.45764437,0.855744844 7.53911808,0.85573765 7.60867158,0.889920274 L7.60867158,0.889920274 L14.1102244,4.08516037 C14.1529938,4.10617975 14.187927,4.13844408 14.2121677,4.17736742 C14.2364085,4.21629077 14.2499569,4.26187312 14.2499569,4.30952854 L14.2499569,4.30952854 L14.2499569,11.9840447 C14.2499569,12.0332683 14.2355127,12.0802004 14.2098426,12.119868 C14.1841726,12.1595356 14.1472766,12.1919385 14.1023731,12.2121037 L14.1023731,12.2121037 L7.60081331,15.1318104 C7.53565621,15.161071 7.46109499,15.1610648 7.39594277,15.1317934 L7.39594277,15.1317934 L0.897545722,12.2122049 C0.852652465,12.1920353 0.815766035,12.1596329 0.790102919,12.1199688 C0.764439802,12.0803047 0.75,12.033379 0.75,11.984163 L0.75,11.984163 L0.75,4.30940599 C0.75,4.26175853 0.763543923,4.21618307 0.78777749,4.17726362 L0.78777749,4.17726362 Z" id="路径-15" stroke="#979797" stroke-width="1.5"></path>
<polyline id="路径-20" stroke="#979797" stroke-width="1.5" points="1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"></polyline>
<line x1="7.47016174" y1="7.39513959" x2="7.47016174" y2="14.8580198" id="路径-21" stroke="#979797" stroke-width="1.5"></line>
</g>
</g>
</g>
</g> </g>
</g> </g>
</g> </g>
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/任务列表备份 3</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="1.Base基础/Icon图标/任务列表备份">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-4" transform="translate(0.500000, 0.000000)" stroke="#1E2633" stroke-width="1.5">
<path d="M7.38809691,0.889939751 L14.1102244,4.08516037 L14.2499569,11.9840447 L7.60081331,15.1318104 L0.897545722,12.2122049 L0.75,4.30940599 L7.38809691,0.889939751 Z" id="路径-15"></path>
<polyline id="路径-20" points="1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"></polyline>
<line x1="7.47016174" y1="7.39513959" x2="7.47016174" y2="14.8580198" id="路径-21"></line>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/任务列表</title> <title>1.Base基础/Icon图标/任务列表备份 2</title>
<defs>
<filter color-interpolation-filters="auto" id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.076000 0 0 0 0 0.440000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="任务列表" transform="translate(-370.000000, -245.000000)"> <g id="1.Base基础/Icon图标/任务列表备份-2">
<g id="编组-5" transform="translate(370.000000, 242.000000)"> <rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="1.Base基础/Icon图标/任务列表" transform="translate(0.000000, 3.000000)"> <g id="编组-4" transform="translate(0.500000, 0.000000)" stroke="#1370FF" stroke-width="1.5">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect> <path d="M7.38809691,0.889939751 L14.1102244,4.08516037 L14.2499569,11.9840447 L7.60081331,15.1318104 L0.897545722,12.2122049 L0.75,4.30940599 L7.38809691,0.889939751 Z" id="路径-15"></path>
<g filter="url(#filter-1)" id="编组-4"> <polyline id="路径-20" points="1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"></polyline>
<g transform="translate(0.500000, 0.000000)"> <line x1="7.47016174" y1="7.39513959" x2="7.47016174" y2="14.8580198" id="路径-21"></line>
<path d="M7.38809691,0.889939751 C7.45764437,0.855744844 7.53911808,0.85573765 7.60867158,0.889920274 L7.60867158,0.889920274 L14.1102244,4.08516037 C14.1529938,4.10617975 14.187927,4.13844408 14.2121677,4.17736742 C14.2364085,4.21629077 14.2499569,4.26187312 14.2499569,4.30952854 L14.2499569,4.30952854 L14.2499569,11.9840447 C14.2499569,12.0332683 14.2355127,12.0802004 14.2098426,12.119868 C14.1841726,12.1595356 14.1472766,12.1919385 14.1023731,12.2121037 L14.1023731,12.2121037 L7.60081331,15.1318104 C7.53565621,15.161071 7.46109499,15.1610648 7.39594277,15.1317934 L7.39594277,15.1317934 L0.897545722,12.2122049 C0.852652465,12.1920353 0.815766035,12.1596329 0.790102919,12.1199688 C0.764439802,12.0803047 0.75,12.033379 0.75,11.984163 L0.75,11.984163 L0.75,4.30940599 C0.75,4.26175853 0.763543923,4.21618307 0.78777749,4.17726362 L0.78777749,4.17726362 Z" id="路径-15" stroke="#979797" stroke-width="1.5"></path>
<polyline id="路径-20" stroke="#979797" stroke-width="1.5" points="1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"></polyline>
<line x1="7.47016174" y1="7.39513959" x2="7.47016174" y2="14.8580198" id="路径-21" stroke="#979797" stroke-width="1.5"></line>
</g>
</g>
</g>
</g> </g>
</g> </g>
</g> </g>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/工作流模版</title> <title>1.Base基础/Icon图标/工作流模版备份 3</title>
<defs>
<filter color-interpolation-filters="auto" id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.760000 0 0 0 0 0.776000 0 0 0 0 0.800000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="任务列表" transform="translate(-245.000000, -246.000000)"> <g id="编组-5">
<g id="编组-4" transform="translate(244.000000, 242.000000)"> <rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-5" transform="translate(0.000000, 3.000000)" filter="url(#filter-1)"> <g id="编组-4" transform="translate(1.000000, 1.000000)" stroke="#C2C6CC" stroke-width="1.5">
<g> <rect id="矩形" x="0.75" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形" x="0" y="0" width="16" height="16"></rect> <rect id="矩形备份-2" x="0.75" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<g id="编组-4" transform="translate(1.000000, 1.000000)" stroke="#979797" stroke-width="1.5"> <rect id="矩形备份" x="8.5" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形" x="0.75" y="0.75" width="4.75" height="4.75" rx="1"></rect> <rect id="矩形备份-3" x="8.5" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份-2" x="0.75" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份" x="8.5" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份-3" x="8.5" y="8.5" width="4.75" height="4.75" rx="1"></rect>
</g>
</g>
</g>
</g> </g>
</g> </g>
</g> </g>
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/工作流模版备份 2</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-5">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-4" transform="translate(1.000000, 1.000000)" stroke="#1E2633" stroke-width="1.5">
<rect id="矩形" x="0.75" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份-2" x="0.75" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份" x="8.5" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份-3" x="8.5" y="8.5" width="4.75" height="4.75" rx="1"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/工作流模版</title> <title>1.Base基础/Icon图标/工作流模版备份</title>
<defs>
<filter color-interpolation-filters="auto" id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.076000 0 0 0 0 0.440000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="工作台(管理员)空" transform="translate(-245.000000, -246.000000)"> <g id="编组-5">
<g id="编组-4" transform="translate(244.000000, 242.000000)"> <rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-5" transform="translate(0.000000, 3.000000)" filter="url(#filter-1)"> <g id="编组-4" transform="translate(1.000000, 1.000000)" stroke="#1370FF" stroke-width="1.5">
<g> <rect id="矩形" x="0.75" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形" x="0" y="0" width="16" height="16"></rect> <rect id="矩形备份-2" x="0.75" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<g id="编组-4" transform="translate(1.000000, 1.000000)" stroke="#979797" stroke-width="1.5"> <rect id="矩形备份" x="8.5" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形" x="0.75" y="0.75" width="4.75" height="4.75" rx="1"></rect> <rect id="矩形备份-3" x="8.5" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份-2" x="0.75" y="8.5" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份" x="8.5" y="0.75" width="4.75" height="4.75" rx="1"></rect>
<rect id="矩形备份-3" x="8.5" y="8.5" width="4.75" height="4.75" rx="1"></rect>
</g>
</g>
</g>
</g> </g>
</g> </g>
</g> </g>
......
/* 修改滚动条样式 */ /* 修改滚动条样式 */
div::-webkit-scrollbar, div::-webkit-scrollbar,
main::-webkit-scrollbar { main::-webkit-scrollbar {
width: 4px; width: 6px;
height: 5px !important; height: 5px !important;
} }
div::-webkit-scrollbar-track, div::-webkit-scrollbar-track,
main::-webkit-scrollbar-track { main::-webkit-scrollbar-track {
background-color: #fff; background-color: transparent;
-webkit-border-radius: 2em; -webkit-border-radius: 3em;
-moz-border-radius: 2em; -moz-border-radius: 3em;
border-radius: 2em; border-radius: 3em;
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb { main::-webkit-scrollbar-thumb {
background-color: #C2C6CC; background-color: rgba(138, 144, 153, 0.55);
-webkit-border-radius: 2px; -webkit-border-radius: 3px;
-moz-border-radius: 2px; -moz-border-radius: 3px;
border-radius: 2px; border-radius: 3px;
height: 5px !important; height: 5px !important;
width: 4px!important; width: 6px !important;
}
div::-webkit-scrollbar-thumb:hover {
background-color: rgba(138, 144, 153, 0.8);
}
main::-webkit-scrollbar-thumb:hover {
background-color: rgba(138, 144, 153, 0.8);
} }
body, body,
...@@ -48,15 +55,15 @@ input, ...@@ -48,15 +55,15 @@ input,
textarea, textarea,
th, th,
td { td {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
body, body,
button, button,
input, input,
select, select,
textarea { textarea {
font: 12px/1.5tahoma, arial, \5b8b\4f53; font: 12px/1.5tahoma, arial, \5b8b\4f53;
} }
h1, h1,
h2, h2,
...@@ -64,73 +71,73 @@ h3, ...@@ -64,73 +71,73 @@ h3,
h4, h4,
h5, h5,
h6 { h6 {
font-size: 100%; font-size: 100%;
} }
address, address,
cite, cite,
dfn, dfn,
em, em,
var { var {
font-style: normal; font-style: normal;
} }
code, code,
kbd, kbd,
pre, pre,
samp { samp {
font-family: couriernew, courier, monospace; font-family: couriernew, courier, monospace;
} }
small { small {
font-size: 12px; font-size: 12px;
} }
ul, ul,
ol { ol {
list-style: none; list-style: none;
} }
a { a {
text-decoration: none; text-decoration: none;
} }
a:hover { a:hover {
text-decoration: underline; text-decoration: underline;
} }
sup { sup {
vertical-align: text-top; vertical-align: text-top;
} }
sub { sub {
vertical-align: text-bottom; vertical-align: text-bottom;
} }
legend { legend {
color: #000; color: #000;
} }
fieldset, fieldset,
img { img {
border: 0; border: 0;
} }
button, button,
input, input,
select, select,
textarea { textarea {
font-size: 100%; font-size: 100%;
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
input::-webkit-input-placeholder { input::-webkit-input-placeholder {
color: #c2c6cc; color: #c2c6cc;
} }
input::-moz-placeholder { input::-moz-placeholder {
/* Mozilla Firefox 19+ */ /* Mozilla Firefox 19+ */
color: #c2c6cc; color: #c2c6cc;
} }
input:-moz-placeholder { input:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */ /* Mozilla Firefox 4 to 18 */
color: #c2c6cc; color: #c2c6cc;
} }
input:-ms-input-placeholder { input:-ms-input-placeholder {
/* Internet Explorer 10-11 */ /* Internet Explorer 10-11 */
color: #c2c6cc; color: #c2c6cc;
} }
.FSBox { .FSBox {
width: 900px; width: 900px;
height: 650px; max-height: 550px;
position: relative; position: relative;
} }
......
...@@ -447,6 +447,7 @@ const FileSelect = observer((props: FileSelectProps) => { ...@@ -447,6 +447,7 @@ const FileSelect = observer((props: FileSelectProps) => {
)} )}
</div> </div>
<Table <Table
tableContainerStyle={{height: 470}}
footer={false} footer={false}
rowHover={true} rowHover={true}
nopadding={true} nopadding={true}
......
...@@ -38,6 +38,9 @@ const SearchInput = (props: SearchInputProps) => { ...@@ -38,6 +38,9 @@ const SearchInput = (props: SearchInputProps) => {
height: "32px", height: "32px",
fontSize: "14px", fontSize: "14px",
paddingRight: "8px", paddingRight: "8px",
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
borderWidth: "1px",
},
"& .MuiOutlinedInput-notchedOutline": { "& .MuiOutlinedInput-notchedOutline": {
borderColor: '#DDE1E6', borderColor: '#DDE1E6',
}, },
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
background-color: #fff; background-color: #fff;
border-radius: 16px 0 0 0; border-radius: 16px 0 0 0;
box-sizing: border-box; box-sizing: border-box;
overflow: scroll; overflow: overlay;
animation: showDrawer 0.31s ease; animation: showDrawer 0.31s ease;
-webkit-animation: showDrawer 0.31s ease; -webkit-animation: showDrawer 0.31s ease;
margin: 0 auto; margin: 0 auto;
......
...@@ -33,3 +33,11 @@ ...@@ -33,3 +33,11 @@
background-color: #fff; background-color: #fff;
box-shadow: 2px 4px 12px 0px rgba(0, 27, 63, 0.06); box-shadow: 2px 4px 12px 0px rgba(0, 27, 63, 0.06);
} }
.border {
width: 1px;
height: 16px;
background-color: rgba(209, 214, 222, 1);
}
.borderHidden {
visibility: hidden;
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
// 按钮样式的单选组 // 按钮样式的单选组
import classnames from "classnames"; import classnames from "classnames";
import { useMemo } from "react";
import style from "./index.module.css"; import style from "./index.module.css";
type radioOption = { type radioOption = {
...@@ -27,21 +28,43 @@ const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => { ...@@ -27,21 +28,43 @@ const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => {
const { radioOptions, value, handleRadio, RadiosBoxStyle, radioStyle } = const { radioOptions, value, handleRadio, RadiosBoxStyle, radioStyle } =
props; props;
const activeIndex: any = useMemo(() => {
let res = 0;
radioOptions.forEach((item, index) => {
if (item.value === value) {
res = index;
}
});
return res;
}, [value, radioOptions]);
return ( return (
<div className={style.RadiosBox} style={RadiosBoxStyle}> <div className={style.RadiosBox} style={RadiosBoxStyle}>
{radioOptions.map((options) => { {radioOptions.map((options, index) => {
return ( return (
<div <>
key={options.value} <div
className={classnames({ key={options.value}
[style.radio]: true, className={classnames({
[style.radioActive]: value === options.value, [style.radio]: true,
})} [style.radioActive]: value === options.value,
onClick={() => handleRadio(options.value)} })}
style={radioStyle} onClick={() => handleRadio(options.value)}
> style={radioStyle}
{options.label} >
</div> {options.label}
</div>
<div
className={classnames({
[style.border]: true,
[style.borderHidden]: !(
index !== radioOptions.length - 1 &&
index !== activeIndex &&
index !== activeIndex - 1
),
})}
></div>
</>
); );
})} })}
</div> </div>
......
...@@ -38,7 +38,7 @@ const useStyles = makeStyles({ ...@@ -38,7 +38,7 @@ const useStyles = makeStyles({
contentWrap: { contentWrap: {
padding: "8px 0", height: 0, transition: "all 1s", position: "absolute", zIndex: 9, width: "100%", padding: "8px 0", height: 0, transition: "all 1s", position: "absolute", zIndex: 9, width: "100%",
backgroundColor: "#FFFFFF", boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.16)", borderRadius: "4px", backgroundColor: "#FFFFFF", boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.16)", borderRadius: "4px",
overflowY: "scroll", overflowY: "overlay",
maxHeight: "398px" maxHeight: "398px"
}, },
contentWrapOpenPosition:{top:"-400px"}, contentWrapOpenPosition:{top:"-400px"},
......
...@@ -32,7 +32,7 @@ const useStyles = makeStyles({ ...@@ -32,7 +32,7 @@ const useStyles = makeStyles({
contentWrap: { contentWrap: {
padding: "8px 0", height: 0, transition: "all 1s", position: "absolute", zIndex: 9, width: "100%", padding: "8px 0", height: 0, transition: "all 1s", position: "absolute", zIndex: 9, width: "100%",
backgroundColor: "#FFFFFF", boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.16)", borderRadius: "4px", backgroundColor: "#FFFFFF", boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.16)", borderRadius: "4px",
overflowY: "auto", overflowY: "overlay",
maxHeight: "400px" maxHeight: "400px"
}, },
contentWrapOpen: { height: "auto" }, contentWrapOpen: { height: "auto" },
......
...@@ -42,7 +42,7 @@ const useStyles = makeStyles({ ...@@ -42,7 +42,7 @@ const useStyles = makeStyles({
contentWrap: { contentWrap: {
padding: "8px 0", transition: "all 1s", position: "fixed", zIndex: 9, width: "552px", padding: "8px 0", transition: "all 1s", position: "fixed", zIndex: 9, width: "552px",
backgroundColor: "#FFFFFF", boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.16)", borderRadius: "4px", backgroundColor: "#FFFFFF", boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.16)", borderRadius: "4px",
overflowY: "scroll", overflowY: "overlay",
maxHeight: "398px", maxHeight: "398px",
// position: "fixed", // position: "fixed",
// width: "552px" // width: "552px"
......
import React, { Fragment, ReactNode, useMemo } from "react"; import React, { Fragment, ReactNode } from "react";
import { Snackbar, Alert, Fade, Grow } from "@mui/material"; import { Snackbar, Alert, Fade, Grow } from "@mui/material";
import useMySnackbar from "./useMySnackbar"; import useMySnackbar from "./useMySnackbar";
import snackbarContext from "./snackbarContext"; import snackbarContext from "./snackbarContext";
import { ThemeProvider, createTheme } from "@mui/material/styles"; import { ThemeProvider, createTheme } from "@mui/material/styles";
import successIconSrc from "../../assets/project/successIcon.svg";
type MySnackbarProviderProp = { type MySnackbarProviderProp = {
vertical?: "bottom" | "top"; vertical?: "bottom" | "top";
...@@ -22,7 +23,6 @@ type MySnackbarProviderProp = { ...@@ -22,7 +23,6 @@ type MySnackbarProviderProp = {
variant?: "filled" | "outlined" | "standard"; variant?: "filled" | "outlined" | "standard";
errorIcon?: ReactNode; errorIcon?: ReactNode;
infoIcon?: ReactNode; infoIcon?: ReactNode;
successIcon?: ReactNode;
warningIcon?: ReactNode; warningIcon?: ReactNode;
elevation?: number; elevation?: number;
alertSx?: object; alertSx?: object;
...@@ -58,7 +58,6 @@ const MySnackbarProvider = ({ ...@@ -58,7 +58,6 @@ const MySnackbarProvider = ({
variant = "standard", variant = "standard",
errorIcon, errorIcon,
infoIcon, infoIcon,
successIcon,
warningIcon, warningIcon,
elevation = 3, elevation = 3,
alertSx, alertSx,
...@@ -66,6 +65,7 @@ const MySnackbarProvider = ({ ...@@ -66,6 +65,7 @@ const MySnackbarProvider = ({
}: MySnackbarProviderProp) => { }: MySnackbarProviderProp) => {
const { const {
open, open,
setOpen,
messageInfo, messageInfo,
handleExited, handleExited,
success, success,
...@@ -74,31 +74,46 @@ const MySnackbarProvider = ({ ...@@ -74,31 +74,46 @@ const MySnackbarProvider = ({
info, info,
close, close,
} = useMySnackbar(); } = useMySnackbar();
// .MuiAlert-filledInfo
const getColorStyle = useMemo(() => {
if (messageInfo.severity === "success") {
return "#02AB83";
}
if (messageInfo.severity === "info") {
return "#1370FF";
}
if (messageInfo.severity === "warning") {
return "#FFB919";
}
if (messageInfo.severity === "error") {
return "#FF4E4E";
}
}, [messageInfo.severity]);
const theme = createTheme({ const theme = createTheme({
components: { components: {
MuiAlert: { MuiAlert: {
styleOverrides: { styleOverrides: {
root: { root: {
color: getColorStyle, minWidth: "360px",
"& .MuiAlert-icon": { maxWidth: "542px",
color: getColorStyle, minHeight: "38px",
boxShadow: "none",
"& .MuiAlert-action": {
paddingLeft: "32px",
},
"&.MuiAlert-standardError": {
color: "#FF4E4E",
background: "rgba(255, 237, 237, 1)",
"& .MuiAlert-icon": {
color: "#FF4E4E",
},
},
"&.MuiAlert-standardInfo": {
color: "rgba(19, 112, 255, 1)",
background: "rgba(235, 243, 255, 1)",
"& .MuiAlert-icon": {
color: "rgba(19, 112, 255, 1)",
},
},
"&.MuiAlert-standardSuccess": {
color: "rgba(2, 171, 131, 1)",
background: "rgba(217, 255, 238, 1)",
"& .MuiAlert-icon": {
color: "rgba(2, 171, 131, 1)",
},
},
"&.MuiAlert-standardWarning": {
color: "rgba(255, 185, 25, 1)",
background: "rgba(255, 246, 226, 1)",
"& .MuiAlert-icon": {
color: "rgba(255, 185, 25, 1)",
},
}, },
}, },
}, },
...@@ -106,6 +121,14 @@ const MySnackbarProvider = ({ ...@@ -106,6 +121,14 @@ const MySnackbarProvider = ({
}, },
}); });
const successIcon = (
<img
src={successIconSrc}
style={{ width: "16px", height: "16px", margin: "3px 0" }}
alt=""
/>
);
return ( return (
<Fragment> <Fragment>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -137,7 +160,10 @@ const MySnackbarProvider = ({ ...@@ -137,7 +160,10 @@ const MySnackbarProvider = ({
severity={messageInfo?.severity} severity={messageInfo?.severity}
variant={variant} variant={variant}
elevation={elevation} elevation={elevation}
sx={{ boxShadow: "unset", ...alertSx }} sx={{ ...alertSx }}
onClose={() => {
setOpen(false);
}}
> >
{messageInfo?.content} {messageInfo?.content}
</Alert> </Alert>
......
...@@ -69,6 +69,7 @@ const useMySnackbar = () => { ...@@ -69,6 +69,7 @@ const useMySnackbar = () => {
return { return {
open, open,
setOpen,
messageInfo, messageInfo,
handleExited, handleExited,
success, success,
......
...@@ -46,7 +46,7 @@ const theme = createTheme({ ...@@ -46,7 +46,7 @@ const theme = createTheme({
MuiButton: { MuiButton: {
styleOverrides: { styleOverrides: {
root: { root: {
minWidth: "48px", minWidth: "68px",
boxShadow: "none !important", boxShadow: "none !important",
"&.MuiButton-textError": { "&.MuiButton-textError": {
color: "rgba(255, 78, 78, 1)", color: "rgba(255, 78, 78, 1)",
...@@ -54,11 +54,17 @@ const theme = createTheme({ ...@@ -54,11 +54,17 @@ const theme = createTheme({
"&.MuiButton-outlinedError": { "&.MuiButton-outlinedError": {
color: "rgba(255, 78, 78, 1)", color: "rgba(255, 78, 78, 1)",
border: "1px solid rgba(255, 78, 78, 1)", border: "1px solid rgba(255, 78, 78, 1)",
"&:hover": { backgroundColor: 'transparent' }, "&:hover": { backgroundColor: "#FFEDED" },
}, },
"& .MuiLoadingButton-loadingIndicator": { "& .MuiLoadingButton-loadingIndicator": {
color: "#fff", color: "#fff",
}, },
"&.MuiButton-containedError": {
backgroundColor: "#FF4E4E",
"&:hover": {
backgroundColor: "rgba(217, 54, 54, 1)",
},
},
}, },
contained: { contained: {
backgroundColor: "#1370FF", backgroundColor: "#1370FF",
...@@ -101,6 +107,9 @@ const theme = createTheme({ ...@@ -101,6 +107,9 @@ const theme = createTheme({
border: "1px solid rgba(221, 225, 230, 1)", border: "1px solid rgba(221, 225, 230, 1)",
}, },
}, },
// outlinedError: {
// "&:hover": { backgroundColor: "#FFEDED " },
// },
textSecondary: { textSecondary: {
backgroundColor: "transparent", backgroundColor: "transparent",
color: "#FF4E4E", color: "#FF4E4E",
...@@ -110,16 +119,19 @@ const theme = createTheme({ ...@@ -110,16 +119,19 @@ const theme = createTheme({
"& p": { fontSize: "12px" }, "& p": { fontSize: "12px" },
height: "28px", height: "28px",
padding: "0 12px", padding: "0 12px",
minWidth: "60px",
}, },
sizeMedium: { sizeMedium: {
"& p": { fontSize: "14px" }, "& p": { fontSize: "14px" },
height: "32px", height: "32px",
padding: "0 16px", padding: "0 16px",
minWidth: "68px",
}, },
sizeLarge: { sizeLarge: {
"& p": { fontSize: "16px" }, "& p": { fontSize: "16px" },
height: "36px", height: "36px",
padding: "0 16px", padding: "0 16px",
minWidth: "80px",
}, },
}, },
}, },
......
...@@ -12,6 +12,7 @@ import FormControlLabel from "@mui/material/FormControlLabel"; ...@@ -12,6 +12,7 @@ import FormControlLabel from "@mui/material/FormControlLabel";
import Checkbox from "@mui/material/Checkbox"; import Checkbox from "@mui/material/Checkbox";
import FormControl from "@mui/material/FormControl"; import FormControl from "@mui/material/FormControl";
import FormHelperText from "@mui/material/FormHelperText"; import FormHelperText from "@mui/material/FormHelperText";
import { ThemeProvider, createTheme } from "@mui/material/styles";
import _ from "lodash"; import _ from "lodash";
interface IMyCheckBoxProps extends FormGroupProps { interface IMyCheckBoxProps extends FormGroupProps {
...@@ -44,6 +45,33 @@ export const optionsTransform = ( ...@@ -44,6 +45,33 @@ export const optionsTransform = (
}); });
}; };
const theme = createTheme({
components: {
MuiFormControlLabel: {
styleOverrides: {
label: {
fontSize: "14px",
},
},
},
MuiSvgIcon: {
styleOverrides: {
root: {
fontSize: "19px",
},
},
},
MuiCheckbox: {
styleOverrides: {
colorPrimary: {
color: "rgba(209, 214, 222, 1)",
},
},
},
// MuiCheckbox-colorPrimary
},
});
export default function MyCheckBox(props: IMyCheckBoxProps) { export default function MyCheckBox(props: IMyCheckBoxProps) {
const { const {
value, value,
...@@ -76,27 +104,29 @@ export default function MyCheckBox(props: IMyCheckBoxProps) { ...@@ -76,27 +104,29 @@ export default function MyCheckBox(props: IMyCheckBoxProps) {
}; };
return ( return (
<FormControl fullWidth variant={variant} error={error}> <ThemeProvider theme={theme}>
<FormGroup {...props} row> <FormControl fullWidth variant={variant} error={error}>
{options.map((option) => { <FormGroup {...props} row>
return ( {options.map((option) => {
<FormControlLabel return (
key={option.value} <FormControlLabel
control={ key={option.value}
<Checkbox control={
checked={getCheckedStatus(option.value, value)} <Checkbox
value={option.value} checked={getCheckedStatus(option.value, value)}
/> value={option.value}
} />
label={option.label} }
name={option.value} label={option.label}
onChange={handleMyCheckBoxOnChange} name={option.value}
disabled={option.disabled} onChange={handleMyCheckBoxOnChange}
/> disabled={option.disabled}
); />
})} );
</FormGroup> })}
{helperText && error && <FormHelperText>{helperText}</FormHelperText>} </FormGroup>
</FormControl> {helperText && error && <FormHelperText>{helperText}</FormHelperText>}
</FormControl>
</ThemeProvider>
); );
} }
import React from "react"; import React, { useMemo } from "react";
import { import {
Dialog, Dialog,
...@@ -42,7 +42,14 @@ export interface IDialogProps { ...@@ -42,7 +42,14 @@ export interface IDialogProps {
/** 点击遮罩是否关闭 默认为false*/ /** 点击遮罩是否关闭 默认为false*/
clickMaskClose?: boolean; clickMaskClose?: boolean;
/** 确认按钮样式*/ /** 确认按钮样式*/
okSx?: any; okColor?:
| "inherit"
| "primary"
| "secondary"
| "success"
| "error"
| "info"
| "warning"; //按钮颜色风格
loading?: boolean; // 确认按钮是否处于loading状态 loading?: boolean; // 确认按钮是否处于loading状态
} }
...@@ -66,7 +73,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -66,7 +73,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabledConfirm, disabledConfirm,
clickMaskClose = false, clickMaskClose = false,
loading = false, loading = false,
okSx = {}, okColor = "primary",
} = props; } = props;
const handelClose = ( const handelClose = (
...@@ -79,7 +86,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -79,7 +86,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
onClose && onClose(); onClose && onClose();
}; };
const Footer = () => { const Footer = useMemo(() => {
if (isHideFooter) return null; if (isHideFooter) return null;
return footerRender ? ( return footerRender ? (
footerRender() footerRender()
...@@ -90,7 +97,6 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -90,7 +97,6 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={cancelText || "取消"} text={cancelText || "取消"}
onClick={onClose} onClick={onClose}
variant="outlined" variant="outlined"
// size="small"
color="secondary" color="secondary"
/> />
) : null} ) : null}
...@@ -99,16 +105,28 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -99,16 +105,28 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={okText || "确定"} text={okText || "确定"}
onClick={onConfirm} onClick={onConfirm}
variant="contained" variant="contained"
// size="small" color={okColor}
disabled={disabledConfirm} disabled={disabledConfirm}
isLoadingButton={true} isLoadingButton={true}
loading={loading} loading={loading}
style={{ marginLeft: '12px', ...okSx }} style={{ marginLeft: "12px" }}
/> />
) : null} ) : null}
</DialogActions> </DialogActions>
); );
}; }, [
disabledConfirm,
okColor,
okText,
onConfirm,
onClose,
cancelText,
showCancel,
footerRender,
isHideFooter,
loading,
showConfirm,
]);
return ( return (
<Dialog <Dialog
open={open} open={open}
...@@ -122,16 +140,13 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -122,16 +140,13 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
"& .MuiPaper-root": { "& .MuiPaper-root": {
// 设置最大宽度, 实际宽度让子元素撑大 // 设置最大宽度, 实际宽度让子元素撑大
maxWidth: "1920px", maxWidth: "1920px",
borderRadius: "8px" borderRadius: "8px",
}, },
}, },
}} }}
> >
{isHideHeader ? null : ( {isHideHeader ? null : (
<DialogTitle <DialogTitle id="alert-dialog-title" sx={{ padding: "20px 24px" }}>
id="alert-dialog-title"
sx={{ padding: "20px 24px" }}
>
<div <div
style={{ style={{
display: "flex", display: "flex",
...@@ -140,16 +155,25 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -140,16 +155,25 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
fontWeight: 600, fontWeight: 600,
}} }}
> >
<span style={{ fontSize: 16, lineHeight: '24px', color: '#1E2633' }}>{title}</span> <span
style={{ fontSize: 16, lineHeight: "24px", color: "#1E2633" }}
>
{title}
</span>
<CloseIcon <CloseIcon
onClick={onClose} onClick={onClose}
sx={{ color: "#C2C6CC", cursor: "pointer", ":hover": { background: "#f0f2f5", borderRadius: '2px' } }} sx={{
fontSize: "18px",
color: "#C2C6CC",
cursor: "pointer",
":hover": { background: "#f0f2f5", borderRadius: "2px" },
}}
/> />
</div> </div>
</DialogTitle> </DialogTitle>
)} )}
<DialogContent style={{ minWidth: 388 }}>{children}</DialogContent> <DialogContent style={{ minWidth: 388 }}>{children}</DialogContent>
{Footer()} {Footer}
</Dialog> </Dialog>
); );
}; };
......
...@@ -35,9 +35,18 @@ const MyInput = (props: MyInputProps) => { ...@@ -35,9 +35,18 @@ const MyInput = (props: MyInputProps) => {
root: { root: {
height: "36px", height: "36px",
fontSize: "14px", fontSize: "14px",
border: "rgba(221, 225, 230, 1)",
padding: "7px 12px",
"&.MuiInputBase-sizeSmall": { "&.MuiInputBase-sizeSmall": {
height: "32px", height: "32px",
}, },
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
},
}, },
multiline: { multiline: {
height: "auto", height: "auto",
...@@ -45,13 +54,19 @@ const MyInput = (props: MyInputProps) => { ...@@ -45,13 +54,19 @@ const MyInput = (props: MyInputProps) => {
padding: 0, padding: 0,
}, },
}, },
input: {}, input: {
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
},
},
}, },
}, },
MuiInputLabel: { MuiInputLabel: {
styleOverrides: { styleOverrides: {
root: { root: {
top: "-9px", top: "-9px",
fontSize: "14px",
}, },
shrink: { shrink: {
top: 0, top: 0,
...@@ -64,11 +79,19 @@ const MyInput = (props: MyInputProps) => { ...@@ -64,11 +79,19 @@ const MyInput = (props: MyInputProps) => {
MuiOutlinedInput: { MuiOutlinedInput: {
styleOverrides: { styleOverrides: {
root: { root: {
padding: "7px 12px",
"&.Mui-focused .MuiOutlinedInput-notchedOutline": { "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
borderWidth: "1px", borderWidth: "1px",
}, },
"& .MuiOutlinedInput-notchedOutline": { "& .MuiOutlinedInput-notchedOutline": {
borderColor: '#DDE1E6', borderColor: "#DDE1E6",
},
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
}, },
":hover": { ":hover": {
"& .MuiOutlinedInput-notchedOutline": error "& .MuiOutlinedInput-notchedOutline": error
...@@ -76,14 +99,28 @@ const MyInput = (props: MyInputProps) => { ...@@ -76,14 +99,28 @@ const MyInput = (props: MyInputProps) => {
: { : {
borderColor: "#1370ff", borderColor: "#1370ff",
}, },
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
},
}, },
}, },
input: { input: {
padding: "6.5px 12px", padding: "0",
verticalAlign: "middle", verticalAlign: "middle",
}, },
}, },
}, },
MuiTypography: {
styleOverrides: {
root: {
marginRight: "-5px",
},
},
},
}, },
}); });
......
...@@ -23,7 +23,7 @@ const theme = createTheme({ ...@@ -23,7 +23,7 @@ const theme = createTheme({
MuiMenu: { MuiMenu: {
styleOverrides: { styleOverrides: {
root: { root: {
overflowY: "scroll", overflow: "overlay",
}, },
}, },
}, },
......
...@@ -14,7 +14,7 @@ const theme = createTheme({ ...@@ -14,7 +14,7 @@ const theme = createTheme({
MuiMenu: { MuiMenu: {
styleOverrides: { styleOverrides: {
root: { root: {
overflowY: "scroll", overflow: "overlay",
}, },
}, },
}, },
......
...@@ -68,43 +68,52 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => { ...@@ -68,43 +68,52 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
placement={placement} placement={placement}
sx={{ sx={{
zIndex: 2000, zIndex: 2000,
bgcolor: "#fff", bgcolor: "transparent",
minWidth: "200px", minWidth: "200px",
borderRadius: "4px",
fontSize: "14px", fontSize: "14px",
padding: "20px 16px", padding: "20px 16px",
boxShadow: "0px 3px 10px 0px rgba(0, 24, 57, 0.14)",
}} }}
> >
<Box sx={{ marginBottom: "16px" }}> <Box
<img sx={{
style={{ bgcolor: "#fff",
width: "16px", minWidth: "200px",
marginRight: "12px", borderRadius: "4px",
position: "relative", fontSize: "14px",
top: "3px", padding: "20px 16px",
}} boxShadow: "0px 3px 10px 0px rgba(0, 24, 57, 0.14)",
src={tipsIcon} }}
alt="" >
/> <Box sx={{ marginBottom: "16px" }}>
{title} <img
</Box> style={{
<Box sx={{ display: "flex", justifyContent: "flex-end" }}> width: "16px",
{showCancel && ( marginRight: "12px",
position: "relative",
top: "3px",
}}
src={tipsIcon}
alt=""
/>
{title}
</Box>
<Box sx={{ display: "flex", justifyContent: "flex-end" }}>
{showCancel && (
<MyButton
text={cancelText}
variant="outlined"
color="inherit"
onClick={handleCancel}
style={{ marginRight: "12px" }}
/>
)}
<MyButton <MyButton
text={cancelText} text={okText}
variant="outlined" onClick={handleOk}
color="inherit" loading={loading}
onClick={handleCancel} isLoadingButton={true}
style={{ marginRight: "12px" }}
/> />
)} </Box>
<MyButton
text={okText}
onClick={handleOk}
loading={loading}
isLoadingButton={true}
/>
</Box> </Box>
</Popper> </Popper>
); );
......
/* /*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-11 09:33:46 * @Date: 2022-06-11 09:33:46
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-06-16 14:21:00 * @LastEditTime: 2022-09-01 19:34:26
* @FilePath: /bkunyun/src/components/mui/MyPopover.tsx * @FilePath: /bkunyun/src/components/mui/MyPopover.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
*/ */
import * as React from "react"; import { useRef, useEffect, useState } from "react";
import Popover, { PopoverProps } from "@mui/material/Popover"; import Popover, { PopoverProps } from "@mui/material/Popover";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
...@@ -17,10 +17,15 @@ interface IProps extends Omit<PopoverProps, "open"> { ...@@ -17,10 +17,15 @@ interface IProps extends Omit<PopoverProps, "open"> {
children: React.ReactNode; children: React.ReactNode;
/** 显示内容 */ /** 显示内容 */
content: React.ReactNode; content: React.ReactNode;
/** 是否打开 */
open?: boolean;
/** open 修改 */
changeOpen: (val: boolean) => void;
} }
const MyPopover = (props: IProps) => { const MyPopover = (props: IProps) => {
const [anchorEl, setAnchorEl] = React.useState<any | null>(null); const [anchorEl, setAnchorEl] = useState<any | null>(null);
const ref = useRef(null);
const { const {
trigger = "click", trigger = "click",
...@@ -28,26 +33,37 @@ const MyPopover = (props: IProps) => { ...@@ -28,26 +33,37 @@ const MyPopover = (props: IProps) => {
content, content,
anchorOrigin, anchorOrigin,
transformOrigin, transformOrigin,
open = false,
changeOpen,
} = props; } = props;
const handlePopoverOpen = (event: any) => { const handlePopoverOpen = (event: any) => {
changeOpen(true);
setAnchorEl(event.currentTarget); setAnchorEl(event.currentTarget);
}; };
const handelClick = (event: any) => { const handelClick = (event: any) => {
changeOpen(true);
setAnchorEl(event?.currentTarget); setAnchorEl(event?.currentTarget);
}; };
const handlePopoverClose = () => { const handlePopoverClose = () => {
changeOpen(false);
setAnchorEl(null); setAnchorEl(null);
}; };
const open = Boolean(anchorEl); useEffect(() => {
if (open) {
setAnchorEl(ref.current);
}
}, [open]);
const id = open ? "simple-popover" : undefined; const id = open ? "simple-popover" : undefined;
return ( return (
<div> <div>
<Typography <Typography
ref={ref}
aria-owns={id} aria-owns={id}
onClick={trigger === "click" ? handelClick : undefined} onClick={trigger === "click" ? handelClick : undefined}
onMouseEnter={trigger === "hover" ? handlePopoverOpen : undefined} onMouseEnter={trigger === "hover" ? handlePopoverOpen : undefined}
......
...@@ -12,6 +12,7 @@ import RadioGroup, { RadioGroupProps } from "@mui/material/RadioGroup"; ...@@ -12,6 +12,7 @@ import RadioGroup, { RadioGroupProps } from "@mui/material/RadioGroup";
import FormControlLabel from "@mui/material/FormControlLabel"; import FormControlLabel from "@mui/material/FormControlLabel";
import FormControl from "@mui/material/FormControl"; import FormControl from "@mui/material/FormControl";
import FormHelperText from "@mui/material/FormHelperText"; import FormHelperText from "@mui/material/FormHelperText";
import { ThemeProvider, createTheme } from "@mui/material/styles";
interface IMyRadioProps extends RadioGroupProps { interface IMyRadioProps extends RadioGroupProps {
value: any; value: any;
...@@ -44,6 +45,25 @@ export const optionsTransform = ( ...@@ -44,6 +45,25 @@ export const optionsTransform = (
}); });
}; };
const theme = createTheme({
components: {
MuiFormControlLabel: {
styleOverrides: {
label: {
fontSize: "14px",
},
},
},
MuiSvgIcon: {
styleOverrides: {
root: {
fontSize: "19px",
},
},
},
},
});
export default function MyRadio(props: IMyRadioProps) { export default function MyRadio(props: IMyRadioProps) {
const { const {
value, value,
...@@ -55,28 +75,30 @@ export default function MyRadio(props: IMyRadioProps) { ...@@ -55,28 +75,30 @@ export default function MyRadio(props: IMyRadioProps) {
} = props; } = props;
return ( return (
<FormControl fullWidth variant={variant} error={error}> <ThemeProvider theme={theme}>
<RadioGroup <FormControl fullWidth variant={variant} error={error}>
{...props} <RadioGroup
row {...props}
aria-labelledby="demo-row-radio-buttons-group-label" row
name="row-radio-buttons-group" aria-labelledby="demo-row-radio-buttons-group-label"
value={value} name="row-radio-buttons-group"
onChange={onChange} value={value}
> onChange={onChange}
{options.map((option) => { >
return ( {options.map((option) => {
<FormControlLabel return (
key={option.value} <FormControlLabel
value={option.value} key={option.value}
control={<Radio sx={{ color: "rgba(209, 214, 222, 1)" }} />} value={option.value}
label={option.label} control={<Radio sx={{ color: "rgba(209, 214, 222, 1)" }} />}
disabled={option.disabled} label={option.label}
/> disabled={option.disabled}
); />
})} );
</RadioGroup> })}
{helperText && error && <FormHelperText>{helperText}</FormHelperText>} </RadioGroup>
</FormControl> {helperText && error && <FormHelperText>{helperText}</FormHelperText>}
</FormControl>
</ThemeProvider>
); );
} }
...@@ -12,6 +12,7 @@ import FormControl from "@mui/material/FormControl"; ...@@ -12,6 +12,7 @@ import FormControl from "@mui/material/FormControl";
import FormHelperText from "@mui/material/FormHelperText"; import FormHelperText from "@mui/material/FormHelperText";
import Select, { SelectChangeEvent, SelectProps } from "@mui/material/Select"; import Select, { SelectChangeEvent, SelectProps } from "@mui/material/Select";
import { createTheme, ThemeProvider } from "@mui/material"; import { createTheme, ThemeProvider } from "@mui/material";
import selectActive from "@/assets/project/selectActive.svg";
export interface IOption { export interface IOption {
label: string; label: string;
...@@ -71,6 +72,35 @@ export default function MySelect(props: IProps) { ...@@ -71,6 +72,35 @@ export default function MySelect(props: IProps) {
styleOverrides: { styleOverrides: {
root: { root: {
height: "36px", height: "36px",
"& .Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
},
},
input: {
fontSize: "14px",
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
},
img: {
display: "none",
},
},
},
},
MuiList: {
styleOverrides: {
root: {
"& .MuiButtonBase-root": {
"&.Mui-selected": {
backgroundColor: "#fff",
color: "#1370FF",
},
},
}, },
}, },
}, },
...@@ -78,9 +108,12 @@ export default function MySelect(props: IProps) { ...@@ -78,9 +108,12 @@ export default function MySelect(props: IProps) {
MuiMenuItem: { MuiMenuItem: {
styleOverrides: { styleOverrides: {
root: { root: {
paddingRight: "46px",
fontSize: "14px",
lineHeight: "24px",
":hover": { ":hover": {
backgroundColor: "#ECF4FF ", backgroundColor: "#F0F2F5 ",
color: "#1370FF", color: "#1E2633",
}, },
}, },
}, },
...@@ -89,10 +122,30 @@ export default function MySelect(props: IProps) { ...@@ -89,10 +122,30 @@ export default function MySelect(props: IProps) {
MuiOutlinedInput: { MuiOutlinedInput: {
styleOverrides: { styleOverrides: {
root: { root: {
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
borderWidth: "1px",
},
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
},
":hover": { ":hover": {
"& .MuiOutlinedInput-notchedOutline": { "& .MuiOutlinedInput-notchedOutline": {
borderColor: "#1370ff", borderColor: "#1370ff",
}, },
"&.Mui-disabled": {
background: "rgba(247, 248, 250, 1)",
cursor: "not-allowed",
"& .MuiOutlinedInput-notchedOutline": {
borderColor: "#DDE1E6",
},
},
}, },
}, },
}, },
...@@ -119,6 +172,14 @@ export default function MySelect(props: IProps) { ...@@ -119,6 +172,14 @@ export default function MySelect(props: IProps) {
}, },
}, },
}, },
MuiPaper: {
styleOverrides: {
root: {
boxShadow: "0px 3px 10px 0px rgba(0,24,57,0.14)",
},
},
},
}, },
}); });
...@@ -153,6 +214,19 @@ export default function MySelect(props: IProps) { ...@@ -153,6 +214,19 @@ export default function MySelect(props: IProps) {
key={index} key={index}
> >
{item.label} {item.label}
{value === item.value && (
<img
style={{
width: "16px",
height: "16px",
position: "absolute",
top: "10px",
right: "12px",
}}
src={selectActive}
alt=""
/>
)}
</MenuItem> </MenuItem>
); );
}) })
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @FilePath: /bkunyun/src/components/mui/MySwitch.tsx * @FilePath: /bkunyun/src/components/mui/MySwitch.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
*/ */
import * as React from "react"; import React, { useMemo } from "react";
import Switch, { SwitchProps } from "@mui/material/Switch"; import Switch, { SwitchProps } from "@mui/material/Switch";
import { ThemeProvider, createTheme } from "@mui/material/styles"; import { ThemeProvider, createTheme } from "@mui/material/styles";
...@@ -17,43 +17,57 @@ interface IMySwitchProps extends SwitchProps { ...@@ -17,43 +17,57 @@ interface IMySwitchProps extends SwitchProps {
disabled?: boolean; disabled?: boolean;
} }
const theme = createTheme({ const MySwitch = (props: IMySwitchProps) => {
components: { const {
MuiSwitch: { value,
styleOverrides: { defaultChecked,
root: { onChange,
boxSizing: "border-box", disabled = false,
padding: "0", size,
}, ...other
switchBase: { } = props;
top: "4px",
left: "4px", const theme = useMemo(() => {
padding: 0, return createTheme({
"&.Mui-checked": { components: {
left: "2px", MuiSwitch: {
"& + .MuiSwitch-track": { styleOverrides: {
backgroundColor: "#1370ff", root: {
boxSizing: "border-box",
padding: "0",
},
switchBase: {
top: "4px",
left: "4px",
padding: 0,
"&.Mui-checked": {
left: "2px",
"& + .MuiSwitch-track": {
backgroundColor: disabled
? "rgba(166, 211, 255, 1)"
: "rgba(19, 112, 255, 1)",
opacity: 1,
},
},
},
thumb: {
width: "14px",
height: "14px",
color: "#fff",
},
track: {
borderRadius: "11px",
backgroundColor: disabled
? "RGBA(240, 242, 245, 1)"
: "RGBA(221, 225, 230, 1)",
opacity: 1, opacity: 1,
}, },
}, },
}, },
thumb: {
width: "14px",
height: "14px",
color: "#fff",
},
track: {
borderRadius: "11px",
backgroundColor: "#E6E8EB",
opacity: 1,
},
}, },
}, });
}, }, [disabled]);
});
const MySwitch = (props: IMySwitchProps) => {
const { value, defaultChecked, onChange, disabled = false, size, ...other } = props;
return ( return (
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Switch <Switch
...@@ -64,13 +78,13 @@ const MySwitch = (props: IMySwitchProps) => { ...@@ -64,13 +78,13 @@ const MySwitch = (props: IMySwitchProps) => {
sx={ sx={
size === "medium" size === "medium"
? { ? {
width: 44, width: 44,
height: 24, height: 24,
} }
: { : {
width: 40, width: 40,
height: 22, height: 22,
} }
} }
{...other} {...other}
/> />
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com * @Author: 吴永生 15770852798@163.com
* @Date: 2022-07-26 10:23:43 * @Date: 2022-07-26 10:23:43
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-26 11:53:00 * @LastEditTime: 2022-09-01 16:00:34
* @FilePath: /bkunyun/src/components/mui/MyTable/interface.ts * @FilePath: /bkunyun/src/components/mui/MyTable/interface.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
*/ */
...@@ -32,7 +32,7 @@ export interface ITableProps { ...@@ -32,7 +32,7 @@ export interface ITableProps {
/** 每行双击事件 */ /** 每行双击事件 */
onDoubleClick?: any, onDoubleClick?: any,
/** 是否loading */ /** 是否loading */
load?: boolean, loading?: boolean,
/** table size */ /** table size */
size?: any, size?: any,
/** 选中的checkbox数据 */ /** 选中的checkbox数据 */
...@@ -71,4 +71,6 @@ export interface ITableProps { ...@@ -71,4 +71,6 @@ export interface ITableProps {
onRef?: any; onRef?: any;
/** 手型 */ /** 手型 */
cursor?: string cursor?: string
/** 没有数据文案 */
noDataText?: string
} }
\ No newline at end of file
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @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: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-16 15:53:31 * @LastEditTime: 2022-09-01 19:34:35
* @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
*/ */
import { memo } from "react"; import { memo, useCallback } from "react";
import { isEqual } from "lodash"; import { isEqual } from "lodash";
import { useState } from "react"; import { useState } from "react";
import { Box } from "@mui/system"; import { Box } from "@mui/system";
...@@ -21,11 +21,14 @@ interface ITabList { ...@@ -21,11 +21,14 @@ interface ITabList {
component: JSX.Element | React.ReactNode; component: JSX.Element | React.ReactNode;
icon?: string; icon?: string;
iconed?: string; iconed?: string;
iconHover?: string;
hide?: boolean; hide?: boolean;
disabled?: boolean; disabled?: boolean;
} }
interface IProps { interface IProps {
value?: string;
onChange?: (val: string) => void;
tabList: ITabList[]; tabList: ITabList[];
defaultValue?: string; defaultValue?: string;
tabPanelSx?: any; tabPanelSx?: any;
...@@ -70,11 +73,14 @@ const theme = createTheme({ ...@@ -70,11 +73,14 @@ const theme = createTheme({
const Tabs = (props: IProps) => { const Tabs = (props: IProps) => {
const { const {
tabList, tabList,
value,
defaultValue, defaultValue,
onChange,
allowNullValue = false, allowNullValue = false,
tabPanelSx = { padding: "24px 0 0 0" }, tabPanelSx = { padding: "24px 0 0 0" },
} = props; } = props;
const [value, setValue] = useState(
const [tabValue, setTabValue] = useState(
defaultValue defaultValue
? defaultValue ? defaultValue
: allowNullValue : allowNullValue
...@@ -82,17 +88,38 @@ const Tabs = (props: IProps) => { ...@@ -82,17 +88,38 @@ const Tabs = (props: IProps) => {
: tabList.filter((e) => !e.hide)[0].value : tabList.filter((e) => !e.hide)[0].value
); );
const onChange = (val: string) => { const [hoverValue, setHoverValue] = useState("");
setValue(val);
const onTabChange = (val: string) => {
setTabValue(val);
onChange && onChange(val);
}; };
const getImgSrc = useCallback(
(item: ITabList) => {
let result = item.icon;
if (value === item.value || tabValue === item.value) {
result = item.iconed;
}
if (hoverValue === item.value) {
result = item.iconHover;
}
return result;
},
[hoverValue, value, tabValue]
);
const labelRender = (item: ITabList, key: number) => { const labelRender = (item: ITabList, key: number) => {
return ( return (
<Box style={{ display: "flex", alignItems: "center" }}> <div
style={{ display: "flex", alignItems: "center" }}
onMouseOver={() => setHoverValue(item.value)}
onMouseOut={() => setHoverValue("")}
>
{item.icon ? ( {item.icon ? (
<img <img
style={{ width: "16px", marginRight: "8px" }} style={{ width: "16px", marginRight: "8px" }}
src={value === item.value ? item.iconed : item.icon} src={getImgSrc(item)}
alt="" alt=""
/> />
) : ( ) : (
...@@ -108,17 +135,17 @@ const Tabs = (props: IProps) => { ...@@ -108,17 +135,17 @@ const Tabs = (props: IProps) => {
> >
{item.label} {item.label}
</Typography> </Typography>
</Box> </div>
); );
}; };
return ( return (
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<TabContext value={value}> <TabContext value={value || tabValue}>
<Box sx={{ borderBottom: 1, borderColor: "#dde1e6" }}> <Box sx={{ borderBottom: 1, borderColor: "#EDEFF2" }}>
<TabList <TabList
onChange={(e: any, val: string) => { onChange={(e: any, val: string) => {
onChange(val); onTabChange(val);
}} }}
> >
{tabList {tabList
......
...@@ -9,6 +9,13 @@ const roleList: any[] = [ ...@@ -9,6 +9,13 @@ const roleList: any[] = [
{ OWNER: 4 } { OWNER: 4 }
] ]
export const roleMap = {
VIEWER: '查看者',
USER: '研究员',
MANAGER: '管理员',
OWNER: '所有者',
}
const usePass = () => { const usePass = () => {
const { permissionStore } = useStores(); const { permissionStore } = useStores();
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
......
...@@ -41,9 +41,7 @@ root.render( ...@@ -41,9 +41,7 @@ root.render(
<React.StrictMode> <React.StrictMode>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Provider {...stores}> <Provider {...stores}>
<MySnackbarProvider <MySnackbarProvider>
alertSx={{ boxShadow: "0px 2px 4px 0px rgb(0 0 0 / 8%)" }}
>
<MyRouter></MyRouter> <MyRouter></MyRouter>
</MySnackbarProvider> </MySnackbarProvider>
</Provider> </Provider>
......
...@@ -18,6 +18,7 @@ type projectInfo = { ...@@ -18,6 +18,7 @@ type projectInfo = {
type productInfo = { type productInfo = {
id?: string; id?: string;
name?: string; name?: string;
path?: string;
}; };
/** 用户信息 */ /** 用户信息 */
......
/* /*
* @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: 吴永生 15770852798@163.com
* @LastEditTime: 2022-06-16 09:43:42 * @LastEditTime: 2022-09-01 19:34:46
* @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
*/ */
...@@ -24,7 +24,9 @@ class FileList { ...@@ -24,7 +24,9 @@ class FileList {
/** 文件上传列表 */ /** 文件上传列表 */
fileList: IUploadInfo[] = []; fileList: IUploadInfo[] = [];
/** 是否打开传输列表 */
openFileList: boolean = false
// setFileList (val: IUploadInfo[]) { // setFileList (val: IUploadInfo[]) {
// this.fileList = val // this.fileList = val
...@@ -39,6 +41,10 @@ class FileList { ...@@ -39,6 +41,10 @@ class FileList {
this.newFileList = val this.newFileList = val
} }
/** 打开关闭文件列表 */
setOpenFileList = (val: boolean) => {
this.openFileList = val
}
/** 设置文件上传信息 */ /** 设置文件上传信息 */
setUploadInfo = (id: string, val: IUploadInfo) => { setUploadInfo = (id: string, val: IUploadInfo) => {
......
.itemBox { .itemBox {
height: 50px; height: 50px;
padding: 16px 0; padding: 16px 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-bottom: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
} }
.fileNameBox { .fileNameBox {
white-space: nowrap; white-space: nowrap;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
color: #1e2633; color: #1e2633;
max-width: 260px; max-width: 260px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
font-size: 14px; font-size: 14px;
} }
.contentBox {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.speedBox { .speedBox {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.rightBox { .rightBox {
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 12px;
color: #1370ff; color: #1370ff;
} }
.leftBox { .leftBox {
display: flex; display: flex;
} }
.span { .span {
color: #8a9099; color: #8a9099;
font-size: 12px; font-size: 12px;
} }
...@@ -88,17 +88,17 @@ const FileItem = observer((props: IProps) => { ...@@ -88,17 +88,17 @@ const FileItem = observer((props: IProps) => {
const speed = useMemo(() => { const speed = useMemo(() => {
let val = 0; let val = 0;
const time = Math.floor((itemInfo?.endTime - itemInfo.startTime) / 1000); const time = Math.floor((itemInfo?.endTime - itemInfo?.startTime) / 1000);
if (time > 0) { if (time > 0) {
val = Math.floor(itemInfo?.bytesUploaded / time); val = Math.floor(itemInfo?.bytesUploaded / time);
} }
return val; return val;
}, [itemInfo?.bytesUploaded, itemInfo?.endTime, itemInfo.startTime]); }, [itemInfo?.bytesUploaded, itemInfo?.endTime, itemInfo?.startTime]);
return ( return (
<div className={styles.itemBox}> <div className={styles.itemBox}>
<div className={styles.leftBox}> <div className={styles.leftBox}>
<img src={bkunyunFile} alt="" style={{ marginRight: 16 }} /> <img src={bkunyunFile} alt="" style={{ marginRight: 16 }} />
<div> <div className={styles.contentBox}>
<div> <div>
<b className={styles.fileNameBox} title={itemInfo?.name || ""}> <b className={styles.fileNameBox} title={itemInfo?.name || ""}>
{itemInfo?.name || ""} {itemInfo?.name || ""}
......
/* /*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-10 18:05:21 * @Date: 2022-06-10 18:05:21
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-21 11:28:21 * @LastEditTime: 2022-09-02 10:47:33
* @FilePath: /bkunyun/src/views/ConsoleLayout/components/TransferList/index.tsx * @FilePath: /bkunyun/src/views/ConsoleLayout/components/TransferList/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
*/ */
...@@ -20,16 +20,19 @@ const TranSferList = observer(() => { ...@@ -20,16 +20,19 @@ const TranSferList = observer(() => {
const uploadInfoStore = toJS(useGlobalStore("fileListStore")); const uploadInfoStore = toJS(useGlobalStore("fileListStore"));
return ( return (
<Box style={{ width: 520, padding: 20 }}> <Box style={{ width: 520 }}>
<MyTitle title="传输列表" /> <MyTitle style={{ padding: "12px 16px" }} title="传输列表" />
<Box <Box
style={{ style={{
display: "flex", display: "flex",
justifyContent: "space-between", justifyContent: "space-between",
alignItems: "center", alignItems: "center",
padding: "0 16px",
}} }}
> >
<Box style={{ color: "#8A9099" }}>请勿在上传过程中刷新页面!</Box> <Box style={{ color: "#8A9099", fontSize: 14 }}>
请勿在上传过程中刷新页面!
</Box>
<MySelect <MySelect
variant="standard" variant="standard"
value={"default"} value={"default"}
...@@ -43,11 +46,11 @@ const TranSferList = observer(() => { ...@@ -43,11 +46,11 @@ const TranSferList = observer(() => {
size="small" size="small"
/> />
</Box> </Box>
<Box style={{ height: 400, overflowY: "auto" }}> <div style={{ height: 400, overflow: "overlay", padding: "0 16px" }}>
{uploadInfoStore?.fileList.map((item) => { {uploadInfoStore?.fileList.map((item) => {
return <FileItem fileItemInfo={item} key={item.id} />; return <FileItem fileItemInfo={item} key={item.id} />;
})} })}
</Box> </div>
</Box> </Box>
); );
}); });
......
...@@ -13,10 +13,70 @@ ...@@ -13,10 +13,70 @@
} }
.logo { .logo {
padding: 0px 16px 0px 20px; padding: 0px 32px 0px 20px;
margin-top: -10px; margin-top: -10px;
} }
.menuBox {
line-height: 57px;
height: 57px;
font-size: 14px;
color: rgba(86, 92, 102, 1);
margin-right: 24px;
cursor: pointer;
position: relative;
}
.menuTitle:hover {
color: #1e2633;
}
.menuBox:hover .productList {
display: block;
}
.triangle {
width: 16px;
height: 16px;
position: relative;
top: 4px;
transition: width 1s;
-webkit-transition: width 1s;
}
.menuBox:hover .triangle {
transform: rotateX(180deg);
}
.productList {
position: absolute;
top: 57px;
left: -16px;
padding: 8px 0;
display: none;
background: #ffffff;
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.14);
border-radius: 4px;
z-index: 1002;
}
.productLi {
min-width: 142px;
height: 36px;
padding: 7px 50px 7px 16px;
font-size: 14px;
color: rgba(30, 38, 51, 1);
line-height: 22px;
cursor: pointer;
position: relative;
box-sizing: border-box;
}
.productLi:hover {
color: rgba(19, 112, 255, 1);
}
.productLiActive {
color: rgba(19, 112, 255, 1);
}
.selectActive {
width: 16px;
height: 16px;
position: absolute;
top: 10px;
right: 12px;
}
.uploadIconBox { .uploadIconBox {
width: 32px; width: 32px;
height: 32px; height: 32px;
...@@ -39,16 +99,14 @@ ...@@ -39,16 +99,14 @@
} }
.topRightItem { .topRightItem {
margin-right: 20px; margin-right: 24px;
} }
.topRightTriangle {
.ArrowDropDownIconRoot {
color: #8a9099; color: #8a9099;
transition: all 0.2s !important; transition: all 0.2s !important;
transform: rotate(0); transform: rotate(0);
} }
.topRightTriangleOpen {
.ArrowDropDownIconRootOpen {
color: #8a9099; color: #8a9099;
transform: rotate(180deg); transform: rotate(180deg);
} }
......
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Outlet, useLocation, useNavigate } from "react-router-dom"; import { Outlet, useLocation, useNavigate } from "react-router-dom";
import cx from "classnames";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
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 classNames from "classnames"; import classNames from "classnames";
import uploadIcon from "@/assets/img/uploadIcon.svg"; import uploadIcon from "@/assets/img/uploadIcon.svg";
import triangle from "@/assets/project/triangle.svg";
import selectActive from "@/assets/project/selectActive.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";
import MyButton from "@/components/mui/MyButton";
import logo from "@/assets/img/logo.svg"; import logo from "@/assets/img/logo.svg";
import MyPopover from "@/components/mui/MyPopover"; import MyPopover from "@/components/mui/MyPopover";
import TranSferList from "./components/TransferList"; import TranSferList from "./components/TransferList";
import { getProjectList } from "@/api/project_api"; import { getProjectList } from "@/api/project_api";
import useMyRequest from "@/hooks/useMyRequest"; import useMyRequest from "@/hooks/useMyRequest";
import { toJS } from "mobx";
import { import {
setFileServerEndPointLocalStorage, setFileServerEndPointLocalStorage,
getFiletokenAccordingToId, getFiletokenAccordingToId,
...@@ -25,29 +25,19 @@ import { ...@@ -25,29 +25,19 @@ import {
import style from "./index.module.css"; import style from "./index.module.css";
const ConsoleLayout = observer(() => { const ConsoleLayout = observer(() => {
const { const { utilityAnchorEl, utilityOpen, handleUtilityClick, handleClose } =
productAnchorEl, useIndex();
utilityAnchorEl,
productOpen,
utilityOpen,
handleProductClick,
handleUtilityClick,
handleClose,
} = useIndex();
const [currentProduct, setCurrentProduct] = useState<{ const { currentProjectStore, fileListStore } = useStores();
path: string; const { openFileList, setOpenFileList } = fileListStore;
name: string; const productInfo = toJS(currentProjectStore.currentProductInfo);
}>();
const { currentProjectStore } = useStores();
const { run: runGetProjectList } = useMyRequest(getProjectList, { const { run: runGetProjectList } = useMyRequest(getProjectList, {
onSuccess: (res) => { onSuccess: (res) => {
let list = res.data; let list = res.data;
if (list.length === 0) { if (list.length === 0) {
currentProjectStore.setProjectList([]); currentProjectStore.setProjectList([]);
currentProjectStore.changeProject({}); currentProjectStore.changeProject({});
navigate(currentProduct?.path as string); navigate(productInfo?.path as string);
} else { } else {
currentProjectStore.setProjectList(list); currentProjectStore.setProjectList(list);
currentProjectStore.changeProject(list[0]); currentProjectStore.changeProject(list[0]);
...@@ -56,15 +46,18 @@ const ConsoleLayout = observer(() => { ...@@ -56,15 +46,18 @@ const ConsoleLayout = observer(() => {
list[0].filetoken = res; list[0].filetoken = res;
currentProjectStore.changeProject(list[0]); currentProjectStore.changeProject(list[0]);
}); });
navigate(currentProduct?.path as string); navigate(productInfo?.path as string);
} }
}, },
}); });
// 切换产品 // 切换产品
const getProduct = (item: any) => { const getProduct = (item: any) => {
currentProjectStore.changeProductInfo({ id: item.id, name: item.name }); currentProjectStore.changeProductInfo({
setCurrentProduct(item); id: item.id,
name: item.name,
path: item.path,
});
runGetProjectList({ runGetProjectList({
product: item.id, product: item.id,
}); });
...@@ -83,62 +76,54 @@ const ConsoleLayout = observer(() => { ...@@ -83,62 +76,54 @@ const ConsoleLayout = observer(() => {
<Box className={style.topApp}> <Box className={style.topApp}>
<Box className={style.topLeftBox}> <Box className={style.topLeftBox}>
<img src={logo} alt="" className={style.logo} /> <img src={logo} alt="" className={style.logo} />
<MyButton {/* <MyButton
text={globalText.console} text={globalText.console}
variant={"text"} variant={"text"}
style={{ color: "#565C66" }} style={{ color: "#565C66" }}
onClick={() => navigate("/home")} onClick={() => navigate("/home")}
/> /> */}
<div className={style.menuBox} onClick={() => navigate("/home")}>
<div className={style.menuTitle}>{globalText.console}</div>
</div>
<Box sx={{ display: "flex", alignItems: "center" }}> <div className={style.menuBox}>
<MyButton <div className={style.menuTitle}>
text={globalText.product} <span>{globalText.product}</span>
variant={"text"} <img className={style.triangle} src={triangle} alt="" />
style={{ color: "#565C66", paddingLeft: '8px' }} </div>
onClick={handleProductClick} <div className={style.productList}>
dropValue={productOpen}
drop={true}
/>
{/* <ArrowDropDownIcon classes={{
root: cx({
[style.ArrowDropDownIconRoot]: true,
[style.ArrowDropDownIconRootOpen]: Boolean(productOpen)
})
}} /> */}
<Menu
id="product-menu"
anchorEl={productAnchorEl}
open={productOpen}
onClose={handleClose}
classes={{
paper: style.menuPaper,
}}
MenuListProps={{
"aria-labelledby": "product-button",
}}
>
{menuStore.productList.map((item) => { {menuStore.productList.map((item) => {
return ( return (
<MenuItem <div
key={item.path} key={item.path}
classes={{ className={classNames({
root: style.menuItemRoot, [style.productLi]: true,
}} [style.productLiActive]: productInfo.path === item.path,
})}
onClick={() => { onClick={() => {
getProduct(item); getProduct(item);
handleClose(); handleClose();
}} }}
> >
{item.name} {item.name}
</MenuItem> {productInfo.path === item.path && (
<img
className={style.selectActive}
src={selectActive}
alt=""
/>
)}
</div>
); );
})} })}
</Menu> </div>
</Box> </div>
</Box> </Box>
<Box className={style.topRightBox}> <Box className={style.topRightBox}>
<MyPopover <MyPopover
open={openFileList}
changeOpen={(val) => setOpenFileList(val)}
content={<TranSferList />} content={<TranSferList />}
transformOrigin={{ transformOrigin={{
vertical: "top", vertical: "top",
...@@ -152,7 +137,6 @@ const ConsoleLayout = observer(() => { ...@@ -152,7 +137,6 @@ const ConsoleLayout = observer(() => {
style={{ verticalAlign: "middle" }} style={{ verticalAlign: "middle" }}
/> />
</div> </div>
</MyPopover> </MyPopover>
<Box className={style.topRightItem}> <Box className={style.topRightItem}>
<Box <Box
...@@ -170,13 +154,13 @@ const ConsoleLayout = observer(() => { ...@@ -170,13 +154,13 @@ const ConsoleLayout = observer(() => {
> >
H H
</Avatar> </Avatar>
<ArrowDropDownIcon <img
classes={{ className={classNames({
root: cx({ [style.topRightTriangle]: true,
[style.ArrowDropDownIconRoot]: true, [style.topRightTriangleOpen]: Boolean(utilityOpen),
[style.ArrowDropDownIconRootOpen]: Boolean(utilityOpen), })}
}), src={triangle}
}} alt=""
/> />
</Box> </Box>
...@@ -213,4 +197,4 @@ const ConsoleLayout = observer(() => { ...@@ -213,4 +197,4 @@ const ConsoleLayout = observer(() => {
); );
}); });
export default ConsoleLayout; export default ConsoleLayout;
\ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
} }
.list { .list {
height: calc(100% - 55px); height: calc(100% - 55px);
overflow-y: auto; overflow-y: overlay;
padding: 15px 20px; padding: 15px 20px;
box-sizing: border-box; box-sizing: border-box;
} }
......
...@@ -202,6 +202,7 @@ const SaveOperator = (props: IProps) => { ...@@ -202,6 +202,7 @@ const SaveOperator = (props: IProps) => {
<span <span
style={{ style={{
position: "absolute", position: "absolute",
fontSize: "14px",
bottom: "7px", bottom: "7px",
right: "12px", right: "12px",
color: description.length >= 300 ? "#d32f2f" : "#C2C6CC", color: description.length >= 300 ? "#d32f2f" : "#C2C6CC",
......
...@@ -27,18 +27,14 @@ const CustomOperator = observer((props: IProps) => { ...@@ -27,18 +27,14 @@ const CustomOperator = observer((props: IProps) => {
/** 设置选中唯一标识符 */ /** 设置选中唯一标识符 */
const handleNodeClick = useCallback((val: string) => { const handleNodeClick = useCallback((val: string) => {
// setSelectTaskId(val); // setSelectTaskId(val);
// console.log(val);
}, []); }, []);
// 判断 每个流算子必须至少有一条连接线。 // 判断 每个流算子必须至少有一条连接线。
const checkHasOneLine = (sourceArr: string[], targetArr: string[]) => { const checkHasOneLine = (sourceArr: string[], targetArr: string[]) => {
console.log("checkHasOneLine");
const all = _.uniq([...sourceArr, ...targetArr]); const all = _.uniq([...sourceArr, ...targetArr]);
if (all.length === operatorList.length) { if (all.length === operatorList.length) {
console.log("checkHasOneLine1");
return true; return true;
} else { } else {
console.log("checkHasOneLine2");
return false; return false;
} }
// _.uniq([2, 1, 2]); // _.uniq([2, 1, 2]);
...@@ -46,7 +42,6 @@ const CustomOperator = observer((props: IProps) => { ...@@ -46,7 +42,6 @@ const CustomOperator = observer((props: IProps) => {
// 判断 每个起始算子(可以有多个起始点)的输入必须为文件的路径输入或数据集的路径输入。 // 判断 每个起始算子(可以有多个起始点)的输入必须为文件的路径输入或数据集的路径输入。
const checkIn = (targetArr: string[]) => { const checkIn = (targetArr: string[]) => {
console.log("checkIn");
const uniqTargetArr = _.uniq(targetArr); const uniqTargetArr = _.uniq(targetArr);
if (uniqTargetArr.length === operatorList.length) { if (uniqTargetArr.length === operatorList.length) {
// 流节点连成一个圈了 // 流节点连成一个圈了
...@@ -82,7 +77,6 @@ const CustomOperator = observer((props: IProps) => { ...@@ -82,7 +77,6 @@ const CustomOperator = observer((props: IProps) => {
// 判断 起码有一个结尾算子(可以有多个结尾点)的输出必须为文件保存或数据集保存。 // 判断 起码有一个结尾算子(可以有多个结尾点)的输出必须为文件保存或数据集保存。
const checkOut = (sourceArr: string[]) => { const checkOut = (sourceArr: string[]) => {
console.log("checkOut");
const uniqSourceArr = _.uniq(sourceArr); const uniqSourceArr = _.uniq(sourceArr);
if (uniqSourceArr.length === operatorList.length) { if (uniqSourceArr.length === operatorList.length) {
// 流节点连成一个圈了 // 流节点连成一个圈了
...@@ -134,22 +128,18 @@ const CustomOperator = observer((props: IProps) => { ...@@ -134,22 +128,18 @@ const CustomOperator = observer((props: IProps) => {
edge.target && targetArr.push(edge.target); edge.target && targetArr.push(edge.target);
}); });
}); });
console.log("operatorList", operatorList);
console.log("sourceArr", sourceArr);
console.log("targetArr", targetArr);
if (!checkHasOneLine([...sourceArr], [...targetArr])) { if (!checkHasOneLine([...sourceArr], [...targetArr])) {
console.log("checkHasOneLine"); Message.error("部分算子没有流程线,请检查流程!");
Message.error("内容校验未通过,请检查!");
return; return;
} }
if (!checkIn([...targetArr])) { if (!checkIn([...targetArr])) {
console.log("checkIn"); Message.error("每个流程第一步需读取文件/数据集,请检查流程!");
Message.error("内容校验未通过,请检查!");
return; return;
} }
if (!checkOut([...sourceArr])) { if (!checkOut([...sourceArr])) {
console.log("checkOut"); Message.error(
Message.error("内容校验未通过,请检查!"); "每个流程最后一步必须将数据写入为文件/数据集,请检查流程!"
);
return; return;
} }
setSaveFormDialog(true); setSaveFormDialog(true);
......
.parentBox {
height: calc(100vh - 57px);
position: relative;
}
.centerBox {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
.centerImg{
width: 186px;
height: 114px;
}
.centerText {
font-size: 14px;
color: #565C66;
line-height: 22px;
margin-top: 20px;
text-align: center;
}
.bottomText {
font-size: 14px;
color: #8A9099;
line-height: 22px;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20px;
}
\ No newline at end of file
import React from "react"; import React from "react";
import style from "./index.module.css";
import building from "@/assets/img/building.png";
const Home = () => { const Home = () => {
return <div>Home</div>; return <div className={style.parentBox}>
<div className={style.centerBox}>
<img src={building} className={style.centerImg} />
<div className={style.centerText}>平台正在努力建设中…</div>
</div>
<div className={style.bottomText}>平台当前为beta版本,非最终品质</div>
</div>
}; };
export default Home; export default Home;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.content { .content {
flex: 1; flex: 1;
height: calc(100vh - 57px); height: calc(100vh - 57px);
overflow: scroll; overflow: overlay;
} }
.listItem { .listItem {
padding: 8px 25px; padding: 8px 25px;
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
} }
.listItem:hover { .listItem:hover {
background-color: #eef1f5; background-color: #eef1f5;
border-left: 3px solid #eef1f5;
} }
.routerIcon { .routerIcon {
vertical-align: middle; vertical-align: middle;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com * @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-02 11:43:28 * @Date: 2022-08-02 11:43:28
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-03 19:05:48 * @LastEditTime: 2022-09-02 12:01:12
* @FilePath: /bkunyun/src/views/MenuLayout/index.tsx * @FilePath: /bkunyun/src/views/MenuLayout/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
*/ */
...@@ -17,64 +17,80 @@ import classnames from "classnames"; ...@@ -17,64 +17,80 @@ import classnames from "classnames";
import { toJS } from "mobx"; import { toJS } from "mobx";
const MenuLayout = observer(() => { const MenuLayout = observer(() => {
const { permissionStore, currentProjectStore } = useStores(); const { permissionStore, currentProjectStore } = useStores();
let pathname = new URL(window.location.href).pathname; let pathname = new URL(window.location.href).pathname;
const navigate = useNavigate(); const navigate = useNavigate();
const productInfo = toJS(currentProjectStore.currentProductInfo); const productInfo = toJS(currentProjectStore.currentProductInfo);
// 未选择产品时 直接跳转home页面 // 未选择产品时 直接跳转home页面
if (!productInfo.name) { if (!productInfo.name) {
navigate("/home"); navigate("/home");
} }
const routerIcon = (id: string, isSelect: boolean) => { const routerIcon = (id: string, isSelect: boolean) => {
try { try {
const result = require(`../../assets/project/${id}${isSelect ? '_BLUE' : ''}.svg`) const result = require(`../../assets/project/${id}${
return result || '' isSelect ? "_BLUE" : ""
} catch (error) { }.svg`);
console.log(error) return result || "";
} } catch (error) {
} console.log(error);
}
};
return ( return (
<Box className={style.container}> <Box className={style.container}>
<Box className={style.aside}> <Box className={style.aside}>
{ {pathname.indexOf("userCenter") < 0 && <CurrentProject />}
pathname.indexOf('userCenter') < 0 && <CurrentProject /> <List
} sx={{
<List paddingTop: 0,
sx={{ paddingBottom: 0,
paddingTop: 0, }}
paddingBottom: 0, >
}} {permissionStore.sidebarRouters.map((item, index) => {
> if (item.show) {
{permissionStore.sidebarRouters.map((item, index) => { return (
if (item.show) { <li
return ( key={"sidebar" + index}
<li className={classnames({
key={"sidebar" + index} [style.listItem]: true,
className={classnames({ [style.active]: `/v3${item.path}` === pathname,
[style.listItem]: true, })}
[style.active]: `/v3${item.path}` === pathname, style={
})} `/v3${item.path}` === pathname
onClick={() => item.type === "page" && navigate(item.path)} ? { borderLeft: "3px solid #1370ff" }
> : undefined
<img className={style.routerIcon} src={routerIcon(item.id || '', `/v3${item.path}` === pathname) || undefined} alt='' /> }
<span style={{ verticalAlign: 'middle', fontWeight: '500' }}>{item.name}</span> onClick={() => item.type === "page" && navigate(item.path)}
</li> >
); <img
} className={style.routerIcon}
return null; src={
})} routerIcon(
</List> item.id || "",
</Box> `/v3${item.path}` === pathname
<Box className={style.content}> ) || undefined
<Outlet></Outlet> }
</Box> alt=""
</Box> />
); <span style={{ verticalAlign: "middle", fontWeight: "500" }}>
{item.name}
</span>
</li>
);
}
return null;
})}
</List>
</Box>
<Box className={style.content}>
<Outlet></Outlet>
</Box>
</Box>
);
}); });
export default MenuLayout; export default MenuLayout;
...@@ -89,6 +89,7 @@ const DeleteDialog = (props: IDeleteFileProps) => { ...@@ -89,6 +89,7 @@ const DeleteDialog = (props: IDeleteFileProps) => {
open={deleteDialogOpen} open={deleteDialogOpen}
onClose={() => setDeleteDialogOpen(false)} onClose={() => setDeleteDialogOpen(false)}
onConfirm={handleSubmit} onConfirm={handleSubmit}
okColor="error"
> >
{currentOperateFile {currentOperateFile
? "确认删除该数据吗?" ? "确认删除该数据吗?"
......
.rootTitle { .rootTitle {
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
background-color: rgba(25, 118, 210, 0.08); background-color: rgba(25, 118, 210, 0.08);
/* background-color: rgba(25, 118, 210, 0.5); */ line-height: 44px;
line-height: 44px; color: rgba(30, 38, 51, 1);
color: rgba(30, 38, 51, 1); font-size: 14px;
font-size: 14px; font-weight: 600;
font-weight: 600; display: flex;
display: flex; justify-content: flex-start;
justify-content: flex-start; align-items: center;
align-items: center;
} }
.rootTitleActive { .rootTitleActive {
background-color: rgba(25, 118, 210, 0.2); background-color: rgba(25, 118, 210, 0.2);
} }
.bigFolderIcon { .bigFolderIcon {
margin: 0 9px; margin: 0 9px;
} }
.treeLabel { .treeLabel {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.treeLabelText{ .treeLabelText {
line-height: 44px; line-height: 44px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow:ellipsis; -o-text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
width: 320px; width: 320px;
} }
.labelFolderIcon { .labelFolderIcon {
margin-right: 9px; margin-right: 9px;
} }
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
} }
.table { .table {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: overlay;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
} }
.datasetLiDataList { .datasetLiDataList {
flex: 1; flex: 1;
overflow: auto; overflow: overlay;
} }
.noDataList { .noDataList {
flex: 1; flex: 1;
......
...@@ -19,6 +19,7 @@ import classNames from "classnames"; ...@@ -19,6 +19,7 @@ import classNames from "classnames";
import Save from "./save"; import Save from "./save";
import NoData from "@/components/BusinessComponents/NoData"; import NoData from "@/components/BusinessComponents/NoData";
import Download from "./download"; import Download from "./download";
import MyTooltip from "@/components/mui/MyTooltip";
import style from "./index.module.css"; import style from "./index.module.css";
type ISeeDatasetProps = { type ISeeDatasetProps = {
...@@ -117,14 +118,15 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -117,14 +118,15 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
Object.keys(res.data.list[0]).forEach((item) => { Object.keys(res.data.list[0]).forEach((item) => {
if ( if (
![ ![
"canonical_smiles", "meta",
"id", "id",
"mol", // "canonical_smiles",
"mol2", // "mol",
"pdb", // "mol2",
"sdf", // "pdb",
"sdf2d", // "sdf",
"sdf3d", // "sdf2d",
// "sdf3d",
// "smiles", // "smiles",
].includes(item) ].includes(item)
) { ) {
...@@ -156,6 +158,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -156,6 +158,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
searchDataType, searchDataType,
sort, sort,
keyword, keyword,
firstGetList,
// Message, // Message,
] ]
); );
...@@ -219,11 +222,12 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -219,11 +222,12 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
<div className={style.screensRight}> <div className={style.screensRight}>
<MySelect <MySelect
options={dataTypes} options={dataTypes}
title="选择属性" title={dataTypes.length === 0 ? "暂无属性" : "选择属性"}
isTitle={true} isTitle={true}
value={searchDataType} value={searchDataType}
onChange={handleSearchDataTypeChange} onChange={handleSearchDataTypeChange}
fullWidth={false} fullWidth={false}
disabled={dataTypes.length === 0}
sx={{ sx={{
width: "160px", width: "160px",
marginRight: "16px", marginRight: "16px",
...@@ -267,8 +271,8 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -267,8 +271,8 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
sx={{ sx={{
width: "340px", width: "340px",
marginRight: "16px", marginRight: "16px",
height: "32px",
}} }}
size="small"
></MyInput> ></MyInput>
<MyButton <MyButton
text="确认" text="确认"
...@@ -313,7 +317,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -313,7 +317,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
</div> </div>
{showData.length !== 0 && ( {showData.length !== 0 && (
<div className={style.datasetLiDataList}> <div className={style.datasetLiDataList}>
{Object.keys(item.meta) {Object.keys(item)
.filter((key) => showData.indexOf(key) !== -1) .filter((key) => showData.indexOf(key) !== -1)
.map((key, index) => { .map((key, index) => {
return ( return (
...@@ -326,11 +330,13 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -326,11 +330,13 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
> >
{key} {key}
</span> </span>
<span <MyTooltip title={item[key]}>
className={style.datasetLiDataLiValue} <span
> className={style.datasetLiDataLiValue}
{item.meta[key]} >
</span> {item[key]}
</span>
</MyTooltip>
</div> </div>
); );
})} })}
......
...@@ -50,10 +50,6 @@ ...@@ -50,10 +50,6 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
} }
/* .tableBox {
height: 300px;
overflow: scroll;
} */
.fileIconBox { .fileIconBox {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
......
...@@ -135,6 +135,7 @@ const UpLoaderFile = observer((props: IMoveFileProps) => { ...@@ -135,6 +135,7 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
}; };
}) || []; }) || [];
toJS(fileListStore?.setNewFileList)(newFileList); toJS(fileListStore?.setNewFileList)(newFileList);
fileListStore?.setOpenFileList(true);
if (newFileList?.length) { if (newFileList?.length) {
getFileToken(newFileList); getFileToken(newFileList);
} }
...@@ -172,14 +173,14 @@ const UpLoaderFile = observer((props: IMoveFileProps) => { ...@@ -172,14 +173,14 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
const renderButtons = (item: any, index: number) => { const renderButtons = (item: any, index: number) => {
return ( return (
<MyButton <MyButton
text='删除' text="删除"
style={{ position: "relative", left: "-18px" }} style={{ position: "relative", left: "-18px" }}
variant="text" variant="text"
size="small" size="small"
color="error" color="error"
onClick={() => handleRowDelete(index)} onClick={() => handleRowDelete(index)}
/> />
); );
}; };
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
color: #1e2633; color: #1e2633;
line-height: 22px; line-height: 22px;
font-weight: 600; font-weight: 600;
display: flex;
justify-content: flex-start;
align-items: center;
} }
.projectDataTabsAndBtton { .projectDataTabsAndBtton {
...@@ -40,6 +43,11 @@ ...@@ -40,6 +43,11 @@
align-items: center; align-items: center;
} }
.refreshIcon {
width: 16px;
height: 16px;
}
.folderIconBox { .folderIconBox {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
...@@ -72,8 +80,9 @@ ...@@ -72,8 +80,9 @@
line-height: 22px; line-height: 22px;
font-size: 14px; font-size: 14px;
color: #1e2633; color: #1e2633;
/* display: flex; display: flex;
align-items: center; */ justify-content: flex-start;
align-items: center;
} }
.showPathI { .showPathI {
......
...@@ -2,9 +2,9 @@ import React, { useState, useCallback, useEffect, useMemo } from "react"; ...@@ -2,9 +2,9 @@ import React, { useState, useCallback, useEffect, useMemo } from "react";
import style from "./index.module.css"; import style from "./index.module.css";
import classnames from "classnames"; import classnames from "classnames";
import { IconButton } from "@mui/material"; import { IconButton } from "@mui/material";
import RefreshIcon from "@mui/icons-material/Refresh";
import MyTable from "@/components/mui/MyTable"; import MyTable from "@/components/mui/MyTable";
import dataSetIcon from "@/assets/project/dataSetIcon.svg"; import dataSetIcon from "@/assets/project/dataSetIcon.svg";
import refresh from "@/assets/project/refresh.svg";
import fileIcon from "@/assets/project/fileIcon.svg"; import fileIcon from "@/assets/project/fileIcon.svg";
import folderIcon from "@/assets/project/folderIcon.svg"; import folderIcon from "@/assets/project/folderIcon.svg";
import noFile from "@/assets/project/noFile.svg"; import noFile from "@/assets/project/noFile.svg";
...@@ -27,6 +27,7 @@ import SeeDataset from "./SeeDataset"; ...@@ -27,6 +27,7 @@ import SeeDataset from "./SeeDataset";
import { getDataFind, getDataFileSearch } from "@/api/project_api"; import { getDataFind, getDataFileSearch } from "@/api/project_api";
import MyButton from "@/components/mui/MyButton"; import MyButton from "@/components/mui/MyButton";
import SearchInput from "@/components/BusinessComponents/SearchInput"; import SearchInput from "@/components/BusinessComponents/SearchInput";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
const ProjectData = observer(() => { const ProjectData = observer(() => {
const isPass = usePass(); const isPass = usePass();
...@@ -68,7 +69,7 @@ const ProjectData = observer(() => { ...@@ -68,7 +69,7 @@ const ProjectData = observer(() => {
useEffect(() => { useEffect(() => {
const locationInfo: any = location?.state; const locationInfo: any = location?.state;
setActiveTab(locationInfo?.dataType || 'file') setActiveTab(locationInfo?.dataType || "file");
setPath(locationInfo?.pathName || "/"); setPath(locationInfo?.pathName || "/");
}, [location]); }, [location]);
...@@ -462,7 +463,13 @@ const ProjectData = observer(() => { ...@@ -462,7 +463,13 @@ const ProjectData = observer(() => {
> >
{index === 0 ? "ProjectData" : item}{" "} {index === 0 ? "ProjectData" : item}{" "}
{index === pathArr.length - 1 ? null : ( {index === pathArr.length - 1 ? null : (
<i className={style.showPathI}>{">"}</i> <ChevronRightIcon
sx={{
fontSize: "16px",
color: "rgba(194, 198, 204, 1)",
margin: "0px 4px",
}}
/>
)} )}
</span> </span>
); );
...@@ -494,10 +501,24 @@ const ProjectData = observer(() => { ...@@ -494,10 +501,24 @@ const ProjectData = observer(() => {
: ""} : ""}
{index === pathArr.length - 1 || {index === pathArr.length - 1 ||
(index <= pathArr.length - 4 && index > 0) ? null : ( (index <= pathArr.length - 4 && index > 0) ? null : (
<i className={style.showPathI}>{">"}</i> <ChevronRightIcon
sx={{
fontSize: "16px",
color: "rgba(194, 198, 204, 1)",
margin: "0px 4px",
}}
/>
)} )}
{index === 1 && "..."} {index === 1 && "..."}
{index === 1 && <i className={style.showPathI}>{">"}</i>} {index === 1 && (
<ChevronRightIcon
sx={{
fontSize: "16px",
color: "rgba(194, 198, 204, 1)",
margin: "0px 4px",
}}
/>
)}
</span> </span>
); );
}); });
...@@ -557,12 +578,17 @@ const ProjectData = observer(() => { ...@@ -557,12 +578,17 @@ const ProjectData = observer(() => {
size="small" size="small"
onClick={handleRefresh} onClick={handleRefresh}
disabled={!isPass("PROJECT_DATA_REFRESH", "USER")} disabled={!isPass("PROJECT_DATA_REFRESH", "USER")}
sx={{ marginLeft: "17px", width: '32px', height: '32px', ":hover": { sx={{
backgroundColor: "#F0F2F5 ", marginLeft: "12px",
borderRadius: 2 width: "32px",
} }} height: "32px",
":hover": {
backgroundColor: "rgba(240, 242, 245, 1)",
borderRadius: "4px",
},
}}
> >
<RefreshIcon sx={{ fontSize: "18px" }} /> <img className={style.refreshIcon} src={refresh} alt="" />
</IconButton> </IconButton>
</div> </div>
</div> </div>
...@@ -597,10 +623,9 @@ const ProjectData = observer(() => { ...@@ -597,10 +623,9 @@ const ProjectData = observer(() => {
{selectIds.length > 0 && ( {selectIds.length > 0 && (
<div className={style.projectDataStickyBox}> <div className={style.projectDataStickyBox}>
<MyButton <MyButton
text={`批量删除(${selectIds.length})`} text={`批量删除 (${selectIds.length})`}
color="error" color="error"
variant="outlined" variant="outlined"
size="small"
style={{ marginRight: "12px" }} style={{ marginRight: "12px" }}
onClick={() => { onClick={() => {
setCurrentOperateFile(null); setCurrentOperateFile(null);
...@@ -609,10 +634,9 @@ const ProjectData = observer(() => { ...@@ -609,10 +634,9 @@ const ProjectData = observer(() => {
disabled={!isPass("PROJECT_DATA_DELETE", "USER")} disabled={!isPass("PROJECT_DATA_DELETE", "USER")}
/> />
<MyButton <MyButton
text={`批量移动(${selectIds.length})`} text={`批量移动 (${selectIds.length})`}
// color="neutral" // color="neutral"
variant="contained" variant="contained"
size="small"
style={{ marginRight: "24px" }} style={{ marginRight: "24px" }}
onClick={() => { onClick={() => {
setCurrentOperateFile(null); setCurrentOperateFile(null);
......
.logView { .logView {
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, .5); background-color: rgba(0, 0, 0, 0.5);
z-index: 1002; z-index: 1002;
} }
.logViewBox { .logViewBox {
position: absolute; background: #282c34;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 900px;
height: 600px;
background: #282C34;
box-shadow: 2px 4px 20px 0px rgba(0, 15, 45, 0.1200);
border-radius: 8px;
} }
.close { .close {
position: absolute; position: absolute;
right: 0; right: 0;
top: -28px; top: -28px;
cursor: pointer; cursor: pointer;
color: #fff; color: #fff;
} }
.logViewTop { .logViewTop {
/* height: 30px; */ /* height: 30px; */
background-color: #1D2126; width: 100vw;
border-radius: 8px 8px 0 0; background-color: #1d2126;
display: flex; /* border-radius: 8px 8px 0 0; */
font-size: 12px; display: flex;
color: #8A9099; font-size: 12px;
overflow: auto; color: #8a9099;
/* overflow: overlay; */
} }
.logViewTop::-webkit-scrollbar-track { .logViewTop::-webkit-scrollbar-track {
background-color: #282C34; background-color: #282c34;
} }
.logTitle { .logTitle {
display: flex; display: flex;
align-items: center; width: 0;
height: 30px; max-width: 200px;
line-height: 20px; overflow: hidden;
padding: 0 24px; white-space: nowrap;
cursor: pointer; text-overflow:ellipsis;
flex: 1;
align-items: center;
height: 30px;
line-height: 20px;
padding: 0 24px;
cursor: pointer;
border-right: 1px solid #10141A;
} }
.logTitleSelected { .logTitleSelected {
background: #282C34; background: #282c34;
color: #FFFFFF; color: #ffffff;
} }
.fileIcon{ .fileIcon {
width: 14px!important; width: 14px !important;
margin-right: 4px; margin-right: 4px;
} }
.logViewContent { .logViewContent {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
height: 510px; height: calc(100vh - 148px);
padding: 16px 24px 0; padding: 24px 32px 0;
color: #D1D6DE; color: #d1d6de;
white-space:pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
overflow: auto; overflow: overlay;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
} }
.logViewContentMask{ .logViewContentMask {
height: 16px; height: 24px;
width: 852px; width: calc(100vw - 64px);
background-color: #282C34; background-color: #282c34;
position: absolute; position: absolute;
top: 30px; top: 30px;
left: 24px; left: 32px;
z-index: 1005; z-index: 1005;
} }
.logViewContent::-webkit-scrollbar-track { .logViewContent::-webkit-scrollbar-track {
background-color: #282C34; background-color: #282c34;
} }
.logViewBottom { .logViewBottom {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end; justify-content: end;
height: 60px; height: 76px;
padding-right: 24px; padding-right: 24px;
} }
\ No newline at end of file
...@@ -7,16 +7,18 @@ import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutl ...@@ -7,16 +7,18 @@ import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutl
import CloudEController from "@/api/fileserver/CloudEController"; import CloudEController from "@/api/fileserver/CloudEController";
import { useStores } from "@/store"; import { useStores } from "@/store";
import { toJS } from "mobx"; import { toJS } from "mobx";
import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer";
type LogViewProps = { type LogViewProps = {
isshow: boolean; isshow: boolean;
handleClose: () => void; handleClose: () => void;
logs: any[]; logs: any[];
setShowAddTemplate: any;
}; };
const LogView = (props: LogViewProps) => { const LogView = (props: LogViewProps) => {
const { isshow, handleClose, logs } = props; const { isshow, handleClose, logs, setShowAddTemplate } = props;
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken); const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken);
const projectId = toJS(currentProjectStore.currentProjectInfo.id); const projectId = toJS(currentProjectStore.currentProjectInfo.id);
...@@ -42,7 +44,7 @@ const LogView = (props: LogViewProps) => { ...@@ -42,7 +44,7 @@ const LogView = (props: LogViewProps) => {
)?.then((res) => { )?.then((res) => {
setLogText(res.data) setLogText(res.data)
}) })
}else{ } else {
setLogText("") setLogText("")
} }
}, [logPath]); }, [logPath]);
...@@ -53,41 +55,42 @@ const LogView = (props: LogViewProps) => { ...@@ -53,41 +55,42 @@ const LogView = (props: LogViewProps) => {
}, [logCurrent]); }, [logCurrent]);
// 下载当前日志 // 下载当前日志
const handleDownLoad=()=>{ const handleDownLoad = () => {
const path = logPath.slice(12) const path = logPath.slice(12)
CloudEController.JobFileDownload( CloudEController.JobFileDownload(
path, path,
fileToken as string, fileToken as string,
projectId as string projectId as string
); );
} }
return <div className={style.logView} style={isshow ? {} : { display: "none" }}> return (
<div className={style.logViewBox}> <FullScreenDrawer handleClose={setShowAddTemplate} zIndex={1002}>
<CloseIcon onClick={handleClose} className={style.close} /> <div className={style.logViewBox}>
<div className={style.logViewContentMask}></div> <div className={style.logViewContentMask}></div>
<div className={style.logViewTop}> <div className={style.logViewTop}>
{logs.map((item: any, index: number) => { {logs.map((item: any, index: number) => {
return <div return <div
key={index} key={index}
onClick={() => { setLogCurrent(index) }} onClick={() => { setLogCurrent(index) }}
className={classnames({ className={classnames({
[style.logTitle]: true, [style.logTitle]: true,
[style.logTitleSelected]: index === logCurrent, [style.logTitleSelected]: index === logCurrent,
})}> })}>
<InsertDriveFileOutlinedIcon className={style.fileIcon} /> <InsertDriveFileOutlinedIcon className={style.fileIcon} />
<span>{item.logName}</span> <span>{item.logName}</span>
</div> </div>
})} })}
</div>
<div className={style.logViewContent}>
{logText}
</div>
<div className={style.logViewBottom}>
<MyButton text='下载当前日志' onClick={handleDownLoad} />
</div>
</div> </div>
<div className={style.logViewContent}> </FullScreenDrawer>
{logText} )
</div>
<div className={style.logViewBottom}>
<MyButton text='下载当前日志' onClick={handleDownLoad} />
</div>
</div>
</div>
} }
export default LogView export default LogView
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: RGBA(247, 248, 250, 1); background-color: RGBA(247, 248, 250, 1);
overflow-y: auto; overflow-y: overlay;
} }
.swHeader { .swHeader {
z-index: 1001; z-index: 1001;
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
top: 0; top: 0;
height: 56px; height: 56px;
background-color: #fff; background-color: #fff;
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.04); box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.06);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.goBackIcon {
cursor: pointer;
}
.swTemplateTitle { .swTemplateTitle {
margin: 0 19px 0 8px; margin: 0 19px 0 8px;
line-height: 22px; line-height: 22px;
...@@ -39,9 +42,9 @@ ...@@ -39,9 +42,9 @@
} }
.swFormBox { .swFormBox {
background-color: #fff; background-color: #fff;
border-right: 1xp solid rgba(235, 237, 240, 1); border-right: 1px solid #ebedf0;
width: 360px; width: 360px;
overflow-y: scroll; overflow-y: overlay;
box-sizing: border-box; box-sizing: border-box;
padding: 24px; padding: 24px;
} }
...@@ -74,7 +77,7 @@ ...@@ -74,7 +77,7 @@
color: rgba(19, 112, 255, 1); color: rgba(19, 112, 255, 1);
font-size: 14px; font-size: 14px;
} }
.outputItemName{ .outputItemName {
max-width: 172px; max-width: 172px;
white-space: nowrap; white-space: nowrap;
display: block; display: block;
...@@ -107,8 +110,14 @@ ...@@ -107,8 +110,14 @@
color: rgba(138, 144, 153, 1); color: rgba(138, 144, 153, 1);
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
width: 72px; width: 80px;
margin-right: 44px; margin-right: 44px;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
} }
.taskInfoValue { .taskInfoValue {
color: rgba(30, 38, 51, 1); color: rgba(30, 38, 51, 1);
...@@ -164,7 +173,7 @@ ...@@ -164,7 +173,7 @@
position: absolute; position: absolute;
top: 33px; top: 33px;
max-height: 230px; max-height: 230px;
overflow-y: scroll; overflow-y: overlay;
padding: 8px 0px; padding: 8px 0px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.14); box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.14);
......
.cardBox { .cardBox {
display: flex; display: flex;
margin: 16px 16px 0; margin: 16px 16px 0;
height: 156px; height: 156px;
background: #FFFFFF; background: #ffffff;
box-shadow: 2px 2px 6px 0px rgba(0, 25, 57, 0.0300); box-shadow: 2px 2px 6px 0px rgba(0, 25, 57, 0.03);
border-radius: 4px; border-radius: 4px;
} }
.dividingLine { .dividingLine {
height: 156px; height: 156px;
border-left: 1px solid #EBEDF0; border-left: 1px solid #ebedf0;
position: relative; position: relative;
} }
.arrow { .arrow {
position: absolute; position: absolute;
top: 65px; top: 65px;
left: -13px; left: -13px;
width: 26px; width: 26px;
height: 26px; height: 26px;
background-color: #fff; background-color: #fff;
border-top: 1px solid #EBEDF0; border-top: 1px solid #ebedf0;
border-right: 1px solid #EBEDF0; border-right: 1px solid #ebedf0;
transform: rotate(45deg); transform: rotate(45deg);
} }
.cardLeft { .cardLeft {
flex: 1; flex: 1;
padding: 16px 24px; cursor: pointer;
padding: 16px 24px;
} }
.topLine { .topLine {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.taskName { .taskName {
min-width: 100px; min-width: 100px;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
} }
.taskName:hover{ .taskName:hover {
color: #1370FF; color: #1370ff;
} }
.taskStatus { .taskStatus {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 78px; width: 78px;
height: 22px; height: 22px;
border-radius: 2px; border-radius: 2px;
font-size: 12px; font-size: 12px;
} }
.statusImg { .statusImg {
width: 10px; width: 10px;
height: 10px; height: 10px;
margin-right: 5px; margin-right: 5px;
} }
.taskCreator { .taskCreator {
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
color: #1E2633; color: #1e2633;
margin-top: 4px; margin-top: 4px;
} }
.taskProgress { .taskProgress {
height: 32px; height: 32px;
margin: 12px 0; margin: 12px 0 16px;
} }
.progressInfo { .progressInfo {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 8px; margin-bottom: 8px;
font-size: 12px; font-size: 12px;
color: #565C66; color: #565c66;
} }
.bottomLine { .bottomLine {
display: flex; display: flex;
font-size: 12px; font-size: 12px;
color: #565C66; color: #565c66;
} }
.bottomInfo { .bottomInfo {
margin: 0 40px 0 4px; margin: 0 40px 0 4px;
} }
.cardRight { .cardRight {
flex: 1; flex: 1;
display: flex; display: flex;
position: relative; position: relative;
overflow: auto; overflow: overlay;
padding: 16px 24px 16px 42px;
} }
.noResult { .noResult {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-size: 14px; font-size: 14px;
color: #8A9099; color: #8a9099;
} }
.resultBox { .resultBox {
padding: 16px 24px 16px 42px; /* padding: 16px 24px 16px 42px; */
width: 100%; width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
box-sizing: border-box;
} }
.result { .result {
box-sizing: border-box; box-sizing: border-box;
font-size: 12px; font-size: 12px;
color: #1E2633; align-items: center;
cursor: pointer; color: #1e2633;
height: 30px; cursor: pointer;
overflow: hidden; height: 30px;
white-space: nowrap; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap;
padding-right: 8px; text-overflow: ellipsis;
padding-right: 8px;
} }
@media screen and (max-width:1220px) { @media screen and (max-width: 1220px) {
.result { .result {
width: 100%; width: 100%;
} }
} }
@media screen and (min-width:1220px) and (max-width:1600px) { @media screen and (min-width: 1220px) and (max-width: 1600px) {
.result { .result {
width: 50%; width: 50%;
} }
} }
@media screen and (min-width:1600px) { @media screen and (min-width: 1600px) {
.result { .result {
width: 33.33%; width: 33.33%;
} }
} }
.result:hover { .result:hover {
color: #1370FF; color: #1370ff;
} }
.outputLeftImg { .outputLeftImg {
vertical-align: middle; vertical-align: top;
margin-right: 8px; margin-right: 8px;
} }
\ No newline at end of file
.outputTitle {
display: inline-block;
height: 22px;
line-height: 22px;
width: calc(100% - 30px);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
This diff is collapsed.
.loadingBox { .loadingBox {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 300px; height: 300px;
} }
.projectInfoList { .projectInfoList {
background-color: #fff; background-color: #fff;
position: relative; position: relative;
} }
.projectInfoListLi { .projectInfoListLi {
margin-bottom: 24px; margin-bottom: 24px;
} }
.projectInfoListLiLabel { .projectInfoListLiLabel {
color: #1e2633; color: #1e2633;
line-height: 22px; line-height: 22px;
font-size: 14px; font-size: 14px;
font-weight: 550; font-weight: 550;
margin-bottom: 8px; margin-bottom: 8px;
} }
.projectInfoName::after { .projectInfoName::after {
content: "*"; content: "*";
color: red; color: red;
} }
.projectInfoListLiValue { .projectInfoListLiValue {
width: 560px; width: 560px;
height: 36px; height: 36px;
border: 1px solid #e6e8eb; border: 1px solid #e6e8eb;
border-radius: 4px; border-radius: 4px;
color: #565c66; color: #565c66;
padding: 0 12px; padding: 0 12px;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
} }
.projectInfoListLiValue:focus { .projectInfoListLiValue:focus {
border: 2px solid #136efa; border: 2px solid #136efa;
} }
.projectInfoTextarea { .projectInfoTextarea {
line-height: 22px; position: relative;
height: 82px; width: 560px;
padding: 7px 12px;
resize: none;
font-size: 14px;
} }
.projectInfoSelect { .projectInfoSelect {
width: 560px; width: 560px;
padding: 0 12px; padding: 0 12px;
} }
.disable { .disable {
background: #f7f8fa; background: #f7f8fa;
} }
.projectInfoListLiText { .projectInfoListLiText {
margin-bottom: 16px; margin-bottom: 16px;
color: #8a9099; color: #8a9099;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
} }
.deleteBox { .deleteBox {
width: 380px; width: 380px;
} }
.deleteText1 { .deleteText1 {
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
color: #ff4e4e; color: #ff4e4e;
margin-bottom: 20px; margin-bottom: 20px;
} }
.deleteText2 { .deleteText2 {
color: #1e2633; color: #1e2633;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
margin-bottom: 8px; margin-bottom: 8px;
} }
.deleteText3 { .deleteText3 {
color: #1e2633; color: #1e2633;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.deleteProjectName { .deleteProjectName {
color: #1370ff; color: #1370ff;
} }
.deleteProjectInput { .deleteProjectInput {
width: 100%; width: 100%;
height: 36px; height: 36px;
border: 1px solid #e6e8eb; border: 1px solid #e6e8eb;
border-radius: 4px; border-radius: 4px;
color: #565c66; color: #565c66;
padding: 0 12px; padding: 0 12px;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
} }
.deleteProjectInput:focus { .deleteProjectInput:focus {
border: 1px solid #136efa; border: 1px solid #136efa;
} }
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
} }
.taskConfigBox { .taskConfigBox {
padding: 16px 24px 4px; padding: 16px 0px 4px;
} }
.flowTitle { .flowTitle {
line-height: 16px; line-height: 16px;
...@@ -118,3 +118,13 @@ ...@@ -118,3 +118,13 @@
color: rgba(138, 144, 153, 1); color: rgba(138, 144, 153, 1);
margin-left: 16px; margin-left: 16px;
} }
.bacthConfigBox {
padding: 0 24px 0;
}
.flowConfigBox {
border-bottom: 1px solid rgba(235, 237, 240, 1);
padding: 20px 24px 12px;
}
.flowConfigBox:nth-last-child(1) {
border-bottom: none;
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:20:29 * @Date: 2022-07-12 11:20:29
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-22 16:41:54 * @LastEditTime: 2022-08-31 17:09:26
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx * @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.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
*/ */
......
...@@ -44,3 +44,9 @@ ...@@ -44,3 +44,9 @@
width: 14px; width: 14px;
height: 14px; height: 14px;
} }
.handleBox {
background: #fff;
width: 6px;
height: 6px;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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