Commit ce5c9c28 authored by 周宏民's avatar 周宏民

pref: 演示功能 临时项目账号权限 支持项目多选

parent e2b63006
Pipeline #87153 waiting for manual action with stages
...@@ -19,7 +19,6 @@ export default props => { ...@@ -19,7 +19,6 @@ export default props => {
useEffect(() => { useEffect(() => {
if (percent == undefined) return; if (percent == undefined) return;
if (extra.progressCustom) return; if (extra.progressCustom) return;
console.log(percent, 'percent');
// progresRef.current.style.animationDuration = `${10 * percent}s`; // progresRef.current.style.animationDuration = `${10 * percent}s`;
// containerRef.current.style.transitionDuration = `${5 * (percent - lastCurrent.current)}s`; // containerRef.current.style.transitionDuration = `${5 * (percent - lastCurrent.current)}s`;
// lastCurrent.current = percent; // lastCurrent.current = percent;
......
...@@ -291,13 +291,21 @@ const Demonstration = props => { ...@@ -291,13 +291,21 @@ const Demonstration = props => {
const data = dataStr ? JSON.parse(dataStr) : []; const data = dataStr ? JSON.parse(dataStr) : [];
const obj = {}; const obj = {};
data.forEach(d => { data.forEach(d => {
if (!d['项目平台名称']) return;
if (!d['开始时间']) return false; if (!d['开始时间']) return false;
if (!d['结束时间'] && moment().isAfter(d['开始时间'])) { if (!d['结束时间'] && moment().isAfter(d['开始时间'])) {
obj[d['项目平台名称']] = true; const arr = d['项目平台名称'].split(',');
arr.forEach(a => {
obj[a] = true;
});
return; return;
} }
if (moment().isBetween(d['开始时间'], d['结束时间'])) { if (moment().isBetween(d['开始时间'], d['结束时间'])) {
obj[d['项目平台名称']] = true; const arr = d['项目平台名称'].split(',');
arr.forEach(a => {
obj[a] = true;
});
} }
}); });
setProjectConfig(obj); setProjectConfig(obj);
......
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