| | |
| | | |
| | | <script setup> |
| | | import { Text } from 'vue'; |
| | | import { Text } from 'vue' |
| | | import publicContent from './publicContent.vue' |
| | | const { VITE_APP_BASE } = import.meta.env |
| | | import { getDetail } from '@/api/indParkInfo' |
| | | |
| | | import { getAssetsFile } from 'utils/utils' |
| | | |
| | | let state = reactive({ |
| | | parkInfo: {} |
| | | }) |
| | | |
| | | // 企业信息统计数组 |
| | | let parkInfoList = ref([ |
| | | let parkInfoList = reactive([ |
| | | { |
| | | id: 1, |
| | | name: 'plaArea', |
| | | title: '园区面积', |
| | | content: '1000', |
| | | unit: '公顷', |
| | | img: 'images/雨量站@2x.png' |
| | | img: getAssetsFile('yq-mj.png', '/bgicon') |
| | | }, |
| | | { |
| | | id: 2, |
| | |
| | | title: '救援人员数量', |
| | | content: '1000', |
| | | unit: '人', |
| | | img: 'images/雨量站@2x.png' |
| | | img: getAssetsFile('yq-jy.png', '/bgicon') |
| | | |
| | | }, |
| | | { |
| | |
| | | name: 'riskFirmNum', |
| | | title: '风险企业数量', |
| | | content: '1000', |
| | | img: 'images/雨量站@2x.png' |
| | | img: getAssetsFile('yq-fx.png', '/bgicon') |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: 'proTarNum', |
| | | title: '保护目标数量', |
| | | content: '1000', |
| | | img: 'images/雨量站@2x.png' |
| | | img: getAssetsFile('yq-bh.png', '/bgicon') |
| | | }, |
| | | { |
| | | id: 5, |
| | | name: 'spaceNum', |
| | | title: '应急空间数量', |
| | | content: '1000', |
| | | img: 'images/雨量站@2x.png' |
| | | img: getAssetsFile('yq-yj.png', '/bgicon') |
| | | }, |
| | | { |
| | | id: 6, |
| | | name: 'firmNum', |
| | | title: '企业数量', |
| | | content: '1000', |
| | | img: 'images/雨量站@2x.png' |
| | | img: getAssetsFile('yq-qy.png', '/bgicon') |
| | | } |
| | | ] |
| | | ) |
| | | |
| | | |
| | | |
| | | |
| | | // 初始化 |
| | | onMounted(() => { |
| | |
| | | |
| | | }) |
| | | // 获取详情 |
| | | function getData() { |
| | | function getData () { |
| | | getDetail().then(res => { |
| | | state.parkInfo = res.data.data |
| | | parkInfoList.value.forEach(item => { |
| | | parkInfoList.forEach(item => { |
| | | if (item.name == 'plaArea') { |
| | | state.parkInfo[item.name] && (item.content = (state.parkInfo[item.name] * 100).toFixed(2)) |
| | | } else { |
| | |
| | | |
| | | <div class="container"> |
| | | <div class="box-content-sj" v-for="item in parkInfoList" :key="item.id"> |
| | | <img :src="VITE_APP_BASE + item.img" alt=""> |
| | | <img :src="item.img" alt=""> |
| | | <div> |
| | | <div class="box-content-ss"> |
| | | <div> |
| | |
| | | |
| | | .box-content-img { |
| | | height: 300px; |
| | | overflow: scroll; |
| | | // 隐藏滚动条 |
| | | scrollbar-width: none; |
| | | overflow-x: hidden; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .box-content-img img { |
| | |
| | | } |
| | | |
| | | .box-content-sj img { |
| | | max-width: 60%; |
| | | height: 60px; |
| | | width: 36px; |
| | | height: 36px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .box-content-ss { |