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

156 lines (151 loc) 6.09 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const vue = require('vue'); const source0 = require('./images/source-0.svg.js'); const source1 = require('./images/source-1.svg.js'); const dayjs = require('dayjs'); const index = require('./api/index.js'); const _hoisted_1 = { class: "dv-wgms-source-monitor" }; const _hoisted_2 = { class: "dv-wgms-source-monitor-list dv-wgms-flex-left-center" }; const _hoisted_3 = { class: "dv-wgms-source-monitor-list-item" }; const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, " 重点源企业 ", -1); const _hoisted_5 = { class: "content-box dv-wgms-flex-left-center" }; const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("img", { src: source0.default, alt: "" }, null, -1); const _hoisted_7 = { class: "right" }; const _hoisted_8 = { class: "value" }; const _hoisted_9 = { class: "online" }; const _hoisted_10 = /* @__PURE__ */ vue.createElementVNode("span", { class: "split" }, "/", -1); const _hoisted_11 = { class: "total" }; const _hoisted_12 = { key: 0, class: "unit" }; const _hoisted_13 = { class: "percent" }; const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("span", { class: "unit" }, "占比", -1); const _hoisted_15 = { class: "rate" }; const _hoisted_16 = { key: 0, class: "unit" }; const _hoisted_17 = { class: "dv-wgms-source-monitor-list-item" }; const _hoisted_18 = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, " 联网率 ", -1); const _hoisted_19 = { class: "content-box dv-wgms-flex-left-center" }; const _hoisted_20 = /* @__PURE__ */ vue.createElementVNode("img", { src: source1.default, alt: "" }, null, -1); const _hoisted_21 = { class: "right" }; const _hoisted_22 = { class: "value" }; const _hoisted_23 = { class: "online mgr4" }; const _hoisted_24 = { key: 0, class: "unit" }; const _hoisted_25 = { class: "percent" }; const _hoisted_26 = /* @__PURE__ */ vue.createElementVNode("span", { class: "unit" }, "安装设备", -1); const _hoisted_27 = { class: "rate" }; const _hoisted_28 = { key: 0, class: "unit" }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: "DvWgmsSourceMonitoring", title: "源监控(1.1)" }, __name: "index", props: { params: { type: Object, default: () => { return { treeId: 3301, treeType: 1, year: dayjs().format("YYYY") }; } }, data: { type: Object, default: () => { } }, isLazy: { type: Boolean, default: false } }, setup(__props, { expose: __expose }) { const props = __props; const pomsData = vue.ref({ equipmentCount: null, mainCount: null, mainPerent: null, onlinePercent: null, totalCount: null }); const getResData = async () => { if (props.data && Reflect.ownKeys(props.data).length) { pomsData.value = props.data; return; } const { data: res } = await index.pomsMonitor(props.params); res && (pomsData.value = res); }; vue.onMounted(() => { !props.isLazy && getResData(); }); vue.watch([() => props.params, () => props.data, () => props.isLazy], () => { !props.isLazy && getResData(); }, { deep: true }); __expose({ reload: getResData }); 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, [ _hoisted_6, vue.createElementVNode("div", _hoisted_7, [ vue.createElementVNode("div", _hoisted_8, [ vue.createElementVNode("span", _hoisted_9, vue.toDisplayString(vue.unref(pomsData).mainCount === null ? "--" : vue.unref(pomsData).mainCount), 1), _hoisted_10, vue.createElementVNode("span", _hoisted_11, vue.toDisplayString(vue.unref(pomsData).totalCount === null ? "--" : vue.unref(pomsData).totalCount), 1), vue.unref(pomsData).totalCount !== null ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_12, "家")) : vue.createCommentVNode("", true) ]), vue.createElementVNode("div", _hoisted_13, [ _hoisted_14, vue.createElementVNode("span", _hoisted_15, vue.toDisplayString(vue.unref(pomsData).mainPerent === null ? "--" : vue.unref(pomsData).mainPerent), 1), vue.unref(pomsData).mainPerent !== null ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_16, "%")) : vue.createCommentVNode("", true) ]) ]) ]) ]), vue.createElementVNode("div", _hoisted_17, [ _hoisted_18, vue.createElementVNode("div", _hoisted_19, [ _hoisted_20, vue.createElementVNode("div", _hoisted_21, [ vue.createElementVNode("div", _hoisted_22, [ vue.createElementVNode("span", _hoisted_23, vue.toDisplayString(vue.unref(pomsData).onlinePercent === null ? "--" : vue.unref(pomsData).onlinePercent), 1), vue.unref(pomsData).onlinePercent !== null ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_24, "%")) : vue.createCommentVNode("", true) ]), vue.createElementVNode("div", _hoisted_25, [ _hoisted_26, vue.createElementVNode("span", _hoisted_27, vue.toDisplayString(vue.unref(pomsData).equipmentCount === null ? "--" : vue.unref(pomsData).equipmentCount), 1), vue.unref(pomsData).equipmentCount !== null ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_28, "家")) : vue.createCommentVNode("", true) ]) ]) ]) ]) ]) ]); }; } }); exports.default = _sfc_main;