Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
51bb739d
Commit
51bb739d
authored
May 29, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 项目案例权限通过 userID判断
parent
659dd87b
Pipeline
#89220
waiting for manual action with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
42 deletions
+53
-42
index.js
src/pages/bootpage/demonstration/components/Bottom/index.js
+2
-2
index.js
src/pages/bootpage/demonstration/index.js
+51
-40
No files found.
src/pages/bootpage/demonstration/components/Bottom/index.js
View file @
51bb739d
...
...
@@ -137,14 +137,14 @@ const BottomItem = props => {
服务客户:
<
/div
>
<
div
className
=
{
styles
.
l_item_num_list
}
>
{
renderNum
(
infoData
[
'服务客户'
],
'服务客户'
)}
<
/div
>
<
div
className
=
{
styles
.
l_item_num_unit
}
type
=
"add"
/
>
<
div
className
=
{
styles
.
l_item_num_unit
}
>
个
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
l_item
}
>
<
div
className
=
{
styles
.
l_item_title
}
type
=
"覆盖省份"
>
覆盖省份:
<
/div
>
<
div
className
=
{
styles
.
l_item_num_list
}
>
{
renderNum
(
infoData
[
'覆盖省份'
],
'覆盖省份'
)}
<
/div
>
<
div
className
=
{
styles
.
l_item_num_unit
}
type
=
"add"
/
>
<
div
className
=
{
styles
.
l_item_num_unit
}
>
个
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/pages/bootpage/demonstration/index.js
View file @
51bb739d
...
...
@@ -268,48 +268,59 @@ const Demonstration = props => {
};
const
getProjectConfig
=
()
=>
{
if
(
!
props
.
global
?.
userInfo
?.
loginName
)
return
;
appService
.
getAccountPageList
({
ignoreSite
:
true
,
accountName
:
'项目案例临时账号管理'
,
isAll
:
true
,
queryWheres
:
[
{
field
:
'账号'
,
type
:
'等于'
,
value
:
props
.
global
.
userInfo
.
loginName
,
},
{
field
:
'是否禁用'
,
type
:
'不等于'
,
value
:
'是'
,
},
],
})
.
then
(
res
=>
{
const
dataStr
=
res
?.
data
?.
jsonData
||
''
;
const
data
=
dataStr
?
JSON
.
parse
(
dataStr
)
:
[];
const
obj
=
{};
data
.
forEach
(
d
=>
{
if
(
!
d
[
'项目平台名称'
])
return
;
if
(
!
d
[
'开始时间'
])
return
false
;
if
(
!
d
[
'结束时间'
]
&&
moment
().
isAfter
(
d
[
'开始时间'
]))
{
const
arr
=
d
[
'项目平台名称'
].
split
(
','
);
arr
.
forEach
(
a
=>
{
obj
[
a
]
=
true
;
});
const
params
=
{
ignoreSite
:
true
,
accountName
:
'项目案例临时账号管理'
,
isAll
:
true
,
queryWheres
:
[
{
field
:
'是否禁用'
,
type
:
'不等于'
,
value
:
'是'
,
},
],
};
if
(
props
.
global
.
userInfo
.
OID
)
{
params
.
queryWheres
.
push
({
field
:
'账号'
,
type
:
'等于'
,
value
:
props
.
global
.
userInfo
.
OID
.
toString
(),
});
}
appService
.
getAccountPageList
(
params
).
then
(
res
=>
{
let
data
=
res
?.
data
?.
list
||
[];
data
=
data
.
map
(
d
=>
{
const
obj
=
{
ID
:
d
.
id
,
};
if
(
Array
.
isArray
(
d
.
webRow
))
{
d
.
webRow
.
forEach
(
w
=>
{
obj
[
w
.
fieldName
]
=
w
.
fieldValue
;
});
}
return
obj
;
});
const
obj
=
{};
data
.
forEach
(
d
=>
{
if
(
!
d
[
'项目平台名称'
])
return
;
if
(
!
d
[
'开始时间'
])
return
false
;
if
(
!
d
[
'结束时间'
]
&&
moment
().
isAfter
(
d
[
'开始时间'
]))
{
const
arr
=
d
[
'项目平台名称'
].
split
(
','
);
arr
.
forEach
(
a
=>
{
obj
[
a
]
=
true
;
});
return
;
}
if
(
moment
().
isBetween
(
d
[
'开始时间'
],
d
[
'结束时间'
]))
{
const
arr
=
d
[
'项目平台名称'
].
split
(
','
);
arr
.
forEach
(
a
=>
{
obj
[
a
]
=
true
;
});
}
});
setProjectConfig
(
obj
);
return
;
}
if
(
moment
().
isBetween
(
d
[
'开始时间'
],
d
[
'结束时间'
]))
{
const
arr
=
d
[
'项目平台名称'
].
split
(
','
);
arr
.
forEach
(
a
=>
{
obj
[
a
]
=
true
;
});
}
});
setProjectConfig
(
obj
);
});
};
const
getData
=
()
=>
{
setLoading
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment