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

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

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