fix(amap):core

This commit is contained in:
wang_yp 2024-10-17 00:44:14 +08:00
parent cfbcbe31a1
commit 5941a69f96
3 changed files with 14 additions and 6 deletions

View File

@ -1,6 +1,7 @@
import OrgChart from "@/pages/OrgChart"; import OrgChart from "@/pages/OrgChart";
import origin from "@/static/orgin.png"; import origin from "@/static/orgin.png";
import origin2 from "@/static/orgin2.png"; import origin2 from "@/static/orgin2.png";
import ogr from "@/static/org_tow.png";
import { Modal } from "antd"; import { Modal } from "antd";
import { Store } from "antd/es/form/interface"; import { Store } from "antd/es/form/interface";
import { inject, observer } from "mobx-react"; import { inject, observer } from "mobx-react";
@ -8,6 +9,7 @@ import { useEffect, useState } from "react";
const Orgin = (props: Store) => { const Orgin = (props: Store) => {
const { homeStore } = props; const { homeStore } = props;
const [isModalOpen, setIsModalOpen] = useState<boolean>(false); const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
const [isSelf, setIsSelf] = useState<boolean>(false);
useEffect(() => { useEffect(() => {
homeStore.getOgCount(); homeStore.getOgCount();
@ -21,13 +23,19 @@ const Orgin = (props: Store) => {
}; };
return ( return (
<> <>
<div className="orgin-content" onClick={showModal}> <div className="orgin-content">
<div className="po"> <div className="po" onClick={()=>{
setIsSelf(true)
showModal()
}}>
<span>{homeStore.ogMap?.count ?? 0}</span> <span>{homeStore.ogMap?.count ?? 0}</span>
<img src={origin} alt="" /> <img src={origin} alt="" />
<p></p> <p></p>
</div> </div>
<div className="po"> <div className="po" onClick={()=>{
setIsSelf(false)
showModal()
}}>
<span>{homeStore.ogMap?.member_count ?? 0}</span> <span>{homeStore.ogMap?.member_count ?? 0}</span>
<img src={origin2} alt="" /> <img src={origin2} alt="" />
<p></p> <p></p>
@ -43,7 +51,7 @@ const Orgin = (props: Store) => {
onCancel={handleCancel} onCancel={handleCancel}
footer={null} footer={null}
> >
<OrgChart /> {isSelf ? <OrgChart /> : <img alt="org" src={ogr} width={"100%"} />}
</Modal> </Modal>
</> </>
); );

View File

@ -46,7 +46,7 @@ const Trainings = (props: Store) => {
{ title: "任务结束时间", dataIndex: "end_time" ,width:200}, { title: "任务结束时间", dataIndex: "end_time" ,width:200},
{ title: "任务积分设置", dataIndex: "score" ,width:200}, { title: "任务积分设置", dataIndex: "score" ,width:200},
{ title: "任务类别", dataIndex: "category_name",width:200 }, { title: "任务类别", dataIndex: "category_name",width:200 },
{ title: "任务状态", dataIndex: "status",render: (status) => status===1?"已完成":"未完成",width:200}, { title: "任务状态", dataIndex: "status",render: (status) => status===2?"已完成":"未完成",width:200},
{ title: "物资归还状态",width:200, dataIndex: "supplies_status",render: (supplies_status) => supplies_status===2?"已归还":"未归还"}, { title: "物资归还状态",width:200, dataIndex: "supplies_status",render: (supplies_status) => supplies_status===2?"已归还":"未归还"},
{ {
title: "操作", title: "操作",
@ -65,7 +65,7 @@ const Trainings = (props: Store) => {
</Button> </Button>
{ {
record.status===0 ?<Button record.status !==2 ?<Button
type="dashed" type="dashed"
size="small" size="small"
onClick={() => { onClick={() => {

BIN
src/static/org_tow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB