@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.
@@ -34,8 +34,15 @@ const __default__ = {
34
34
  };
35
35
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
36
  ...__default__,
37
+ props: {
38
+ isAccessPermission: {
39
+ type: Boolean,
40
+ default: true
41
+ }
42
+ },
37
43
  emits: ["clickItem"],
38
44
  setup(__props, { emit }) {
45
+ const props = __props;
39
46
  const activeTab = vue.ref("");
40
47
  const tabList = vue.ref([]);
41
48
  const cardData = vue.ref([]);
@@ -46,6 +53,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
46
53
  method: "POST",
47
54
  url: "/bmp-mission-center-server/api/v1/parkStatistics/countByStatusForPark",
48
55
  data: {
56
+ isAccessPermission: props.isAccessPermission
49
57
  // startTime: dayjs().startOf('day').valueOf(),
50
58
  // endTime: dayjs().endOf('day').valueOf()
51
59
  }
@@ -62,7 +70,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
62
70
  method: "POST",
63
71
  url: "/bmp-mission-center-server/api/v1/parkStatistics/countByMissionLevel",
64
72
  data: {
65
- missionStatusList: [0, 1]
73
+ missionStatusList: [0, 1],
74
+ isAccessPermission: props.isAccessPermission
66
75
  // startTime: dayjs().startOf('day').valueOf(),
67
76
  // endTime: dayjs().endOf('day').valueOf()
68
77
  }
@@ -92,7 +101,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
92
101
  missionStatusList: [0, 1],
93
102
  missionLevelCodeList: [activeTab.value],
94
103
  limit,
95
- page
104
+ page,
105
+ isAccessPermission: props.isAccessPermission
96
106
  }
97
107
  });
98
108
  loading.value = false;
@@ -32,7 +32,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
32
32
  ...__default__,
33
33
  props: {
34
34
  siteCodeList: { default: () => [] },
35
- isAccessPermission: { type: Boolean, default: false }
35
+ isAccessPermission: { type: Boolean, default: false },
36
+ infoMap: { default: {
37
+ totalNum: "onlineNum",
38
+ onlineNum: "onlineNum",
39
+ offlineNum: ""
40
+ } }
36
41
  },
37
42
  setup(__props) {
38
43
  const props = __props;
@@ -41,6 +46,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
41
46
  offlineNum: 0,
42
47
  totalNum: 0
43
48
  });
49
+ const infoData = vue.computed(() => {
50
+ return {
51
+ totalNum: info.value[props.infoMap.totalNum] || 0,
52
+ onlineNum: info.value[props.infoMap.onlineNum] || 0,
53
+ offlineNum: info.value[props.infoMap.offlineNum] || 0
54
+ };
55
+ });
44
56
  async function getInfoData() {
45
57
  try {
46
58
  const res = await request.default({
@@ -67,17 +79,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
67
79
  _hoisted_3,
68
80
  vue.createElementVNode("div", null, [
69
81
  _hoisted_4,
70
- vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(getShowData(info.value.totalNum)), 1)
82
+ vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(getShowData(infoData.value.totalNum)), 1)
71
83
  ])
72
84
  ]),
73
85
  vue.createElementVNode("div", _hoisted_6, [
74
86
  vue.createElementVNode("div", _hoisted_7, [
75
87
  _hoisted_8,
76
- vue.createElementVNode("span", _hoisted_9, vue.toDisplayString(getShowData(info.value.onlineNum)), 1)
88
+ vue.createElementVNode("span", _hoisted_9, vue.toDisplayString(getShowData(infoData.value.onlineNum)), 1)
77
89
  ]),
78
90
  vue.createElementVNode("div", _hoisted_10, [
79
91
  _hoisted_11,
80
- vue.createElementVNode("span", _hoisted_12, vue.toDisplayString(getShowData(info.value.offlineNum)), 1)
92
+ vue.createElementVNode("span", _hoisted_12, vue.toDisplayString(getShowData(infoData.value.offlineNum)), 1)
81
93
  ])
82
94
  ])
83
95
  ]);