diff --git a/src/api/bi/index.js b/src/api/bi/index.js index 7a9d15d..690143c 100644 --- a/src/api/bi/index.js +++ b/src/api/bi/index.js @@ -58,5 +58,9 @@ export const getCorpInfoCorpUserStatisticPage = declareRequest( ); export const getCorpInfoListAll = declareRequest( "biFullLoading", - "Get > /basicInfo/corpInfo/listAll", + "Post > @/basicInfo/corpInfo/corpListAll", +); +export const getFirePointDeviceList = declareRequest( + "xiaoFangFirePointDeviceListLoading", + "Post > @/fireCheck/firePoint/deviceList", ); diff --git a/src/pages/Container/Map/components/Content/port/Index/PersonnelStatsPanel/index.js b/src/pages/Container/Map/components/Content/port/Index/PersonnelStatsPanel/index.js index 5c80f96..6d09f94 100644 --- a/src/pages/Container/Map/components/Content/port/Index/PersonnelStatsPanel/index.js +++ b/src/pages/Container/Map/components/Content/port/Index/PersonnelStatsPanel/index.js @@ -19,6 +19,7 @@ function PersonnelStatsPanel(props) { const [isVisible, setIsVisible] = useState(false); const loadStatistics = async (enterpriseType) => { + setIsVisible(false); const { data } = await props.getCorpInfoCorpUserStatisticPage({ portArea, enterpriseType, @@ -31,7 +32,6 @@ function PersonnelStatsPanel(props) { if (index === activeTab) return; - setIsVisible(false); setActiveTab(index); loadStatistics(index === 0 ? 2 : 3); }; diff --git a/src/pages/Container/Map/components/Content/port/XiaoFang/index.js b/src/pages/Container/Map/components/Content/port/XiaoFang/index.js index 96931c1..3435740 100644 --- a/src/pages/Container/Map/components/Content/port/XiaoFang/index.js +++ b/src/pages/Container/Map/components/Content/port/XiaoFang/index.js @@ -1,89 +1,33 @@ -import { Button, Form, Input, Select, Space } from "antd"; -import { useContext, useState } from "react"; +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Input, Space, Spin } from "antd"; +import { useContext, useEffect, useState } from "react"; import SeamlessScroll from "zy-react-library/components/SeamlessScroll"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import { NS_BI } from "~/enumerate/namespace"; import Title from "~/pages/Container/Map/components/Content/port/Title"; import { Context } from "~/pages/Container/Map/js/context"; import "./index.less"; -const { Option } = Select; - -const XiaoFang = () => { - const { currentPort, portArea, currentBranchOffice } = useContext(Context); +const XiaoFang = (props) => { + const { portArea } = useContext(Context); const [form] = Form.useForm(); - const [deviceTypeList, setDeviceTypeList] = useState([ - { name: "地下消防栓栓体", bianma: "dxxfsst" }, - { name: "红色灭火器", bianma: "b9561bbc6243bfac6ebe0397a62f55" }, - { name: "灭火毯", bianma: "mgt" }, - { name: "并盖", bianma: "jg001" }, - { name: "消防枪头", bianma: "xfqt001" }, - { name: "强化水灭火器", bianma: "qhsmhq001" }, - { name: "灭火器托架", bianma: "mhqtj001" }, - { name: "消防箱", bianma: "xfx001" }, - { name: "干粉灭火器", bianma: "xfsb001" }, - { name: "二氧化碳灭火器", bianma: "ryhrmhq01" }, - { name: "消防栓", bianma: "243bfac6ebe0397a62f55" }, - { name: "水基型灭火器", bianma: "sjxmhq01" }, - { name: "消防水带", bianma: "xfsd01" }, - { name: "水枪", bianma: "shuiq" }, - { name: "消防栓箱体", bianma: "xfxxt" }, - { name: "灭火器箱", bianma: "mhqx01" }, - { name: "消防桶", bianma: "xft01" }, - { name: "消防锹", bianma: "xgq01" }, - { name: "消防斧", bianma: "xff01" }, - { name: "消防钩", bianma: "xfg01" }, - { name: "水枪、水带接口", bianma: "sdsddj" }, - { name: "消防二分水器", bianma: "scrfsq" }, - { name: "消防栓扳手", bianma: "xfsbs" }, - { name: "强光照明灯", bianma: "qgzmd" }, - { name: "铁铤", bianma: "tx" }, - { name: "消防头盔", bianma: "xftk" }, - { name: "消防员灭火防护服", bianma: "xfymhf" }, - { name: "消防手套", bianma: "xfst" }, - { name: "消防安全腰带、消防腰带、斧套", bianma: "xfanyd" }, - { name: "消防员灭火防护靴", bianma: "xfymhhx" }, - { name: "消防轻型安全绳", bianma: "xfqxaqs" }, - { name: "消防过滤式综合防毒面具", bianma: "xfglszhfdmj" }, - { name: "多功能水枪", bianma: "dgnsq" }, - { name: "消防呼吸面罩", bianma: "xfhxmz" }, - { name: "微型消防站柜子", bianma: "wxxfzgz" }, - { name: "七氟丙烷灭火器", bianma: "qfbwmhq" }, - { name: "水泵接合器", bianma: "38" }, - { name: "消防器材箱", bianma: "xfsx" }, - { name: "消防砂", bianma: "xfs" }, - { name: "泡沫枪", bianma: "poameqiang" }, - { name: "移动消防水炮", bianma: "yidongxiaofangshuipao" }, - { name: "移动泡沫炮", bianma: "yidongpaomenpao" }, - ]); - const [block2List, setBlock2List] = useState([ - { FIRE_DEVICE_TYPE_NAME: "干粉灭火器", FIRE_POINT_NAME: "浴池男更衣室楼梯", COUNT: 3 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "综合楼一楼东", COUNT: 2 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队二层警容镜旁", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "一中队二层西", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "二中队二层楼道东", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "一中队二层东", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队二层更衣室门前", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队车库器材室门前", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队一层车库楼梯口东侧", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队一层车库楼梯口东侧", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队燃料间", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "二中队二层楼道西", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "二中队老楼车库", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "三中队三层楼道", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "一中队车棚东南角", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "一中队厨房门南侧", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "一中队一层东", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "二中队一层车库东", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "一中队一层西", COUNT: 1 }, - { FIRE_DEVICE_TYPE_NAME: "灭火器箱", FIRE_POINT_NAME: "二中队三层楼道西", COUNT: 1 }, - ]); + const [block2List, setBlock2List] = useState([]); + const [isVisible, setIsVisible] = useState(true); - const handleReset = () => { - form.resetFields(); - form.submit(); + const getData = async (values) => { + setIsVisible(false); + const { data } = await props.getFirePointDeviceList({ portArea, ...values }); + setBlock2List(data); + setIsVisible(true); }; - const handleQuery = (values) => { - console.log(values); + useEffect(() => { + getData(); + }, []); + + const onReset = () => { + form.resetFields(); + form.submit(); }; return ( @@ -91,23 +35,44 @@ const XiaoFang = () => {