<template> <!-- 防汛物资 --> <div class="floodWZPage"> <div class="partTitleHM">防汛物资</div> <div class="partContHM"> <div class="scrollMapHM" @click="ChartBar3DClick"> <ChartBar3D :refresh="refresh" :echartData="echartData"></ChartBar3D> </div> </div> <el-dialog :title="title" v-model="open" width="1200px" append-to-body :close-on-click-modal="false"> <el-table :data="dataList" v-loading="loading" stripe> <el-table-column type="index" width="55" label="序号" /> <el-table-column label="物资储备地点" prop="specificLocation" /> <el-table-column label="具体位置" prop="address" /> <el-table-column label="主要储备物资" prop="materialDetails" width="600" /> <el-table-column label="负责人" prop="header" /> <el-table-column label="联系方式" prop="headerPhone" /> </el-table> </el-dialog> </div> </template> <script setup> import { FloodPreventionMaterialList } from '@/api/longoPeration/MaterialManagement'; import ChartBar3D from '@/views/sponeScreen/Echarts/echartBar3D.vue'; const { proxy } = getCurrentInstance(); const open = ref(false); const title = ref(''); const dataList = ref([]); const loading = ref(true); const refresh = ref(1); const echartData = ref({ xAxis: ['车辆类', '泵类', '编织物料', '救生设备', '其他'], seriesData: [5, 35, 690, 86, 290], }); /** 查询列表 */ const getList = async () => { loading.value = true; let res = await FloodPreventionMaterialList({}); if (res && res.code == 200) { dataList.value = res.data || []; // console.log(dataList.value); } loading.value = false; }; //图例点击事件 function ChartBar3DClick() { open.value = true; title.value = '查看物资管理'; getList(); } onMounted(() => { getList(); }); </script> <style lang="scss" scoped> .floodWZPage { width: 100%; .scrollMapHM { height: 240px; p { width: 30%; } } } </style>