Commit 7c60ea56 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-system into dev

parents c7ddc3ef cb6b1f5d
......@@ -21,6 +21,7 @@ import commentRoutes from './commentRoutes';
import contentRoute from './contentRoute'; // 内容管理
import balancedRoute from './balancedRoute'; // 平台结算管理
import capitalAccount from './capitalAccountRoute'; // 会员资金账户
import messageRoute from './messgeRoute'; // 消息管理
const routeList = [
pageCustomized,
calssPropertyRoute,
......@@ -37,6 +38,7 @@ const routeList = [
requisitionRoute,
enquiryOfferRoute,
capitalAccount,
messageRoute,
]
const router = [
......
/*
* 消息管理路由
*/
const router = {
path: '/message',
name: 'message',
icon: 'SmileOutlined',
hidePageHeader: true,
routes: [
{
path: '/message/messageList',
name: 'messageList',
component: '@/pages/message',
},
{
path: '/message/messageList/add',
name: 'addMessage',
hideInMenu: true,
component: '@/pages/message/addMessage',
},
]
}
export default router
......@@ -5,13 +5,13 @@
* @LastEditTime: 2020-08-31 18:59:18
* @Description: 状态 tag
*/
import React from 'react';
import React, { ReactNode } from 'react';
import classNames from 'classnames';
import styles from './index.less';
interface StatusTagProps {
type: 'success' | 'warnning' | 'default' | 'danger' | 'primary';
title: string;
title: string | ReactNode;
};
const StatusTag: React.FC<StatusTagProps> = ({ type, title }) => {
......
......@@ -196,5 +196,10 @@ export default {
'menu.capitalAccount.paymentWithdraw': '待支付提现',
'menu.capitalAccount.paymentDetails': '支付提现',
// 消息管理
'menu.message': '消息管理',
'menu.message.messageList': '消息列表',
'menu.message.addMessage': '新建消息',
}
// export default utils.transformDataPre(data, 'menu')
import React, { Component } from 'react';
class Home extends Component {
render() {
return (
<div
style={{
margin: '-24px',
}}
>
<img
src="https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/bc7f3a2385c0438bafcf1b74212cc7721601275065050.png"
width="100%"
height="auto"
/>
</div>
);
}
}
export default Home
import React from 'react';
import { Chart, Interval } from 'bizcharts';
interface IProps {
currentIndex: number,
}
const ColumnChart: React.FC<IProps> = (props) => {
const { currentIndex } = props
const data1 = [
{ day: '08-01', sales: 38 },
{ day: '08-02', sales: 52 },
{ day: '08-03', sales: 61 },
{ day: '08-04', sales: 45 },
{ day: '08-05', sales: 48 },
{ day: '08-06', sales: 38 },
{ day: '08-07', sales: 38 },
];
const data2 = [
{ day: '08-01', sales: 38 },
{ day: '08-02', sales: 52 },
{ day: '08-03', sales: 61 },
{ day: '08-04', sales: 45 },
{ day: '08-05', sales: 48 },
{ day: '08-06', sales: 38 },
{ day: '08-07', sales: 38 },
{ day: '08-08', sales: 38 },
{ day: '08-09', sales: 48 },
{ day: '08-10', sales: 23 },
{ day: '08-11', sales: 35 },
{ day: '08-12', sales: 54 },
{ day: '08-13', sales: 32 },
{ day: '08-14', sales: 45 },
{ day: '08-15', sales: 32 },
];
return (
<Chart height={302} autoFit data={currentIndex === 2 ? data2 : data1} >
<Interval position="day*sales" />
</Chart>
)
}
export default ColumnChart;
\ No newline at end of file
import React from 'react';
import {
Chart,
Geom,
Axis,
Tooltip,
Legend,
Annotation,
Guide
} from 'bizcharts';
const { Line } = Guide;
interface IProps {
currentIndex: number,
}
const LineChart: React.FC<IProps> = (props) => {
const { currentIndex } = props
const data1 = [
{
"month": "2020-07-13",
"city": "供应链",
"revenue": 1
},
{
"month": "2020-07-13",
"city": "采购商",
"revenue": 1.56
},
{
"month": "2020-07-13",
"city": "加工企业",
"revenue": 1.66
},
{
"month": "2020-07-14",
"city": "供应链",
"revenue": 0.35
},
{
"month": "2020-07-14",
"city": "采购商",
"revenue": 0.89
},
{
"month": "2020-07-14",
"city": "加工企业",
"revenue": 0.89
},
{
"month": "2020-07-15",
"city": "供应链",
"revenue": 0.19
},
{
"month": "2020-07-15",
"city": "采购商",
"revenue": 0.18
},
{
"month": "2020-07-15",
"city": "加工企业",
"revenue": 0.28
},
{
"month": "2020-07-16",
"city": "供应链",
"revenue": 1.2
},
{
"month": "2020-07-16",
"city": "采购商",
"revenue": 0.59
},
{
"month": "2020-07-16",
"city": "加工企业",
"revenue": 0.28
},
{
"month": "2020-07-17",
"city": "供应链",
"revenue": 1.52
},
{
"month": "2020-07-17",
"city": "采购商",
"revenue": 0.3583
},
{
"month": "2020-07-17",
"city": "加工企业",
"revenue": 0.35
},
{
"month": "2020-07-18",
"city": "供应链",
"revenue": 1.15
},
{
"month": "2020-07-18",
"city": "采购商",
"revenue": 1.025
},
{
"month": "2020-07-18",
"city": "加工企业",
"revenue": 1.28
},
{
"month": "2020-07-19",
"city": "供应链",
"revenue": 1.132
},
{
"month": "2020-07-19",
"city": "采购商",
"revenue": 1.15
},
{
"month": "2020-07-19",
"city": "加工企业",
"revenue": 0.26
},
];
const data2 = [
{
"month": "2020-07-13",
"city": "供应链",
"revenue": 1
},
{
"month": "2020-07-13",
"city": "采购商",
"revenue": 1.56
},
{
"month": "2020-07-13",
"city": "加工企业",
"revenue": 1.66
},
{
"month": "2020-07-14",
"city": "供应链",
"revenue": 0.35
},
{
"month": "2020-07-14",
"city": "采购商",
"revenue": 0.89
},
{
"month": "2020-07-14",
"city": "加工企业",
"revenue": 0.89
},
{
"month": "2020-07-15",
"city": "供应链",
"revenue": 0.19
},
{
"month": "2020-07-15",
"city": "采购商",
"revenue": 0.18
},
{
"month": "2020-07-15",
"city": "加工企业",
"revenue": 0.28
},
{
"month": "2020-07-16",
"city": "供应链",
"revenue": 1.2
},
{
"month": "2020-07-16",
"city": "采购商",
"revenue": 0.59
},
{
"month": "2020-07-16",
"city": "加工企业",
"revenue": 0.28
},
{
"month": "2020-07-17",
"city": "供应链",
"revenue": 1.52
},
{
"month": "2020-07-17",
"city": "采购商",
"revenue": 0.3583
},
{
"month": "2020-07-17",
"city": "加工企业",
"revenue": 0.35
},
{
"month": "2020-07-18",
"city": "供应链",
"revenue": 1.15
},
{
"month": "2020-07-18",
"city": "采购商",
"revenue": 1.025
},
{
"month": "2020-07-18",
"city": "加工企业",
"revenue": 1.28
},
{
"month": "2020-07-19",
"city": "供应链",
"revenue": 1.132
},
{
"month": "2020-07-19",
"city": "采购商",
"revenue": 1.15
},
{
"month": "2020-07-19",
"city": "加工企业",
"revenue": 0.26
},
];
const scale = {
"revenue": {
"range": [
0,
1
],
"ticks": [
0,
1,
2,
3,
4
]
},
"month": {
"range":[0.05, 0.95]
}
};
return (
<Chart height={360} data={currentIndex === 2 ? data2 : data1} scale={scale} forceFit>
<Legend position="top-left" />
<Axis name="month" />
<Axis
name="revenue"
label={{
formatter: val => `${val}%`,
}}
/>
<Tooltip
showCrosshairs
shared
/>
<Geom type="line" tooltip={['revenue*city', (value, name) => {
return {
value: `${value.toFixed(3)} %`,
name
}
}]} position="month*revenue" size={2} color={'city'} />
<Geom
type="point"
tooltip={false}
position="month*revenue"
size={4}
shape={'circle'}
color={'city'}
style={{
stroke: '#fff',
lineWidth: 1,
}}
/>
<Annotation.Text
position={['50%', '50%']}
alignX="middle"
alignY="middle"
html={`<div style="color:#8c8c8c;font-size:1.16em;text-align: center;width: 10em;">项目总数<br><span style="color:red;font-size:2.5em;">${200}</span></div>`}
/>
</Chart>
);
}
export default LineChart;
\ No newline at end of file
// home页面样式
.homeCard{
border-radius: 3px;
position: relative;
:global {
.ant-card-head-title{
font-size: 12px;
color: #909399;
}
}
.numberDesc{
font-size: 32px;
font-weight: 500;
color: #303133;
}
.numberIcon{
text-align: right;
position: absolute;
top: -10px;
right: 0px;
}
}
.lineDesc{
display: flex;
align-items: center;
margin-top: 14px;
position: relative;
img{
display: block;
width: 48px;
height: 48px;
margin: 24px 16px 24px 24px;
}
.lineDescText{
p{
margin-bottom: 8px;
line-height: 1;
}
.lineDescTitle{
font-size: 24px;
font-weight: 500;
color: #303133;
}
.lineDescTip{
font-size: 12px;
font-weight: 400;
color: #909399;
}
}
a{
position: absolute;
right: 30px;
}
}
.chartBox{
margin-top: 24px;
}
.sideListBox{
:global{
.ant-list-item-meta-title{
font-size: 24px;
font-weight: 500;
color: #303133;
}
}
}
.sideAdBox{
height: 100px;
margin: 22px 24px 13px;
border-radius: 5px;
background-color: #6C9CEB;
position: relative;
a{
font-size: 16px;
font-weight: 500;
color: #FFFFFF;
height: 100px;
line-height: 100px;
margin-left: 24px;
}
img{
position: absolute;
right: 0;
bottom: 0;
}
}
.commodityTotalTitle{
text-align: center;
span{
font-size: 12px;
font-weight: 400;
color: #909399;
}
p{
height: 72px;
font-size: 24px;
font-weight: 500;
color: #303133;
line-height: 72px;
}
}
.commodityTotalDesc{
display: flex;
flex: 1;
.aHalfOfWidth {
width: 50%;
}
}
// 便签样式
.notePaperBox{
width: 100%;
height: 248px;
background: #6C9CEB;
border-radius: 3px;
.notePaperContainer{
width: calc(100% - 2px);
height: 50%;
border-top: 0;
.noteGap{
width: 96%;
height: calc(30% - 1px);
text-align: center;
border-top: 1px dashed #c5c5c5;
margin: 0 auto;
position: relative;
&::before{
content: '';
width: 10px;
height: 10px;
position: absolute;
border-radius: 50%;
border-left: 1px solid #F4F5F7;
background-color: #F4F5F7;
position:absolute;
left: -11px;
top: -5px;
}
&::after{
content: '';
width: 10px;
height: 10px;
position: absolute;
border-radius: 50%;
border-left: 1px solid #F4F5F7;
background-color: #F4F5F7;
position:absolute;
right: -11px;
top: -5px;
}
}
.noteHeader{
p{
display: flex;
align-items: center;
padding: 20px 0 8px;
color: #FFFFFF;
font-size: 14px;
font-weight: 500;
img{
padding: 0 16px 0 20px;
}
}
}
.noteBody{
width: 100%;
height: 70%;
text-align: center;
p{
color: #fff;
font-size: 24px;
font-weight: 500;
a{
color: #fff;
font-size: 14px;
font-weight: 400;
}
}
}
}
}
.notePaperBoxGreen{
background-color: #41CC9E;
}
.feeCustomCard{
background-color: #fff;
border-radius: 3px;
height: 110px;
}
.dataRiskTip{
font-size: 12px;
font-weight: 400;
color: #909399;
}
.dataRiskAction{
display: flex;
> p{
width: 240px;
height: 48px;
background: #FAFBFC;
line-height: 48px;
margin-right: 24px;
> img{
margin: 8px 16px;
}
}
}
// 适配
@media screen and (max-width: 1441px) {
.homeCard{
.numberDesc{
font-size: 28px;
}
}
.notePaperBox{
.notePaperContainer{
.noteHeader{
p{
font-size: 12px;
img{
padding: 0;
margin: 0 4px;
width: 36px;
height: 36px;
}
span{
padding-right: 4px;
}
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
.normal {
}
.title {
font-size: 24px;
color: #666;
}
// 500 error
// .wrapper{
// }
.errorBox{
width: 100%;
.desc{
......@@ -23,4 +14,4 @@
width: 100%;
height: 100%;
}
}
}
\ No newline at end of file
import React, { useState, useEffect } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Button, Card, Space, Radio, Row, Col, Table, Tabs, Tag, Avatar, Image, List, Badge } from 'antd'
import cx from 'classnames'
import {history} from 'umi'
import NiceForm from '@/components/NiceForm'
import { createFormActions, FormButtonGroup, Reset, Submit } from '@formily/antd'
import styles from './index.less'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import ReutrnEle from '@/components/ReturnEle'
const addSchemaAction = createFormActions()
const AddMessage: React.FC<{}> = () => {
const {
pageStatus,
id
} = usePageStatus()
const handleSubmit = (val) => {
console.log(val, 'vvv')
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title="新建消息"
>
<Card>
<NiceForm
labelCol={4}
labelAlign="left"
wrapperCol={12}
editable={pageStatus !== PageStatus.PREVIEW}
actions={addSchemaAction}
schema={{
type: 'object',
properties: {
roleName: {
type: 'string',
title: '发送对象',
required: true,
},
remark: {
type: 'textarea',
title: '发送标题',
"x-rules": [
{
required: true,
},
{
limitByte: true,
maxByte: 120,
}
],
"x-component-props": {
rows: 4
}
},
role123: {
type: 'string',
title: '消息跳转链接',
required: true,
},
remark123: {
type: 'textarea',
title: '消息内容',
required: true,
"x-rules": [
{
required: true,
},
{
limitByte: true,
maxByte: 200
}
],
"x-component-props": {
rows: 4
}
},
}
}}
onSubmit={handleSubmit}
>
<FormButtonGroup offset={4}>
<Submit>发送</Submit>
<Button onClick={()=>history.goBack()}>取消</Button>
</FormButtonGroup>
</NiceForm>
</Card>
</PageHeaderWrapper>
);
}
export default AddMessage
\ No newline at end of file
.customList{
:global{
.ant-list-item-meta{
align-items: center;
}
}
.messageText{
font-size: 14px;
font-weight: 400;
color: #606266;
}
.messageTitle{
margin: 0 30px;
font-size: 14px;
font-weight: 500;
color: #303133;
}
}
\ No newline at end of file
import React, { useState, useEffect } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Button, Card, Space, Radio, Row, Col, Table, Tabs, Tag, Avatar, Image, List, Badge } from 'antd'
import cx from 'classnames'
import {history} from 'umi'
import styles from './index.less'
import StatusTag from '@/components/StatusTag'
import { PlusOutlined } from '@ant-design/icons'
//图标
import messageIcon1 from '../../asserts/home-icon-1.png'
import messageIcon2 from '../../asserts/home-icon-2.png'
import messageIcon3 from '../../asserts/home-icon-8.png'
const Message: React.FC<{}> = () => {
const data = [
{
id: 1,
icon: messageIcon1,
status: 'success',
type: '系统消息',
title: '订单发货',
message: '订单发货,请注意查收,清单发货,请注意查收!',
time: '2015-15-05',
},
{
id: 2,
icon: messageIcon2,
status: 'success',
type: '系统消息',
title: '订单收货',
message: '订单发货,请注意查收,清单发货,请注意查收!',
time: '2015-15-05',
},
{
id: 3,
icon: messageIcon1,
status: 'primary',
type: '系统消息',
title: '系统消息',
message: '账户异常,请注意账户资金安全!',
time: '2015-15-05',
},
{
id: 4,
icon: messageIcon3,
status: 'primary',
type: '系统消息',
title: '系统消息',
message: '账户支出300元,请注意账户资金安全!',
time: '2015-15-05',
},
];
const renderMessage = (data) => {
return (
<>
<StatusTag type={data.status} title={data.type} />
<span className={styles.messageTitle}>{data.title}</span>
<span className={styles.messageText}>{data.message}</span>
</>
)
}
const showTotal = (total) => {
return `共 ${total} 条`;
}
return (
<PageHeaderWrapper>
<Card>
<p>
<Button type="primary" icon={<PlusOutlined />} onClick={()=>history.push('/message/messageList/add')} >新建</Button>
</p>
<List
itemLayout="horizontal"
dataSource={data}
className={styles.customList}
pagination={{
onChange: page => {
console.log(page);
},
pageSize: 10,
size: "small",
showQuickJumper: true,
total: 4,
showTotal: showTotal
}}
renderItem={item => (
<List.Item>
<List.Item.Meta
avatar={<Avatar src={item.icon} />}
title={renderMessage(item)}
/>
<div>{item.time}</div>
</List.Item>
)}
/>
</Card>
</PageHeaderWrapper>
);
}
export default Message
\ No newline at end of file
import React, {Component} from 'react';
import { Button } from 'antd';
import styles from '../layouts/index.less';
import { inject, observer } from 'mobx-react'
import { ITestModule } from '@/module/testModule'
import { IStore } from '@/store';
import Loading from '@/components/Loading' // 测试loading组件
export interface ITestProps {
testStore?: ITestModule
}
@inject((store: IStore) => ({
testStore: store.testStore
}))
@observer
class Index extends Component<ITestProps, {}> {
render() {
const { testText, testNumber, testList,printInfo, setText, setNumber, getAsyncInfo } = this.props.testStore!
return <div>
{/* <Loading /> */}
<h3>{testText}|{testNumber}</h3>
<h3>{printInfo}</h3>
<h5>测试页面</h5>
<div>
<ul>
{
testList.length>0 && testList.map((item, index) => {
return (<li key={index}>{item}</li>)
})
}
</ul>
</div>
<Button onClick={() => {setText('调用mobx改变Text')}}>mobx改变Text</Button>
<Button onClick={() => {setNumber(10086)}}>mobx改变Number</Button>
<Button onClick={() => {getAsyncInfo()}}>mobx改变异步数据</Button>
</div>
}
}
export default Index
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