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

165 lines (160 loc) 7.38 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const es = require('element-plus/es'); require('element-plus/es/components/base/style/css'); require('element-plus/es/components/scrollbar/style/css'); require('element-plus/es/components/empty/style/css'); require('element-plus/es/components/select/style/css'); require('element-plus/es/components/option/style/css'); const vue = require('vue'); const dayjs = require('dayjs'); const newNodata = require('../common/images/new-nodata.svg.js'); const index = require('./types/index.js'); const _hoisted_1 = { class: "dv-ipes-access-vehicle" }; const _hoisted_2 = { class: "access-row" }; const _hoisted_3 = { class: "access-header" }; const _hoisted_4 = { class: "access-header__title" }; const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode("span", null, "车辆出入园统计", -1); const _hoisted_6 = { class: "access-header__title--sub" }; const _hoisted_7 = { class: "access-header__extra" }; const _hoisted_8 = { class: "access-statistics" }; const _hoisted_9 = { class: "access-statistics-item__total" }; const _hoisted_10 = { class: "access-statistics-item__type" }; const _hoisted_11 = { class: "access-row" }; const _hoisted_12 = { class: "access-header" }; const _hoisted_13 = { class: "access-header__title" }; const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("span", null, "车辆出入园记录", -1); const _hoisted_15 = { class: "access-header__title--sub" }; const _hoisted_16 = { class: "access-list" }; const _hoisted_17 = ["onClick"]; const _hoisted_18 = { class: "access-list-item__info" }; const _hoisted_19 = { class: "access-list-item__vehicle" }; const _hoisted_20 = { class: "access-list-item__time" }; const __default__ = { name: "DvIpesAccessVehicleManage", title: "车辆出入园统计" }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: vue.mergeDefaults({ accessStatistic: {}, accessRecord: {}, timeType: {}, timeTypeOptions: {} }, { ...index.defaultProps }), emits: { onTimeTypeChange: (value) => value, onRecordCheck: (idx, value) => value }, setup(__props, { emit: emits }) { const props = __props; const _timeType = vue.ref(props.timeType); const today = vue.ref(dayjs().format("YYYY-MM-DD")); const activeIndex = vue.ref(-1); const timeLabel = vue.computed(() => { let format; ((format2) => { format2["year"] = "YYYY"; format2["month"] = "YYYY-MM"; format2["day"] = "YYYY-MM-DD"; })(format || (format = {})); return dayjs().format(format[_timeType.value]); }); const handleTimeTypeChange = (value) => { emits("onTimeTypeChange", value); }; const handleCheck = (idx, value) => { activeIndex.value = idx; emits("onRecordCheck", idx, value); }; return (_ctx, _cache) => { const _component_el_option = es.ElOption; const _component_el_select = es.ElSelect; const _component_el_empty = es.ElEmpty; const _component_el_scrollbar = es.ElScrollbar; return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createElementVNode("div", _hoisted_2, [ vue.createElementVNode("div", _hoisted_3, [ vue.createElementVNode("div", _hoisted_4, [ _hoisted_5, vue.createElementVNode("span", _hoisted_6, "(" + vue.toDisplayString(timeLabel.value) + ")", 1) ]), vue.createElementVNode("div", _hoisted_7, [ vue.createVNode(_component_el_select, { modelValue: _timeType.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _timeType.value = $event), "popper-append-to-body": false, class: "fpi-select", onChange: handleTimeTypeChange }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.timeTypeOptions, (item) => { return vue.openBlock(), vue.createBlock(_component_el_option, { key: item.value, value: item.value, label: item.label }, null, 8, ["value", "label"]); }), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]), vue.createElementVNode("div", _hoisted_8, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.accessStatistic, (item, idx) => { return vue.openBlock(), vue.createElementBlock("div", { key: idx, class: vue.normalizeClass(["access-statistics-item", `access-statistics-item--${item.type}`]) }, [ vue.createElementVNode("div", _hoisted_9, vue.toDisplayString(item.value), 1), vue.createElementVNode("div", _hoisted_10, vue.toDisplayString(item.label), 1) ], 2); }), 128)) ]) ]), vue.createElementVNode("div", _hoisted_11, [ vue.createElementVNode("div", _hoisted_12, [ vue.createElementVNode("div", _hoisted_13, [ _hoisted_14, vue.createElementVNode("span", _hoisted_15, "(" + vue.toDisplayString(today.value) + ")", 1) ]) ]), vue.createElementVNode("div", _hoisted_16, [ vue.createVNode(_component_el_scrollbar, { height: "220px" }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createVNode(_component_el_empty, { "image-size": 140, image: vue.unref(newNodata.default), description: "" }, null, 8, ["image"]), [ [vue.vShow, !_ctx.accessRecord.length] ]), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.accessRecord, (item, key) => { return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ item ? (vue.openBlock(), vue.createElementBlock("div", { key, class: vue.normalizeClass(["access-list-item", { "access-list-item--active": key === activeIndex.value }]), onClick: ($event) => handleCheck(key, item) }, [ vue.createElementVNode("div", _hoisted_18, [ vue.createElementVNode("div", { class: vue.normalizeClass(["access-list-item__type", `access-list-item__type--${item.crossType === "入园" ? "entry" : "exit"}`]) }, vue.toDisplayString(item.crossType), 3), vue.createElementVNode("div", _hoisted_19, vue.toDisplayString(item.plateNo), 1) ]), vue.createElementVNode("div", _hoisted_20, vue.toDisplayString(item.crossTime), 1) ], 10, _hoisted_17)) : vue.createCommentVNode("", true) ], 64); }), 256)) ]), _: 1 }) ]) ]) ]); }; } }); exports.default = _sfc_main;