@ued_fpi/data-visual 1.4.22 → 1.4.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,8 +30,15 @@ const __default__ = {
30
30
  };
31
31
  const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  ...__default__,
33
+ props: {
34
+ isAccessPermission: {
35
+ type: Boolean,
36
+ default: true
37
+ }
38
+ },
33
39
  emits: ["clickItem"],
34
40
  setup(__props, { emit }) {
41
+ const props = __props;
35
42
  const activeTab = ref("");
36
43
  const tabList = ref([]);
37
44
  const cardData = ref([]);
@@ -42,6 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
49
  method: "POST",
43
50
  url: "/bmp-mission-center-server/api/v1/parkStatistics/countByStatusForPark",
44
51
  data: {
52
+ isAccessPermission: props.isAccessPermission
45
53
  // startTime: dayjs().startOf('day').valueOf(),
46
54
  // endTime: dayjs().endOf('day').valueOf()
47
55
  }
@@ -58,7 +66,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
66
  method: "POST",
59
67
  url: "/bmp-mission-center-server/api/v1/parkStatistics/countByMissionLevel",
60
68
  data: {
61
- missionStatusList: [0, 1]
69
+ missionStatusList: [0, 1],
70
+ isAccessPermission: props.isAccessPermission
62
71
  // startTime: dayjs().startOf('day').valueOf(),
63
72
  // endTime: dayjs().endOf('day').valueOf()
64
73
  }
@@ -88,7 +97,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
97
  missionStatusList: [0, 1],
89
98
  missionLevelCodeList: [activeTab.value],
90
99
  limit,
91
- page
100
+ page,
101
+ isAccessPermission: props.isAccessPermission
92
102
  }
93
103
  });
94
104
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString } from 'vue';
1
+ import { defineComponent, ref, computed, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString } from 'vue';
2
2
  import requestControl from '../../service/request.mjs';
3
3
  import { setIntervalData } from '../../utils/hooks.mjs';
4
4
 
@@ -28,7 +28,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  ...__default__,
29
29
  props: {
30
30
  siteCodeList: { default: () => [] },
31
- isAccessPermission: { type: Boolean, default: false }
31
+ isAccessPermission: { type: Boolean, default: false },
32
+ infoMap: { default: {
33
+ totalNum: "onlineNum",
34
+ onlineNum: "onlineNum",
35
+ offlineNum: ""
36
+ } }
32
37
  },
33
38
  setup(__props) {
34
39
  const props = __props;
@@ -37,6 +42,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
42
  offlineNum: 0,
38
43
  totalNum: 0
39
44
  });
45
+ const infoData = computed(() => {
46
+ return {
47
+ totalNum: info.value[props.infoMap.totalNum] || 0,
48
+ onlineNum: info.value[props.infoMap.onlineNum] || 0,
49
+ offlineNum: info.value[props.infoMap.offlineNum] || 0
50
+ };
51
+ });
40
52
  async function getInfoData() {
41
53
  try {
42
54
  const res = await requestControl({
@@ -63,17 +75,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
75
  _hoisted_3,
64
76
  createElementVNode("div", null, [
65
77
  _hoisted_4,
66
- createElementVNode("span", _hoisted_5, toDisplayString(getShowData(info.value.totalNum)), 1)
78
+ createElementVNode("span", _hoisted_5, toDisplayString(getShowData(infoData.value.totalNum)), 1)
67
79
  ])
68
80
  ]),
69
81
  createElementVNode("div", _hoisted_6, [
70
82
  createElementVNode("div", _hoisted_7, [
71
83
  _hoisted_8,
72
- createElementVNode("span", _hoisted_9, toDisplayString(getShowData(info.value.onlineNum)), 1)
84
+ createElementVNode("span", _hoisted_9, toDisplayString(getShowData(infoData.value.onlineNum)), 1)
73
85
  ]),
74
86
  createElementVNode("div", _hoisted_10, [
75
87
  _hoisted_11,
76
- createElementVNode("span", _hoisted_12, toDisplayString(getShowData(info.value.offlineNum)), 1)
88
+ createElementVNode("span", _hoisted_12, toDisplayString(getShowData(infoData.value.offlineNum)), 1)
77
89
  ])
78
90
  ])
79
91
  ]);