@ued_fpi/data-visual 1.4.18 → 1.4.20

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.
@@ -7,7 +7,7 @@ const _hoisted_2 = { class: "value" };
7
7
  const _hoisted_3 = { class: "title" };
8
8
  const _hoisted_4 = { class: "done" };
9
9
  const _hoisted_5 = { class: "done-header" };
10
- const _hoisted_6 = /* @__PURE__ */ createElementVNode("span", null, "排查任务完成率", -1);
10
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode("span", null, "上周排查任务完成率", -1);
11
11
  const _hoisted_7 = { class: "doneRateNumber" };
12
12
  const _hoisted_8 = {
13
13
  key: 0,
@@ -22,9 +22,13 @@ const __default__ = {
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  ...__default__,
24
24
  props: {
25
- doneRate: {
26
- type: Number,
27
- default: 78.9
25
+ url: {
26
+ type: String,
27
+ default: "/ipes-srip-server/api/v3/gis/panel/hidden-trouble"
28
+ },
29
+ url2: {
30
+ type: String,
31
+ default: "/ipes-srip-server/api/v3/gis/hidden-trouble/mission/statistics/percent"
28
32
  }
29
33
  },
30
34
  setup(__props) {
@@ -39,19 +43,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
43
  { title: "重大隐患", key: "major" },
40
44
  { title: "整改率", key: "ratio", unit: "%" }
41
45
  ]);
42
- const doneRate = computed(() => props.doneRate);
43
- const componentBox = ref(null);
46
+ const doneRate = ref(null);
47
+ const componentBox = ref("");
44
48
  const copies = computed(() => {
45
49
  const offsetWidth = componentBox.value?.offsetWidth || 0;
46
50
  return offsetWidth > 0 ? (offsetWidth - 24 - 2) / 3 : 0;
47
51
  });
48
52
  async function getData() {
49
53
  try {
50
- const res = await requestControl({
51
- method: "get",
52
- url: "/ipes-srip-server/api/v3/gis/panel/hidden-trouble"
53
- });
54
+ const [res, res1] = await Promise.all([
55
+ requestControl({ url: props.url }),
56
+ requestControl({ url: props.url2 })
57
+ ]);
54
58
  data.value = res.data;
59
+ doneRate.value = res1.data?.missionCompletedPercent || 0;
55
60
  } catch (error) {
56
61
  console.log(error);
57
62
  }
@@ -56,7 +56,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
56
  onMounted(() => {
57
57
  getInfoData();
58
58
  });
59
- setIntervalData(getData, 5 * 60 * 1e3);
59
+ setIntervalData(getInfoData, 5 * 60 * 1e3);
60
60
  return (_ctx, _cache) => {
61
61
  return openBlock(), createElementBlock("div", _hoisted_1, [
62
62
  createElementVNode("div", _hoisted_2, [