提交 84a02c0a 作者: 龚洪江

Merge branch 'develop'

...@@ -14,4 +14,4 @@ patches: ...@@ -14,4 +14,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: 082304f0fc4d7b6f9a14d945cc2fdbfadd17e737 newTag: 72aefa215ad35ffd5c849a04f6c037c7089e9d20
...@@ -55,42 +55,42 @@ export type userJoinReportDataType = InterFunction< ...@@ -55,42 +55,42 @@ export type userJoinReportDataType = InterFunction<
/** /**
* 品牌商 * 品牌商
*/ */
brandStore?: number; brandStore: number;
/** /**
* 入驻商家总数 * 入驻商家总数
*/ */
joinStoreCount?: number; joinStoreCount: number;
/** /**
* 出租商品 * 出租商品
*/ */
leaseProduct?: number; leaseProduct: number;
/** /**
* 租赁商 * 租赁商
*/ */
leaseStore?: number; leaseStore: number;
/** /**
* 在线课程 * 在线课程
*/ */
onlineCourse?: number; onlineCourse: number;
/** /**
* 维修商 * 维修商
*/ */
repairStore?: number; repairStore: number;
/** /**
* 销售商品 * 销售商品
*/ */
saleProduct?: number; saleProduct: number;
/** /**
* 服务商品 * 服务商品
*/ */
serviceProduct?: number; serviceProduct: number;
/** /**
* 服务商 * 服务商
*/ */
serviceStore?: number; serviceStore: number;
/** /**
* 培训机构 * 培训机构
*/ */
trainingInstitution?: number; trainingInstitution: number;
} }
>; >;
...@@ -9,10 +9,10 @@ export class DataDashboardsAPI { ...@@ -9,10 +9,10 @@ export class DataDashboardsAPI {
// 数据看板-用户概况 // 数据看板-用户概况
static getUserReportData: userReportDataType = () => static getUserReportData: userReportDataType = () =>
axios.get('/userapp/user/report/getUserReportData'); axios.get('/userapp/user/report/getUserReportData');
// 数据看板-信息发布 // 数据看板-信息发布
static getReleaseReportData: releaseReportDataType = () => static getReleaseReportData: releaseReportDataType = () =>
axios.get('/release/release/report/getReleaseReportData'); axios.get('/release/report/getReleaseReportData');
// 数据看板-加盟信息 // 数据看板-加盟信息
static getUserJoinReportData: userJoinReportDataType = () => static getUserJoinReportData: userJoinReportDataType = () =>
axios.get('/pms/product/report/getUserReportData'); axios.get('/pms/product/report/getProductReportData');
} }
...@@ -9,17 +9,48 @@ import { userJoinReportDataType } from '~/api/interface/dataDashboardsType'; ...@@ -9,17 +9,48 @@ import { userJoinReportDataType } from '~/api/interface/dataDashboardsType';
type joinReportDataType = InterDataType<userJoinReportDataType>; type joinReportDataType = InterDataType<userJoinReportDataType>;
const JoinInfo = () => { const JoinInfo = () => {
const [joinReportDataType, setJoinReportDataType] = useState<joinReportDataType>(); const [joinReportDataType, setJoinReportDataType] = useState<joinReportDataType>();
const [listingProducts, setListingProducts] = useState<{ label: string; value: number }[]>([]);
// 上架商品总数
const [totalCount, setTotalCount] = useState<number>(0);
// 数据看板-加盟信息 // 数据看板-加盟信息
const getUserJoinReportData = () => { const getUserJoinReportData = () => {
DataDashboardsAPI.getUserJoinReportData().then(({ result }) => { DataDashboardsAPI.getUserJoinReportData().then(({ result }) => {
if (result) { if (result) {
setJoinReportDataType(result); setJoinReportDataType(result);
setTotalCount(
result.leaseProduct + result.onlineCourse + result.saleProduct + result.serviceProduct,
);
setListingProducts([
{
label: '售卖商品',
value: result.saleProduct,
},
{
label: '出租商品',
value: result.leaseProduct,
},
{
label: '服务商品',
value: result.serviceProduct,
},
{
label: '在线课程',
value: result.onlineCourse,
},
]);
initEchartsPie([
{ value: result.brandStore, name: '品牌商' },
{ value: result.repairStore, name: '维修商' },
{ value: result.trainingInstitution, name: '培训机构' },
{ value: result.serviceStore, name: '服务商' },
{ value: result.leaseStore, name: '租赁商' },
]);
} }
}); });
}; };
// 初始化饼图 // 初始化饼图
const initEchartsPie = () => { const initEchartsPie = (data: { value: number; name: string }[]) => {
const myChart = echarts.init(document.getElementById('pie')); const myChart = echarts.init(document.getElementById('pie'));
myChart.setOption({ myChart.setOption({
tooltip: { tooltip: {
...@@ -38,13 +69,7 @@ const JoinInfo = () => { ...@@ -38,13 +69,7 @@ const JoinInfo = () => {
}, },
}, },
}, },
data: [ data,
{ value: 40, name: '品牌商' },
{ value: 38, name: '维修商' },
{ value: 32, name: '培训机构' },
{ value: 30, name: '服务商' },
{ value: 28, name: '租赁商' },
],
}, },
], ],
}); });
...@@ -54,7 +79,6 @@ const JoinInfo = () => { ...@@ -54,7 +79,6 @@ const JoinInfo = () => {
}; };
useEffect(() => { useEffect(() => {
initEchartsPie();
getUserJoinReportData(); getUserJoinReportData();
}, []); }, []);
return ( return (
...@@ -74,18 +98,22 @@ const JoinInfo = () => { ...@@ -74,18 +98,22 @@ const JoinInfo = () => {
<div className='card-header'> <div className='card-header'>
<div className='card-header-icon'></div> <div className='card-header-icon'></div>
<div className='card-header-title'>上架商品 (SKU)</div> <div className='card-header-title'>上架商品 (SKU)</div>
<div className='sku-count'>2400</div> <div className='sku-count'>{totalCount}</div>
</div> </div>
<div className='card-progress'> <div className='card-progress'>
<div className='progress-item'> {listingProducts.map((v, i) => (
<div className='progress-item-label'>售卖商品</div> <div className='progress-item' key={i}>
<div className='progress-item-info'> <div className='progress-item-label'>{v.label}</div>
<Progress percent={30} strokeColor='#F4872A' showInfo={false} /> <div className='progress-item-info'>
<Progress
percent={(v.value / totalCount) * 100}
strokeColor='#F4872A'
showInfo={false}
/>
</div>
<div className='progress-item-value'>{v.value}</div>
</div> </div>
<div className='progress-item-value'>122</div> ))}
</div>
<div className='progress-item'></div>
<div className='progress-item'></div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -18,6 +18,7 @@ import UploadPayment from '~/pages/orderManage/procurementOrder/orderList/compon ...@@ -18,6 +18,7 @@ import UploadPayment from '~/pages/orderManage/procurementOrder/orderList/compon
import ApprovalOrder from '~/components/order/productOrder/approvalOrder'; import ApprovalOrder from '~/components/order/productOrder/approvalOrder';
import ShipmentsOrder from '~/components/order/productOrder/shipmentsOrder'; import ShipmentsOrder from '~/components/order/productOrder/shipmentsOrder';
import RemarkModal from './components/remarkModal'; import RemarkModal from './components/remarkModal';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { CommentOutlined } from '@ant-design/icons'; import { CommentOutlined } from '@ant-design/icons';
......
...@@ -437,7 +437,10 @@ function ProductOrderView() { ...@@ -437,7 +437,10 @@ function ProductOrderView() {
searchData={onFinish} searchData={onFinish}
sufFixBtn={ sufFixBtn={
<> <>
{tranStatusList?.map((i, j) => { {(userInfo.companyInfoVO.companyType === 0
? tranStatusList
: tranStatusList.filter((v) => ![200, 300, 420].includes(v.value as number))
)?.map((i, j) => {
return ( return (
<Button <Button
key={j} key={j}
......
...@@ -229,18 +229,18 @@ export const whiteRouterList: Array<RouteObject & RouteObjectType> = [ ...@@ -229,18 +229,18 @@ export const whiteRouterList: Array<RouteObject & RouteObjectType> = [
// 路由数组 // 路由数组
export const routerList: Array<RouteObjectType> = [ export const routerList: Array<RouteObjectType> = [
// { {
// path: '/dataDashboards', path: '/dataDashboards',
// element: withLoadingComponent(<DataBoardView />), element: withLoadingComponent(<DataBoardView />),
// errorElement: <ErrorPage />, errorElement: <ErrorPage />,
// meta: { meta: {
// icon: <BarChartOutlined />, icon: <BarChartOutlined />,
// title: '数据看板', title: '数据看板',
// id: 300, id: 300,
// hidden: true, hidden: true,
// develop: true, develop: true,
// }, },
// }, },
{ {
path: '/customManage', path: '/customManage',
element: <LayoutView />, element: <LayoutView />,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论