|
@@ -114,6 +114,7 @@ const JptMgmt = () => {
|
|
unCheckedChildren="关闭"
|
|
unCheckedChildren="关闭"
|
|
loading={switchLoading}
|
|
loading={switchLoading}
|
|
defaultChecked={val}
|
|
defaultChecked={val}
|
|
|
|
+ disabled={!['1', '2', '4'].includes(localStorage.getItem('role'))}
|
|
onChange={checked => changeTaskState(checked, record.key)}
|
|
onChange={checked => changeTaskState(checked, record.key)}
|
|
/>
|
|
/>
|
|
),
|
|
),
|
|
@@ -133,6 +134,7 @@ const JptMgmt = () => {
|
|
</Button>
|
|
</Button>
|
|
<Button
|
|
<Button
|
|
type="link"
|
|
type="link"
|
|
|
|
+ disabled={!['1', '2', '4'].includes(localStorage.getItem('role'))}
|
|
onClick={() => {
|
|
onClick={() => {
|
|
setCurrentJpt(record.key)
|
|
setCurrentJpt(record.key)
|
|
setIsEditJptPsd(true)
|
|
setIsEditJptPsd(true)
|
|
@@ -254,15 +256,16 @@ const JptMgmt = () => {
|
|
return (
|
|
return (
|
|
<JptWrapper>
|
|
<JptWrapper>
|
|
<div className="create_btn">
|
|
<div className="create_btn">
|
|
- {jptList.length === 0 && (
|
|
|
|
- <Button
|
|
|
|
- type="primary"
|
|
|
|
- onClick={() => {
|
|
|
|
- setIsCreateJptProgram(true)
|
|
|
|
- }}>
|
|
|
|
- 创建
|
|
|
|
- </Button>
|
|
|
|
- )}
|
|
|
|
|
|
+ {jptList.length === 0 &&
|
|
|
|
+ ['1', '2', '4'].includes(localStorage.getItem('role')) && (
|
|
|
|
+ <Button
|
|
|
|
+ type="primary"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ setIsCreateJptProgram(true)
|
|
|
|
+ }}>
|
|
|
|
+ 创建
|
|
|
|
+ </Button>
|
|
|
|
+ )}
|
|
</div>
|
|
</div>
|
|
<Table
|
|
<Table
|
|
columns={columns}
|
|
columns={columns}
|