Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
linweijiong
jinfa-admin
Commits
60e276c7
Commit
60e276c7
authored
Dec 17, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改系统管理单位新增删除
parent
c4d299ae
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
24 deletions
+65
-24
systemManageRoute.ts
config/routes/systemManageRoute.ts
+1
-0
settingIndex.tsx
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
+17
-6
index.tsx
src/pages/systemManage/platformArg/index.tsx
+7
-2
template.tsx
src/pages/systemManage/platformArg/template.tsx
+0
-1
index.tsx
src/pages/systemManage/unit/index.tsx
+16
-6
template.tsx
src/pages/systemManage/unit/template.tsx
+24
-9
No files found.
config/routes/systemManageRoute.ts
View file @
60e276c7
...
...
@@ -61,6 +61,7 @@ const router = {
path
:
'/system/platformArg/edit'
,
name
:
'platformArgEdit'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/systemManage/platformArg/template'
,
}]
}
...
...
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
View file @
60e276c7
...
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2020-08-21 15:05:26
*/
import
React
,
{
useEffect
,
useState
,
useRef
,
Fragment
,
ReactNode
}
from
'react'
import
{
Card
,
Button
,
Tabs
,
Radio
,
Space
,
Row
,
Col
,
Table
,
Popconfirm
}
from
'antd'
import
{
Card
,
Button
,
Tabs
,
Radio
,
Space
,
Row
,
Col
,
Table
,
Popconfirm
,
Input
}
from
'antd'
import
{
PlusOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
EyePreview
from
'@/components/EyePreview'
...
...
@@ -137,16 +137,16 @@ const PaySetting: React.FC<{}> = () => {
// const tableAddButton = <Button style={{ marginBottom: 16 }} block icon={<PlusOutlined />} onClick={() => handleAddMemberBtn(1)} type='dashed'>新增参数配置1</Button>
// const tableAddButton2 = <Button style={{ marginBottom: 16 }} block icon={<PlusOutlined />} onClick={() => handleAddMemberBtn(2)} type='dashed'>新增参数配置2</Button>
// const tableAddButton3 = <Button style={{ marginBottom: 16 }} block icon={<PlusOutlined />} onClick={() => handleAddMemberBtn(3)} type='dashed'>新增参数配置3</Button>
const
codeText
=
(
text
:
any
)
=>
{
const
codeText
=
(
text
:
any
)
=>
{
let
code
:
ReactNode
=
''
;
text
===
1
?
code
=
<
span
>
mchId
</
span
>:
text
===
2
?
code
=
<
span
>
mchKey
</
span
>
:
text
===
3
?
code
=
<
span
>
appId
</
span
>
:
text
===
1
?
code
=
<
span
>
mchId
</
span
>
:
text
===
2
?
code
=
<
span
>
mchKey
</
span
>
:
text
===
3
?
code
=
<
span
>
appId
</
span
>
:
code
=
<
span
>
appSecret
</
span
>
return
code
;
}
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
dataIndex
:
'code'
,
title
:
'参数代码'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
codeText
(
text
)
},
{
dataIndex
:
'code'
,
title
:
'参数代码'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
codeText
(
text
)
},
{
dataIndex
:
'value'
,
align
:
'center'
,
title
:
'参数值'
,
render
:
(
_
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&preview=1`
}
>
{
_
}
</
EyePreview
>
},
{
dataIndex
:
'describe'
,
title
:
'参数描述'
,
align
:
'center'
},
{
...
...
@@ -284,6 +284,17 @@ const PaySetting: React.FC<{}> = () => {
</
Col
>
</
Row
>
}
{
(
v
.
id
===
6
&&
isPitchOn
)
&&
<
div
style=
{
{
marginTop
:
42
}
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
初始申请额度不超过
<
Input
addonBefore=
"¥"
/>
允许满
<
Input
/>
天后申请上调
<
Input
addonAfter=
"%"
/>
</
Space
>
</
div
>
}
</
TabPane
>
</
Fragment
>
)
...
...
src/pages/systemManage/platformArg/index.tsx
View file @
60e276c7
...
...
@@ -30,7 +30,12 @@ const SensitiveWords: React.FC<{}> = () => {
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
record=
{
record
}
/>
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
record=
{
record
}
expectTrueValue=
{
1
}
/>
)
},{
title
:
'操作'
,
...
...
@@ -42,7 +47,7 @@ const SensitiveWords: React.FC<{}> = () => {
/**切换状态 */
const
handleChangeStatus
=
async
(
id
:
any
,
status
:
any
)
=>
{
let
_status
=
status
===
1
?
0
:
1
await
PublicApi
.
postManageParameterManageUpdateState
({
id
:
id
,
stat
us
:
_status
})
await
PublicApi
.
postManageParameterManageUpdateState
({
id
:
id
,
stat
e
:
_status
})
ref
.
current
.
reload
()
}
/**获取单位列表数据 */
...
...
src/pages/systemManage/platformArg/template.tsx
View file @
60e276c7
...
...
@@ -22,7 +22,6 @@ const Template: React.FC<{}> = () => {
PublicApi
.
postManageParameterManageUpdate
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
message
.
success
(
'修改敏感词成功'
)
}
})
}
...
...
src/pages/systemManage/unit/index.tsx
View file @
60e276c7
...
...
@@ -17,10 +17,10 @@ const SensitiveWords: React.FC<{}> = () => {
ref
.
current
.
reload
()
}
const
confirmCancel
=
(
id
:
number
)
=>
{
PublicApi
.
postManageSensitiveWordDelete
({
id
}).
then
(
res
=>
{
PublicApi
.
postManageSensitiveWordDelete
({
id
s
:
[
id
]
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
success
(
'删除成功'
)
ref
.
current
.
R
eload
()
ref
.
current
.
r
eload
()
}
})
}
...
...
@@ -37,23 +37,31 @@ const SensitiveWords: React.FC<{}> = () => {
title
:
'英文简称'
,
key
:
'englishShortName'
,
dataIndex
:
'englishShortName'
,
},{
},
{
title
:
'状态'
,
key
:
'status'
,
dataIndex
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
record=
{
record
}
/>
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
record=
{
record
}
expectTrueValue=
{
true
}
/>
)
},{
},
{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
{
!
record
.
status
&&
<>
<
Button
type=
'link'
href=
{
`/system/sensitiveWords/edit?id=${record.id}
}
`}
href=
{
`/system/unit/edit?id=${record.id}&name=${btoa(encodeURIComponent(record.name))}&englishShortName=${btoa(encodeURIComponent(record.englishShortName))
}`
}
>
修改
</
Button
>
<
Popconfirm
onConfirm=
{
()
=>
confirmCancel
(
record
.
id
)
}
...
...
@@ -64,6 +72,8 @@ const SensitiveWords: React.FC<{}> = () => {
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</>
}
</>
)
}
},
...
...
src/pages/systemManage/unit/template.tsx
View file @
60e276c7
import
React
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
...
...
@@ -14,10 +14,11 @@ const tailLayout = {
wrapperCol
:
{
style
:
{
marginLeft
:
'174px'
}
},
};
const
[
form
]
=
Form
.
useForm
();
const
{
pathname
,
query
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
];
const
onFinish
=
(
values
:
any
)
=>
{
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
pathname
,
query
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
];
const
onFinish
=
(
values
:
any
)
=>
{
if
(
type
===
'add'
)
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -35,13 +36,27 @@ const onFinish = (values: any) => {
}
})
}
}
}
const
confirmCancel
=
()
=>
{
const
confirmCancel
=
()
=>
{
history
.
goBack
()
}
}
useEffect
(()
=>
{
try
{
const
data
:
{
name
:
string
,
englishShortName
:
string
}
=
{
name
:
decodeURIComponent
(
atob
(
query
.
name
)),
englishShortName
:
decodeURIComponent
(
atob
(
query
.
englishShortName
)),
}
form
.
setFieldsValue
({
name
:
data
.
name
,
englishShortName
:
data
.
englishShortName
})
}
catch
(
error
)
{
console
.
log
(
error
)
}
},
[])
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
...
...
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