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" />

118 lines (113 loc) 3.71 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const vue = require('vue'); const dayjs = require('dayjs'); const index = require('./api/index.js'); const _hoisted_1 = { class: "dv-wgms-pollution-source", style: { "width": "auto" } }; const _hoisted_2 = { class: "dv-wgms-statistic-content" }; const _hoisted_3 = { class: "dv-wgms-statistic-box" }; const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "dv-wgms-text" }, " 入河排污口 ", -1); const _hoisted_5 = { class: "dv-wgms-port-list" }; const _hoisted_6 = { class: "dv-wgms-port-one" }; const _hoisted_7 = /* @__PURE__ */ vue.createElementVNode("div", { class: "dv-wgms-name" }, " 氮超标 ", -1); const _hoisted_8 = { class: "dv-wgms-value" }; const _hoisted_9 = /* @__PURE__ */ vue.createElementVNode("span", null, "个", -1); const _hoisted_10 = { class: "dv-wgms-port-one" }; const _hoisted_11 = /* @__PURE__ */ vue.createElementVNode("div", { class: "dv-wgms-name" }, " 磷超标 ", -1); const _hoisted_12 = { class: "dv-wgms-value" }; const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("span", null, "个", -1); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: "DvWgmsPollutionSourceControlOutlets", title: "污染源管控-入河排污口" }, __name: "index", props: { params: { type: Object, default: () => { return { distance: 5e3, startTime: dayjs().startOf("year").valueOf(), endTime: dayjs().endOf("year").valueOf(), latitude: 30, longitude: 120, timeType: "day" }; } }, isLazy: { type: Boolean, default: false }, data: { type: Object, default: void 0 } }, setup(__props, { expose: __expose }) { const props = __props; const outletData = vue.reactive({ nh3OverNum: 0, tpOverNum: 0 }); vue.watch([ () => props.params, () => props.data, () => props.isLazy ], () => { if (props.isLazy) return; getPortData(); }); vue.onMounted(() => { if (props.isLazy) return; getPortData(); }); const getPortData = async () => { let resData; if (props.data) { resData = props.data; } else { const res = await index.portToRiver(props.params); resData = res.data; } outletData.nh3OverNum = resData?.noverCount ?? 0; outletData.tpOverNum = resData?.poverCount ?? 0; }; const { nh3OverNum, tpOverNum } = vue.toRefs(outletData); __expose({ reload: getPortData }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createElementVNode("div", _hoisted_2, [ vue.createElementVNode("div", _hoisted_3, [ _hoisted_4, vue.createElementVNode("div", _hoisted_5, [ vue.createElementVNode("div", _hoisted_6, [ _hoisted_7, vue.createElementVNode("div", _hoisted_8, [ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(nh3OverNum)), 1), _hoisted_9 ]) ]), vue.createElementVNode("div", _hoisted_10, [ _hoisted_11, vue.createElementVNode("div", _hoisted_12, [ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(tpOverNum)), 1), _hoisted_13 ]) ]) ]) ]) ]) ]); }; } }); exports.default = _sfc_main;