UNPKG

@ued_fpi/data-visual

Version:

<br /> <br /> <div style="text-align:center"> <b style="font-size:30px">@ued_fpi/data-visual</b> <p>基于Vite4+TypeScript的Vue3大屏组件库开发框架</p> <img style="display:inline" src="https://img.shields.io/npm/v/@ued_fpi/data-visual" />

65 lines (62 loc) 1.75 kB
import { defineComponent, ref, openBlock, createElementBlock, createVNode } from 'vue'; import _sfc_main$1 from '../common/RealTimeAir.vue.mjs'; import '../common/RealTimeAir.vue2.mjs'; import requestControl from '../../service/request.mjs'; import { setIntervalData } from '../../utils/hooks.mjs'; const _hoisted_1 = { class: "dv-ipes-real-timeAir-quality-manage" }; const __default__ = { name: "DvIpesAirQualityManage", title: "空气质量管理" }; const _sfc_main = /* @__PURE__ */ defineComponent({ ...__default__, props: { width: { default: "100%" }, height: { default: 72 } }, setup(__props) { const airQualityObj = ref({ time: "", aqiValue: null, aqiColor: "", aqiLevel: "", mainPolluter: "" }); async function getAqmsManage() { try { const res = await requestControl({ method: "get", url: "/ipes-data-aggregation-server/api/v1/env-protection/aqms-manage" }); const { aqiValue, aqiColor, aqiLevel, mainPolluter, time } = res.data; airQualityObj.value = { aqiValue, aqiColor, aqiLevel, mainPolluter, time }; } catch (error) { console.log(error); } } getAqmsManage(); setIntervalData(getAqmsManage, 5 * 60 * 1e3); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ createVNode(_sfc_main$1, { "air-quality-obj": airQualityObj.value, height: _ctx.height, width: _ctx.width }, null, 8, ["air-quality-obj", "height", "width"]) ]); }; } }); export { _sfc_main as default };