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
shenshaokai
jinfa-admin
Commits
a6fd8a0b
Commit
a6fd8a0b
authored
Dec 07, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into dev
parents
fd85306b
9758bebe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
234 additions
and
79 deletions
+234
-79
systemManageRoute.ts
config/routes/systemManageRoute.ts
+8
-3
global.d.ts
src/global/config/global.d.ts
+0
-16
menu.ts
src/locales/zh-CN/menu.ts
+11
-10
index.tsx
src/pages/systemManage/platformArg/index.tsx
+36
-20
template.tsx
src/pages/systemManage/platformArg/template.tsx
+73
-0
index.tsx
src/pages/systemManage/sensitiveWords/index.tsx
+2
-4
index.tsx
src/pages/systemManage/unit/index.tsx
+58
-17
template.tsx
src/pages/systemManage/unit/template.tsx
+46
-9
No files found.
config/routes/systemManageRoute.ts
View file @
a6fd8a0b
...
...
@@ -51,11 +51,17 @@ const router = {
hideInMenu
:
true
,
component
:
'@/pages/systemManage/unit/template'
,
},{
// 平台参数列表
// 平台参数列表
path
:
'/system/platformArg'
,
name
:
'platformArg'
,
hidePageHeader
:
true
,
component
:
'@/pages/systemManage/platformArg'
,
},{
// 平台参数列表
path
:
'/system/platformArg/edit'
,
name
:
'platformArgEdit'
,
hidePageHeader
:
true
,
component
:
'@/pages/systemManage/platformArg/template'
,
}]
}
export
default
router
\ No newline at end of file
export
default
router
src/global/config/global.d.ts
View file @
a6fd8a0b
export
interface
BusinessType
{
businessTypeId
:
number
;
businessTypeName
:
string
;
}
export
interface
UseType
{
memberTypeId
:
number
;
memberTypeName
:
string
;
businessTypes
:
BusinessType
[];
}
export
interface
UserRegister
{
useType
:
UseType
[];
}
export
interface
RuleConfiguration
{
value
:
number
;
label
:
string
;
...
...
@@ -88,7 +73,6 @@ export interface Global {
}
export
interface
RootObject
{
userRegister
:
UserRegister
;
payConfig
:
PayConfig
;
web
:
Web
;
global
:
Global
;
...
...
src/locales/zh-CN/menu.ts
View file @
a6fd8a0b
...
...
@@ -61,7 +61,7 @@ export default {
'menu.memberAbility'
:
'会员管理'
,
'menu.memberAbility.memberMaintain'
:
'会员维护'
,
'menu.memberAbility.addMember'
:
'新增会员'
,
'menu.memberAbility.maintainDetail'
:
'会员详情'
,
'menu.memberAbility.maintainDetail'
:
'会员详情'
,
'menu.memberAbility.maintainDetail.basicInfo'
:
'会员基本信息'
,
'menu.memberAbility.maintainDetail.levelInfo'
:
'会员等级信息'
,
'menu.memberAbility.maintainDetail.equityInfo'
:
'权益信息'
,
...
...
@@ -79,7 +79,7 @@ export default {
'menu.memberAbility.memberUpgradeRule'
:
'会员升级规则'
,
'menu.memberAbility.memberLevel'
:
'会员等级'
,
'menu.memberAbility.addEquity'
:
'会员权益设置'
,
//需求单 2020-11-17
'menu.demandOrder'
:
'需求单审核'
,
'menu.demandOrder.demandOrderInquire'
:
'需求单查询'
,
...
...
@@ -97,7 +97,7 @@ export default {
//物流管理
'menu.logisticsManager'
:
'物流管理'
,
'menu.logisticsManager.logisticsList'
:
'物流单查询'
,
//规则
'menu.ruleSettingManager'
:
'平台规则配置'
,
...
...
@@ -158,7 +158,7 @@ export default {
'menu.content.tagsInfo'
:
'标签详情'
,
'menu.content.infomations'
:
'资讯管理'
,
'menu.content.infomationAdd'
:
' 新建资讯'
,
'menu.content.infomationInfo'
:
'咨询详情'
,
'menu.content.infomationInfo'
:
'咨询详情'
,
'menu.content.advertisement'
:
'广告管理'
,
'menu.content.advertisementAdd'
:
'新建广告'
,
'menu.content.advertisementInfo'
:
'广告详情'
,
...
...
@@ -170,11 +170,11 @@ export default {
'menu.content.announceAdd'
:
'新建公告'
,
// 评论管理
'menu.comment'
:
'评论管理'
,
'menu.comment.query'
:
'会员评价查询'
,
'menu.comment.queryDetail'
:
'评价统计'
,
'menu.comment.manage'
:
'评价管理'
,
'menu.comment.manageDetail'
:
'评价管理'
,
'menu.comment'
:
'评论管理'
,
'menu.comment.query'
:
'会员评价查询'
,
'menu.comment.queryDetail'
:
'评价统计'
,
'menu.comment.manage'
:
'评价管理'
,
'menu.comment.manageDetail'
:
'评价管理'
,
// 订单管理
'menu.orderSystem'
:
'订单管理'
,
...
...
@@ -193,7 +193,7 @@ export default {
'menu.balanced.accountPayableDetail'
:
'代付账款明细'
,
'menu.balanced.scorePayable'
:
'积分结算'
,
'menu.balanced.scorePayableDetail'
:
'积分结算详情'
,
// 会员资金账户
'menu.capitalAccount'
:
'会员资金账户'
,
...
...
@@ -221,6 +221,7 @@ export default {
'menu.system.unitAdd'
:
'新建单位'
,
'menu.system.unitEdit'
:
'编辑单位'
,
'menu.system.platformArg'
:
'平台参数'
,
'menu.system.platformArgEdit'
:
'平台参数修改'
,
'menu.productionNotice'
:
'生产通知单管理'
,
'menu.productionNotice.query'
:
'生产通知单查询'
,
...
...
src/pages/systemManage/platformArg/index.tsx
View file @
a6fd8a0b
import
React
,
{
useRef
}
from
'react'
;
import
{
Card
,
Row
,
Col
,
Space
,
Button
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons
'
;
import
{
Card
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi
'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
const
SensitiveWords
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'参数编号'
,
key
:
'
id
'
,
dataIndex
:
'
id
'
,
key
:
'
code
'
,
dataIndex
:
'
code
'
,
},
{
title
:
'参数名称'
,
key
:
'name'
,
dataIndex
:
'name'
,
},
{
title
:
'参数描述'
,
key
:
'
remark
s'
,
dataIndex
:
'
remark
s'
,
key
:
'
detail
s'
,
dataIndex
:
'
detail
s'
,
},{
title
:
'参数值'
,
key
:
'
zhi
'
,
dataIndex
:
'
zhi
'
,
key
:
'
parameterValue
'
,
dataIndex
:
'
parameterValue
'
,
},{
title
:
'状态'
,
key
:
'status'
,
dataIndex
:
'status'
,
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
record=
{
record
}
/>
)
},{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/system/platformArg/edit?id=${record.id}¶meterValue=${record.parameterValue}`
)
}
>
修改
</
Button
>
}
]
const
controllerBtns
=
<
Row
>
<
Col
span=
{
24
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
新建
</
Button
>
</
Space
>
</
Col
>
</
Row
>
/**切换状态 */
const
handleChangeStatus
=
async
(
id
:
any
,
status
:
any
)
=>
{
let
_status
=
status
===
1
?
0
:
1
await
PublicApi
.
postManageParameterManageUpdateState
({
id
:
id
,
status
:
_status
})
ref
.
current
.
reload
()
}
/**获取单位列表数据 */
const
fetchdata
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getManageParameterManagePage
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
tableProps=
{
{
rowKey
:
'id'
}
}
fetchTableData=
{
params
=>
fetchdata
(
params
)
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
SensitiveWords
;
\ No newline at end of file
export
default
SensitiveWords
;
src/pages/systemManage/platformArg/template.tsx
0 → 100644
View file @
a6fd8a0b
import
React
,
{
useEffect
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
Card
,
Form
,
Input
,
Button
,
Space
,
Popconfirm
,
message
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'174px'
}
},
wrapperCol
:
{
span
:
9
},
labelAlign
:
"left"
};
const
tailLayout
=
{
wrapperCol
:
{
style
:
{
marginLeft
:
'174px'
}
},
};
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
query
}
=
history
.
location
;
const
onFinish
=
(
values
:
any
)
=>
{
values
.
id
=
query
.
id
;
PublicApi
.
postManageParameterManageUpdate
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
message
.
success
(
'修改敏感词成功'
)
}
})
}
const
confirmCancel
=
()
=>
{
history
.
goBack
()
}
useEffect
(()
=>
{
form
.
setFieldsValue
({
parameterValue
:
query
.
parameterValue
})
},
[])
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
>
<
Card
>
<
Form
{
...
layout
}
form=
{
form
}
onFinish=
{
onFinish
}
>
<
Form
.
Item
label=
'参数值'
name=
'parameterValue'
rules=
{
[{
required
:
true
,
message
:
'请输入参数值'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Space
size=
{
24
}
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存
</
Button
>
<
Popconfirm
onConfirm=
{
confirmCancel
}
title=
"确定要执行这个操作?"
okText=
"确定"
cancelText=
"取消"
>
<
Button
>
取消
</
Button
>
</
Popconfirm
>
</
Space
>
</
Form
.
Item
>
</
Form
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
Template
;
src/pages/systemManage/sensitiveWords/index.tsx
View file @
a6fd8a0b
...
...
@@ -28,7 +28,6 @@ const SensitiveWords: React.FC<{}> = () => {
}
else
{
message
.
error
(
'请选择要操作的数据'
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -102,7 +101,7 @@ const SensitiveWords: React.FC<{}> = () => {
<
StandardTable
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKe
w
:
'id'
}
}
tableProps=
{
{
rowKe
y
:
'id'
}
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
)
=>
fetchdata
(
params
)
}
formilyLayouts=
{
{
...
...
@@ -154,4 +153,4 @@ const SensitiveWords: React.FC<{}> = () => {
</
PageHeaderWrapper
>
)
}
export
default
SensitiveWords
;
\ No newline at end of file
export
default
SensitiveWords
;
src/pages/systemManage/unit/index.tsx
View file @
a6fd8a0b
import
React
,
{
useRef
}
from
'react'
;
import
{
Card
,
Row
,
Col
,
Space
,
Button
}
from
'antd'
;
import
{
Card
,
Row
,
Col
,
Space
,
Button
,
Popconfirm
,
message
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
history
}
from
'umi'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
const
SensitiveWords
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
/**切换状态 */
const
handleChangeStatus
=
async
(
id
:
any
,
status
:
any
)
=>
{
let
_status
=
status
===
true
?
'false'
:
'true'
await
PublicApi
.
getManageUnitUpdateUnitStatus
({
id
:
id
,
status
:
_status
})
ref
.
current
.
reload
()
}
const
confirmCancel
=
(
id
:
number
)
=>
{
PublicApi
.
postManageSensitiveWordDelete
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
success
(
'删除成功'
)
ref
.
current
.
Reload
()
}
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
...
...
@@ -18,36 +35,60 @@ const SensitiveWords: React.FC<{}> = () => {
dataIndex
:
'name'
,
},
{
title
:
'英文简称'
,
key
:
'
remarks
'
,
dataIndex
:
'
remarks
'
,
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
}
/>
)
},{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
<
Button
type=
'link'
href=
{
`/system/sensitiveWords/edit?id=${record.id}
}
`}
>
修改
</
Button
>
<
Popconfirm
onConfirm=
{
()
=>
confirmCancel
(
record
.
id
)
}
title=
"确定要执行这个操作?"
okText=
"确定"
cancelText=
"取消"
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</>
)
}
},
]
const
controllerBtns
=
<
Row
>
<
Col
span=
{
24
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
新建
</
Button
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
`/system/unit/add`
)
}
>
新建
</
Button
>
</
Space
>
</
Col
>
</
Row
>
/**获取单位列表数据 */
//
const fetchdata = (params: any) => {
//
return new Promise(resolve => {
//
PublicApi.getManageUnitGetUnitList({ ...params }).then(res => {
//
if (res.code === 1000) {
//
resolve(res.data)
//
}
//
})
//
})
//
}
const
fetchdata
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getManageUnitGetUnitList
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
return
(
<
PageHeaderWrapper
>
...
...
@@ -55,7 +96,8 @@ const SensitiveWords: React.FC<{}> = () => {
<
StandardTable
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
tableProps=
{
{
rowKey
:
'id'
}
}
fetchTableData=
{
(
params
)
=>
fetchdata
(
params
)
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
...
...
@@ -105,4 +147,4 @@ const SensitiveWords: React.FC<{}> = () => {
</
PageHeaderWrapper
>
)
}
export
default
SensitiveWords
;
\ No newline at end of file
export
default
SensitiveWords
;
src/pages/systemManage/unit/template.tsx
View file @
a6fd8a0b
...
...
@@ -2,7 +2,8 @@ import React from 'react';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
Card
,
Form
,
Input
,
Button
,
Space
}
from
'antd'
;
import
{
Card
,
Form
,
Input
,
Button
,
Space
,
message
,
Popconfirm
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'174px'
}
},
...
...
@@ -10,28 +11,65 @@ const layout: any = {
labelAlign
:
"left"
};
const
tailLayout
=
{
wrapperCol
:
{
style
:
{
marginLeft
:
'174px'
}
},
wrapperCol
:
{
style
:
{
marginLeft
:
'174px'
}
},
};
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
return
(
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
)
{
history
.
goBack
();
message
.
success
(
'新增单位成功'
)
}
})
}
else
{
values
.
id
=
query
.
id
;
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
message
.
success
(
'修改单位成功'
)
}
})
}
}
const
confirmCancel
=
()
=>
{
history
.
goBack
()
}
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
>
<
Card
>
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onFinish
}
>
<
Form
.
Item
label=
'单位名称'
name=
'name'
rules=
{
[{
required
:
true
,
message
:
'请输入单位名称'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'英文简称'
name=
'enName'
rules=
{
[{
required
:
true
,
message
:
'请输入英文简称'
}]
}
>
<
Form
.
Item
label=
'英文简称'
name=
'en
glishShort
Name'
rules=
{
[{
required
:
true
,
message
:
'请输入英文简称'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Space
size=
{
24
}
>
<
Button
type=
'primary'
>
保存
</
Button
>
<
Button
>
取消
</
Button
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存
</
Button
>
<
Popconfirm
onConfirm=
{
confirmCancel
}
title=
"确定要执行这个操作?"
okText=
"确定"
cancelText=
"取消"
>
<
Button
>
取消
</
Button
>
</
Popconfirm
>
</
Space
>
</
Form
.
Item
>
</
Form
>
...
...
@@ -40,4 +78,4 @@ const Template:React.FC<{}> = () => {
)
}
export
default
Template
;
\ No newline at end of file
export
default
Template
;
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