Commit c1314d42 authored by tjy's avatar tjy

调整页面,新增会员维护

parent d9900e69
/********************************** 布局 ******************************************/ /********************************** 布局 ******************************************/
@import './mixins/layout.less'; @import './mixins/layout.less';
@makeCenters: text, block, flex, flexAlign, flexJustify, absolute, fixed, margin; @makeCenters : text,
block,
flex,
flexAlign,
flexJustify,
absolute,
fixed,
margin;
@makeCentersLen: length(@makeCenters); @makeCentersLen: length(@makeCenters);
.loopCenter(@list, @i: 1, @val: extract(@list, @i)) when (@i < @makeCentersLen + 1) { .loopCenter(@list, @i: 1, @val: extract(@list, @i)) when (@i < @makeCentersLen + 1) {
.center-@{val} { .center-@{val} {
.make-center(@val); .make-center(@val);
} }
.loopCenter(@list, @i + 1) .loopCenter(@list, @i + 1)
}; }
;
.loopCenter(@makeCenters); .loopCenter(@makeCenters);
// antd default // antd default
h1, h2, h3, h4, h5, h6 { h1,
h2,
h3,
h4,
h5,
h6 {
color: #6B778C; color: #6B778C;
} }
.@{prefix}-margin_content { .@{prefix}-margin_content {
.center-margin; .center-margin;
width: 1190px; width: 1190px;
...@@ -30,19 +45,20 @@ h1, h2, h3, h4, h5, h6 { ...@@ -30,19 +45,20 @@ h1, h2, h3, h4, h5, h6 {
// 公共的title伪类竖线 // 公共的title伪类竖线
.commonPanelTitle { .commonPanelTitle {
padding-left: 8px; padding-left: 8px;
position: relative; position : relative;
&::before { &::before {
content: ""; content : "";
display: inline-block; display : inline-block;
position: absolute; position : absolute;
left: 0; left : 0;
top: 50%; top : 50%;
margin-top: -.42667rem; margin-top : -.42667rem;
width: 2px; width : 2px;
height: .85333rem; height : .85333rem;
background-color: @primary-color; background-color: @primary-color;
box-shadow: 0 0.14933rem 0.256rem 0 rgba(97,144,232,.2); box-shadow : 0 0.14933rem 0.256rem 0 rgba(97, 144, 232, .2);
border-radius: 1px; border-radius : 1px;
} }
} }
...@@ -50,49 +66,63 @@ h1, h2, h3, h4, h5, h6 { ...@@ -50,49 +66,63 @@ h1, h2, h3, h4, h5, h6 {
.commonShowBlock { .commonShowBlock {
display: block; display: block;
} }
.commonShow { .commonShow {
display: inline-block; display: inline-block;
} }
.commonHide { .commonHide {
display: none; display: none;
} }
// 公共着色 主体颜色 // 公共着色 主体颜色
.commonPickColor{ .commonPickColor {
color: @main-color; color: @main-color;
} }
// 公共状态 圆点 // 公共状态 圆点
.commonStatus { .commonStatus {
display: inline-block; display : inline-block;
width:8px; width : 8px;
height:8px; height : 8px;
margin-right: 6px; margin-right : 6px;
border-radius: 50%; border-radius : 50%;
vertical-align: middle; vertical-align: middle;
} }
.commonStatusStop{
.commonStatusStop {
.commonStatus(); .commonStatus();
background-color: @status-stop; // 停用 background-color: @status-stop; // 停用
} }
.commonStatusModify{
.commonStatusModify {
.commonStatus(); .commonStatus();
background-color: @status-modify; // 已修改 background-color: @status-modify; // 已修改
} }
.commonStatusValid{
.commonStatusValid {
.commonStatus();
background-color: @status-valid; // 已生成,有效、审核通过
}
.commonStatusInvalid {
.commonStatus(); .commonStatus();
background-color: @status-valid; // 有效、已生成 background-color: @status-invalid; // 未生成,无效、待审核
} }
.commonStatusInvalid{
.commonStatusNoPass {
.commonStatus(); .commonStatus();
background-color: @status-invalid; // 无效、未生成 background-color: @status-nopass; // 审核不通过
} }
.mb-30{ .mb-30 {
margin-bottom: 30px; margin-bottom: 30px;
} }
.sc-fzpans { .sc-fzpans {
display: block; display: block;
width: 100%; width : 100%;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@prefix: lingxi-business; @prefix: lingxi-business;
// layout // layout
@header-nav-height: 64px; @header-nav-height : 64px;
@layout-min-content-height: 100vh; @layout-min-content-height: 100vh;
/** /**
...@@ -18,12 +18,13 @@ ...@@ -18,12 +18,13 @@
// layout // layout
@header-global-nav-bg: #38414A; @header-global-nav-bg: #38414A;
@menu-select-color: rgba(0, 0, 0, 0.85); @menu-select-color : rgba(0, 0, 0, 0.85);
@menu-select-bg: rgba(0,0,0,.02); @menu-select-bg : rgba(0, 0, 0, .02);
@menu-circle-color: #D8DEE4; @menu-circle-color : #D8DEE4;
// status circle color // status circle color
@status-stop: #C1C7D0; // 停用 @status-stop : #C1C7D0; // 停用
@status-modify: #669EDE; //已修改 @status-modify : #669EDE; // 已修改、待提交
@status-valid: #41CC9E; // 已生成,有效 @status-valid : #41CC9E; // 已生成,有效、审核通过
@status-invalid: #FFC400; // 未生成,无效 @status-invalid: #FFC400; // 未生成,无效、待审核
\ No newline at end of file @status-nopass: #EF6260; // 审核不通过
\ No newline at end of file
...@@ -73,7 +73,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -73,7 +73,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : [] const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : []
const menuRouter = getMenuRouter(menuData, location.pathname) const menuRouter = getMenuRouter(menuData, location.pathname)
console.log(menuData)
useEffect(() => { useEffect(() => {
if (menuRouter && menuRouter.children) { if (menuRouter && menuRouter.children) {
......
This diff is collapsed.
.nameCell { .col {
margin-bottom: 16px;
&:nth-last-of-type(1) {
text-align: right;
}
}
.select {
width : 160px;
margin : 0 0 16px 16px;
text-align: left;
&:nth-of-type(1) {
margin-left: 0;
}
}
.nameCell {
text-align: left; text-align: left;
.nameCellTitle {
color : @main-color;
cursor: pointer;
}
.levelIcon1 { .levelIcon1 {
width : 100%; width : 100%;
height : 16px; height : 16px;
...@@ -24,13 +46,13 @@ ...@@ -24,13 +46,13 @@
background-size: 54px 16px; background-size: 54px 16px;
margin-top : 8px; margin-top : 8px;
} }
} }
.importBtn { .importBtn {
margin: 0 16px; margin: 0 16px;
} }
.headerTop { .headerTop {
display : flex; display : flex;
align-items: center; align-items: center;
...@@ -45,9 +67,37 @@ ...@@ -45,9 +67,37 @@
margin-left: 16px; margin-left: 16px;
} }
} }
} }
.saveBtn { .saveBtn {
color : #fff; color : #fff;
background: @main-color background: @main-color
} }
\ No newline at end of file
.address {
display: flex;
&-addition {
display : inline-block;
width : 32px;
height : 32px;
text-align : center;
margin-left : 24px;
border : 1px solid #EBFBFC;
border-radius: 2px;
cursor : pointer;
overflow : hidden;
&:hover {
background-color: #00B37A;
border : 0;
color : #fff;
}
&-icon {
width : 20px;
height: 20px;
color : '#6B778C';
}
}
}
\ No newline at end of file
This diff is collapsed.
...@@ -141,7 +141,7 @@ const addEquity: React.FC<[]> = () => { ...@@ -141,7 +141,7 @@ const addEquity: React.FC<[]> = () => {
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => window.history.back()} onBack={() => window.history.back()}
title={[ title={
<> <>
<div className='headerTop'> <div className='headerTop'>
<div className='headerTop-icon'></div> <div className='headerTop-icon'></div>
...@@ -149,8 +149,8 @@ const addEquity: React.FC<[]> = () => { ...@@ -149,8 +149,8 @@ const addEquity: React.FC<[]> = () => {
<div className='headerTop-identity'>商户会员</div> <div className='headerTop-identity'>商户会员</div>
</div> </div>
</> </>
]} }
content={[ content={
<div className='headerMain'> <div className='headerMain'>
<div className='headerMain-left'> <div className='headerMain-left'>
<div className='headerMain-left-option'> <div className='headerMain-left-option'>
...@@ -182,7 +182,7 @@ const addEquity: React.FC<[]> = () => { ...@@ -182,7 +182,7 @@ const addEquity: React.FC<[]> = () => {
<Button className='saveBtn' icon={<ContainerOutlined />}>保存</Button> <Button className='saveBtn' icon={<ContainerOutlined />}>保存</Button>
</div> </div>
</div> </div>
]} }
> >
<Card> <Card>
<StandardTable <StandardTable
......
.row { .col {
display : flex;
justify-content: flex-end;
box-sizing : border-box;
.col {
padding : 0 8px;
margin-bottom: 12px; margin-bottom: 12px;
} text-align : right;
}
.resetBtn {
margin-left: 16px;
} }
.headerMain { .headerMain {
...@@ -54,9 +52,10 @@ ...@@ -54,9 +52,10 @@
} }
} }
.nameCellTitle {
color : @main-color;
cursor: pointer;
}
.levelIcon1 { .levelIcon1 {
width : 100%; width : 100%;
......
import React, { ReactNode, useState, useRef } from 'react' import React, { ReactNode, useState, useRef, useEffect } from 'react'
import { history } from 'umi' import { history } from 'umi'
import { Row, Col, Button, Popconfirm, Card, Input } from 'antd' import { Row, Col, Tooltip, Button, Popconfirm, Card, Input } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { import { PlayCircleOutlined, PauseCircleOutlined, EyeOutlined } from '@ant-design/icons'
UpOutlined,
DownOutlined,
PlayCircleOutlined,
EyeOutlined
} from '@ant-design/icons'
import { StandardTable } from 'god' import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import './index.less' import style from './index.less'
interface Item {
key: string;
id: string;
level: string;
levelTab: string;
levelType: string;
scoreTab: string;
name: string;
type: string;
roleType: string;
thresvalue: string;
status: number;
}
const data = [ const data = [
{ {
...@@ -82,8 +63,8 @@ const data = [ ...@@ -82,8 +63,8 @@ const data = [
] ]
const memberLevel: React.FC<[]> = () => { const memberLevel: React.FC<[]> = () => {
let [isSearch, setIsSearch] = useState(false)
const ref = useRef({}) const ref = useRef({})
const [keywords, setKeywords] = useState('')
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...@@ -97,14 +78,14 @@ const memberLevel: React.FC<[]> = () => { ...@@ -97,14 +78,14 @@ const memberLevel: React.FC<[]> = () => {
dataIndex: 'level', dataIndex: 'level',
align: 'center', align: 'center',
key: 'level', key: 'level',
render: (text: any, record: any) => <div className={`levelIcon${record.level}`}></div> render: (text: any, record: any) => <div className={style[`levelIcon${record.level}`]}></div>
}, },
{ {
title: '会员等级标签', title: '会员等级标签',
dataIndex: 'levelTab', dataIndex: 'levelTab',
align: 'center', align: 'center',
key: 'levelTab', key: 'levelTab',
render: (text: any, record: any) => <span className="commonPickColor" onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></span> render: (text: any, record: any) => <span className={style.nameCellTitle} onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></span>
}, },
{ {
title: '会员等级类型', title: '会员等级类型',
...@@ -157,7 +138,25 @@ const memberLevel: React.FC<[]> = () => { ...@@ -157,7 +138,25 @@ const memberLevel: React.FC<[]> = () => {
okText="是" okText="是"
cancelText="否" cancelText="否"
> >
<Button type="link" onClick={() => handleModify(record)} style={record.status === 1 ? { color: '#00B37A' } : { color: 'red' }}>{record.status === 1 ? '有效' : '无效'} <PlayCircleOutlined /></Button> <Button
type='link'
onClick={() => handleModify(record)}
style={record.status === 1 ?
{ color: '#00B37A' } : { color: 'red' }}
>
{
record.status === 1 ?
<>
<span>有效</span>
<PlayCircleOutlined />
</>
:
<>
<span>无效</span>
<PauseCircleOutlined />
</>
}
</Button>
</Popconfirm> </Popconfirm>
) )
return component return component
...@@ -185,6 +184,10 @@ const memberLevel: React.FC<[]> = () => { ...@@ -185,6 +184,10 @@ const memberLevel: React.FC<[]> = () => {
}) })
} }
useEffect(() => {
console.log(keywords)
})
const handleSee = (record: any) => { const handleSee = (record: any) => {
} }
...@@ -202,13 +205,9 @@ const memberLevel: React.FC<[]> = () => { ...@@ -202,13 +205,9 @@ const memberLevel: React.FC<[]> = () => {
console.log('执行状态修改', record) console.log('执行状态修改', record)
} }
const handleSearch = (val: string) => { const handleSearch = () => { }
console.log(val)
}
const handleReset = () => { const handleReset = () => { }
}
const handleSet = (record: any) => { const handleSet = (record: any) => {
history.push('/memberCenter/memberAbility/manage/level/addEquity') history.push('/memberCenter/memberAbility/manage/level/addEquity')
...@@ -222,29 +221,23 @@ const memberLevel: React.FC<[]> = () => { ...@@ -222,29 +221,23 @@ const memberLevel: React.FC<[]> = () => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
controlRender={ controlRender={
<Row className='row'> <Row>
<Col className='col' span={4}> <Col className={style.col} span={12} offset={12}>
<Input.Search placeholder="搜索" onSearch={(val) => handleSearch(val)} /> <Tooltip
</Col> trigger={['focus']}
<Col className='col'> placement="top"
<Button onClick={() => setIsSearch(isSearch = !isSearch)}>高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />}</Button> title={<span>输入ID、会员等级、会员角色名称&nbsp;&nbsp;进行搜索</span>}
</Col> >
<Col className='col'> <Input.Search
<Button onClick={() => handleReset()}>重置</Button> style={{ width: '232px' }}
</Col> value={keywords}
{ placeholder="搜索"
isSearch ? onChange={(e) => setKeywords(e.target.value)}
<Col span={24} className='row'> onSearch={() => handleSearch}
<Col className='col' span={4}> />
<Input placeholder="会员等级标签"></Input> </Tooltip>
</Col> <Button className={style.resetBtn} onClick={() => handleReset()}>重置</Button>
<Col className='col' span={4}>
<Input placeholder="会员角色名称"></Input>
</Col>
</Col> </Col>
:
''
}
</Row> </Row>
} }
/> />
......
.nameCell {
text-align: left;
.nameCellTitle {
color : @main-color;
cursor: pointer;
}
.levelIcon1 {
width : 100%;
height : 16px;
background : url("../../../assets/imgs/level1@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
.levelIcon2 {
width : 100%;
height : 16px;
background : url("../../../assets/imgs/level2@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
.levelIcon3 {
width : 100%;
height : 16px;
background : url("../../../assets/imgs/level3@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
}
.col {
margin : 0 16px 16px 0;
&-open {
color : #fff;
background-color: #6B778C;
}
&-close {
color : #595959;
background-color: #fff;
}
}
.selectBtn {
margin: 0 16px;
}
.select {
width : 160px;
margin: 0 16px 16px 0;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment