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
project
jinfa-admin
Commits
30ac8bbf
Commit
30ac8bbf
authored
Jun 17, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
merge: merge dev
parents
e316317d
b2de37b9
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
418 additions
and
84 deletions
+418
-84
app.tsx
src/app.tsx
+14
-2
index.tsx
src/components/NiceForm/index.tsx
+4
-6
index.tsx
src/components/UploadImage/index.tsx
+6
-2
index.tsx
src/pages/capitalAccount/accountLists/index.tsx
+2
-2
index.tsx
src/pages/classAndProperty/propertyValue/index.tsx
+1
-1
index.tsx
src/pages/content/announcements/index.tsx
+2
-0
index.tsx
src/pages/content/infomation/index.tsx
+44
-32
index1.tsx
src/pages/content/infomation/index1.tsx
+295
-0
ComponentsPreview.tsx
src/pages/pageCustomized/components/ComponentsPreview.tsx
+9
-4
index.tsx
src/pages/pageCustomized/components/toolBar/index.tsx
+5
-5
config.ts
src/pages/pageCustomized/mobileEdit/config.ts
+19
-19
index.tsx
...ileSettingPanel/propsSettings/components/banner/index.tsx
+2
-2
index.tsx
...Panel/propsSettings/components/bottomNavigation/index.tsx
+2
-1
index.tsx
...SettingPanel/propsSettings/components/headerNav/index.tsx
+2
-1
index.tsx
...leSettingPanel/propsSettings/components/quality/index.tsx
+2
-2
index.tsx
...eSettingPanel/propsSettings/components/quickNav/index.tsx
+2
-1
index.tsx
...bileSettingPanel/propsSettings/components/shops/index.tsx
+2
-2
index.tsx
...eSettingPanel/propsSettings/components/showCase/index.tsx
+3
-1
detail.tsx
src/pages/ruleSettingManage/memberAuthManage/detail.tsx
+2
-1
No files found.
src/app.tsx
View file @
30ac8bbf
...
...
@@ -17,12 +17,17 @@ import '@/components/NiceForm/public'
setup
();
let
extraRoutes
:
never
[]
=
[];
//
let extraRoutes: never[] = [];
// 与用户登录相关路由
const
userLoginLists
=
[
'/login'
,
]
// 登录后的路由白名单
const
loginWhiteList
=
[
'/home'
,
]
const
whiteLists
=
[
'/'
,
...
userLoginLists
,
...
...
@@ -99,9 +104,11 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
return
}
const
authInfo
=
getAuth
()
// 是否登录
if
(
getAuth
()
)
{
if
(
authInfo
)
{
const
{
query
,
pathname
}
=
location
console
.
log
(
pathname
);
const
routeAuthUrls
=
getRouters
()
if
(
userLoginLists
.
includes
(
pathname
))
{
// 当登录过, 并且尝试访问登录相关页面, 需重定向到首页
...
...
@@ -109,6 +116,11 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
return
;
}
// 登录之后 能力中心的首页应该变为可以访问, 无论是否在权限中
if
(
loginWhiteList
.
includes
(
location
.
pathname
))
{
return
}
// 固定配置, 出现此参数说明需携带参数校验权限路由
if
(
query
.
page_type
&&
routeAuthUrls
.
find
(
authPath
=>
{
const
parseUrl
=
queryString
.
parseUrl
(
authPath
)
...
...
src/components/NiceForm/index.tsx
View file @
30ac8bbf
...
...
@@ -30,8 +30,7 @@ import FixUpload from './components/FixUpload';
import
'./index.less'
import
{
currentStateType
,
getCurrentState
}
from
'./utils/keepAlive'
;
import
{
useRouteMatch
}
from
'umi'
;
export
interface
NiceFormProps
extends
IAntdSchemaFormProps
{}
export
type
NiceFormProps
=
IAntdSchemaFormProps
const
SchemaFormButtonGroup
=
createVirtualBox
(
'schemaButtonGroup'
,
FormButtonGroup
)
const
SchemaButton
=
createVirtualBox
(
'schemaButton'
,
Button
)
...
...
@@ -104,11 +103,10 @@ export const componentExport = {
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
...
reset
}
=
props
;
const
match
=
useRouteMatch
();
const
defineComponents
=
Object
.
assign
(
componentExport
,
components
);
useEffect
(()
=>
{
le
t
paginationInfo
:
currentStateType
=
getCurrentState
();
cons
t
paginationInfo
:
currentStateType
=
getCurrentState
();
// 一般 列表检索传入的 controlRender 的 NiceForm 是没有 value 或者 initialValues 的
// value 或者 initialValues 的,表单页有
if
(
...
...
@@ -117,9 +115,9 @@ const NiceForm: React.FC<NiceFormProps> = props => {
&&
!
(
'initialValues'
in
reset
)
)
{
// @ts-ignore
reset
.
actions
.
setFormState
(
reset
.
actions
.
setFormState
(
state
=>
(
state
.
values
=
paginationInfo
.
queryParams
),
);
);
}
},
[])
...
...
src/components/UploadImage/index.tsx
View file @
30ac8bbf
...
...
@@ -5,6 +5,7 @@ import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import
{
UPLOAD_TYPE
}
from
'@/constants/index'
;
import
cx
from
'classnames'
import
styles
from
'./index.less'
import
{
getAuth
}
from
'@/utils/auth'
;
interface
UploadImagePorpsType
{
imgUrl
?:
string
;
...
...
@@ -18,7 +19,8 @@ interface UploadImagePorpsType {
}
const
UploadImage
:
React
.
FC
<
UploadImagePorpsType
>
=
forwardRef
((
props
,
ref
)
=>
{
const
{
children
,
imgUrl
,
onChange
,
showDesc
=
true
,
size
=
"386x256"
,
disabled
=
false
,
large
=
false
,
fileMaxSize
=
200
,
listType
=
"picture-card"
}
=
props
const
{
children
,
imgUrl
,
onChange
,
showDesc
=
true
,
size
=
"386x256"
,
disabled
=
false
,
large
=
false
,
fileMaxSize
=
200
,
listType
=
"picture-card"
}
=
props
;
const
auth
=
getAuth
();
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
beforeUpload
=
(
file
:
UploadFile
)
=>
{
...
...
@@ -36,7 +38,9 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
const
uploadProps
=
{
name
:
'file'
,
action
:
'/api/file/file/upload'
,
headers
:
{},
headers
:
{
token
:
auth
?.
token
,
},
data
:
{
fileType
:
UPLOAD_TYPE
},
...
...
src/pages/capitalAccount/accountLists/index.tsx
View file @
30ac8bbf
...
...
@@ -49,8 +49,8 @@ const AccountLists: React.FC<{}> = () => {
},
{
title
:
'会员角色'
,
dataIndex
:
'
MemberManage
RoleName'
,
key
:
'
MemberManage
RoleName'
,
dataIndex
:
'
member
RoleName'
,
key
:
'
member
RoleName'
,
},
// {
// title: '会员等级',
...
...
src/pages/classAndProperty/propertyValue/index.tsx
View file @
30ac8bbf
...
...
@@ -243,7 +243,7 @@ const PropertyValue: React.FC<{}> = () => {
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
`/classAndProperty/propertyValue/add?attrId=${selectKey||history.location.query.attrId}&attrName=${selectNode._title||history.location.query.attrName}&type=${selectNode?.type||history.location.query.type}`
)
history
.
push
(
`/classAndProperty/propertyValue/add?attrId=${selectKey||history.location.query.attrId}&attrName=${selectNode
?
._title||history.location.query.attrName}&type=${selectNode?.type||history.location.query.type}`
)
}
}
style=
{
{
marginBottom
:
24
}
}
>
...
...
src/pages/content/announcements/index.tsx
View file @
30ac8bbf
...
...
@@ -143,6 +143,7 @@ const Announcements = () => {
resetPagination
({
current
:
1
})
handleSearch
({
title
:
value
,
current
:
1
});
},
// eslint-disable-next-line react/display-name
renderStatus
:
(
text
,
record
)
=>
{
const
STATUSMAP
=
{
"1"
:
"待上架"
,
...
...
@@ -168,6 +169,7 @@ const Announcements = () => {
})
});
},
// eslint-disable-next-line react/display-name
renderOperation
:
(
val
,
record
)
=>
{
const
status
=
[
""
,
"上架"
,
"下架"
,
"上架"
];
const
canModify
=
[
1
,
3
]
...
...
src/pages/content/infomation/index.tsx
View file @
30ac8bbf
...
...
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import
{
FilterTable
,
SchemaFlexRowLayout
,
SchemaFlexColumnLayout
}
from
'../components/FilterTable'
;
import
{
Card
,
Input
,
Button
,
Table
,
Dropdown
,
Menu
,
Select
,
Space
,
Modal
,
Popconfirm
}
from
'antd'
;
import
{
createVirtualBox
,
createFormActions
,
FormEffectHooks
,
createEffectHook
}
from
'@formily/antd'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
DownOutlined
,
DeleteOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
import
{
timeRange
}
from
'@/utils/index'
;
import
{
PublicApi
}
from
'@/services/api'
;
...
...
@@ -11,6 +11,8 @@ import TablePagination from '../components/TablePagination';
import
{
getTableDataSource
,
setFormStatus
}
from
'../utils/utils'
import
{
merge
}
from
'rxjs'
;
import
CustomSearch
from
'../components/CustomSearch'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
const
{
onFormInit$
,
onFieldValueChange$
}
=
FormEffectHooks
const
{
Search
}
=
Input
;
...
...
@@ -55,6 +57,8 @@ const getData = async (params: any) => {
const
Infomation
=
()
=>
{
const
columns
=
useGetColumns
();
const
[
selectedRow
,
setSelectedRow
]
=
useState
<
any
[]
>
([]);
// const [roleSelection, roleSelectCtl] = useRowSelectionTable()
// const refkeys = useRef([])
useEffect
(()
=>
{
const
params
=
{
...
...
@@ -73,14 +77,14 @@ const Infomation = () => {
merge
(
onFieldValueChange$
(
'columns'
),
onFieldValueChange$
(
'status'
),
onFieldValueChange$
(
'status'
),
onFieldValueChange$
(
'time'
)
).
subscribe
((
state
)
=>
{
if
(
state
.
active
&&
state
.
value
!=
null
)
{
handleSearch
({})
}
})
onFieldValueChange$
(
'pagination'
).
subscribe
((
state
)
=>
{
handleSearch
({...
state
.
value
})
})
...
...
@@ -93,12 +97,12 @@ const Infomation = () => {
const
time
=
actions
.
getFieldValue
(
'time'
);
const
{
st
,
et
}
=
timeRange
(
time
);
const
postData
=
{
title
:
title
,
title
:
title
,
status
:
status
!=
0
?
status
:
''
,
columnId
:
columnId
,
startTime
:
st
&&
st
*
1000
,
endTime
:
et
&&
et
*
1000
,
current
:
1
,
startTime
:
st
&&
st
,
endTime
:
et
&&
et
,
current
:
1
,
pageSize
:
10
,
...
params
,
}
...
...
@@ -114,12 +118,12 @@ const Infomation = () => {
handleSearch
({...
paginationValue
})
});
}
// 批量删除
const
batchDelete
=
()
=>
{
const
rows
=
selectedRow
.
map
((
item
)
=>
item
.
id
);
const
rows
=
selectedRow
handleBatch
(
rows
,
1
);
}
}
// type 1-批量删除 2-批量上架 3-批量下架
const
handleBatch
=
(
row
,
type
)
=>
{
...
...
@@ -153,12 +157,12 @@ const Infomation = () => {
return
(
<
Card
>
<
FilterTable
<
FilterTable
schema=
{
infomationSchema
}
components=
{
{
CustomSearch
,
// SchemaFlexRowLayout,
// SchemaDropDown,
CustomSearch
,
// SchemaFlexRowLayout,
// SchemaDropDown,
SchemaFlexColumnLayout
,
Select
,
Table
,
...
...
@@ -196,7 +200,7 @@ const Infomation = () => {
<
a
>
删除
</
a
>
</
Menu
.
Item
>
</
Menu
.
Item
>
</
Menu
>
)
return
(
...
...
@@ -210,7 +214,7 @@ const Infomation = () => {
>
<
a
href=
"#"
>
{
status
[
record
.
status
]
}
</
a
>
</
Popconfirm
>
{
CAN_MODIFY
.
includes
(
record
.
status
)
?
<
Dropdown
overlay=
{
menu
}
>
...
...
@@ -220,19 +224,19 @@ const Infomation = () => {
</
Dropdown
>
:
null
}
</
Space
>
)
},
batchGrounding
:
()
=>
{
console
.
log
(
"批量上架"
);
const
rows
=
selectedRow
.
map
((
item
)
=>
item
.
id
);
const
rows
=
selectedRow
handleBatch
(
rows
,
2
);
},
undercarriage
:
()
=>
{
console
.
log
(
"批量下架"
)
const
rows
=
selectedRow
.
map
((
item
)
=>
item
.
id
);
const
rows
=
selectedRow
handleBatch
(
rows
,
3
);
},
menu
:
()
=>
{
...
...
@@ -256,18 +260,27 @@ const Infomation = () => {
</
span
>
)
},
// rowSelection: roleSelection,
rowSelection
:
{
onSelect
:
(
record
,
selected
,
selectedRows
)
=>
{
console
.
log
(
record
,
selected
,
selectedRows
);
setSelectedRow
(
selectedRows
);
const
selectedRowsKeys
=
selectedRows
.
filter
((
_item
)
=>
_item
).
map
((
item
)
=>
item
.
id
);
let
keys
=
Array
.
from
(
new
Set
([...
selectedRowsKeys
,
...
selectedRow
]))
if
(
!
selected
)
{
keys
=
keys
.
filter
((
_item
)
=>
_item
!==
record
.
id
);
}
setSelectedRow
(
keys
)
},
onSelectAll
:
(
record
,
selected
,
changeRows
)
=>
{
// const res = selectedRow.concat(selectedRows);
console
.
log
(
selectedRow
);
const
res
=
selected
.
filter
((
item
)
=>
item
&&
item
.
id
);
setSelectedRow
(
res
);
}
onSelectAll
:
(
selected
,
checkedRows
,
changeRows
)
=>
{
const
changeRowKey
=
changeRows
.
filter
((
_item
)
=>
_item
).
map
((
item
)
=>
item
.
id
);
let
keys
=
Array
.
from
(
new
Set
([...
changeRowKey
,
...
selectedRow
]))
if
(
selected
)
{
setSelectedRow
(
keys
)
}
else
{
const
removeKeys
=
keys
.
filter
((
_item
)
=>
!
changeRowKey
.
includes
(
_item
));
setSelectedRow
(
removeKeys
)
}
},
selectedRowKeys
:
selectedRow
},
toggleFilters
:
()
=>
{
actions
.
setFieldState
(
'FILTERS'
,
state
=>
{
...
...
@@ -283,7 +296,7 @@ const Infomation = () => {
)
})
});
},
}
}
effects=
{
infomationEffects
()
}
...
...
@@ -292,4 +305,4 @@ const Infomation = () => {
)
}
export
default
Infomation
;
\ No newline at end of file
export
default
Infomation
;
src/pages/content/infomation/index1.tsx
0 → 100644
View file @
30ac8bbf
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
FilterTable
,
SchemaFlexRowLayout
,
SchemaFlexColumnLayout
}
from
'../components/FilterTable'
;
import
{
Card
,
Input
,
Button
,
Table
,
Dropdown
,
Menu
,
Select
,
Space
,
Modal
,
Popconfirm
}
from
'antd'
;
import
{
createVirtualBox
,
createFormActions
,
FormEffectHooks
,
createEffectHook
}
from
'@formily/antd'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
DownOutlined
,
DeleteOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
import
{
timeRange
}
from
'@/utils/index'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
infomationSchema
}
from
'./schema'
;
import
TablePagination
from
'../components/TablePagination'
;
import
{
getTableDataSource
,
setFormStatus
}
from
'../utils/utils'
import
{
merge
}
from
'rxjs'
;
import
CustomSearch
from
'../components/CustomSearch'
;
const
{
onFormInit$
,
onFieldValueChange$
}
=
FormEffectHooks
const
{
Search
}
=
Input
;
const
SchemaButton
=
createVirtualBox
(
'button'
,
Button
);
const
SchemaTable
=
createVirtualBox
(
'SchemaTable'
,
Table
);
const
SchemaDropDown
=
createVirtualBox
(
'SchemaDropDown'
,
Dropdown
.
Button
);
const
actions
=
createFormActions
();
const
tagColorStyle
=
{
"1"
:
{
color
:
'#606266'
,
background
:
'#F4F5F7'
},
"2"
:
{
color
:
'#00B37A'
,
background
:
'#EBF7F2'
},
"3"
:
{
color
:
'#E63F3B'
,
background
:
'#FFEBE6'
},
}
interface
optionsType
{
label
:
string
,
value
:
string
|
number
}
const
useGetColumns
=
()
=>
{
const
[
state
,
setState
]
=
useState
<
optionsType
[]
>
([]);
useEffect
(()
=>
{
async
function
getAllColumns
()
{
const
res
=
await
PublicApi
.
getManageContentColumnAll
();
console
.
log
(
res
);
const
options
=
res
.
data
.
map
((
item
)
=>
({
label
:
item
.
name
,
value
:
item
.
id
}));
// setTableStatus("column", "options", options);
setState
(
options
)
}
getAllColumns
();
},
[])
return
state
;
}
const
getData
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getManageContentInformationPage
(
params
);
return
res
.
data
}
const
Infomation
=
()
=>
{
const
columns
=
useGetColumns
();
const
[
selectedRow
,
setSelectedRow
]
=
useState
<
any
[]
>
([]);
useEffect
(()
=>
{
const
params
=
{
current
:
1
,
pageSize
:
10
}
getTableDataSource
(
actions
,
params
,
getData
);
},
[])
const
infomationEffects
=
()
=>
()
=>
{
onFormInit$
().
subscribe
(()
=>
{
actions
.
setFieldState
(
'FILTERS'
,
state
=>
{
state
.
visible
=
false
;
})
})
merge
(
onFieldValueChange$
(
'columns'
),
onFieldValueChange$
(
'status'
),
onFieldValueChange$
(
'time'
)
).
subscribe
((
state
)
=>
{
if
(
state
.
active
&&
state
.
value
!=
null
)
{
handleSearch
({})
}
})
onFieldValueChange$
(
'pagination'
).
subscribe
((
state
)
=>
{
handleSearch
({...
state
.
value
})
})
}
const
handleSearch
=
async
(
params
)
=>
{
const
title
=
actions
.
getFieldValue
(
'search'
);
const
columnId
=
actions
.
getFieldValue
(
"columns"
)
;
// 栏目
const
status
=
actions
.
getFieldValue
(
'status'
);
// 状态
const
time
=
actions
.
getFieldValue
(
'time'
);
const
{
st
,
et
}
=
timeRange
(
time
);
const
postData
=
{
title
:
title
,
status
:
status
!=
0
?
status
:
''
,
columnId
:
columnId
,
startTime
:
st
&&
st
*
1000
,
endTime
:
et
&&
et
*
1000
,
current
:
1
,
pageSize
:
10
,
...
params
,
}
getTableDataSource
(
actions
,
postData
,
getData
);
}
// 修改状态
const
handleUpdateState
=
(
id
,
status
)
=>
{
// 该方法是上下架 所以 enableStatus 无用,随意传
PublicApi
.
postManageContentInformationUpdateStatus
({
id
:
id
,
shelfStatus
:
status
,
enableStatus
:
0
})
.
then
((
data
)
=>
{
const
paginationValue
=
actions
.
getFieldValue
(
'pagination'
);
handleSearch
({...
paginationValue
})
});
}
// 批量删除
const
batchDelete
=
()
=>
{
const
rows
=
selectedRow
.
map
((
item
)
=>
item
.
id
);
handleBatch
(
rows
,
1
);
}
// type 1-批量删除 2-批量上架 3-批量下架
const
handleBatch
=
(
row
,
type
)
=>
{
PublicApi
.
postManageContentInformationBatch
({
ids
:
row
,
type
:
type
})
.
then
((
data
)
=>
{
const
paginationValue
=
actions
.
getFieldValue
(
'pagination'
);
handleSearch
({...
paginationValue
})
})
}
const
handleDelete
=
(
id
)
=>
{
Modal
.
confirm
({
title
:
'确定要执行这个操作?'
,
onOk
:
()
=>
{
PublicApi
.
postManageContentInformationDelete
({
id
:
id
})
.
then
((
data
)
=>
{
const
paginationValue
=
actions
.
getFieldValue
(
'pagination'
);
handleSearch
({...
paginationValue
})
})
}
})
}
// 重设页码
const
resetPagination
=
(
params
)
=>
{
const
paginationValue
=
actions
.
getFieldValue
(
'pagination'
);
actions
.
setFieldValue
(
'pagination'
,
{
...
paginationValue
,
...
params
})
}
return
(
<
Card
>
<
FilterTable
schema=
{
infomationSchema
}
components=
{
{
CustomSearch
,
// SchemaFlexRowLayout,
// SchemaDropDown,
SchemaFlexColumnLayout
,
Select
,
Table
,
TablePagination
}
}
actions=
{
actions
}
expressionScope=
{
{
goToCreate
:
()
=>
{
history
.
push
(
`/content/infomations/add`
)
},
reset
:
()
=>
{
actions
.
setFieldValue
(
'search'
);
actions
.
setFieldValue
(
"columns"
)
;
// 栏目
actions
.
setFieldValue
(
'status'
);
// 状态
actions
.
setFieldValue
(
'time'
);
resetPagination
({
current
:
1
})
handleSearch
({
name
:
null
,
current
:
1
})
},
search
:
(
value
)
=>
{
resetPagination
({
current
:
1
})
handleSearch
({
name
:
value
,
current
:
1
});
},
renderOperation
:
(
val
,
record
)
=>
{
const
status
=
[
""
,
"上架"
,
"下架"
,
"上架"
];
const
CAN_MODIFY
=
[
1
,
3
];
// 只有待上架, 下架才有删除
const
menu
=
(
<
Menu
>
<
Menu
.
Item
>
<
Link
to=
{
`/content/infomations/detail?id=${record.id}`
}
>
编辑
</
Link
>
</
Menu
.
Item
>
<
Menu
.
Item
onClick=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
a
>
删除
</
a
>
</
Menu
.
Item
>
</
Menu
>
)
return
(
<
Space
>
{
/* 这里反向操作, 上架的对应的是下架, 待上架,下架对应的是上架 */
}
<
Popconfirm
title=
"确定要执行这个操作吗"
onConfirm=
{
()
=>
handleUpdateState
(
record
.
id
,
status
[
record
.
status
]
==
'上架'
?
2
:
3
)
}
okText=
"是"
cancelText=
"否"
>
<
a
href=
"#"
>
{
status
[
record
.
status
]
}
</
a
>
</
Popconfirm
>
{
CAN_MODIFY
.
includes
(
record
.
status
)
?
<
Dropdown
overlay=
{
menu
}
>
<
a
>
更多
<
DownOutlined
/>
</
a
>
</
Dropdown
>
:
null
}
</
Space
>
)
},
batchGrounding
:
()
=>
{
console
.
log
(
"批量上架"
);
const
rows
=
selectedRow
.
map
((
item
)
=>
item
.
id
);
handleBatch
(
rows
,
2
);
},
undercarriage
:
()
=>
{
console
.
log
(
"批量下架"
)
const
rows
=
selectedRow
.
map
((
item
)
=>
item
.
id
);
handleBatch
(
rows
,
3
);
},
menu
:
()
=>
{
return
(
<
Menu
onClick=
{
batchDelete
}
>
<
Menu
.
Item
key=
"1"
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
</
Menu
.
Item
>
</
Menu
>
);
},
renderStatus
:
(
text
,
record
)
=>
{
const
STATUSMAP
=
{
"1"
:
"待上架"
,
"2"
:
"已上架"
,
"3"
:
"已下架"
}
return
(
<
span
style=
{
{...
tagColorStyle
[
record
.
status
],
padding
:
'3px 5px'
}
}
>
{
STATUSMAP
[
record
.
status
]
}
</
span
>
)
},
rowSelection
:
{
onSelect
:
(
record
,
selected
,
selectedRows
)
=>
{
console
.
log
(
record
,
selected
,
selectedRows
);
setSelectedRow
(
selectedRows
);
},
onSelectAll
:
(
record
,
selected
,
changeRows
)
=>
{
// const res = selectedRow.concat(selectedRows);
console
.
log
(
selectedRow
);
const
res
=
selected
.
filter
((
item
)
=>
item
&&
item
.
id
);
setSelectedRow
(
res
);
}
},
toggleFilters
:
()
=>
{
actions
.
setFieldState
(
'FILTERS'
,
state
=>
{
const
visible
=
!
state
.
visible
;
state
.
visible
=
visible
;
if
(
visible
)
{
setFormStatus
(
actions
,
'columns'
,
"options"
,
columns
);
}
actions
.
setFieldState
(
'HIGHT_FILTER_BTN'
,
(
state
)
=>
{
//@ts-ignore
state
.
props
[
'x-component-props'
].
children
=
(
<
div
>
高级搜索
{
visible
?
<
UpOutlined
/>
:
<
DownOutlined
/>
}
</
div
>
)
})
});
},
}
}
effects=
{
infomationEffects
()
}
/>
</
Card
>
)
}
export
default
Infomation
;
src/pages/pageCustomized/components/ComponentsPreview.tsx
View file @
30ac8bbf
...
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import
map
from
'lodash/map'
import
{
EyeOutlined
,
EyeInvisibleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
cloneDeep
}
from
'lodash'
import
{
selectComponent
,
useSelector
,
ComponentConfigsType
,
SelectedInfoBaseType
,
SelectedInfoType
,
clearSelectedStatus
,
STATE_PROPS
,
VirtualDOMType
}
from
'lingxi-editor-core'
;
import
styles
from
'./index.less'
...
...
@@ -16,16 +17,20 @@ const AllComponents = () => {
useEffect
(()
=>
{
const
newList
:
VirtualDOMType
[]
=
[]
Object
.
keys
(
componentConfigs
).
forEach
(
key
=>
{
if
(
componentConfigs
[
key
].
canEdit
)
{
componentConfigs
[
key
].
key
=
key
newList
.
push
(
componentConfigs
[
key
])
const
config
=
cloneDeep
(
componentConfigs
)
Object
.
keys
(
config
).
forEach
(
key
=>
{
if
(
config
[
key
].
canEdit
)
{
if
(
key
!==
'key'
)
{
config
[
key
].
key
=
key
newList
.
push
(
config
[
key
])
}
}
})
setAllComponents
(
newList
)
},
[
componentConfigs
,
selectedInfo
])
const
handleSelectComponent
=
(
key
:
string
)
=>
{
console
.
log
(
key
,
'key'
)
if
(
!
selectedInfo
||
selectedInfo
.
selectedKey
!==
key
)
{
const
specialProps
:
SelectedInfoBaseType
=
{
parentKey
:
"0"
,
...
...
src/pages/pageCustomized/components/toolBar/index.tsx
View file @
30ac8bbf
...
...
@@ -52,32 +52,32 @@ const ToolBar: React.FC<ToolBarPropsType> = (props) => {
break
case
PROPS_TYPES
.
mobileBanner
:
param
.
appEnterpriseBO
.
advertBO
=
{
status
:
componentConfigsItem
.
props
.
visible
||
true
,
status
:
componentConfigsItem
.
props
.
visible
,
advertDetailsBOList
:
componentConfigsItem
.
props
.
dataList
||
[]
}
break
case
PROPS_TYPES
.
mobileQuickNav
:
param
.
appEnterpriseBO
.
functionBO
=
{
status
:
componentConfigsItem
.
props
.
visible
||
true
,
status
:
componentConfigsItem
.
props
.
visible
,
functionDetailsBO
:
componentConfigsItem
.
props
.
dataList
||
[]
}
break
case
PROPS_TYPES
.
mobileShowCase
:
param
.
appEnterpriseBO
.
showcaseBO
=
{
style
:
componentConfigsItem
.
props
.
styleTheme
||
0
,
status
:
componentConfigsItem
.
props
.
visible
||
true
,
status
:
componentConfigsItem
.
props
.
visible
,
showcaseDetailsBO
:
componentConfigsItem
.
props
.
dataList
||
[]
}
break
case
PROPS_TYPES
.
mobileRecommentShops
:
param
.
appEnterpriseBO
.
storeBO
=
{
status
:
componentConfigsItem
.
props
.
visible
||
true
,
status
:
componentConfigsItem
.
props
.
visible
,
storeIdList
:
componentConfigsItem
.
props
.
dataList
?
componentConfigsItem
.
props
.
dataList
.
map
(
item
=>
item
.
selectId
)
:
[]
}
break
case
PROPS_TYPES
.
mobileQuality
:
param
.
appEnterpriseBO
.
excellentBO
=
{
status
:
componentConfigsItem
.
props
.
visible
||
true
,
status
:
componentConfigsItem
.
props
.
visible
,
excellentDetailsBO
:
componentConfigsItem
.
props
.
dataList
||
[]
}
break
...
...
src/pages/pageCustomized/mobileEdit/config.ts
View file @
30ac8bbf
...
...
@@ -19,7 +19,7 @@ export const mallLayoutConfig = {
"paddingBottom"
:
"50px"
,
}
},
"childNodes"
:
[
"1"
,
"
4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9
"
]
"childNodes"
:
[
"1"
,
"
5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10
"
]
},
}
...
...
@@ -33,7 +33,7 @@ export const divWrap = {
"background"
:
"#FFF"
,
}
},
"childNodes"
:
[
"2"
,
"
1
3"
]
"childNodes"
:
[
"2"
,
"3"
]
}
}
...
...
@@ -84,8 +84,8 @@ export const mobileHeaderNav = {
}
export
const
bannerWrap
=
{
key
:
"
1
3"
,
"
1
3"
:
{
key
:
"3"
,
"3"
:
{
"componentName"
:
"div"
,
"props"
:
{
"style"
:
{
...
...
@@ -93,13 +93,13 @@ export const bannerWrap = {
}
},
"childNodes"
:
[
"
3
"
]
"childNodes"
:
[
"
4
"
]
}
}
export
const
mobileBanner
=
{
key
:
"
3
"
,
"
3
"
:
{
key
:
"
4
"
,
"
4
"
:
{
"componentName"
:
"MobileBanner"
,
"componentType"
:
PROPS_TYPES
.
mobileBanner
,
"title"
:
"轮播广告"
,
...
...
@@ -113,8 +113,8 @@ export const mobileBanner = {
}
export
const
mobileQuickNav
=
{
key
:
"
4
"
,
"
4
"
:
{
key
:
"
5
"
,
"
5
"
:
{
"componentName"
:
"MobileQuickNav"
,
"componentType"
:
PROPS_TYPES
.
mobileQuickNav
,
"title"
:
"功能入口"
,
...
...
@@ -158,8 +158,8 @@ export const mobileQuickNav = {
}
export
const
mobileShowCase
=
{
key
:
"
5
"
,
"
5
"
:
{
key
:
"
6
"
,
"
6
"
:
{
"componentName"
:
"MobileShowCase"
,
"componentType"
:
PROPS_TYPES
.
mobileShowCase
,
"title"
:
"橱窗位"
,
...
...
@@ -170,8 +170,8 @@ export const mobileShowCase = {
}
export
const
mobileInformation
=
{
key
:
"
6
"
,
"
6
"
:
{
key
:
"
7
"
,
"
7
"
:
{
"componentName"
:
"MobileInformation"
,
"title"
:
"资讯"
,
"canEdit"
:
false
,
...
...
@@ -184,8 +184,8 @@ export const mobileInformation = {
export
const
mobileRecommendShops
=
{
key
:
"
7
"
,
"
7
"
:
{
key
:
"
8
"
,
"
8
"
:
{
"componentName"
:
"MobileRecommendShops"
,
"componentType"
:
PROPS_TYPES
.
mobileRecommentShops
,
"title"
:
"推荐店铺"
,
...
...
@@ -197,8 +197,8 @@ export const mobileRecommendShops = {
export
const
mobileQuality
=
{
key
:
"
8
"
,
"
8
"
:
{
key
:
"
9
"
,
"
9
"
:
{
"componentName"
:
"MobileQuality"
,
"componentType"
:
PROPS_TYPES
.
mobileQuality
,
"title"
:
"优质推荐"
,
...
...
@@ -240,8 +240,8 @@ export const mobileQuality = {
}
export
const
mobileBottomNavigation
=
{
key
:
"
9
"
,
"
9
"
:
{
key
:
"
10
"
,
"
10
"
:
{
"componentName"
:
"MobileBottomNavigation"
,
"componentType"
:
PROPS_TYPES
.
mobileBottomNavigation
,
"title"
:
"底部导航"
,
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/banner/index.tsx
View file @
30ac8bbf
...
...
@@ -23,6 +23,7 @@ import arrowLeftIcon from '@/asserts/icons/arrow_left.png'
import
arrowUpIcon
from
'@/asserts/icons/arrow_up.png'
import
arrowDownIcon
from
'@/asserts/icons/arrow_down.png'
import
sortIcon
from
'@/asserts/icons/sort_icon.png'
import
{
cloneDeep
}
from
'lodash'
import
styles
from
'./index.less'
...
...
@@ -89,7 +90,7 @@ const Banner: React.FC<BannerPropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newDataList
=
cloneDeep
(
dataList
)
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
sort
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
@@ -99,7 +100,6 @@ const Banner: React.FC<BannerPropsType> = (props) => {
}
const
handleExpand
=
async
(
sort
:
number
,
expand
:
boolean
)
=>
{
console
.
log
(
sort
,
expand
,
"newList"
)
const
newList
=
[...
list
]
for
(
const
item
of
newList
)
{
if
(
item
.
sort
===
sort
)
{
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/bottomNavigation/index.tsx
View file @
30ac8bbf
...
...
@@ -11,6 +11,7 @@ import arrowLeftIcon from '@/asserts/icons/arrow_left.png'
import
arrowUpIcon
from
'@/asserts/icons/arrow_up.png'
import
arrowDownIcon
from
'@/asserts/icons/arrow_down.png'
import
sortIcon
from
'@/asserts/icons/sort_icon.png'
import
{
cloneDeep
}
from
'lodash'
import
styles
from
'./index.less'
...
...
@@ -83,7 +84,7 @@ const BottomNavigation: React.FC<BottomNavigationPropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newDataList
=
cloneDeep
(
dataList
)
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
id
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/headerNav/index.tsx
View file @
30ac8bbf
...
...
@@ -11,6 +11,7 @@ import arrowLeftIcon from '@/asserts/icons/arrow_left.png'
import
arrowUpIcon
from
'@/asserts/icons/arrow_up.png'
import
arrowDownIcon
from
'@/asserts/icons/arrow_down.png'
import
sortIcon
from
'@/asserts/icons/sort_icon.png'
import
{
cloneDeep
}
from
'lodash'
import
styles
from
'./index.less'
...
...
@@ -37,7 +38,7 @@ const HeaderNav: React.FC<HeaderNavPropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newDataList
=
cloneDeep
(
dataList
)
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
id
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/quality/index.tsx
View file @
30ac8bbf
...
...
@@ -23,7 +23,7 @@ import arrowLeftIcon from '@/asserts/icons/arrow_left.png'
import
arrowUpIcon
from
'@/asserts/icons/arrow_up.png'
import
arrowDownIcon
from
'@/asserts/icons/arrow_down.png'
import
sortIcon
from
'@/asserts/icons/sort_icon.png'
import
{
cloneDeep
}
from
'lodash'
import
styles
from
'./index.less'
interface
DataItemType
{
...
...
@@ -87,7 +87,7 @@ const Quality: React.FC<QualityPropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newDataList
=
cloneDeep
(
dataList
)
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
id
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/quickNav/index.tsx
View file @
30ac8bbf
...
...
@@ -11,6 +11,7 @@ import arrowLeftIcon from '@/asserts/icons/arrow_left.png'
import
arrowUpIcon
from
'@/asserts/icons/arrow_up.png'
import
arrowDownIcon
from
'@/asserts/icons/arrow_down.png'
import
sortIcon
from
'@/asserts/icons/sort_icon.png'
import
{
cloneDeep
}
from
'lodash'
import
styles
from
'./index.less'
...
...
@@ -91,7 +92,7 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newDataList
=
cloneDeep
(
dataList
)
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
id
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/shops/index.tsx
View file @
30ac8bbf
...
...
@@ -21,7 +21,7 @@ import arrowLeftIcon from '@/asserts/icons/arrow_left.png'
import
arrowUpIcon
from
'@/asserts/icons/arrow_up.png'
import
arrowDownIcon
from
'@/asserts/icons/arrow_down.png'
import
sortIcon
from
'@/asserts/icons/sort_icon.png'
import
{
cloneDeep
}
from
'lodash'
import
styles
from
'./index.less'
interface
DataItemType
{
...
...
@@ -58,7 +58,7 @@ const Shops: React.FC<ShopsPropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newDataList
=
cloneDeep
(
dataList
)
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
sort
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/showCase/index.tsx
View file @
30ac8bbf
...
...
@@ -17,6 +17,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import
{
formProduct
,
basicSchema
}
from
'./contant/schema'
import
{
PublicApi
}
from
'@/services/api'
import
tableColumn
from
'./contant/column'
import
{
cloneDeep
}
from
'lodash'
import
{
numFormat
,
priceFormat
}
from
'@/utils/numberFomat'
import
arrowRightIcon
from
'@/asserts/icons/arrow_right.png'
import
arrowLeftIcon
from
'@/asserts/icons/arrow_left.png'
...
...
@@ -89,7 +90,8 @@ const ShowCase: React.FC<ShowCasePropsType> = (props) => {
const
initDataList
=
()
=>
{
if
(
dataList
)
{
const
newDataList
=
dataList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
const
newList
=
cloneDeep
(
dataList
)
const
newDataList
=
newList
.
map
((
item
:
DataItemType
,
index
:
number
)
=>
{
item
.
id
=
index
+
1
item
.
expand
=
item
.
expand
||
false
return
item
...
...
src/pages/ruleSettingManage/memberAuthManage/detail.tsx
View file @
30ac8bbf
...
...
@@ -59,7 +59,7 @@ const SetMemberAuth: React.FC<{}> = () => {
const
actionRef
=
useRef
<
any
>
({})
const
formInitValue
=
nodeRecord
?
getTreeMaps
(
nodeRecord
.
key
)
:
null
const
[
formValue
,
setFormValue
]
=
useState
<
any
>
(
null
)
// 储存的按钮数据
const
[
buttonInfos
,
setButtonInfos
]
=
useState
<
any
>
([])
useEffect
(()
=>
{
...
...
@@ -143,6 +143,7 @@ const SetMemberAuth: React.FC<{}> = () => {
treeData=
{
treeData
}
handleSelect=
{
handleSelect
}
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
checkStrictly
/>
</
Col
>
...
...
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