@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" />
71 lines (66 loc) • 2.09 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const index = require('./api/index.js');
const _hoisted_1 = { class: "dv-wgms-distribution-points" };
const _hoisted_2 = { class: "dv-wgms-distribution-font-box" };
const _hoisted_3 = { class: "dv-wgms-distribution-font-blue" };
const _hoisted_4 = { class: "dv-wgms-distribution-name" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...{
name: "DvWgmsDistributionPoints",
title: "布点现状"
},
__name: "index",
props: {
treeId: {
type: [Number, String],
default: 3302
},
monitoringMethods: {
type: Number,
default: 0
},
isLazy: {
type: Boolean,
default: false
}
},
setup(__props, { expose: __expose }) {
const props = __props;
vue.watch([props.monitoringMethods, props.treeId], () => {
!props.isLazy && getRankData();
});
const list = vue.ref([]);
vue.onMounted(() => {
!props.isLazy && getRankData();
});
const getRankData = async () => {
const params = {
monitorType: props.monitoringMethods,
treeId: props.treeId
};
const res = await index.situation(params);
list.value = res?.data || [];
};
__expose({
reload: getRankData
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (item, index) => {
return vue.openBlock(), vue.createElementBlock("div", {
key: index,
class: "dv-wgms-distribution-items"
}, [
vue.createElementVNode("div", _hoisted_2, [
vue.createElementVNode("div", _hoisted_3, vue.toDisplayString(item.count), 1)
]),
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString(item.name), 1)
]);
}), 128))
]);
};
}
});
exports.default = _sfc_main;