Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
黄庭坚
jinfa-platform
Commits
e241aaaf
Commit
e241aaaf
authored
Feb 18, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:恢复合并的按钮
parent
2daabe40
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
9 deletions
+63
-9
AuthUrl.ts
src/components/AuthButton/AuthUrl.ts
+1
-1
index.tsx
src/pages/classAndProperty/attribute/index.tsx
+18
-1
index.tsx
src/pages/classAndProperty/categoryAttributes/index.tsx
+12
-1
index.tsx
src/pages/classAndProperty/class/index.tsx
+11
-1
index.tsx
src/pages/classAndProperty/propertyValue/index.tsx
+17
-1
index.tsx
src/pages/member/memberImport/index.tsx
+2
-2
index.tsx
src/pages/shop/shopInfo/index.tsx
+1
-1
add.tsx
src/pages/shop/shopSeo/add.tsx
+1
-1
No files found.
src/components/AuthButton/AuthUrl.ts
View file @
e241aaaf
// 这里是处理比较特殊的url 跳转的
import
{
getAuth
}
from
"@/utils/auth"
;
export
const
AuthUrl
=
(
btnCode
:
string
,
munuCode
:
string
)
=>
{
export
const
AuthUrl
=
(
btnCode
:
string
,
munuCode
?
:
string
)
=>
{
const
{
auth
}
=
getAuth
()
const
{
pathname
}
=
new
URL
(
window
.
location
.
href
);
const
RoutesAuth
=
auth
.
filter
((
item
:
any
)
=>
item
?.
u
===
pathname
)
...
...
src/pages/classAndProperty/attribute/index.tsx
View file @
e241aaaf
...
...
@@ -24,6 +24,8 @@ import ModalTable from '@/components/ModalTable'
import
{
clearModalParams
}
from
'@/utils'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
getProductCustomerGetCustomerAttributeList
,
getProductPlatformGetAttributeList
,
postProductCustomerDeleteCustomerAttribute
,
postProductCustomerSyncAttribute
,
postProductCustomerUpdateCustomerAttributeStatus
}
from
'@/services/ProductV2Api'
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
import
AuthButton
from
'@/components/AuthButton'
// import styles from './index.less'
const
formActions
=
createFormActions
();
...
...
@@ -141,6 +143,8 @@ const Attribute: React.FC<{}> = () => {
dataIndex
:
'isEnable'
,
key
:
'isEnable'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
AuthButton
btnCode=
'attribute.state'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.isEnable.title'
})
}
onConfirm=
{
()
=>
confirm
(
record
)
}
...
...
@@ -154,6 +158,7 @@ const Attribute: React.FC<{}> = () => {
{
record
.
isEnable
?
<>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.isEnable.link.1'
})
}
<
PlayCircleOutlined
/></>
:
<>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.isEnable.link.2'
})
}
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
)
},
{
...
...
@@ -161,10 +166,13 @@ const Attribute: React.FC<{}> = () => {
dataIndex
:
'option'
,
render
:
(
text
:
any
,
record
:
any
)
=>
record
.
isEnable
?
''
:
<>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.option.linke.1'
})
}
</
Button
>
<
AuthButton
btnCode=
'attribute.edit'
>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.option.linke.1'
})
}
</
Button
>
</
AuthButton
>
<
AuthButton
btnCode=
'attribute.del'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.option.title'
})
}
onConfirm=
{
()
=>
clickDelete
(
record
)
}
...
...
@@ -174,15 +182,19 @@ const Attribute: React.FC<{}> = () => {
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.columns.option.linke.2'
})
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
</>
}
];
const
handleSee
=
(
record
:
any
)
=>
{
if
(
AuthUrl
(
'attribute.see'
))
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/attribute/detail?id=
${
record
.
id
}
&isSee=true`
)
}
}
const
confirm
=
(
record
:
any
)
=>
{
postProductCustomerUpdateCustomerAttributeStatus
({
id
:
record
.
id
,
isEnable
:
!
record
.
isEnable
}).
then
(
res
=>
{
ref
.
current
.
reload
()
...
...
@@ -241,13 +253,18 @@ const Attribute: React.FC<{}> = () => {
const
Actions
=
(
<
Space
>
<
AuthButton
btnCode=
'attribute.add'
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
'/memberCenter/commodityAbility/classAndProperty/attribute/add'
)
}
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.actions.button.1'
})
}
</
Button
>
</
AuthButton
>
<
span
>
<
AuthButton
btnCode=
'attribute.synchronization'
>
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.actions.tooltip'
})
}
>
<
Button
type=
"default"
style=
{
{
marginLeft
:
16
}
}
onClick=
{
syncAttribute
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.actions.button.2'
})
}
</
Button
>
</
Tooltip
>
</
AuthButton
>
</
span
>
</
Space
>
);
...
...
src/pages/classAndProperty/categoryAttributes/index.tsx
View file @
e241aaaf
...
...
@@ -19,6 +19,8 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
Submit
from
'@/components/NiceForm/components/Submit'
import
{
getProductCustomerGetCustomerCategoryAttributeList
,
getProductCustomerGetCustomerCategoryTree
,
postProductCustomerDeleteCustomerCategoryAttribute
,
postProductCustomerSaveCustomerCategoryAttribute
}
from
'@/services/ProductV2Api'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
AuthButton
from
'@/components/AuthButton'
;
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
;
const
fetchCategoryTreeData
=
async
(
params
?)
=>
{
const
res
=
await
getProductCustomerGetCustomerCategoryTree
()
...
...
@@ -110,7 +112,7 @@ const CategoryAttributes: React.FC<{}> = () => {
useEffect
(()
=>
{
if
(
selectKey
&&
flag
.
current
)
{
ref
.
current
.
reload
()
}
else
if
(
!
selectKey
)
{
}
else
if
(
!
selectKey
)
{
flag
.
current
=
false
}
else
{
flag
.
current
=
true
...
...
@@ -148,9 +150,12 @@ const CategoryAttributes: React.FC<{}> = () => {
}
const
handleSee
=
(
record
:
any
)
=>
{
if
(
AuthUrl
(
'categoryAttributes.see'
))
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/categoryAttributes/viewAttributes?id=
${
record
.
id
}
`
)
}
}
const
handleSelectOk
=
()
=>
{
setRoleVisible
(
false
)
setLinkLoading
(
true
)
...
...
@@ -218,6 +223,7 @@ const CategoryAttributes: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
<
AuthButton
btnCode=
'propertyValue.edit'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.categoryAttributes.columns.popconfirm'
})
}
onConfirm=
{
()
=>
clickRelief
(
record
.
id
)
}
...
...
@@ -226,6 +232,8 @@ const CategoryAttributes: React.FC<{}> = () => {
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.categoryAttributes.columns.button'
})
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
</>
)
}
...
...
@@ -361,9 +369,12 @@ const CategoryAttributes: React.FC<{}> = () => {
},
children
:
(
<>
<
AuthButton
btnCode=
'categoryAttributes.add'
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleNewLink
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.categoryAttributes.formilyChilds.button'
})
}
</
Button
>
</
AuthButton
>
</>
)
}
}
...
...
src/pages/classAndProperty/class/index.tsx
View file @
e241aaaf
...
...
@@ -14,6 +14,7 @@ import { useTreeTabs } from '@/hooks/useTreeTabs';
import
NiceForm
from
'@/components/NiceForm'
;
import
{
getProductCustomerGetCustomerCategory
,
getProductCustomerGetCustomerCategoryTree
,
getProductPlatformGetCategoryTree
,
postProductCustomerDeleteCustomerCategory
,
postProductCustomerSaveOrUpdateCustomerCategory
,
postProductCustomerSyncCategory
}
from
'@/services/ProductV2Api'
;
import
{
help
}
from
'@/pages/transaction/common'
;
import
AuthButton
from
'@/components/AuthButton'
;
const
{
ON_FORM_INPUT_CHANGE
}
=
LifeCycleTypes
...
...
@@ -213,7 +214,10 @@ const ClassProperty: React.FC<{}> = () => {
// customExpandkeys=
{['8']}
/>
:
<
AuthButton
btnCode=
'class.synchronization'
menuCode=
'memberAbility'
>
<
Button
block
type=
'primary'
onClick=
{
()
=>
handleSelect
()
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.class.h3.none'
})
}
</
Button
>
</
AuthButton
>
}
</
Card
>
</
Col
>
...
...
@@ -254,14 +258,20 @@ const ClassProperty: React.FC<{}> = () => {
>
<
FormButtonGroup
>
<
AuthButton
btnCode=
'class.add'
menuCode=
'memberAbility'
>
<
Button
loading=
{
finshLoading
}
htmlType=
'submit'
type=
"primary"
style=
{
{
marginTop
:
32
,
marginBottom
:
16
,
marginRight
:
24
}
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.class.h3.formButtonGroup.button.1'
})
}
</
Button
>
</
AuthButton
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.class.h3.formButtonGroup.popconfirm'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'classAndProperty.class.h3.formButtonGroup.okText'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'classAndProperty.class.h3.formButtonGroup.cancelText'
})
}
onConfirm=
{
handleDeleteMenu
}
>
{
treeStatus
!==
FormState
.
ADD
&&
<
Button
style=
{
{
marginTop
:
32
,
marginBottom
:
16
}
}
>
treeStatus
!==
FormState
.
ADD
&&
<
AuthButton
btnCode=
'class.del'
menuCode=
'memberAbility'
>
<
Button
style=
{
{
marginTop
:
32
,
marginBottom
:
16
}
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.class.h3.formButtonGroup.button.2'
})
}
</
Button
>
</
AuthButton
>
}
</
Popconfirm
>
</
FormButtonGroup
>
...
...
src/pages/classAndProperty/propertyValue/index.tsx
View file @
e241aaaf
...
...
@@ -22,6 +22,8 @@ import { ISchema } from '@formily/antd';
import
{
clearModalParams
}
from
'@/utils'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
getProductCustomerGetCustomerAttributeTree
,
getProductCustomerGetCustomerAttributeValueList
,
getProductPlatformGetSyncAttributeValueList
,
postProductCustomerDeleteCustomerAttributeValue
,
postProductCustomerSyncAttributeValue
,
postProductCustomerUpdateCustomerAttributeValueStatus
}
from
'@/services/ProductV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
;
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
;
const
treeActions
=
createTreeActions
()
...
...
@@ -121,7 +123,7 @@ const PropertyValue: React.FC<{}> = () => {
useEffect
(()
=>
{
if
(
selectKey
&&
flag
.
current
)
{
ref
.
current
.
reload
({
current
:
1
,
pageSize
:
10
,
name
:
''
,
customerAttributeId
:
selectKey
})
}
else
if
(
!
selectKey
)
{
}
else
if
(
!
selectKey
)
{
flag
.
current
=
false
}
else
{
flag
.
current
=
true
...
...
@@ -166,8 +168,10 @@ const PropertyValue: React.FC<{}> = () => {
}
const
handleSee
=
(
record
:
any
)
=>
{
if
(
AuthUrl
(
'propertyValue.see'
))
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/detail?attrId=
${
selectKey
}
&attrName=
${
record
.
customerAttribute
.
name
}
&attrValueId=
${
record
.
id
}
&isSee=true&type=
${
record
.
type
}
`
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -191,6 +195,8 @@ const PropertyValue: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<
AuthButton
btnCode=
'propertyValue.state'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.columns.popconfirm.title'
})
}
onConfirm=
{
()
=>
confirm
(
record
)
}
...
...
@@ -204,6 +210,7 @@ const PropertyValue: React.FC<{}> = () => {
{
record
.
isEnable
?
<>
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.columns.popconfirm.button.1'
})
}
<
PlayCircleOutlined
/></>
:
<>
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.columns.popconfirm.button.2'
})
}
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
)
return
component
}
...
...
@@ -217,12 +224,16 @@ const PropertyValue: React.FC<{}> = () => {
<>
{
record
.
isEnable
?
''
:
<>
<
AuthButton
btnCode=
'propertyValue.edit'
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/edit?attrId=${selectKey}&attrName=${record.customerAttribute.name}&attrValueId=${record.id}`
)
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.columns.button.1'
})
}
</
Button
>
</
AuthButton
>
<
AuthButton
btnCode=
'propertyValue.del'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.columns.button.2.popconfirm.title'
})
}
onConfirm=
{
()
=>
clickDelete
(
record
)
}
...
...
@@ -232,6 +243,8 @@ const PropertyValue: React.FC<{}> = () => {
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.columns.button.2'
})
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
</>
}
</>
...
...
@@ -391,6 +404,7 @@ const PropertyValue: React.FC<{}> = () => {
},
children
:
(
<>
<
AuthButton
btnCode=
'attribute.add'
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
...
...
@@ -400,6 +414,8 @@ const PropertyValue: React.FC<{}> = () => {
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.standardTable.formilyChilds.button'
})
}
</
Button
>
</
AuthButton
>
</>
)
}
}
...
...
src/pages/member/memberImport/index.tsx
View file @
e241aaaf
...
...
@@ -161,7 +161,7 @@ const MemberMaintain: React.FC<[]> = () => {
{
record
.
showUpdate
&&
(
<>
<
AuthButton
btnCode=
'memberImport.
comm
it'
menuCode=
'memberAbility'
>
<
AuthButton
btnCode=
'memberImport.
ed
it'
menuCode=
'memberAbility'
>
<
Button
type=
"link"
onClick=
{
()
=>
...
...
@@ -258,7 +258,7 @@ const MemberMaintain: React.FC<[]> = () => {
</Space>
)} */
}
<
Space
>
<
AuthButton
btnCode=
'memberImport.
del
'
menuCode=
'memberAbility'
>
<
AuthButton
btnCode=
'memberImport.
add
'
menuCode=
'memberAbility'
>
<
Button
type=
"primary"
onClick=
{
()
=>
...
...
src/pages/shop/shopInfo/index.tsx
View file @
e241aaaf
...
...
@@ -488,7 +488,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
<
Form
.
Item
label=
{
<
RequireItem
label=
""
/>
}
>
<
AuthButton
btnCode=
'hopAbility.Submit'
menuCode=
'shopAbility'
>
<
AuthButton
btnCode=
'
s
hopAbility.Submit'
menuCode=
'shopAbility'
>
<
Button
loading=
{
confirmLoading
}
type=
"primary"
style=
{
{
marginRight
:
16
}
}
onClick=
{
handleSave
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
</
AuthButton
>
...
...
src/pages/shop/shopSeo/add.tsx
View file @
e241aaaf
...
...
@@ -72,7 +72,7 @@ const ShopSeoAdded = () => {
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'common.button.back'
})
}
/>
}
extra=
{
link
!==
'detail'
&&
<
AuthButton
menuCode=
'shopAbility'
btnCode=
{
id
?
'
hopSeodetail.edit'
:
'shopSeodetail.add'
}
>
<
AuthButton
btnCode=
{
id
?
's
hopSeodetail.edit'
:
'shopSeodetail.add'
}
>
<
Button
type=
"primary"
loading=
{
confirmLoading
}
onClick=
{
handleSave
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
</
AuthButton
>
...
...
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