@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" />
110 lines (105 loc) • 3.62 kB
JavaScript
'use strict';
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const _hoisted_1 = { class: "dv-ipes-env-manage" };
const _hoisted_2 = { class: "harm-list" };
const _hoisted_3 = { class: "harm-list__column harm-list__column--primary" };
const _hoisted_4 = { class: "harm-list__column__value" };
const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "harm-list__column__label" }, " 正常 ", -1);
const _hoisted_6 = { class: "harm-list__column harm-list__column--error" };
const _hoisted_7 = { class: "harm-list__column__value" };
const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("div", { class: "harm-list__column__label" }, " 异常 ", -1);
const _hoisted_9 = { class: "harm-list__column harm-list__column--warning" };
const _hoisted_10 = { class: "harm-list__column__value" };
const _hoisted_11 = /* @__PURE__ */ vue.createElementVNode("div", { class: "harm-list__column__label" }, " 离线 ", -1);
const __default__ = {
name: "DvIpesHarmfulMonitoring",
title: "有毒有害监控"
};
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: {
factorList: { default: () => ({
wg: [
// {
// factorName: '甲烷',
// factorValue: 89.32,
// targetValue: 500,
// percent: 0.179,
// },
// {
// factorName: '乙醇',
// factorValue: 0.84,
// targetValue: 200,
// percent: 0.004,
// },
],
ww: [
// {
// factorName: '非甲烷总烃总量',
// factorValue: 89.32,
// targetValue: 500,
// percent: 0.179,
// },
// {
// factorName: 'SO2总量',
// factorValue: 0.84,
// targetValue: 200,
// percent: 0.004,
// },
]
}) },
statusMap: { default: () => ({
normal: "",
abnormal: "",
offline: ""
}) },
switchTime: { default: 1e4 },
width: { default: "100%" },
height: { default: 96 }
},
setup(__props) {
const props = __props;
vue.computed(() => {
return props.factorList;
});
const statusMap = vue.computed(() => {
return props.statusMap;
});
vue.computed(() => {
return props.width;
});
vue.computed(() => {
return props.height;
});
const harmIndex = vue.ref(0);
const autoSwitchTimer = vue.ref(null);
const autoSwitch = () => {
autoSwitchTimer.value = setInterval(() => {
harmIndex.value = harmIndex.value === 1 ? 0 : 1;
}, props.switchTime);
};
vue.onMounted(() => {
autoSwitch();
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createElementVNode("div", _hoisted_2, [
vue.createElementVNode("div", _hoisted_3, [
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString(parseInt(statusMap.value.normal) || 0), 1),
_hoisted_5
]),
vue.createElementVNode("div", _hoisted_6, [
vue.createElementVNode("div", _hoisted_7, vue.toDisplayString(parseInt(statusMap.value.abnormal) || 0), 1),
_hoisted_8
]),
vue.createElementVNode("div", _hoisted_9, [
vue.createElementVNode("div", _hoisted_10, vue.toDisplayString(parseInt(statusMap.value.offline) || 0), 1),
_hoisted_11
])
])
]);
};
}
});
exports.default = _sfc_main;